diff options
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/Kconfig | 3 | ||||
-rw-r--r-- | arch/x86_64/boot/compressed/head.S | 7 | ||||
-rw-r--r-- | arch/x86_64/defconfig | 2 | ||||
-rw-r--r-- | arch/x86_64/ia32/ia32_binfmt.c | 5 | ||||
-rw-r--r-- | arch/x86_64/ia32/ptrace32.c | 1 | ||||
-rw-r--r-- | arch/x86_64/ia32/syscall32.c | 8 | ||||
-rw-r--r-- | arch/x86_64/kernel/Makefile | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/acpi/Makefile | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/apic.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/bugs.c | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/entry.S | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/pci-calgary.c | 13 | ||||
-rw-r--r-- | arch/x86_64/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/suspend.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/sys_x86_64.c | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/tce.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/tsc.c | 2 | ||||
-rw-r--r-- | arch/x86_64/mm/init.c | 10 | ||||
-rw-r--r-- | arch/x86_64/mm/pageattr.c | 3 | ||||
-rw-r--r-- | arch/x86_64/pci/mmconfig.c | 12 | ||||
-rw-r--r-- | arch/x86_64/vdso/.gitignore | 1 | ||||
-rw-r--r-- | arch/x86_64/vdso/vma.c | 1 |
24 files changed, 58 insertions, 45 deletions
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 45f82ae6d389..ffa036406289 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -765,6 +765,9 @@ config COMPAT depends on IA32_EMULATION default y +config COMPAT_FOR_U64_ALIGNMENT + def_bool COMPAT + config SYSVIPC_COMPAT bool depends on COMPAT && SYSVIPC diff --git a/arch/x86_64/boot/compressed/head.S b/arch/x86_64/boot/compressed/head.S index 1312bfaff306..9fd8030cc54f 100644 --- a/arch/x86_64/boot/compressed/head.S +++ b/arch/x86_64/boot/compressed/head.S @@ -195,6 +195,11 @@ ENTRY(startup_64) movl %eax, %ds movl %eax, %es movl %eax, %ss + movl %eax, %fs + movl %eax, %gs + lldt %ax + movl $0x20, %eax + ltr %ax /* Compute the decompressed kernel start address. It is where * we were loaded at aligned to a 2M boundary. %rbp contains the @@ -295,6 +300,8 @@ gdt: .quad 0x0000000000000000 /* NULL descriptor */ .quad 0x00af9a000000ffff /* __KERNEL_CS */ .quad 0x00cf92000000ffff /* __KERNEL_DS */ + .quad 0x0080890000000000 /* TS descriptor */ + .quad 0x0000000000000000 /* TS continued */ gdt_end: .bss /* Stack for uncompression */ diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index b7c4cd04bfc3..e64f65c9d901 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig @@ -199,7 +199,7 @@ CONFIG_GENERIC_PENDING_IRQ=y CONFIG_PM=y # CONFIG_PM_LEGACY is not set # CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y +CONFIG_HIBERNATION=y CONFIG_PM_STD_PARTITION="" CONFIG_SUSPEND_SMP=y diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index b70f3e7cf06c..dffd2ac72747 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -41,8 +41,9 @@ int sysctl_vsyscall32 = 1; #undef ARCH_DLINFO #define ARCH_DLINFO do { \ if (sysctl_vsyscall32) { \ - NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \ - NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL32_BASE); \ + current->mm->context.vdso = (void *)VSYSCALL32_BASE; \ + NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL32_BASE); \ } \ } while(0) diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c index 4de3a54318f4..4a233ad6269c 100644 --- a/arch/x86_64/ia32/ptrace32.c +++ b/arch/x86_64/ia32/ptrace32.c @@ -15,6 +15,7 @@ #include <linux/syscalls.h> #include <linux/unistd.h> #include <linux/mm.h> +#include <linux/err.h> #include <linux/ptrace.h> #include <asm/ptrace.h> #include <asm/compat.h> diff --git a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c index fc4419ff0355..15013bac181c 100644 --- a/arch/x86_64/ia32/syscall32.c +++ b/arch/x86_64/ia32/syscall32.c @@ -49,14 +49,6 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack) return ret; } -const char *arch_vma_name(struct vm_area_struct *vma) -{ - if (vma->vm_start == VSYSCALL32_BASE && - vma->vm_mm && vma->vm_mm->task_size == IA32_PAGE_OFFSET) - return "[vdso]"; - return NULL; -} - static int __init init_syscall32(void) { char *syscall32_page = (void *)get_zeroed_page(GFP_KERNEL); diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index 47f1dc30bf56..ff5d8c9b96d9 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile @@ -26,13 +26,12 @@ obj-y += io_apic.o mpparse.o genapic.o genapic_flat.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_PM) += suspend.o -obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o +obj-$(CONFIG_HIBERNATION) += suspend_asm.o obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_IOMMU) += pci-gart.o aperture.o obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary.o tce.o obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o -obj-$(CONFIG_SERIAL_8250) += legacy_serial.o obj-$(CONFIG_KPROBES) += kprobes.o obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o obj-$(CONFIG_X86_VSMP) += vsmp.o @@ -51,7 +50,6 @@ CFLAGS_vsyscall.o := $(PROFILING) -g0 therm_throt-y += ../../i386/kernel/cpu/mcheck/therm_throt.o bootflag-y += ../../i386/kernel/bootflag.o -legacy_serial-y += ../../i386/kernel/legacy_serial.o cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o topology-y += ../../i386/kernel/topology.o microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile index 17595d23fee7..080b9963f1bc 100644 --- a/arch/x86_64/kernel/acpi/Makefile +++ b/arch/x86_64/kernel/acpi/Makefile @@ -1,6 +1,6 @@ obj-y := boot.o boot-y := ../../../i386/kernel/acpi/boot.o -obj-y += sleep.o wakeup.o +obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o ifneq ($(CONFIG_ACPI_PROCESSOR),) obj-y += processor.o diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 900ff38d68de..925758dbca0c 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c @@ -791,10 +791,8 @@ static void setup_APIC_timer(unsigned int clocks) /* wait for irq slice */ if (hpet_address && hpet_use_timer) { - int trigger = hpet_readl(HPET_T0_CMP); - while (hpet_readl(HPET_COUNTER) >= trigger) - /* do nothing */ ; - while (hpet_readl(HPET_COUNTER) < trigger) + u32 trigger = hpet_readl(HPET_T0_CMP); + while (hpet_readl(HPET_T0_CMP) == trigger) /* do nothing */ ; } else { int c1, c2; diff --git a/arch/x86_64/kernel/bugs.c b/arch/x86_64/kernel/bugs.c index c3c6b91566ed..4e5e9d364d63 100644 --- a/arch/x86_64/kernel/bugs.c +++ b/arch/x86_64/kernel/bugs.c @@ -8,6 +8,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <asm/alternative.h> +#include <asm/bugs.h> #include <asm/processor.h> #include <asm/mtrr.h> diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 830cfc6ee8cb..1d232e5f5658 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -282,7 +282,7 @@ sysret_careful: sysret_signal: TRACE_IRQS_ON sti - testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx + testl $(_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx jz 1f /* Really a signal */ @@ -375,7 +375,7 @@ int_very_careful: jmp int_restore_rest int_signal: - testl $(_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx + testl $(_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx jz 1f movq %rsp,%rdi # &ptregs -> arg1 xorl %esi,%esi # oldset -> arg2 @@ -599,7 +599,7 @@ retint_careful: jmp retint_check retint_signal: - testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx + testl $(_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY),%edx jz retint_swapgs TRACE_IRQS_ON sti diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 3a16e417dd8d..e89abcdbdde8 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S @@ -120,7 +120,7 @@ ident_complete: addq %rbp, trampoline_level4_pgt + 0(%rip) addq %rbp, trampoline_level4_pgt + (511*8)(%rip) #endif -#ifdef CONFIG_ACPI +#ifdef CONFIG_ACPI_SLEEP addq %rbp, wakeup_level4_pgt + 0(%rip) addq %rbp, wakeup_level4_pgt + (511*8)(%rip) #endif diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index ba16c968ca3f..71da01e73f03 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c @@ -367,16 +367,15 @@ static inline struct iommu_table *find_iommu_table(struct device *dev) pdev = to_pci_dev(dev); - /* is the device behind a bridge? */ - if (unlikely(pdev->bus->parent)) - pbus = pdev->bus->parent; - else - pbus = pdev->bus; + pbus = pdev->bus; + + /* is the device behind a bridge? Look for the root bus */ + while (pbus->parent) + pbus = pbus->parent; tbl = pci_iommu(pbus); - BUG_ON(pdev->bus->parent && - (tbl->it_busno != pdev->bus->parent->number)); + BUG_ON(tbl && (tbl->it_busno != pbus->number)); return tbl; } diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index e7ac629d4c46..2842f50cbe3f 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -23,6 +23,7 @@ #include <linux/sched.h> #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/fs.h> #include <linux/elfcore.h> #include <linux/smp.h> #include <linux/slab.h> diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0f400f3c4694..af838f6b0b7f 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c @@ -333,7 +333,7 @@ void __init setup_arch(char **cmdline_p) reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE); #endif -#ifdef CONFIG_ACPI +#ifdef CONFIG_ACPI_SLEEP /* * Reserve low memory region for sleep support. */ diff --git a/arch/x86_64/kernel/suspend.c b/arch/x86_64/kernel/suspend.c index ea83a9f91965..573c0a6e0ac6 100644 --- a/arch/x86_64/kernel/suspend.c +++ b/arch/x86_64/kernel/suspend.c @@ -146,7 +146,7 @@ void fix_processor_context(void) } -#ifdef CONFIG_SOFTWARE_SUSPEND +#ifdef CONFIG_HIBERNATION /* Defined in arch/x86_64/kernel/suspend_asm.S */ extern int restore_image(void); @@ -236,4 +236,4 @@ int pfn_is_nosave(unsigned long pfn) unsigned long nosave_end_pfn = PAGE_ALIGN(__pa_symbol(&__nosave_end)) >> PAGE_SHIFT; return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn); } -#endif /* CONFIG_SOFTWARE_SUSPEND */ +#endif /* CONFIG_HIBERNATION */ diff --git a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c index d067d9a2ad27..4770b7a2052c 100644 --- a/arch/x86_64/kernel/sys_x86_64.c +++ b/arch/x86_64/kernel/sys_x86_64.c @@ -6,6 +6,7 @@ #include <linux/sched.h> #include <linux/syscalls.h> #include <linux/mm.h> +#include <linux/fs.h> #include <linux/smp.h> #include <linux/sem.h> #include <linux/msg.h> diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c index 3aeae2fa2e24..e3f2569b2c44 100644 --- a/arch/x86_64/kernel/tce.c +++ b/arch/x86_64/kernel/tce.c @@ -131,7 +131,7 @@ done: return ret; } -int build_tce_table(struct pci_dev *dev, void __iomem *bbar) +int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar) { struct iommu_table *tbl; int ret; @@ -165,7 +165,7 @@ done: return ret; } -void* alloc_tce_table(void) +void * __init alloc_tce_table(void) { unsigned int size; @@ -175,7 +175,7 @@ void* alloc_tce_table(void) return __alloc_bootmem_low(size, size, 0); } -void free_tce_table(void *tbl) +void __init free_tce_table(void *tbl) { unsigned int size; diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c index 9b76b03d0600..2a59bde663f2 100644 --- a/arch/x86_64/kernel/tsc.c +++ b/arch/x86_64/kernel/tsc.c @@ -118,8 +118,6 @@ core_initcall(cpufreq_tsc); #endif -static int tsc_unstable = 0; - /* * Make an educated guess if the TSC is trustworthy and synchronized * over all CPUs. diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 38f5d6368006..458893b376f8 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -600,6 +600,16 @@ void mark_rodata_ro(void) { unsigned long start = (unsigned long)_stext, end; +#ifdef CONFIG_HOTPLUG_CPU + /* It must still be possible to apply SMP alternatives. */ + if (num_possible_cpus() > 1) + start = (unsigned long)_etext; +#endif + +#ifdef CONFIG_KPROBES + start = (unsigned long)__start_rodata; +#endif + end = (unsigned long)__end_rodata; start = (start + PAGE_SIZE - 1) & PAGE_MASK; end &= PAGE_MASK; diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c index 7e161c698af4..10b9809ce821 100644 --- a/arch/x86_64/mm/pageattr.c +++ b/arch/x86_64/mm/pageattr.c @@ -75,7 +75,8 @@ static void flush_kernel_map(void *arg) /* When clflush is available always use it because it is much cheaper than WBINVD. */ - if (!cpu_has_clflush) + /* clflush is still broken. Disable for now. */ + if (1 || !cpu_has_clflush) asm volatile("wbinvd" ::: "memory"); else list_for_each_entry(pg, l, lru) { void *adr = page_address(pg); diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index 65d82736987e..4095e4d66a1d 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c @@ -66,13 +66,13 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus, switch (len) { case 1: - *value = readb(addr + reg); + *value = mmio_config_readb(addr + reg); break; case 2: - *value = readw(addr + reg); + *value = mmio_config_readw(addr + reg); break; case 4: - *value = readl(addr + reg); + *value = mmio_config_readl(addr + reg); break; } @@ -94,13 +94,13 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, switch (len) { case 1: - writeb(value, addr + reg); + mmio_config_writeb(addr + reg, value); break; case 2: - writew(value, addr + reg); + mmio_config_writew(addr + reg, value); break; case 4: - writel(value, addr + reg); + mmio_config_writel(addr + reg, value); break; } diff --git a/arch/x86_64/vdso/.gitignore b/arch/x86_64/vdso/.gitignore new file mode 100644 index 000000000000..f8b69d84238e --- /dev/null +++ b/arch/x86_64/vdso/.gitignore @@ -0,0 +1 @@ +vdso.lds diff --git a/arch/x86_64/vdso/vma.c b/arch/x86_64/vdso/vma.c index d4cb83a6c066..ff9333e5fb08 100644 --- a/arch/x86_64/vdso/vma.c +++ b/arch/x86_64/vdso/vma.c @@ -4,6 +4,7 @@ * Subject to the GPL, v.2 */ #include <linux/mm.h> +#include <linux/err.h> #include <linux/sched.h> #include <linux/init.h> #include <linux/random.h> |