aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-23 07:26:27 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-23 07:26:27 -0400
commit101d5b713700b902b1c200cdd1925c3cb7d34567 (patch)
treea0d4b4140129ad2f24fd17b965dfcfbbb1ac01db /include
parentcec5eb7be3a104fffd27ca967ee8e15a123050e2 (diff)
parente6babb6b7fed93c93f8fc5ef8ebd3a474fc2df3e (diff)
Merge branch 'x86/signal' into core/signal
Conflicts: arch/x86/kernel/cpu/feature_names.c arch/x86/kernel/setup.c drivers/pci/intel-iommu.c include/asm-x86/cpufeature.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/a.out-core.h6
-rw-r--r--include/asm-x86/a.out.h6
-rw-r--r--include/asm-x86/acpi.h6
-rw-r--r--include/asm-x86/agp.h6
-rw-r--r--include/asm-x86/alternative.h6
-rw-r--r--include/asm-x86/amd_iommu.h6
-rw-r--r--include/asm-x86/amd_iommu_types.h6
-rw-r--r--include/asm-x86/apic.h80
-rw-r--r--include/asm-x86/apicdef.h9
-rw-r--r--include/asm-x86/arch_hooks.h6
-rw-r--r--include/asm-x86/asm.h13
-rw-r--r--include/asm-x86/atomic_32.h6
-rw-r--r--include/asm-x86/atomic_64.h6
-rw-r--r--include/asm-x86/auxvec.h6
-rw-r--r--include/asm-x86/bigsmp/apic.h (renamed from include/asm-x86/mach-bigsmp/mach_apic.h)4
-rw-r--r--include/asm-x86/bigsmp/apicdef.h (renamed from include/asm-x86/mach-es7000/mach_apicdef.h)6
-rw-r--r--include/asm-x86/bigsmp/ipi.h (renamed from include/asm-x86/mach-bigsmp/mach_ipi.h)0
-rw-r--r--include/asm-x86/bios_ebda.h6
-rw-r--r--include/asm-x86/bitops.h6
-rw-r--r--include/asm-x86/boot.h6
-rw-r--r--include/asm-x86/bootparam.h6
-rw-r--r--include/asm-x86/bug.h6
-rw-r--r--include/asm-x86/bugs.h11
-rw-r--r--include/asm-x86/byteorder.h6
-rw-r--r--include/asm-x86/cache.h6
-rw-r--r--include/asm-x86/cacheflush.h6
-rw-r--r--include/asm-x86/calgary.h6
-rw-r--r--include/asm-x86/checksum_32.h6
-rw-r--r--include/asm-x86/checksum_64.h6
-rw-r--r--include/asm-x86/cmpxchg_32.h6
-rw-r--r--include/asm-x86/cmpxchg_64.h6
-rw-r--r--include/asm-x86/compat.h6
-rw-r--r--include/asm-x86/cpu.h6
-rw-r--r--include/asm-x86/cpufeature.h114
-rw-r--r--include/asm-x86/current.h6
-rw-r--r--include/asm-x86/debugreg.h6
-rw-r--r--include/asm-x86/delay.h6
-rw-r--r--include/asm-x86/desc.h6
-rw-r--r--include/asm-x86/desc_defs.h6
-rw-r--r--include/asm-x86/device.h6
-rw-r--r--include/asm-x86/div64.h6
-rw-r--r--include/asm-x86/dma-mapping.h6
-rw-r--r--include/asm-x86/dma.h6
-rw-r--r--include/asm-x86/dmi.h6
-rw-r--r--include/asm-x86/ds.h6
-rw-r--r--include/asm-x86/dwarf2.h6
-rw-r--r--include/asm-x86/e820.h7
-rw-r--r--include/asm-x86/edac.h6
-rw-r--r--include/asm-x86/efi.h6
-rw-r--r--include/asm-x86/elf.h11
-rw-r--r--include/asm-x86/emergency-restart.h6
-rw-r--r--include/asm-x86/es7000/apic.h (renamed from include/asm-x86/mach-es7000/mach_apic.h)32
-rw-r--r--include/asm-x86/es7000/apicdef.h13
-rw-r--r--include/asm-x86/es7000/ipi.h (renamed from include/asm-x86/mach-es7000/mach_ipi.h)6
-rw-r--r--include/asm-x86/es7000/mpparse.h (renamed from include/asm-x86/mach-es7000/mach_mpparse.h)4
-rw-r--r--include/asm-x86/es7000/wakecpu.h (renamed from include/asm-x86/mach-es7000/mach_wakecpu.h)6
-rw-r--r--include/asm-x86/fb.h6
-rw-r--r--include/asm-x86/fixmap.h6
-rw-r--r--include/asm-x86/fixmap_32.h6
-rw-r--r--include/asm-x86/fixmap_64.h6
-rw-r--r--include/asm-x86/floppy.h6
-rw-r--r--include/asm-x86/ftrace.h6
-rw-r--r--include/asm-x86/futex.h6
-rw-r--r--include/asm-x86/gart.h6
-rw-r--r--include/asm-x86/genapic_32.h6
-rw-r--r--include/asm-x86/genapic_64.h14
-rw-r--r--include/asm-x86/geode.h6
-rw-r--r--include/asm-x86/gpio.h2
-rw-r--r--include/asm-x86/hardirq_32.h6
-rw-r--r--include/asm-x86/hardirq_64.h6
-rw-r--r--include/asm-x86/highmem.h6
-rw-r--r--include/asm-x86/hpet.h6
-rw-r--r--include/asm-x86/hugetlb.h6
-rw-r--r--include/asm-x86/hw_irq.h28
-rw-r--r--include/asm-x86/hypertransport.h6
-rw-r--r--include/asm-x86/i387.h91
-rw-r--r--include/asm-x86/i8253.h6
-rw-r--r--include/asm-x86/i8259.h9
-rw-r--r--include/asm-x86/ia32.h6
-rw-r--r--include/asm-x86/ia32_unistd.h6
-rw-r--r--include/asm-x86/idle.h6
-rw-r--r--include/asm-x86/intel_arch_perfmon.h6
-rw-r--r--include/asm-x86/io.h8
-rw-r--r--include/asm-x86/io_32.h6
-rw-r--r--include/asm-x86/io_64.h7
-rw-r--r--include/asm-x86/io_apic.h26
-rw-r--r--include/asm-x86/ioctls.h6
-rw-r--r--include/asm-x86/iommu.h6
-rw-r--r--include/asm-x86/ipcbuf.h6
-rw-r--r--include/asm-x86/ipi.h22
-rw-r--r--include/asm-x86/irq.h6
-rw-r--r--include/asm-x86/irq_regs_32.h6
-rw-r--r--include/asm-x86/irq_remapping.h8
-rw-r--r--include/asm-x86/irq_vectors.h6
-rw-r--r--include/asm-x86/ist.h6
-rw-r--r--include/asm-x86/k8.h6
-rw-r--r--include/asm-x86/kdebug.h6
-rw-r--r--include/asm-x86/kexec.h6
-rw-r--r--include/asm-x86/kgdb.h6
-rw-r--r--include/asm-x86/kmap_types.h6
-rw-r--r--include/asm-x86/kprobes.h6
-rw-r--r--include/asm-x86/kvm.h6
-rw-r--r--include/asm-x86/kvm_host.h8
-rw-r--r--include/asm-x86/kvm_para.h6
-rw-r--r--include/asm-x86/kvm_x86_emulate.h6
-rw-r--r--include/asm-x86/ldt.h6
-rw-r--r--include/asm-x86/lguest.h6
-rw-r--r--include/asm-x86/lguest_hcall.h6
-rw-r--r--include/asm-x86/linkage.h6
-rw-r--r--include/asm-x86/local.h6
-rw-r--r--include/asm-x86/mach-bigsmp/mach_apicdef.h13
-rw-r--r--include/asm-x86/mach-default/apm.h6
-rw-r--r--include/asm-x86/mach-default/mach_apic.h10
-rw-r--r--include/asm-x86/mach-default/mach_apicdef.h12
-rw-r--r--include/asm-x86/mach-default/mach_ipi.h6
-rw-r--r--include/asm-x86/mach-default/mach_mpparse.h6
-rw-r--r--include/asm-x86/mach-default/mach_mpspec.h6
-rw-r--r--include/asm-x86/mach-default/mach_timer.h6
-rw-r--r--include/asm-x86/mach-default/mach_traps.h6
-rw-r--r--include/asm-x86/mach-default/mach_wakecpu.h6
-rw-r--r--include/asm-x86/mach-generic/gpio.h6
-rw-r--r--include/asm-x86/mach-generic/irq_vectors_limits.h6
-rw-r--r--include/asm-x86/mach-generic/mach_apic.h6
-rw-r--r--include/asm-x86/mach-generic/mach_apicdef.h6
-rw-r--r--include/asm-x86/mach-generic/mach_ipi.h6
-rw-r--r--include/asm-x86/mach-generic/mach_mpparse.h6
-rw-r--r--include/asm-x86/mach-generic/mach_mpspec.h6
-rw-r--r--include/asm-x86/mach-rdc321x/gpio.h6
-rw-r--r--include/asm-x86/mach-summit/mach_apicdef.h13
-rw-r--r--include/asm-x86/math_emu.h6
-rw-r--r--include/asm-x86/mc146818rtc.h6
-rw-r--r--include/asm-x86/mca.h6
-rw-r--r--include/asm-x86/mca_dma.h6
-rw-r--r--include/asm-x86/mce.h6
-rw-r--r--include/asm-x86/mman.h6
-rw-r--r--include/asm-x86/mmconfig.h6
-rw-r--r--include/asm-x86/mmu.h6
-rw-r--r--include/asm-x86/mmu_context.h6
-rw-r--r--include/asm-x86/mmu_context_32.h6
-rw-r--r--include/asm-x86/mmu_context_64.h6
-rw-r--r--include/asm-x86/mmx.h6
-rw-r--r--include/asm-x86/mmzone_32.h6
-rw-r--r--include/asm-x86/mmzone_64.h6
-rw-r--r--include/asm-x86/module.h6
-rw-r--r--include/asm-x86/mpspec.h6
-rw-r--r--include/asm-x86/mpspec_def.h6
-rw-r--r--include/asm-x86/msgbuf.h6
-rw-r--r--include/asm-x86/msidef.h10
-rw-r--r--include/asm-x86/msr-index.h6
-rw-r--r--include/asm-x86/msr.h6
-rw-r--r--include/asm-x86/mtrr.h6
-rw-r--r--include/asm-x86/mutex_32.h6
-rw-r--r--include/asm-x86/mutex_64.h6
-rw-r--r--include/asm-x86/nmi.h6
-rw-r--r--include/asm-x86/nops.h6
-rw-r--r--include/asm-x86/numa_32.h6
-rw-r--r--include/asm-x86/numa_64.h6
-rw-r--r--include/asm-x86/numaq.h6
-rw-r--r--include/asm-x86/numaq/apic.h (renamed from include/asm-x86/mach-numaq/mach_apic.h)6
-rw-r--r--include/asm-x86/numaq/apicdef.h (renamed from include/asm-x86/mach-numaq/mach_apicdef.h)4
-rw-r--r--include/asm-x86/numaq/ipi.h (renamed from include/asm-x86/mach-numaq/mach_ipi.h)6
-rw-r--r--include/asm-x86/numaq/mpparse.h (renamed from include/asm-x86/mach-numaq/mach_mpparse.h)6
-rw-r--r--include/asm-x86/numaq/wakecpu.h (renamed from include/asm-x86/mach-numaq/mach_wakecpu.h)6
-rw-r--r--include/asm-x86/olpc.h6
-rw-r--r--include/asm-x86/page.h6
-rw-r--r--include/asm-x86/page_32.h7
-rw-r--r--include/asm-x86/page_64.h7
-rw-r--r--include/asm-x86/param.h6
-rw-r--r--include/asm-x86/paravirt.h25
-rw-r--r--include/asm-x86/parport.h6
-rw-r--r--include/asm-x86/pat.h6
-rw-r--r--include/asm-x86/pci-direct.h6
-rw-r--r--include/asm-x86/pci.h6
-rw-r--r--include/asm-x86/pci_32.h6
-rw-r--r--include/asm-x86/pci_64.h6
-rw-r--r--include/asm-x86/pda.h6
-rw-r--r--include/asm-x86/percpu.h6
-rw-r--r--include/asm-x86/pgalloc.h6
-rw-r--r--include/asm-x86/pgtable-2level-defs.h6
-rw-r--r--include/asm-x86/pgtable-2level.h6
-rw-r--r--include/asm-x86/pgtable-3level-defs.h6
-rw-r--r--include/asm-x86/pgtable-3level.h6
-rw-r--r--include/asm-x86/pgtable.h8
-rw-r--r--include/asm-x86/pgtable_32.h7
-rw-r--r--include/asm-x86/pgtable_64.h6
-rw-r--r--include/asm-x86/posix_types_32.h6
-rw-r--r--include/asm-x86/posix_types_64.h6
-rw-r--r--include/asm-x86/prctl.h6
-rw-r--r--include/asm-x86/processor-cyrix.h8
-rw-r--r--include/asm-x86/processor-flags.h7
-rw-r--r--include/asm-x86/processor.h30
-rw-r--r--include/asm-x86/proto.h6
-rw-r--r--include/asm-x86/ptrace-abi.h6
-rw-r--r--include/asm-x86/ptrace.h18
-rw-r--r--include/asm-x86/pvclock-abi.h6
-rw-r--r--include/asm-x86/pvclock.h6
-rw-r--r--include/asm-x86/reboot.h6
-rw-r--r--include/asm-x86/reboot_fixups.h6
-rw-r--r--include/asm-x86/required-features.h6
-rw-r--r--include/asm-x86/resume-trace.h8
-rw-r--r--include/asm-x86/rio.h6
-rw-r--r--include/asm-x86/rwlock.h6
-rw-r--r--include/asm-x86/rwsem.h6
-rw-r--r--include/asm-x86/scatterlist.h6
-rw-r--r--include/asm-x86/seccomp_32.h6
-rw-r--r--include/asm-x86/seccomp_64.h6
-rw-r--r--include/asm-x86/segment.h6
-rw-r--r--include/asm-x86/sembuf.h6
-rw-r--r--include/asm-x86/serial.h6
-rw-r--r--include/asm-x86/setup.h8
-rw-r--r--include/asm-x86/shmbuf.h6
-rw-r--r--include/asm-x86/shmparam.h6
-rw-r--r--include/asm-x86/sigcontext.h93
-rw-r--r--include/asm-x86/sigcontext32.h12
-rw-r--r--include/asm-x86/siginfo.h6
-rw-r--r--include/asm-x86/signal.h9
-rw-r--r--include/asm-x86/smp.h27
-rw-r--r--include/asm-x86/socket.h6
-rw-r--r--include/asm-x86/sockios.h6
-rw-r--r--include/asm-x86/sparsemem.h6
-rw-r--r--include/asm-x86/spinlock.h6
-rw-r--r--include/asm-x86/spinlock_types.h6
-rw-r--r--include/asm-x86/srat.h6
-rw-r--r--include/asm-x86/stacktrace.h6
-rw-r--r--include/asm-x86/stat.h6
-rw-r--r--include/asm-x86/statfs.h6
-rw-r--r--include/asm-x86/string_32.h6
-rw-r--r--include/asm-x86/string_64.h6
-rw-r--r--include/asm-x86/summit/apic.h (renamed from include/asm-x86/mach-summit/mach_apic.h)24
-rw-r--r--include/asm-x86/summit/apicdef.h13
-rw-r--r--include/asm-x86/summit/ipi.h (renamed from include/asm-x86/mach-summit/mach_ipi.h)6
-rw-r--r--include/asm-x86/summit/irq_vectors_limits.h (renamed from include/asm-x86/mach-summit/irq_vectors_limits.h)0
-rw-r--r--include/asm-x86/summit/mpparse.h (renamed from include/asm-x86/mach-summit/mach_mpparse.h)13
-rw-r--r--include/asm-x86/suspend_32.h6
-rw-r--r--include/asm-x86/suspend_64.h6
-rw-r--r--include/asm-x86/swiotlb.h6
-rw-r--r--include/asm-x86/sync_bitops.h6
-rw-r--r--include/asm-x86/syscall.h211
-rw-r--r--include/asm-x86/syscalls.h93
-rw-r--r--include/asm-x86/system.h6
-rw-r--r--include/asm-x86/system_64.h6
-rw-r--r--include/asm-x86/tce.h6
-rw-r--r--include/asm-x86/termbits.h6
-rw-r--r--include/asm-x86/termios.h6
-rw-r--r--include/asm-x86/therm_throt.h6
-rw-r--r--include/asm-x86/thread_info.h11
-rw-r--r--include/asm-x86/time.h8
-rw-r--r--include/asm-x86/timer.h11
-rw-r--r--include/asm-x86/timex.h6
-rw-r--r--include/asm-x86/tlb.h6
-rw-r--r--include/asm-x86/tlbflush.h6
-rw-r--r--include/asm-x86/topology.h6
-rw-r--r--include/asm-x86/trampoline.h6
-rw-r--r--include/asm-x86/traps.h10
-rw-r--r--include/asm-x86/tsc.h6
-rw-r--r--include/asm-x86/types.h6
-rw-r--r--include/asm-x86/uaccess.h6
-rw-r--r--include/asm-x86/uaccess_32.h6
-rw-r--r--include/asm-x86/uaccess_64.h6
-rw-r--r--include/asm-x86/ucontext.h12
-rw-r--r--include/asm-x86/unaligned.h6
-rw-r--r--include/asm-x86/unistd_32.h6
-rw-r--r--include/asm-x86/unistd_64.h6
-rw-r--r--include/asm-x86/unwind.h6
-rw-r--r--include/asm-x86/user32.h6
-rw-r--r--include/asm-x86/user_32.h6
-rw-r--r--include/asm-x86/user_64.h6
-rw-r--r--include/asm-x86/uv/bios.h6
-rw-r--r--include/asm-x86/uv/uv_bau.h6
-rw-r--r--include/asm-x86/uv/uv_hub.h6
-rw-r--r--include/asm-x86/uv/uv_mmrs.h6
-rw-r--r--include/asm-x86/vdso.h6
-rw-r--r--include/asm-x86/vga.h6
-rw-r--r--include/asm-x86/vgtod.h6
-rw-r--r--include/asm-x86/visws/cobalt.h6
-rw-r--r--include/asm-x86/visws/lithium.h6
-rw-r--r--include/asm-x86/visws/piix4.h6
-rw-r--r--include/asm-x86/vm86.h6
-rw-r--r--include/asm-x86/vmi_time.h6
-rw-r--r--include/asm-x86/vsyscall.h6
-rw-r--r--include/asm-x86/xcr.h49
-rw-r--r--include/asm-x86/xen/events.h6
-rw-r--r--include/asm-x86/xen/grant_table.h6
-rw-r--r--include/asm-x86/xen/hypercall.h6
-rw-r--r--include/asm-x86/xen/hypervisor.h6
-rw-r--r--include/asm-x86/xen/interface.h6
-rw-r--r--include/asm-x86/xen/interface_32.h6
-rw-r--r--include/asm-x86/xen/interface_64.h6
-rw-r--r--include/asm-x86/xen/page.h6
-rw-r--r--include/asm-x86/xsave.h118
-rw-r--r--include/linux/dmar.h127
-rw-r--r--include/linux/irq.h1
292 files changed, 1939 insertions, 1017 deletions
diff --git a/include/asm-x86/a.out-core.h b/include/asm-x86/a.out-core.h
index 714207a1c387..f5705761a37b 100644
--- a/include/asm-x86/a.out-core.h
+++ b/include/asm-x86/a.out-core.h
@@ -9,8 +9,8 @@
9 * 2 of the Licence, or (at your option) any later version. 9 * 2 of the Licence, or (at your option) any later version.
10 */ 10 */
11 11
12#ifndef _ASM_A_OUT_CORE_H 12#ifndef ASM_X86__A_OUT_CORE_H
13#define _ASM_A_OUT_CORE_H 13#define ASM_X86__A_OUT_CORE_H
14 14
15#ifdef __KERNEL__ 15#ifdef __KERNEL__
16#ifdef CONFIG_X86_32 16#ifdef CONFIG_X86_32
@@ -70,4 +70,4 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
70 70
71#endif /* CONFIG_X86_32 */ 71#endif /* CONFIG_X86_32 */
72#endif /* __KERNEL__ */ 72#endif /* __KERNEL__ */
73#endif /* _ASM_A_OUT_CORE_H */ 73#endif /* ASM_X86__A_OUT_CORE_H */
diff --git a/include/asm-x86/a.out.h b/include/asm-x86/a.out.h
index 4684f97a5bbd..0948748bc69c 100644
--- a/include/asm-x86/a.out.h
+++ b/include/asm-x86/a.out.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_A_OUT_H 1#ifndef ASM_X86__A_OUT_H
2#define _ASM_X86_A_OUT_H 2#define ASM_X86__A_OUT_H
3 3
4struct exec 4struct exec
5{ 5{
@@ -17,4 +17,4 @@ struct exec
17#define N_DRSIZE(a) ((a).a_drsize) 17#define N_DRSIZE(a) ((a).a_drsize)
18#define N_SYMSIZE(a) ((a).a_syms) 18#define N_SYMSIZE(a) ((a).a_syms)
19 19
20#endif /* _ASM_X86_A_OUT_H */ 20#endif /* ASM_X86__A_OUT_H */
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h
index 635d764dc13e..bd76299586b3 100644
--- a/include/asm-x86/acpi.h
+++ b/include/asm-x86/acpi.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_ACPI_H 1#ifndef ASM_X86__ACPI_H
2#define _ASM_X86_ACPI_H 2#define ASM_X86__ACPI_H
3 3
4/* 4/*
5 * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 5 * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
@@ -173,4 +173,4 @@ static inline void acpi_fake_nodes(const struct bootnode *fake_nodes,
173 173
174#define acpi_unlazy_tlb(x) leave_mm(x) 174#define acpi_unlazy_tlb(x) leave_mm(x)
175 175
176#endif /*__X86_ASM_ACPI_H*/ 176#endif /* ASM_X86__ACPI_H */
diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h
index e4004a9f6a9a..3617fd4fcdf9 100644
--- a/include/asm-x86/agp.h
+++ b/include/asm-x86/agp.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_AGP_H 1#ifndef ASM_X86__AGP_H
2#define _ASM_X86_AGP_H 2#define ASM_X86__AGP_H
3 3
4#include <asm/pgtable.h> 4#include <asm/pgtable.h>
5#include <asm/cacheflush.h> 5#include <asm/cacheflush.h>
@@ -32,4 +32,4 @@
32#define free_gatt_pages(table, order) \ 32#define free_gatt_pages(table, order) \
33 free_pages((unsigned long)(table), (order)) 33 free_pages((unsigned long)(table), (order))
34 34
35#endif 35#endif /* ASM_X86__AGP_H */
diff --git a/include/asm-x86/alternative.h b/include/asm-x86/alternative.h
index f6aa18eadf71..22d3c9862bf3 100644
--- a/include/asm-x86/alternative.h
+++ b/include/asm-x86/alternative.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_ALTERNATIVE_H 1#ifndef ASM_X86__ALTERNATIVE_H
2#define _ASM_X86_ALTERNATIVE_H 2#define ASM_X86__ALTERNATIVE_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/stddef.h> 5#include <linux/stddef.h>
@@ -180,4 +180,4 @@ extern void add_nops(void *insns, unsigned int len);
180extern void *text_poke(void *addr, const void *opcode, size_t len); 180extern void *text_poke(void *addr, const void *opcode, size_t len);
181extern void *text_poke_early(void *addr, const void *opcode, size_t len); 181extern void *text_poke_early(void *addr, const void *opcode, size_t len);
182 182
183#endif /* _ASM_X86_ALTERNATIVE_H */ 183#endif /* ASM_X86__ALTERNATIVE_H */
diff --git a/include/asm-x86/amd_iommu.h b/include/asm-x86/amd_iommu.h
index 30a12049353b..783f43e58052 100644
--- a/include/asm-x86/amd_iommu.h
+++ b/include/asm-x86/amd_iommu.h
@@ -17,8 +17,8 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#ifndef _ASM_X86_AMD_IOMMU_H 20#ifndef ASM_X86__AMD_IOMMU_H
21#define _ASM_X86_AMD_IOMMU_H 21#define ASM_X86__AMD_IOMMU_H
22 22
23#ifdef CONFIG_AMD_IOMMU 23#ifdef CONFIG_AMD_IOMMU
24extern int amd_iommu_init(void); 24extern int amd_iommu_init(void);
@@ -29,4 +29,4 @@ static inline int amd_iommu_init(void) { return -ENODEV; }
29static inline void amd_iommu_detect(void) { } 29static inline void amd_iommu_detect(void) { }
30#endif 30#endif
31 31
32#endif 32#endif /* ASM_X86__AMD_IOMMU_H */
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h
index dcc812067394..1ffa4e53c989 100644
--- a/include/asm-x86/amd_iommu_types.h
+++ b/include/asm-x86/amd_iommu_types.h
@@ -17,8 +17,8 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#ifndef __AMD_IOMMU_TYPES_H__ 20#ifndef ASM_X86__AMD_IOMMU_TYPES_H
21#define __AMD_IOMMU_TYPES_H__ 21#define ASM_X86__AMD_IOMMU_TYPES_H
22 22
23#include <linux/types.h> 23#include <linux/types.h>
24#include <linux/list.h> 24#include <linux/list.h>
@@ -341,4 +341,4 @@ static inline u16 calc_devid(u8 bus, u8 devfn)
341 return (((u16)bus) << 8) | devfn; 341 return (((u16)bus) << 8) | devfn;
342} 342}
343 343
344#endif 344#endif /* ASM_X86__AMD_IOMMU_TYPES_H */
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h
index 133c998161ca..d76a0839abe9 100644
--- a/include/asm-x86/apic.h
+++ b/include/asm-x86/apic.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_APIC_H 1#ifndef ASM_X86__APIC_H
2#define _ASM_X86_APIC_H 2#define ASM_X86__APIC_H
3 3
4#include <linux/pm.h> 4#include <linux/pm.h>
5#include <linux/delay.h> 5#include <linux/delay.h>
@@ -9,6 +9,8 @@
9#include <asm/apicdef.h> 9#include <asm/apicdef.h>
10#include <asm/processor.h> 10#include <asm/processor.h>
11#include <asm/system.h> 11#include <asm/system.h>
12#include <asm/cpufeature.h>
13#include <asm/msr.h>
12 14
13#define ARCH_APICTIMER_STOPS_ON_C3 1 15#define ARCH_APICTIMER_STOPS_ON_C3 1
14 16
@@ -47,15 +49,18 @@ extern int disable_apic;
47#ifdef CONFIG_PARAVIRT 49#ifdef CONFIG_PARAVIRT
48#include <asm/paravirt.h> 50#include <asm/paravirt.h>
49#else 51#else
50#define apic_write native_apic_write
51#define apic_read native_apic_read
52#define setup_boot_clock setup_boot_APIC_clock 52#define setup_boot_clock setup_boot_APIC_clock
53#define setup_secondary_clock setup_secondary_APIC_clock 53#define setup_secondary_clock setup_secondary_APIC_clock
54#endif 54#endif
55 55
56extern int is_vsmp_box(void); 56extern int is_vsmp_box(void);
57extern void xapic_wait_icr_idle(void);
58extern u32 safe_xapic_wait_icr_idle(void);
59extern u64 xapic_icr_read(void);
60extern void xapic_icr_write(u32, u32);
61extern int setup_profiling_timer(unsigned int);
57 62
58static inline void native_apic_write(unsigned long reg, u32 v) 63static inline void native_apic_mem_write(u32 reg, u32 v)
59{ 64{
60 volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg); 65 volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
61 66
@@ -64,21 +69,72 @@ static inline void native_apic_write(unsigned long reg, u32 v)
64 ASM_OUTPUT2("0" (v), "m" (*addr))); 69 ASM_OUTPUT2("0" (v), "m" (*addr)));
65} 70}
66 71
67static inline u32 native_apic_read(unsigned long reg) 72static inline u32 native_apic_mem_read(u32 reg)
68{ 73{
69 return *((volatile u32 *)(APIC_BASE + reg)); 74 return *((volatile u32 *)(APIC_BASE + reg));
70} 75}
71 76
72extern void apic_wait_icr_idle(void); 77static inline void native_apic_msr_write(u32 reg, u32 v)
73extern u32 safe_apic_wait_icr_idle(void); 78{
79 if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
80 reg == APIC_LVR)
81 return;
82
83 wrmsr(APIC_BASE_MSR + (reg >> 4), v, 0);
84}
85
86static inline u32 native_apic_msr_read(u32 reg)
87{
88 u32 low, high;
89
90 if (reg == APIC_DFR)
91 return -1;
92
93 rdmsr(APIC_BASE_MSR + (reg >> 4), low, high);
94 return low;
95}
96
97#ifndef CONFIG_X86_32
98extern int x2apic, x2apic_preenabled;
99extern void check_x2apic(void);
100extern void enable_x2apic(void);
101extern void enable_IR_x2apic(void);
102extern void x2apic_icr_write(u32 low, u32 id);
103#endif
104
105struct apic_ops {
106 u32 (*read)(u32 reg);
107 void (*write)(u32 reg, u32 v);
108 u64 (*icr_read)(void);
109 void (*icr_write)(u32 low, u32 high);
110 void (*wait_icr_idle)(void);
111 u32 (*safe_wait_icr_idle)(void);
112};
113
114extern struct apic_ops *apic_ops;
115
116#define apic_read (apic_ops->read)
117#define apic_write (apic_ops->write)
118#define apic_icr_read (apic_ops->icr_read)
119#define apic_icr_write (apic_ops->icr_write)
120#define apic_wait_icr_idle (apic_ops->wait_icr_idle)
121#define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle)
122
74extern int get_physical_broadcast(void); 123extern int get_physical_broadcast(void);
75 124
125#ifdef CONFIG_X86_64
126static inline void ack_x2APIC_irq(void)
127{
128 /* Docs say use 0 for future compatibility */
129 native_apic_msr_write(APIC_EOI, 0);
130}
131#endif
132
133
76static inline void ack_APIC_irq(void) 134static inline void ack_APIC_irq(void)
77{ 135{
78 /* 136 /*
79 * ack_APIC_irq() actually gets compiled as a single instruction: 137 * ack_APIC_irq() actually gets compiled as a single instruction
80 * - a single rmw on Pentium/82489DX
81 * - a single write on P6+ cores (CONFIG_X86_GOOD_APIC)
82 * ... yummie. 138 * ... yummie.
83 */ 139 */
84 140
@@ -128,4 +184,4 @@ static inline void init_apic_mappings(void) { }
128 184
129#endif /* !CONFIG_X86_LOCAL_APIC */ 185#endif /* !CONFIG_X86_LOCAL_APIC */
130 186
131#endif /* __ASM_APIC_H */ 187#endif /* ASM_X86__APIC_H */
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h
index 6b9008c78731..b922c85ac91d 100644
--- a/include/asm-x86/apicdef.h
+++ b/include/asm-x86/apicdef.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_APICDEF_H 1#ifndef ASM_X86__APICDEF_H
2#define _ASM_X86_APICDEF_H 2#define ASM_X86__APICDEF_H
3 3
4/* 4/*
5 * Constants for various Intel APICs. (local APIC, IOAPIC, etc.) 5 * Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
@@ -105,6 +105,7 @@
105#define APIC_TMICT 0x380 105#define APIC_TMICT 0x380
106#define APIC_TMCCT 0x390 106#define APIC_TMCCT 0x390
107#define APIC_TDCR 0x3E0 107#define APIC_TDCR 0x3E0
108#define APIC_SELF_IPI 0x3F0
108#define APIC_TDR_DIV_TMBASE (1 << 2) 109#define APIC_TDR_DIV_TMBASE (1 << 2)
109#define APIC_TDR_DIV_1 0xB 110#define APIC_TDR_DIV_1 0xB
110#define APIC_TDR_DIV_2 0x0 111#define APIC_TDR_DIV_2 0x0
@@ -128,6 +129,8 @@
128#define APIC_EILVT3 0x530 129#define APIC_EILVT3 0x530
129 130
130#define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) 131#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
132#define APIC_BASE_MSR 0x800
133#define X2APIC_ENABLE (1UL << 10)
131 134
132#ifdef CONFIG_X86_32 135#ifdef CONFIG_X86_32
133# define MAX_IO_APICS 64 136# define MAX_IO_APICS 64
@@ -411,4 +414,4 @@ struct local_apic {
411#else 414#else
412 #define BAD_APICID 0xFFFFu 415 #define BAD_APICID 0xFFFFu
413#endif 416#endif
414#endif 417#endif /* ASM_X86__APICDEF_H */
diff --git a/include/asm-x86/arch_hooks.h b/include/asm-x86/arch_hooks.h
index 8411750ceb63..72adc3a109cc 100644
--- a/include/asm-x86/arch_hooks.h
+++ b/include/asm-x86/arch_hooks.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_ARCH_HOOKS_H 1#ifndef ASM_X86__ARCH_HOOKS_H
2#define _ASM_ARCH_HOOKS_H 2#define ASM_X86__ARCH_HOOKS_H
3 3
4#include <linux/interrupt.h> 4#include <linux/interrupt.h>
5 5
@@ -25,4 +25,4 @@ extern void pre_time_init_hook(void);
25extern void time_init_hook(void); 25extern void time_init_hook(void);
26extern void mca_nmi_hook(void); 26extern void mca_nmi_hook(void);
27 27
28#endif 28#endif /* ASM_X86__ARCH_HOOKS_H */
diff --git a/include/asm-x86/asm.h b/include/asm-x86/asm.h
index 97220321f39d..e1355f44d7c3 100644
--- a/include/asm-x86/asm.h
+++ b/include/asm-x86/asm.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_ASM_H 1#ifndef ASM_X86__ASM_H
2#define _ASM_X86_ASM_H 2#define ASM_X86__ASM_H
3 3
4#ifdef __ASSEMBLY__ 4#ifdef __ASSEMBLY__
5# define __ASM_FORM(x) x 5# define __ASM_FORM(x) x
@@ -20,17 +20,22 @@
20 20
21#define _ASM_PTR __ASM_SEL(.long, .quad) 21#define _ASM_PTR __ASM_SEL(.long, .quad)
22#define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8) 22#define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8)
23#define _ASM_MOV_UL __ASM_SIZE(mov)
24 23
24#define _ASM_MOV __ASM_SIZE(mov)
25#define _ASM_INC __ASM_SIZE(inc) 25#define _ASM_INC __ASM_SIZE(inc)
26#define _ASM_DEC __ASM_SIZE(dec) 26#define _ASM_DEC __ASM_SIZE(dec)
27#define _ASM_ADD __ASM_SIZE(add) 27#define _ASM_ADD __ASM_SIZE(add)
28#define _ASM_SUB __ASM_SIZE(sub) 28#define _ASM_SUB __ASM_SIZE(sub)
29#define _ASM_XADD __ASM_SIZE(xadd) 29#define _ASM_XADD __ASM_SIZE(xadd)
30
30#define _ASM_AX __ASM_REG(ax) 31#define _ASM_AX __ASM_REG(ax)
31#define _ASM_BX __ASM_REG(bx) 32#define _ASM_BX __ASM_REG(bx)
32#define _ASM_CX __ASM_REG(cx) 33#define _ASM_CX __ASM_REG(cx)
33#define _ASM_DX __ASM_REG(dx) 34#define _ASM_DX __ASM_REG(dx)
35#define _ASM_SP __ASM_REG(sp)
36#define _ASM_BP __ASM_REG(bp)
37#define _ASM_SI __ASM_REG(si)
38#define _ASM_DI __ASM_REG(di)
34 39
35/* Exception table entry */ 40/* Exception table entry */
36# define _ASM_EXTABLE(from,to) \ 41# define _ASM_EXTABLE(from,to) \
@@ -39,4 +44,4 @@
39 _ASM_PTR #from "," #to "\n" \ 44 _ASM_PTR #from "," #to "\n" \
40 " .previous\n" 45 " .previous\n"
41 46
42#endif /* _ASM_X86_ASM_H */ 47#endif /* ASM_X86__ASM_H */
diff --git a/include/asm-x86/atomic_32.h b/include/asm-x86/atomic_32.h
index 21a4825148c0..14d3f0beb889 100644
--- a/include/asm-x86/atomic_32.h
+++ b/include/asm-x86/atomic_32.h
@@ -1,5 +1,5 @@
1#ifndef __ARCH_I386_ATOMIC__ 1#ifndef ASM_X86__ATOMIC_32_H
2#define __ARCH_I386_ATOMIC__ 2#define ASM_X86__ATOMIC_32_H
3 3
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5#include <asm/processor.h> 5#include <asm/processor.h>
@@ -256,4 +256,4 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
256#define smp_mb__after_atomic_inc() barrier() 256#define smp_mb__after_atomic_inc() barrier()
257 257
258#include <asm-generic/atomic.h> 258#include <asm-generic/atomic.h>
259#endif 259#endif /* ASM_X86__ATOMIC_32_H */
diff --git a/include/asm-x86/atomic_64.h b/include/asm-x86/atomic_64.h
index 91c7d03e65bc..2cb218c4a356 100644
--- a/include/asm-x86/atomic_64.h
+++ b/include/asm-x86/atomic_64.h
@@ -1,5 +1,5 @@
1#ifndef __ARCH_X86_64_ATOMIC__ 1#ifndef ASM_X86__ATOMIC_64_H
2#define __ARCH_X86_64_ATOMIC__ 2#define ASM_X86__ATOMIC_64_H
3 3
4#include <asm/alternative.h> 4#include <asm/alternative.h>
5#include <asm/cmpxchg.h> 5#include <asm/cmpxchg.h>
@@ -470,4 +470,4 @@ static inline void atomic_or_long(unsigned long *v1, unsigned long v2)
470#define smp_mb__after_atomic_inc() barrier() 470#define smp_mb__after_atomic_inc() barrier()
471 471
472#include <asm-generic/atomic.h> 472#include <asm-generic/atomic.h>
473#endif 473#endif /* ASM_X86__ATOMIC_64_H */
diff --git a/include/asm-x86/auxvec.h b/include/asm-x86/auxvec.h
index 87f5e6d5a020..12c7cac74202 100644
--- a/include/asm-x86/auxvec.h
+++ b/include/asm-x86/auxvec.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_AUXVEC_H 1#ifndef ASM_X86__AUXVEC_H
2#define _ASM_X86_AUXVEC_H 2#define ASM_X86__AUXVEC_H
3/* 3/*
4 * Architecture-neutral AT_ values in 0-17, leave some room 4 * Architecture-neutral AT_ values in 0-17, leave some room
5 * for more of them, start the x86-specific ones at 32. 5 * for more of them, start the x86-specific ones at 32.
@@ -9,4 +9,4 @@
9#endif 9#endif
10#define AT_SYSINFO_EHDR 33 10#define AT_SYSINFO_EHDR 33
11 11
12#endif 12#endif /* ASM_X86__AUXVEC_H */
diff --git a/include/asm-x86/mach-bigsmp/mach_apic.h b/include/asm-x86/bigsmp/apic.h
index c3b9dc6970c9..0a9cd7c5ca0c 100644
--- a/include/asm-x86/mach-bigsmp/mach_apic.h
+++ b/include/asm-x86/bigsmp/apic.h
@@ -11,7 +11,7 @@ static inline int apic_id_registered(void)
11 11
12/* Round robin the irqs amoung the online cpus */ 12/* Round robin the irqs amoung the online cpus */
13static inline cpumask_t target_cpus(void) 13static inline cpumask_t target_cpus(void)
14{ 14{
15 static unsigned long cpu = NR_CPUS; 15 static unsigned long cpu = NR_CPUS;
16 do { 16 do {
17 if (cpu >= NR_CPUS) 17 if (cpu >= NR_CPUS)
@@ -23,7 +23,7 @@ static inline cpumask_t target_cpus(void)
23} 23}
24 24
25#undef APIC_DEST_LOGICAL 25#undef APIC_DEST_LOGICAL
26#define APIC_DEST_LOGICAL 0 26#define APIC_DEST_LOGICAL 0
27#define TARGET_CPUS (target_cpus()) 27#define TARGET_CPUS (target_cpus())
28#define APIC_DFR_VALUE (APIC_DFR_FLAT) 28#define APIC_DFR_VALUE (APIC_DFR_FLAT)
29#define INT_DELIVERY_MODE (dest_Fixed) 29#define INT_DELIVERY_MODE (dest_Fixed)
diff --git a/include/asm-x86/mach-es7000/mach_apicdef.h b/include/asm-x86/bigsmp/apicdef.h
index a58ab5a75c8c..392c3f5ef2fe 100644
--- a/include/asm-x86/mach-es7000/mach_apicdef.h
+++ b/include/asm-x86/bigsmp/apicdef.h
@@ -3,10 +3,10 @@
3 3
4#define APIC_ID_MASK (0xFF<<24) 4#define APIC_ID_MASK (0xFF<<24)
5 5
6static inline unsigned get_apic_id(unsigned long x) 6static inline unsigned get_apic_id(unsigned long x)
7{ 7{
8 return (((x)>>24)&0xFF); 8 return (((x)>>24)&0xFF);
9} 9}
10 10
11#define GET_APIC_ID(x) get_apic_id(x) 11#define GET_APIC_ID(x) get_apic_id(x)
12 12
diff --git a/include/asm-x86/mach-bigsmp/mach_ipi.h b/include/asm-x86/bigsmp/ipi.h
index 9404c535b7ec..9404c535b7ec 100644
--- a/include/asm-x86/mach-bigsmp/mach_ipi.h
+++ b/include/asm-x86/bigsmp/ipi.h
diff --git a/include/asm-x86/bios_ebda.h b/include/asm-x86/bios_ebda.h
index 0033e50c13b2..ec42ed874591 100644
--- a/include/asm-x86/bios_ebda.h
+++ b/include/asm-x86/bios_ebda.h
@@ -1,5 +1,5 @@
1#ifndef _MACH_BIOS_EBDA_H 1#ifndef ASM_X86__BIOS_EBDA_H
2#define _MACH_BIOS_EBDA_H 2#define ASM_X86__BIOS_EBDA_H
3 3
4#include <asm/io.h> 4#include <asm/io.h>
5 5
@@ -16,4 +16,4 @@ static inline unsigned int get_bios_ebda(void)
16 16
17void reserve_ebda_region(void); 17void reserve_ebda_region(void);
18 18
19#endif /* _MACH_BIOS_EBDA_H */ 19#endif /* ASM_X86__BIOS_EBDA_H */
diff --git a/include/asm-x86/bitops.h b/include/asm-x86/bitops.h
index cfb2b64f76e7..61989b93b475 100644
--- a/include/asm-x86/bitops.h
+++ b/include/asm-x86/bitops.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_BITOPS_H 1#ifndef ASM_X86__BITOPS_H
2#define _ASM_X86_BITOPS_H 2#define ASM_X86__BITOPS_H
3 3
4/* 4/*
5 * Copyright 1992, Linus Torvalds. 5 * Copyright 1992, Linus Torvalds.
@@ -458,4 +458,4 @@ static inline void set_bit_string(unsigned long *bitmap,
458#include <asm-generic/bitops/minix.h> 458#include <asm-generic/bitops/minix.h>
459 459
460#endif /* __KERNEL__ */ 460#endif /* __KERNEL__ */
461#endif /* _ASM_X86_BITOPS_H */ 461#endif /* ASM_X86__BITOPS_H */
diff --git a/include/asm-x86/boot.h b/include/asm-x86/boot.h
index 2faed7ecb092..825de5dc867c 100644
--- a/include/asm-x86/boot.h
+++ b/include/asm-x86/boot.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_BOOT_H 1#ifndef ASM_X86__BOOT_H
2#define _ASM_BOOT_H 2#define ASM_X86__BOOT_H
3 3
4/* Don't touch these, unless you really know what you're doing. */ 4/* Don't touch these, unless you really know what you're doing. */
5#define DEF_INITSEG 0x9000 5#define DEF_INITSEG 0x9000
@@ -25,4 +25,4 @@
25#define BOOT_STACK_SIZE 0x1000 25#define BOOT_STACK_SIZE 0x1000
26#endif 26#endif
27 27
28#endif /* _ASM_BOOT_H */ 28#endif /* ASM_X86__BOOT_H */
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h
index ae22bdf0ab14..ccf027e2d97d 100644
--- a/include/asm-x86/bootparam.h
+++ b/include/asm-x86/bootparam.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_BOOTPARAM_H 1#ifndef ASM_X86__BOOTPARAM_H
2#define _ASM_BOOTPARAM_H 2#define ASM_X86__BOOTPARAM_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/screen_info.h> 5#include <linux/screen_info.h>
@@ -108,4 +108,4 @@ struct boot_params {
108 __u8 _pad9[276]; /* 0xeec */ 108 __u8 _pad9[276]; /* 0xeec */
109} __attribute__((packed)); 109} __attribute__((packed));
110 110
111#endif /* _ASM_BOOTPARAM_H */ 111#endif /* ASM_X86__BOOTPARAM_H */
diff --git a/include/asm-x86/bug.h b/include/asm-x86/bug.h
index b69aa64b82a4..91ad43a54c47 100644
--- a/include/asm-x86/bug.h
+++ b/include/asm-x86/bug.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_BUG_H 1#ifndef ASM_X86__BUG_H
2#define _ASM_X86_BUG_H 2#define ASM_X86__BUG_H
3 3
4#ifdef CONFIG_BUG 4#ifdef CONFIG_BUG
5#define HAVE_ARCH_BUG 5#define HAVE_ARCH_BUG
@@ -36,4 +36,4 @@ do { \
36#endif /* !CONFIG_BUG */ 36#endif /* !CONFIG_BUG */
37 37
38#include <asm-generic/bug.h> 38#include <asm-generic/bug.h>
39#endif 39#endif /* ASM_X86__BUG_H */
diff --git a/include/asm-x86/bugs.h b/include/asm-x86/bugs.h
index 021cbdd5f258..ae514c76a96f 100644
--- a/include/asm-x86/bugs.h
+++ b/include/asm-x86/bugs.h
@@ -1,7 +1,12 @@
1#ifndef _ASM_X86_BUGS_H 1#ifndef ASM_X86__BUGS_H
2#define _ASM_X86_BUGS_H 2#define ASM_X86__BUGS_H
3 3
4extern void check_bugs(void); 4extern void check_bugs(void);
5
6#ifdef CONFIG_CPU_SUP_INTEL_32
5int ppro_with_ram_bug(void); 7int ppro_with_ram_bug(void);
8#else
9static inline int ppro_with_ram_bug(void) { return 0; }
10#endif
6 11
7#endif /* _ASM_X86_BUGS_H */ 12#endif /* ASM_X86__BUGS_H */
diff --git a/include/asm-x86/byteorder.h b/include/asm-x86/byteorder.h
index e02ae2d89acf..722f27d68105 100644
--- a/include/asm-x86/byteorder.h
+++ b/include/asm-x86/byteorder.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_BYTEORDER_H 1#ifndef ASM_X86__BYTEORDER_H
2#define _ASM_X86_BYTEORDER_H 2#define ASM_X86__BYTEORDER_H
3 3
4#include <asm/types.h> 4#include <asm/types.h>
5#include <linux/compiler.h> 5#include <linux/compiler.h>
@@ -78,4 +78,4 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
78 78
79#include <linux/byteorder/little_endian.h> 79#include <linux/byteorder/little_endian.h>
80 80
81#endif /* _ASM_X86_BYTEORDER_H */ 81#endif /* ASM_X86__BYTEORDER_H */
diff --git a/include/asm-x86/cache.h b/include/asm-x86/cache.h
index 1e0bac86f38f..ea3f1cc06a97 100644
--- a/include/asm-x86/cache.h
+++ b/include/asm-x86/cache.h
@@ -1,5 +1,5 @@
1#ifndef _ARCH_X86_CACHE_H 1#ifndef ASM_X86__CACHE_H
2#define _ARCH_X86_CACHE_H 2#define ASM_X86__CACHE_H
3 3
4/* L1 cache line size */ 4/* L1 cache line size */
5#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) 5#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
@@ -17,4 +17,4 @@
17#endif 17#endif
18#endif 18#endif
19 19
20#endif 20#endif /* ASM_X86__CACHE_H */
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h
index f4c0ab50d2c2..59859cb28a36 100644
--- a/include/asm-x86/cacheflush.h
+++ b/include/asm-x86/cacheflush.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_CACHEFLUSH_H 1#ifndef ASM_X86__CACHEFLUSH_H
2#define _ASM_X86_CACHEFLUSH_H 2#define ASM_X86__CACHEFLUSH_H
3 3
4/* Keep includes the same across arches. */ 4/* Keep includes the same across arches. */
5#include <linux/mm.h> 5#include <linux/mm.h>
@@ -112,4 +112,4 @@ static inline int rodata_test(void)
112} 112}
113#endif 113#endif
114 114
115#endif 115#endif /* ASM_X86__CACHEFLUSH_H */
diff --git a/include/asm-x86/calgary.h b/include/asm-x86/calgary.h
index 67f60406e2d8..933fd272f826 100644
--- a/include/asm-x86/calgary.h
+++ b/include/asm-x86/calgary.h
@@ -21,8 +21,8 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24#ifndef _ASM_X86_64_CALGARY_H 24#ifndef ASM_X86__CALGARY_H
25#define _ASM_X86_64_CALGARY_H 25#define ASM_X86__CALGARY_H
26 26
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/device.h> 28#include <linux/device.h>
@@ -69,4 +69,4 @@ static inline int calgary_iommu_init(void) { return 1; }
69static inline void detect_calgary(void) { return; } 69static inline void detect_calgary(void) { return; }
70#endif 70#endif
71 71
72#endif /* _ASM_X86_64_CALGARY_H */ 72#endif /* ASM_X86__CALGARY_H */
diff --git a/include/asm-x86/checksum_32.h b/include/asm-x86/checksum_32.h
index 52bbb0d8c4c1..d041e8cda227 100644
--- a/include/asm-x86/checksum_32.h
+++ b/include/asm-x86/checksum_32.h
@@ -1,5 +1,5 @@
1#ifndef _I386_CHECKSUM_H 1#ifndef ASM_X86__CHECKSUM_32_H
2#define _I386_CHECKSUM_H 2#define ASM_X86__CHECKSUM_32_H
3 3
4#include <linux/in6.h> 4#include <linux/in6.h>
5 5
@@ -186,4 +186,4 @@ static inline __wsum csum_and_copy_to_user(const void *src,
186 return (__force __wsum)-1; /* invalid checksum */ 186 return (__force __wsum)-1; /* invalid checksum */
187} 187}
188 188
189#endif 189#endif /* ASM_X86__CHECKSUM_32_H */
diff --git a/include/asm-x86/checksum_64.h b/include/asm-x86/checksum_64.h
index 8bd861cc5267..110f403beb89 100644
--- a/include/asm-x86/checksum_64.h
+++ b/include/asm-x86/checksum_64.h
@@ -1,5 +1,5 @@
1#ifndef _X86_64_CHECKSUM_H 1#ifndef ASM_X86__CHECKSUM_64_H
2#define _X86_64_CHECKSUM_H 2#define ASM_X86__CHECKSUM_64_H
3 3
4/* 4/*
5 * Checksums for x86-64 5 * Checksums for x86-64
@@ -188,4 +188,4 @@ static inline unsigned add32_with_carry(unsigned a, unsigned b)
188 return a; 188 return a;
189} 189}
190 190
191#endif 191#endif /* ASM_X86__CHECKSUM_64_H */
diff --git a/include/asm-x86/cmpxchg_32.h b/include/asm-x86/cmpxchg_32.h
index bf5a69d1329e..0622e45cdf7c 100644
--- a/include/asm-x86/cmpxchg_32.h
+++ b/include/asm-x86/cmpxchg_32.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_CMPXCHG_H 1#ifndef ASM_X86__CMPXCHG_32_H
2#define __ASM_CMPXCHG_H 2#define ASM_X86__CMPXCHG_32_H
3 3
4#include <linux/bitops.h> /* for LOCK_PREFIX */ 4#include <linux/bitops.h> /* for LOCK_PREFIX */
5 5
@@ -341,4 +341,4 @@ extern unsigned long long cmpxchg_486_u64(volatile void *, u64, u64);
341 341
342#endif 342#endif
343 343
344#endif 344#endif /* ASM_X86__CMPXCHG_32_H */
diff --git a/include/asm-x86/cmpxchg_64.h b/include/asm-x86/cmpxchg_64.h
index 17463ccf8166..63c1a5e61b99 100644
--- a/include/asm-x86/cmpxchg_64.h
+++ b/include/asm-x86/cmpxchg_64.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_CMPXCHG_H 1#ifndef ASM_X86__CMPXCHG_64_H
2#define __ASM_CMPXCHG_H 2#define ASM_X86__CMPXCHG_64_H
3 3
4#include <asm/alternative.h> /* Provides LOCK_PREFIX */ 4#include <asm/alternative.h> /* Provides LOCK_PREFIX */
5 5
@@ -182,4 +182,4 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr,
182 cmpxchg_local((ptr), (o), (n)); \ 182 cmpxchg_local((ptr), (o), (n)); \
183}) 183})
184 184
185#endif 185#endif /* ASM_X86__CMPXCHG_64_H */
diff --git a/include/asm-x86/compat.h b/include/asm-x86/compat.h
index 1793ac317a30..6732b150949e 100644
--- a/include/asm-x86/compat.h
+++ b/include/asm-x86/compat.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_64_COMPAT_H 1#ifndef ASM_X86__COMPAT_H
2#define _ASM_X86_64_COMPAT_H 2#define ASM_X86__COMPAT_H
3 3
4/* 4/*
5 * Architecture specific compatibility types 5 * Architecture specific compatibility types
@@ -215,4 +215,4 @@ static inline int is_compat_task(void)
215 return current_thread_info()->status & TS_COMPAT; 215 return current_thread_info()->status & TS_COMPAT;
216} 216}
217 217
218#endif /* _ASM_X86_64_COMPAT_H */ 218#endif /* ASM_X86__COMPAT_H */
diff --git a/include/asm-x86/cpu.h b/include/asm-x86/cpu.h
index 73f2ea84fd74..83a115083f0d 100644
--- a/include/asm-x86/cpu.h
+++ b/include/asm-x86/cpu.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_I386_CPU_H_ 1#ifndef ASM_X86__CPU_H
2#define _ASM_I386_CPU_H_ 2#define ASM_X86__CPU_H
3 3
4#include <linux/device.h> 4#include <linux/device.h>
5#include <linux/cpu.h> 5#include <linux/cpu.h>
@@ -17,4 +17,4 @@ extern void arch_unregister_cpu(int);
17#endif 17#endif
18 18
19DECLARE_PER_CPU(int, cpu_state); 19DECLARE_PER_CPU(int, cpu_state);
20#endif /* _ASM_I386_CPU_H_ */ 20#endif /* ASM_X86__CPU_H */
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
index 9489283a4bcf..f1b8a53c3e67 100644
--- a/include/asm-x86/cpufeature.h
+++ b/include/asm-x86/cpufeature.h
@@ -1,20 +1,26 @@
1/* 1/*
2 * Defines x86 CPU feature bits 2 * Defines x86 CPU feature bits
3 */ 3 */
4#ifndef _ASM_X86_CPUFEATURE_H 4#ifndef ASM_X86__CPUFEATURE_H
5#define _ASM_X86_CPUFEATURE_H 5#define ASM_X86__CPUFEATURE_H
6 6
7#include <asm/required-features.h> 7#include <asm/required-features.h>
8 8
9#define NCAPINTS 8 /* N 32-bit words worth of info */ 9#define NCAPINTS 8 /* N 32-bit words worth of info */
10 10
11/*
12 * Note: If the comment begins with a quoted string, that string is used
13 * in /proc/cpuinfo instead of the macro name. If the string is "",
14 * this feature bit is not displayed in /proc/cpuinfo at all.
15 */
16
11/* Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0 */ 17/* Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0 */
12#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ 18#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */
13#define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */ 19#define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */
14#define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */ 20#define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */
15#define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */ 21#define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */
16#define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ 22#define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */
17#define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */ 23#define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers */
18#define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ 24#define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */
19#define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */ 25#define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */
20#define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ 26#define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */
@@ -23,22 +29,23 @@
23#define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */ 29#define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */
24#define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */ 30#define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */
25#define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */ 31#define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */
26#define X86_FEATURE_CMOV (0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */ 32#define X86_FEATURE_CMOV (0*32+15) /* CMOV instructions */
33 /* (plus FCMOVcc, FCOMI with FPU) */
27#define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ 34#define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */
28#define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ 35#define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */
29#define X86_FEATURE_PN (0*32+18) /* Processor serial number */ 36#define X86_FEATURE_PN (0*32+18) /* Processor serial number */
30#define X86_FEATURE_CLFLSH (0*32+19) /* Supports the CLFLUSH instruction */ 37#define X86_FEATURE_CLFLSH (0*32+19) /* "clflush" CLFLUSH instruction */
31#define X86_FEATURE_DS (0*32+21) /* Debug Store */ 38#define X86_FEATURE_DS (0*32+21) /* "dts" Debug Store */
32#define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ 39#define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */
33#define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ 40#define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */
34#define X86_FEATURE_FXSR (0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */ 41#define X86_FEATURE_FXSR (0*32+24) /* FXSAVE/FXRSTOR, CR4.OSFXSR */
35 /* of FPU context), and CR4.OSFXSR available */ 42#define X86_FEATURE_XMM (0*32+25) /* "sse" */
36#define X86_FEATURE_XMM (0*32+25) /* Streaming SIMD Extensions */ 43#define X86_FEATURE_XMM2 (0*32+26) /* "sse2" */
37#define X86_FEATURE_XMM2 (0*32+26) /* Streaming SIMD Extensions-2 */ 44#define X86_FEATURE_SELFSNOOP (0*32+27) /* "ss" CPU self snoop */
38#define X86_FEATURE_SELFSNOOP (0*32+27) /* CPU self snoop */
39#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */ 45#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */
40#define X86_FEATURE_ACC (0*32+29) /* Automatic clock control */ 46#define X86_FEATURE_ACC (0*32+29) /* "tm" Automatic clock control */
41#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */ 47#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */
48#define X86_FEATURE_PBE (0*32+31) /* Pending Break Enable */
42 49
43/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ 50/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */
44/* Don't duplicate feature flags which are redundant with Intel! */ 51/* Don't duplicate feature flags which are redundant with Intel! */
@@ -46,7 +53,8 @@
46#define X86_FEATURE_MP (1*32+19) /* MP Capable. */ 53#define X86_FEATURE_MP (1*32+19) /* MP Capable. */
47#define X86_FEATURE_NX (1*32+20) /* Execute Disable */ 54#define X86_FEATURE_NX (1*32+20) /* Execute Disable */
48#define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ 55#define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */
49#define X86_FEATURE_GBPAGES (1*32+26) /* GB pages */ 56#define X86_FEATURE_FXSR_OPT (1*32+25) /* FXSAVE/FXRSTOR optimizations */
57#define X86_FEATURE_GBPAGES (1*32+26) /* "pdpe1gb" GB pages */
50#define X86_FEATURE_RDTSCP (1*32+27) /* RDTSCP */ 58#define X86_FEATURE_RDTSCP (1*32+27) /* RDTSCP */
51#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ 59#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */
52#define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ 60#define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */
@@ -64,52 +72,77 @@
64#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ 72#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */
65#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ 73#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */
66/* cpu types for specific tunings: */ 74/* cpu types for specific tunings: */
67#define X86_FEATURE_K8 (3*32+ 4) /* Opteron, Athlon64 */ 75#define X86_FEATURE_K8 (3*32+ 4) /* "" Opteron, Athlon64 */
68#define X86_FEATURE_K7 (3*32+ 5) /* Athlon */ 76#define X86_FEATURE_K7 (3*32+ 5) /* "" Athlon */
69#define X86_FEATURE_P3 (3*32+ 6) /* P3 */ 77#define X86_FEATURE_P3 (3*32+ 6) /* "" P3 */
70#define X86_FEATURE_P4 (3*32+ 7) /* P4 */ 78#define X86_FEATURE_P4 (3*32+ 7) /* "" P4 */
71#define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */ 79#define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */
72#define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */ 80#define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */
73#define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */ 81#define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* "" FXSAVE leaks FOP/FIP/FOP */
74#define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */ 82#define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */
83#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */
75#define X86_FEATURE_PEBS (3*32+12) /* Precise-Event Based Sampling */ 84#define X86_FEATURE_PEBS (3*32+12) /* Precise-Event Based Sampling */
76#define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */ 85#define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */
77#define X86_FEATURE_SYSCALL32 (3*32+14) /* syscall in ia32 userspace */ 86#define X86_FEATURE_SYSCALL32 (3*32+14) /* "" syscall in ia32 userspace */
78#define X86_FEATURE_SYSENTER32 (3*32+15) /* sysenter in ia32 userspace */ 87#define X86_FEATURE_SYSENTER32 (3*32+15) /* "" sysenter in ia32 userspace */
79#define X86_FEATURE_REP_GOOD (3*32+16) /* rep microcode works well on this CPU */ 88#define X86_FEATURE_REP_GOOD (3*32+16) /* rep microcode works well */
80#define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* Mfence synchronizes RDTSC */ 89#define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* "" Mfence synchronizes RDTSC */
81#define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ 90#define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* "" Lfence synchronizes RDTSC */
82#define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ 91#define X86_FEATURE_11AP (3*32+19) /* "" Bad local APIC aka 11AP */
83#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ 92#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */
84 93
85/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ 94/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
86#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ 95#define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */
87#define X86_FEATURE_MWAIT (4*32+ 3) /* Monitor/Mwait support */ 96#define X86_FEATURE_PCLMULQDQ (4*32+ 1) /* PCLMULQDQ instruction */
88#define X86_FEATURE_DSCPL (4*32+ 4) /* CPL Qualified Debug Store */ 97#define X86_FEATURE_DTES64 (4*32+ 2) /* 64-bit Debug Store */
98#define X86_FEATURE_MWAIT (4*32+ 3) /* "monitor" Monitor/Mwait support */
99#define X86_FEATURE_DSCPL (4*32+ 4) /* "ds_cpl" CPL Qual. Debug Store */
100#define X86_FEATURE_VMX (4*32+ 5) /* Hardware virtualization */
101#define X86_FEATURE_SMX (4*32+ 6) /* Safer mode */
89#define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */ 102#define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */
90#define X86_FEATURE_TM2 (4*32+ 8) /* Thermal Monitor 2 */ 103#define X86_FEATURE_TM2 (4*32+ 8) /* Thermal Monitor 2 */
104#define X86_FEATURE_SSSE3 (4*32+ 9) /* Supplemental SSE-3 */
91#define X86_FEATURE_CID (4*32+10) /* Context ID */ 105#define X86_FEATURE_CID (4*32+10) /* Context ID */
106#define X86_FEATURE_FMA (4*32+12) /* Fused multiply-add */
92#define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ 107#define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */
93#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ 108#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */
109#define X86_FEATURE_PDCM (4*32+15) /* Performance Capabilities */
94#define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */ 110#define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */
95#define X86_FEATURE_XMM4_2 (4*32+20) /* Streaming SIMD Extensions-4.2 */ 111#define X86_FEATURE_XMM4_1 (4*32+19) /* "sse4_1" SSE-4.1 */
112#define X86_FEATURE_XMM4_2 (4*32+20) /* "sse4_2" SSE-4.2 */
113#define X86_FEATURE_X2APIC (4*32+21) /* x2APIC */
114#define X86_FEATURE_AES (4*32+25) /* AES instructions */
115#define X86_FEATURE_XSAVE (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
116#define X86_FEATURE_OSXSAVE (4*32+27) /* "" XSAVE enabled in the OS */
117#define X86_FEATURE_AVX (4*32+28) /* Advanced Vector Extensions */
96 118
97/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ 119/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
98#define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */ 120#define X86_FEATURE_XSTORE (5*32+ 2) /* "rng" RNG present (xstore) */
99#define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */ 121#define X86_FEATURE_XSTORE_EN (5*32+ 3) /* "rng_en" RNG enabled */
100#define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */ 122#define X86_FEATURE_XCRYPT (5*32+ 6) /* "ace" on-CPU crypto (xcrypt) */
101#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ 123#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* "ace_en" on-CPU crypto enabled */
102#define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */ 124#define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */
103#define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */ 125#define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */
104#define X86_FEATURE_PHE (5*32+ 10) /* PadLock Hash Engine */ 126#define X86_FEATURE_PHE (5*32+10) /* PadLock Hash Engine */
105#define X86_FEATURE_PHE_EN (5*32+ 11) /* PHE enabled */ 127#define X86_FEATURE_PHE_EN (5*32+11) /* PHE enabled */
106#define X86_FEATURE_PMM (5*32+ 12) /* PadLock Montgomery Multiplier */ 128#define X86_FEATURE_PMM (5*32+12) /* PadLock Montgomery Multiplier */
107#define X86_FEATURE_PMM_EN (5*32+ 13) /* PMM enabled */ 129#define X86_FEATURE_PMM_EN (5*32+13) /* PMM enabled */
108 130
109/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ 131/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */
110#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ 132#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */
111#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ 133#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */
112#define X86_FEATURE_IBS (6*32+ 10) /* Instruction Based Sampling */ 134#define X86_FEATURE_SVM (6*32+ 2) /* Secure virtual machine */
135#define X86_FEATURE_EXTAPIC (6*32+ 3) /* Extended APIC space */
136#define X86_FEATURE_CR8_LEGACY (6*32+ 4) /* CR8 in 32-bit mode */
137#define X86_FEATURE_ABM (6*32+ 5) /* Advanced bit manipulation */
138#define X86_FEATURE_SSE4A (6*32+ 6) /* SSE-4A */
139#define X86_FEATURE_MISALIGNSSE (6*32+ 7) /* Misaligned SSE mode */
140#define X86_FEATURE_3DNOWPREFETCH (6*32+ 8) /* 3DNow prefetch instructions */
141#define X86_FEATURE_OSVW (6*32+ 9) /* OS Visible Workaround */
142#define X86_FEATURE_IBS (6*32+10) /* Instruction Based Sampling */
143#define X86_FEATURE_SSE5 (6*32+11) /* SSE-5 */
144#define X86_FEATURE_SKINIT (6*32+12) /* SKINIT/STGI instructions */
145#define X86_FEATURE_WDT (6*32+13) /* Watchdog timer */
113 146
114/* 147/*
115 * Auxiliary flags: Linux defined - For features scattered in various 148 * Auxiliary flags: Linux defined - For features scattered in various
@@ -150,7 +183,7 @@ extern const char * const x86_power_flags[32];
150} while (0) 183} while (0)
151#define setup_force_cpu_cap(bit) do { \ 184#define setup_force_cpu_cap(bit) do { \
152 set_cpu_cap(&boot_cpu_data, bit); \ 185 set_cpu_cap(&boot_cpu_data, bit); \
153 clear_bit(bit, (unsigned long *)cleared_cpu_caps); \ 186 clear_bit(bit, (unsigned long *)cleared_cpu_caps); \
154} while (0) 187} while (0)
155 188
156#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) 189#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
@@ -191,7 +224,10 @@ extern const char * const x86_power_flags[32];
191#define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) 224#define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES)
192#define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) 225#define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
193#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) 226#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT)
227#define cpu_has_xmm4_1 boot_cpu_has(X86_FEATURE_XMM4_1)
194#define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2) 228#define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2)
229#define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC)
230#define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE)
195 231
196#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) 232#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
197# define cpu_has_invlpg 1 233# define cpu_has_invlpg 1
@@ -223,4 +259,4 @@ extern const char * const x86_power_flags[32];
223 259
224#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */ 260#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
225 261
226#endif /* _ASM_X86_CPUFEATURE_H */ 262#endif /* ASM_X86__CPUFEATURE_H */
diff --git a/include/asm-x86/current.h b/include/asm-x86/current.h
index 7515c19d4988..a863ead856f3 100644
--- a/include/asm-x86/current.h
+++ b/include/asm-x86/current.h
@@ -1,5 +1,5 @@
1#ifndef _X86_CURRENT_H 1#ifndef ASM_X86__CURRENT_H
2#define _X86_CURRENT_H 2#define ASM_X86__CURRENT_H
3 3
4#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
5#include <linux/compiler.h> 5#include <linux/compiler.h>
@@ -36,4 +36,4 @@ static __always_inline struct task_struct *get_current(void)
36 36
37#define current get_current() 37#define current get_current()
38 38
39#endif /* X86_CURRENT_H */ 39#endif /* ASM_X86__CURRENT_H */
diff --git a/include/asm-x86/debugreg.h b/include/asm-x86/debugreg.h
index c6344d572b03..ecb6907c3ea4 100644
--- a/include/asm-x86/debugreg.h
+++ b/include/asm-x86/debugreg.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_DEBUGREG_H 1#ifndef ASM_X86__DEBUGREG_H
2#define _ASM_X86_DEBUGREG_H 2#define ASM_X86__DEBUGREG_H
3 3
4 4
5/* Indicate the register numbers for a number of the specific 5/* Indicate the register numbers for a number of the specific
@@ -67,4 +67,4 @@
67#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ 67#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
68#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ 68#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
69 69
70#endif 70#endif /* ASM_X86__DEBUGREG_H */
diff --git a/include/asm-x86/delay.h b/include/asm-x86/delay.h
index 409a649204aa..8a0da95b4fc5 100644
--- a/include/asm-x86/delay.h
+++ b/include/asm-x86/delay.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_DELAY_H 1#ifndef ASM_X86__DELAY_H
2#define _ASM_X86_DELAY_H 2#define ASM_X86__DELAY_H
3 3
4/* 4/*
5 * Copyright (C) 1993 Linus Torvalds 5 * Copyright (C) 1993 Linus Torvalds
@@ -28,4 +28,4 @@ extern void __delay(unsigned long loops);
28 28
29void use_tsc_delay(void); 29void use_tsc_delay(void);
30 30
31#endif /* _ASM_X86_DELAY_H */ 31#endif /* ASM_X86__DELAY_H */
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index a44c4dc70590..b73fea54def2 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_DESC_H_ 1#ifndef ASM_X86__DESC_H
2#define _ASM_DESC_H_ 2#define ASM_X86__DESC_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#include <asm/desc_defs.h> 5#include <asm/desc_defs.h>
@@ -397,4 +397,4 @@ static inline void set_system_gate_ist(int n, void *addr, unsigned ist)
397 397
398#endif /* __ASSEMBLY__ */ 398#endif /* __ASSEMBLY__ */
399 399
400#endif 400#endif /* ASM_X86__DESC_H */
diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h
index f7bacf357dac..b881db664b46 100644
--- a/include/asm-x86/desc_defs.h
+++ b/include/asm-x86/desc_defs.h
@@ -1,6 +1,6 @@
1/* Written 2000 by Andi Kleen */ 1/* Written 2000 by Andi Kleen */
2#ifndef __ARCH_DESC_DEFS_H 2#ifndef ASM_X86__DESC_DEFS_H
3#define __ARCH_DESC_DEFS_H 3#define ASM_X86__DESC_DEFS_H
4 4
5/* 5/*
6 * Segment descriptor structure definitions, usable from both x86_64 and i386 6 * Segment descriptor structure definitions, usable from both x86_64 and i386
@@ -92,4 +92,4 @@ struct desc_ptr {
92 92
93#endif /* !__ASSEMBLY__ */ 93#endif /* !__ASSEMBLY__ */
94 94
95#endif 95#endif /* ASM_X86__DESC_DEFS_H */
diff --git a/include/asm-x86/device.h b/include/asm-x86/device.h
index 3c034f48fdb0..1bece04c7d9d 100644
--- a/include/asm-x86/device.h
+++ b/include/asm-x86/device.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_DEVICE_H 1#ifndef ASM_X86__DEVICE_H
2#define _ASM_X86_DEVICE_H 2#define ASM_X86__DEVICE_H
3 3
4struct dev_archdata { 4struct dev_archdata {
5#ifdef CONFIG_ACPI 5#ifdef CONFIG_ACPI
@@ -13,4 +13,4 @@ struct dma_mapping_ops *dma_ops;
13#endif 13#endif
14}; 14};
15 15
16#endif /* _ASM_X86_DEVICE_H */ 16#endif /* ASM_X86__DEVICE_H */
diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h
index 9a2d644c08ef..f9530f23f1d6 100644
--- a/include/asm-x86/div64.h
+++ b/include/asm-x86/div64.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_DIV64_H 1#ifndef ASM_X86__DIV64_H
2#define _ASM_X86_DIV64_H 2#define ASM_X86__DIV64_H
3 3
4#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
5 5
@@ -57,4 +57,4 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
57# include <asm-generic/div64.h> 57# include <asm-generic/div64.h>
58#endif /* CONFIG_X86_32 */ 58#endif /* CONFIG_X86_32 */
59 59
60#endif /* _ASM_X86_DIV64_H */ 60#endif /* ASM_X86__DIV64_H */
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index ad9cd6d49bfc..5d200e78bd81 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_DMA_MAPPING_H_ 1#ifndef ASM_X86__DMA_MAPPING_H
2#define _ASM_DMA_MAPPING_H_ 2#define ASM_X86__DMA_MAPPING_H
3 3
4/* 4/*
5 * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for 5 * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for
@@ -250,4 +250,4 @@ static inline int dma_get_cache_alignment(void)
250#define dma_is_consistent(d, h) (1) 250#define dma_is_consistent(d, h) (1)
251 251
252#include <asm-generic/dma-coherent.h> 252#include <asm-generic/dma-coherent.h>
253#endif 253#endif /* ASM_X86__DMA_MAPPING_H */
diff --git a/include/asm-x86/dma.h b/include/asm-x86/dma.h
index ca1098a7e580..c9f7a4eec555 100644
--- a/include/asm-x86/dma.h
+++ b/include/asm-x86/dma.h
@@ -5,8 +5,8 @@
5 * and John Boyd, Nov. 1992. 5 * and John Boyd, Nov. 1992.
6 */ 6 */
7 7
8#ifndef _ASM_X86_DMA_H 8#ifndef ASM_X86__DMA_H
9#define _ASM_X86_DMA_H 9#define ASM_X86__DMA_H
10 10
11#include <linux/spinlock.h> /* And spinlocks */ 11#include <linux/spinlock.h> /* And spinlocks */
12#include <asm/io.h> /* need byte IO */ 12#include <asm/io.h> /* need byte IO */
@@ -315,4 +315,4 @@ extern int isa_dma_bridge_buggy;
315#define isa_dma_bridge_buggy (0) 315#define isa_dma_bridge_buggy (0)
316#endif 316#endif
317 317
318#endif /* _ASM_X86_DMA_H */ 318#endif /* ASM_X86__DMA_H */
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
index 58a86571fe0f..1cff6fe81fa5 100644
--- a/include/asm-x86/dmi.h
+++ b/include/asm-x86/dmi.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_DMI_H 1#ifndef ASM_X86__DMI_H
2#define _ASM_X86_DMI_H 2#define ASM_X86__DMI_H
3 3
4#include <asm/io.h> 4#include <asm/io.h>
5 5
@@ -23,4 +23,4 @@ static inline void *dmi_alloc(unsigned len)
23#define dmi_ioremap early_ioremap 23#define dmi_ioremap early_ioremap
24#define dmi_iounmap early_iounmap 24#define dmi_iounmap early_iounmap
25 25
26#endif 26#endif /* ASM_X86__DMI_H */
diff --git a/include/asm-x86/ds.h b/include/asm-x86/ds.h
index 7881368142fa..6b27c686fa10 100644
--- a/include/asm-x86/ds.h
+++ b/include/asm-x86/ds.h
@@ -17,8 +17,8 @@
17 * Markus Metzger <markus.t.metzger@intel.com>, Dec 2007 17 * Markus Metzger <markus.t.metzger@intel.com>, Dec 2007
18 */ 18 */
19 19
20#ifndef _ASM_X86_DS_H 20#ifndef ASM_X86__DS_H
21#define _ASM_X86_DS_H 21#define ASM_X86__DS_H
22 22
23#include <linux/types.h> 23#include <linux/types.h>
24#include <linux/init.h> 24#include <linux/init.h>
@@ -69,4 +69,4 @@ extern int ds_write_bts(void *, const struct bts_struct *);
69extern unsigned long ds_debugctl_mask(void); 69extern unsigned long ds_debugctl_mask(void);
70extern void __cpuinit ds_init_intel(struct cpuinfo_x86 *c); 70extern void __cpuinit ds_init_intel(struct cpuinfo_x86 *c);
71 71
72#endif /* _ASM_X86_DS_H */ 72#endif /* ASM_X86__DS_H */
diff --git a/include/asm-x86/dwarf2.h b/include/asm-x86/dwarf2.h
index 738bb9fb3e53..21d1bc32ad7c 100644
--- a/include/asm-x86/dwarf2.h
+++ b/include/asm-x86/dwarf2.h
@@ -1,5 +1,5 @@
1#ifndef _DWARF2_H 1#ifndef ASM_X86__DWARF2_H
2#define _DWARF2_H 2#define ASM_X86__DWARF2_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#warning "asm/dwarf2.h should be only included in pure assembly files" 5#warning "asm/dwarf2.h should be only included in pure assembly files"
@@ -58,4 +58,4 @@
58 58
59#endif 59#endif
60 60
61#endif 61#endif /* ASM_X86__DWARF2_H */
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h
index 16a31e2c7c57..f52daf176bcb 100644
--- a/include/asm-x86/e820.h
+++ b/include/asm-x86/e820.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_E820_H 1#ifndef ASM_X86__E820_H
2#define __ASM_E820_H 2#define ASM_X86__E820_H
3#define E820MAP 0x2d0 /* our map */ 3#define E820MAP 0x2d0 /* our map */
4#define E820MAX 128 /* number of entries in E820MAP */ 4#define E820MAX 128 /* number of entries in E820MAP */
5 5
@@ -64,6 +64,7 @@ struct e820map {
64extern struct e820map e820; 64extern struct e820map e820;
65extern struct e820map e820_saved; 65extern struct e820map e820_saved;
66 66
67extern unsigned long pci_mem_start;
67extern int e820_any_mapped(u64 start, u64 end, unsigned type); 68extern int e820_any_mapped(u64 start, u64 end, unsigned type);
68extern int e820_all_mapped(u64 start, u64 end, unsigned type); 69extern int e820_all_mapped(u64 start, u64 end, unsigned type);
69extern void e820_add_region(u64 start, u64 size, int type); 70extern void e820_add_region(u64 start, u64 size, int type);
@@ -140,4 +141,4 @@ extern char *memory_setup(void);
140#define HIGH_MEMORY (1024*1024) 141#define HIGH_MEMORY (1024*1024)
141#endif /* __KERNEL__ */ 142#endif /* __KERNEL__ */
142 143
143#endif /* __ASM_E820_H */ 144#endif /* ASM_X86__E820_H */
diff --git a/include/asm-x86/edac.h b/include/asm-x86/edac.h
index a8088f63a30e..9493c5b27bbd 100644
--- a/include/asm-x86/edac.h
+++ b/include/asm-x86/edac.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_EDAC_H 1#ifndef ASM_X86__EDAC_H
2#define _ASM_X86_EDAC_H 2#define ASM_X86__EDAC_H
3 3
4/* ECC atomic, DMA, SMP and interrupt safe scrub function */ 4/* ECC atomic, DMA, SMP and interrupt safe scrub function */
5 5
@@ -15,4 +15,4 @@ static inline void atomic_scrub(void *va, u32 size)
15 asm volatile("lock; addl $0, %0"::"m" (*virt_addr)); 15 asm volatile("lock; addl $0, %0"::"m" (*virt_addr));
16} 16}
17 17
18#endif 18#endif /* ASM_X86__EDAC_H */
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h
index d4f2b0abe929..ed2de22e8705 100644
--- a/include/asm-x86/efi.h
+++ b/include/asm-x86/efi.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_EFI_H 1#ifndef ASM_X86__EFI_H
2#define _ASM_X86_EFI_H 2#define ASM_X86__EFI_H
3 3
4#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
5 5
@@ -94,4 +94,4 @@ extern void efi_reserve_early(void);
94extern void efi_call_phys_prelog(void); 94extern void efi_call_phys_prelog(void);
95extern void efi_call_phys_epilog(void); 95extern void efi_call_phys_epilog(void);
96 96
97#endif 97#endif /* ASM_X86__EFI_H */
diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h
index 7be4733c793e..5c4745bec906 100644
--- a/include/asm-x86/elf.h
+++ b/include/asm-x86/elf.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_ELF_H 1#ifndef ASM_X86__ELF_H
2#define _ASM_X86_ELF_H 2#define ASM_X86__ELF_H
3 3
4/* 4/*
5 * ELF register definitions.. 5 * ELF register definitions..
@@ -148,8 +148,9 @@ do { \
148 148
149static inline void start_ia32_thread(struct pt_regs *regs, u32 ip, u32 sp) 149static inline void start_ia32_thread(struct pt_regs *regs, u32 ip, u32 sp)
150{ 150{
151 asm volatile("movl %0,%%fs" :: "r" (0)); 151 loadsegment(fs, 0);
152 asm volatile("movl %0,%%es; movl %0,%%ds" : : "r" (__USER32_DS)); 152 loadsegment(ds, __USER32_DS);
153 loadsegment(es, __USER32_DS);
153 load_gs_index(0); 154 load_gs_index(0);
154 regs->ip = ip; 155 regs->ip = ip;
155 regs->sp = sp; 156 regs->sp = sp;
@@ -332,4 +333,4 @@ extern int syscall32_setup_pages(struct linux_binprm *, int exstack);
332extern unsigned long arch_randomize_brk(struct mm_struct *mm); 333extern unsigned long arch_randomize_brk(struct mm_struct *mm);
333#define arch_randomize_brk arch_randomize_brk 334#define arch_randomize_brk arch_randomize_brk
334 335
335#endif 336#endif /* ASM_X86__ELF_H */
diff --git a/include/asm-x86/emergency-restart.h b/include/asm-x86/emergency-restart.h
index 8e6aef19f8f0..190d0d8b71e3 100644
--- a/include/asm-x86/emergency-restart.h
+++ b/include/asm-x86/emergency-restart.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_EMERGENCY_RESTART_H 1#ifndef ASM_X86__EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H 2#define ASM_X86__EMERGENCY_RESTART_H
3 3
4enum reboot_type { 4enum reboot_type {
5 BOOT_TRIPLE = 't', 5 BOOT_TRIPLE = 't',
@@ -15,4 +15,4 @@ extern enum reboot_type reboot_type;
15 15
16extern void machine_emergency_restart(void); 16extern void machine_emergency_restart(void);
17 17
18#endif /* _ASM_EMERGENCY_RESTART_H */ 18#endif /* ASM_X86__EMERGENCY_RESTART_H */
diff --git a/include/asm-x86/mach-es7000/mach_apic.h b/include/asm-x86/es7000/apic.h
index 0a3fdf930672..bd2c44d1f7ac 100644
--- a/include/asm-x86/mach-es7000/mach_apic.h
+++ b/include/asm-x86/es7000/apic.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_APIC_H 1#ifndef __ASM_ES7000_APIC_H
2#define __ASM_MACH_APIC_H 2#define __ASM_ES7000_APIC_H
3 3
4#define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu) 4#define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu)
5#define esr_disable (1) 5#define esr_disable (1)
@@ -10,7 +10,7 @@ static inline int apic_id_registered(void)
10} 10}
11 11
12static inline cpumask_t target_cpus(void) 12static inline cpumask_t target_cpus(void)
13{ 13{
14#if defined CONFIG_ES7000_CLUSTERED_APIC 14#if defined CONFIG_ES7000_CLUSTERED_APIC
15 return CPU_MASK_ALL; 15 return CPU_MASK_ALL;
16#else 16#else
@@ -23,24 +23,24 @@ static inline cpumask_t target_cpus(void)
23#define APIC_DFR_VALUE (APIC_DFR_CLUSTER) 23#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
24#define INT_DELIVERY_MODE (dest_LowestPrio) 24#define INT_DELIVERY_MODE (dest_LowestPrio)
25#define INT_DEST_MODE (1) /* logical delivery broadcast to all procs */ 25#define INT_DEST_MODE (1) /* logical delivery broadcast to all procs */
26#define NO_BALANCE_IRQ (1) 26#define NO_BALANCE_IRQ (1)
27#undef WAKE_SECONDARY_VIA_INIT 27#undef WAKE_SECONDARY_VIA_INIT
28#define WAKE_SECONDARY_VIA_MIP 28#define WAKE_SECONDARY_VIA_MIP
29#else 29#else
30#define APIC_DFR_VALUE (APIC_DFR_FLAT) 30#define APIC_DFR_VALUE (APIC_DFR_FLAT)
31#define INT_DELIVERY_MODE (dest_Fixed) 31#define INT_DELIVERY_MODE (dest_Fixed)
32#define INT_DEST_MODE (0) /* phys delivery to target procs */ 32#define INT_DEST_MODE (0) /* phys delivery to target procs */
33#define NO_BALANCE_IRQ (0) 33#define NO_BALANCE_IRQ (0)
34#undef APIC_DEST_LOGICAL 34#undef APIC_DEST_LOGICAL
35#define APIC_DEST_LOGICAL 0x0 35#define APIC_DEST_LOGICAL 0x0
36#define WAKE_SECONDARY_VIA_INIT 36#define WAKE_SECONDARY_VIA_INIT
37#endif 37#endif
38 38
39static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) 39static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
40{ 40{
41 return 0; 41 return 0;
42} 42}
43static inline unsigned long check_apicid_present(int bit) 43static inline unsigned long check_apicid_present(int bit)
44{ 44{
45 return physid_isset(bit, phys_cpu_present_map); 45 return physid_isset(bit, phys_cpu_present_map);
46} 46}
@@ -80,7 +80,7 @@ static inline void setup_apic_routing(void)
80{ 80{
81 int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id()); 81 int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
82 printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n", 82 printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
83 (apic_version[apic] == 0x14) ? 83 (apic_version[apic] == 0x14) ?
84 "Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_addr(TARGET_CPUS)[0]); 84 "Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_addr(TARGET_CPUS)[0]);
85} 85}
86 86
@@ -141,7 +141,7 @@ static inline void setup_portio_remap(void)
141extern unsigned int boot_cpu_physical_apicid; 141extern unsigned int boot_cpu_physical_apicid;
142static inline int check_phys_apicid_present(int cpu_physical_apicid) 142static inline int check_phys_apicid_present(int cpu_physical_apicid)
143{ 143{
144 boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); 144 boot_cpu_physical_apicid = read_apic_id();
145 return (1); 145 return (1);
146} 146}
147 147
@@ -150,7 +150,7 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
150 int num_bits_set; 150 int num_bits_set;
151 int cpus_found = 0; 151 int cpus_found = 0;
152 int cpu; 152 int cpu;
153 int apicid; 153 int apicid;
154 154
155 num_bits_set = cpus_weight(cpumask); 155 num_bits_set = cpus_weight(cpumask);
156 /* Return id to all */ 156 /* Return id to all */
@@ -160,16 +160,16 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
160#else 160#else
161 return cpu_to_logical_apicid(0); 161 return cpu_to_logical_apicid(0);
162#endif 162#endif
163 /* 163 /*
164 * The cpus in the mask must all be on the apic cluster. If are not 164 * The cpus in the mask must all be on the apic cluster. If are not
165 * on the same apicid cluster return default value of TARGET_CPUS. 165 * on the same apicid cluster return default value of TARGET_CPUS.
166 */ 166 */
167 cpu = first_cpu(cpumask); 167 cpu = first_cpu(cpumask);
168 apicid = cpu_to_logical_apicid(cpu); 168 apicid = cpu_to_logical_apicid(cpu);
169 while (cpus_found < num_bits_set) { 169 while (cpus_found < num_bits_set) {
170 if (cpu_isset(cpu, cpumask)) { 170 if (cpu_isset(cpu, cpumask)) {
171 int new_apicid = cpu_to_logical_apicid(cpu); 171 int new_apicid = cpu_to_logical_apicid(cpu);
172 if (apicid_cluster(apicid) != 172 if (apicid_cluster(apicid) !=
173 apicid_cluster(new_apicid)){ 173 apicid_cluster(new_apicid)){
174 printk ("%s: Not a valid mask!\n",__FUNCTION__); 174 printk ("%s: Not a valid mask!\n",__FUNCTION__);
175#if defined CONFIG_ES7000_CLUSTERED_APIC 175#if defined CONFIG_ES7000_CLUSTERED_APIC
@@ -191,4 +191,4 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
191 return cpuid_apic >> index_msb; 191 return cpuid_apic >> index_msb;
192} 192}
193 193
194#endif /* __ASM_MACH_APIC_H */ 194#endif /* __ASM_ES7000_APIC_H */
diff --git a/include/asm-x86/es7000/apicdef.h b/include/asm-x86/es7000/apicdef.h
new file mode 100644
index 000000000000..8b234a3cb851
--- /dev/null
+++ b/include/asm-x86/es7000/apicdef.h
@@ -0,0 +1,13 @@
1#ifndef __ASM_ES7000_APICDEF_H
2#define __ASM_ES7000_APICDEF_H
3
4#define APIC_ID_MASK (0xFF<<24)
5
6static inline unsigned get_apic_id(unsigned long x)
7{
8 return (((x)>>24)&0xFF);
9}
10
11#define GET_APIC_ID(x) get_apic_id(x)
12
13#endif
diff --git a/include/asm-x86/mach-es7000/mach_ipi.h b/include/asm-x86/es7000/ipi.h
index 5e61bd220b06..632a955fcc0a 100644
--- a/include/asm-x86/mach-es7000/mach_ipi.h
+++ b/include/asm-x86/es7000/ipi.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_IPI_H 1#ifndef __ASM_ES7000_IPI_H
2#define __ASM_MACH_IPI_H 2#define __ASM_ES7000_IPI_H
3 3
4void send_IPI_mask_sequence(cpumask_t mask, int vector); 4void send_IPI_mask_sequence(cpumask_t mask, int vector);
5 5
@@ -21,4 +21,4 @@ static inline void send_IPI_all(int vector)
21 send_IPI_mask(cpu_online_map, vector); 21 send_IPI_mask(cpu_online_map, vector);
22} 22}
23 23
24#endif /* __ASM_MACH_IPI_H */ 24#endif /* __ASM_ES7000_IPI_H */
diff --git a/include/asm-x86/mach-es7000/mach_mpparse.h b/include/asm-x86/es7000/mpparse.h
index ef26d3523625..7b5c889d8e7d 100644
--- a/include/asm-x86/mach-es7000/mach_mpparse.h
+++ b/include/asm-x86/es7000/mpparse.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_MPPARSE_H 1#ifndef __ASM_ES7000_MPPARSE_H
2#define __ASM_MACH_MPPARSE_H 2#define __ASM_ES7000_MPPARSE_H
3 3
4#include <linux/acpi.h> 4#include <linux/acpi.h>
5 5
diff --git a/include/asm-x86/mach-es7000/mach_wakecpu.h b/include/asm-x86/es7000/wakecpu.h
index 84ff58314501..3ffc5a7bf667 100644
--- a/include/asm-x86/mach-es7000/mach_wakecpu.h
+++ b/include/asm-x86/es7000/wakecpu.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_MACH_WAKECPU_H 1#ifndef __ASM_ES7000_WAKECPU_H
2#define __ASM_MACH_WAKECPU_H 2#define __ASM_ES7000_WAKECPU_H
3 3
4/* 4/*
5 * This file copes with machines that wakeup secondary CPUs by the 5 * This file copes with machines that wakeup secondary CPUs by the
6 * INIT, INIT, STARTUP sequence. 6 * INIT, INIT, STARTUP sequence.
7 */ 7 */
diff --git a/include/asm-x86/fb.h b/include/asm-x86/fb.h
index 53018464aea6..aca38dbd9a64 100644
--- a/include/asm-x86/fb.h
+++ b/include/asm-x86/fb.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_FB_H 1#ifndef ASM_X86__FB_H
2#define _ASM_X86_FB_H 2#define ASM_X86__FB_H
3 3
4#include <linux/fb.h> 4#include <linux/fb.h>
5#include <linux/fs.h> 5#include <linux/fs.h>
@@ -18,4 +18,4 @@ extern int fb_is_primary_device(struct fb_info *info);
18static inline int fb_is_primary_device(struct fb_info *info) { return 0; } 18static inline int fb_is_primary_device(struct fb_info *info) { return 0; }
19#endif 19#endif
20 20
21#endif /* _ASM_X86_FB_H */ 21#endif /* ASM_X86__FB_H */
diff --git a/include/asm-x86/fixmap.h b/include/asm-x86/fixmap.h
index 44d4f8217349..78e33a1bc591 100644
--- a/include/asm-x86/fixmap.h
+++ b/include/asm-x86/fixmap.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_FIXMAP_H 1#ifndef ASM_X86__FIXMAP_H
2#define _ASM_FIXMAP_H 2#define ASM_X86__FIXMAP_H
3 3
4#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
5# include "fixmap_32.h" 5# include "fixmap_32.h"
@@ -65,4 +65,4 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
65 BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); 65 BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
66 return __virt_to_fix(vaddr); 66 return __virt_to_fix(vaddr);
67} 67}
68#endif 68#endif /* ASM_X86__FIXMAP_H */
diff --git a/include/asm-x86/fixmap_32.h b/include/asm-x86/fixmap_32.h
index f1ac2b2167d7..784e3e759866 100644
--- a/include/asm-x86/fixmap_32.h
+++ b/include/asm-x86/fixmap_32.h
@@ -10,8 +10,8 @@
10 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 10 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
11 */ 11 */
12 12
13#ifndef _ASM_FIXMAP_32_H 13#ifndef ASM_X86__FIXMAP_32_H
14#define _ASM_FIXMAP_32_H 14#define ASM_X86__FIXMAP_32_H
15 15
16 16
17/* used by vmalloc.c, vsyscall.lds.S. 17/* used by vmalloc.c, vsyscall.lds.S.
@@ -120,4 +120,4 @@ extern void reserve_top_address(unsigned long reserve);
120#define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE) 120#define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE)
121 121
122#endif /* !__ASSEMBLY__ */ 122#endif /* !__ASSEMBLY__ */
123#endif 123#endif /* ASM_X86__FIXMAP_32_H */
diff --git a/include/asm-x86/fixmap_64.h b/include/asm-x86/fixmap_64.h
index 00f3d74a0524..dafb24bc0424 100644
--- a/include/asm-x86/fixmap_64.h
+++ b/include/asm-x86/fixmap_64.h
@@ -8,8 +8,8 @@
8 * Copyright (C) 1998 Ingo Molnar 8 * Copyright (C) 1998 Ingo Molnar
9 */ 9 */
10 10
11#ifndef _ASM_FIXMAP_64_H 11#ifndef ASM_X86__FIXMAP_64_H
12#define _ASM_FIXMAP_64_H 12#define ASM_X86__FIXMAP_64_H
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <asm/acpi.h> 15#include <asm/acpi.h>
@@ -80,4 +80,4 @@ enum fixed_addresses {
80#define FIXADDR_USER_START ((unsigned long)VSYSCALL32_VSYSCALL) 80#define FIXADDR_USER_START ((unsigned long)VSYSCALL32_VSYSCALL)
81#define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) 81#define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE)
82 82
83#endif 83#endif /* ASM_X86__FIXMAP_64_H */
diff --git a/include/asm-x86/floppy.h b/include/asm-x86/floppy.h
index dbe82a5c5eac..7d83a3a83e37 100644
--- a/include/asm-x86/floppy.h
+++ b/include/asm-x86/floppy.h
@@ -7,8 +7,8 @@
7 * 7 *
8 * Copyright (C) 1995 8 * Copyright (C) 1995
9 */ 9 */
10#ifndef _ASM_X86_FLOPPY_H 10#ifndef ASM_X86__FLOPPY_H
11#define _ASM_X86_FLOPPY_H 11#define ASM_X86__FLOPPY_H
12 12
13#include <linux/vmalloc.h> 13#include <linux/vmalloc.h>
14 14
@@ -278,4 +278,4 @@ static int FDC2 = -1;
278 278
279#define EXTRA_FLOPPY_PARAMS 279#define EXTRA_FLOPPY_PARAMS
280 280
281#endif /* _ASM_X86_FLOPPY_H */ 281#endif /* ASM_X86__FLOPPY_H */
diff --git a/include/asm-x86/ftrace.h b/include/asm-x86/ftrace.h
index 5c68b32ee1c8..be0e004ad148 100644
--- a/include/asm-x86/ftrace.h
+++ b/include/asm-x86/ftrace.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_FTRACE 1#ifndef ASM_X86__FTRACE_H
2#define _ASM_X86_FTRACE 2#define ASM_X86__FTRACE_H
3 3
4#ifdef CONFIG_FTRACE 4#ifdef CONFIG_FTRACE
5#define MCOUNT_ADDR ((long)(mcount)) 5#define MCOUNT_ADDR ((long)(mcount))
@@ -11,4 +11,4 @@ extern void mcount(void);
11 11
12#endif /* CONFIG_FTRACE */ 12#endif /* CONFIG_FTRACE */
13 13
14#endif /* _ASM_X86_FTRACE */ 14#endif /* ASM_X86__FTRACE_H */
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h
index e7a76b37b333..45dc24d84186 100644
--- a/include/asm-x86/futex.h
+++ b/include/asm-x86/futex.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_FUTEX_H 1#ifndef ASM_X86__FUTEX_H
2#define _ASM_X86_FUTEX_H 2#define ASM_X86__FUTEX_H
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
@@ -137,4 +137,4 @@ static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval,
137} 137}
138 138
139#endif 139#endif
140#endif 140#endif /* ASM_X86__FUTEX_H */
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
index 3f62a83887f3..07f445844146 100644
--- a/include/asm-x86/gart.h
+++ b/include/asm-x86/gart.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X8664_GART_H 1#ifndef ASM_X86__GART_H
2#define _ASM_X8664_GART_H 1 2#define ASM_X86__GART_H
3 3
4#include <asm/e820.h> 4#include <asm/e820.h>
5 5
@@ -68,4 +68,4 @@ static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size)
68 return 1; 68 return 1;
69} 69}
70 70
71#endif 71#endif /* ASM_X86__GART_H */
diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h
index 754d635f90ff..34280f027664 100644
--- a/include/asm-x86/genapic_32.h
+++ b/include/asm-x86/genapic_32.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_GENAPIC_H 1#ifndef ASM_X86__GENAPIC_32_H
2#define _ASM_GENAPIC_H 1 2#define ASM_X86__GENAPIC_32_H
3 3
4#include <asm/mpspec.h> 4#include <asm/mpspec.h>
5 5
@@ -121,4 +121,4 @@ enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
121#define uv_system_init() do {} while (0) 121#define uv_system_init() do {} while (0)
122 122
123 123
124#endif 124#endif /* ASM_X86__GENAPIC_32_H */
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h
index a47d63129135..ed6a4886c082 100644
--- a/include/asm-x86/genapic_64.h
+++ b/include/asm-x86/genapic_64.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_GENAPIC_H 1#ifndef ASM_X86__GENAPIC_64_H
2#define _ASM_GENAPIC_H 1 2#define ASM_X86__GENAPIC_64_H
3 3
4/* 4/*
5 * Copyright 2004 James Cleverdon, IBM. 5 * Copyright 2004 James Cleverdon, IBM.
@@ -14,6 +14,7 @@
14 14
15struct genapic { 15struct genapic {
16 char *name; 16 char *name;
17 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
17 u32 int_delivery_mode; 18 u32 int_delivery_mode;
18 u32 int_dest_mode; 19 u32 int_dest_mode;
19 int (*apic_id_registered)(void); 20 int (*apic_id_registered)(void);
@@ -24,17 +25,24 @@ struct genapic {
24 void (*send_IPI_mask)(cpumask_t mask, int vector); 25 void (*send_IPI_mask)(cpumask_t mask, int vector);
25 void (*send_IPI_allbutself)(int vector); 26 void (*send_IPI_allbutself)(int vector);
26 void (*send_IPI_all)(int vector); 27 void (*send_IPI_all)(int vector);
28 void (*send_IPI_self)(int vector);
27 /* */ 29 /* */
28 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); 30 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
29 unsigned int (*phys_pkg_id)(int index_msb); 31 unsigned int (*phys_pkg_id)(int index_msb);
32 unsigned int (*get_apic_id)(unsigned long x);
33 unsigned long (*set_apic_id)(unsigned int id);
34 unsigned long apic_id_mask;
30}; 35};
31 36
32extern struct genapic *genapic; 37extern struct genapic *genapic;
33 38
34extern struct genapic apic_flat; 39extern struct genapic apic_flat;
35extern struct genapic apic_physflat; 40extern struct genapic apic_physflat;
41extern struct genapic apic_x2apic_cluster;
42extern struct genapic apic_x2apic_phys;
36extern int acpi_madt_oem_check(char *, char *); 43extern int acpi_madt_oem_check(char *, char *);
37 44
45extern void apic_send_IPI_self(int vector);
38enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; 46enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
39extern enum uv_system_type get_uv_system_type(void); 47extern enum uv_system_type get_uv_system_type(void);
40extern int is_uv_system(void); 48extern int is_uv_system(void);
@@ -47,4 +55,4 @@ extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
47 55
48extern void setup_apic_routing(void); 56extern void setup_apic_routing(void);
49 57
50#endif 58#endif /* ASM_X86__GENAPIC_64_H */
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
index 2c1cda0b8a86..3f3444be2638 100644
--- a/include/asm-x86/geode.h
+++ b/include/asm-x86/geode.h
@@ -7,8 +7,8 @@
7 * as published by the Free Software Foundation. 7 * as published by the Free Software Foundation.
8 */ 8 */
9 9
10#ifndef _ASM_GEODE_H_ 10#ifndef ASM_X86__GEODE_H
11#define _ASM_GEODE_H_ 11#define ASM_X86__GEODE_H
12 12
13#include <asm/processor.h> 13#include <asm/processor.h>
14#include <linux/io.h> 14#include <linux/io.h>
@@ -250,4 +250,4 @@ extern int __init mfgpt_timer_setup(void);
250static inline int mfgpt_timer_setup(void) { return 0; } 250static inline int mfgpt_timer_setup(void) { return 0; }
251#endif 251#endif
252 252
253#endif 253#endif /* ASM_X86__GEODE_H */
diff --git a/include/asm-x86/gpio.h b/include/asm-x86/gpio.h
index c4c91b37c104..497fb980d962 100644
--- a/include/asm-x86/gpio.h
+++ b/include/asm-x86/gpio.h
@@ -53,4 +53,4 @@ static inline int irq_to_gpio(unsigned int irq)
53 53
54#endif /* CONFIG_GPIOLIB */ 54#endif /* CONFIG_GPIOLIB */
55 55
56#endif /* _ASM_I386_GPIO_H */ 56#endif /* ASM_X86__GPIO_H */
diff --git a/include/asm-x86/hardirq_32.h b/include/asm-x86/hardirq_32.h
index 4f85f0f4b563..700fe230d919 100644
--- a/include/asm-x86/hardirq_32.h
+++ b/include/asm-x86/hardirq_32.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_HARDIRQ_H 1#ifndef ASM_X86__HARDIRQ_32_H
2#define __ASM_HARDIRQ_H 2#define ASM_X86__HARDIRQ_32_H
3 3
4#include <linux/threads.h> 4#include <linux/threads.h>
5#include <linux/irq.h> 5#include <linux/irq.h>
@@ -25,4 +25,4 @@ DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
25void ack_bad_irq(unsigned int irq); 25void ack_bad_irq(unsigned int irq);
26#include <linux/irq_cpustat.h> 26#include <linux/irq_cpustat.h>
27 27
28#endif /* __ASM_HARDIRQ_H */ 28#endif /* ASM_X86__HARDIRQ_32_H */
diff --git a/include/asm-x86/hardirq_64.h b/include/asm-x86/hardirq_64.h
index 95d5e090ed89..f8bd2919a8ce 100644
--- a/include/asm-x86/hardirq_64.h
+++ b/include/asm-x86/hardirq_64.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_HARDIRQ_H 1#ifndef ASM_X86__HARDIRQ_64_H
2#define __ASM_HARDIRQ_H 2#define ASM_X86__HARDIRQ_64_H
3 3
4#include <linux/threads.h> 4#include <linux/threads.h>
5#include <linux/irq.h> 5#include <linux/irq.h>
@@ -20,4 +20,4 @@
20 20
21extern void ack_bad_irq(unsigned int irq); 21extern void ack_bad_irq(unsigned int irq);
22 22
23#endif /* __ASM_HARDIRQ_H */ 23#endif /* ASM_X86__HARDIRQ_64_H */
diff --git a/include/asm-x86/highmem.h b/include/asm-x86/highmem.h
index 4514b16cc723..bc3f6a280316 100644
--- a/include/asm-x86/highmem.h
+++ b/include/asm-x86/highmem.h
@@ -15,8 +15,8 @@
15 * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com> 15 * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
16 */ 16 */
17 17
18#ifndef _ASM_HIGHMEM_H 18#ifndef ASM_X86__HIGHMEM_H
19#define _ASM_HIGHMEM_H 19#define ASM_X86__HIGHMEM_H
20 20
21#ifdef __KERNEL__ 21#ifdef __KERNEL__
22 22
@@ -79,4 +79,4 @@ extern void add_highpages_with_active_regions(int nid, unsigned long start_pfn,
79 79
80#endif /* __KERNEL__ */ 80#endif /* __KERNEL__ */
81 81
82#endif /* _ASM_HIGHMEM_H */ 82#endif /* ASM_X86__HIGHMEM_H */
diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h
index 82f1ac641bd7..cbbbb6d4dd32 100644
--- a/include/asm-x86/hpet.h
+++ b/include/asm-x86/hpet.h
@@ -1,5 +1,5 @@
1#ifndef ASM_X86_HPET_H 1#ifndef ASM_X86__HPET_H
2#define ASM_X86_HPET_H 2#define ASM_X86__HPET_H
3 3
4#ifdef CONFIG_HPET_TIMER 4#ifdef CONFIG_HPET_TIMER
5 5
@@ -90,4 +90,4 @@ static inline int is_hpet_enabled(void) { return 0; }
90#define hpet_readl(a) 0 90#define hpet_readl(a) 0
91 91
92#endif 92#endif
93#endif /* ASM_X86_HPET_H */ 93#endif /* ASM_X86__HPET_H */
diff --git a/include/asm-x86/hugetlb.h b/include/asm-x86/hugetlb.h
index 439a9acc132d..0b7ec5dc0884 100644
--- a/include/asm-x86/hugetlb.h
+++ b/include/asm-x86/hugetlb.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_HUGETLB_H 1#ifndef ASM_X86__HUGETLB_H
2#define _ASM_X86_HUGETLB_H 2#define ASM_X86__HUGETLB_H
3 3
4#include <asm/page.h> 4#include <asm/page.h>
5 5
@@ -90,4 +90,4 @@ static inline void arch_release_hugepage(struct page *page)
90{ 90{
91} 91}
92 92
93#endif /* _ASM_X86_HUGETLB_H */ 93#endif /* ASM_X86__HUGETLB_H */
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h
index edd0b95f14d0..278571a64c0e 100644
--- a/include/asm-x86/hw_irq.h
+++ b/include/asm-x86/hw_irq.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_HW_IRQ_H 1#ifndef ASM_X86__HW_IRQ_H
2#define _ASM_HW_IRQ_H 2#define ASM_X86__HW_IRQ_H
3 3
4/* 4/*
5 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar 5 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
@@ -73,7 +73,9 @@ extern void enable_IO_APIC(void);
73#endif 73#endif
74 74
75/* IPI functions */ 75/* IPI functions */
76#ifdef CONFIG_X86_32
76extern void send_IPI_self(int vector); 77extern void send_IPI_self(int vector);
78#endif
77extern void send_IPI(int dest, int vector); 79extern void send_IPI(int dest, int vector);
78 80
79/* Statistics */ 81/* Statistics */
@@ -93,6 +95,26 @@ extern asmlinkage void qic_reschedule_interrupt(void);
93extern asmlinkage void qic_enable_irq_interrupt(void); 95extern asmlinkage void qic_enable_irq_interrupt(void);
94extern asmlinkage void qic_call_function_interrupt(void); 96extern asmlinkage void qic_call_function_interrupt(void);
95 97
98/* SMP */
99extern void smp_apic_timer_interrupt(struct pt_regs *);
100#ifdef CONFIG_X86_32
101extern void smp_spurious_interrupt(struct pt_regs *);
102extern void smp_error_interrupt(struct pt_regs *);
103#else
104extern asmlinkage void smp_spurious_interrupt(void);
105extern asmlinkage void smp_error_interrupt(void);
106#endif
107#ifdef CONFIG_X86_SMP
108extern void smp_reschedule_interrupt(struct pt_regs *);
109extern void smp_call_function_interrupt(struct pt_regs *);
110extern void smp_call_function_single_interrupt(struct pt_regs *);
111#ifdef CONFIG_X86_32
112extern void smp_invalidate_interrupt(struct pt_regs *);
113#else
114extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *);
115#endif
116#endif
117
96#ifdef CONFIG_X86_32 118#ifdef CONFIG_X86_32
97extern void (*const interrupt[NR_IRQS])(void); 119extern void (*const interrupt[NR_IRQS])(void);
98#else 120#else
@@ -112,4 +134,4 @@ static inline void __setup_vector_irq(int cpu) {}
112 134
113#endif /* !ASSEMBLY_ */ 135#endif /* !ASSEMBLY_ */
114 136
115#endif 137#endif /* ASM_X86__HW_IRQ_H */
diff --git a/include/asm-x86/hypertransport.h b/include/asm-x86/hypertransport.h
index d2bbd238b3e1..cc011a3bc1c2 100644
--- a/include/asm-x86/hypertransport.h
+++ b/include/asm-x86/hypertransport.h
@@ -1,5 +1,5 @@
1#ifndef ASM_HYPERTRANSPORT_H 1#ifndef ASM_X86__HYPERTRANSPORT_H
2#define ASM_HYPERTRANSPORT_H 2#define ASM_X86__HYPERTRANSPORT_H
3 3
4/* 4/*
5 * Constants for x86 Hypertransport Interrupts. 5 * Constants for x86 Hypertransport Interrupts.
@@ -42,4 +42,4 @@
42#define HT_IRQ_HIGH_DEST_ID(v) \ 42#define HT_IRQ_HIGH_DEST_ID(v) \
43 ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK) 43 ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK)
44 44
45#endif /* ASM_HYPERTRANSPORT_H */ 45#endif /* ASM_X86__HYPERTRANSPORT_H */
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
index 56d00e31aec0..9ba862a4eac0 100644
--- a/include/asm-x86/i387.h
+++ b/include/asm-x86/i387.h
@@ -7,8 +7,8 @@
7 * x86-64 work by Andi Kleen 2002 7 * x86-64 work by Andi Kleen 2002
8 */ 8 */
9 9
10#ifndef _ASM_X86_I387_H 10#ifndef ASM_X86__I387_H
11#define _ASM_X86_I387_H 11#define ASM_X86__I387_H
12 12
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
@@ -19,23 +19,32 @@
19#include <asm/sigcontext.h> 19#include <asm/sigcontext.h>
20#include <asm/user.h> 20#include <asm/user.h>
21#include <asm/uaccess.h> 21#include <asm/uaccess.h>
22#include <asm/xsave.h>
22 23
24extern unsigned int sig_xstate_size;
23extern void fpu_init(void); 25extern void fpu_init(void);
24extern void mxcsr_feature_mask_init(void); 26extern void mxcsr_feature_mask_init(void);
25extern int init_fpu(struct task_struct *child); 27extern int init_fpu(struct task_struct *child);
26extern asmlinkage void math_state_restore(void); 28extern asmlinkage void math_state_restore(void);
27extern void init_thread_xstate(void); 29extern void init_thread_xstate(void);
30extern int dump_fpu(struct pt_regs *, struct user_i387_struct *);
28 31
29extern user_regset_active_fn fpregs_active, xfpregs_active; 32extern user_regset_active_fn fpregs_active, xfpregs_active;
30extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get; 33extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get;
31extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set; 34extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set;
32 35
36extern struct _fpx_sw_bytes fx_sw_reserved;
33#ifdef CONFIG_IA32_EMULATION 37#ifdef CONFIG_IA32_EMULATION
38extern unsigned int sig_xstate_ia32_size;
39extern struct _fpx_sw_bytes fx_sw_reserved_ia32;
34struct _fpstate_ia32; 40struct _fpstate_ia32;
35extern int save_i387_ia32(struct _fpstate_ia32 __user *buf); 41struct _xstate_ia32;
36extern int restore_i387_ia32(struct _fpstate_ia32 __user *buf); 42extern int save_i387_xstate_ia32(void __user *buf);
43extern int restore_i387_xstate_ia32(void __user *buf);
37#endif 44#endif
38 45
46#define X87_FSW_ES (1 << 7) /* Exception Summary */
47
39#ifdef CONFIG_X86_64 48#ifdef CONFIG_X86_64
40 49
41/* Ignore delayed exceptions from user space */ 50/* Ignore delayed exceptions from user space */
@@ -46,7 +55,7 @@ static inline void tolerant_fwait(void)
46 _ASM_EXTABLE(1b, 2b)); 55 _ASM_EXTABLE(1b, 2b));
47} 56}
48 57
49static inline int restore_fpu_checking(struct i387_fxsave_struct *fx) 58static inline int fxrstor_checking(struct i387_fxsave_struct *fx)
50{ 59{
51 int err; 60 int err;
52 61
@@ -66,15 +75,31 @@ static inline int restore_fpu_checking(struct i387_fxsave_struct *fx)
66 return err; 75 return err;
67} 76}
68 77
69#define X87_FSW_ES (1 << 7) /* Exception Summary */ 78static inline int restore_fpu_checking(struct task_struct *tsk)
79{
80 if (task_thread_info(tsk)->status & TS_XSAVE)
81 return xrstor_checking(&tsk->thread.xstate->xsave);
82 else
83 return fxrstor_checking(&tsk->thread.xstate->fxsave);
84}
70 85
71/* AMD CPUs don't save/restore FDP/FIP/FOP unless an exception 86/* AMD CPUs don't save/restore FDP/FIP/FOP unless an exception
72 is pending. Clear the x87 state here by setting it to fixed 87 is pending. Clear the x87 state here by setting it to fixed
73 values. The kernel data segment can be sometimes 0 and sometimes 88 values. The kernel data segment can be sometimes 0 and sometimes
74 new user value. Both should be ok. 89 new user value. Both should be ok.
75 Use the PDA as safe address because it should be already in L1. */ 90 Use the PDA as safe address because it should be already in L1. */
76static inline void clear_fpu_state(struct i387_fxsave_struct *fx) 91static inline void clear_fpu_state(struct task_struct *tsk)
77{ 92{
93 struct xsave_struct *xstate = &tsk->thread.xstate->xsave;
94 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave;
95
96 /*
97 * xsave header may indicate the init state of the FP.
98 */
99 if ((task_thread_info(tsk)->status & TS_XSAVE) &&
100 !(xstate->xsave_hdr.xstate_bv & XSTATE_FP))
101 return;
102
78 if (unlikely(fx->swd & X87_FSW_ES)) 103 if (unlikely(fx->swd & X87_FSW_ES))
79 asm volatile("fnclex"); 104 asm volatile("fnclex");
80 alternative_input(ASM_NOP8 ASM_NOP2, 105 alternative_input(ASM_NOP8 ASM_NOP2,
@@ -83,7 +108,7 @@ static inline void clear_fpu_state(struct i387_fxsave_struct *fx)
83 X86_FEATURE_FXSAVE_LEAK); 108 X86_FEATURE_FXSAVE_LEAK);
84} 109}
85 110
86static inline int save_i387_checking(struct i387_fxsave_struct __user *fx) 111static inline int fxsave_user(struct i387_fxsave_struct __user *fx)
87{ 112{
88 int err; 113 int err;
89 114
@@ -107,7 +132,7 @@ static inline int save_i387_checking(struct i387_fxsave_struct __user *fx)
107 return err; 132 return err;
108} 133}
109 134
110static inline void __save_init_fpu(struct task_struct *tsk) 135static inline void fxsave(struct task_struct *tsk)
111{ 136{
112 /* Using "rex64; fxsave %0" is broken because, if the memory operand 137 /* Using "rex64; fxsave %0" is broken because, if the memory operand
113 uses any extended registers for addressing, a second REX prefix 138 uses any extended registers for addressing, a second REX prefix
@@ -132,7 +157,16 @@ static inline void __save_init_fpu(struct task_struct *tsk)
132 : "=m" (tsk->thread.xstate->fxsave) 157 : "=m" (tsk->thread.xstate->fxsave)
133 : "cdaSDb" (&tsk->thread.xstate->fxsave)); 158 : "cdaSDb" (&tsk->thread.xstate->fxsave));
134#endif 159#endif
135 clear_fpu_state(&tsk->thread.xstate->fxsave); 160}
161
162static inline void __save_init_fpu(struct task_struct *tsk)
163{
164 if (task_thread_info(tsk)->status & TS_XSAVE)
165 xsave(tsk);
166 else
167 fxsave(tsk);
168
169 clear_fpu_state(tsk);
136 task_thread_info(tsk)->status &= ~TS_USEDFPU; 170 task_thread_info(tsk)->status &= ~TS_USEDFPU;
137} 171}
138 172
@@ -147,6 +181,10 @@ static inline void tolerant_fwait(void)
147 181
148static inline void restore_fpu(struct task_struct *tsk) 182static inline void restore_fpu(struct task_struct *tsk)
149{ 183{
184 if (task_thread_info(tsk)->status & TS_XSAVE) {
185 xrstor_checking(&tsk->thread.xstate->xsave);
186 return;
187 }
150 /* 188 /*
151 * The "nop" is needed to make the instructions the same 189 * The "nop" is needed to make the instructions the same
152 * length. 190 * length.
@@ -172,6 +210,27 @@ static inline void restore_fpu(struct task_struct *tsk)
172 */ 210 */
173static inline void __save_init_fpu(struct task_struct *tsk) 211static inline void __save_init_fpu(struct task_struct *tsk)
174{ 212{
213 if (task_thread_info(tsk)->status & TS_XSAVE) {
214 struct xsave_struct *xstate = &tsk->thread.xstate->xsave;
215 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave;
216
217 xsave(tsk);
218
219 /*
220 * xsave header may indicate the init state of the FP.
221 */
222 if (!(xstate->xsave_hdr.xstate_bv & XSTATE_FP))
223 goto end;
224
225 if (unlikely(fx->swd & X87_FSW_ES))
226 asm volatile("fnclex");
227
228 /*
229 * we can do a simple return here or be paranoid :)
230 */
231 goto clear_state;
232 }
233
175 /* Use more nops than strictly needed in case the compiler 234 /* Use more nops than strictly needed in case the compiler
176 varies code */ 235 varies code */
177 alternative_input( 236 alternative_input(
@@ -181,6 +240,7 @@ static inline void __save_init_fpu(struct task_struct *tsk)
181 X86_FEATURE_FXSR, 240 X86_FEATURE_FXSR,
182 [fx] "m" (tsk->thread.xstate->fxsave), 241 [fx] "m" (tsk->thread.xstate->fxsave),
183 [fsw] "m" (tsk->thread.xstate->fxsave.swd) : "memory"); 242 [fsw] "m" (tsk->thread.xstate->fxsave.swd) : "memory");
243clear_state:
184 /* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception 244 /* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
185 is pending. Clear the x87 state here by setting it to fixed 245 is pending. Clear the x87 state here by setting it to fixed
186 values. safe_address is a random variable that should be in L1 */ 246 values. safe_address is a random variable that should be in L1 */
@@ -190,16 +250,17 @@ static inline void __save_init_fpu(struct task_struct *tsk)
190 "fildl %[addr]", /* set F?P to defined value */ 250 "fildl %[addr]", /* set F?P to defined value */
191 X86_FEATURE_FXSAVE_LEAK, 251 X86_FEATURE_FXSAVE_LEAK,
192 [addr] "m" (safe_address)); 252 [addr] "m" (safe_address));
253end:
193 task_thread_info(tsk)->status &= ~TS_USEDFPU; 254 task_thread_info(tsk)->status &= ~TS_USEDFPU;
194} 255}
195 256
257#endif /* CONFIG_X86_64 */
258
196/* 259/*
197 * Signal frame handlers... 260 * Signal frame handlers...
198 */ 261 */
199extern int save_i387(struct _fpstate __user *buf); 262extern int save_i387_xstate(void __user *buf);
200extern int restore_i387(struct _fpstate __user *buf); 263extern int restore_i387_xstate(void __user *buf);
201
202#endif /* CONFIG_X86_64 */
203 264
204static inline void __unlazy_fpu(struct task_struct *tsk) 265static inline void __unlazy_fpu(struct task_struct *tsk)
205{ 266{
@@ -336,4 +397,4 @@ static inline unsigned short get_fpu_mxcsr(struct task_struct *tsk)
336 } 397 }
337} 398}
338 399
339#endif /* _ASM_X86_I387_H */ 400#endif /* ASM_X86__I387_H */
diff --git a/include/asm-x86/i8253.h b/include/asm-x86/i8253.h
index b51c0487fc41..15a5b530044e 100644
--- a/include/asm-x86/i8253.h
+++ b/include/asm-x86/i8253.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_I8253_H__ 1#ifndef ASM_X86__I8253_H
2#define __ASM_I8253_H__ 2#define ASM_X86__I8253_H
3 3
4/* i8253A PIT registers */ 4/* i8253A PIT registers */
5#define PIT_MODE 0x43 5#define PIT_MODE 0x43
@@ -15,4 +15,4 @@ extern void setup_pit_timer(void);
15#define inb_pit inb_p 15#define inb_pit inb_p
16#define outb_pit outb_p 16#define outb_pit outb_p
17 17
18#endif /* __ASM_I8253_H__ */ 18#endif /* ASM_X86__I8253_H */
diff --git a/include/asm-x86/i8259.h b/include/asm-x86/i8259.h
index 2f98df91f1f2..23c1b3baaecd 100644
--- a/include/asm-x86/i8259.h
+++ b/include/asm-x86/i8259.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_I8259_H__ 1#ifndef ASM_X86__I8259_H
2#define __ASM_I8259_H__ 2#define ASM_X86__I8259_H
3 3
4#include <linux/delay.h> 4#include <linux/delay.h>
5 5
@@ -57,4 +57,7 @@ static inline void outb_pic(unsigned char value, unsigned int port)
57 57
58extern struct irq_chip i8259A_chip; 58extern struct irq_chip i8259A_chip;
59 59
60#endif /* __ASM_I8259_H__ */ 60extern void mask_8259A(void);
61extern void unmask_8259A(void);
62
63#endif /* ASM_X86__I8259_H */
diff --git a/include/asm-x86/ia32.h b/include/asm-x86/ia32.h
index 55d3abe5276f..f932f7ad51dd 100644
--- a/include/asm-x86/ia32.h
+++ b/include/asm-x86/ia32.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_64_IA32_H 1#ifndef ASM_X86__IA32_H
2#define _ASM_X86_64_IA32_H 2#define ASM_X86__IA32_H
3 3
4 4
5#ifdef CONFIG_IA32_EMULATION 5#ifdef CONFIG_IA32_EMULATION
@@ -167,4 +167,4 @@ extern void ia32_pick_mmap_layout(struct mm_struct *mm);
167 167
168#endif /* !CONFIG_IA32_SUPPORT */ 168#endif /* !CONFIG_IA32_SUPPORT */
169 169
170#endif 170#endif /* ASM_X86__IA32_H */
diff --git a/include/asm-x86/ia32_unistd.h b/include/asm-x86/ia32_unistd.h
index 61cea9e7c5c1..dbd887d8a5a5 100644
--- a/include/asm-x86/ia32_unistd.h
+++ b/include/asm-x86/ia32_unistd.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_64_IA32_UNISTD_H_ 1#ifndef ASM_X86__IA32_UNISTD_H
2#define _ASM_X86_64_IA32_UNISTD_H_ 2#define ASM_X86__IA32_UNISTD_H
3 3
4/* 4/*
5 * This file contains the system call numbers of the ia32 port, 5 * This file contains the system call numbers of the ia32 port,
@@ -15,4 +15,4 @@
15#define __NR_ia32_sigreturn 119 15#define __NR_ia32_sigreturn 119
16#define __NR_ia32_rt_sigreturn 173 16#define __NR_ia32_rt_sigreturn 173
17 17
18#endif /* _ASM_X86_64_IA32_UNISTD_H_ */ 18#endif /* ASM_X86__IA32_UNISTD_H */
diff --git a/include/asm-x86/idle.h b/include/asm-x86/idle.h
index d240e5b30a45..dc9c7944847b 100644
--- a/include/asm-x86/idle.h
+++ b/include/asm-x86/idle.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_64_IDLE_H 1#ifndef ASM_X86__IDLE_H
2#define _ASM_X86_64_IDLE_H 1 2#define ASM_X86__IDLE_H
3 3
4#define IDLE_START 1 4#define IDLE_START 1
5#define IDLE_END 2 5#define IDLE_END 2
@@ -10,4 +10,4 @@ void idle_notifier_register(struct notifier_block *n);
10void enter_idle(void); 10void enter_idle(void);
11void exit_idle(void); 11void exit_idle(void);
12 12
13#endif 13#endif /* ASM_X86__IDLE_H */
diff --git a/include/asm-x86/intel_arch_perfmon.h b/include/asm-x86/intel_arch_perfmon.h
index fa0fd068bc2e..07c03c6c9a16 100644
--- a/include/asm-x86/intel_arch_perfmon.h
+++ b/include/asm-x86/intel_arch_perfmon.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_INTEL_ARCH_PERFMON_H 1#ifndef ASM_X86__INTEL_ARCH_PERFMON_H
2#define _ASM_X86_INTEL_ARCH_PERFMON_H 2#define ASM_X86__INTEL_ARCH_PERFMON_H
3 3
4#define MSR_ARCH_PERFMON_PERFCTR0 0xc1 4#define MSR_ARCH_PERFMON_PERFCTR0 0xc1
5#define MSR_ARCH_PERFMON_PERFCTR1 0xc2 5#define MSR_ARCH_PERFMON_PERFCTR1 0xc2
@@ -28,4 +28,4 @@ union cpuid10_eax {
28 unsigned int full; 28 unsigned int full;
29}; 29};
30 30
31#endif /* _ASM_X86_INTEL_ARCH_PERFMON_H */ 31#endif /* ASM_X86__INTEL_ARCH_PERFMON_H */
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h
index 0f954dc89cb3..72b7719523bf 100644
--- a/include/asm-x86/io.h
+++ b/include/asm-x86/io.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_IO_H 1#ifndef ASM_X86__IO_H
2#define _ASM_X86_IO_H 2#define ASM_X86__IO_H
3 3
4#define ARCH_HAS_IOREMAP_WC 4#define ARCH_HAS_IOREMAP_WC
5 5
@@ -73,6 +73,8 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
73#define writeq writeq 73#define writeq writeq
74#endif 74#endif
75 75
76extern int iommu_bio_merge;
77
76#ifdef CONFIG_X86_32 78#ifdef CONFIG_X86_32
77# include "io_32.h" 79# include "io_32.h"
78#else 80#else
@@ -99,4 +101,4 @@ extern void early_iounmap(void *addr, unsigned long size);
99extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); 101extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
100 102
101 103
102#endif /* _ASM_X86_IO_H */ 104#endif /* ASM_X86__IO_H */
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h
index e876d89ac156..4f7d878bda18 100644
--- a/include/asm-x86/io_32.h
+++ b/include/asm-x86/io_32.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_IO_H 1#ifndef ASM_X86__IO_32_H
2#define _ASM_IO_H 2#define ASM_X86__IO_32_H
3 3
4#include <linux/string.h> 4#include <linux/string.h>
5#include <linux/compiler.h> 5#include <linux/compiler.h>
@@ -281,4 +281,4 @@ BUILDIO(b, b, char)
281BUILDIO(w, w, short) 281BUILDIO(w, w, short)
282BUILDIO(l, , int) 282BUILDIO(l, , int)
283 283
284#endif 284#endif /* ASM_X86__IO_32_H */
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h
index 22995c5c5adc..64429e9431a8 100644
--- a/include/asm-x86/io_64.h
+++ b/include/asm-x86/io_64.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_IO_H 1#ifndef ASM_X86__IO_64_H
2#define _ASM_IO_H 2#define ASM_X86__IO_64_H
3 3
4 4
5/* 5/*
@@ -235,7 +235,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c);
235 235
236#define flush_write_buffers() 236#define flush_write_buffers()
237 237
238extern int iommu_bio_merge;
239#define BIO_VMERGE_BOUNDARY iommu_bio_merge 238#define BIO_VMERGE_BOUNDARY iommu_bio_merge
240 239
241/* 240/*
@@ -245,4 +244,4 @@ extern int iommu_bio_merge;
245 244
246#endif /* __KERNEL__ */ 245#endif /* __KERNEL__ */
247 246
248#endif 247#endif /* ASM_X86__IO_64_H */
diff --git a/include/asm-x86/io_apic.h b/include/asm-x86/io_apic.h
index 14f82bbcb5fd..8ec68a50cf10 100644
--- a/include/asm-x86/io_apic.h
+++ b/include/asm-x86/io_apic.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_IO_APIC_H 1#ifndef ASM_X86__IO_APIC_H
2#define __ASM_IO_APIC_H 2#define ASM_X86__IO_APIC_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <asm/mpspec.h> 5#include <asm/mpspec.h>
@@ -107,6 +107,20 @@ struct IO_APIC_route_entry {
107 107
108} __attribute__ ((packed)); 108} __attribute__ ((packed));
109 109
110struct IR_IO_APIC_route_entry {
111 __u64 vector : 8,
112 zero : 3,
113 index2 : 1,
114 delivery_status : 1,
115 polarity : 1,
116 irr : 1,
117 trigger : 1,
118 mask : 1,
119 reserved : 31,
120 format : 1,
121 index : 15;
122} __attribute__ ((packed));
123
110#ifdef CONFIG_X86_IO_APIC 124#ifdef CONFIG_X86_IO_APIC
111 125
112/* 126/*
@@ -183,10 +197,16 @@ extern int io_apic_set_pci_routing(int ioapic, int pin, int irq,
183extern int (*ioapic_renumber_irq)(int ioapic, int irq); 197extern int (*ioapic_renumber_irq)(int ioapic, int irq);
184extern void ioapic_init_mappings(void); 198extern void ioapic_init_mappings(void);
185 199
200#ifdef CONFIG_X86_64
201extern int save_mask_IO_APIC_setup(void);
202extern void restore_IO_APIC_setup(void);
203extern void reinit_intr_remapped_IO_APIC(int);
204#endif
205
186#else /* !CONFIG_X86_IO_APIC */ 206#else /* !CONFIG_X86_IO_APIC */
187#define io_apic_assign_pci_irqs 0 207#define io_apic_assign_pci_irqs 0
188static const int timer_through_8259 = 0; 208static const int timer_through_8259 = 0;
189static inline void ioapic_init_mappings(void) { } 209static inline void ioapic_init_mappings(void) { }
190#endif 210#endif
191 211
192#endif 212#endif /* ASM_X86__IO_APIC_H */
diff --git a/include/asm-x86/ioctls.h b/include/asm-x86/ioctls.h
index c0c338bd4068..336603512399 100644
--- a/include/asm-x86/ioctls.h
+++ b/include/asm-x86/ioctls.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_IOCTLS_H 1#ifndef ASM_X86__IOCTLS_H
2#define _ASM_X86_IOCTLS_H 2#define ASM_X86__IOCTLS_H
3 3
4#include <asm/ioctl.h> 4#include <asm/ioctl.h>
5 5
@@ -85,4 +85,4 @@
85 85
86#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 86#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
87 87
88#endif 88#endif /* ASM_X86__IOCTLS_H */
diff --git a/include/asm-x86/iommu.h b/include/asm-x86/iommu.h
index 5f888cc5be49..e86f44148c66 100644
--- a/include/asm-x86/iommu.h
+++ b/include/asm-x86/iommu.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X8664_IOMMU_H 1#ifndef ASM_X86__IOMMU_H
2#define _ASM_X8664_IOMMU_H 1 2#define ASM_X86__IOMMU_H
3 3
4extern void pci_iommu_shutdown(void); 4extern void pci_iommu_shutdown(void);
5extern void no_iommu_init(void); 5extern void no_iommu_init(void);
@@ -42,4 +42,4 @@ static inline void gart_iommu_hole_init(void)
42} 42}
43#endif 43#endif
44 44
45#endif 45#endif /* ASM_X86__IOMMU_H */
diff --git a/include/asm-x86/ipcbuf.h b/include/asm-x86/ipcbuf.h
index ee678fd51594..910304fbdc8f 100644
--- a/include/asm-x86/ipcbuf.h
+++ b/include/asm-x86/ipcbuf.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_IPCBUF_H 1#ifndef ASM_X86__IPCBUF_H
2#define _ASM_X86_IPCBUF_H 2#define ASM_X86__IPCBUF_H
3 3
4/* 4/*
5 * The ipc64_perm structure for x86 architecture. 5 * The ipc64_perm structure for x86 architecture.
@@ -25,4 +25,4 @@ struct ipc64_perm {
25 unsigned long __unused2; 25 unsigned long __unused2;
26}; 26};
27 27
28#endif /* _ASM_X86_IPCBUF_H */ 28#endif /* ASM_X86__IPCBUF_H */
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h
index bb1c09f7a76c..30a692cfaff8 100644
--- a/include/asm-x86/ipi.h
+++ b/include/asm-x86/ipi.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_IPI_H 1#ifndef ASM_X86__IPI_H
2#define __ASM_IPI_H 2#define ASM_X86__IPI_H
3 3
4/* 4/*
5 * Copyright 2004 James Cleverdon, IBM. 5 * Copyright 2004 James Cleverdon, IBM.
@@ -49,6 +49,12 @@ static inline int __prepare_ICR2(unsigned int mask)
49 return SET_APIC_DEST_FIELD(mask); 49 return SET_APIC_DEST_FIELD(mask);
50} 50}
51 51
52static inline void __xapic_wait_icr_idle(void)
53{
54 while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY)
55 cpu_relax();
56}
57
52static inline void __send_IPI_shortcut(unsigned int shortcut, int vector, 58static inline void __send_IPI_shortcut(unsigned int shortcut, int vector,
53 unsigned int dest) 59 unsigned int dest)
54{ 60{
@@ -64,7 +70,7 @@ static inline void __send_IPI_shortcut(unsigned int shortcut, int vector,
64 /* 70 /*
65 * Wait for idle. 71 * Wait for idle.
66 */ 72 */
67 apic_wait_icr_idle(); 73 __xapic_wait_icr_idle();
68 74
69 /* 75 /*
70 * No need to touch the target chip field 76 * No need to touch the target chip field
@@ -74,7 +80,7 @@ static inline void __send_IPI_shortcut(unsigned int shortcut, int vector,
74 /* 80 /*
75 * Send the IPI. The write to APIC_ICR fires this off. 81 * Send the IPI. The write to APIC_ICR fires this off.
76 */ 82 */
77 apic_write(APIC_ICR, cfg); 83 native_apic_mem_write(APIC_ICR, cfg);
78} 84}
79 85
80/* 86/*
@@ -92,13 +98,13 @@ static inline void __send_IPI_dest_field(unsigned int mask, int vector,
92 if (unlikely(vector == NMI_VECTOR)) 98 if (unlikely(vector == NMI_VECTOR))
93 safe_apic_wait_icr_idle(); 99 safe_apic_wait_icr_idle();
94 else 100 else
95 apic_wait_icr_idle(); 101 __xapic_wait_icr_idle();
96 102
97 /* 103 /*
98 * prepare target chip field 104 * prepare target chip field
99 */ 105 */
100 cfg = __prepare_ICR2(mask); 106 cfg = __prepare_ICR2(mask);
101 apic_write(APIC_ICR2, cfg); 107 native_apic_mem_write(APIC_ICR2, cfg);
102 108
103 /* 109 /*
104 * program the ICR 110 * program the ICR
@@ -108,7 +114,7 @@ static inline void __send_IPI_dest_field(unsigned int mask, int vector,
108 /* 114 /*
109 * Send the IPI. The write to APIC_ICR fires this off. 115 * Send the IPI. The write to APIC_ICR fires this off.
110 */ 116 */
111 apic_write(APIC_ICR, cfg); 117 native_apic_mem_write(APIC_ICR, cfg);
112} 118}
113 119
114static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) 120static inline void send_IPI_mask_sequence(cpumask_t mask, int vector)
@@ -129,4 +135,4 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector)
129 local_irq_restore(flags); 135 local_irq_restore(flags);
130} 136}
131 137
132#endif /* __ASM_IPI_H */ 138#endif /* ASM_X86__IPI_H */
diff --git a/include/asm-x86/irq.h b/include/asm-x86/irq.h
index 1a2925757317..1e5f2909c1db 100644
--- a/include/asm-x86/irq.h
+++ b/include/asm-x86/irq.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_IRQ_H 1#ifndef ASM_X86__IRQ_H
2#define _ASM_IRQ_H 2#define ASM_X86__IRQ_H
3/* 3/*
4 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar 4 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
5 * 5 *
@@ -47,4 +47,4 @@ extern void native_init_IRQ(void);
47/* Interrupt vector management */ 47/* Interrupt vector management */
48extern DECLARE_BITMAP(used_vectors, NR_VECTORS); 48extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
49 49
50#endif /* _ASM_IRQ_H */ 50#endif /* ASM_X86__IRQ_H */
diff --git a/include/asm-x86/irq_regs_32.h b/include/asm-x86/irq_regs_32.h
index 3368b20c0b48..316a3b258871 100644
--- a/include/asm-x86/irq_regs_32.h
+++ b/include/asm-x86/irq_regs_32.h
@@ -4,8 +4,8 @@
4 * 4 *
5 * Jeremy Fitzhardinge <jeremy@goop.org> 5 * Jeremy Fitzhardinge <jeremy@goop.org>
6 */ 6 */
7#ifndef _ASM_I386_IRQ_REGS_H 7#ifndef ASM_X86__IRQ_REGS_32_H
8#define _ASM_I386_IRQ_REGS_H 8#define ASM_X86__IRQ_REGS_32_H
9 9
10#include <asm/percpu.h> 10#include <asm/percpu.h>
11 11
@@ -26,4 +26,4 @@ static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
26 return old_regs; 26 return old_regs;
27} 27}
28 28
29#endif /* _ASM_I386_IRQ_REGS_H */ 29#endif /* ASM_X86__IRQ_REGS_32_H */
diff --git a/include/asm-x86/irq_remapping.h b/include/asm-x86/irq_remapping.h
new file mode 100644
index 000000000000..78242c6ffa58
--- /dev/null
+++ b/include/asm-x86/irq_remapping.h
@@ -0,0 +1,8 @@
1#ifndef _ASM_IRQ_REMAPPING_H
2#define _ASM_IRQ_REMAPPING_H
3
4extern int x2apic;
5
6#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8)
7
8#endif
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h
index a48c7f2dbdc0..c5d2d767a1f3 100644
--- a/include/asm-x86/irq_vectors.h
+++ b/include/asm-x86/irq_vectors.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_IRQ_VECTORS_H 1#ifndef ASM_X86__IRQ_VECTORS_H
2#define _ASM_IRQ_VECTORS_H 2#define ASM_X86__IRQ_VECTORS_H
3 3
4#include <linux/threads.h> 4#include <linux/threads.h>
5 5
@@ -179,4 +179,4 @@
179#define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8) 179#define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8)
180 180
181 181
182#endif /* _ASM_IRQ_VECTORS_H */ 182#endif /* ASM_X86__IRQ_VECTORS_H */
diff --git a/include/asm-x86/ist.h b/include/asm-x86/ist.h
index 6ec6ceed95a7..35a2fe9bc921 100644
--- a/include/asm-x86/ist.h
+++ b/include/asm-x86/ist.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_IST_H 1#ifndef ASM_X86__IST_H
2#define _ASM_IST_H 2#define ASM_X86__IST_H
3 3
4/* 4/*
5 * Include file for the interface to IST BIOS 5 * Include file for the interface to IST BIOS
@@ -31,4 +31,4 @@ struct ist_info {
31extern struct ist_info ist_info; 31extern struct ist_info ist_info;
32 32
33#endif /* __KERNEL__ */ 33#endif /* __KERNEL__ */
34#endif /* _ASM_IST_H */ 34#endif /* ASM_X86__IST_H */
diff --git a/include/asm-x86/k8.h b/include/asm-x86/k8.h
index 452e2b696ff4..2bbaf4370a55 100644
--- a/include/asm-x86/k8.h
+++ b/include/asm-x86/k8.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_K8_H 1#ifndef ASM_X86__K8_H
2#define _ASM_K8_H 1 2#define ASM_X86__K8_H
3 3
4#include <linux/pci.h> 4#include <linux/pci.h>
5 5
@@ -12,4 +12,4 @@ extern int cache_k8_northbridges(void);
12extern void k8_flush_garts(void); 12extern void k8_flush_garts(void);
13extern int k8_scan_nodes(unsigned long start, unsigned long end); 13extern int k8_scan_nodes(unsigned long start, unsigned long end);
14 14
15#endif 15#endif /* ASM_X86__K8_H */
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
index 96651bb59ba1..5ec3ad3e825c 100644
--- a/include/asm-x86/kdebug.h
+++ b/include/asm-x86/kdebug.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_KDEBUG_H 1#ifndef ASM_X86__KDEBUG_H
2#define _ASM_X86_KDEBUG_H 2#define ASM_X86__KDEBUG_H
3 3
4#include <linux/notifier.h> 4#include <linux/notifier.h>
5 5
@@ -35,4 +35,4 @@ extern void show_regs(struct pt_regs *regs);
35extern unsigned long oops_begin(void); 35extern unsigned long oops_begin(void);
36extern void oops_end(unsigned long, struct pt_regs *, int signr); 36extern void oops_end(unsigned long, struct pt_regs *, int signr);
37 37
38#endif 38#endif /* ASM_X86__KDEBUG_H */
diff --git a/include/asm-x86/kexec.h b/include/asm-x86/kexec.h
index 4246ab7dc988..ea09600d6129 100644
--- a/include/asm-x86/kexec.h
+++ b/include/asm-x86/kexec.h
@@ -1,5 +1,5 @@
1#ifndef _KEXEC_H 1#ifndef ASM_X86__KEXEC_H
2#define _KEXEC_H 2#define ASM_X86__KEXEC_H
3 3
4#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
5# define PA_CONTROL_PAGE 0 5# define PA_CONTROL_PAGE 0
@@ -172,4 +172,4 @@ relocate_kernel(unsigned long indirection_page,
172 172
173#endif /* __ASSEMBLY__ */ 173#endif /* __ASSEMBLY__ */
174 174
175#endif /* _KEXEC_H */ 175#endif /* ASM_X86__KEXEC_H */
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h
index 484c47554f3b..83a7ee228ab1 100644
--- a/include/asm-x86/kgdb.h
+++ b/include/asm-x86/kgdb.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_KGDB_H_ 1#ifndef ASM_X86__KGDB_H
2#define _ASM_KGDB_H_ 2#define ASM_X86__KGDB_H
3 3
4/* 4/*
5 * Copyright (C) 2001-2004 Amit S. Kale 5 * Copyright (C) 2001-2004 Amit S. Kale
@@ -78,4 +78,4 @@ static inline void arch_kgdb_breakpoint(void)
78#define BREAK_INSTR_SIZE 1 78#define BREAK_INSTR_SIZE 1
79#define CACHE_FLUSH_IS_SAFE 1 79#define CACHE_FLUSH_IS_SAFE 1
80 80
81#endif /* _ASM_KGDB_H_ */ 81#endif /* ASM_X86__KGDB_H */
diff --git a/include/asm-x86/kmap_types.h b/include/asm-x86/kmap_types.h
index 5f4174132a22..89f44493e643 100644
--- a/include/asm-x86/kmap_types.h
+++ b/include/asm-x86/kmap_types.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_KMAP_TYPES_H 1#ifndef ASM_X86__KMAP_TYPES_H
2#define _ASM_X86_KMAP_TYPES_H 2#define ASM_X86__KMAP_TYPES_H
3 3
4#if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM) 4#if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM)
5# define D(n) __KM_FENCE_##n , 5# define D(n) __KM_FENCE_##n ,
@@ -26,4 +26,4 @@ D(13) KM_TYPE_NR
26 26
27#undef D 27#undef D
28 28
29#endif 29#endif /* ASM_X86__KMAP_TYPES_H */
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h
index 54980b0b3892..bd8407863c13 100644
--- a/include/asm-x86/kprobes.h
+++ b/include/asm-x86/kprobes.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_KPROBES_H 1#ifndef ASM_X86__KPROBES_H
2#define _ASM_KPROBES_H 2#define ASM_X86__KPROBES_H
3/* 3/*
4 * Kernel Probes (KProbes) 4 * Kernel Probes (KProbes)
5 * 5 *
@@ -94,4 +94,4 @@ static inline void restore_interrupts(struct pt_regs *regs)
94extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); 94extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
95extern int kprobe_exceptions_notify(struct notifier_block *self, 95extern int kprobe_exceptions_notify(struct notifier_block *self,
96 unsigned long val, void *data); 96 unsigned long val, void *data);
97#endif /* _ASM_KPROBES_H */ 97#endif /* ASM_X86__KPROBES_H */
diff --git a/include/asm-x86/kvm.h b/include/asm-x86/kvm.h
index 6f1840812e59..78e954db1e7f 100644
--- a/include/asm-x86/kvm.h
+++ b/include/asm-x86/kvm.h
@@ -1,5 +1,5 @@
1#ifndef __LINUX_KVM_X86_H 1#ifndef ASM_X86__KVM_H
2#define __LINUX_KVM_X86_H 2#define ASM_X86__KVM_H
3 3
4/* 4/*
5 * KVM x86 specific structures and definitions 5 * KVM x86 specific structures and definitions
@@ -230,4 +230,4 @@ struct kvm_pit_state {
230#define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) 230#define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14)
231#define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) 231#define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15)
232 232
233#endif 233#endif /* ASM_X86__KVM_H */
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index c2e34c275900..69794547f514 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -1,4 +1,4 @@
1#/* 1/*
2 * Kernel-based Virtual Machine driver for Linux 2 * Kernel-based Virtual Machine driver for Linux
3 * 3 *
4 * This header defines architecture specific interfaces, x86 version 4 * This header defines architecture specific interfaces, x86 version
@@ -8,8 +8,8 @@
8 * 8 *
9 */ 9 */
10 10
11#ifndef ASM_KVM_HOST_H 11#ifndef ASM_X86__KVM_HOST_H
12#define ASM_KVM_HOST_H 12#define ASM_X86__KVM_HOST_H
13 13
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
@@ -735,4 +735,4 @@ asmlinkage void kvm_handle_fault_on_reboot(void);
735int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); 735int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
736int kvm_age_hva(struct kvm *kvm, unsigned long hva); 736int kvm_age_hva(struct kvm *kvm, unsigned long hva);
737 737
738#endif 738#endif /* ASM_X86__KVM_HOST_H */
diff --git a/include/asm-x86/kvm_para.h b/include/asm-x86/kvm_para.h
index 76f392146daa..30054fded4fb 100644
--- a/include/asm-x86/kvm_para.h
+++ b/include/asm-x86/kvm_para.h
@@ -1,5 +1,5 @@
1#ifndef __X86_KVM_PARA_H 1#ifndef ASM_X86__KVM_PARA_H
2#define __X86_KVM_PARA_H 2#define ASM_X86__KVM_PARA_H
3 3
4/* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It 4/* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It
5 * should be used to determine that a VM is running under KVM. 5 * should be used to determine that a VM is running under KVM.
@@ -144,4 +144,4 @@ static inline unsigned int kvm_arch_para_features(void)
144 144
145#endif 145#endif
146 146
147#endif 147#endif /* ASM_X86__KVM_PARA_H */
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h
index 4e8c1e48d91d..e2d9b030c1ac 100644
--- a/include/asm-x86/kvm_x86_emulate.h
+++ b/include/asm-x86/kvm_x86_emulate.h
@@ -8,8 +8,8 @@
8 * From: xen-unstable 10676:af9809f51f81a3c43f276f00c81a52ef558afda4 8 * From: xen-unstable 10676:af9809f51f81a3c43f276f00c81a52ef558afda4
9 */ 9 */
10 10
11#ifndef __X86_EMULATE_H__ 11#ifndef ASM_X86__KVM_X86_EMULATE_H
12#define __X86_EMULATE_H__ 12#define ASM_X86__KVM_X86_EMULATE_H
13 13
14struct x86_emulate_ctxt; 14struct x86_emulate_ctxt;
15 15
@@ -181,4 +181,4 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt,
181int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, 181int x86_emulate_insn(struct x86_emulate_ctxt *ctxt,
182 struct x86_emulate_ops *ops); 182 struct x86_emulate_ops *ops);
183 183
184#endif /* __X86_EMULATE_H__ */ 184#endif /* ASM_X86__KVM_X86_EMULATE_H */
diff --git a/include/asm-x86/ldt.h b/include/asm-x86/ldt.h
index 20c597242b53..a5228504d867 100644
--- a/include/asm-x86/ldt.h
+++ b/include/asm-x86/ldt.h
@@ -3,8 +3,8 @@
3 * 3 *
4 * Definitions of structures used with the modify_ldt system call. 4 * Definitions of structures used with the modify_ldt system call.
5 */ 5 */
6#ifndef _ASM_X86_LDT_H 6#ifndef ASM_X86__LDT_H
7#define _ASM_X86_LDT_H 7#define ASM_X86__LDT_H
8 8
9/* Maximum number of LDT entries supported. */ 9/* Maximum number of LDT entries supported. */
10#define LDT_ENTRIES 8192 10#define LDT_ENTRIES 8192
@@ -37,4 +37,4 @@ struct user_desc {
37#define MODIFY_LDT_CONTENTS_CODE 2 37#define MODIFY_LDT_CONTENTS_CODE 2
38 38
39#endif /* !__ASSEMBLY__ */ 39#endif /* !__ASSEMBLY__ */
40#endif 40#endif /* ASM_X86__LDT_H */
diff --git a/include/asm-x86/lguest.h b/include/asm-x86/lguest.h
index be4a7247fa2b..7505e947ed27 100644
--- a/include/asm-x86/lguest.h
+++ b/include/asm-x86/lguest.h
@@ -1,5 +1,5 @@
1#ifndef _X86_LGUEST_H 1#ifndef ASM_X86__LGUEST_H
2#define _X86_LGUEST_H 2#define ASM_X86__LGUEST_H
3 3
4#define GDT_ENTRY_LGUEST_CS 10 4#define GDT_ENTRY_LGUEST_CS 10
5#define GDT_ENTRY_LGUEST_DS 11 5#define GDT_ENTRY_LGUEST_DS 11
@@ -91,4 +91,4 @@ static inline void lguest_set_ts(void)
91 91
92#endif /* __ASSEMBLY__ */ 92#endif /* __ASSEMBLY__ */
93 93
94#endif 94#endif /* ASM_X86__LGUEST_H */
diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h
index a3241f28e34a..8f034ba4b53e 100644
--- a/include/asm-x86/lguest_hcall.h
+++ b/include/asm-x86/lguest_hcall.h
@@ -1,6 +1,6 @@
1/* Architecture specific portion of the lguest hypercalls */ 1/* Architecture specific portion of the lguest hypercalls */
2#ifndef _X86_LGUEST_HCALL_H 2#ifndef ASM_X86__LGUEST_HCALL_H
3#define _X86_LGUEST_HCALL_H 3#define ASM_X86__LGUEST_HCALL_H
4 4
5#define LHCALL_FLUSH_ASYNC 0 5#define LHCALL_FLUSH_ASYNC 0
6#define LHCALL_LGUEST_INIT 1 6#define LHCALL_LGUEST_INIT 1
@@ -68,4 +68,4 @@ struct hcall_args {
68}; 68};
69 69
70#endif /* !__ASSEMBLY__ */ 70#endif /* !__ASSEMBLY__ */
71#endif /* _I386_LGUEST_HCALL_H */ 71#endif /* ASM_X86__LGUEST_HCALL_H */
diff --git a/include/asm-x86/linkage.h b/include/asm-x86/linkage.h
index 64e444f8e85b..42d8b62ee8ab 100644
--- a/include/asm-x86/linkage.h
+++ b/include/asm-x86/linkage.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_LINKAGE_H 1#ifndef ASM_X86__LINKAGE_H
2#define __ASM_LINKAGE_H 2#define ASM_X86__LINKAGE_H
3 3
4#undef notrace 4#undef notrace
5#define notrace __attribute__((no_instrument_function)) 5#define notrace __attribute__((no_instrument_function))
@@ -57,5 +57,5 @@
57#define __ALIGN_STR ".align 16,0x90" 57#define __ALIGN_STR ".align 16,0x90"
58#endif 58#endif
59 59
60#endif 60#endif /* ASM_X86__LINKAGE_H */
61 61
diff --git a/include/asm-x86/local.h b/include/asm-x86/local.h
index 330a72496abd..ae91994fd6c9 100644
--- a/include/asm-x86/local.h
+++ b/include/asm-x86/local.h
@@ -1,5 +1,5 @@
1#ifndef _ARCH_LOCAL_H 1#ifndef ASM_X86__LOCAL_H
2#define _ARCH_LOCAL_H 2#define ASM_X86__LOCAL_H
3 3
4#include <linux/percpu.h> 4#include <linux/percpu.h>
5 5
@@ -232,4 +232,4 @@ static inline long local_sub_return(long i, local_t *l)
232#define __cpu_local_add(i, l) cpu_local_add((i), (l)) 232#define __cpu_local_add(i, l) cpu_local_add((i), (l))
233#define __cpu_local_sub(i, l) cpu_local_sub((i), (l)) 233#define __cpu_local_sub(i, l) cpu_local_sub((i), (l))
234 234
235#endif /* _ARCH_LOCAL_H */ 235#endif /* ASM_X86__LOCAL_H */
diff --git a/include/asm-x86/mach-bigsmp/mach_apicdef.h b/include/asm-x86/mach-bigsmp/mach_apicdef.h
deleted file mode 100644
index a58ab5a75c8c..000000000000
--- a/include/asm-x86/mach-bigsmp/mach_apicdef.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ASM_MACH_APICDEF_H
2#define __ASM_MACH_APICDEF_H
3
4#define APIC_ID_MASK (0xFF<<24)
5
6static inline unsigned get_apic_id(unsigned long x)
7{
8 return (((x)>>24)&0xFF);
9}
10
11#define GET_APIC_ID(x) get_apic_id(x)
12
13#endif
diff --git a/include/asm-x86/mach-default/apm.h b/include/asm-x86/mach-default/apm.h
index 989f34c37d32..2aa61b54fbd5 100644
--- a/include/asm-x86/mach-default/apm.h
+++ b/include/asm-x86/mach-default/apm.h
@@ -3,8 +3,8 @@
3 * Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp> 3 * Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp>
4 */ 4 */
5 5
6#ifndef _ASM_APM_H 6#ifndef ASM_X86__MACH_DEFAULT__APM_H
7#define _ASM_APM_H 7#define ASM_X86__MACH_DEFAULT__APM_H
8 8
9#ifdef APM_ZERO_SEGS 9#ifdef APM_ZERO_SEGS
10# define APM_DO_ZERO_SEGS \ 10# define APM_DO_ZERO_SEGS \
@@ -70,4 +70,4 @@ static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
70 return error; 70 return error;
71} 71}
72 72
73#endif /* _ASM_APM_H */ 73#endif /* ASM_X86__MACH_DEFAULT__APM_H */
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h
index f3226b9a6b82..2a330a41b3dd 100644
--- a/include/asm-x86/mach-default/mach_apic.h
+++ b/include/asm-x86/mach-default/mach_apic.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_APIC_H 1#ifndef ASM_X86__MACH_DEFAULT__MACH_APIC_H
2#define __ASM_MACH_APIC_H 2#define ASM_X86__MACH_DEFAULT__MACH_APIC_H
3 3
4#ifdef CONFIG_X86_LOCAL_APIC 4#ifdef CONFIG_X86_LOCAL_APIC
5 5
@@ -30,6 +30,8 @@ static inline cpumask_t target_cpus(void)
30#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid) 30#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
31#define phys_pkg_id (genapic->phys_pkg_id) 31#define phys_pkg_id (genapic->phys_pkg_id)
32#define vector_allocation_domain (genapic->vector_allocation_domain) 32#define vector_allocation_domain (genapic->vector_allocation_domain)
33#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID)))
34#define send_IPI_self (genapic->send_IPI_self)
33extern void setup_apic_routing(void); 35extern void setup_apic_routing(void);
34#else 36#else
35#define INT_DELIVERY_MODE dest_LowestPrio 37#define INT_DELIVERY_MODE dest_LowestPrio
@@ -54,7 +56,7 @@ static inline void init_apic_ldr(void)
54 56
55static inline int apic_id_registered(void) 57static inline int apic_id_registered(void)
56{ 58{
57 return physid_isset(GET_APIC_ID(read_apic_id()), phys_cpu_present_map); 59 return physid_isset(read_apic_id(), phys_cpu_present_map);
58} 60}
59 61
60static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask) 62static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
@@ -138,4 +140,4 @@ static inline void enable_apic_mode(void)
138} 140}
139 141
140#endif /* CONFIG_X86_LOCAL_APIC */ 142#endif /* CONFIG_X86_LOCAL_APIC */
141#endif /* __ASM_MACH_APIC_H */ 143#endif /* ASM_X86__MACH_DEFAULT__MACH_APIC_H */
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h
index e4b29ba37de6..0c2d41c41b20 100644
--- a/include/asm-x86/mach-default/mach_apicdef.h
+++ b/include/asm-x86/mach-default/mach_apicdef.h
@@ -1,12 +1,12 @@
1#ifndef __ASM_MACH_APICDEF_H 1#ifndef ASM_X86__MACH_DEFAULT__MACH_APICDEF_H
2#define __ASM_MACH_APICDEF_H 2#define ASM_X86__MACH_DEFAULT__MACH_APICDEF_H
3 3
4#include <asm/apic.h> 4#include <asm/apic.h>
5 5
6#ifdef CONFIG_X86_64 6#ifdef CONFIG_X86_64
7#define APIC_ID_MASK (0xFFu<<24) 7#define APIC_ID_MASK (genapic->apic_id_mask)
8#define GET_APIC_ID(x) (((x)>>24)&0xFFu) 8#define GET_APIC_ID(x) (genapic->get_apic_id(x))
9#define SET_APIC_ID(x) (((x)<<24)) 9#define SET_APIC_ID(x) (genapic->set_apic_id(x))
10#else 10#else
11#define APIC_ID_MASK (0xF<<24) 11#define APIC_ID_MASK (0xF<<24)
12static inline unsigned get_apic_id(unsigned long x) 12static inline unsigned get_apic_id(unsigned long x)
@@ -21,4 +21,4 @@ static inline unsigned get_apic_id(unsigned long x)
21#define GET_APIC_ID(x) get_apic_id(x) 21#define GET_APIC_ID(x) get_apic_id(x)
22#endif 22#endif
23 23
24#endif 24#endif /* ASM_X86__MACH_DEFAULT__MACH_APICDEF_H */
diff --git a/include/asm-x86/mach-default/mach_ipi.h b/include/asm-x86/mach-default/mach_ipi.h
index be323364e68f..674bc7e50c35 100644
--- a/include/asm-x86/mach-default/mach_ipi.h
+++ b/include/asm-x86/mach-default/mach_ipi.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_IPI_H 1#ifndef ASM_X86__MACH_DEFAULT__MACH_IPI_H
2#define __ASM_MACH_IPI_H 2#define ASM_X86__MACH_DEFAULT__MACH_IPI_H
3 3
4/* Avoid include hell */ 4/* Avoid include hell */
5#define NMI_VECTOR 0x02 5#define NMI_VECTOR 0x02
@@ -61,4 +61,4 @@ static inline void send_IPI_all(int vector)
61} 61}
62#endif 62#endif
63 63
64#endif /* __ASM_MACH_IPI_H */ 64#endif /* ASM_X86__MACH_DEFAULT__MACH_IPI_H */
diff --git a/include/asm-x86/mach-default/mach_mpparse.h b/include/asm-x86/mach-default/mach_mpparse.h
index d14108505bb8..9c381f2815ac 100644
--- a/include/asm-x86/mach-default/mach_mpparse.h
+++ b/include/asm-x86/mach-default/mach_mpparse.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_MPPARSE_H 1#ifndef ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H
2#define __ASM_MACH_MPPARSE_H 2#define ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H
3 3
4static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, 4static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
5 char *productid) 5 char *productid)
@@ -14,4 +14,4 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
14} 14}
15 15
16 16
17#endif /* __ASM_MACH_MPPARSE_H */ 17#endif /* ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H */
diff --git a/include/asm-x86/mach-default/mach_mpspec.h b/include/asm-x86/mach-default/mach_mpspec.h
index 51c9a9775932..d77646f011f1 100644
--- a/include/asm-x86/mach-default/mach_mpspec.h
+++ b/include/asm-x86/mach-default/mach_mpspec.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_MPSPEC_H 1#ifndef ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H
2#define __ASM_MACH_MPSPEC_H 2#define ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H
3 3
4#define MAX_IRQ_SOURCES 256 4#define MAX_IRQ_SOURCES 256
5 5
@@ -9,4 +9,4 @@
9#define MAX_MP_BUSSES 32 9#define MAX_MP_BUSSES 32
10#endif 10#endif
11 11
12#endif /* __ASM_MACH_MPSPEC_H */ 12#endif /* ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H */
diff --git a/include/asm-x86/mach-default/mach_timer.h b/include/asm-x86/mach-default/mach_timer.h
index 4b76e536cd98..990b15833834 100644
--- a/include/asm-x86/mach-default/mach_timer.h
+++ b/include/asm-x86/mach-default/mach_timer.h
@@ -10,8 +10,8 @@
10 * directly because of the awkward 8-bit access mechanism of the 82C54 10 * directly because of the awkward 8-bit access mechanism of the 82C54
11 * device. 11 * device.
12 */ 12 */
13#ifndef _MACH_TIMER_H 13#ifndef ASM_X86__MACH_DEFAULT__MACH_TIMER_H
14#define _MACH_TIMER_H 14#define ASM_X86__MACH_DEFAULT__MACH_TIMER_H
15 15
16#define CALIBRATE_TIME_MSEC 30 /* 30 msecs */ 16#define CALIBRATE_TIME_MSEC 30 /* 30 msecs */
17#define CALIBRATE_LATCH \ 17#define CALIBRATE_LATCH \
@@ -45,4 +45,4 @@ static inline void mach_countup(unsigned long *count_p)
45 *count_p = count; 45 *count_p = count;
46} 46}
47 47
48#endif /* !_MACH_TIMER_H */ 48#endif /* ASM_X86__MACH_DEFAULT__MACH_TIMER_H */
diff --git a/include/asm-x86/mach-default/mach_traps.h b/include/asm-x86/mach-default/mach_traps.h
index 2fe7705c0484..de9ac3f5c4ce 100644
--- a/include/asm-x86/mach-default/mach_traps.h
+++ b/include/asm-x86/mach-default/mach_traps.h
@@ -2,8 +2,8 @@
2 * Machine specific NMI handling for generic. 2 * Machine specific NMI handling for generic.
3 * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp> 3 * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp>
4 */ 4 */
5#ifndef _MACH_TRAPS_H 5#ifndef ASM_X86__MACH_DEFAULT__MACH_TRAPS_H
6#define _MACH_TRAPS_H 6#define ASM_X86__MACH_DEFAULT__MACH_TRAPS_H
7 7
8#include <asm/mc146818rtc.h> 8#include <asm/mc146818rtc.h>
9 9
@@ -36,4 +36,4 @@ static inline void reassert_nmi(void)
36 unlock_cmos(); 36 unlock_cmos();
37} 37}
38 38
39#endif /* !_MACH_TRAPS_H */ 39#endif /* ASM_X86__MACH_DEFAULT__MACH_TRAPS_H */
diff --git a/include/asm-x86/mach-default/mach_wakecpu.h b/include/asm-x86/mach-default/mach_wakecpu.h
index 3ebb17893aa5..361b810f5160 100644
--- a/include/asm-x86/mach-default/mach_wakecpu.h
+++ b/include/asm-x86/mach-default/mach_wakecpu.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_WAKECPU_H 1#ifndef ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H
2#define __ASM_MACH_WAKECPU_H 2#define ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H
3 3
4/* 4/*
5 * This file copes with machines that wakeup secondary CPUs by the 5 * This file copes with machines that wakeup secondary CPUs by the
@@ -39,4 +39,4 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
39 #define inquire_remote_apic(apicid) {} 39 #define inquire_remote_apic(apicid) {}
40#endif 40#endif
41 41
42#endif /* __ASM_MACH_WAKECPU_H */ 42#endif /* ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H */
diff --git a/include/asm-x86/mach-generic/gpio.h b/include/asm-x86/mach-generic/gpio.h
index 5305dcb96df2..6ce0f7786ef8 100644
--- a/include/asm-x86/mach-generic/gpio.h
+++ b/include/asm-x86/mach-generic/gpio.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_GENERIC_GPIO_H 1#ifndef ASM_X86__MACH_GENERIC__GPIO_H
2#define __ASM_MACH_GENERIC_GPIO_H 2#define ASM_X86__MACH_GENERIC__GPIO_H
3 3
4int gpio_request(unsigned gpio, const char *label); 4int gpio_request(unsigned gpio, const char *label);
5void gpio_free(unsigned gpio); 5void gpio_free(unsigned gpio);
@@ -12,4 +12,4 @@ int irq_to_gpio(unsigned irq);
12 12
13#include <asm-generic/gpio.h> /* cansleep wrappers */ 13#include <asm-generic/gpio.h> /* cansleep wrappers */
14 14
15#endif /* __ASM_MACH_GENERIC_GPIO_H */ 15#endif /* ASM_X86__MACH_GENERIC__GPIO_H */
diff --git a/include/asm-x86/mach-generic/irq_vectors_limits.h b/include/asm-x86/mach-generic/irq_vectors_limits.h
index 890ce3f5e09a..f7870e1a220d 100644
--- a/include/asm-x86/mach-generic/irq_vectors_limits.h
+++ b/include/asm-x86/mach-generic/irq_vectors_limits.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_IRQ_VECTORS_LIMITS_H 1#ifndef ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H
2#define _ASM_IRQ_VECTORS_LIMITS_H 2#define ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H
3 3
4/* 4/*
5 * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs, 5 * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs,
@@ -11,4 +11,4 @@
11#define NR_IRQS 224 11#define NR_IRQS 224
12#define NR_IRQ_VECTORS 1024 12#define NR_IRQ_VECTORS 1024
13 13
14#endif /* _ASM_IRQ_VECTORS_LIMITS_H */ 14#endif /* ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H */
diff --git a/include/asm-x86/mach-generic/mach_apic.h b/include/asm-x86/mach-generic/mach_apic.h
index 6eff343e1233..5d010c6881dd 100644
--- a/include/asm-x86/mach-generic/mach_apic.h
+++ b/include/asm-x86/mach-generic/mach_apic.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_APIC_H 1#ifndef ASM_X86__MACH_GENERIC__MACH_APIC_H
2#define __ASM_MACH_APIC_H 2#define ASM_X86__MACH_GENERIC__MACH_APIC_H
3 3
4#include <asm/genapic.h> 4#include <asm/genapic.h>
5 5
@@ -29,4 +29,4 @@
29 29
30extern void generic_bigsmp_probe(void); 30extern void generic_bigsmp_probe(void);
31 31
32#endif /* __ASM_MACH_APIC_H */ 32#endif /* ASM_X86__MACH_GENERIC__MACH_APIC_H */
diff --git a/include/asm-x86/mach-generic/mach_apicdef.h b/include/asm-x86/mach-generic/mach_apicdef.h
index 28ed98972ca8..1657f38b8f27 100644
--- a/include/asm-x86/mach-generic/mach_apicdef.h
+++ b/include/asm-x86/mach-generic/mach_apicdef.h
@@ -1,5 +1,5 @@
1#ifndef _GENAPIC_MACH_APICDEF_H 1#ifndef ASM_X86__MACH_GENERIC__MACH_APICDEF_H
2#define _GENAPIC_MACH_APICDEF_H 1 2#define ASM_X86__MACH_GENERIC__MACH_APICDEF_H
3 3
4#ifndef APIC_DEFINITION 4#ifndef APIC_DEFINITION
5#include <asm/genapic.h> 5#include <asm/genapic.h>
@@ -8,4 +8,4 @@
8#define APIC_ID_MASK (genapic->apic_id_mask) 8#define APIC_ID_MASK (genapic->apic_id_mask)
9#endif 9#endif
10 10
11#endif 11#endif /* ASM_X86__MACH_GENERIC__MACH_APICDEF_H */
diff --git a/include/asm-x86/mach-generic/mach_ipi.h b/include/asm-x86/mach-generic/mach_ipi.h
index 441b0fe3ed1d..f67433dbd65f 100644
--- a/include/asm-x86/mach-generic/mach_ipi.h
+++ b/include/asm-x86/mach-generic/mach_ipi.h
@@ -1,5 +1,5 @@
1#ifndef _MACH_IPI_H 1#ifndef ASM_X86__MACH_GENERIC__MACH_IPI_H
2#define _MACH_IPI_H 1 2#define ASM_X86__MACH_GENERIC__MACH_IPI_H
3 3
4#include <asm/genapic.h> 4#include <asm/genapic.h>
5 5
@@ -7,4 +7,4 @@
7#define send_IPI_allbutself (genapic->send_IPI_allbutself) 7#define send_IPI_allbutself (genapic->send_IPI_allbutself)
8#define send_IPI_all (genapic->send_IPI_all) 8#define send_IPI_all (genapic->send_IPI_all)
9 9
10#endif 10#endif /* ASM_X86__MACH_GENERIC__MACH_IPI_H */
diff --git a/include/asm-x86/mach-generic/mach_mpparse.h b/include/asm-x86/mach-generic/mach_mpparse.h
index 586cadbf3787..3115564e557c 100644
--- a/include/asm-x86/mach-generic/mach_mpparse.h
+++ b/include/asm-x86/mach-generic/mach_mpparse.h
@@ -1,5 +1,5 @@
1#ifndef _MACH_MPPARSE_H 1#ifndef ASM_X86__MACH_GENERIC__MACH_MPPARSE_H
2#define _MACH_MPPARSE_H 1 2#define ASM_X86__MACH_GENERIC__MACH_MPPARSE_H
3 3
4 4
5extern int mps_oem_check(struct mp_config_table *mpc, char *oem, 5extern int mps_oem_check(struct mp_config_table *mpc, char *oem,
@@ -7,4 +7,4 @@ extern int mps_oem_check(struct mp_config_table *mpc, char *oem,
7 7
8extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id); 8extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id);
9 9
10#endif 10#endif /* ASM_X86__MACH_GENERIC__MACH_MPPARSE_H */
diff --git a/include/asm-x86/mach-generic/mach_mpspec.h b/include/asm-x86/mach-generic/mach_mpspec.h
index c83c120be538..6061b153613e 100644
--- a/include/asm-x86/mach-generic/mach_mpspec.h
+++ b/include/asm-x86/mach-generic/mach_mpspec.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_MPSPEC_H 1#ifndef ASM_X86__MACH_GENERIC__MACH_MPSPEC_H
2#define __ASM_MACH_MPSPEC_H 2#define ASM_X86__MACH_GENERIC__MACH_MPSPEC_H
3 3
4#define MAX_IRQ_SOURCES 256 4#define MAX_IRQ_SOURCES 256
5 5
@@ -9,4 +9,4 @@
9 9
10extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, 10extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem,
11 char *productid); 11 char *productid);
12#endif /* __ASM_MACH_MPSPEC_H */ 12#endif /* ASM_X86__MACH_GENERIC__MACH_MPSPEC_H */
diff --git a/include/asm-x86/mach-rdc321x/gpio.h b/include/asm-x86/mach-rdc321x/gpio.h
index acce0b7d397b..6184561980f2 100644
--- a/include/asm-x86/mach-rdc321x/gpio.h
+++ b/include/asm-x86/mach-rdc321x/gpio.h
@@ -1,5 +1,5 @@
1#ifndef _RDC321X_GPIO_H 1#ifndef ASM_X86__MACH_RDC321X__GPIO_H
2#define _RDC321X_GPIO_H 2#define ASM_X86__MACH_RDC321X__GPIO_H
3 3
4extern int rdc_gpio_get_value(unsigned gpio); 4extern int rdc_gpio_get_value(unsigned gpio);
5extern void rdc_gpio_set_value(unsigned gpio, int value); 5extern void rdc_gpio_set_value(unsigned gpio, int value);
@@ -54,4 +54,4 @@ static inline int irq_to_gpio(unsigned irq)
54/* For cansleep */ 54/* For cansleep */
55#include <asm-generic/gpio.h> 55#include <asm-generic/gpio.h>
56 56
57#endif /* _RDC321X_GPIO_H_ */ 57#endif /* ASM_X86__MACH_RDC321X__GPIO_H */
diff --git a/include/asm-x86/mach-summit/mach_apicdef.h b/include/asm-x86/mach-summit/mach_apicdef.h
deleted file mode 100644
index a58ab5a75c8c..000000000000
--- a/include/asm-x86/mach-summit/mach_apicdef.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ASM_MACH_APICDEF_H
2#define __ASM_MACH_APICDEF_H
3
4#define APIC_ID_MASK (0xFF<<24)
5
6static inline unsigned get_apic_id(unsigned long x)
7{
8 return (((x)>>24)&0xFF);
9}
10
11#define GET_APIC_ID(x) get_apic_id(x)
12
13#endif
diff --git a/include/asm-x86/math_emu.h b/include/asm-x86/math_emu.h
index 9bf4ae93ab10..5768d8e95c8c 100644
--- a/include/asm-x86/math_emu.h
+++ b/include/asm-x86/math_emu.h
@@ -1,5 +1,5 @@
1#ifndef _I386_MATH_EMU_H 1#ifndef ASM_X86__MATH_EMU_H
2#define _I386_MATH_EMU_H 2#define ASM_X86__MATH_EMU_H
3 3
4/* This structure matches the layout of the data saved to the stack 4/* This structure matches the layout of the data saved to the stack
5 following a device-not-present interrupt, part of it saved 5 following a device-not-present interrupt, part of it saved
@@ -28,4 +28,4 @@ struct info {
28 long ___vm86_fs; 28 long ___vm86_fs;
29 long ___vm86_gs; 29 long ___vm86_gs;
30}; 30};
31#endif 31#endif /* ASM_X86__MATH_EMU_H */
diff --git a/include/asm-x86/mc146818rtc.h b/include/asm-x86/mc146818rtc.h
index daf1ccde77af..a995f33176cd 100644
--- a/include/asm-x86/mc146818rtc.h
+++ b/include/asm-x86/mc146818rtc.h
@@ -1,8 +1,8 @@
1/* 1/*
2 * Machine dependent access functions for RTC registers. 2 * Machine dependent access functions for RTC registers.
3 */ 3 */
4#ifndef _ASM_MC146818RTC_H 4#ifndef ASM_X86__MC146818RTC_H
5#define _ASM_MC146818RTC_H 5#define ASM_X86__MC146818RTC_H
6 6
7#include <asm/io.h> 7#include <asm/io.h>
8#include <asm/system.h> 8#include <asm/system.h>
@@ -101,4 +101,4 @@ extern unsigned long mach_get_cmos_time(void);
101 101
102#define RTC_IRQ 8 102#define RTC_IRQ 8
103 103
104#endif /* _ASM_MC146818RTC_H */ 104#endif /* ASM_X86__MC146818RTC_H */
diff --git a/include/asm-x86/mca.h b/include/asm-x86/mca.h
index 09adf2eac4dc..60d1ed287b13 100644
--- a/include/asm-x86/mca.h
+++ b/include/asm-x86/mca.h
@@ -1,8 +1,8 @@
1/* -*- mode: c; c-basic-offset: 8 -*- */ 1/* -*- mode: c; c-basic-offset: 8 -*- */
2 2
3/* Platform specific MCA defines */ 3/* Platform specific MCA defines */
4#ifndef _ASM_MCA_H 4#ifndef ASM_X86__MCA_H
5#define _ASM_MCA_H 5#define ASM_X86__MCA_H
6 6
7/* Maximal number of MCA slots - actually, some machines have less, but 7/* Maximal number of MCA slots - actually, some machines have less, but
8 * they all have sufficient number of POS registers to cover 8. 8 * they all have sufficient number of POS registers to cover 8.
@@ -40,4 +40,4 @@
40 */ 40 */
41#define MCA_NUMADAPTERS (MCA_MAX_SLOT_NR+3) 41#define MCA_NUMADAPTERS (MCA_MAX_SLOT_NR+3)
42 42
43#endif 43#endif /* ASM_X86__MCA_H */
diff --git a/include/asm-x86/mca_dma.h b/include/asm-x86/mca_dma.h
index c3dca6edc6b1..49f22be237d2 100644
--- a/include/asm-x86/mca_dma.h
+++ b/include/asm-x86/mca_dma.h
@@ -1,5 +1,5 @@
1#ifndef MCA_DMA_H 1#ifndef ASM_X86__MCA_DMA_H
2#define MCA_DMA_H 2#define ASM_X86__MCA_DMA_H
3 3
4#include <asm/io.h> 4#include <asm/io.h>
5#include <linux/ioport.h> 5#include <linux/ioport.h>
@@ -198,4 +198,4 @@ static inline void mca_set_dma_mode(unsigned int dmanr, unsigned int mode)
198 outb(mode, MCA_DMA_REG_EXE); 198 outb(mode, MCA_DMA_REG_EXE);
199} 199}
200 200
201#endif /* MCA_DMA_H */ 201#endif /* ASM_X86__MCA_DMA_H */
diff --git a/include/asm-x86/mce.h b/include/asm-x86/mce.h
index 531eaa587455..036133eaf744 100644
--- a/include/asm-x86/mce.h
+++ b/include/asm-x86/mce.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_MCE_H 1#ifndef ASM_X86__MCE_H
2#define _ASM_X86_MCE_H 2#define ASM_X86__MCE_H
3 3
4#ifdef __x86_64__ 4#ifdef __x86_64__
5 5
@@ -127,4 +127,4 @@ extern void restart_mce(void);
127 127
128#endif /* __KERNEL__ */ 128#endif /* __KERNEL__ */
129 129
130#endif 130#endif /* ASM_X86__MCE_H */
diff --git a/include/asm-x86/mman.h b/include/asm-x86/mman.h
index 90bc4108a4fd..4ef28e6de383 100644
--- a/include/asm-x86/mman.h
+++ b/include/asm-x86/mman.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_MMAN_H 1#ifndef ASM_X86__MMAN_H
2#define _ASM_X86_MMAN_H 2#define ASM_X86__MMAN_H
3 3
4#include <asm-generic/mman.h> 4#include <asm-generic/mman.h>
5 5
@@ -17,4 +17,4 @@
17#define MCL_CURRENT 1 /* lock all current mappings */ 17#define MCL_CURRENT 1 /* lock all current mappings */
18#define MCL_FUTURE 2 /* lock all future mappings */ 18#define MCL_FUTURE 2 /* lock all future mappings */
19 19
20#endif /* _ASM_X86_MMAN_H */ 20#endif /* ASM_X86__MMAN_H */
diff --git a/include/asm-x86/mmconfig.h b/include/asm-x86/mmconfig.h
index e293ab81e850..fb79b1cf5d07 100644
--- a/include/asm-x86/mmconfig.h
+++ b/include/asm-x86/mmconfig.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_MMCONFIG_H 1#ifndef ASM_X86__MMCONFIG_H
2#define _ASM_MMCONFIG_H 2#define ASM_X86__MMCONFIG_H
3 3
4#ifdef CONFIG_PCI_MMCONFIG 4#ifdef CONFIG_PCI_MMCONFIG
5extern void __cpuinit fam10h_check_enable_mmcfg(void); 5extern void __cpuinit fam10h_check_enable_mmcfg(void);
@@ -9,4 +9,4 @@ static inline void fam10h_check_enable_mmcfg(void) { }
9static inline void check_enable_amd_mmconf_dmi(void) { } 9static inline void check_enable_amd_mmconf_dmi(void) { }
10#endif 10#endif
11 11
12#endif 12#endif /* ASM_X86__MMCONFIG_H */
diff --git a/include/asm-x86/mmu.h b/include/asm-x86/mmu.h
index 00e88679e11f..a30d7a9c8297 100644
--- a/include/asm-x86/mmu.h
+++ b/include/asm-x86/mmu.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_MMU_H 1#ifndef ASM_X86__MMU_H
2#define _ASM_X86_MMU_H 2#define ASM_X86__MMU_H
3 3
4#include <linux/spinlock.h> 4#include <linux/spinlock.h>
5#include <linux/mutex.h> 5#include <linux/mutex.h>
@@ -28,4 +28,4 @@ static inline void leave_mm(int cpu)
28} 28}
29#endif 29#endif
30 30
31#endif /* _ASM_X86_MMU_H */ 31#endif /* ASM_X86__MMU_H */
diff --git a/include/asm-x86/mmu_context.h b/include/asm-x86/mmu_context.h
index fac57014e7c6..8ec940bfd079 100644
--- a/include/asm-x86/mmu_context.h
+++ b/include/asm-x86/mmu_context.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_X86_MMU_CONTEXT_H 1#ifndef ASM_X86__MMU_CONTEXT_H
2#define __ASM_X86_MMU_CONTEXT_H 2#define ASM_X86__MMU_CONTEXT_H
3 3
4#include <asm/desc.h> 4#include <asm/desc.h>
5#include <asm/atomic.h> 5#include <asm/atomic.h>
@@ -34,4 +34,4 @@ do { \
34} while (0); 34} while (0);
35 35
36 36
37#endif /* __ASM_X86_MMU_CONTEXT_H */ 37#endif /* ASM_X86__MMU_CONTEXT_H */
diff --git a/include/asm-x86/mmu_context_32.h b/include/asm-x86/mmu_context_32.h
index 824fc575c6d8..cce6f6e4afd6 100644
--- a/include/asm-x86/mmu_context_32.h
+++ b/include/asm-x86/mmu_context_32.h
@@ -1,5 +1,5 @@
1#ifndef __I386_SCHED_H 1#ifndef ASM_X86__MMU_CONTEXT_32_H
2#define __I386_SCHED_H 2#define ASM_X86__MMU_CONTEXT_32_H
3 3
4static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 4static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
5{ 5{
@@ -53,4 +53,4 @@ static inline void switch_mm(struct mm_struct *prev,
53#define deactivate_mm(tsk, mm) \ 53#define deactivate_mm(tsk, mm) \
54 asm("movl %0,%%gs": :"r" (0)); 54 asm("movl %0,%%gs": :"r" (0));
55 55
56#endif 56#endif /* ASM_X86__MMU_CONTEXT_32_H */
diff --git a/include/asm-x86/mmu_context_64.h b/include/asm-x86/mmu_context_64.h
index c7000634ccae..26758673c828 100644
--- a/include/asm-x86/mmu_context_64.h
+++ b/include/asm-x86/mmu_context_64.h
@@ -1,5 +1,5 @@
1#ifndef __X86_64_MMU_CONTEXT_H 1#ifndef ASM_X86__MMU_CONTEXT_64_H
2#define __X86_64_MMU_CONTEXT_H 2#define ASM_X86__MMU_CONTEXT_64_H
3 3
4#include <asm/pda.h> 4#include <asm/pda.h>
5 5
@@ -51,4 +51,4 @@ do { \
51 asm volatile("movl %0,%%fs"::"r"(0)); \ 51 asm volatile("movl %0,%%fs"::"r"(0)); \
52} while (0) 52} while (0)
53 53
54#endif 54#endif /* ASM_X86__MMU_CONTEXT_64_H */
diff --git a/include/asm-x86/mmx.h b/include/asm-x86/mmx.h
index 940881218ff8..2e7299bb3653 100644
--- a/include/asm-x86/mmx.h
+++ b/include/asm-x86/mmx.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_MMX_H 1#ifndef ASM_X86__MMX_H
2#define _ASM_MMX_H 2#define ASM_X86__MMX_H
3 3
4/* 4/*
5 * MMX 3Dnow! helper operations 5 * MMX 3Dnow! helper operations
@@ -11,4 +11,4 @@ extern void *_mmx_memcpy(void *to, const void *from, size_t size);
11extern void mmx_clear_page(void *page); 11extern void mmx_clear_page(void *page);
12extern void mmx_copy_page(void *to, void *from); 12extern void mmx_copy_page(void *to, void *from);
13 13
14#endif 14#endif /* ASM_X86__MMX_H */
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h
index 5862e6460658..121b65d61d86 100644
--- a/include/asm-x86/mmzone_32.h
+++ b/include/asm-x86/mmzone_32.h
@@ -3,8 +3,8 @@
3 * 3 *
4 */ 4 */
5 5
6#ifndef _ASM_MMZONE_H_ 6#ifndef ASM_X86__MMZONE_32_H
7#define _ASM_MMZONE_H_ 7#define ASM_X86__MMZONE_32_H
8 8
9#include <asm/smp.h> 9#include <asm/smp.h>
10 10
@@ -131,4 +131,4 @@ static inline int pfn_valid(int pfn)
131}) 131})
132#endif /* CONFIG_NEED_MULTIPLE_NODES */ 132#endif /* CONFIG_NEED_MULTIPLE_NODES */
133 133
134#endif /* _ASM_MMZONE_H_ */ 134#endif /* ASM_X86__MMZONE_32_H */
diff --git a/include/asm-x86/mmzone_64.h b/include/asm-x86/mmzone_64.h
index 594bd0dc1d08..626b03a14875 100644
--- a/include/asm-x86/mmzone_64.h
+++ b/include/asm-x86/mmzone_64.h
@@ -1,8 +1,8 @@
1/* K8 NUMA support */ 1/* K8 NUMA support */
2/* Copyright 2002,2003 by Andi Kleen, SuSE Labs */ 2/* Copyright 2002,2003 by Andi Kleen, SuSE Labs */
3/* 2.5 Version loosely based on the NUMAQ Code by Pat Gaughen. */ 3/* 2.5 Version loosely based on the NUMAQ Code by Pat Gaughen. */
4#ifndef _ASM_X86_64_MMZONE_H 4#ifndef ASM_X86__MMZONE_64_H
5#define _ASM_X86_64_MMZONE_H 1 5#define ASM_X86__MMZONE_64_H
6 6
7 7
8#ifdef CONFIG_NUMA 8#ifdef CONFIG_NUMA
@@ -49,4 +49,4 @@ extern int early_pfn_to_nid(unsigned long pfn);
49#endif 49#endif
50 50
51#endif 51#endif
52#endif 52#endif /* ASM_X86__MMZONE_64_H */
diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h
index bfedb247871c..48dc3e0c07d9 100644
--- a/include/asm-x86/module.h
+++ b/include/asm-x86/module.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_MODULE_H 1#ifndef ASM_X86__MODULE_H
2#define _ASM_MODULE_H 2#define ASM_X86__MODULE_H
3 3
4/* x86_32/64 are simple */ 4/* x86_32/64 are simple */
5struct mod_arch_specific {}; 5struct mod_arch_specific {};
@@ -79,4 +79,4 @@ struct mod_arch_specific {};
79# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE 79# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE
80#endif 80#endif
81 81
82#endif /* _ASM_MODULE_H */ 82#endif /* ASM_X86__MODULE_H */
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h
index b6995e567fcc..118da365e371 100644
--- a/include/asm-x86/mpspec.h
+++ b/include/asm-x86/mpspec.h
@@ -1,5 +1,5 @@
1#ifndef _AM_X86_MPSPEC_H 1#ifndef ASM_X86__MPSPEC_H
2#define _AM_X86_MPSPEC_H 2#define ASM_X86__MPSPEC_H
3 3
4#include <linux/init.h> 4#include <linux/init.h>
5 5
@@ -141,4 +141,4 @@ static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map)
141 141
142extern physid_mask_t phys_cpu_present_map; 142extern physid_mask_t phys_cpu_present_map;
143 143
144#endif 144#endif /* ASM_X86__MPSPEC_H */
diff --git a/include/asm-x86/mpspec_def.h b/include/asm-x86/mpspec_def.h
index 38d1e73b49e4..79166b048012 100644
--- a/include/asm-x86/mpspec_def.h
+++ b/include/asm-x86/mpspec_def.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MPSPEC_DEF_H 1#ifndef ASM_X86__MPSPEC_DEF_H
2#define __ASM_MPSPEC_DEF_H 2#define ASM_X86__MPSPEC_DEF_H
3 3
4/* 4/*
5 * Structure definitions for SMP machines following the 5 * Structure definitions for SMP machines following the
@@ -177,4 +177,4 @@ enum mp_bustype {
177 MP_BUS_PCI, 177 MP_BUS_PCI,
178 MP_BUS_MCA, 178 MP_BUS_MCA,
179}; 179};
180#endif 180#endif /* ASM_X86__MPSPEC_DEF_H */
diff --git a/include/asm-x86/msgbuf.h b/include/asm-x86/msgbuf.h
index 7e4e9481f51c..1b538c907a3d 100644
--- a/include/asm-x86/msgbuf.h
+++ b/include/asm-x86/msgbuf.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_MSGBUF_H 1#ifndef ASM_X86__MSGBUF_H
2#define _ASM_X86_MSGBUF_H 2#define ASM_X86__MSGBUF_H
3 3
4/* 4/*
5 * The msqid64_ds structure for i386 architecture. 5 * The msqid64_ds structure for i386 architecture.
@@ -36,4 +36,4 @@ struct msqid64_ds {
36 unsigned long __unused5; 36 unsigned long __unused5;
37}; 37};
38 38
39#endif /* _ASM_X86_MSGBUF_H */ 39#endif /* ASM_X86__MSGBUF_H */
diff --git a/include/asm-x86/msidef.h b/include/asm-x86/msidef.h
index 296f29ce426d..ed9190246876 100644
--- a/include/asm-x86/msidef.h
+++ b/include/asm-x86/msidef.h
@@ -1,5 +1,5 @@
1#ifndef ASM_MSIDEF_H 1#ifndef ASM_X86__MSIDEF_H
2#define ASM_MSIDEF_H 2#define ASM_X86__MSIDEF_H
3 3
4/* 4/*
5 * Constants for Intel APIC based MSI messages. 5 * Constants for Intel APIC based MSI messages.
@@ -48,4 +48,8 @@
48#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ 48#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \
49 MSI_ADDR_DEST_ID_MASK) 49 MSI_ADDR_DEST_ID_MASK)
50 50
51#endif /* ASM_MSIDEF_H */ 51#define MSI_ADDR_IR_EXT_INT (1 << 4)
52#define MSI_ADDR_IR_SHV (1 << 3)
53#define MSI_ADDR_IR_INDEX1(index) ((index & 0x8000) >> 13)
54#define MSI_ADDR_IR_INDEX2(index) ((index & 0x7fff) << 5)
55#endif /* ASM_X86__MSIDEF_H */
diff --git a/include/asm-x86/msr-index.h b/include/asm-x86/msr-index.h
index 44bce773012e..3052f058ab06 100644
--- a/include/asm-x86/msr-index.h
+++ b/include/asm-x86/msr-index.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MSR_INDEX_H 1#ifndef ASM_X86__MSR_INDEX_H
2#define __ASM_MSR_INDEX_H 2#define ASM_X86__MSR_INDEX_H
3 3
4/* CPU model specific register (MSR) numbers */ 4/* CPU model specific register (MSR) numbers */
5 5
@@ -310,4 +310,4 @@
310/* Geode defined MSRs */ 310/* Geode defined MSRs */
311#define MSR_GEODE_BUSCONT_CONF0 0x00001900 311#define MSR_GEODE_BUSCONT_CONF0 0x00001900
312 312
313#endif /* __ASM_MSR_INDEX_H */ 313#endif /* ASM_X86__MSR_INDEX_H */
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index 2362cfda1fbc..eee83f783f6d 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_X86_MSR_H_ 1#ifndef ASM_X86__MSR_H
2#define __ASM_X86_MSR_H_ 2#define ASM_X86__MSR_H
3 3
4#include <asm/msr-index.h> 4#include <asm/msr-index.h>
5 5
@@ -221,4 +221,4 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
221#endif /* __KERNEL__ */ 221#endif /* __KERNEL__ */
222 222
223 223
224#endif 224#endif /* ASM_X86__MSR_H */
diff --git a/include/asm-x86/mtrr.h b/include/asm-x86/mtrr.h
index a69a01a51729..23a7f83da953 100644
--- a/include/asm-x86/mtrr.h
+++ b/include/asm-x86/mtrr.h
@@ -20,8 +20,8 @@
20 The postal address is: 20 The postal address is:
21 Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. 21 Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
22*/ 22*/
23#ifndef _ASM_X86_MTRR_H 23#ifndef ASM_X86__MTRR_H
24#define _ASM_X86_MTRR_H 24#define ASM_X86__MTRR_H
25 25
26#include <linux/ioctl.h> 26#include <linux/ioctl.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
@@ -170,4 +170,4 @@ struct mtrr_gentry32 {
170 170
171#endif /* __KERNEL__ */ 171#endif /* __KERNEL__ */
172 172
173#endif /* _ASM_X86_MTRR_H */ 173#endif /* ASM_X86__MTRR_H */
diff --git a/include/asm-x86/mutex_32.h b/include/asm-x86/mutex_32.h
index 73e928ef5f03..25c16d8ba3c7 100644
--- a/include/asm-x86/mutex_32.h
+++ b/include/asm-x86/mutex_32.h
@@ -6,8 +6,8 @@
6 * 6 *
7 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> 7 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
8 */ 8 */
9#ifndef _ASM_MUTEX_H 9#ifndef ASM_X86__MUTEX_32_H
10#define _ASM_MUTEX_H 10#define ASM_X86__MUTEX_32_H
11 11
12#include <asm/alternative.h> 12#include <asm/alternative.h>
13 13
@@ -122,4 +122,4 @@ static inline int __mutex_fastpath_trylock(atomic_t *count,
122#endif 122#endif
123} 123}
124 124
125#endif 125#endif /* ASM_X86__MUTEX_32_H */
diff --git a/include/asm-x86/mutex_64.h b/include/asm-x86/mutex_64.h
index f3fae9becb38..918ba21ab9d9 100644
--- a/include/asm-x86/mutex_64.h
+++ b/include/asm-x86/mutex_64.h
@@ -6,8 +6,8 @@
6 * 6 *
7 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> 7 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
8 */ 8 */
9#ifndef _ASM_MUTEX_H 9#ifndef ASM_X86__MUTEX_64_H
10#define _ASM_MUTEX_H 10#define ASM_X86__MUTEX_64_H
11 11
12/** 12/**
13 * __mutex_fastpath_lock - decrement and call function if negative 13 * __mutex_fastpath_lock - decrement and call function if negative
@@ -97,4 +97,4 @@ static inline int __mutex_fastpath_trylock(atomic_t *count,
97 return 0; 97 return 0;
98} 98}
99 99
100#endif 100#endif /* ASM_X86__MUTEX_64_H */
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h
index 21f8d0202a82..f8b76f383904 100644
--- a/include/asm-x86/nmi.h
+++ b/include/asm-x86/nmi.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_NMI_H_ 1#ifndef ASM_X86__NMI_H
2#define _ASM_X86_NMI_H_ 2#define ASM_X86__NMI_H
3 3
4#include <linux/pm.h> 4#include <linux/pm.h>
5#include <asm/irq.h> 5#include <asm/irq.h>
@@ -81,4 +81,4 @@ void enable_lapic_nmi_watchdog(void);
81void stop_nmi(void); 81void stop_nmi(void);
82void restart_nmi(void); 82void restart_nmi(void);
83 83
84#endif 84#endif /* ASM_X86__NMI_H */
diff --git a/include/asm-x86/nops.h b/include/asm-x86/nops.h
index ad0bedd10b89..ae742721ae73 100644
--- a/include/asm-x86/nops.h
+++ b/include/asm-x86/nops.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_NOPS_H 1#ifndef ASM_X86__NOPS_H
2#define _ASM_NOPS_H 1 2#define ASM_X86__NOPS_H
3 3
4/* Define nops for use with alternative() */ 4/* Define nops for use with alternative() */
5 5
@@ -115,4 +115,4 @@
115 115
116#define ASM_NOP_MAX 8 116#define ASM_NOP_MAX 8
117 117
118#endif 118#endif /* ASM_X86__NOPS_H */
diff --git a/include/asm-x86/numa_32.h b/include/asm-x86/numa_32.h
index 220d7b7707a0..44cb07855c5b 100644
--- a/include/asm-x86/numa_32.h
+++ b/include/asm-x86/numa_32.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_32_NUMA_H 1#ifndef ASM_X86__NUMA_32_H
2#define _ASM_X86_32_NUMA_H 1 2#define ASM_X86__NUMA_32_H
3 3
4extern int pxm_to_nid(int pxm); 4extern int pxm_to_nid(int pxm);
5extern void numa_remove_cpu(int cpu); 5extern void numa_remove_cpu(int cpu);
@@ -8,4 +8,4 @@ extern void numa_remove_cpu(int cpu);
8extern void set_highmem_pages_init(void); 8extern void set_highmem_pages_init(void);
9#endif 9#endif
10 10
11#endif /* _ASM_X86_32_NUMA_H */ 11#endif /* ASM_X86__NUMA_32_H */
diff --git a/include/asm-x86/numa_64.h b/include/asm-x86/numa_64.h
index 3830094434a9..15c990395b02 100644
--- a/include/asm-x86/numa_64.h
+++ b/include/asm-x86/numa_64.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X8664_NUMA_H 1#ifndef ASM_X86__NUMA_64_H
2#define _ASM_X8664_NUMA_H 1 2#define ASM_X86__NUMA_64_H
3 3
4#include <linux/nodemask.h> 4#include <linux/nodemask.h>
5#include <asm/apicdef.h> 5#include <asm/apicdef.h>
@@ -40,4 +40,4 @@ static inline void numa_add_cpu(int cpu, int node) { }
40static inline void numa_remove_cpu(int cpu) { } 40static inline void numa_remove_cpu(int cpu) { }
41#endif 41#endif
42 42
43#endif 43#endif /* ASM_X86__NUMA_64_H */
diff --git a/include/asm-x86/numaq.h b/include/asm-x86/numaq.h
index 34b92d581fa3..124bf7d4b70a 100644
--- a/include/asm-x86/numaq.h
+++ b/include/asm-x86/numaq.h
@@ -23,8 +23,8 @@
23 * Send feedback to <gone@us.ibm.com> 23 * Send feedback to <gone@us.ibm.com>
24 */ 24 */
25 25
26#ifndef NUMAQ_H 26#ifndef ASM_X86__NUMAQ_H
27#define NUMAQ_H 27#define ASM_X86__NUMAQ_H
28 28
29#ifdef CONFIG_X86_NUMAQ 29#ifdef CONFIG_X86_NUMAQ
30 30
@@ -165,5 +165,5 @@ static inline int get_memcfg_numaq(void)
165 return 0; 165 return 0;
166} 166}
167#endif /* CONFIG_X86_NUMAQ */ 167#endif /* CONFIG_X86_NUMAQ */
168#endif /* NUMAQ_H */ 168#endif /* ASM_X86__NUMAQ_H */
169 169
diff --git a/include/asm-x86/mach-numaq/mach_apic.h b/include/asm-x86/numaq/apic.h
index d802465e026a..a8344ba6ea15 100644
--- a/include/asm-x86/mach-numaq/mach_apic.h
+++ b/include/asm-x86/numaq/apic.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_APIC_H 1#ifndef __ASM_NUMAQ_APIC_H
2#define __ASM_MACH_APIC_H 2#define __ASM_NUMAQ_APIC_H
3 3
4#include <asm/io.h> 4#include <asm/io.h>
5#include <linux/mmzone.h> 5#include <linux/mmzone.h>
@@ -135,4 +135,4 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
135 return cpuid_apic >> index_msb; 135 return cpuid_apic >> index_msb;
136} 136}
137 137
138#endif /* __ASM_MACH_APIC_H */ 138#endif /* __ASM_NUMAQ_APIC_H */
diff --git a/include/asm-x86/mach-numaq/mach_apicdef.h b/include/asm-x86/numaq/apicdef.h
index bf439d0690f5..e012a46cc22a 100644
--- a/include/asm-x86/mach-numaq/mach_apicdef.h
+++ b/include/asm-x86/numaq/apicdef.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_APICDEF_H 1#ifndef __ASM_NUMAQ_APICDEF_H
2#define __ASM_MACH_APICDEF_H 2#define __ASM_NUMAQ_APICDEF_H
3 3
4 4
5#define APIC_ID_MASK (0xF<<24) 5#define APIC_ID_MASK (0xF<<24)
diff --git a/include/asm-x86/mach-numaq/mach_ipi.h b/include/asm-x86/numaq/ipi.h
index c6044488e9e6..935588d286cf 100644
--- a/include/asm-x86/mach-numaq/mach_ipi.h
+++ b/include/asm-x86/numaq/ipi.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_IPI_H 1#ifndef __ASM_NUMAQ_IPI_H
2#define __ASM_MACH_IPI_H 2#define __ASM_NUMAQ_IPI_H
3 3
4void send_IPI_mask_sequence(cpumask_t, int vector); 4void send_IPI_mask_sequence(cpumask_t, int vector);
5 5
@@ -22,4 +22,4 @@ static inline void send_IPI_all(int vector)
22 send_IPI_mask(cpu_online_map, vector); 22 send_IPI_mask(cpu_online_map, vector);
23} 23}
24 24
25#endif /* __ASM_MACH_IPI_H */ 25#endif /* __ASM_NUMAQ_IPI_H */
diff --git a/include/asm-x86/mach-numaq/mach_mpparse.h b/include/asm-x86/numaq/mpparse.h
index 626aef6b155f..252292e077b6 100644
--- a/include/asm-x86/mach-numaq/mach_mpparse.h
+++ b/include/asm-x86/numaq/mpparse.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_MACH_MPPARSE_H 1#ifndef __ASM_NUMAQ_MPPARSE_H
2#define __ASM_MACH_MPPARSE_H 2#define __ASM_NUMAQ_MPPARSE_H
3 3
4extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, 4extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem,
5 char *productid); 5 char *productid);
6 6
7#endif /* __ASM_MACH_MPPARSE_H */ 7#endif /* __ASM_NUMAQ_MPPARSE_H */
diff --git a/include/asm-x86/mach-numaq/mach_wakecpu.h b/include/asm-x86/numaq/wakecpu.h
index 00530041a991..c577bda5b1c5 100644
--- a/include/asm-x86/mach-numaq/mach_wakecpu.h
+++ b/include/asm-x86/numaq/wakecpu.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_WAKECPU_H 1#ifndef __ASM_NUMAQ_WAKECPU_H
2#define __ASM_MACH_WAKECPU_H 2#define __ASM_NUMAQ_WAKECPU_H
3 3
4/* This file copes with machines that wakeup secondary CPUs by NMIs */ 4/* This file copes with machines that wakeup secondary CPUs by NMIs */
5 5
@@ -40,4 +40,4 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
40 40
41#define inquire_remote_apic(apicid) {} 41#define inquire_remote_apic(apicid) {}
42 42
43#endif /* __ASM_MACH_WAKECPU_H */ 43#endif /* __ASM_NUMAQ_WAKECPU_H */
diff --git a/include/asm-x86/olpc.h b/include/asm-x86/olpc.h
index 97d47133486f..d7328b1a05c1 100644
--- a/include/asm-x86/olpc.h
+++ b/include/asm-x86/olpc.h
@@ -1,7 +1,7 @@
1/* OLPC machine specific definitions */ 1/* OLPC machine specific definitions */
2 2
3#ifndef ASM_OLPC_H_ 3#ifndef ASM_X86__OLPC_H
4#define ASM_OLPC_H_ 4#define ASM_X86__OLPC_H
5 5
6#include <asm/geode.h> 6#include <asm/geode.h>
7 7
@@ -129,4 +129,4 @@ extern int olpc_ec_mask_unset(uint8_t bits);
129#define OLPC_GPIO_LID geode_gpio(26) 129#define OLPC_GPIO_LID geode_gpio(26)
130#define OLPC_GPIO_ECSCI geode_gpio(27) 130#define OLPC_GPIO_ECSCI geode_gpio(27)
131 131
132#endif 132#endif /* ASM_X86__OLPC_H */
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
index 49982110e4d9..79544e6ffb8b 100644
--- a/include/asm-x86/page.h
+++ b/include/asm-x86/page.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PAGE_H 1#ifndef ASM_X86__PAGE_H
2#define _ASM_X86_PAGE_H 2#define ASM_X86__PAGE_H
3 3
4#include <linux/const.h> 4#include <linux/const.h>
5 5
@@ -199,4 +199,4 @@ static inline pteval_t native_pte_flags(pte_t pte)
199#define __HAVE_ARCH_GATE_AREA 1 199#define __HAVE_ARCH_GATE_AREA 1
200 200
201#endif /* __KERNEL__ */ 201#endif /* __KERNEL__ */
202#endif /* _ASM_X86_PAGE_H */ 202#endif /* ASM_X86__PAGE_H */
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h
index ab8528793f08..f32062a821c5 100644
--- a/include/asm-x86/page_32.h
+++ b/include/asm-x86/page_32.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PAGE_32_H 1#ifndef ASM_X86__PAGE_32_H
2#define _ASM_X86_PAGE_32_H 2#define ASM_X86__PAGE_32_H
3 3
4/* 4/*
5 * This handles the memory map. 5 * This handles the memory map.
@@ -96,6 +96,7 @@ extern void find_low_pfn_range(void);
96extern unsigned long init_memory_mapping(unsigned long start, 96extern unsigned long init_memory_mapping(unsigned long start,
97 unsigned long end); 97 unsigned long end);
98extern void initmem_init(unsigned long, unsigned long); 98extern void initmem_init(unsigned long, unsigned long);
99extern void free_initmem(void);
99extern void setup_bootmem_allocator(void); 100extern void setup_bootmem_allocator(void);
100 101
101 102
@@ -126,4 +127,4 @@ static inline void copy_page(void *to, void *from)
126#endif /* CONFIG_X86_3DNOW */ 127#endif /* CONFIG_X86_3DNOW */
127#endif /* !__ASSEMBLY__ */ 128#endif /* !__ASSEMBLY__ */
128 129
129#endif /* _ASM_X86_PAGE_32_H */ 130#endif /* ASM_X86__PAGE_32_H */
diff --git a/include/asm-x86/page_64.h b/include/asm-x86/page_64.h
index c6916c83e6b1..5e64acfed0a4 100644
--- a/include/asm-x86/page_64.h
+++ b/include/asm-x86/page_64.h
@@ -1,5 +1,5 @@
1#ifndef _X86_64_PAGE_H 1#ifndef ASM_X86__PAGE_64_H
2#define _X86_64_PAGE_H 2#define ASM_X86__PAGE_64_H
3 3
4#define PAGETABLE_LEVELS 4 4#define PAGETABLE_LEVELS 4
5 5
@@ -91,6 +91,7 @@ extern unsigned long init_memory_mapping(unsigned long start,
91 unsigned long end); 91 unsigned long end);
92 92
93extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn); 93extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn);
94extern void free_initmem(void);
94 95
95extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); 96extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
96extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); 97extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
@@ -102,4 +103,4 @@ extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
102#endif 103#endif
103 104
104 105
105#endif /* _X86_64_PAGE_H */ 106#endif /* ASM_X86__PAGE_64_H */
diff --git a/include/asm-x86/param.h b/include/asm-x86/param.h
index 6f0d0422f4ca..0009cfb11a5f 100644
--- a/include/asm-x86/param.h
+++ b/include/asm-x86/param.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PARAM_H 1#ifndef ASM_X86__PARAM_H
2#define _ASM_X86_PARAM_H 2#define ASM_X86__PARAM_H
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5# define HZ CONFIG_HZ /* Internal kernel timer frequency */ 5# define HZ CONFIG_HZ /* Internal kernel timer frequency */
@@ -19,4 +19,4 @@
19 19
20#define MAXHOSTNAMELEN 64 /* max length of hostname */ 20#define MAXHOSTNAMELEN 64 /* max length of hostname */
21 21
22#endif /* _ASM_X86_PARAM_H */ 22#endif /* ASM_X86__PARAM_H */
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index fbbde93f12d6..ff9a7e4bc3f6 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_PARAVIRT_H 1#ifndef ASM_X86__PARAVIRT_H
2#define __ASM_PARAVIRT_H 2#define ASM_X86__PARAVIRT_H
3/* Various instructions on x86 need to be replaced for 3/* Various instructions on x86 need to be replaced for
4 * para-virtualization: those hooks are defined here. */ 4 * para-virtualization: those hooks are defined here. */
5 5
@@ -200,12 +200,6 @@ struct pv_irq_ops {
200 200
201struct pv_apic_ops { 201struct pv_apic_ops {
202#ifdef CONFIG_X86_LOCAL_APIC 202#ifdef CONFIG_X86_LOCAL_APIC
203 /*
204 * Direct APIC operations, principally for VMI. Ideally
205 * these shouldn't be in this interface.
206 */
207 void (*apic_write)(unsigned long reg, u32 v);
208 u32 (*apic_read)(unsigned long reg);
209 void (*setup_boot_clock)(void); 203 void (*setup_boot_clock)(void);
210 void (*setup_secondary_clock)(void); 204 void (*setup_secondary_clock)(void);
211 205
@@ -898,19 +892,6 @@ static inline void slow_down_io(void)
898} 892}
899 893
900#ifdef CONFIG_X86_LOCAL_APIC 894#ifdef CONFIG_X86_LOCAL_APIC
901/*
902 * Basic functions accessing APICs.
903 */
904static inline void apic_write(unsigned long reg, u32 v)
905{
906 PVOP_VCALL2(pv_apic_ops.apic_write, reg, v);
907}
908
909static inline u32 apic_read(unsigned long reg)
910{
911 return PVOP_CALL1(unsigned long, pv_apic_ops.apic_read, reg);
912}
913
914static inline void setup_boot_clock(void) 895static inline void setup_boot_clock(void)
915{ 896{
916 PVOP_VCALL0(pv_apic_ops.setup_boot_clock); 897 PVOP_VCALL0(pv_apic_ops.setup_boot_clock);
@@ -1634,4 +1615,4 @@ static inline unsigned long __raw_local_irq_save(void)
1634 1615
1635#endif /* __ASSEMBLY__ */ 1616#endif /* __ASSEMBLY__ */
1636#endif /* CONFIG_PARAVIRT */ 1617#endif /* CONFIG_PARAVIRT */
1637#endif /* __ASM_PARAVIRT_H */ 1618#endif /* ASM_X86__PARAVIRT_H */
diff --git a/include/asm-x86/parport.h b/include/asm-x86/parport.h
index 3c4ffeb467e9..2e3dda4dc3d9 100644
--- a/include/asm-x86/parport.h
+++ b/include/asm-x86/parport.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PARPORT_H 1#ifndef ASM_X86__PARPORT_H
2#define _ASM_X86_PARPORT_H 2#define ASM_X86__PARPORT_H
3 3
4static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); 4static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma);
5static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) 5static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma)
@@ -7,4 +7,4 @@ static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma)
7 return parport_pc_find_isa_ports(autoirq, autodma); 7 return parport_pc_find_isa_ports(autoirq, autodma);
8} 8}
9 9
10#endif /* _ASM_X86_PARPORT_H */ 10#endif /* ASM_X86__PARPORT_H */
diff --git a/include/asm-x86/pat.h b/include/asm-x86/pat.h
index 7edc47307217..482c3e3f9879 100644
--- a/include/asm-x86/pat.h
+++ b/include/asm-x86/pat.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_PAT_H 1#ifndef ASM_X86__PAT_H
2#define _ASM_PAT_H 2#define ASM_X86__PAT_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
@@ -19,4 +19,4 @@ extern int free_memtype(u64 start, u64 end);
19 19
20extern void pat_disable(char *reason); 20extern void pat_disable(char *reason);
21 21
22#endif 22#endif /* ASM_X86__PAT_H */
diff --git a/include/asm-x86/pci-direct.h b/include/asm-x86/pci-direct.h
index 80c775d9fe20..da42be07b690 100644
--- a/include/asm-x86/pci-direct.h
+++ b/include/asm-x86/pci-direct.h
@@ -1,5 +1,5 @@
1#ifndef ASM_PCI_DIRECT_H 1#ifndef ASM_X86__PCI_DIRECT_H
2#define ASM_PCI_DIRECT_H 1 2#define ASM_X86__PCI_DIRECT_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
@@ -18,4 +18,4 @@ extern int early_pci_allowed(void);
18extern unsigned int pci_early_dump_regs; 18extern unsigned int pci_early_dump_regs;
19extern void early_dump_pci_device(u8 bus, u8 slot, u8 func); 19extern void early_dump_pci_device(u8 bus, u8 slot, u8 func);
20extern void early_dump_pci_devices(void); 20extern void early_dump_pci_devices(void);
21#endif 21#endif /* ASM_X86__PCI_DIRECT_H */
diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h
index 2db14cf17db8..602583192991 100644
--- a/include/asm-x86/pci.h
+++ b/include/asm-x86/pci.h
@@ -1,5 +1,5 @@
1#ifndef __x86_PCI_H 1#ifndef ASM_X86__PCI_H
2#define __x86_PCI_H 2#define ASM_X86__PCI_H
3 3
4#include <linux/mm.h> /* for struct page */ 4#include <linux/mm.h> /* for struct page */
5#include <linux/types.h> 5#include <linux/types.h>
@@ -111,4 +111,4 @@ static inline cpumask_t __pcibus_to_cpumask(struct pci_bus *bus)
111} 111}
112#endif 112#endif
113 113
114#endif 114#endif /* ASM_X86__PCI_H */
diff --git a/include/asm-x86/pci_32.h b/include/asm-x86/pci_32.h
index a50d46851285..3f2288207c0c 100644
--- a/include/asm-x86/pci_32.h
+++ b/include/asm-x86/pci_32.h
@@ -1,5 +1,5 @@
1#ifndef __i386_PCI_H 1#ifndef ASM_X86__PCI_32_H
2#define __i386_PCI_H 2#define ASM_X86__PCI_32_H
3 3
4 4
5#ifdef __KERNEL__ 5#ifdef __KERNEL__
@@ -31,4 +31,4 @@ struct pci_dev;
31#endif /* __KERNEL__ */ 31#endif /* __KERNEL__ */
32 32
33 33
34#endif /* __i386_PCI_H */ 34#endif /* ASM_X86__PCI_32_H */
diff --git a/include/asm-x86/pci_64.h b/include/asm-x86/pci_64.h
index f330234ffa5c..f72e12d5770e 100644
--- a/include/asm-x86/pci_64.h
+++ b/include/asm-x86/pci_64.h
@@ -1,5 +1,5 @@
1#ifndef __x8664_PCI_H 1#ifndef ASM_X86__PCI_64_H
2#define __x8664_PCI_H 2#define ASM_X86__PCI_64_H
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
@@ -63,4 +63,4 @@ extern void pci_iommu_alloc(void);
63 63
64#endif /* __KERNEL__ */ 64#endif /* __KERNEL__ */
65 65
66#endif /* __x8664_PCI_H */ 66#endif /* ASM_X86__PCI_64_H */
diff --git a/include/asm-x86/pda.h b/include/asm-x86/pda.h
index b34e9a7cc80b..80860afffbdb 100644
--- a/include/asm-x86/pda.h
+++ b/include/asm-x86/pda.h
@@ -1,5 +1,5 @@
1#ifndef X86_64_PDA_H 1#ifndef ASM_X86__PDA_H
2#define X86_64_PDA_H 2#define ASM_X86__PDA_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#include <linux/stddef.h> 5#include <linux/stddef.h>
@@ -134,4 +134,4 @@ do { \
134 134
135#define PDA_STACKOFFSET (5*8) 135#define PDA_STACKOFFSET (5*8)
136 136
137#endif 137#endif /* ASM_X86__PDA_H */
diff --git a/include/asm-x86/percpu.h b/include/asm-x86/percpu.h
index f643a3a92da0..e10a1d0678cf 100644
--- a/include/asm-x86/percpu.h
+++ b/include/asm-x86/percpu.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PERCPU_H_ 1#ifndef ASM_X86__PERCPU_H
2#define _ASM_X86_PERCPU_H_ 2#define ASM_X86__PERCPU_H
3 3
4#ifdef CONFIG_X86_64 4#ifdef CONFIG_X86_64
5#include <linux/compiler.h> 5#include <linux/compiler.h>
@@ -215,4 +215,4 @@ do { \
215 215
216#endif /* !CONFIG_SMP */ 216#endif /* !CONFIG_SMP */
217 217
218#endif /* _ASM_X86_PERCPU_H_ */ 218#endif /* ASM_X86__PERCPU_H */
diff --git a/include/asm-x86/pgalloc.h b/include/asm-x86/pgalloc.h
index d63ea431cb3b..3cd23adedae8 100644
--- a/include/asm-x86/pgalloc.h
+++ b/include/asm-x86/pgalloc.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PGALLOC_H 1#ifndef ASM_X86__PGALLOC_H
2#define _ASM_X86_PGALLOC_H 2#define ASM_X86__PGALLOC_H
3 3
4#include <linux/threads.h> 4#include <linux/threads.h>
5#include <linux/mm.h> /* for struct page */ 5#include <linux/mm.h> /* for struct page */
@@ -111,4 +111,4 @@ extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud);
111#endif /* PAGETABLE_LEVELS > 3 */ 111#endif /* PAGETABLE_LEVELS > 3 */
112#endif /* PAGETABLE_LEVELS > 2 */ 112#endif /* PAGETABLE_LEVELS > 2 */
113 113
114#endif /* _ASM_X86_PGALLOC_H */ 114#endif /* ASM_X86__PGALLOC_H */
diff --git a/include/asm-x86/pgtable-2level-defs.h b/include/asm-x86/pgtable-2level-defs.h
index 0f71c9f13da4..7ec48f4e5347 100644
--- a/include/asm-x86/pgtable-2level-defs.h
+++ b/include/asm-x86/pgtable-2level-defs.h
@@ -1,5 +1,5 @@
1#ifndef _I386_PGTABLE_2LEVEL_DEFS_H 1#ifndef ASM_X86__PGTABLE_2LEVEL_DEFS_H
2#define _I386_PGTABLE_2LEVEL_DEFS_H 2#define ASM_X86__PGTABLE_2LEVEL_DEFS_H
3 3
4#define SHARED_KERNEL_PMD 0 4#define SHARED_KERNEL_PMD 0
5 5
@@ -17,4 +17,4 @@
17 17
18#define PTRS_PER_PTE 1024 18#define PTRS_PER_PTE 1024
19 19
20#endif /* _I386_PGTABLE_2LEVEL_DEFS_H */ 20#endif /* ASM_X86__PGTABLE_2LEVEL_DEFS_H */
diff --git a/include/asm-x86/pgtable-2level.h b/include/asm-x86/pgtable-2level.h
index 46bc52c0eae1..60440b191626 100644
--- a/include/asm-x86/pgtable-2level.h
+++ b/include/asm-x86/pgtable-2level.h
@@ -1,5 +1,5 @@
1#ifndef _I386_PGTABLE_2LEVEL_H 1#ifndef ASM_X86__PGTABLE_2LEVEL_H
2#define _I386_PGTABLE_2LEVEL_H 2#define ASM_X86__PGTABLE_2LEVEL_H
3 3
4#define pte_ERROR(e) \ 4#define pte_ERROR(e) \
5 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low) 5 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low)
@@ -78,4 +78,4 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp)
78#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) 78#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low })
79#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val }) 79#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val })
80 80
81#endif /* _I386_PGTABLE_2LEVEL_H */ 81#endif /* ASM_X86__PGTABLE_2LEVEL_H */
diff --git a/include/asm-x86/pgtable-3level-defs.h b/include/asm-x86/pgtable-3level-defs.h
index 448ac9516314..c05fe6ff3720 100644
--- a/include/asm-x86/pgtable-3level-defs.h
+++ b/include/asm-x86/pgtable-3level-defs.h
@@ -1,5 +1,5 @@
1#ifndef _I386_PGTABLE_3LEVEL_DEFS_H 1#ifndef ASM_X86__PGTABLE_3LEVEL_DEFS_H
2#define _I386_PGTABLE_3LEVEL_DEFS_H 2#define ASM_X86__PGTABLE_3LEVEL_DEFS_H
3 3
4#ifdef CONFIG_PARAVIRT 4#ifdef CONFIG_PARAVIRT
5#define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) 5#define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd)
@@ -25,4 +25,4 @@
25 */ 25 */
26#define PTRS_PER_PTE 512 26#define PTRS_PER_PTE 512
27 27
28#endif /* _I386_PGTABLE_3LEVEL_DEFS_H */ 28#endif /* ASM_X86__PGTABLE_3LEVEL_DEFS_H */
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h
index 105057f34032..e713bd5f39a6 100644
--- a/include/asm-x86/pgtable-3level.h
+++ b/include/asm-x86/pgtable-3level.h
@@ -1,5 +1,5 @@
1#ifndef _I386_PGTABLE_3LEVEL_H 1#ifndef ASM_X86__PGTABLE_3LEVEL_H
2#define _I386_PGTABLE_3LEVEL_H 2#define ASM_X86__PGTABLE_3LEVEL_H
3 3
4/* 4/*
5 * Intel Physical Address Extension (PAE) Mode - three-level page 5 * Intel Physical Address Extension (PAE) Mode - three-level page
@@ -179,4 +179,4 @@ static inline unsigned long pte_pfn(pte_t pte)
179#define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) 179#define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high })
180#define __swp_entry_to_pte(x) ((pte_t){ { .pte_high = (x).val } }) 180#define __swp_entry_to_pte(x) ((pte_t){ { .pte_high = (x).val } })
181 181
182#endif /* _I386_PGTABLE_3LEVEL_H */ 182#endif /* ASM_X86__PGTABLE_3LEVEL_H */
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 04caa2f544df..57d919a2d79d 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PGTABLE_H 1#ifndef ASM_X86__PGTABLE_H
2#define _ASM_X86_PGTABLE_H 2#define ASM_X86__PGTABLE_H
3 3
4#define FIRST_USER_ADDRESS 0 4#define FIRST_USER_ADDRESS 0
5 5
@@ -313,6 +313,8 @@ static inline void native_pagetable_setup_start(pgd_t *base) {}
313static inline void native_pagetable_setup_done(pgd_t *base) {} 313static inline void native_pagetable_setup_done(pgd_t *base) {}
314#endif 314#endif
315 315
316extern int arch_report_meminfo(char *page);
317
316#ifdef CONFIG_PARAVIRT 318#ifdef CONFIG_PARAVIRT
317#include <asm/paravirt.h> 319#include <asm/paravirt.h>
318#else /* !CONFIG_PARAVIRT */ 320#else /* !CONFIG_PARAVIRT */
@@ -521,4 +523,4 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
521#include <asm-generic/pgtable.h> 523#include <asm-generic/pgtable.h>
522#endif /* __ASSEMBLY__ */ 524#endif /* __ASSEMBLY__ */
523 525
524#endif /* _ASM_X86_PGTABLE_H */ 526#endif /* ASM_X86__PGTABLE_H */
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h
index 5c3b26567a95..45c8235400fe 100644
--- a/include/asm-x86/pgtable_32.h
+++ b/include/asm-x86/pgtable_32.h
@@ -1,5 +1,5 @@
1#ifndef _I386_PGTABLE_H 1#ifndef ASM_X86__PGTABLE_32_H
2#define _I386_PGTABLE_H 2#define ASM_X86__PGTABLE_32_H
3 3
4 4
5/* 5/*
@@ -31,6 +31,7 @@ static inline void pgtable_cache_init(void) { }
31static inline void check_pgt_cache(void) { } 31static inline void check_pgt_cache(void) { }
32void paging_init(void); 32void paging_init(void);
33 33
34extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
34 35
35/* 36/*
36 * The Linux x86 paging architecture is 'compile-time dual-mode', it 37 * The Linux x86 paging architecture is 'compile-time dual-mode', it
@@ -186,4 +187,4 @@ do { \
186#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ 187#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
187 remap_pfn_range(vma, vaddr, pfn, size, prot) 188 remap_pfn_range(vma, vaddr, pfn, size, prot)
188 189
189#endif /* _I386_PGTABLE_H */ 190#endif /* ASM_X86__PGTABLE_32_H */
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index 549144d03d99..e3dcf7a08a0b 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -1,5 +1,5 @@
1#ifndef _X86_64_PGTABLE_H 1#ifndef ASM_X86__PGTABLE_64_H
2#define _X86_64_PGTABLE_H 2#define ASM_X86__PGTABLE_64_H
3 3
4#include <linux/const.h> 4#include <linux/const.h>
5#ifndef __ASSEMBLY__ 5#ifndef __ASSEMBLY__
@@ -284,4 +284,4 @@ extern void cleanup_highmap(void);
284#define __HAVE_ARCH_PTE_SAME 284#define __HAVE_ARCH_PTE_SAME
285#endif /* !__ASSEMBLY__ */ 285#endif /* !__ASSEMBLY__ */
286 286
287#endif /* _X86_64_PGTABLE_H */ 287#endif /* ASM_X86__PGTABLE_64_H */
diff --git a/include/asm-x86/posix_types_32.h b/include/asm-x86/posix_types_32.h
index b031efda37ec..70cf2bb05939 100644
--- a/include/asm-x86/posix_types_32.h
+++ b/include/asm-x86/posix_types_32.h
@@ -1,5 +1,5 @@
1#ifndef __ARCH_I386_POSIX_TYPES_H 1#ifndef ASM_X86__POSIX_TYPES_32_H
2#define __ARCH_I386_POSIX_TYPES_H 2#define ASM_X86__POSIX_TYPES_32_H
3 3
4/* 4/*
5 * This file is generally used by user-level software, so you need to 5 * This file is generally used by user-level software, so you need to
@@ -82,4 +82,4 @@ do { \
82 82
83#endif /* defined(__KERNEL__) */ 83#endif /* defined(__KERNEL__) */
84 84
85#endif 85#endif /* ASM_X86__POSIX_TYPES_32_H */
diff --git a/include/asm-x86/posix_types_64.h b/include/asm-x86/posix_types_64.h
index d6624c95854a..388b4e7f4a44 100644
--- a/include/asm-x86/posix_types_64.h
+++ b/include/asm-x86/posix_types_64.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_64_POSIX_TYPES_H 1#ifndef ASM_X86__POSIX_TYPES_64_H
2#define _ASM_X86_64_POSIX_TYPES_H 2#define ASM_X86__POSIX_TYPES_64_H
3 3
4/* 4/*
5 * This file is generally used by user-level software, so you need to 5 * This file is generally used by user-level software, so you need to
@@ -116,4 +116,4 @@ static inline void __FD_ZERO(__kernel_fd_set *p)
116 116
117#endif /* defined(__KERNEL__) */ 117#endif /* defined(__KERNEL__) */
118 118
119#endif 119#endif /* ASM_X86__POSIX_TYPES_64_H */
diff --git a/include/asm-x86/prctl.h b/include/asm-x86/prctl.h
index 52952adef1ca..e7ae34eb4103 100644
--- a/include/asm-x86/prctl.h
+++ b/include/asm-x86/prctl.h
@@ -1,5 +1,5 @@
1#ifndef X86_64_PRCTL_H 1#ifndef ASM_X86__PRCTL_H
2#define X86_64_PRCTL_H 1 2#define ASM_X86__PRCTL_H
3 3
4#define ARCH_SET_GS 0x1001 4#define ARCH_SET_GS 0x1001
5#define ARCH_SET_FS 0x1002 5#define ARCH_SET_FS 0x1002
@@ -7,4 +7,4 @@
7#define ARCH_GET_GS 0x1004 7#define ARCH_GET_GS 0x1004
8 8
9 9
10#endif 10#endif /* ASM_X86__PRCTL_H */
diff --git a/include/asm-x86/processor-cyrix.h b/include/asm-x86/processor-cyrix.h
index 97568ada1f97..1198f2a0e42c 100644
--- a/include/asm-x86/processor-cyrix.h
+++ b/include/asm-x86/processor-cyrix.h
@@ -28,3 +28,11 @@ static inline void setCx86(u8 reg, u8 data)
28 outb(reg, 0x22); 28 outb(reg, 0x22);
29 outb(data, 0x23); 29 outb(data, 0x23);
30} 30}
31
32#define getCx86_old(reg) ({ outb((reg), 0x22); inb(0x23); })
33
34#define setCx86_old(reg, data) do { \
35 outb((reg), 0x22); \
36 outb((data), 0x23); \
37} while (0)
38
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h
index eff2ecd7fff0..dc5f0712f9fa 100644
--- a/include/asm-x86/processor-flags.h
+++ b/include/asm-x86/processor-flags.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_I386_PROCESSOR_FLAGS_H 1#ifndef ASM_X86__PROCESSOR_FLAGS_H
2#define __ASM_I386_PROCESSOR_FLAGS_H 2#define ASM_X86__PROCESSOR_FLAGS_H
3/* Various flags defined: can be included from assembler. */ 3/* Various flags defined: can be included from assembler. */
4 4
5/* 5/*
@@ -59,6 +59,7 @@
59#define X86_CR4_OSFXSR 0x00000200 /* enable fast FPU save and restore */ 59#define X86_CR4_OSFXSR 0x00000200 /* enable fast FPU save and restore */
60#define X86_CR4_OSXMMEXCPT 0x00000400 /* enable unmasked SSE exceptions */ 60#define X86_CR4_OSXMMEXCPT 0x00000400 /* enable unmasked SSE exceptions */
61#define X86_CR4_VMXE 0x00002000 /* enable VMX virtualization */ 61#define X86_CR4_VMXE 0x00002000 /* enable VMX virtualization */
62#define X86_CR4_OSXSAVE 0x00040000 /* enable xsave and xrestore */
62 63
63/* 64/*
64 * x86-64 Task Priority Register, CR8 65 * x86-64 Task Priority Register, CR8
@@ -96,4 +97,4 @@
96#endif 97#endif
97#endif 98#endif
98 99
99#endif /* __ASM_I386_PROCESSOR_FLAGS_H */ 100#endif /* ASM_X86__PROCESSOR_FLAGS_H */
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 4df3e2f6fb56..df03c98e38d4 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_X86_PROCESSOR_H 1#ifndef ASM_X86__PROCESSOR_H
2#define __ASM_X86_PROCESSOR_H 2#define ASM_X86__PROCESSOR_H
3 3
4#include <asm/processor-flags.h> 4#include <asm/processor-flags.h>
5 5
@@ -140,6 +140,8 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
140#define current_cpu_data boot_cpu_data 140#define current_cpu_data boot_cpu_data
141#endif 141#endif
142 142
143extern const struct seq_operations cpuinfo_op;
144
143static inline int hlt_works(int cpu) 145static inline int hlt_works(int cpu)
144{ 146{
145#ifdef CONFIG_X86_32 147#ifdef CONFIG_X86_32
@@ -153,6 +155,8 @@ static inline int hlt_works(int cpu)
153 155
154extern void cpu_detect(struct cpuinfo_x86 *c); 156extern void cpu_detect(struct cpuinfo_x86 *c);
155 157
158extern struct pt_regs *idle_regs(struct pt_regs *);
159
156extern void early_cpu_init(void); 160extern void early_cpu_init(void);
157extern void identify_boot_cpu(void); 161extern void identify_boot_cpu(void);
158extern void identify_secondary_cpu(struct cpuinfo_x86 *); 162extern void identify_secondary_cpu(struct cpuinfo_x86 *);
@@ -322,7 +326,12 @@ struct i387_fxsave_struct {
322 /* 16*16 bytes for each XMM-reg = 256 bytes: */ 326 /* 16*16 bytes for each XMM-reg = 256 bytes: */
323 u32 xmm_space[64]; 327 u32 xmm_space[64];
324 328
325 u32 padding[24]; 329 u32 padding[12];
330
331 union {
332 u32 padding1[12];
333 u32 sw_reserved[12];
334 };
326 335
327} __attribute__((aligned(16))); 336} __attribute__((aligned(16)));
328 337
@@ -346,10 +355,23 @@ struct i387_soft_struct {
346 u32 entry_eip; 355 u32 entry_eip;
347}; 356};
348 357
358struct xsave_hdr_struct {
359 u64 xstate_bv;
360 u64 reserved1[2];
361 u64 reserved2[5];
362} __attribute__((packed));
363
364struct xsave_struct {
365 struct i387_fxsave_struct i387;
366 struct xsave_hdr_struct xsave_hdr;
367 /* new processor state extensions will go here */
368} __attribute__ ((packed, aligned (64)));
369
349union thread_xstate { 370union thread_xstate {
350 struct i387_fsave_struct fsave; 371 struct i387_fsave_struct fsave;
351 struct i387_fxsave_struct fxsave; 372 struct i387_fxsave_struct fxsave;
352 struct i387_soft_struct soft; 373 struct i387_soft_struct soft;
374 struct xsave_struct xsave;
353}; 375};
354 376
355#ifdef CONFIG_X86_64 377#ifdef CONFIG_X86_64
@@ -943,4 +965,4 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
943extern int get_tsc_mode(unsigned long adr); 965extern int get_tsc_mode(unsigned long adr);
944extern int set_tsc_mode(unsigned int val); 966extern int set_tsc_mode(unsigned int val);
945 967
946#endif 968#endif /* ASM_X86__PROCESSOR_H */
diff --git a/include/asm-x86/proto.h b/include/asm-x86/proto.h
index 3dd458c385c0..6e89e8b4de0e 100644
--- a/include/asm-x86/proto.h
+++ b/include/asm-x86/proto.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X8664_PROTO_H 1#ifndef ASM_X86__PROTO_H
2#define _ASM_X8664_PROTO_H 1 2#define ASM_X86__PROTO_H
3 3
4#include <asm/ldt.h> 4#include <asm/ldt.h>
5 5
@@ -29,4 +29,4 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr);
29#define round_up(x, y) (((x) + (y) - 1) & ~((y) - 1)) 29#define round_up(x, y) (((x) + (y) - 1) & ~((y) - 1))
30#define round_down(x, y) ((x) & ~((y) - 1)) 30#define round_down(x, y) ((x) & ~((y) - 1))
31 31
32#endif 32#endif /* ASM_X86__PROTO_H */
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h
index 72e7b9db29bb..d0cf3344a586 100644
--- a/include/asm-x86/ptrace-abi.h
+++ b/include/asm-x86/ptrace-abi.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PTRACE_ABI_H 1#ifndef ASM_X86__PTRACE_ABI_H
2#define _ASM_X86_PTRACE_ABI_H 2#define ASM_X86__PTRACE_ABI_H
3 3
4#ifdef __i386__ 4#ifdef __i386__
5 5
@@ -140,4 +140,4 @@ struct ptrace_bts_config {
140 Returns number of BTS records drained. 140 Returns number of BTS records drained.
141*/ 141*/
142 142
143#endif 143#endif /* ASM_X86__PTRACE_ABI_H */
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
index 8a71db803da6..fad807769910 100644
--- a/include/asm-x86/ptrace.h
+++ b/include/asm-x86/ptrace.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PTRACE_H 1#ifndef ASM_X86__PTRACE_H
2#define _ASM_X86_PTRACE_H 2#define ASM_X86__PTRACE_H
3 3
4#include <linux/compiler.h> /* For __user */ 4#include <linux/compiler.h> /* For __user */
5#include <asm/ptrace-abi.h> 5#include <asm/ptrace-abi.h>
@@ -144,10 +144,13 @@ convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
144#ifdef CONFIG_X86_32 144#ifdef CONFIG_X86_32
145extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, 145extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
146 int error_code); 146 int error_code);
147#else
148void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
149#endif 147#endif
150 148
149void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
150
151extern long syscall_trace_enter(struct pt_regs *);
152extern void syscall_trace_leave(struct pt_regs *);
153
151static inline unsigned long regs_return_value(struct pt_regs *regs) 154static inline unsigned long regs_return_value(struct pt_regs *regs)
152{ 155{
153 return regs->ax; 156 return regs->ax;
@@ -213,6 +216,11 @@ static inline unsigned long frame_pointer(struct pt_regs *regs)
213 return regs->bp; 216 return regs->bp;
214} 217}
215 218
219static inline unsigned long user_stack_pointer(struct pt_regs *regs)
220{
221 return regs->sp;
222}
223
216/* 224/*
217 * These are defined as per linux/ptrace.h, which see. 225 * These are defined as per linux/ptrace.h, which see.
218 */ 226 */
@@ -239,4 +247,4 @@ extern int do_set_thread_area(struct task_struct *p, int idx,
239 247
240#endif /* !__ASSEMBLY__ */ 248#endif /* !__ASSEMBLY__ */
241 249
242#endif 250#endif /* ASM_X86__PTRACE_H */
diff --git a/include/asm-x86/pvclock-abi.h b/include/asm-x86/pvclock-abi.h
index 6857f840b243..edb3b4ecfc81 100644
--- a/include/asm-x86/pvclock-abi.h
+++ b/include/asm-x86/pvclock-abi.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PVCLOCK_ABI_H_ 1#ifndef ASM_X86__PVCLOCK_ABI_H
2#define _ASM_X86_PVCLOCK_ABI_H_ 2#define ASM_X86__PVCLOCK_ABI_H
3#ifndef __ASSEMBLY__ 3#ifndef __ASSEMBLY__
4 4
5/* 5/*
@@ -39,4 +39,4 @@ struct pvclock_wall_clock {
39} __attribute__((__packed__)); 39} __attribute__((__packed__));
40 40
41#endif /* __ASSEMBLY__ */ 41#endif /* __ASSEMBLY__ */
42#endif /* _ASM_X86_PVCLOCK_ABI_H_ */ 42#endif /* ASM_X86__PVCLOCK_ABI_H */
diff --git a/include/asm-x86/pvclock.h b/include/asm-x86/pvclock.h
index 85b1bba8e0a3..1a38f6834800 100644
--- a/include/asm-x86/pvclock.h
+++ b/include/asm-x86/pvclock.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_PVCLOCK_H_ 1#ifndef ASM_X86__PVCLOCK_H
2#define _ASM_X86_PVCLOCK_H_ 2#define ASM_X86__PVCLOCK_H
3 3
4#include <linux/clocksource.h> 4#include <linux/clocksource.h>
5#include <asm/pvclock-abi.h> 5#include <asm/pvclock-abi.h>
@@ -10,4 +10,4 @@ void pvclock_read_wallclock(struct pvclock_wall_clock *wall,
10 struct pvclock_vcpu_time_info *vcpu, 10 struct pvclock_vcpu_time_info *vcpu,
11 struct timespec *ts); 11 struct timespec *ts);
12 12
13#endif /* _ASM_X86_PVCLOCK_H_ */ 13#endif /* ASM_X86__PVCLOCK_H */
diff --git a/include/asm-x86/reboot.h b/include/asm-x86/reboot.h
index 206f355786dc..1c2f0ce9e31e 100644
--- a/include/asm-x86/reboot.h
+++ b/include/asm-x86/reboot.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_REBOOT_H 1#ifndef ASM_X86__REBOOT_H
2#define _ASM_REBOOT_H 2#define ASM_X86__REBOOT_H
3 3
4struct pt_regs; 4struct pt_regs;
5 5
@@ -18,4 +18,4 @@ void native_machine_crash_shutdown(struct pt_regs *regs);
18void native_machine_shutdown(void); 18void native_machine_shutdown(void);
19void machine_real_restart(const unsigned char *code, int length); 19void machine_real_restart(const unsigned char *code, int length);
20 20
21#endif /* _ASM_REBOOT_H */ 21#endif /* ASM_X86__REBOOT_H */
diff --git a/include/asm-x86/reboot_fixups.h b/include/asm-x86/reboot_fixups.h
index 0cb7d87c2b68..2c2987d97570 100644
--- a/include/asm-x86/reboot_fixups.h
+++ b/include/asm-x86/reboot_fixups.h
@@ -1,6 +1,6 @@
1#ifndef _LINUX_REBOOT_FIXUPS_H 1#ifndef ASM_X86__REBOOT_FIXUPS_H
2#define _LINUX_REBOOT_FIXUPS_H 2#define ASM_X86__REBOOT_FIXUPS_H
3 3
4extern void mach_reboot_fixups(void); 4extern void mach_reboot_fixups(void);
5 5
6#endif /* _LINUX_REBOOT_FIXUPS_H */ 6#endif /* ASM_X86__REBOOT_FIXUPS_H */
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h
index 5c2ff4bc2980..a01c4e376331 100644
--- a/include/asm-x86/required-features.h
+++ b/include/asm-x86/required-features.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_REQUIRED_FEATURES_H 1#ifndef ASM_X86__REQUIRED_FEATURES_H
2#define _ASM_REQUIRED_FEATURES_H 1 2#define ASM_X86__REQUIRED_FEATURES_H
3 3
4/* Define minimum CPUID feature set for kernel These bits are checked 4/* Define minimum CPUID feature set for kernel These bits are checked
5 really early to actually display a visible error message before the 5 really early to actually display a visible error message before the
@@ -79,4 +79,4 @@
79#define REQUIRED_MASK6 0 79#define REQUIRED_MASK6 0
80#define REQUIRED_MASK7 0 80#define REQUIRED_MASK7 0
81 81
82#endif 82#endif /* ASM_X86__REQUIRED_FEATURES_H */
diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h
index 8d9f0b41ee86..e39376d7de50 100644
--- a/include/asm-x86/resume-trace.h
+++ b/include/asm-x86/resume-trace.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_RESUME_TRACE_H 1#ifndef ASM_X86__RESUME_TRACE_H
2#define _ASM_X86_RESUME_TRACE_H 2#define ASM_X86__RESUME_TRACE_H
3 3
4#include <asm/asm.h> 4#include <asm/asm.h>
5 5
@@ -7,7 +7,7 @@
7do { \ 7do { \
8 if (pm_trace_enabled) { \ 8 if (pm_trace_enabled) { \
9 const void *tracedata; \ 9 const void *tracedata; \
10 asm volatile(_ASM_MOV_UL " $1f,%0\n" \ 10 asm volatile(_ASM_MOV " $1f,%0\n" \
11 ".section .tracedata,\"a\"\n" \ 11 ".section .tracedata,\"a\"\n" \
12 "1:\t.word %c1\n\t" \ 12 "1:\t.word %c1\n\t" \
13 _ASM_PTR " %c2\n" \ 13 _ASM_PTR " %c2\n" \
@@ -18,4 +18,4 @@ do { \
18 } \ 18 } \
19} while (0) 19} while (0)
20 20
21#endif 21#endif /* ASM_X86__RESUME_TRACE_H */
diff --git a/include/asm-x86/rio.h b/include/asm-x86/rio.h
index c9448bd8968f..5e1256bdee83 100644
--- a/include/asm-x86/rio.h
+++ b/include/asm-x86/rio.h
@@ -5,8 +5,8 @@
5 * Author: Laurent Vivier <Laurent.Vivier@bull.net> 5 * Author: Laurent Vivier <Laurent.Vivier@bull.net>
6 */ 6 */
7 7
8#ifndef __ASM_RIO_H 8#ifndef ASM_X86__RIO_H
9#define __ASM_RIO_H 9#define ASM_X86__RIO_H
10 10
11#define RIO_TABLE_VERSION 3 11#define RIO_TABLE_VERSION 3
12 12
@@ -60,4 +60,4 @@ enum {
60 ALT_CALGARY = 5, /* Second Planar Calgary */ 60 ALT_CALGARY = 5, /* Second Planar Calgary */
61}; 61};
62 62
63#endif /* __ASM_RIO_H */ 63#endif /* ASM_X86__RIO_H */
diff --git a/include/asm-x86/rwlock.h b/include/asm-x86/rwlock.h
index 6a8c0d645108..48a3109e1a7d 100644
--- a/include/asm-x86/rwlock.h
+++ b/include/asm-x86/rwlock.h
@@ -1,8 +1,8 @@
1#ifndef _ASM_X86_RWLOCK_H 1#ifndef ASM_X86__RWLOCK_H
2#define _ASM_X86_RWLOCK_H 2#define ASM_X86__RWLOCK_H
3 3
4#define RW_LOCK_BIAS 0x01000000 4#define RW_LOCK_BIAS 0x01000000
5 5
6/* Actual code is in asm/spinlock.h or in arch/x86/lib/rwlock.S */ 6/* Actual code is in asm/spinlock.h or in arch/x86/lib/rwlock.S */
7 7
8#endif /* _ASM_X86_RWLOCK_H */ 8#endif /* ASM_X86__RWLOCK_H */
diff --git a/include/asm-x86/rwsem.h b/include/asm-x86/rwsem.h
index 750f2a3542b3..3ff3015b71a8 100644
--- a/include/asm-x86/rwsem.h
+++ b/include/asm-x86/rwsem.h
@@ -29,8 +29,8 @@
29 * front, then they'll all be woken up, but no other readers will be. 29 * front, then they'll all be woken up, but no other readers will be.
30 */ 30 */
31 31
32#ifndef _I386_RWSEM_H 32#ifndef ASM_X86__RWSEM_H
33#define _I386_RWSEM_H 33#define ASM_X86__RWSEM_H
34 34
35#ifndef _LINUX_RWSEM_H 35#ifndef _LINUX_RWSEM_H
36#error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead" 36#error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead"
@@ -262,4 +262,4 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem)
262} 262}
263 263
264#endif /* __KERNEL__ */ 264#endif /* __KERNEL__ */
265#endif /* _I386_RWSEM_H */ 265#endif /* ASM_X86__RWSEM_H */
diff --git a/include/asm-x86/scatterlist.h b/include/asm-x86/scatterlist.h
index c0432061f81a..ee48f880005d 100644
--- a/include/asm-x86/scatterlist.h
+++ b/include/asm-x86/scatterlist.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SCATTERLIST_H 1#ifndef ASM_X86__SCATTERLIST_H
2#define _ASM_X86_SCATTERLIST_H 2#define ASM_X86__SCATTERLIST_H
3 3
4#include <asm/types.h> 4#include <asm/types.h>
5 5
@@ -30,4 +30,4 @@ struct scatterlist {
30# define sg_dma_len(sg) ((sg)->dma_length) 30# define sg_dma_len(sg) ((sg)->dma_length)
31#endif 31#endif
32 32
33#endif 33#endif /* ASM_X86__SCATTERLIST_H */
diff --git a/include/asm-x86/seccomp_32.h b/include/asm-x86/seccomp_32.h
index 36e71c5f306f..cf9ab2dbcef1 100644
--- a/include/asm-x86/seccomp_32.h
+++ b/include/asm-x86/seccomp_32.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_SECCOMP_H 1#ifndef ASM_X86__SECCOMP_32_H
2#define _ASM_SECCOMP_H 2#define ASM_X86__SECCOMP_32_H
3 3
4#include <linux/thread_info.h> 4#include <linux/thread_info.h>
5 5
@@ -14,4 +14,4 @@
14#define __NR_seccomp_exit __NR_exit 14#define __NR_seccomp_exit __NR_exit
15#define __NR_seccomp_sigreturn __NR_sigreturn 15#define __NR_seccomp_sigreturn __NR_sigreturn
16 16
17#endif /* _ASM_SECCOMP_H */ 17#endif /* ASM_X86__SECCOMP_32_H */
diff --git a/include/asm-x86/seccomp_64.h b/include/asm-x86/seccomp_64.h
index 76cfe69aa63c..03274cea751f 100644
--- a/include/asm-x86/seccomp_64.h
+++ b/include/asm-x86/seccomp_64.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_SECCOMP_H 1#ifndef ASM_X86__SECCOMP_64_H
2#define _ASM_SECCOMP_H 2#define ASM_X86__SECCOMP_64_H
3 3
4#include <linux/thread_info.h> 4#include <linux/thread_info.h>
5 5
@@ -22,4 +22,4 @@
22#define __NR_seccomp_exit_32 __NR_ia32_exit 22#define __NR_seccomp_exit_32 __NR_ia32_exit
23#define __NR_seccomp_sigreturn_32 __NR_ia32_sigreturn 23#define __NR_seccomp_sigreturn_32 __NR_ia32_sigreturn
24 24
25#endif /* _ASM_SECCOMP_H */ 25#endif /* ASM_X86__SECCOMP_64_H */
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h
index 646452ea9ea3..ea5f0a8686f7 100644
--- a/include/asm-x86/segment.h
+++ b/include/asm-x86/segment.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SEGMENT_H_ 1#ifndef ASM_X86__SEGMENT_H
2#define _ASM_X86_SEGMENT_H_ 2#define ASM_X86__SEGMENT_H
3 3
4/* Constructor for a conventional segment GDT (or LDT) entry */ 4/* Constructor for a conventional segment GDT (or LDT) entry */
5/* This is a macro so it can be used in initializers */ 5/* This is a macro so it can be used in initializers */
@@ -212,4 +212,4 @@ extern const char early_idt_handlers[NUM_EXCEPTION_VECTORS][10];
212#endif 212#endif
213#endif 213#endif
214 214
215#endif 215#endif /* ASM_X86__SEGMENT_H */
diff --git a/include/asm-x86/sembuf.h b/include/asm-x86/sembuf.h
index ee50c801f7b7..81f06b7e5a3f 100644
--- a/include/asm-x86/sembuf.h
+++ b/include/asm-x86/sembuf.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SEMBUF_H 1#ifndef ASM_X86__SEMBUF_H
2#define _ASM_X86_SEMBUF_H 2#define ASM_X86__SEMBUF_H
3 3
4/* 4/*
5 * The semid64_ds structure for x86 architecture. 5 * The semid64_ds structure for x86 architecture.
@@ -21,4 +21,4 @@ struct semid64_ds {
21 unsigned long __unused4; 21 unsigned long __unused4;
22}; 22};
23 23
24#endif /* _ASM_X86_SEMBUF_H */ 24#endif /* ASM_X86__SEMBUF_H */
diff --git a/include/asm-x86/serial.h b/include/asm-x86/serial.h
index 628c801535ea..303660b671e5 100644
--- a/include/asm-x86/serial.h
+++ b/include/asm-x86/serial.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SERIAL_H 1#ifndef ASM_X86__SERIAL_H
2#define _ASM_X86_SERIAL_H 2#define ASM_X86__SERIAL_H
3 3
4/* 4/*
5 * This assumes you have a 1.8432 MHz clock for your UART. 5 * This assumes you have a 1.8432 MHz clock for your UART.
@@ -26,4 +26,4 @@
26 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ 26 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
27 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ 27 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
28 28
29#endif /* _ASM_X86_SERIAL_H */ 29#endif /* ASM_X86__SERIAL_H */
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h
index a07c6f1c01e1..11b6cc14b289 100644
--- a/include/asm-x86/setup.h
+++ b/include/asm-x86/setup.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SETUP_H 1#ifndef ASM_X86__SETUP_H
2#define _ASM_X86_SETUP_H 2#define ASM_X86__SETUP_H
3 3
4#define COMMAND_LINE_SIZE 2048 4#define COMMAND_LINE_SIZE 2048
5 5
@@ -38,9 +38,11 @@ struct x86_quirks {
38 void (*mpc_oem_pci_bus)(struct mpc_config_bus *m); 38 void (*mpc_oem_pci_bus)(struct mpc_config_bus *m);
39 void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable, 39 void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
40 unsigned short oemsize); 40 unsigned short oemsize);
41 int (*setup_ioapic_ids)(void);
41}; 42};
42 43
43extern struct x86_quirks *x86_quirks; 44extern struct x86_quirks *x86_quirks;
45extern unsigned long saved_video_mode;
44 46
45#ifndef CONFIG_PARAVIRT 47#ifndef CONFIG_PARAVIRT
46#define paravirt_post_allocator_init() do {} while (0) 48#define paravirt_post_allocator_init() do {} while (0)
@@ -100,4 +102,4 @@ void __init x86_64_start_reservations(char *real_mode_data);
100#endif /* __ASSEMBLY__ */ 102#endif /* __ASSEMBLY__ */
101#endif /* __KERNEL__ */ 103#endif /* __KERNEL__ */
102 104
103#endif /* _ASM_X86_SETUP_H */ 105#endif /* ASM_X86__SETUP_H */
diff --git a/include/asm-x86/shmbuf.h b/include/asm-x86/shmbuf.h
index b51413b74971..f51aec2298e9 100644
--- a/include/asm-x86/shmbuf.h
+++ b/include/asm-x86/shmbuf.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SHMBUF_H 1#ifndef ASM_X86__SHMBUF_H
2#define _ASM_X86_SHMBUF_H 2#define ASM_X86__SHMBUF_H
3 3
4/* 4/*
5 * The shmid64_ds structure for x86 architecture. 5 * The shmid64_ds structure for x86 architecture.
@@ -48,4 +48,4 @@ struct shminfo64 {
48 unsigned long __unused4; 48 unsigned long __unused4;
49}; 49};
50 50
51#endif /* _ASM_X86_SHMBUF_H */ 51#endif /* ASM_X86__SHMBUF_H */
diff --git a/include/asm-x86/shmparam.h b/include/asm-x86/shmparam.h
index 0880cf0917b9..a83a1fd96a0e 100644
--- a/include/asm-x86/shmparam.h
+++ b/include/asm-x86/shmparam.h
@@ -1,6 +1,6 @@
1#ifndef _ASM_X86_SHMPARAM_H 1#ifndef ASM_X86__SHMPARAM_H
2#define _ASM_X86_SHMPARAM_H 2#define ASM_X86__SHMPARAM_H
3 3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ 4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5 5
6#endif /* _ASM_X86_SHMPARAM_H */ 6#endif /* ASM_X86__SHMPARAM_H */
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h
index 2f9c884d2c0f..ee813f4fe5d5 100644
--- a/include/asm-x86/sigcontext.h
+++ b/include/asm-x86/sigcontext.h
@@ -1,9 +1,43 @@
1#ifndef _ASM_X86_SIGCONTEXT_H 1#ifndef ASM_X86__SIGCONTEXT_H
2#define _ASM_X86_SIGCONTEXT_H 2#define ASM_X86__SIGCONTEXT_H
3 3
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5#include <asm/types.h> 5#include <asm/types.h>
6 6
7#define FP_XSTATE_MAGIC1 0x46505853U
8#define FP_XSTATE_MAGIC2 0x46505845U
9#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)
10
11/*
12 * bytes 464..511 in the current 512byte layout of fxsave/fxrstor frame
13 * are reserved for SW usage. On cpu's supporting xsave/xrstor, these bytes
14 * are used to extended the fpstate pointer in the sigcontext, which now
15 * includes the extended state information along with fpstate information.
16 *
17 * Presence of FP_XSTATE_MAGIC1 at the beginning of this SW reserved
18 * area and FP_XSTATE_MAGIC2 at the end of memory layout
19 * (extended_size - FP_XSTATE_MAGIC2_SIZE) indicates the presence of the
20 * extended state information in the memory layout pointed by the fpstate
21 * pointer in sigcontext.
22 */
23struct _fpx_sw_bytes {
24 __u32 magic1; /* FP_XSTATE_MAGIC1 */
25 __u32 extended_size; /* total size of the layout referred by
26 * fpstate pointer in the sigcontext.
27 */
28 __u64 xstate_bv;
29 /* feature bit mask (including fp/sse/extended
30 * state) that is present in the memory
31 * layout.
32 */
33 __u32 xstate_size; /* actual xsave state size, based on the
34 * features saved in the layout.
35 * 'extended_size' will be greater than
36 * 'xstate_size'.
37 */
38 __u32 padding[7]; /* for future use. */
39};
40
7#ifdef __i386__ 41#ifdef __i386__
8/* 42/*
9 * As documented in the iBCS2 standard.. 43 * As documented in the iBCS2 standard..
@@ -53,7 +87,13 @@ struct _fpstate {
53 unsigned long reserved; 87 unsigned long reserved;
54 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ 88 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
55 struct _xmmreg _xmm[8]; 89 struct _xmmreg _xmm[8];
56 unsigned long padding[56]; 90 unsigned long padding1[44];
91
92 union {
93 unsigned long padding2[12];
94 struct _fpx_sw_bytes sw_reserved; /* represents the extended
95 * state info */
96 };
57}; 97};
58 98
59#define X86_FXSR_MAGIC 0x0000 99#define X86_FXSR_MAGIC 0x0000
@@ -79,7 +119,15 @@ struct sigcontext {
79 unsigned long flags; 119 unsigned long flags;
80 unsigned long sp_at_signal; 120 unsigned long sp_at_signal;
81 unsigned short ss, __ssh; 121 unsigned short ss, __ssh;
82 struct _fpstate __user *fpstate; 122
123 /*
124 * fpstate is really (struct _fpstate *) or (struct _xstate *)
125 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
126 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
127 * of extended memory layout. See comments at the defintion of
128 * (struct _fpx_sw_bytes)
129 */
130 void __user *fpstate; /* zero when no FPU/extended context */
83 unsigned long oldmask; 131 unsigned long oldmask;
84 unsigned long cr2; 132 unsigned long cr2;
85}; 133};
@@ -130,7 +178,12 @@ struct _fpstate {
130 __u32 mxcsr_mask; 178 __u32 mxcsr_mask;
131 __u32 st_space[32]; /* 8*16 bytes for each FP-reg */ 179 __u32 st_space[32]; /* 8*16 bytes for each FP-reg */
132 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */ 180 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */
133 __u32 reserved2[24]; 181 __u32 reserved2[12];
182 union {
183 __u32 reserved3[12];
184 struct _fpx_sw_bytes sw_reserved; /* represents the extended
185 * state information */
186 };
134}; 187};
135 188
136#ifdef __KERNEL__ 189#ifdef __KERNEL__
@@ -161,7 +214,15 @@ struct sigcontext {
161 unsigned long trapno; 214 unsigned long trapno;
162 unsigned long oldmask; 215 unsigned long oldmask;
163 unsigned long cr2; 216 unsigned long cr2;
164 struct _fpstate __user *fpstate; /* zero when no FPU context */ 217
218 /*
219 * fpstate is really (struct _fpstate *) or (struct _xstate *)
220 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
221 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
222 * of extended memory layout. See comments at the defintion of
223 * (struct _fpx_sw_bytes)
224 */
225 void __user *fpstate; /* zero when no FPU/extended context */
165 unsigned long reserved1[8]; 226 unsigned long reserved1[8];
166}; 227};
167#else /* __KERNEL__ */ 228#else /* __KERNEL__ */
@@ -202,4 +263,22 @@ struct sigcontext {
202 263
203#endif /* !__i386__ */ 264#endif /* !__i386__ */
204 265
205#endif 266struct _xsave_hdr {
267 __u64 xstate_bv;
268 __u64 reserved1[2];
269 __u64 reserved2[5];
270};
271
272/*
273 * Extended state pointed by the fpstate pointer in the sigcontext.
274 * In addition to the fpstate, information encoded in the xstate_hdr
275 * indicates the presence of other extended state information
276 * supported by the processor and OS.
277 */
278struct _xstate {
279 struct _fpstate fpstate;
280 struct _xsave_hdr xstate_hdr;
281 /* new processor state extensions go here */
282};
283
284#endif /* ASM_X86__SIGCONTEXT_H */
diff --git a/include/asm-x86/sigcontext32.h b/include/asm-x86/sigcontext32.h
index 57a9686fb491..8c347032c2f2 100644
--- a/include/asm-x86/sigcontext32.h
+++ b/include/asm-x86/sigcontext32.h
@@ -1,5 +1,5 @@
1#ifndef _SIGCONTEXT32_H 1#ifndef ASM_X86__SIGCONTEXT32_H
2#define _SIGCONTEXT32_H 1 2#define ASM_X86__SIGCONTEXT32_H
3 3
4/* signal context for 32bit programs. */ 4/* signal context for 32bit programs. */
5 5
@@ -40,7 +40,11 @@ struct _fpstate_ia32 {
40 __u32 reserved; 40 __u32 reserved;
41 struct _fpxreg _fxsr_st[8]; 41 struct _fpxreg _fxsr_st[8];
42 struct _xmmreg _xmm[8]; /* It's actually 16 */ 42 struct _xmmreg _xmm[8]; /* It's actually 16 */
43 __u32 padding[56]; 43 __u32 padding[44];
44 union {
45 __u32 padding2[12];
46 struct _fpx_sw_bytes sw_reserved;
47 };
44}; 48};
45 49
46struct sigcontext_ia32 { 50struct sigcontext_ia32 {
@@ -68,4 +72,4 @@ struct sigcontext_ia32 {
68 unsigned int cr2; 72 unsigned int cr2;
69}; 73};
70 74
71#endif 75#endif /* ASM_X86__SIGCONTEXT32_H */
diff --git a/include/asm-x86/siginfo.h b/include/asm-x86/siginfo.h
index a477bea0c2a1..808bdfb2958c 100644
--- a/include/asm-x86/siginfo.h
+++ b/include/asm-x86/siginfo.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SIGINFO_H 1#ifndef ASM_X86__SIGINFO_H
2#define _ASM_X86_SIGINFO_H 2#define ASM_X86__SIGINFO_H
3 3
4#ifdef __x86_64__ 4#ifdef __x86_64__
5# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) 5# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
@@ -7,4 +7,4 @@
7 7
8#include <asm-generic/siginfo.h> 8#include <asm-generic/siginfo.h>
9 9
10#endif 10#endif /* ASM_X86__SIGINFO_H */
diff --git a/include/asm-x86/signal.h b/include/asm-x86/signal.h
index 6dac49364e95..65acc82d267a 100644
--- a/include/asm-x86/signal.h
+++ b/include/asm-x86/signal.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SIGNAL_H 1#ifndef ASM_X86__SIGNAL_H
2#define _ASM_X86_SIGNAL_H 2#define ASM_X86__SIGNAL_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#include <linux/types.h> 5#include <linux/types.h>
@@ -140,6 +140,9 @@ struct sigaction {
140struct k_sigaction { 140struct k_sigaction {
141 struct sigaction sa; 141 struct sigaction sa;
142}; 142};
143
144extern void do_notify_resume(struct pt_regs *, void *, __u32);
145
143# else /* __KERNEL__ */ 146# else /* __KERNEL__ */
144/* Here we must cater to libcs that poke about in kernel headers. */ 147/* Here we must cater to libcs that poke about in kernel headers. */
145 148
@@ -256,4 +259,4 @@ struct pt_regs;
256#endif /* __KERNEL__ */ 259#endif /* __KERNEL__ */
257#endif /* __ASSEMBLY__ */ 260#endif /* __ASSEMBLY__ */
258 261
259#endif 262#endif /* ASM_X86__SIGNAL_H */
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index 3c877f74f279..29324c103341 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SMP_H_ 1#ifndef ASM_X86__SMP_H
2#define _ASM_X86_SMP_H_ 2#define ASM_X86__SMP_H
3#ifndef __ASSEMBLY__ 3#ifndef __ASSEMBLY__
4#include <linux/cpumask.h> 4#include <linux/cpumask.h>
5#include <linux/init.h> 5#include <linux/init.h>
@@ -34,6 +34,9 @@ extern cpumask_t cpu_initialized;
34DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); 34DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
35DECLARE_PER_CPU(cpumask_t, cpu_core_map); 35DECLARE_PER_CPU(cpumask_t, cpu_core_map);
36DECLARE_PER_CPU(u16, cpu_llc_id); 36DECLARE_PER_CPU(u16, cpu_llc_id);
37#ifdef CONFIG_X86_32
38DECLARE_PER_CPU(int, cpu_number);
39#endif
37 40
38DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); 41DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
39DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); 42DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
@@ -142,7 +145,6 @@ extern unsigned disabled_cpus __cpuinitdata;
142 * from the initial startup. We map APIC_BASE very early in page_setup(), 145 * from the initial startup. We map APIC_BASE very early in page_setup(),
143 * so this is correct in the x86 case. 146 * so this is correct in the x86 case.
144 */ 147 */
145DECLARE_PER_CPU(int, cpu_number);
146#define raw_smp_processor_id() (x86_read_percpu(cpu_number)) 148#define raw_smp_processor_id() (x86_read_percpu(cpu_number))
147extern int safe_smp_processor_id(void); 149extern int safe_smp_processor_id(void);
148 150
@@ -165,30 +167,33 @@ extern int safe_smp_processor_id(void);
165 167
166#ifdef CONFIG_X86_LOCAL_APIC 168#ifdef CONFIG_X86_LOCAL_APIC
167 169
170#ifndef CONFIG_X86_64
168static inline int logical_smp_processor_id(void) 171static inline int logical_smp_processor_id(void)
169{ 172{
170 /* we don't want to mark this access volatile - bad code generation */ 173 /* we don't want to mark this access volatile - bad code generation */
171 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); 174 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
172} 175}
173 176
174#ifndef CONFIG_X86_64 177#include <mach_apicdef.h>
175static inline unsigned int read_apic_id(void) 178static inline unsigned int read_apic_id(void)
176{ 179{
177 return *(u32 *)(APIC_BASE + APIC_ID); 180 unsigned int reg;
181
182 reg = *(u32 *)(APIC_BASE + APIC_ID);
183
184 return GET_APIC_ID(reg);
178} 185}
179#else
180extern unsigned int read_apic_id(void);
181#endif 186#endif
182 187
183 188
184# ifdef APIC_DEFINITION 189# if defined(APIC_DEFINITION) || defined(CONFIG_X86_64)
185extern int hard_smp_processor_id(void); 190extern int hard_smp_processor_id(void);
186# else 191# else
187# include <mach_apicdef.h> 192#include <mach_apicdef.h>
188static inline int hard_smp_processor_id(void) 193static inline int hard_smp_processor_id(void)
189{ 194{
190 /* we don't want to mark this access volatile - bad code generation */ 195 /* we don't want to mark this access volatile - bad code generation */
191 return GET_APIC_ID(read_apic_id()); 196 return read_apic_id();
192} 197}
193# endif /* APIC_DEFINITION */ 198# endif /* APIC_DEFINITION */
194 199
@@ -205,4 +210,4 @@ extern void cpu_uninit(void);
205#endif 210#endif
206 211
207#endif /* __ASSEMBLY__ */ 212#endif /* __ASSEMBLY__ */
208#endif 213#endif /* ASM_X86__SMP_H */
diff --git a/include/asm-x86/socket.h b/include/asm-x86/socket.h
index 80af9c4ccad7..db73274c83c3 100644
--- a/include/asm-x86/socket.h
+++ b/include/asm-x86/socket.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_SOCKET_H 1#ifndef ASM_X86__SOCKET_H
2#define _ASM_SOCKET_H 2#define ASM_X86__SOCKET_H
3 3
4#include <asm/sockios.h> 4#include <asm/sockios.h>
5 5
@@ -54,4 +54,4 @@
54 54
55#define SO_MARK 36 55#define SO_MARK 36
56 56
57#endif /* _ASM_SOCKET_H */ 57#endif /* ASM_X86__SOCKET_H */
diff --git a/include/asm-x86/sockios.h b/include/asm-x86/sockios.h
index 49cc72b5d3c9..a006704fdc84 100644
--- a/include/asm-x86/sockios.h
+++ b/include/asm-x86/sockios.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SOCKIOS_H 1#ifndef ASM_X86__SOCKIOS_H
2#define _ASM_X86_SOCKIOS_H 2#define ASM_X86__SOCKIOS_H
3 3
4/* Socket-level I/O control calls. */ 4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901 5#define FIOSETOWN 0x8901
@@ -10,4 +10,4 @@
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ 10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ 11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12 12
13#endif /* _ASM_X86_SOCKIOS_H */ 13#endif /* ASM_X86__SOCKIOS_H */
diff --git a/include/asm-x86/sparsemem.h b/include/asm-x86/sparsemem.h
index 9bd48b0a534b..38f8e6bc3186 100644
--- a/include/asm-x86/sparsemem.h
+++ b/include/asm-x86/sparsemem.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SPARSEMEM_H 1#ifndef ASM_X86__SPARSEMEM_H
2#define _ASM_X86_SPARSEMEM_H 2#define ASM_X86__SPARSEMEM_H
3 3
4#ifdef CONFIG_SPARSEMEM 4#ifdef CONFIG_SPARSEMEM
5/* 5/*
@@ -31,4 +31,4 @@
31#endif 31#endif
32 32
33#endif /* CONFIG_SPARSEMEM */ 33#endif /* CONFIG_SPARSEMEM */
34#endif 34#endif /* ASM_X86__SPARSEMEM_H */
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h
index e39c790dbfd2..5d08fa280fdf 100644
--- a/include/asm-x86/spinlock.h
+++ b/include/asm-x86/spinlock.h
@@ -1,5 +1,5 @@
1#ifndef _X86_SPINLOCK_H_ 1#ifndef ASM_X86__SPINLOCK_H
2#define _X86_SPINLOCK_H_ 2#define ASM_X86__SPINLOCK_H
3 3
4#include <asm/atomic.h> 4#include <asm/atomic.h>
5#include <asm/rwlock.h> 5#include <asm/rwlock.h>
@@ -366,4 +366,4 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
366#define _raw_read_relax(lock) cpu_relax() 366#define _raw_read_relax(lock) cpu_relax()
367#define _raw_write_relax(lock) cpu_relax() 367#define _raw_write_relax(lock) cpu_relax()
368 368
369#endif 369#endif /* ASM_X86__SPINLOCK_H */
diff --git a/include/asm-x86/spinlock_types.h b/include/asm-x86/spinlock_types.h
index 06c071c9eee9..6aa9b562c508 100644
--- a/include/asm-x86/spinlock_types.h
+++ b/include/asm-x86/spinlock_types.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_SPINLOCK_TYPES_H 1#ifndef ASM_X86__SPINLOCK_TYPES_H
2#define __ASM_SPINLOCK_TYPES_H 2#define ASM_X86__SPINLOCK_TYPES_H
3 3
4#ifndef __LINUX_SPINLOCK_TYPES_H 4#ifndef __LINUX_SPINLOCK_TYPES_H
5# error "please don't include this file directly" 5# error "please don't include this file directly"
@@ -17,4 +17,4 @@ typedef struct {
17 17
18#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } 18#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
19 19
20#endif 20#endif /* ASM_X86__SPINLOCK_TYPES_H */
diff --git a/include/asm-x86/srat.h b/include/asm-x86/srat.h
index 774c919dc232..5363e4f7e1cd 100644
--- a/include/asm-x86/srat.h
+++ b/include/asm-x86/srat.h
@@ -24,8 +24,8 @@
24 * Send feedback to Pat Gaughen <gone@us.ibm.com> 24 * Send feedback to Pat Gaughen <gone@us.ibm.com>
25 */ 25 */
26 26
27#ifndef _ASM_SRAT_H_ 27#ifndef ASM_X86__SRAT_H
28#define _ASM_SRAT_H_ 28#define ASM_X86__SRAT_H
29 29
30#ifdef CONFIG_ACPI_NUMA 30#ifdef CONFIG_ACPI_NUMA
31extern int get_memcfg_from_srat(void); 31extern int get_memcfg_from_srat(void);
@@ -36,4 +36,4 @@ static inline int get_memcfg_from_srat(void)
36} 36}
37#endif 37#endif
38 38
39#endif /* _ASM_SRAT_H_ */ 39#endif /* ASM_X86__SRAT_H */
diff --git a/include/asm-x86/stacktrace.h b/include/asm-x86/stacktrace.h
index 30f82526a8e2..f43517e28532 100644
--- a/include/asm-x86/stacktrace.h
+++ b/include/asm-x86/stacktrace.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_STACKTRACE_H 1#ifndef ASM_X86__STACKTRACE_H
2#define _ASM_STACKTRACE_H 1 2#define ASM_X86__STACKTRACE_H
3 3
4extern int kstack_depth_to_print; 4extern int kstack_depth_to_print;
5 5
@@ -18,4 +18,4 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
18 unsigned long *stack, unsigned long bp, 18 unsigned long *stack, unsigned long bp,
19 const struct stacktrace_ops *ops, void *data); 19 const struct stacktrace_ops *ops, void *data);
20 20
21#endif 21#endif /* ASM_X86__STACKTRACE_H */
diff --git a/include/asm-x86/stat.h b/include/asm-x86/stat.h
index 5c22dcb5d17e..1e120f628905 100644
--- a/include/asm-x86/stat.h
+++ b/include/asm-x86/stat.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_STAT_H 1#ifndef ASM_X86__STAT_H
2#define _ASM_X86_STAT_H 2#define ASM_X86__STAT_H
3 3
4#define STAT_HAVE_NSEC 1 4#define STAT_HAVE_NSEC 1
5 5
@@ -111,4 +111,4 @@ struct __old_kernel_stat {
111#endif 111#endif
112}; 112};
113 113
114#endif 114#endif /* ASM_X86__STAT_H */
diff --git a/include/asm-x86/statfs.h b/include/asm-x86/statfs.h
index 7c651aa97252..3f005bc3aa5b 100644
--- a/include/asm-x86/statfs.h
+++ b/include/asm-x86/statfs.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_STATFS_H 1#ifndef ASM_X86__STATFS_H
2#define _ASM_X86_STATFS_H 2#define ASM_X86__STATFS_H
3 3
4#ifdef __i386__ 4#ifdef __i386__
5#include <asm-generic/statfs.h> 5#include <asm-generic/statfs.h>
@@ -60,4 +60,4 @@ struct compat_statfs64 {
60} __attribute__((packed)); 60} __attribute__((packed));
61 61
62#endif /* !__i386__ */ 62#endif /* !__i386__ */
63#endif 63#endif /* ASM_X86__STATFS_H */
diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h
index 193578cd1fd9..487843ed245a 100644
--- a/include/asm-x86/string_32.h
+++ b/include/asm-x86/string_32.h
@@ -1,5 +1,5 @@
1#ifndef _I386_STRING_H_ 1#ifndef ASM_X86__STRING_32_H
2#define _I386_STRING_H_ 2#define ASM_X86__STRING_32_H
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
@@ -323,4 +323,4 @@ extern void *memscan(void *addr, int c, size_t size);
323 323
324#endif /* __KERNEL__ */ 324#endif /* __KERNEL__ */
325 325
326#endif 326#endif /* ASM_X86__STRING_32_H */
diff --git a/include/asm-x86/string_64.h b/include/asm-x86/string_64.h
index 52b5ab383395..a2add11d3b66 100644
--- a/include/asm-x86/string_64.h
+++ b/include/asm-x86/string_64.h
@@ -1,5 +1,5 @@
1#ifndef _X86_64_STRING_H_ 1#ifndef ASM_X86__STRING_64_H
2#define _X86_64_STRING_H_ 2#define ASM_X86__STRING_64_H
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
@@ -57,4 +57,4 @@ int strcmp(const char *cs, const char *ct);
57 57
58#endif /* __KERNEL__ */ 58#endif /* __KERNEL__ */
59 59
60#endif 60#endif /* ASM_X86__STRING_64_H */
diff --git a/include/asm-x86/mach-summit/mach_apic.h b/include/asm-x86/summit/apic.h
index c47e2ab5c5ca..c5b2e4b10358 100644
--- a/include/asm-x86/mach-summit/mach_apic.h
+++ b/include/asm-x86/summit/apic.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_APIC_H 1#ifndef __ASM_SUMMIT_APIC_H
2#define __ASM_MACH_APIC_H 2#define __ASM_SUMMIT_APIC_H
3 3
4#include <asm/smp.h> 4#include <asm/smp.h>
5 5
@@ -21,7 +21,7 @@ static inline cpumask_t target_cpus(void)
21 * Just start on cpu 0. IRQ balancing will spread load 21 * Just start on cpu 0. IRQ balancing will spread load
22 */ 22 */
23 return cpumask_of_cpu(0); 23 return cpumask_of_cpu(0);
24} 24}
25#define TARGET_CPUS (target_cpus()) 25#define TARGET_CPUS (target_cpus())
26 26
27#define INT_DELIVERY_MODE (dest_LowestPrio) 27#define INT_DELIVERY_MODE (dest_LowestPrio)
@@ -30,10 +30,10 @@ static inline cpumask_t target_cpus(void)
30static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) 30static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
31{ 31{
32 return 0; 32 return 0;
33} 33}
34 34
35/* we don't use the phys_cpu_present_map to indicate apicid presence */ 35/* we don't use the phys_cpu_present_map to indicate apicid presence */
36static inline unsigned long check_apicid_present(int bit) 36static inline unsigned long check_apicid_present(int bit)
37{ 37{
38 return 1; 38 return 1;
39} 39}
@@ -122,7 +122,7 @@ static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_id_map)
122 122
123static inline physid_mask_t apicid_to_cpu_present(int apicid) 123static inline physid_mask_t apicid_to_cpu_present(int apicid)
124{ 124{
125 return physid_mask_of_physid(apicid); 125 return physid_mask_of_physid(0);
126} 126}
127 127
128static inline void setup_portio_remap(void) 128static inline void setup_portio_remap(void)
@@ -143,22 +143,22 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
143 int num_bits_set; 143 int num_bits_set;
144 int cpus_found = 0; 144 int cpus_found = 0;
145 int cpu; 145 int cpu;
146 int apicid; 146 int apicid;
147 147
148 num_bits_set = cpus_weight(cpumask); 148 num_bits_set = cpus_weight(cpumask);
149 /* Return id to all */ 149 /* Return id to all */
150 if (num_bits_set == NR_CPUS) 150 if (num_bits_set == NR_CPUS)
151 return (int) 0xFF; 151 return (int) 0xFF;
152 /* 152 /*
153 * The cpus in the mask must all be on the apic cluster. If are not 153 * The cpus in the mask must all be on the apic cluster. If are not
154 * on the same apicid cluster return default value of TARGET_CPUS. 154 * on the same apicid cluster return default value of TARGET_CPUS.
155 */ 155 */
156 cpu = first_cpu(cpumask); 156 cpu = first_cpu(cpumask);
157 apicid = cpu_to_logical_apicid(cpu); 157 apicid = cpu_to_logical_apicid(cpu);
158 while (cpus_found < num_bits_set) { 158 while (cpus_found < num_bits_set) {
159 if (cpu_isset(cpu, cpumask)) { 159 if (cpu_isset(cpu, cpumask)) {
160 int new_apicid = cpu_to_logical_apicid(cpu); 160 int new_apicid = cpu_to_logical_apicid(cpu);
161 if (apicid_cluster(apicid) != 161 if (apicid_cluster(apicid) !=
162 apicid_cluster(new_apicid)){ 162 apicid_cluster(new_apicid)){
163 printk ("%s: Not a valid mask!\n",__FUNCTION__); 163 printk ("%s: Not a valid mask!\n",__FUNCTION__);
164 return 0xFF; 164 return 0xFF;
@@ -182,4 +182,4 @@ static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
182 return hard_smp_processor_id() >> index_msb; 182 return hard_smp_processor_id() >> index_msb;
183} 183}
184 184
185#endif /* __ASM_MACH_APIC_H */ 185#endif /* __ASM_SUMMIT_APIC_H */
diff --git a/include/asm-x86/summit/apicdef.h b/include/asm-x86/summit/apicdef.h
new file mode 100644
index 000000000000..f3fbca1f61c1
--- /dev/null
+++ b/include/asm-x86/summit/apicdef.h
@@ -0,0 +1,13 @@
1#ifndef __ASM_SUMMIT_APICDEF_H
2#define __ASM_SUMMIT_APICDEF_H
3
4#define APIC_ID_MASK (0xFF<<24)
5
6static inline unsigned get_apic_id(unsigned long x)
7{
8 return (x>>24)&0xFF;
9}
10
11#define GET_APIC_ID(x) get_apic_id(x)
12
13#endif
diff --git a/include/asm-x86/mach-summit/mach_ipi.h b/include/asm-x86/summit/ipi.h
index 9404c535b7ec..53bd1e7bd7b4 100644
--- a/include/asm-x86/mach-summit/mach_ipi.h
+++ b/include/asm-x86/summit/ipi.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_MACH_IPI_H 1#ifndef __ASM_SUMMIT_IPI_H
2#define __ASM_MACH_IPI_H 2#define __ASM_SUMMIT_IPI_H
3 3
4void send_IPI_mask_sequence(cpumask_t mask, int vector); 4void send_IPI_mask_sequence(cpumask_t mask, int vector);
5 5
@@ -22,4 +22,4 @@ static inline void send_IPI_all(int vector)
22 send_IPI_mask(cpu_online_map, vector); 22 send_IPI_mask(cpu_online_map, vector);
23} 23}
24 24
25#endif /* __ASM_MACH_IPI_H */ 25#endif /* __ASM_SUMMIT_IPI_H */
diff --git a/include/asm-x86/mach-summit/irq_vectors_limits.h b/include/asm-x86/summit/irq_vectors_limits.h
index 890ce3f5e09a..890ce3f5e09a 100644
--- a/include/asm-x86/mach-summit/irq_vectors_limits.h
+++ b/include/asm-x86/summit/irq_vectors_limits.h
diff --git a/include/asm-x86/mach-summit/mach_mpparse.h b/include/asm-x86/summit/mpparse.h
index fdf591701339..013ce6fab2d5 100644
--- a/include/asm-x86/mach-summit/mach_mpparse.h
+++ b/include/asm-x86/summit/mpparse.h
@@ -1,7 +1,6 @@
1#ifndef __ASM_MACH_MPPARSE_H 1#ifndef __ASM_SUMMIT_MPPARSE_H
2#define __ASM_MACH_MPPARSE_H 2#define __ASM_SUMMIT_MPPARSE_H
3 3
4#include <mach_apic.h>
5#include <asm/tsc.h> 4#include <asm/tsc.h>
6 5
7extern int use_cyclone; 6extern int use_cyclone;
@@ -12,11 +11,11 @@ extern void setup_summit(void);
12#define setup_summit() {} 11#define setup_summit() {}
13#endif 12#endif
14 13
15static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, 14static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
16 char *productid) 15 char *productid)
17{ 16{
18 if (!strncmp(oem, "IBM ENSW", 8) && 17 if (!strncmp(oem, "IBM ENSW", 8) &&
19 (!strncmp(productid, "VIGIL SMP", 9) 18 (!strncmp(productid, "VIGIL SMP", 9)
20 || !strncmp(productid, "EXA", 3) 19 || !strncmp(productid, "EXA", 3)
21 || !strncmp(productid, "RUTHLESS SMP", 12))){ 20 || !strncmp(productid, "RUTHLESS SMP", 12))){
22 mark_tsc_unstable("Summit based system"); 21 mark_tsc_unstable("Summit based system");
@@ -107,4 +106,4 @@ static inline int is_WPEG(struct rio_detail *rio){
107 rio->type == LookOutAWPEG || rio->type == LookOutBWPEG); 106 rio->type == LookOutAWPEG || rio->type == LookOutBWPEG);
108} 107}
109 108
110#endif /* __ASM_MACH_MPPARSE_H */ 109#endif /* __ASM_SUMMIT_MPPARSE_H */
diff --git a/include/asm-x86/suspend_32.h b/include/asm-x86/suspend_32.h
index 8675c6782a7d..acb6d4d491f4 100644
--- a/include/asm-x86/suspend_32.h
+++ b/include/asm-x86/suspend_32.h
@@ -3,8 +3,8 @@
3 * Based on code 3 * Based on code
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org> 4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
5 */ 5 */
6#ifndef __ASM_X86_32_SUSPEND_H 6#ifndef ASM_X86__SUSPEND_32_H
7#define __ASM_X86_32_SUSPEND_H 7#define ASM_X86__SUSPEND_32_H
8 8
9#include <asm/desc.h> 9#include <asm/desc.h>
10#include <asm/i387.h> 10#include <asm/i387.h>
@@ -48,4 +48,4 @@ static inline void acpi_save_register_state(unsigned long return_point)
48extern int acpi_save_state_mem(void); 48extern int acpi_save_state_mem(void);
49#endif 49#endif
50 50
51#endif /* __ASM_X86_32_SUSPEND_H */ 51#endif /* ASM_X86__SUSPEND_32_H */
diff --git a/include/asm-x86/suspend_64.h b/include/asm-x86/suspend_64.h
index dc3262b43072..cf821dd310e8 100644
--- a/include/asm-x86/suspend_64.h
+++ b/include/asm-x86/suspend_64.h
@@ -3,8 +3,8 @@
3 * Based on code 3 * Based on code
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org> 4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
5 */ 5 */
6#ifndef __ASM_X86_64_SUSPEND_H 6#ifndef ASM_X86__SUSPEND_64_H
7#define __ASM_X86_64_SUSPEND_H 7#define ASM_X86__SUSPEND_64_H
8 8
9#include <asm/desc.h> 9#include <asm/desc.h>
10#include <asm/i387.h> 10#include <asm/i387.h>
@@ -49,4 +49,4 @@ extern int acpi_save_state_mem(void);
49extern char core_restore_code; 49extern char core_restore_code;
50extern char restore_registers; 50extern char restore_registers;
51 51
52#endif /* __ASM_X86_64_SUSPEND_H */ 52#endif /* ASM_X86__SUSPEND_64_H */
diff --git a/include/asm-x86/swiotlb.h b/include/asm-x86/swiotlb.h
index 2730b351afcf..1e20adbcad4b 100644
--- a/include/asm-x86/swiotlb.h
+++ b/include/asm-x86/swiotlb.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_SWIOTLB_H 1#ifndef ASM_X86__SWIOTLB_H
2#define _ASM_SWIOTLB_H 1 2#define ASM_X86__SWIOTLB_H
3 3
4#include <asm/dma-mapping.h> 4#include <asm/dma-mapping.h>
5 5
@@ -55,4 +55,4 @@ static inline void pci_swiotlb_init(void)
55 55
56static inline void dma_mark_clean(void *addr, size_t size) {} 56static inline void dma_mark_clean(void *addr, size_t size) {}
57 57
58#endif /* _ASM_SWIOTLB_H */ 58#endif /* ASM_X86__SWIOTLB_H */
diff --git a/include/asm-x86/sync_bitops.h b/include/asm-x86/sync_bitops.h
index b47a1d0b8a83..b689bee71104 100644
--- a/include/asm-x86/sync_bitops.h
+++ b/include/asm-x86/sync_bitops.h
@@ -1,5 +1,5 @@
1#ifndef _I386_SYNC_BITOPS_H 1#ifndef ASM_X86__SYNC_BITOPS_H
2#define _I386_SYNC_BITOPS_H 2#define ASM_X86__SYNC_BITOPS_H
3 3
4/* 4/*
5 * Copyright 1992, Linus Torvalds. 5 * Copyright 1992, Linus Torvalds.
@@ -127,4 +127,4 @@ static inline int sync_test_and_change_bit(int nr, volatile unsigned long *addr)
127 127
128#undef ADDR 128#undef ADDR
129 129
130#endif /* _I386_SYNC_BITOPS_H */ 130#endif /* ASM_X86__SYNC_BITOPS_H */
diff --git a/include/asm-x86/syscall.h b/include/asm-x86/syscall.h
new file mode 100644
index 000000000000..04c47dc5597c
--- /dev/null
+++ b/include/asm-x86/syscall.h
@@ -0,0 +1,211 @@
1/*
2 * Access to user system call parameters and results
3 *
4 * Copyright (C) 2008 Red Hat, Inc. All rights reserved.
5 *
6 * This copyrighted material is made available to anyone wishing to use,
7 * modify, copy, or redistribute it subject to the terms and conditions
8 * of the GNU General Public License v.2.
9 *
10 * See asm-generic/syscall.h for descriptions of what we must do here.
11 */
12
13#ifndef _ASM_SYSCALL_H
14#define _ASM_SYSCALL_H 1
15
16#include <linux/sched.h>
17#include <linux/err.h>
18
19static inline long syscall_get_nr(struct task_struct *task,
20 struct pt_regs *regs)
21{
22 /*
23 * We always sign-extend a -1 value being set here,
24 * so this is always either -1L or a syscall number.
25 */
26 return regs->orig_ax;
27}
28
29static inline void syscall_rollback(struct task_struct *task,
30 struct pt_regs *regs)
31{
32 regs->ax = regs->orig_ax;
33}
34
35static inline long syscall_get_error(struct task_struct *task,
36 struct pt_regs *regs)
37{
38 unsigned long error = regs->ax;
39#ifdef CONFIG_IA32_EMULATION
40 /*
41 * TS_COMPAT is set for 32-bit syscall entries and then
42 * remains set until we return to user mode.
43 */
44 if (task_thread_info(task)->status & TS_COMPAT)
45 /*
46 * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
47 * and will match correctly in comparisons.
48 */
49 error = (long) (int) error;
50#endif
51 return IS_ERR_VALUE(error) ? error : 0;
52}
53
54static inline long syscall_get_return_value(struct task_struct *task,
55 struct pt_regs *regs)
56{
57 return regs->ax;
58}
59
60static inline void syscall_set_return_value(struct task_struct *task,
61 struct pt_regs *regs,
62 int error, long val)
63{
64 regs->ax = (long) error ?: val;
65}
66
67#ifdef CONFIG_X86_32
68
69static inline void syscall_get_arguments(struct task_struct *task,
70 struct pt_regs *regs,
71 unsigned int i, unsigned int n,
72 unsigned long *args)
73{
74 BUG_ON(i + n > 6);
75 memcpy(args, &regs->bx + i, n * sizeof(args[0]));
76}
77
78static inline void syscall_set_arguments(struct task_struct *task,
79 struct pt_regs *regs,
80 unsigned int i, unsigned int n,
81 const unsigned long *args)
82{
83 BUG_ON(i + n > 6);
84 memcpy(&regs->bx + i, args, n * sizeof(args[0]));
85}
86
87#else /* CONFIG_X86_64 */
88
89static inline void syscall_get_arguments(struct task_struct *task,
90 struct pt_regs *regs,
91 unsigned int i, unsigned int n,
92 unsigned long *args)
93{
94# ifdef CONFIG_IA32_EMULATION
95 if (task_thread_info(task)->status & TS_COMPAT)
96 switch (i + n) {
97 case 6:
98 if (!n--) break;
99 *args++ = regs->bp;
100 case 5:
101 if (!n--) break;
102 *args++ = regs->di;
103 case 4:
104 if (!n--) break;
105 *args++ = regs->si;
106 case 3:
107 if (!n--) break;
108 *args++ = regs->dx;
109 case 2:
110 if (!n--) break;
111 *args++ = regs->cx;
112 case 1:
113 if (!n--) break;
114 *args++ = regs->bx;
115 case 0:
116 if (!n--) break;
117 default:
118 BUG();
119 break;
120 }
121 else
122# endif
123 switch (i + n) {
124 case 6:
125 if (!n--) break;
126 *args++ = regs->r9;
127 case 5:
128 if (!n--) break;
129 *args++ = regs->r8;
130 case 4:
131 if (!n--) break;
132 *args++ = regs->r10;
133 case 3:
134 if (!n--) break;
135 *args++ = regs->dx;
136 case 2:
137 if (!n--) break;
138 *args++ = regs->si;
139 case 1:
140 if (!n--) break;
141 *args++ = regs->di;
142 case 0:
143 if (!n--) break;
144 default:
145 BUG();
146 break;
147 }
148}
149
150static inline void syscall_set_arguments(struct task_struct *task,
151 struct pt_regs *regs,
152 unsigned int i, unsigned int n,
153 const unsigned long *args)
154{
155# ifdef CONFIG_IA32_EMULATION
156 if (task_thread_info(task)->status & TS_COMPAT)
157 switch (i + n) {
158 case 6:
159 if (!n--) break;
160 regs->bp = *args++;
161 case 5:
162 if (!n--) break;
163 regs->di = *args++;
164 case 4:
165 if (!n--) break;
166 regs->si = *args++;
167 case 3:
168 if (!n--) break;
169 regs->dx = *args++;
170 case 2:
171 if (!n--) break;
172 regs->cx = *args++;
173 case 1:
174 if (!n--) break;
175 regs->bx = *args++;
176 case 0:
177 if (!n--) break;
178 default:
179 BUG();
180 }
181 else
182# endif
183 switch (i + n) {
184 case 6:
185 if (!n--) break;
186 regs->r9 = *args++;
187 case 5:
188 if (!n--) break;
189 regs->r8 = *args++;
190 case 4:
191 if (!n--) break;
192 regs->r10 = *args++;
193 case 3:
194 if (!n--) break;
195 regs->dx = *args++;
196 case 2:
197 if (!n--) break;
198 regs->si = *args++;
199 case 1:
200 if (!n--) break;
201 regs->di = *args++;
202 case 0:
203 if (!n--) break;
204 default:
205 BUG();
206 }
207}
208
209#endif /* CONFIG_X86_32 */
210
211#endif /* _ASM_SYSCALL_H */
diff --git a/include/asm-x86/syscalls.h b/include/asm-x86/syscalls.h
new file mode 100644
index 000000000000..87803da44010
--- /dev/null
+++ b/include/asm-x86/syscalls.h
@@ -0,0 +1,93 @@
1/*
2 * syscalls.h - Linux syscall interfaces (arch-specific)
3 *
4 * Copyright (c) 2008 Jaswinder Singh
5 *
6 * This file is released under the GPLv2.
7 * See the file COPYING for more details.
8 */
9
10#ifndef _ASM_X86_SYSCALLS_H
11#define _ASM_X86_SYSCALLS_H
12
13#include <linux/compiler.h>
14#include <linux/linkage.h>
15#include <linux/types.h>
16#include <linux/signal.h>
17
18/* Common in X86_32 and X86_64 */
19/* kernel/ioport.c */
20asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
21
22/* X86_32 only */
23#ifdef CONFIG_X86_32
24/* kernel/process_32.c */
25asmlinkage int sys_fork(struct pt_regs);
26asmlinkage int sys_clone(struct pt_regs);
27asmlinkage int sys_vfork(struct pt_regs);
28asmlinkage int sys_execve(struct pt_regs);
29
30/* kernel/signal_32.c */
31asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
32asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
33 struct old_sigaction __user *);
34asmlinkage int sys_sigaltstack(unsigned long);
35asmlinkage unsigned long sys_sigreturn(unsigned long);
36asmlinkage int sys_rt_sigreturn(unsigned long);
37
38/* kernel/ioport.c */
39asmlinkage long sys_iopl(unsigned long);
40
41/* kernel/ldt.c */
42asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
43
44/* kernel/sys_i386_32.c */
45asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
46 unsigned long, unsigned long, unsigned long);
47struct mmap_arg_struct;
48asmlinkage int old_mmap(struct mmap_arg_struct __user *);
49struct sel_arg_struct;
50asmlinkage int old_select(struct sel_arg_struct __user *);
51asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
52struct old_utsname;
53asmlinkage int sys_uname(struct old_utsname __user *);
54struct oldold_utsname;
55asmlinkage int sys_olduname(struct oldold_utsname __user *);
56
57/* kernel/tls.c */
58asmlinkage int sys_set_thread_area(struct user_desc __user *);
59asmlinkage int sys_get_thread_area(struct user_desc __user *);
60
61/* kernel/vm86_32.c */
62asmlinkage int sys_vm86old(struct pt_regs);
63asmlinkage int sys_vm86(struct pt_regs);
64
65#else /* CONFIG_X86_32 */
66
67/* X86_64 only */
68/* kernel/process_64.c */
69asmlinkage long sys_fork(struct pt_regs *);
70asmlinkage long sys_clone(unsigned long, unsigned long,
71 void __user *, void __user *,
72 struct pt_regs *);
73asmlinkage long sys_vfork(struct pt_regs *);
74asmlinkage long sys_execve(char __user *, char __user * __user *,
75 char __user * __user *,
76 struct pt_regs *);
77
78/* kernel/ioport.c */
79asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
80
81/* kernel/signal_64.c */
82asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
83 struct pt_regs *);
84asmlinkage long sys_rt_sigreturn(struct pt_regs *);
85
86/* kernel/sys_x86_64.c */
87asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
88 unsigned long, unsigned long, unsigned long);
89struct new_utsname;
90asmlinkage long sys_uname(struct new_utsname __user *);
91
92#endif /* CONFIG_X86_32 */
93#endif /* _ASM_X86_SYSCALLS_H */
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
index 983ce37c491f..34505dd7b24d 100644
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_SYSTEM_H_ 1#ifndef ASM_X86__SYSTEM_H
2#define _ASM_X86_SYSTEM_H_ 2#define ASM_X86__SYSTEM_H
3 3
4#include <asm/asm.h> 4#include <asm/asm.h>
5#include <asm/segment.h> 5#include <asm/segment.h>
@@ -419,4 +419,4 @@ static inline void rdtsc_barrier(void)
419 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC); 419 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
420} 420}
421 421
422#endif 422#endif /* ASM_X86__SYSTEM_H */
diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h
index 97fa251ccb2b..5aedb8bffc5a 100644
--- a/include/asm-x86/system_64.h
+++ b/include/asm-x86/system_64.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_SYSTEM_H 1#ifndef ASM_X86__SYSTEM_64_H
2#define __ASM_SYSTEM_H 2#define ASM_X86__SYSTEM_64_H
3 3
4#include <asm/segment.h> 4#include <asm/segment.h>
5#include <asm/cmpxchg.h> 5#include <asm/cmpxchg.h>
@@ -19,4 +19,4 @@ static inline void write_cr8(unsigned long val)
19 19
20#include <linux/irqflags.h> 20#include <linux/irqflags.h>
21 21
22#endif 22#endif /* ASM_X86__SYSTEM_64_H */
diff --git a/include/asm-x86/tce.h b/include/asm-x86/tce.h
index b1a4ea00df78..e7932d7fbbab 100644
--- a/include/asm-x86/tce.h
+++ b/include/asm-x86/tce.h
@@ -21,8 +21,8 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24#ifndef _ASM_X86_64_TCE_H 24#ifndef ASM_X86__TCE_H
25#define _ASM_X86_64_TCE_H 25#define ASM_X86__TCE_H
26 26
27extern unsigned int specified_table_size; 27extern unsigned int specified_table_size;
28struct iommu_table; 28struct iommu_table;
@@ -45,4 +45,4 @@ extern void * __init alloc_tce_table(void);
45extern void __init free_tce_table(void *tbl); 45extern void __init free_tce_table(void *tbl);
46extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar); 46extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar);
47 47
48#endif /* _ASM_X86_64_TCE_H */ 48#endif /* ASM_X86__TCE_H */
diff --git a/include/asm-x86/termbits.h b/include/asm-x86/termbits.h
index af1b70ea440f..3d00dc5e0c71 100644
--- a/include/asm-x86/termbits.h
+++ b/include/asm-x86/termbits.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_TERMBITS_H 1#ifndef ASM_X86__TERMBITS_H
2#define _ASM_X86_TERMBITS_H 2#define ASM_X86__TERMBITS_H
3 3
4#include <linux/posix_types.h> 4#include <linux/posix_types.h>
5 5
@@ -195,4 +195,4 @@ struct ktermios {
195#define TCSADRAIN 1 195#define TCSADRAIN 1
196#define TCSAFLUSH 2 196#define TCSAFLUSH 2
197 197
198#endif /* _ASM_X86_TERMBITS_H */ 198#endif /* ASM_X86__TERMBITS_H */
diff --git a/include/asm-x86/termios.h b/include/asm-x86/termios.h
index f72956331c49..e235db248071 100644
--- a/include/asm-x86/termios.h
+++ b/include/asm-x86/termios.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_TERMIOS_H 1#ifndef ASM_X86__TERMIOS_H
2#define _ASM_X86_TERMIOS_H 2#define ASM_X86__TERMIOS_H
3 3
4#include <asm/termbits.h> 4#include <asm/termbits.h>
5#include <asm/ioctls.h> 5#include <asm/ioctls.h>
@@ -110,4 +110,4 @@ static inline int kernel_termios_to_user_termios_1(struct termios __user *u,
110 110
111#endif /* __KERNEL__ */ 111#endif /* __KERNEL__ */
112 112
113#endif /* _ASM_X86_TERMIOS_H */ 113#endif /* ASM_X86__TERMIOS_H */
diff --git a/include/asm-x86/therm_throt.h b/include/asm-x86/therm_throt.h
index 399bf6026b16..1c7f57b6b66e 100644
--- a/include/asm-x86/therm_throt.h
+++ b/include/asm-x86/therm_throt.h
@@ -1,9 +1,9 @@
1#ifndef __ASM_I386_THERM_THROT_H__ 1#ifndef ASM_X86__THERM_THROT_H
2#define __ASM_I386_THERM_THROT_H__ 1 2#define ASM_X86__THERM_THROT_H
3 3
4#include <asm/atomic.h> 4#include <asm/atomic.h>
5 5
6extern atomic_t therm_throt_en; 6extern atomic_t therm_throt_en;
7int therm_throt_process(int curr); 7int therm_throt_process(int curr);
8 8
9#endif /* __ASM_I386_THERM_THROT_H__ */ 9#endif /* ASM_X86__THERM_THROT_H */
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h
index da0a675adf94..3f4e52bb77f5 100644
--- a/include/asm-x86/thread_info.h
+++ b/include/asm-x86/thread_info.h
@@ -4,8 +4,8 @@
4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller 4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
5 */ 5 */
6 6
7#ifndef _ASM_X86_THREAD_INFO_H 7#ifndef ASM_X86__THREAD_INFO_H
8#define _ASM_X86_THREAD_INFO_H 8#define ASM_X86__THREAD_INFO_H
9 9
10#include <linux/compiler.h> 10#include <linux/compiler.h>
11#include <asm/page.h> 11#include <asm/page.h>
@@ -71,6 +71,7 @@ struct thread_info {
71 * Warning: layout of LSW is hardcoded in entry.S 71 * Warning: layout of LSW is hardcoded in entry.S
72 */ 72 */
73#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 73#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
74#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
74#define TIF_SIGPENDING 2 /* signal pending */ 75#define TIF_SIGPENDING 2 /* signal pending */
75#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 76#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
76#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ 77#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/
@@ -93,6 +94,7 @@ struct thread_info {
93#define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */ 94#define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */
94 95
95#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 96#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
97#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
96#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 98#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
97#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 99#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
98#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 100#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
@@ -133,7 +135,7 @@ struct thread_info {
133 135
134/* Only used for 64 bit */ 136/* Only used for 64 bit */
135#define _TIF_DO_NOTIFY_MASK \ 137#define _TIF_DO_NOTIFY_MASK \
136 (_TIF_SIGPENDING|_TIF_MCE_NOTIFY) 138 (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_NOTIFY_RESUME)
137 139
138/* flags to check in __switch_to() */ 140/* flags to check in __switch_to() */
139#define _TIF_WORK_CTXSW \ 141#define _TIF_WORK_CTXSW \
@@ -239,6 +241,7 @@ static inline struct thread_info *stack_thread_info(void)
239#define TS_POLLING 0x0004 /* true if in idle loop 241#define TS_POLLING 0x0004 /* true if in idle loop
240 and not sleeping */ 242 and not sleeping */
241#define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */ 243#define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */
244#define TS_XSAVE 0x0010 /* Use xsave/xrstor */
242 245
243#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) 246#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
244 247
@@ -258,4 +261,4 @@ extern void free_thread_info(struct thread_info *ti);
258extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); 261extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
259#define arch_task_cache_init arch_task_cache_init 262#define arch_task_cache_init arch_task_cache_init
260#endif 263#endif
261#endif /* _ASM_X86_THREAD_INFO_H */ 264#endif /* ASM_X86__THREAD_INFO_H */
diff --git a/include/asm-x86/time.h b/include/asm-x86/time.h
index a17fa473e91d..3e724eef7ac4 100644
--- a/include/asm-x86/time.h
+++ b/include/asm-x86/time.h
@@ -1,5 +1,5 @@
1#ifndef _ASMX86_TIME_H 1#ifndef ASM_X86__TIME_H
2#define _ASMX86_TIME_H 2#define ASM_X86__TIME_H
3 3
4extern void hpet_time_init(void); 4extern void hpet_time_init(void);
5 5
@@ -46,6 +46,8 @@ static inline int native_set_wallclock(unsigned long nowtime)
46 46
47#endif 47#endif
48 48
49extern void time_init(void);
50
49#ifdef CONFIG_PARAVIRT 51#ifdef CONFIG_PARAVIRT
50#include <asm/paravirt.h> 52#include <asm/paravirt.h>
51#else /* !CONFIG_PARAVIRT */ 53#else /* !CONFIG_PARAVIRT */
@@ -58,4 +60,4 @@ static inline int native_set_wallclock(unsigned long nowtime)
58 60
59extern unsigned long __init calibrate_cpu(void); 61extern unsigned long __init calibrate_cpu(void);
60 62
61#endif 63#endif /* ASM_X86__TIME_H */
diff --git a/include/asm-x86/timer.h b/include/asm-x86/timer.h
index fb2a4ddddf3d..d0babce4b47a 100644
--- a/include/asm-x86/timer.h
+++ b/include/asm-x86/timer.h
@@ -1,5 +1,5 @@
1#ifndef _ASMi386_TIMER_H 1#ifndef ASM_X86__TIMER_H
2#define _ASMi386_TIMER_H 2#define ASM_X86__TIMER_H
3#include <linux/init.h> 3#include <linux/init.h>
4#include <linux/pm.h> 4#include <linux/pm.h>
5#include <linux/percpu.h> 5#include <linux/percpu.h>
@@ -9,9 +9,12 @@
9unsigned long long native_sched_clock(void); 9unsigned long long native_sched_clock(void);
10unsigned long native_calibrate_tsc(void); 10unsigned long native_calibrate_tsc(void);
11 11
12#ifdef CONFIG_X86_32
12extern int timer_ack; 13extern int timer_ack;
13extern int no_timer_check;
14extern int recalibrate_cpu_khz(void); 14extern int recalibrate_cpu_khz(void);
15#endif /* CONFIG_X86_32 */
16
17extern int no_timer_check;
15 18
16#ifndef CONFIG_PARAVIRT 19#ifndef CONFIG_PARAVIRT
17#define calibrate_tsc() native_calibrate_tsc() 20#define calibrate_tsc() native_calibrate_tsc()
@@ -60,4 +63,4 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc)
60 return ns; 63 return ns;
61} 64}
62 65
63#endif 66#endif /* ASM_X86__TIMER_H */
diff --git a/include/asm-x86/timex.h b/include/asm-x86/timex.h
index 43e5a78500c5..d1ce2416a5da 100644
--- a/include/asm-x86/timex.h
+++ b/include/asm-x86/timex.h
@@ -1,6 +1,6 @@
1/* x86 architecture timex specifications */ 1/* x86 architecture timex specifications */
2#ifndef _ASM_X86_TIMEX_H 2#ifndef ASM_X86__TIMEX_H
3#define _ASM_X86_TIMEX_H 3#define ASM_X86__TIMEX_H
4 4
5#include <asm/processor.h> 5#include <asm/processor.h>
6#include <asm/tsc.h> 6#include <asm/tsc.h>
@@ -16,4 +16,4 @@
16 16
17#define ARCH_HAS_READ_CURRENT_TIMER 17#define ARCH_HAS_READ_CURRENT_TIMER
18 18
19#endif 19#endif /* ASM_X86__TIMEX_H */
diff --git a/include/asm-x86/tlb.h b/include/asm-x86/tlb.h
index e4e9e2d07a93..db36e9e89e87 100644
--- a/include/asm-x86/tlb.h
+++ b/include/asm-x86/tlb.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_TLB_H 1#ifndef ASM_X86__TLB_H
2#define _ASM_X86_TLB_H 2#define ASM_X86__TLB_H
3 3
4#define tlb_start_vma(tlb, vma) do { } while (0) 4#define tlb_start_vma(tlb, vma) do { } while (0)
5#define tlb_end_vma(tlb, vma) do { } while (0) 5#define tlb_end_vma(tlb, vma) do { } while (0)
@@ -8,4 +8,4 @@
8 8
9#include <asm-generic/tlb.h> 9#include <asm-generic/tlb.h>
10 10
11#endif 11#endif /* ASM_X86__TLB_H */
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h
index 35c76ceb9f40..ef68b76dc3c5 100644
--- a/include/asm-x86/tlbflush.h
+++ b/include/asm-x86/tlbflush.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_TLBFLUSH_H 1#ifndef ASM_X86__TLBFLUSH_H
2#define _ASM_X86_TLBFLUSH_H 2#define ASM_X86__TLBFLUSH_H
3 3
4#include <linux/mm.h> 4#include <linux/mm.h>
5#include <linux/sched.h> 5#include <linux/sched.h>
@@ -165,4 +165,4 @@ static inline void flush_tlb_kernel_range(unsigned long start,
165 flush_tlb_all(); 165 flush_tlb_all();
166} 166}
167 167
168#endif /* _ASM_X86_TLBFLUSH_H */ 168#endif /* ASM_X86__TLBFLUSH_H */
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
index 90ac7718469a..7eca9bc022b2 100644
--- a/include/asm-x86/topology.h
+++ b/include/asm-x86/topology.h
@@ -22,8 +22,8 @@
22 * 22 *
23 * Send feedback to <colpatch@us.ibm.com> 23 * Send feedback to <colpatch@us.ibm.com>
24 */ 24 */
25#ifndef _ASM_X86_TOPOLOGY_H 25#ifndef ASM_X86__TOPOLOGY_H
26#define _ASM_X86_TOPOLOGY_H 26#define ASM_X86__TOPOLOGY_H
27 27
28#ifdef CONFIG_X86_32 28#ifdef CONFIG_X86_32
29# ifdef CONFIG_X86_HT 29# ifdef CONFIG_X86_HT
@@ -255,4 +255,4 @@ static inline void set_mp_bus_to_node(int busnum, int node)
255} 255}
256#endif 256#endif
257 257
258#endif /* _ASM_X86_TOPOLOGY_H */ 258#endif /* ASM_X86__TOPOLOGY_H */
diff --git a/include/asm-x86/trampoline.h b/include/asm-x86/trampoline.h
index b156b08d0131..0406bbd898a9 100644
--- a/include/asm-x86/trampoline.h
+++ b/include/asm-x86/trampoline.h
@@ -1,5 +1,5 @@
1#ifndef __TRAMPOLINE_HEADER 1#ifndef ASM_X86__TRAMPOLINE_H
2#define __TRAMPOLINE_HEADER 2#define ASM_X86__TRAMPOLINE_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5 5
@@ -18,4 +18,4 @@ extern unsigned long setup_trampoline(void);
18 18
19#endif /* __ASSEMBLY__ */ 19#endif /* __ASSEMBLY__ */
20 20
21#endif /* __TRAMPOLINE_HEADER */ 21#endif /* ASM_X86__TRAMPOLINE_H */
diff --git a/include/asm-x86/traps.h b/include/asm-x86/traps.h
index a4b65a71bd66..2ccebc6fb0b0 100644
--- a/include/asm-x86/traps.h
+++ b/include/asm-x86/traps.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_TRAPS_H 1#ifndef ASM_X86__TRAPS_H
2#define _ASM_X86_TRAPS_H 2#define ASM_X86__TRAPS_H
3 3
4/* Common in X86_32 and X86_64 */ 4/* Common in X86_32 and X86_64 */
5asmlinkage void divide_error(void); 5asmlinkage void divide_error(void);
@@ -51,6 +51,8 @@ void do_spurious_interrupt_bug(struct pt_regs *, long);
51unsigned long patch_espfix_desc(unsigned long, unsigned long); 51unsigned long patch_espfix_desc(unsigned long, unsigned long);
52asmlinkage void math_emulate(long); 52asmlinkage void math_emulate(long);
53 53
54void do_page_fault(struct pt_regs *regs, unsigned long error_code);
55
54#else /* CONFIG_X86_32 */ 56#else /* CONFIG_X86_32 */
55 57
56asmlinkage void double_fault(void); 58asmlinkage void double_fault(void);
@@ -62,5 +64,7 @@ asmlinkage void do_coprocessor_error(struct pt_regs *);
62asmlinkage void do_simd_coprocessor_error(struct pt_regs *); 64asmlinkage void do_simd_coprocessor_error(struct pt_regs *);
63asmlinkage void do_spurious_interrupt_bug(struct pt_regs *); 65asmlinkage void do_spurious_interrupt_bug(struct pt_regs *);
64 66
67asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code);
68
65#endif /* CONFIG_X86_32 */ 69#endif /* CONFIG_X86_32 */
66#endif /* _ASM_X86_TRAPS_H */ 70#endif /* ASM_X86__TRAPS_H */
diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h
index cb6f6ee45b8f..ad0f5c41e78c 100644
--- a/include/asm-x86/tsc.h
+++ b/include/asm-x86/tsc.h
@@ -1,8 +1,8 @@
1/* 1/*
2 * x86 TSC related functions 2 * x86 TSC related functions
3 */ 3 */
4#ifndef _ASM_X86_TSC_H 4#ifndef ASM_X86__TSC_H
5#define _ASM_X86_TSC_H 5#define ASM_X86__TSC_H
6 6
7#include <asm/processor.h> 7#include <asm/processor.h>
8 8
@@ -59,4 +59,4 @@ extern void check_tsc_sync_target(void);
59 59
60extern int notsc_setup(char *); 60extern int notsc_setup(char *);
61 61
62#endif 62#endif /* ASM_X86__TSC_H */
diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h
index 1ac80cd9acf8..e78b52e17444 100644
--- a/include/asm-x86/types.h
+++ b/include/asm-x86/types.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_TYPES_H 1#ifndef ASM_X86__TYPES_H
2#define _ASM_X86_TYPES_H 2#define ASM_X86__TYPES_H
3 3
4#include <asm-generic/int-ll64.h> 4#include <asm-generic/int-ll64.h>
5 5
@@ -33,4 +33,4 @@ typedef u32 dma_addr_t;
33#endif /* __ASSEMBLY__ */ 33#endif /* __ASSEMBLY__ */
34#endif /* __KERNEL__ */ 34#endif /* __KERNEL__ */
35 35
36#endif 36#endif /* ASM_X86__TYPES_H */
diff --git a/include/asm-x86/uaccess.h b/include/asm-x86/uaccess.h
index 5f702d1d5218..48ebc0ad40ec 100644
--- a/include/asm-x86/uaccess.h
+++ b/include/asm-x86/uaccess.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_UACCES_H_ 1#ifndef ASM_X86__UACCESS_H
2#define _ASM_UACCES_H_ 2#define ASM_X86__UACCESS_H
3/* 3/*
4 * User space memory access functions 4 * User space memory access functions
5 */ 5 */
@@ -450,5 +450,5 @@ extern struct movsl_mask {
450# include "uaccess_64.h" 450# include "uaccess_64.h"
451#endif 451#endif
452 452
453#endif 453#endif /* ASM_X86__UACCESS_H */
454 454
diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h
index 6fdef39a0bcb..6b5b57d9c6d1 100644
--- a/include/asm-x86/uaccess_32.h
+++ b/include/asm-x86/uaccess_32.h
@@ -1,5 +1,5 @@
1#ifndef __i386_UACCESS_H 1#ifndef ASM_X86__UACCESS_32_H
2#define __i386_UACCESS_H 2#define ASM_X86__UACCESS_32_H
3 3
4/* 4/*
5 * User space memory access functions 5 * User space memory access functions
@@ -215,4 +215,4 @@ long strnlen_user(const char __user *str, long n);
215unsigned long __must_check clear_user(void __user *mem, unsigned long len); 215unsigned long __must_check clear_user(void __user *mem, unsigned long len);
216unsigned long __must_check __clear_user(void __user *mem, unsigned long len); 216unsigned long __must_check __clear_user(void __user *mem, unsigned long len);
217 217
218#endif /* __i386_UACCESS_H */ 218#endif /* ASM_X86__UACCESS_32_H */
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h
index 515d4dce96b5..5cfd2951c9e7 100644
--- a/include/asm-x86/uaccess_64.h
+++ b/include/asm-x86/uaccess_64.h
@@ -1,5 +1,5 @@
1#ifndef __X86_64_UACCESS_H 1#ifndef ASM_X86__UACCESS_64_H
2#define __X86_64_UACCESS_H 2#define ASM_X86__UACCESS_64_H
3 3
4/* 4/*
5 * User space memory access functions 5 * User space memory access functions
@@ -198,4 +198,4 @@ static inline int __copy_from_user_inatomic_nocache(void *dst,
198unsigned long 198unsigned long
199copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest); 199copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest);
200 200
201#endif /* __X86_64_UACCESS_H */ 201#endif /* ASM_X86__UACCESS_64_H */
diff --git a/include/asm-x86/ucontext.h b/include/asm-x86/ucontext.h
index 50a79f7fcde9..89eaa5456a7e 100644
--- a/include/asm-x86/ucontext.h
+++ b/include/asm-x86/ucontext.h
@@ -1,5 +1,11 @@
1#ifndef _ASM_X86_UCONTEXT_H 1#ifndef ASM_X86__UCONTEXT_H
2#define _ASM_X86_UCONTEXT_H 2#define ASM_X86__UCONTEXT_H
3
4#define UC_FP_XSTATE 0x1 /* indicates the presence of extended state
5 * information in the memory layout pointed
6 * by the fpstate pointer in the ucontext's
7 * sigcontext struct (uc_mcontext).
8 */
3 9
4struct ucontext { 10struct ucontext {
5 unsigned long uc_flags; 11 unsigned long uc_flags;
@@ -9,4 +15,4 @@ struct ucontext {
9 sigset_t uc_sigmask; /* mask last for extensibility */ 15 sigset_t uc_sigmask; /* mask last for extensibility */
10}; 16};
11 17
12#endif /* _ASM_X86_UCONTEXT_H */ 18#endif /* ASM_X86__UCONTEXT_H */
diff --git a/include/asm-x86/unaligned.h b/include/asm-x86/unaligned.h
index a7bd416b4763..59dcdec37160 100644
--- a/include/asm-x86/unaligned.h
+++ b/include/asm-x86/unaligned.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_UNALIGNED_H 1#ifndef ASM_X86__UNALIGNED_H
2#define _ASM_X86_UNALIGNED_H 2#define ASM_X86__UNALIGNED_H
3 3
4/* 4/*
5 * The x86 can do unaligned accesses itself. 5 * The x86 can do unaligned accesses itself.
@@ -11,4 +11,4 @@
11#define get_unaligned __get_unaligned_le 11#define get_unaligned __get_unaligned_le
12#define put_unaligned __put_unaligned_le 12#define put_unaligned __put_unaligned_le
13 13
14#endif /* _ASM_X86_UNALIGNED_H */ 14#endif /* ASM_X86__UNALIGNED_H */
diff --git a/include/asm-x86/unistd_32.h b/include/asm-x86/unistd_32.h
index d7394673b772..017f4a87c913 100644
--- a/include/asm-x86/unistd_32.h
+++ b/include/asm-x86/unistd_32.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_I386_UNISTD_H_ 1#ifndef ASM_X86__UNISTD_32_H
2#define _ASM_I386_UNISTD_H_ 2#define ASM_X86__UNISTD_32_H
3 3
4/* 4/*
5 * This file contains the system call numbers. 5 * This file contains the system call numbers.
@@ -376,4 +376,4 @@
376#endif 376#endif
377 377
378#endif /* __KERNEL__ */ 378#endif /* __KERNEL__ */
379#endif /* _ASM_I386_UNISTD_H_ */ 379#endif /* ASM_X86__UNISTD_32_H */
diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h
index 3a341d791792..ace83f1f6787 100644
--- a/include/asm-x86/unistd_64.h
+++ b/include/asm-x86/unistd_64.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_64_UNISTD_H_ 1#ifndef ASM_X86__UNISTD_64_H
2#define _ASM_X86_64_UNISTD_H_ 2#define ASM_X86__UNISTD_64_H
3 3
4#ifndef __SYSCALL 4#ifndef __SYSCALL
5#define __SYSCALL(a, b) 5#define __SYSCALL(a, b)
@@ -690,4 +690,4 @@ __SYSCALL(__NR_inotify_init1, sys_inotify_init1)
690#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 690#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
691#endif /* __KERNEL__ */ 691#endif /* __KERNEL__ */
692 692
693#endif /* _ASM_X86_64_UNISTD_H_ */ 693#endif /* ASM_X86__UNISTD_64_H */
diff --git a/include/asm-x86/unwind.h b/include/asm-x86/unwind.h
index 8b064bd9c553..a2151567db44 100644
--- a/include/asm-x86/unwind.h
+++ b/include/asm-x86/unwind.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_UNWIND_H 1#ifndef ASM_X86__UNWIND_H
2#define _ASM_X86_UNWIND_H 2#define ASM_X86__UNWIND_H
3 3
4#define UNW_PC(frame) ((void)(frame), 0UL) 4#define UNW_PC(frame) ((void)(frame), 0UL)
5#define UNW_SP(frame) ((void)(frame), 0UL) 5#define UNW_SP(frame) ((void)(frame), 0UL)
@@ -10,4 +10,4 @@ static inline int arch_unw_user_mode(const void *info)
10 return 0; 10 return 0;
11} 11}
12 12
13#endif /* _ASM_X86_UNWIND_H */ 13#endif /* ASM_X86__UNWIND_H */
diff --git a/include/asm-x86/user32.h b/include/asm-x86/user32.h
index a3d910047879..aa66c1857f06 100644
--- a/include/asm-x86/user32.h
+++ b/include/asm-x86/user32.h
@@ -1,5 +1,5 @@
1#ifndef USER32_H 1#ifndef ASM_X86__USER32_H
2#define USER32_H 1 2#define ASM_X86__USER32_H
3 3
4/* IA32 compatible user structures for ptrace. 4/* IA32 compatible user structures for ptrace.
5 * These should be used for 32bit coredumps too. */ 5 * These should be used for 32bit coredumps too. */
@@ -67,4 +67,4 @@ struct user32 {
67}; 67};
68 68
69 69
70#endif 70#endif /* ASM_X86__USER32_H */
diff --git a/include/asm-x86/user_32.h b/include/asm-x86/user_32.h
index d6e51edc259d..e0fe2f55f1a6 100644
--- a/include/asm-x86/user_32.h
+++ b/include/asm-x86/user_32.h
@@ -1,5 +1,5 @@
1#ifndef _I386_USER_H 1#ifndef ASM_X86__USER_32_H
2#define _I386_USER_H 2#define ASM_X86__USER_32_H
3 3
4#include <asm/page.h> 4#include <asm/page.h>
5/* Core file format: The core file is written in such a way that gdb 5/* Core file format: The core file is written in such a way that gdb
@@ -128,4 +128,4 @@ struct user{
128#define HOST_TEXT_START_ADDR (u.start_code) 128#define HOST_TEXT_START_ADDR (u.start_code)
129#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 129#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
130 130
131#endif /* _I386_USER_H */ 131#endif /* ASM_X86__USER_32_H */
diff --git a/include/asm-x86/user_64.h b/include/asm-x86/user_64.h
index 6037b634c77f..38b5799863b4 100644
--- a/include/asm-x86/user_64.h
+++ b/include/asm-x86/user_64.h
@@ -1,5 +1,5 @@
1#ifndef _X86_64_USER_H 1#ifndef ASM_X86__USER_64_H
2#define _X86_64_USER_H 2#define ASM_X86__USER_64_H
3 3
4#include <asm/types.h> 4#include <asm/types.h>
5#include <asm/page.h> 5#include <asm/page.h>
@@ -134,4 +134,4 @@ struct user {
134#define HOST_TEXT_START_ADDR (u.start_code) 134#define HOST_TEXT_START_ADDR (u.start_code)
135#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 135#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
136 136
137#endif /* _X86_64_USER_H */ 137#endif /* ASM_X86__USER_64_H */
diff --git a/include/asm-x86/uv/bios.h b/include/asm-x86/uv/bios.h
index aa73362ff5df..7cd6d7ec1308 100644
--- a/include/asm-x86/uv/bios.h
+++ b/include/asm-x86/uv/bios.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_BIOS_H 1#ifndef ASM_X86__UV__BIOS_H
2#define _ASM_X86_BIOS_H 2#define ASM_X86__UV__BIOS_H
3 3
4/* 4/*
5 * BIOS layer definitions. 5 * BIOS layer definitions.
@@ -65,4 +65,4 @@ x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
65 unsigned long *drift_info); 65 unsigned long *drift_info);
66extern const char *x86_bios_strerror(long status); 66extern const char *x86_bios_strerror(long status);
67 67
68#endif /* _ASM_X86_BIOS_H */ 68#endif /* ASM_X86__UV__BIOS_H */
diff --git a/include/asm-x86/uv/uv_bau.h b/include/asm-x86/uv/uv_bau.h
index 610b6b308e93..77153fb18f5e 100644
--- a/include/asm-x86/uv/uv_bau.h
+++ b/include/asm-x86/uv/uv_bau.h
@@ -8,8 +8,8 @@
8 * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. 8 * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved.
9 */ 9 */
10 10
11#ifndef __ASM_X86_UV_BAU__ 11#ifndef ASM_X86__UV__UV_BAU_H
12#define __ASM_X86_UV_BAU__ 12#define ASM_X86__UV__UV_BAU_H
13 13
14#include <linux/bitmap.h> 14#include <linux/bitmap.h>
15#define BITSPERBYTE 8 15#define BITSPERBYTE 8
@@ -329,4 +329,4 @@ extern int uv_flush_tlb_others(cpumask_t *, struct mm_struct *, unsigned long);
329extern void uv_bau_message_intr1(void); 329extern void uv_bau_message_intr1(void);
330extern void uv_bau_timeout_intr1(void); 330extern void uv_bau_timeout_intr1(void);
331 331
332#endif /* __ASM_X86_UV_BAU__ */ 332#endif /* ASM_X86__UV__UV_BAU_H */
diff --git a/include/asm-x86/uv/uv_hub.h b/include/asm-x86/uv/uv_hub.h
index a4ef26e5850b..bdb5b01afbf5 100644
--- a/include/asm-x86/uv/uv_hub.h
+++ b/include/asm-x86/uv/uv_hub.h
@@ -8,8 +8,8 @@
8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. 8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved.
9 */ 9 */
10 10
11#ifndef __ASM_X86_UV_HUB_H__ 11#ifndef ASM_X86__UV__UV_HUB_H
12#define __ASM_X86_UV_HUB_H__ 12#define ASM_X86__UV__UV_HUB_H
13 13
14#include <linux/numa.h> 14#include <linux/numa.h>
15#include <linux/percpu.h> 15#include <linux/percpu.h>
@@ -350,5 +350,5 @@ static inline int uv_num_possible_blades(void)
350 return uv_possible_blades; 350 return uv_possible_blades;
351} 351}
352 352
353#endif /* __ASM_X86_UV_HUB__ */ 353#endif /* ASM_X86__UV__UV_HUB_H */
354 354
diff --git a/include/asm-x86/uv/uv_mmrs.h b/include/asm-x86/uv/uv_mmrs.h
index 151fd7fcb809..8b03d89d2459 100644
--- a/include/asm-x86/uv/uv_mmrs.h
+++ b/include/asm-x86/uv/uv_mmrs.h
@@ -8,8 +8,8 @@
8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. 8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved.
9 */ 9 */
10 10
11#ifndef __ASM_X86_UV_MMRS__ 11#ifndef ASM_X86__UV__UV_MMRS_H
12#define __ASM_X86_UV_MMRS__ 12#define ASM_X86__UV__UV_MMRS_H
13 13
14#define UV_MMR_ENABLE (1UL << 63) 14#define UV_MMR_ENABLE (1UL << 63)
15 15
@@ -1292,4 +1292,4 @@ union uvh_si_alias2_overlay_config_u {
1292}; 1292};
1293 1293
1294 1294
1295#endif /* __ASM_X86_UV_MMRS__ */ 1295#endif /* ASM_X86__UV__UV_MMRS_H */
diff --git a/include/asm-x86/vdso.h b/include/asm-x86/vdso.h
index 8e18fb80f5e6..4ab320913ea3 100644
--- a/include/asm-x86/vdso.h
+++ b/include/asm-x86/vdso.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_VDSO_H 1#ifndef ASM_X86__VDSO_H
2#define _ASM_X86_VDSO_H 1 2#define ASM_X86__VDSO_H
3 3
4#ifdef CONFIG_X86_64 4#ifdef CONFIG_X86_64
5extern const char VDSO64_PRELINK[]; 5extern const char VDSO64_PRELINK[];
@@ -44,4 +44,4 @@ extern const char vdso32_int80_start, vdso32_int80_end;
44extern const char vdso32_syscall_start, vdso32_syscall_end; 44extern const char vdso32_syscall_start, vdso32_syscall_end;
45extern const char vdso32_sysenter_start, vdso32_sysenter_end; 45extern const char vdso32_sysenter_start, vdso32_sysenter_end;
46 46
47#endif /* asm-x86/vdso.h */ 47#endif /* ASM_X86__VDSO_H */
diff --git a/include/asm-x86/vga.h b/include/asm-x86/vga.h
index 0ccf804377e6..b9e493d07d07 100644
--- a/include/asm-x86/vga.h
+++ b/include/asm-x86/vga.h
@@ -4,8 +4,8 @@
4 * (c) 1998 Martin Mares <mj@ucw.cz> 4 * (c) 1998 Martin Mares <mj@ucw.cz>
5 */ 5 */
6 6
7#ifndef _LINUX_ASM_VGA_H_ 7#ifndef ASM_X86__VGA_H
8#define _LINUX_ASM_VGA_H_ 8#define ASM_X86__VGA_H
9 9
10/* 10/*
11 * On the PC, we can just recalculate addresses and then 11 * On the PC, we can just recalculate addresses and then
@@ -17,4 +17,4 @@
17#define vga_readb(x) (*(x)) 17#define vga_readb(x) (*(x))
18#define vga_writeb(x, y) (*(y) = (x)) 18#define vga_writeb(x, y) (*(y) = (x))
19 19
20#endif 20#endif /* ASM_X86__VGA_H */
diff --git a/include/asm-x86/vgtod.h b/include/asm-x86/vgtod.h
index 3301f0929342..38fd13364021 100644
--- a/include/asm-x86/vgtod.h
+++ b/include/asm-x86/vgtod.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_VGTOD_H 1#ifndef ASM_X86__VGTOD_H
2#define _ASM_VGTOD_H 1 2#define ASM_X86__VGTOD_H
3 3
4#include <asm/vsyscall.h> 4#include <asm/vsyscall.h>
5#include <linux/clocksource.h> 5#include <linux/clocksource.h>
@@ -26,4 +26,4 @@ extern struct vsyscall_gtod_data __vsyscall_gtod_data
26__section_vsyscall_gtod_data; 26__section_vsyscall_gtod_data;
27extern struct vsyscall_gtod_data vsyscall_gtod_data; 27extern struct vsyscall_gtod_data vsyscall_gtod_data;
28 28
29#endif 29#endif /* ASM_X86__VGTOD_H */
diff --git a/include/asm-x86/visws/cobalt.h b/include/asm-x86/visws/cobalt.h
index 995258831b7f..9627a8fe84e9 100644
--- a/include/asm-x86/visws/cobalt.h
+++ b/include/asm-x86/visws/cobalt.h
@@ -1,5 +1,5 @@
1#ifndef __I386_SGI_COBALT_H 1#ifndef ASM_X86__VISWS__COBALT_H
2#define __I386_SGI_COBALT_H 2#define ASM_X86__VISWS__COBALT_H
3 3
4#include <asm/fixmap.h> 4#include <asm/fixmap.h>
5 5
@@ -122,4 +122,4 @@ extern char visws_board_type;
122 122
123extern char visws_board_rev; 123extern char visws_board_rev;
124 124
125#endif /* __I386_SGI_COBALT_H */ 125#endif /* ASM_X86__VISWS__COBALT_H */
diff --git a/include/asm-x86/visws/lithium.h b/include/asm-x86/visws/lithium.h
index dfcd4f07ab85..b36d3b378c63 100644
--- a/include/asm-x86/visws/lithium.h
+++ b/include/asm-x86/visws/lithium.h
@@ -1,5 +1,5 @@
1#ifndef __I386_SGI_LITHIUM_H 1#ifndef ASM_X86__VISWS__LITHIUM_H
2#define __I386_SGI_LITHIUM_H 2#define ASM_X86__VISWS__LITHIUM_H
3 3
4#include <asm/fixmap.h> 4#include <asm/fixmap.h>
5 5
@@ -49,5 +49,5 @@ static inline unsigned short li_pcib_read16(unsigned long reg)
49 return *((volatile unsigned short *)(LI_PCIB_VADDR+reg)); 49 return *((volatile unsigned short *)(LI_PCIB_VADDR+reg));
50} 50}
51 51
52#endif 52#endif /* ASM_X86__VISWS__LITHIUM_H */
53 53
diff --git a/include/asm-x86/visws/piix4.h b/include/asm-x86/visws/piix4.h
index 83ea4f46e419..61c938045ec9 100644
--- a/include/asm-x86/visws/piix4.h
+++ b/include/asm-x86/visws/piix4.h
@@ -1,5 +1,5 @@
1#ifndef __I386_SGI_PIIX_H 1#ifndef ASM_X86__VISWS__PIIX4_H
2#define __I386_SGI_PIIX_H 2#define ASM_X86__VISWS__PIIX4_H
3 3
4/* 4/*
5 * PIIX4 as used on SGI Visual Workstations 5 * PIIX4 as used on SGI Visual Workstations
@@ -104,4 +104,4 @@
104 */ 104 */
105#define PIIX_GPI_STPCLK 0x4 // STPCLK signal routed back in 105#define PIIX_GPI_STPCLK 0x4 // STPCLK signal routed back in
106 106
107#endif 107#endif /* ASM_X86__VISWS__PIIX4_H */
diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h
index 5ce351325e01..998bd18eb737 100644
--- a/include/asm-x86/vm86.h
+++ b/include/asm-x86/vm86.h
@@ -1,5 +1,5 @@
1#ifndef _LINUX_VM86_H 1#ifndef ASM_X86__VM86_H
2#define _LINUX_VM86_H 2#define ASM_X86__VM86_H
3 3
4/* 4/*
5 * I'm guessing at the VIF/VIP flag usage, but hope that this is how 5 * I'm guessing at the VIF/VIP flag usage, but hope that this is how
@@ -205,4 +205,4 @@ static inline int handle_vm86_trap(struct kernel_vm86_regs *a, long b, int c)
205 205
206#endif /* __KERNEL__ */ 206#endif /* __KERNEL__ */
207 207
208#endif 208#endif /* ASM_X86__VM86_H */
diff --git a/include/asm-x86/vmi_time.h b/include/asm-x86/vmi_time.h
index c3118c385156..b2d39e6a08b7 100644
--- a/include/asm-x86/vmi_time.h
+++ b/include/asm-x86/vmi_time.h
@@ -22,8 +22,8 @@
22 * 22 *
23 */ 23 */
24 24
25#ifndef __VMI_TIME_H 25#ifndef ASM_X86__VMI_TIME_H
26#define __VMI_TIME_H 26#define ASM_X86__VMI_TIME_H
27 27
28/* 28/*
29 * Raw VMI call indices for timer functions 29 * Raw VMI call indices for timer functions
@@ -95,4 +95,4 @@ extern void __devinit vmi_time_ap_init(void);
95 95
96#define CONFIG_VMI_ALARM_HZ 100 96#define CONFIG_VMI_ALARM_HZ 100
97 97
98#endif 98#endif /* ASM_X86__VMI_TIME_H */
diff --git a/include/asm-x86/vsyscall.h b/include/asm-x86/vsyscall.h
index 6b66ff905af0..dcd4682413de 100644
--- a/include/asm-x86/vsyscall.h
+++ b/include/asm-x86/vsyscall.h
@@ -1,5 +1,5 @@
1#ifndef _ASM_X86_64_VSYSCALL_H_ 1#ifndef ASM_X86__VSYSCALL_H
2#define _ASM_X86_64_VSYSCALL_H_ 2#define ASM_X86__VSYSCALL_H
3 3
4enum vsyscall_num { 4enum vsyscall_num {
5 __NR_vgettimeofday, 5 __NR_vgettimeofday,
@@ -41,4 +41,4 @@ extern void map_vsyscall(void);
41 41
42#endif /* __KERNEL__ */ 42#endif /* __KERNEL__ */
43 43
44#endif /* _ASM_X86_64_VSYSCALL_H_ */ 44#endif /* ASM_X86__VSYSCALL_H */
diff --git a/include/asm-x86/xcr.h b/include/asm-x86/xcr.h
new file mode 100644
index 000000000000..f2cba4e79a23
--- /dev/null
+++ b/include/asm-x86/xcr.h
@@ -0,0 +1,49 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright 2008 rPath, Inc. - All Rights Reserved
4 *
5 * This file is part of the Linux kernel, and is made available under
6 * the terms of the GNU General Public License version 2 or (at your
7 * option) any later version; incorporated herein by reference.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * asm-x86/xcr.h
13 *
14 * Definitions for the eXtended Control Register instructions
15 */
16
17#ifndef _ASM_X86_XCR_H
18#define _ASM_X86_XCR_H
19
20#define XCR_XFEATURE_ENABLED_MASK 0x00000000
21
22#ifdef __KERNEL__
23# ifndef __ASSEMBLY__
24
25#include <linux/types.h>
26
27static inline u64 xgetbv(u32 index)
28{
29 u32 eax, edx;
30
31 asm volatile(".byte 0x0f,0x01,0xd0" /* xgetbv */
32 : "=a" (eax), "=d" (edx)
33 : "c" (index));
34 return eax + ((u64)edx << 32);
35}
36
37static inline void xsetbv(u32 index, u64 value)
38{
39 u32 eax = value;
40 u32 edx = value >> 32;
41
42 asm volatile(".byte 0x0f,0x01,0xd1" /* xsetbv */
43 : : "a" (eax), "d" (edx), "c" (index));
44}
45
46# endif /* __ASSEMBLY__ */
47#endif /* __KERNEL__ */
48
49#endif /* _ASM_X86_XCR_H */
diff --git a/include/asm-x86/xen/events.h b/include/asm-x86/xen/events.h
index 8ded74720024..8151f5b8b6cb 100644
--- a/include/asm-x86/xen/events.h
+++ b/include/asm-x86/xen/events.h
@@ -1,5 +1,5 @@
1#ifndef __XEN_EVENTS_H 1#ifndef ASM_X86__XEN__EVENTS_H
2#define __XEN_EVENTS_H 2#define ASM_X86__XEN__EVENTS_H
3 3
4enum ipi_vector { 4enum ipi_vector {
5 XEN_RESCHEDULE_VECTOR, 5 XEN_RESCHEDULE_VECTOR,
@@ -21,4 +21,4 @@ static inline void xen_do_IRQ(int irq, struct pt_regs *regs)
21 do_IRQ(regs); 21 do_IRQ(regs);
22} 22}
23 23
24#endif /* __XEN_EVENTS_H */ 24#endif /* ASM_X86__XEN__EVENTS_H */
diff --git a/include/asm-x86/xen/grant_table.h b/include/asm-x86/xen/grant_table.h
index 2444d4593a3b..c4baab4d2b68 100644
--- a/include/asm-x86/xen/grant_table.h
+++ b/include/asm-x86/xen/grant_table.h
@@ -1,7 +1,7 @@
1#ifndef __XEN_GRANT_TABLE_H 1#ifndef ASM_X86__XEN__GRANT_TABLE_H
2#define __XEN_GRANT_TABLE_H 2#define ASM_X86__XEN__GRANT_TABLE_H
3 3
4#define xen_alloc_vm_area(size) alloc_vm_area(size) 4#define xen_alloc_vm_area(size) alloc_vm_area(size)
5#define xen_free_vm_area(area) free_vm_area(area) 5#define xen_free_vm_area(area) free_vm_area(area)
6 6
7#endif /* __XEN_GRANT_TABLE_H */ 7#endif /* ASM_X86__XEN__GRANT_TABLE_H */
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
index 91cb7fd5c123..44f4259bee3f 100644
--- a/include/asm-x86/xen/hypercall.h
+++ b/include/asm-x86/xen/hypercall.h
@@ -30,8 +30,8 @@
30 * IN THE SOFTWARE. 30 * IN THE SOFTWARE.
31 */ 31 */
32 32
33#ifndef __HYPERCALL_H__ 33#ifndef ASM_X86__XEN__HYPERCALL_H
34#define __HYPERCALL_H__ 34#define ASM_X86__XEN__HYPERCALL_H
35 35
36#include <linux/errno.h> 36#include <linux/errno.h>
37#include <linux/string.h> 37#include <linux/string.h>
@@ -524,4 +524,4 @@ MULTI_stack_switch(struct multicall_entry *mcl,
524 mcl->args[1] = esp; 524 mcl->args[1] = esp;
525} 525}
526 526
527#endif /* __HYPERCALL_H__ */ 527#endif /* ASM_X86__XEN__HYPERCALL_H */
diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h
index 04ee0610014a..0ef3a88b869d 100644
--- a/include/asm-x86/xen/hypervisor.h
+++ b/include/asm-x86/xen/hypervisor.h
@@ -30,8 +30,8 @@
30 * IN THE SOFTWARE. 30 * IN THE SOFTWARE.
31 */ 31 */
32 32
33#ifndef __HYPERVISOR_H__ 33#ifndef ASM_X86__XEN__HYPERVISOR_H
34#define __HYPERVISOR_H__ 34#define ASM_X86__XEN__HYPERVISOR_H
35 35
36#include <linux/types.h> 36#include <linux/types.h>
37#include <linux/kernel.h> 37#include <linux/kernel.h>
@@ -69,4 +69,4 @@ u64 jiffies_to_st(unsigned long jiffies);
69 69
70#define is_running_on_xen() (xen_start_info ? 1 : 0) 70#define is_running_on_xen() (xen_start_info ? 1 : 0)
71 71
72#endif /* __HYPERVISOR_H__ */ 72#endif /* ASM_X86__XEN__HYPERVISOR_H */
diff --git a/include/asm-x86/xen/interface.h b/include/asm-x86/xen/interface.h
index 9d810f2538a2..d077bba96da9 100644
--- a/include/asm-x86/xen/interface.h
+++ b/include/asm-x86/xen/interface.h
@@ -6,8 +6,8 @@
6 * Copyright (c) 2004, K A Fraser 6 * Copyright (c) 2004, K A Fraser
7 */ 7 */
8 8
9#ifndef __ASM_X86_XEN_INTERFACE_H 9#ifndef ASM_X86__XEN__INTERFACE_H
10#define __ASM_X86_XEN_INTERFACE_H 10#define ASM_X86__XEN__INTERFACE_H
11 11
12#ifdef __XEN__ 12#ifdef __XEN__
13#define __DEFINE_GUEST_HANDLE(name, type) \ 13#define __DEFINE_GUEST_HANDLE(name, type) \
@@ -172,4 +172,4 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_guest_context);
172#define XEN_CPUID XEN_EMULATE_PREFIX "cpuid" 172#define XEN_CPUID XEN_EMULATE_PREFIX "cpuid"
173#endif 173#endif
174 174
175#endif /* __ASM_X86_XEN_INTERFACE_H */ 175#endif /* ASM_X86__XEN__INTERFACE_H */
diff --git a/include/asm-x86/xen/interface_32.h b/include/asm-x86/xen/interface_32.h
index d8ac41d5db86..08167e19fc66 100644
--- a/include/asm-x86/xen/interface_32.h
+++ b/include/asm-x86/xen/interface_32.h
@@ -6,8 +6,8 @@
6 * Copyright (c) 2004, K A Fraser 6 * Copyright (c) 2004, K A Fraser
7 */ 7 */
8 8
9#ifndef __ASM_X86_XEN_INTERFACE_32_H 9#ifndef ASM_X86__XEN__INTERFACE_32_H
10#define __ASM_X86_XEN_INTERFACE_32_H 10#define ASM_X86__XEN__INTERFACE_32_H
11 11
12 12
13/* 13/*
@@ -94,4 +94,4 @@ typedef struct xen_callback xen_callback_t;
94#define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20)) 94#define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20))
95#define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20)) 95#define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20))
96 96
97#endif /* __ASM_X86_XEN_INTERFACE_32_H */ 97#endif /* ASM_X86__XEN__INTERFACE_32_H */
diff --git a/include/asm-x86/xen/interface_64.h b/include/asm-x86/xen/interface_64.h
index 842266ce96e6..046c0f1e01d4 100644
--- a/include/asm-x86/xen/interface_64.h
+++ b/include/asm-x86/xen/interface_64.h
@@ -1,5 +1,5 @@
1#ifndef __ASM_X86_XEN_INTERFACE_64_H 1#ifndef ASM_X86__XEN__INTERFACE_64_H
2#define __ASM_X86_XEN_INTERFACE_64_H 2#define ASM_X86__XEN__INTERFACE_64_H
3 3
4/* 4/*
5 * 64-bit segment selectors 5 * 64-bit segment selectors
@@ -156,4 +156,4 @@ typedef unsigned long xen_callback_t;
156#endif /* !__ASSEMBLY__ */ 156#endif /* !__ASSEMBLY__ */
157 157
158 158
159#endif /* __ASM_X86_XEN_INTERFACE_64_H */ 159#endif /* ASM_X86__XEN__INTERFACE_64_H */
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h
index 7b3835d3b77d..c50185dccec1 100644
--- a/include/asm-x86/xen/page.h
+++ b/include/asm-x86/xen/page.h
@@ -1,5 +1,5 @@
1#ifndef __XEN_PAGE_H 1#ifndef ASM_X86__XEN__PAGE_H
2#define __XEN_PAGE_H 2#define ASM_X86__XEN__PAGE_H
3 3
4#include <linux/pfn.h> 4#include <linux/pfn.h>
5 5
@@ -162,4 +162,4 @@ xmaddr_t arbitrary_virt_to_machine(void *address);
162void make_lowmem_page_readonly(void *vaddr); 162void make_lowmem_page_readonly(void *vaddr);
163void make_lowmem_page_readwrite(void *vaddr); 163void make_lowmem_page_readwrite(void *vaddr);
164 164
165#endif /* __XEN_PAGE_H */ 165#endif /* ASM_X86__XEN__PAGE_H */
diff --git a/include/asm-x86/xsave.h b/include/asm-x86/xsave.h
new file mode 100644
index 000000000000..08e9a1ac07a9
--- /dev/null
+++ b/include/asm-x86/xsave.h
@@ -0,0 +1,118 @@
1#ifndef __ASM_X86_XSAVE_H
2#define __ASM_X86_XSAVE_H
3
4#include <linux/types.h>
5#include <asm/processor.h>
6#include <asm/i387.h>
7
8#define XSTATE_FP 0x1
9#define XSTATE_SSE 0x2
10
11#define XSTATE_FPSSE (XSTATE_FP | XSTATE_SSE)
12
13#define FXSAVE_SIZE 512
14
15/*
16 * These are the features that the OS can handle currently.
17 */
18#define XCNTXT_MASK (XSTATE_FP | XSTATE_SSE)
19
20#ifdef CONFIG_X86_64
21#define REX_PREFIX "0x48, "
22#else
23#define REX_PREFIX
24#endif
25
26extern unsigned int xstate_size;
27extern u64 pcntxt_mask;
28extern struct xsave_struct *init_xstate_buf;
29
30extern void xsave_cntxt_init(void);
31extern void xsave_init(void);
32extern int init_fpu(struct task_struct *child);
33extern int check_for_xstate(struct i387_fxsave_struct __user *buf,
34 void __user *fpstate,
35 struct _fpx_sw_bytes *sw);
36
37static inline int xrstor_checking(struct xsave_struct *fx)
38{
39 int err;
40
41 asm volatile("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n\t"
42 "2:\n"
43 ".section .fixup,\"ax\"\n"
44 "3: movl $-1,%[err]\n"
45 " jmp 2b\n"
46 ".previous\n"
47 _ASM_EXTABLE(1b, 3b)
48 : [err] "=r" (err)
49 : "D" (fx), "m" (*fx), "a" (-1), "d" (-1), "0" (0)
50 : "memory");
51
52 return err;
53}
54
55static inline int xsave_user(struct xsave_struct __user *buf)
56{
57 int err;
58 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x27\n"
59 "2:\n"
60 ".section .fixup,\"ax\"\n"
61 "3: movl $-1,%[err]\n"
62 " jmp 2b\n"
63 ".previous\n"
64 ".section __ex_table,\"a\"\n"
65 _ASM_ALIGN "\n"
66 _ASM_PTR "1b,3b\n"
67 ".previous"
68 : [err] "=r" (err)
69 : "D" (buf), "a" (-1), "d" (-1), "0" (0)
70 : "memory");
71 if (unlikely(err) && __clear_user(buf, xstate_size))
72 err = -EFAULT;
73 /* No need to clear here because the caller clears USED_MATH */
74 return err;
75}
76
77static inline int xrestore_user(struct xsave_struct __user *buf, u64 mask)
78{
79 int err;
80 struct xsave_struct *xstate = ((__force struct xsave_struct *)buf);
81 u32 lmask = mask;
82 u32 hmask = mask >> 32;
83
84 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n"
85 "2:\n"
86 ".section .fixup,\"ax\"\n"
87 "3: movl $-1,%[err]\n"
88 " jmp 2b\n"
89 ".previous\n"
90 ".section __ex_table,\"a\"\n"
91 _ASM_ALIGN "\n"
92 _ASM_PTR "1b,3b\n"
93 ".previous"
94 : [err] "=r" (err)
95 : "D" (xstate), "a" (lmask), "d" (hmask), "0" (0)
96 : "memory"); /* memory required? */
97 return err;
98}
99
100static inline void xrstor_state(struct xsave_struct *fx, u64 mask)
101{
102 u32 lmask = mask;
103 u32 hmask = mask >> 32;
104
105 asm volatile(".byte " REX_PREFIX "0x0f,0xae,0x2f\n\t"
106 : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
107 : "memory");
108}
109
110static inline void xsave(struct task_struct *tsk)
111{
112 /* This, however, we can work around by forcing the compiler to select
113 an addressing mode that doesn't require extended registers. */
114 __asm__ __volatile__(".byte " REX_PREFIX "0x0f,0xae,0x27"
115 : : "D" (&(tsk->thread.xstate->xsave)),
116 "a" (-1), "d"(-1) : "memory");
117}
118#endif
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 56c73b847551..c360c558e59e 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -25,9 +25,99 @@
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/msi.h> 26#include <linux/msi.h>
27 27
28#ifdef CONFIG_DMAR 28#if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP)
29struct intel_iommu; 29struct intel_iommu;
30 30
31struct dmar_drhd_unit {
32 struct list_head list; /* list of drhd units */
33 struct acpi_dmar_header *hdr; /* ACPI header */
34 u64 reg_base_addr; /* register base address*/
35 struct pci_dev **devices; /* target device array */
36 int devices_cnt; /* target device count */
37 u8 ignored:1; /* ignore drhd */
38 u8 include_all:1;
39 struct intel_iommu *iommu;
40};
41
42extern struct list_head dmar_drhd_units;
43
44#define for_each_drhd_unit(drhd) \
45 list_for_each_entry(drhd, &dmar_drhd_units, list)
46
47extern int dmar_table_init(void);
48extern int early_dmar_detect(void);
49extern int dmar_dev_scope_init(void);
50
51/* Intel IOMMU detection */
52extern void detect_intel_iommu(void);
53
54
55extern int parse_ioapics_under_ir(void);
56extern int alloc_iommu(struct dmar_drhd_unit *);
57#else
58static inline void detect_intel_iommu(void)
59{
60 return;
61}
62
63static inline int dmar_table_init(void)
64{
65 return -ENODEV;
66}
67#endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */
68
69#ifdef CONFIG_INTR_REMAP
70extern int intr_remapping_enabled;
71extern int enable_intr_remapping(int);
72
73struct irte {
74 union {
75 struct {
76 __u64 present : 1,
77 fpd : 1,
78 dst_mode : 1,
79 redir_hint : 1,
80 trigger_mode : 1,
81 dlvry_mode : 3,
82 avail : 4,
83 __reserved_1 : 4,
84 vector : 8,
85 __reserved_2 : 8,
86 dest_id : 32;
87 };
88 __u64 low;
89 };
90
91 union {
92 struct {
93 __u64 sid : 16,
94 sq : 2,
95 svt : 2,
96 __reserved_3 : 44;
97 };
98 __u64 high;
99 };
100};
101extern int get_irte(int irq, struct irte *entry);
102extern int modify_irte(int irq, struct irte *irte_modified);
103extern int alloc_irte(struct intel_iommu *iommu, int irq, u16 count);
104extern int set_irte_irq(int irq, struct intel_iommu *iommu, u16 index,
105 u16 sub_handle);
106extern int map_irq_to_irte_handle(int irq, u16 *sub_handle);
107extern int clear_irte_irq(int irq, struct intel_iommu *iommu, u16 index);
108extern int flush_irte(int irq);
109extern int free_irte(int irq);
110
111extern int irq_remapped(int irq);
112extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev);
113extern struct intel_iommu *map_ioapic_to_ir(int apic);
114#else
115#define irq_remapped(irq) (0)
116#define enable_intr_remapping(mode) (-1)
117#define intr_remapping_enabled (0)
118#endif
119
120#ifdef CONFIG_DMAR
31extern const char *dmar_get_fault_reason(u8 fault_reason); 121extern const char *dmar_get_fault_reason(u8 fault_reason);
32 122
33/* Can't use the common MSI interrupt functions 123/* Can't use the common MSI interrupt functions
@@ -40,47 +130,30 @@ extern void dmar_msi_write(int irq, struct msi_msg *msg);
40extern int dmar_set_interrupt(struct intel_iommu *iommu); 130extern int dmar_set_interrupt(struct intel_iommu *iommu);
41extern int arch_setup_dmar_msi(unsigned int irq); 131extern int arch_setup_dmar_msi(unsigned int irq);
42 132
43/* Intel IOMMU detection and initialization functions */ 133extern int iommu_detected, no_iommu;
44extern void detect_intel_iommu(void);
45extern int intel_iommu_init(void);
46
47extern int dmar_table_init(void);
48extern int early_dmar_detect(void);
49
50extern struct list_head dmar_drhd_units;
51extern struct list_head dmar_rmrr_units; 134extern struct list_head dmar_rmrr_units;
52
53struct dmar_drhd_unit {
54 struct list_head list; /* list of drhd units */
55 u64 reg_base_addr; /* register base address*/
56 struct pci_dev **devices; /* target device array */
57 int devices_cnt; /* target device count */
58 u8 ignored:1; /* ignore drhd */
59 u8 include_all:1;
60 struct intel_iommu *iommu;
61};
62
63struct dmar_rmrr_unit { 135struct dmar_rmrr_unit {
64 struct list_head list; /* list of rmrr units */ 136 struct list_head list; /* list of rmrr units */
137 struct acpi_dmar_header *hdr; /* ACPI header */
65 u64 base_address; /* reserved base address*/ 138 u64 base_address; /* reserved base address*/
66 u64 end_address; /* reserved end address */ 139 u64 end_address; /* reserved end address */
67 struct pci_dev **devices; /* target devices */ 140 struct pci_dev **devices; /* target devices */
68 int devices_cnt; /* target device count */ 141 int devices_cnt; /* target device count */
69}; 142};
70 143
71#define for_each_drhd_unit(drhd) \
72 list_for_each_entry(drhd, &dmar_drhd_units, list)
73#define for_each_rmrr_units(rmrr) \ 144#define for_each_rmrr_units(rmrr) \
74 list_for_each_entry(rmrr, &dmar_rmrr_units, list) 145 list_for_each_entry(rmrr, &dmar_rmrr_units, list)
146/* Intel DMAR initialization functions */
147extern int intel_iommu_init(void);
148extern int dmar_disabled;
75#else 149#else
76static inline void detect_intel_iommu(void)
77{
78 return;
79}
80static inline int intel_iommu_init(void) 150static inline int intel_iommu_init(void)
81{ 151{
152#ifdef CONFIG_INTR_REMAP
153 return dmar_dev_scope_init();
154#else
82 return -ENODEV; 155 return -ENODEV;
156#endif
83} 157}
84
85#endif /* !CONFIG_DMAR */ 158#endif /* !CONFIG_DMAR */
86#endif /* __DMAR_H__ */ 159#endif /* __DMAR_H__ */
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 8ccb462ea42c..8d9411bc60f6 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -62,6 +62,7 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
62#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ 62#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
63#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ 63#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
64#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ 64#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */
65#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
65 66
66#ifdef CONFIG_IRQ_PER_CPU 67#ifdef CONFIG_IRQ_PER_CPU
67# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 68# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)