Commit b1864e9a authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'x86/core' into perfcounters/core

Conflicts:
	arch/x86/Kconfig
	arch/x86/kernel/apic.c
	arch/x86/kernel/setup_percpu.c
parents e9c4ffb1 7032e869
...@@ -158,7 +158,7 @@ Offset Proto Name Meaning ...@@ -158,7 +158,7 @@ Offset Proto Name Meaning
0202/4 2.00+ header Magic signature "HdrS" 0202/4 2.00+ header Magic signature "HdrS"
0206/2 2.00+ version Boot protocol version supported 0206/2 2.00+ version Boot protocol version supported
0208/4 2.00+ realmode_swtch Boot loader hook (see below) 0208/4 2.00+ realmode_swtch Boot loader hook (see below)
020C/2 2.00+ start_sys The load-low segment (0x1000) (obsolete) 020C/2 2.00+ start_sys_seg The load-low segment (0x1000) (obsolete)
020E/2 2.00+ kernel_version Pointer to kernel version string 020E/2 2.00+ kernel_version Pointer to kernel version string
0210/1 2.00+ type_of_loader Boot loader identifier 0210/1 2.00+ type_of_loader Boot loader identifier
0211/1 2.00+ loadflags Boot protocol option flags 0211/1 2.00+ loadflags Boot protocol option flags
...@@ -170,10 +170,11 @@ Offset Proto Name Meaning ...@@ -170,10 +170,11 @@ Offset Proto Name Meaning
0224/2 2.01+ heap_end_ptr Free memory after setup end 0224/2 2.01+ heap_end_ptr Free memory after setup end
0226/2 N/A pad1 Unused 0226/2 N/A pad1 Unused
0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
022C/4 2.03+ initrd_addr_max Highest legal initrd address 022C/4 2.03+ ramdisk_max Highest legal initrd address
0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel
0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not
0235/3 N/A pad2 Unused 0235/1 N/A pad2 Unused
0236/2 N/A pad3 Unused
0238/4 2.06+ cmdline_size Maximum size of the kernel command line 0238/4 2.06+ cmdline_size Maximum size of the kernel command line
023C/4 2.07+ hardware_subarch Hardware subarchitecture 023C/4 2.07+ hardware_subarch Hardware subarchitecture
0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data
...@@ -299,14 +300,14 @@ Protocol: 2.00+ ...@@ -299,14 +300,14 @@ Protocol: 2.00+
e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version
10.17. 10.17.
Field name: readmode_swtch Field name: realmode_swtch
Type: modify (optional) Type: modify (optional)
Offset/size: 0x208/4 Offset/size: 0x208/4
Protocol: 2.00+ Protocol: 2.00+
Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.) Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
Field name: start_sys Field name: start_sys_seg
Type: read Type: read
Offset/size: 0x20c/2 Offset/size: 0x20c/2
Protocol: 2.00+ Protocol: 2.00+
...@@ -468,7 +469,7 @@ Protocol: 2.02+ ...@@ -468,7 +469,7 @@ Protocol: 2.02+
zero, the kernel will assume that your boot loader does not support zero, the kernel will assume that your boot loader does not support
the 2.02+ protocol. the 2.02+ protocol.
Field name: initrd_addr_max Field name: ramdisk_max
Type: read Type: read
Offset/size: 0x22c/4 Offset/size: 0x22c/4
Protocol: 2.03+ Protocol: 2.03+
......
...@@ -532,8 +532,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) ...@@ -532,8 +532,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
endif endif
# Force gcc to behave correct even for buggy distributions # Force gcc to behave correct even for buggy distributions
# Arch Makefiles may override this setting ifndef CONFIG_CC_STACKPROTECTOR
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
endif
ifdef CONFIG_FRAME_POINTER ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
......
...@@ -27,12 +27,12 @@ extern void *per_cpu_init(void); ...@@ -27,12 +27,12 @@ extern void *per_cpu_init(void);
#else /* ! SMP */ #else /* ! SMP */
#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
#define per_cpu_init() (__phys_per_cpu_start) #define per_cpu_init() (__phys_per_cpu_start)
#endif /* SMP */ #endif /* SMP */
#define PER_CPU_BASE_SECTION ".data.percpu"
/* /*
* Be extremely careful when taking the address of this variable! Due to virtual * Be extremely careful when taking the address of this variable! Due to virtual
* remapping, it is different from the canonical address returned by __get_cpu_var(var)! * remapping, it is different from the canonical address returned by __get_cpu_var(var)!
......
#ifndef _ASM_IA64_UV_UV_H
#define _ASM_IA64_UV_UV_H
#include <asm/system.h>
#include <asm/sn/simulator.h>
static inline int is_uv_system(void)
{
/* temporary support for running on hardware simulator */
return IS_MEDUSA() || ia64_platform_is("uv");
}
#endif /* _ASM_IA64_UV_UV_H */
...@@ -199,6 +199,10 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size) ...@@ -199,6 +199,10 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size)
return __va(phys_addr); return __va(phys_addr);
} }
char *__init __acpi_unmap_table(unsigned long virt_addr, unsigned long size)
{
}
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Boot-time Table Parsing Boot-time Table Parsing
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
......
This diff is collapsed.
...@@ -50,7 +50,7 @@ config M386 ...@@ -50,7 +50,7 @@ config M386
config M486 config M486
bool "486" bool "486"
depends on X86_32 depends on X86_32
help ---help---
Select this for a 486 series processor, either Intel or one of the Select this for a 486 series processor, either Intel or one of the
compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX,
DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
...@@ -59,7 +59,7 @@ config M486 ...@@ -59,7 +59,7 @@ config M486
config M586 config M586
bool "586/K5/5x86/6x86/6x86MX" bool "586/K5/5x86/6x86/6x86MX"
depends on X86_32 depends on X86_32
help ---help---
Select this for an 586 or 686 series processor such as the AMD K5, Select this for an 586 or 686 series processor such as the AMD K5,
the Cyrix 5x86, 6x86 and 6x86MX. This choice does not the Cyrix 5x86, 6x86 and 6x86MX. This choice does not
assume the RDTSC (Read Time Stamp Counter) instruction. assume the RDTSC (Read Time Stamp Counter) instruction.
...@@ -67,21 +67,21 @@ config M586 ...@@ -67,21 +67,21 @@ config M586
config M586TSC config M586TSC
bool "Pentium-Classic" bool "Pentium-Classic"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Pentium Classic processor with the RDTSC (Read Select this for a Pentium Classic processor with the RDTSC (Read
Time Stamp Counter) instruction for benchmarking. Time Stamp Counter) instruction for benchmarking.
config M586MMX config M586MMX
bool "Pentium-MMX" bool "Pentium-MMX"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Pentium with the MMX graphics/multimedia Select this for a Pentium with the MMX graphics/multimedia
extended instructions. extended instructions.
config M686 config M686
bool "Pentium-Pro" bool "Pentium-Pro"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel Pentium Pro chips. This enables the use of Select this for Intel Pentium Pro chips. This enables the use of
Pentium Pro extended instructions, and disables the init-time guard Pentium Pro extended instructions, and disables the init-time guard
against the f00f bug found in earlier Pentiums. against the f00f bug found in earlier Pentiums.
...@@ -89,7 +89,7 @@ config M686 ...@@ -89,7 +89,7 @@ config M686
config MPENTIUMII config MPENTIUMII
bool "Pentium-II/Celeron(pre-Coppermine)" bool "Pentium-II/Celeron(pre-Coppermine)"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel chips based on the Pentium-II and Select this for Intel chips based on the Pentium-II and
pre-Coppermine Celeron core. This option enables an unaligned pre-Coppermine Celeron core. This option enables an unaligned
copy optimization, compiles the kernel with optimization flags copy optimization, compiles the kernel with optimization flags
...@@ -99,7 +99,7 @@ config MPENTIUMII ...@@ -99,7 +99,7 @@ config MPENTIUMII
config MPENTIUMIII config MPENTIUMIII
bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel chips based on the Pentium-III and Select this for Intel chips based on the Pentium-III and
Celeron-Coppermine core. This option enables use of some Celeron-Coppermine core. This option enables use of some
extended prefetch instructions in addition to the Pentium II extended prefetch instructions in addition to the Pentium II
...@@ -108,14 +108,14 @@ config MPENTIUMIII ...@@ -108,14 +108,14 @@ config MPENTIUMIII
config MPENTIUMM config MPENTIUMM
bool "Pentium M" bool "Pentium M"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel Pentium M (not Pentium-4 M) Select this for Intel Pentium M (not Pentium-4 M)
notebook chips. notebook chips.
config MPENTIUM4 config MPENTIUM4
bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon" bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
depends on X86_32 depends on X86_32
help ---help---
Select this for Intel Pentium 4 chips. This includes the Select this for Intel Pentium 4 chips. This includes the
Pentium 4, Pentium D, P4-based Celeron and Xeon, and Pentium 4, Pentium D, P4-based Celeron and Xeon, and
Pentium-4 M (not Pentium M) chips. This option enables compile Pentium-4 M (not Pentium M) chips. This option enables compile
...@@ -151,7 +151,7 @@ config MPENTIUM4 ...@@ -151,7 +151,7 @@ config MPENTIUM4
config MK6 config MK6
bool "K6/K6-II/K6-III" bool "K6/K6-II/K6-III"
depends on X86_32 depends on X86_32
help ---help---
Select this for an AMD K6-family processor. Enables use of Select this for an AMD K6-family processor. Enables use of
some extended instructions, and passes appropriate optimization some extended instructions, and passes appropriate optimization
flags to GCC. flags to GCC.
...@@ -159,14 +159,14 @@ config MK6 ...@@ -159,14 +159,14 @@ config MK6
config MK7 config MK7
bool "Athlon/Duron/K7" bool "Athlon/Duron/K7"
depends on X86_32 depends on X86_32
help ---help---
Select this for an AMD Athlon K7-family processor. Enables use of Select this for an AMD Athlon K7-family processor. Enables use of
some extended instructions, and passes appropriate optimization some extended instructions, and passes appropriate optimization
flags to GCC. flags to GCC.
config MK8 config MK8
bool "Opteron/Athlon64/Hammer/K8" bool "Opteron/Athlon64/Hammer/K8"
help ---help---
Select this for an AMD Opteron or Athlon64 Hammer-family processor. Select this for an AMD Opteron or Athlon64 Hammer-family processor.
Enables use of some extended instructions, and passes appropriate Enables use of some extended instructions, and passes appropriate
optimization flags to GCC. optimization flags to GCC.
...@@ -174,7 +174,7 @@ config MK8 ...@@ -174,7 +174,7 @@ config MK8
config MCRUSOE config MCRUSOE
bool "Crusoe" bool "Crusoe"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Transmeta Crusoe processor. Treats the processor Select this for a Transmeta Crusoe processor. Treats the processor
like a 586 with TSC, and sets some GCC optimization flags (like a like a 586 with TSC, and sets some GCC optimization flags (like a
Pentium Pro with no alignment requirements). Pentium Pro with no alignment requirements).
...@@ -182,13 +182,13 @@ config MCRUSOE ...@@ -182,13 +182,13 @@ config MCRUSOE
config MEFFICEON config MEFFICEON
bool "Efficeon" bool "Efficeon"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Transmeta Efficeon processor. Select this for a Transmeta Efficeon processor.
config MWINCHIPC6 config MWINCHIPC6
bool "Winchip-C6" bool "Winchip-C6"
depends on X86_32 depends on X86_32
help ---help---
Select this for an IDT Winchip C6 chip. Linux and GCC Select this for an IDT Winchip C6 chip. Linux and GCC
treat this chip as a 586TSC with some extended instructions treat this chip as a 586TSC with some extended instructions
and alignment requirements. and alignment requirements.
...@@ -196,7 +196,7 @@ config MWINCHIPC6 ...@@ -196,7 +196,7 @@ config MWINCHIPC6
config MWINCHIP3D config MWINCHIP3D
bool "Winchip-2/Winchip-2A/Winchip-3" bool "Winchip-2/Winchip-2A/Winchip-3"
depends on X86_32 depends on X86_32
help ---help---
Select this for an IDT Winchip-2, 2A or 3. Linux and GCC Select this for an IDT Winchip-2, 2A or 3. Linux and GCC
treat this chip as a 586TSC with some extended instructions treat this chip as a 586TSC with some extended instructions
and alignment requirements. Also enable out of order memory and alignment requirements. Also enable out of order memory
...@@ -206,19 +206,19 @@ config MWINCHIP3D ...@@ -206,19 +206,19 @@ config MWINCHIP3D
config MGEODEGX1 config MGEODEGX1
bool "GeodeGX1" bool "GeodeGX1"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Geode GX1 (Cyrix MediaGX) chip. Select this for a Geode GX1 (Cyrix MediaGX) chip.
config MGEODE_LX config MGEODE_LX
bool "Geode GX/LX" bool "Geode GX/LX"
depends on X86_32 depends on X86_32
help ---help---
Select this for AMD Geode GX and LX processors. Select this for AMD Geode GX and LX processors.
config MCYRIXIII config MCYRIXIII
bool "CyrixIII/VIA-C3" bool "CyrixIII/VIA-C3"
depends on X86_32 depends on X86_32
help ---help---
Select this for a Cyrix III or C3 chip. Presently Linux and GCC Select this for a Cyrix III or C3 chip. Presently Linux and GCC
treat this chip as a generic 586. Whilst the CPU is 686 class, treat this chip as a generic 586. Whilst the CPU is 686 class,
it lacks the cmov extension which gcc assumes is present when it lacks the cmov extension which gcc assumes is present when
...@@ -230,7 +230,7 @@ config MCYRIXIII ...@@ -230,7 +230,7 @@ config MCYRIXIII
config MVIAC3_2 config MVIAC3_2
bool "VIA C3-2 (Nehemiah)" bool "VIA C3-2 (Nehemiah)"
depends on X86_32 depends on X86_32
help ---help---
Select this for a VIA C3 "Nehemiah". Selecting this enables usage Select this for a VIA C3 "Nehemiah". Selecting this enables usage
of SSE and tells gcc to treat the CPU as a 686. of SSE and tells gcc to treat the CPU as a 686.
Note, this kernel will not boot on older (pre model 9) C3s. Note, this kernel will not boot on older (pre model 9) C3s.
...@@ -238,14 +238,14 @@ config MVIAC3_2 ...@@ -238,14 +238,14 @@ config MVIAC3_2
config MVIAC7 config MVIAC7
bool "VIA C7" bool "VIA C7"
depends on X86_32 depends on X86_32
help ---help---
Select this for a VIA C7. Selecting this uses the correct cache Select this for a VIA C7. Selecting this uses the correct cache
shift and tells gcc to treat the CPU as a 686. shift and tells gcc to treat the CPU as a 686.
config MPSC config MPSC
bool "Intel P4 / older Netburst based Xeon" bool "Intel P4 / older Netburst based Xeon"
depends on X86_64 depends on X86_64
help ---help---
Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey
Xeon CPUs with Intel 64bit which is compatible with x86-64. Xeon CPUs with Intel 64bit which is compatible with x86-64.
Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the
...@@ -255,7 +255,7 @@ config MPSC ...@@ -255,7 +255,7 @@ config MPSC
config MCORE2 config MCORE2
bool "Core 2/newer Xeon" bool "Core 2/newer Xeon"
help ---help---
Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
53xx) CPUs. You can distinguish newer from older Xeons by the CPU 53xx) CPUs. You can distinguish newer from older Xeons by the CPU
...@@ -265,7 +265,7 @@ config MCORE2 ...@@ -265,7 +265,7 @@ config MCORE2
config GENERIC_CPU config GENERIC_CPU
bool "Generic-x86-64" bool "Generic-x86-64"
depends on X86_64 depends on X86_64
help ---help---
Generic x86-64 CPU. Generic x86-64 CPU.
Run equally well on all x86-64 CPUs. Run equally well on all x86-64 CPUs.
...@@ -274,7 +274,7 @@ endchoice ...@@ -274,7 +274,7 @@ endchoice
config X86_GENERIC config X86_GENERIC
bool "Generic x86 support" bool "Generic x86 support"
depends on X86_32 depends on X86_32
help ---help---
Instead of just including optimizations for the selected Instead of just including optimizations for the selected
x86 variant (e.g. PII, Crusoe or Athlon), include some more x86 variant (e.g. PII, Crusoe or Athlon), include some more
generic optimizations as well. This will make the kernel generic optimizations as well. This will make the kernel
...@@ -319,7 +319,7 @@ config X86_XADD ...@@ -319,7 +319,7 @@ config X86_XADD
config X86_PPRO_FENCE config X86_PPRO_FENCE
bool "PentiumPro memory ordering errata workaround" bool "PentiumPro memory ordering errata workaround"
depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
help ---help---
Old PentiumPro multiprocessor systems had errata that could cause Old PentiumPro multiprocessor systems had errata that could cause
memory operations to violate the x86 ordering standard in rare cases. memory operations to violate the x86 ordering standard in rare cases.
Enabling this option will attempt to work around some (but not all) Enabling this option will attempt to work around some (but not all)
...@@ -412,14 +412,14 @@ config X86_DEBUGCTLMSR ...@@ -412,14 +412,14 @@ config X86_DEBUGCTLMSR
menuconfig PROCESSOR_SELECT menuconfig PROCESSOR_SELECT
bool "Supported processor vendors" if EMBEDDED bool "Supported processor vendors" if EMBEDDED
help ---help---
This lets you choose what x86 vendor support code your kernel This lets you choose what x86 vendor support code your kernel
will include. will include.
config CPU_SUP_INTEL config CPU_SUP_INTEL
default y default y
bool "Support Intel processors" if PROCESSOR_SELECT bool "Support Intel processors" if PROCESSOR_SELECT
help ---help---
This enables detection, tunings and quirks for Intel processors This enables detection, tunings and quirks for Intel processors
You need this enabled if you want your kernel to run on an You need this enabled if you want your kernel to run on an
...@@ -433,7 +433,7 @@ config CPU_SUP_CYRIX_32 ...@@ -433,7 +433,7 @@ config CPU_SUP_CYRIX_32
default y default y
bool "Support Cyrix processors" if PROCESSOR_SELECT bool "Support Cyrix processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for Cyrix processors This enables detection, tunings and quirks for Cyrix processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
...@@ -446,7 +446,7 @@ config CPU_SUP_CYRIX_32 ...@@ -446,7 +446,7 @@ config CPU_SUP_CYRIX_32
config CPU_SUP_AMD config CPU_SUP_AMD
default y default y
bool "Support AMD processors" if PROCESSOR_SELECT bool "Support AMD processors" if PROCESSOR_SELECT
help ---help---
This enables detection, tunings and quirks for AMD processors This enables detection, tunings and quirks for AMD processors
You need this enabled if you want your kernel to run on an You need this enabled if you want your kernel to run on an
...@@ -460,7 +460,7 @@ config CPU_SUP_CENTAUR_32 ...@@ -460,7 +460,7 @@ config CPU_SUP_CENTAUR_32
default y default y
bool "Support Centaur processors" if PROCESSOR_SELECT bool "Support Centaur processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for Centaur processors This enables detection, tunings and quirks for Centaur processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
...@@ -474,7 +474,7 @@ config CPU_SUP_CENTAUR_64 ...@@ -474,7 +474,7 @@ config CPU_SUP_CENTAUR_64
default y default y
bool "Support Centaur processors" if PROCESSOR_SELECT bool "Support Centaur processors" if PROCESSOR_SELECT
depends on 64BIT depends on 64BIT
help ---help---
This enables detection, tunings and quirks for Centaur processors This enables detection, tunings and quirks for Centaur processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
...@@ -488,7 +488,7 @@ config CPU_SUP_TRANSMETA_32 ...@@ -488,7 +488,7 @@ config CPU_SUP_TRANSMETA_32
default y default y
bool "Support Transmeta processors" if PROCESSOR_SELECT bool "Support Transmeta processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for Transmeta processors This enables detection, tunings and quirks for Transmeta processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
...@@ -502,7 +502,7 @@ config CPU_SUP_UMC_32 ...@@ -502,7 +502,7 @@ config CPU_SUP_UMC_32
default y default y
bool "Support UMC processors" if PROCESSOR_SELECT bool "Support UMC processors" if PROCESSOR_SELECT
depends on !64BIT depends on !64BIT
help ---help---
This enables detection, tunings and quirks for UMC processors This enables detection, tunings and quirks for UMC processors
You need this enabled if you want your kernel to run on a You need this enabled if you want your kernel to run on a
...@@ -521,7 +521,7 @@ config X86_PTRACE_BTS ...@@ -521,7 +521,7 @@ config X86_PTRACE_BTS
bool "Branch Trace Store" bool "Branch Trace Store"
default y default y
depends on X86_DEBUGCTLMSR depends on X86_DEBUGCTLMSR
help ---help---
This adds a ptrace interface to the hardware's branch trace store. This adds a ptrace interface to the hardware's branch trace store.
Debuggers may use it to collect an execution trace of the debugged Debuggers may use it to collect an execution trace of the debugged
......
...@@ -7,7 +7,7 @@ source "lib/Kconfig.debug" ...@@ -7,7 +7,7 @@ source "lib/Kconfig.debug"
config STRICT_DEVMEM config STRICT_DEVMEM
bool "Filter access to /dev/mem" bool "Filter access to /dev/mem"
help ---help---
If this option is disabled, you allow userspace (root) access to all If this option is disabled, you allow userspace (root) access to all
of memory, including kernel and userspace memory. Accidental of memory, including kernel and userspace memory. Accidental
access to this is obviously disastrous, but specific access can access to this is obviously disastrous, but specific access can
...@@ -25,7 +25,7 @@ config STRICT_DEVMEM ...@@ -25,7 +25,7 @@ config STRICT_DEVMEM
config X86_VERBOSE_BOOTUP config X86_VERBOSE_BOOTUP
bool "Enable verbose x86 bootup info messages" bool "Enable verbose x86 bootup info messages"
default y default y
help ---help---
Enables the informational output from the decompression stage Enables the informational output from the decompression stage
(e.g. bzImage) of the boot. If you disable this you will still (e.g. bzImage) of the boot. If you disable this you will still
see errors. Disable this if you want silent bootup. see errors. Disable this if you want silent bootup.
...@@ -33,7 +33,7 @@ config X86_VERBOSE_BOOTUP ...@@ -33,7 +33,7 @@ config X86_VERBOSE_BOOTUP
config EARLY_PRINTK config EARLY_PRINTK
bool "Early printk" if EMBEDDED bool "Early printk" if EMBEDDED
default y default y
help ---help---
Write kernel log output directly into the VGA buffer or to a serial Write kernel log output directly into the VGA buffer or to a serial
port. port.
...@@ -47,7 +47,7 @@ config EARLY_PRINTK_DBGP ...@@ -47,7 +47,7 @@ config EARLY_PRINTK_DBGP
bool "Early printk via EHCI debug port" bool "Early printk via EHCI debug port"
default n default n
depends on EARLY_PRINTK && PCI depends on EARLY_PRINTK && PCI
help ---help---
Write kernel log output directly into the EHCI debug port. Write kernel log output directly into the EHCI debug port.
This is useful for kernel debugging when your machine crashes very This is useful for kernel debugging when your machine crashes very
...@@ -59,14 +59,14 @@ config EARLY_PRINTK_DBGP ...@@ -59,14 +59,14 @@ config EARLY_PRINTK_DBGP
config DEBUG_STACKOVERFLOW config DEBUG_STACKOVERFLOW
bool "Check for stack overflows" bool "Check for stack overflows"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
This option will cause messages to be printed if free stack space This option will cause messages to be printed if free stack space
drops below a certain limit. drops below a certain limit.
config DEBUG_STACK_USAGE config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation" bool "Stack utilization instrumentation"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Enables the display of the minimum amount of free stack which each Enables the display of the minimum amount of free stack which each
task has ever had available in the sysrq-T and sysrq-P debug output. task has ever had available in the sysrq-T and sysrq-P debug output.
...@@ -75,7 +75,7 @@ config DEBUG_STACK_USAGE ...@@ -75,7 +75,7 @@ config DEBUG_STACK_USAGE
config DEBUG_PAGEALLOC config DEBUG_PAGEALLOC
bool "Debug page memory allocations" bool "Debug page memory allocations"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Unmap pages from the kernel linear mapping after free_pages(). Unmap pages from the kernel linear mapping after free_pages().
This results in a large slowdown, but helps to find certain types This results in a large slowdown, but helps to find certain types
of memory corruptions. of memory corruptions.
...@@ -83,9 +83,9 @@ config DEBUG_PAGEALLOC ...@@ -83,9 +83,9 @@ config DEBUG_PAGEALLOC
config DEBUG_PER_CPU_MAPS config DEBUG_PER_CPU_MAPS
bool "Debug access to per_cpu maps" bool "Debug access to per_cpu maps"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on X86_SMP depends on SMP
default n default n
help ---help---
Say Y to verify that the per_cpu map being accessed has Say Y to verify that the per_cpu map being accessed has
been setup. Adds a fair amount of code to kernel memory been setup. Adds a fair amount of code to kernel memory
and decreases performance. and decreases performance.
...@@ -96,7 +96,7 @@ config X86_PTDUMP ...@@ -96,7 +96,7 @@ config X86_PTDUMP
bool "Export kernel pagetable layout to userspace via debugfs" bool "Export kernel pagetable layout to userspace via debugfs"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
select DEBUG_FS select DEBUG_FS
help ---help---
Say Y here if you want to show the kernel pagetable layout in a Say Y here if you want to show the kernel pagetable layout in a
debugfs file. This information is only useful for kernel developers debugfs file. This information is only useful for kernel developers
who are working in architecture specific areas of the kernel. who are working in architecture specific areas of the kernel.
...@@ -108,7 +108,7 @@ config DEBUG_RODATA ...@@ -108,7 +108,7 @@ config DEBUG_RODATA
bool "Write protect kernel read-only data structures" bool "Write protect kernel read-only data structures"
default y default y
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Mark the kernel read-only data as write-protected in the pagetables, Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const in order to catch accidental (and incorrect) writes to such const
data. This is recommended so that we can catch kernel bugs sooner. data. This is recommended so that we can catch kernel bugs sooner.
...@@ -118,7 +118,7 @@ config DEBUG_RODATA_TEST ...@@ -118,7 +118,7 @@ config DEBUG_RODATA_TEST
bool "Testcase for the DEBUG_RODATA feature" bool "Testcase for the DEBUG_RODATA feature"
depends on DEBUG_RODATA depends on DEBUG_RODATA
default y default y
help ---help---
This option enables a testcase for the DEBUG_RODATA This option enables a testcase for the DEBUG_RODATA
feature as well as for the change_page_attr() infrastructure. feature as well as for the change_page_attr() infrastructure.
If in doubt, say "N" If in doubt, say "N"
...@@ -126,7 +126,7 @@ config DEBUG_RODATA_TEST ...@@ -126,7 +126,7 @@ config DEBUG_RODATA_TEST
config DEBUG_NX_TEST config DEBUG_NX_TEST
tristate "Testcase for the NX non-executable stack feature" tristate "Testcase for the NX non-executable stack feature"
depends on DEBUG_KERNEL && m depends on DEBUG_KERNEL && m
help ---help---
This option enables a testcase for the CPU NX capability This option enables a testcase for the CPU NX capability
and the software setup of this feature. and the software setup of this feature.
If in doubt, say "N" If in doubt, say "N"
...@@ -134,7 +134,7 @@ config DEBUG_NX_TEST ...@@ -134,7 +134,7 @@ config DEBUG_NX_TEST
config 4KSTACKS config 4KSTACKS
bool "Use 4Kb for kernel stacks instead of 8Kb" bool "Use 4Kb for kernel stacks instead of 8Kb"
depends on X86_32 depends on X86_32
help ---help---
If you say Y here the kernel will use a 4Kb stacksize for the If you say Y here the kernel will use a 4Kb stacksize for the
kernel stack attached to each process/thread. This facilitates kernel stack attached to each process/thread. This facilitates
running more threads on a system and also reduces the pressure running more threads on a system and also reduces the pressure
...@@ -145,7 +145,7 @@ config DOUBLEFAULT ...@@ -145,7 +145,7 @@ config DOUBLEFAULT
default y default y
bool "Enable doublefault exception handler" if EMBEDDED bool "Enable doublefault exception handler" if EMBEDDED
depends on X86_32 depends on X86_32
help ---help---
This option allows trapping of rare doublefault exceptions that This option allows trapping of rare doublefault exceptions that
would otherwise cause a system to silently reboot. Disabling this would otherwise cause a system to silently reboot. Disabling this
option saves about 4k and might cause you much additional grey option saves about 4k and might cause you much additional grey
...@@ -155,7 +155,7 @@ config IOMMU_DEBUG ...@@ -155,7 +155,7 @@ config IOMMU_DEBUG
bool "Enable IOMMU debugging" bool "Enable IOMMU debugging"
depends on GART_IOMMU && DEBUG_KERNEL depends on GART_IOMMU && DEBUG_KERNEL
depends on X86_64 depends on X86_64
help ---help---
Force the IOMMU to on even when you have less than 4GB of Force the IOMMU to on even when you have less than 4GB of
memory and add debugging code. On overflow always panic. And memory and add debugging code. On overflow always panic. And
allow to enable IOMMU leak tracing. Can be disabled at boot allow to enable IOMMU leak tracing. Can be disabled at boot
...@@ -171,7 +171,7 @@ config IOMMU_LEAK ...@@ -171,7 +171,7 @@ config IOMMU_LEAK
bool "IOMMU leak tracing" bool "IOMMU leak tracing"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on IOMMU_DEBUG depends on IOMMU_DEBUG
help ---help---
Add a simple leak tracer to the IOMMU code. This is useful when you Add a simple leak tracer to the IOMMU code. This is useful when you
are debugging a buggy device driver that leaks IOMMU mappings. are debugging a buggy device driver that leaks IOMMU mappings.
...@@ -224,25 +224,25 @@ choice ...@@ -224,25 +224,25 @@ choice
config IO_DELAY_0X80 config IO_DELAY_0X80
bool "port 0x80 based port-IO delay [recommended]" bool "port 0x80 based port-IO delay [recommended]"
help ---help---
This is the traditional Linux IO delay used for in/out_p. This is the traditional Linux IO delay used for in/out_p.
It is the most tested hence safest selection here. It is the most tested hence safest selection here.
config IO_DELAY_0XED config IO_DELAY_0XED
bool "port 0xed based port-IO delay" bool "port 0xed based port-IO delay"
help ---help---
Use port 0xed as the IO delay. This frees up port 0x80 which is Use port 0xed as the IO delay. This frees up port 0x80 which is
often used as a hardware-debug port. often used as a hardware-debug port.
config IO_DELAY_UDELAY config IO_DELAY_UDELAY
bool "udelay based port-IO delay" bool "udelay based port-IO delay"
help ---help---
Use udelay(2) as the IO delay method. This provides the delay Use udelay(2) as the IO delay method. This provides the delay
while not having any side-effect on the IO port space. while not having any side-effect on the IO port space.
config IO_DELAY_NONE config IO_DELAY_NONE
bool "no port-IO delay" bool "no port-IO delay"
help ---help---
No port-IO delay. Will break on old boxes that require port-IO No port-IO delay. Will break on old boxes that require port-IO
delay for certain operations. Should work on most new machines. delay for certain operations. Should work on most new machines.
...@@ -276,18 +276,18 @@ config DEBUG_BOOT_PARAMS ...@@ -276,18 +276,18 @@ config DEBUG_BOOT_PARAMS
bool "Debug boot parameters" bool "Debug boot parameters"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on DEBUG_FS depends on DEBUG_FS
help ---help---
This option will cause struct boot_params to be exported via debugfs. This option will cause struct boot_params to be exported via debugfs.
config CPA_DEBUG config CPA_DEBUG
bool "CPA self-test code" bool "CPA self-test code"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
help ---help---
Do change_page_attr() self-tests every 30 seconds. Do change_page_attr() self-tests every 30 seconds.
config OPTIMIZE_INLINING config OPTIMIZE_INLINING
bool "Allow gcc to uninline functions marked 'inline'" bool "Allow gcc to uninline functions marked 'inline'"
help ---help---
This option determines if the kernel forces gcc to inline the functions This option determines if the kernel forces gcc to inline the functions
developers have marked 'inline'. Doing so takes away freedom from gcc to developers have marked 'inline'. Doing so takes away freedom from gcc to
do what it thinks is best, which is desirable for the gcc 3.x series of do what it thinks is best, which is desirable for the gcc 3.x series of
...@@ -300,4 +300,3 @@ config OPTIMIZE_INLINING ...@@ -300,4 +300,3 @@ config OPTIMIZE_INLINING
If unsure, say N. If unsure, say N.
endmenu endmenu
...@@ -70,14 +70,17 @@ else ...@@ -70,14 +70,17 @@ else
# this works around some issues with generating unwind tables in older gccs # this works around some issues with generating unwind tables in older gccs
# newer gccs do it by default # newer gccs do it by default
KBUILD_CFLAGS += -maccumulate-outgoing-args KBUILD_CFLAGS += -maccumulate-outgoing-args
endif
stackp := $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh ifdef CONFIG_CC_STACKPROTECTOR
stackp-$(CONFIG_CC_STACKPROTECTOR) := $(shell $(stackp) \ cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh
"$(CC)" "-fstack-protector -DGCC_HAS_SP" ) ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC)),y)
stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(stackp) \ stackp-y := -fstack-protector
"$(CC)" -fstack-protector-all ) stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += -fstack-protector-all
KBUILD_CFLAGS += $(stackp-y) KBUILD_CFLAGS += $(stackp-y)
else
$(warning stack protector enabled but no compiler support)
endif
endif endif
# Stackpointer is addressed different for 32 bit and 64 bit x86 # Stackpointer is addressed different for 32 bit and 64 bit x86
...@@ -102,29 +105,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables ...@@ -102,29 +105,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
# prevent gcc from generating any FP code by mistake # prevent gcc from generating any FP code by mistake
KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
###
# Sub architecture support
# fcore-y is linked before mcore-y files.
# Default subarch .c files
mcore-y := arch/x86/mach-default/
# Voyager subarch support
mflags-$(CONFIG_X86_VOYAGER) := -Iarch/x86/include/asm/mach-voyager
mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager/
# generic subarchitecture
mflags-$(CONFIG_X86_GENERICARCH):= -Iarch/x86/include/asm/mach-generic
fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/
mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/
# default subarch .h files
mflags-y += -Iarch/x86/include/asm/mach-default
# 64 bit does not support subarch support - clear sub arch variables
fcore-$(CONFIG_X86_64) :=
mcore-$(CONFIG_X86_64) :=
KBUILD_CFLAGS += $(mflags-y) KBUILD_CFLAGS += $(mflags-y)
KBUILD_AFLAGS += $(mflags-y) KBUILD_AFLAGS += $(mflags-y)
...@@ -150,9 +130,6 @@ core-$(CONFIG_LGUEST_GUEST) += arch/x86/lguest/ ...@@ -150,9 +130,6 @@ core-$(CONFIG_LGUEST_GUEST) += arch/x86/lguest/
core-y += arch/x86/kernel/ core-y += arch/x86/kernel/
core-y += arch/x86/mm/ core-y += arch/x86/mm/
# Remaining sub architecture files
core-y += $(mcore-y)
core-y += arch/x86/crypto/ core-y += arch/x86/crypto/
core-y += arch/x86/vdso/ core-y += arch/x86/vdso/
core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/ core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
* Copyright 2007-2008 rPath, Inc. - All Rights Reserved * Copyright 2007-2008 rPath, Inc. - All Rights Reserved
* Copyright 2009 Intel Corporation
* *
* This file is part of the Linux kernel, and is made available under * This file is part of the Linux kernel, and is made available under
* the terms of the GNU General Public License version 2. * the terms of the GNU General Public License version 2.
...@@ -15,16 +16,23 @@ ...@@ -15,16 +16,23 @@
#include "boot.h" #include "boot.h"
#define MAX_8042_LOOPS 100000 #define MAX_8042_LOOPS 100000
#define MAX_8042_FF 32
static int empty_8042(void) static int empty_8042(void)
{ {
u8 status; u8 status;
int loops = MAX_8042_LOOPS; int loops = MAX_8042_LOOPS;
int ffs = MAX_8042_FF;
while (loops--) { while (loops--) {
io_delay(); io_delay();
status = inb(0x64); status = inb(0x64);
if (status == 0xff) {
/* FF is a plausible, but very unlikely status */
if (!--ffs)
return -1; /* Assume no KBC present */
}
if (status & 1) { if (status & 1) {
/* Read and discard input data */ /* Read and discard input data */
io_delay(); io_delay();
...@@ -118,18 +126,14 @@ static void enable_a20_fast(void) ...@@ -118,18 +126,14 @@ static void enable_a20_fast(void)
int enable_a20(void) int enable_a20(void)
{ {
#if defined(CONFIG_X86_ELAN) #ifdef CONFIG_X86_VOYAGER
/* Elan croaks if we try to touch the KBC */
enable_a20_fast();
while (!a20_test_long())
;
return 0;
#elif defined(CONFIG_X86_VOYAGER)
/* On Voyager, a20_test() is unsafe? */ /* On Voyager, a20_test() is unsafe? */
enable_a20_kbc(); enable_a20_kbc();
return 0; return 0;
#else #else
int loops = A20_ENABLE_LOOPS; int loops = A20_ENABLE_LOOPS;
int kbc_err;
while (loops--) { while (loops--) {
/* First, check to see if A20 is already enabled /* First, check to see if A20 is already enabled
(legacy free, etc.) */ (legacy free, etc.) */
...@@ -142,13 +146,16 @@ int enable_a20(void) ...@@ -142,13 +146,16 @@ int enable_a20(void)
return 0; return 0;
/* Try enabling A20 through the keyboard controller */ /* Try enabling A20 through the keyboard controller */
empty_8042(); kbc_err = empty_8042();
if (a20_test_short()) if (a20_test_short())
return 0; /* BIOS worked, but with delayed reaction */ return 0; /* BIOS worked, but with delayed reaction */
if (!kbc_err) {
enable_a20_kbc(); enable_a20_kbc();
if (a20_test_long()) if (a20_test_long())
return 0; return 0;
}
/* Finally, try enabling the "fast A20 gate" */ /* Finally, try enabling the "fast A20 gate" */
enable_a20_fast(); enable_a20_fast();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -55,7 +55,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) ...@@ -55,7 +55,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
dump->regs.ds = (u16)regs->ds; dump->regs.ds = (u16)regs->ds;
dump->regs.es = (u16)regs->es; dump->regs.es = (u16)regs->es;
dump->regs.fs = (u16)regs->fs; dump->regs.fs = (u16)regs->fs;
savesegment(gs, dump->regs.gs); dump->regs.gs = get_user_gs(regs);
dump->regs.orig_ax = regs->orig_ax; dump->regs.orig_ax = regs->orig_ax;
dump->regs.ip = regs->ip; dump->regs.ip = regs->ip;
dump->regs.cs = (u16)regs->cs; dump->regs.cs = (u16)regs->cs;
......
...@@ -102,9 +102,6 @@ static inline void disable_acpi(void) ...@@ -102,9 +102,6 @@ static inline void disable_acpi(void)
acpi_noirq = 1; acpi_noirq = 1;
} }
/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
#define FIX_ACPI_PAGES 4
extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
static inline void acpi_noirq_set(void) { acpi_noirq = 1; } static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
......
...@@ -33,7 +33,13 @@ ...@@ -33,7 +33,13 @@
} while (0) } while (0)
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
extern void generic_apic_probe(void); extern void generic_apic_probe(void);
#else
static inline void generic_apic_probe(void)
{
}
#endif
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
...@@ -41,6 +47,21 @@ extern unsigned int apic_verbosity; ...@@ -41,6 +47,21 @@ extern unsigned int apic_verbosity;
extern int local_apic_timer_c2_ok; extern int local_apic_timer_c2_ok;
extern int disable_apic; extern int disable_apic;
#ifdef CONFIG_SMP
extern void __inquire_remote_apic(int apicid);
#else /* CONFIG_SMP */
static inline void __inquire_remote_apic(int apicid)
{
}
#endif /* CONFIG_SMP */
static inline void default_inquire_remote_apic(int apicid)
{
if (apic_verbosity >= APIC_DEBUG)
__inquire_remote_apic(apicid);
}
/* /*
* Basic functions accessing APICs. * Basic functions accessing APICs.
*/ */
...@@ -124,12 +145,35 @@ struct apic_ops { ...@@ -124,12 +145,35 @@ struct apic_ops {
extern struct apic_ops *apic_ops; extern struct apic_ops *apic_ops;
#define apic_read (apic_ops->read) static inline u32 apic_read(u32 reg)
#define apic_write (apic_ops->write) {
#define apic_icr_read (apic_ops->icr_read) return apic_ops->read(reg);
#define apic_icr_write (apic_ops->icr_write) }
#define apic_wait_icr_idle (apic_ops->wait_icr_idle)
#define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle) static inline void apic_write(u32 reg, u32 val)
{
apic_ops->write(reg, val);
}
static inline u64 apic_icr_read(void)
{
return apic_ops->icr_read();
}
static inline void apic_icr_write(u32 low, u32 high)
{
apic_ops->icr_write(low, high);
}
static inline void apic_wait_icr_idle(void)
{
apic_ops->wait_icr_idle();
}
static inline u32 safe_apic_wait_icr_idle(void)
{
return apic_ops->safe_wait_icr_idle();
}
extern int get_physical_broadcast(void); extern int get_physical_broadcast(void);
...@@ -196,4 +240,22 @@ static inline void disable_local_APIC(void) { } ...@@ -196,4 +240,22 @@ static inline void disable_local_APIC(void) { }
#endif /* !CONFIG_X86_LOCAL_APIC */ #endif /* !CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_X86_64
#define SET_APIC_ID(x) (apic->set_apic_id(x))
#else
#ifdef CONFIG_X86_LOCAL_APIC
static inline unsigned default_get_apic_id(unsigned long x)
{
unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
if (APIC_XAPIC(ver))
return (x >> 24) & 0xFF;
else
return (x >> 24) & 0x0F;
}
#endif
#endif
#endif /* _ASM_X86_APIC_H */ #endif /* _ASM_X86_APIC_H */
#ifndef __ASM_MACH_APIC_H
#define __ASM_MACH_APIC_H
#define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu))
#define esr_disable (1)
static inline int apic_id_registered(void)
{
return (1);
}
static inline const cpumask_t *target_cpus(void)
{
#ifdef CONFIG_SMP
return &cpu_online_map;
#else
return &cpumask_of_cpu(0);
#endif
}
#undef APIC_DEST_LOGICAL
#define APIC_DEST_LOGICAL 0
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
#define INT_DELIVERY_MODE (dest_Fixed)
#define INT_DEST_MODE (0) /* phys delivery to target proc */
#define NO_BALANCE_IRQ (0)
static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
{
return (0);
}
static inline unsigned long check_apicid_present(int bit)
{
return (1);
}
static inline unsigned long calculate_ldr(int cpu)
{
unsigned long val, id;
val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
id = xapic_phys_to_log_apicid(cpu);
val |= SET_APIC_LOGICAL_ID(id);
return val;
}
/*
* Set up the logical destination ID.
*
* Intel recommends to set DFR, LDR and TPR before enabling
* an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
* document number 292116). So here it goes...
*/
static inline void init_apic_ldr(void)
{
unsigned long val;
int cpu = smp_processor_id();
apic_write(APIC_DFR, APIC_DFR_VALUE);
val = calculate_ldr(cpu);
apic_write(APIC_LDR, val);
}
static inline void setup_apic_routing(void)
{
printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
"Physflat", nr_ioapics);
}
static inline int multi_timer_check(int apic, int irq)
{
return (0);
}
static inline int apicid_to_node(int logical_apicid)
{
return apicid_2_node[hard_smp_processor_id()];
}
static inline int cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < nr_cpu_ids)
return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);
return BAD_APICID;
}
static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
{
return physid_mask_of_physid(phys_apicid);
}
extern u8 cpu_2_logical_apicid[];
/* Mapping from cpu number to logical apicid */
static inline int cpu_to_logical_apicid(int cpu)
{
if (cpu >= nr_cpu_ids)
return BAD_APICID;
return cpu_physical_id(cpu);
}
static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
{
/* For clustered we don't have a good way to do this yet - hack */
return physids_promote(0xFFL);
}
static inline void setup_portio_remap(void)
{
}
static inline void enable_apic_mode(void)
{
}
static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
{
return (1);
}
/* As we are using single CPU as destination, pick only one CPU here */
static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
{
int cpu;
int apicid;
cpu = first_cpu(*cpumask);
apicid = cpu_to_logical_apicid(cpu);
return apicid;
}
static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
const struct cpumask *andmask)
{
int cpu;
/*
* We're using fixed IRQ delivery, can only return one phys APIC ID.
* May as well be the first.
*/
for_each_cpu_and(cpu, cpumask, andmask)
if (cpumask_test_cpu(cpu, cpu_online_mask))
break;
if (cpu < nr_cpu_ids)
return cpu_to_logical_apicid(cpu);
return BAD_APICID;
}
static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
{
return cpuid_apic >> index_msb;
}
#endif /* __ASM_MACH_APIC_H */
#ifndef __ASM_MACH_APICDEF_H
#define __ASM_MACH_APICDEF_H
#define APIC_ID_MASK (0xFF<<24)
static inline unsigned get_apic_id(unsigned long x)
{
return (((x)>>24)&0xFF);
}
#define GET_APIC_ID(x) get_apic_id(x)
#endif
#ifndef __ASM_MACH_IPI_H
#define __ASM_MACH_IPI_H
void send_IPI_mask_sequence(const struct cpumask *mask, int vector);
void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
static inline void send_IPI_mask(const struct cpumask *mask, int vector)
{
send_IPI_mask_sequence(mask, vector);
}
static inline void send_IPI_allbutself(int vector)
{
send_IPI_mask_allbutself(cpu_online_mask, vector);
}
static inline void send_IPI_all(int vector)
{
send_IPI_mask(cpu_online_mask, vector);
}
#endif /* __ASM_MACH_IPI_H */
/* /*
* Some macros to handle stack frames in assembly.
x86 function call convention, 64-bit:
-------------------------------------
arguments | callee-saved | extra caller-saved | return
[callee-clobbered] | | [callee-clobbered] |
---------------------------------------------------------------------------
rdi rsi rdx rcx r8-9 | rbx rbp [*] r12-15 | r10-11 | rax, rdx [**]
( rsp is obviously invariant across normal function calls. (gcc can 'merge'
functions when it sees tail-call optimization possibilities) rflags is
clobbered. Leftover arguments are passed over the stack frame.)
[*] In the frame-pointers case rbp is fixed to the stack frame.
[**] for struct return values wider than 64 bits the return convention is a
bit more complex: up to 128 bits width we return small structures
straight in rax, rdx. For structures larger than that (3 words or
larger) the caller puts a pointer to an on-stack return struct
[allocated in the caller's stack frame] into the first argument - i.e.
into rdi. All other arguments shift up by one in this case.
Fortunately this case is rare in the kernel.
For 32-bit we have the following conventions - kernel is built with
-mregparm=3 and -freg-struct-return:
x86 function calling convention, 32-bit:
----------------------------------------
arguments | callee-saved | extra caller-saved | return
[callee-clobbered] | | [callee-clobbered] |
-------------------------------------------------------------------------
eax edx ecx | ebx edi esi ebp [*] | <none> | eax, edx [**]
( here too esp is obviously invariant across normal function calls. eflags
is clobbered. Leftover arguments are passed over the stack frame. )
[*] In the frame-pointers case ebp is fixed to the stack frame.
[**] We build with -freg-struct-return, which on 32-bit means similar
semantics as on 64-bit: edx can be used for a second return value
(i.e. covering integer and structure sizes up to 64 bits) - after that
it gets more complex and more expensive: 3-word or larger struct returns
get done in the caller's frame and the pointer to the return struct goes
into regparm0, i.e. eax - the other arguments shift up and the
function's register parameters degenerate to regparm=2 in essence.
*/
/*
* 64-bit system call stack frame layout defines and helpers,
* for assembly code:
*/ */
#define R15 0 #define R15 0
...@@ -9,7 +59,7 @@ ...@@ -9,7 +59,7 @@
#define RBP 32 #define RBP 32
#define RBX 40 #define RBX 40
/* arguments: interrupts/non tracing syscalls only save upto here*/ /* arguments: interrupts/non tracing syscalls only save up to here: */
#define R11 48 #define R11 48
#define R10 56 #define R10 56
#define R9 64 #define R9 64
...@@ -22,7 +72,7 @@ ...@@ -22,7 +72,7 @@
#define ORIG_RAX 120 /* + error_code */ #define ORIG_RAX 120 /* + error_code */
/* end of arguments */ /* end of arguments */
/* cpu exception frame or undefined in case of fast syscall. */ /* cpu exception frame or undefined in case of fast syscall: */
#define RIP 128 #define RIP 128
#define CS 136 #define CS 136
#define EFLAGS 144 #define EFLAGS 144
......
...@@ -32,10 +32,6 @@ extern void arch_unregister_cpu(int); ...@@ -32,10 +32,6 @@ extern void arch_unregister_cpu(int);
DECLARE_PER_CPU(int, cpu_state); DECLARE_PER_CPU(int, cpu_state);
#ifdef CONFIG_X86_HAS_BOOT_CPU_ID extern unsigned int boot_cpu_id;
extern unsigned char boot_cpu_id;
#else
#define boot_cpu_id 0
#endif
#endif /* _ASM_X86_CPU_H */ #endif /* _ASM_X86_CPU_H */
...@@ -10,6 +10,8 @@ extern cpumask_var_t cpu_callout_mask; ...@@ -10,6 +10,8 @@ extern cpumask_var_t cpu_callout_mask;
extern cpumask_var_t cpu_initialized_mask; extern cpumask_var_t cpu_initialized_mask;
extern cpumask_var_t cpu_sibling_setup_mask; extern cpumask_var_t cpu_sibling_setup_mask;
extern void setup_cpu_local_masks(void);
#else /* CONFIG_X86_32 */ #else /* CONFIG_X86_32 */
extern cpumask_t cpu_callin_map; extern cpumask_t cpu_callin_map;
...@@ -22,6 +24,8 @@ extern cpumask_t cpu_sibling_setup_map; ...@@ -22,6 +24,8 @@ extern cpumask_t cpu_sibling_setup_map;
#define cpu_initialized_mask ((struct cpumask *)&cpu_initialized) #define cpu_initialized_mask ((struct cpumask *)&cpu_initialized)
#define cpu_sibling_setup_mask ((struct cpumask *)&cpu_sibling_setup_map) #define cpu_sibling_setup_mask ((struct cpumask *)&cpu_sibling_setup_map)
static inline void setup_cpu_local_masks(void) { }
#endif /* CONFIG_X86_32 */ #endif /* CONFIG_X86_32 */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -112,7 +112,7 @@ extern unsigned int vdso_enabled; ...@@ -112,7 +112,7 @@ extern unsigned int vdso_enabled;
* now struct_user_regs, they are different) * now struct_user_regs, they are different)
*/ */
#define ELF_CORE_COPY_REGS(pr_reg, regs) \ #define ELF_CORE_COPY_REGS_COMMON(pr_reg, regs) \
do { \ do { \
pr_reg[0] = regs->bx; \ pr_reg[0] = regs->bx; \
pr_reg[1] = regs->cx; \ pr_reg[1] = regs->cx; \
...@@ -124,7 +124,6 @@ do { \ ...@@ -124,7 +124,6 @@ do { \
pr_reg[7] = regs->ds & 0xffff; \ pr_reg[7] = regs->ds & 0xffff; \
pr_reg[8] = regs->es & 0xffff; \ pr_reg[8] = regs->es & 0xffff; \
pr_reg[9] = regs->fs & 0xffff; \ pr_reg[9] = regs->fs & 0xffff; \
savesegment(gs, pr_reg[10]); \
pr_reg[11] = regs->orig_ax; \ pr_reg[11] = regs->orig_ax; \
pr_reg[12] = regs->ip; \ pr_reg[12] = regs->ip; \
pr_reg[13] = regs->cs & 0xffff; \ pr_reg[13] = regs->cs & 0xffff; \
...@@ -133,6 +132,18 @@ do { \ ...@@ -133,6 +132,18 @@ do { \
pr_reg[16] = regs->ss & 0xffff; \ pr_reg[16] = regs->ss & 0xffff; \
} while (0); } while (0);
#define ELF_CORE_COPY_REGS(pr_reg, regs) \
do { \
ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\
pr_reg[10] = get_user_gs(regs); \
} while (0);
#define ELF_CORE_COPY_KERNEL_REGS(pr_reg, regs) \
do { \
ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\
savesegment(gs, pr_reg[10]); \
} while (0);
#define ELF_PLATFORM (utsname()->machine) #define ELF_PLATFORM (utsname()->machine)
#define set_personality_64bit() do { } while (0) #define set_personality_64bit() do { } while (0)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* is no hardware IRQ pin equivalent for them, they are triggered * is no hardware IRQ pin equivalent for them, they are triggered
* through the ICC by us (IPIs) * through the ICC by us (IPIs)
*/ */
#ifdef CONFIG_X86_SMP #ifdef CONFIG_SMP
BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR)
BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR)
BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR) BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR)
......
This diff is collapsed.
#ifndef __ASM_ES7000_APICDEF_H
#define __ASM_ES7000_APICDEF_H
#define APIC_ID_MASK (0xFF<<24)
static inline unsigned get_apic_id(unsigned long x)
{
return (((x)>>24)&0xFF);
}
#define GET_APIC_ID(x) get_apic_id(x)
#endif
#ifndef __ASM_ES7000_IPI_H
#define __ASM_ES7000_IPI_H
void send_IPI_mask_sequence(const struct cpumask *mask, int vector);
void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
static inline void send_IPI_mask(const struct cpumask *mask, int vector)
{
send_IPI_mask_sequence(mask, vector);
}
static inline void send_IPI_allbutself(int vector)
{
send_IPI_mask_allbutself(cpu_online_mask, vector);
}
static inline void send_IPI_all(int vector)
{
send_IPI_mask(cpu_online_mask, vector);
}
#endif /* __ASM_ES7000_IPI_H */
#ifndef __ASM_ES7000_MPPARSE_H
#define __ASM_ES7000_MPPARSE_H
#include <linux/acpi.h>
extern int parse_unisys_oem (char *oemptr);
extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
extern void setup_unisys(void);
#ifndef CONFIG_X86_GENERICARCH
extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id);
extern int mps_oem_check(struct mpc_table *mpc, char *oem, char *productid);
#endif
#ifdef CONFIG_ACPI
static inline int es7000_check_dsdt(void)
{
struct acpi_table_header header;
if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) &&
!strncmp(header.oem_id, "UNISYS", 6))
return 1;
return 0;
}
#endif
#endif /* __ASM_MACH_MPPARSE_H */
#ifndef __ASM_ES7000_WAKECPU_H
#define __ASM_ES7000_WAKECPU_H
#define TRAMPOLINE_PHYS_LOW 0x467
#define TRAMPOLINE_PHYS_HIGH 0x469
static inline void wait_for_init_deassert(atomic_t *deassert)
{
#ifndef CONFIG_ES7000_CLUSTERED_APIC
while (!atomic_read(deassert))
cpu_relax();
#endif
return;
}
/* Nothing to do for most platforms, since cleared by the INIT cycle */
static inline void smp_callin_clear_local_apic(void)
{
}
static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
{
}
static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
{
}
extern void __inquire_remote_apic(int apicid);
static inline void inquire_remote_apic(int apicid)
{
if (apic_verbosity >= APIC_DEBUG)
__inquire_remote_apic(apicid);
}
#endif /* __ASM_MACH_WAKECPU_H */
...@@ -95,10 +95,6 @@ enum fixed_addresses { ...@@ -95,10 +95,6 @@ enum fixed_addresses {
(__end_of_permanent_fixed_addresses & 255), (__end_of_permanent_fixed_addresses & 255),
FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
FIX_WP_TEST, FIX_WP_TEST,
#ifdef CONFIG_ACPI
FIX_ACPI_BEGIN,
FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
#endif
#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
FIX_OHCI1394_BASE, FIX_OHCI1394_BASE,
#endif #endif
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment