diff options
author | Remy Noel <mocramis@gmail.com> | 2018-04-14 10:00:10 +0200 |
---|---|---|
committer | Remy Noel <mocramis@gmail.com> | 2018-04-14 10:00:10 +0200 |
commit | f3bdc3f165ccb4bcd608f3f3725e990b44de44f9 (patch) | |
tree | 4714c20dd154fd1dd4a40faef2e454148c873136 /arch | |
parent | 2efc39da83bf826186497a8fe3208fcc1afee2a4 (diff) | |
parent | 8088131a4e0165938593577a9cfa87de7ffd22bc (diff) |
Merge branch 'master' into perfmon
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/Makefile | 9 | ||||
-rw-r--r-- | arch/x86/machine/lapic.c | 6 | ||||
-rw-r--r-- | arch/x86/x15.lds.S | 21 |
3 files changed, 22 insertions, 14 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index e20a711..002ed44 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -20,11 +20,20 @@ XBUILD_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 ifeq ($(CONFIG_X86_32),y) biarch := $(call cc-option,-m32) + XBUILD_CPPFLAGS += -m32 + + XBUILD_LDFLAGS += -lgcc else biarch := -m64 + XBUILD_CPPFLAGS += -m64 + # XXX The kernel isn't linked with libgcc on amd64, because libgcc + # uses red zones. But since there are actually very few functions + # provided by libgcc on amd64, it was decided to just not link with + # it. If it turns out that libgcc is really needed some day, the + # kernel can somewhat easily be changed to support red zones. XBUILD_CFLAGS += -mno-red-zone XBUILD_CFLAGS += -mcmodel=kernel endif diff --git a/arch/x86/machine/lapic.c b/arch/x86/machine/lapic.c index 180a1a2..3f6d0c2 100644 --- a/arch/x86/machine/lapic.c +++ b/arch/x86/machine/lapic.c @@ -271,11 +271,17 @@ lapic_ap_setup(void) static void lapic_ipi(uint32_t apic_id, uint32_t icr) { + unsigned long flags; + + cpu_intr_save(&flags); + if ((icr & LAPIC_ICR_DEST_MASK) == 0) { lapic_write(&lapic_map->icr_high, apic_id << LAPIC_DEST_SHIFT); } lapic_write(&lapic_map->icr_low, icr & ~LAPIC_ICR_RESERVED); + + cpu_intr_restore(flags); } static void diff --git a/arch/x86/x15.lds.S b/arch/x86/x15.lds.S index 80b1e65..b896a5d 100644 --- a/arch/x86/x15.lds.S +++ b/arch/x86/x15.lds.S @@ -58,7 +58,7 @@ SECTIONS _percpu = .; .percpu 0 : AT(BOOT_VTOP(_percpu)) { - *(.percpu) + *(.percpu*) } : percpu . = _percpu + SIZEOF(.percpu); @@ -67,18 +67,14 @@ SECTIONS _text = .; .text ALIGN(PAGE_SIZE) : AT(BOOT_VTOP(ADDR(.text))) { - *(.text) + *(.text*) } : text . = ALIGN(PAGE_SIZE); _rodata = .; .rodata ALIGN(PAGE_SIZE) : AT(BOOT_VTOP(ADDR(.rodata))) { - *(.rodata) - } : rodata - - .notes ALIGN(CPU_DATA_ALIGN) : AT(BOOT_VTOP(ADDR(.notes))) { - *(.note.*) + *(.rodata*) } : rodata . = ALIGN(PAGE_SIZE); @@ -88,21 +84,18 @@ SECTIONS . = ALIGN(CPU_L1_SIZE); *(.data.read_mostly) . = ALIGN(CPU_L1_SIZE); - *(.data) + *(.data*) } : data .bss ALIGN(CPU_DATA_ALIGN) : AT(BOOT_VTOP(ADDR(.bss))) { - *(.bss) + *(.bss*) } : data . = ALIGN(PAGE_SIZE); _end = .; - /* - * XXX A global offset section is created because of linking with libgcc. - * Is it safe to discard it ? - */ /DISCARD/ : { - *(.eh_frame) + *(.eh_frame*) + *(.note*) } } |