Skip to content

Commit

Permalink
Merge branch 'x86/generalize-visws' into x86/core
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingo Molnar committed Jul 11, 2008
2 parents 5b4d238 + 39415a4 commit 6c82a00
Show file tree
Hide file tree
Showing 36 changed files with 865 additions and 909 deletions.
62 changes: 31 additions & 31 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ config X86_64_SMP
config X86_HT
bool
depends on SMP
depends on (X86_32 && !(X86_VISWS || X86_VOYAGER)) || X86_64
depends on (X86_32 && !X86_VOYAGER) || X86_64
default y

config X86_BIOS_REBOOT
bool
depends on !X86_VISWS && !X86_VOYAGER
depends on !X86_VOYAGER
default y

config X86_TRAMPOLINE
Expand Down Expand Up @@ -232,13 +232,13 @@ config SMP

config X86_FIND_SMP_CONFIG
def_bool y
depends on X86_MPPARSE || X86_VOYAGER || X86_VISWS
depends on X86_MPPARSE || X86_VOYAGER

if ACPI
config X86_MPPARSE
def_bool y
bool "Enable MPS table"
depends on X86_LOCAL_APIC && !X86_VISWS
depends on X86_LOCAL_APIC
help
For old smp systems that do not have proper acpi support. Newer systems
(esp with 64bit cpus) with acpi support, MADT and DSDT will override it
Expand All @@ -247,7 +247,7 @@ endif
if !ACPI
config X86_MPPARSE
def_bool y
depends on X86_LOCAL_APIC && !X86_VISWS
depends on X86_LOCAL_APIC
endif

choice
Expand Down Expand Up @@ -281,18 +281,6 @@ config X86_VOYAGER
If you do not specifically know you have a Voyager based machine,
say N here, otherwise the kernel you build will not be bootable.

config X86_VISWS
bool "SGI 320/540 (Visual Workstation)"
depends on X86_32 && PCI
help
The SGI Visual Workstation series is an IA32-based workstation
based on SGI systems chips with some legacy PC hardware attached.

Say Y here to create a kernel to run on the SGI 320 or 540.

A kernel compiled for the Visual Workstation will not run on PCs
and vice versa. See <file:Documentation/sgi-visws.txt> for details.

config X86_GENERICARCH
bool "Generic architecture"
depends on X86_32
Expand Down Expand Up @@ -363,6 +351,18 @@ config X86_VSMP

endchoice

config X86_VISWS
bool "SGI 320/540 (Visual Workstation)"
depends on X86_32 && PCI && !X86_VOYAGER && X86_MPPARSE && PCI_GODIRECT
help
The SGI Visual Workstation series is an IA32-based workstation
based on SGI systems chips with some legacy PC hardware attached.

Say Y here to create a kernel to run on the SGI 320 or 540.

A kernel compiled for the Visual Workstation will run on general
PCs as well. See <file:Documentation/sgi-visws.txt> for details.

config SCHED_NO_NO_OMIT_FRAME_POINTER
def_bool y
prompt "Single-depth WCHAN output"
Expand Down Expand Up @@ -391,7 +391,7 @@ config VMI
bool "VMI Guest support"
select PARAVIRT
depends on X86_32
depends on !(X86_VISWS || X86_VOYAGER)
depends on !X86_VOYAGER
help
VMI provides a paravirtualized interface to the VMware ESX server
(it could be used by other hypervisors in theory too, but is not
Expand All @@ -402,7 +402,7 @@ config KVM_CLOCK
bool "KVM paravirtualized clock"
select PARAVIRT
select PARAVIRT_CLOCK
depends on !(X86_VISWS || X86_VOYAGER)
depends on !X86_VOYAGER
help
Turning on this option will allow you to run a paravirtualized clock
when running over the KVM hypervisor. Instead of relying on a PIT
Expand All @@ -413,7 +413,7 @@ config KVM_CLOCK
config KVM_GUEST
bool "KVM Guest support"
select PARAVIRT
depends on !(X86_VISWS || X86_VOYAGER)
depends on !X86_VOYAGER
help
This option enables various optimizations for running under the KVM
hypervisor.
Expand All @@ -422,7 +422,7 @@ source "arch/x86/lguest/Kconfig"

config PARAVIRT
bool "Enable paravirtualization code"
depends on !(X86_VISWS || X86_VOYAGER)
depends on !X86_VOYAGER
help
This changes the kernel so it can modify itself when it is run
under a hypervisor, potentially improving performance significantly
Expand Down Expand Up @@ -628,7 +628,7 @@ source "kernel/Kconfig.preempt"

config X86_UP_APIC
bool "Local APIC support on uniprocessors"
depends on X86_32 && !SMP && !(X86_VISWS || X86_VOYAGER || X86_GENERICARCH)
depends on X86_32 && !SMP && !(X86_VOYAGER || X86_GENERICARCH)
help
A local APIC (Advanced Programmable Interrupt Controller) is an
integrated interrupt controller in the CPU. If you have a single-CPU
Expand All @@ -653,11 +653,11 @@ config X86_UP_IOAPIC

config X86_LOCAL_APIC
def_bool y
depends on X86_64 || (X86_32 && (X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER) || X86_GENERICARCH))
depends on X86_64 || (X86_32 && (X86_UP_APIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH))

config X86_IO_APIC
def_bool y
depends on X86_64 || (X86_32 && (X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER)) || X86_GENERICARCH))
depends on X86_64 || (X86_32 && (X86_UP_IOAPIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH))

config X86_VISWS_APIC
def_bool y
Expand Down Expand Up @@ -711,7 +711,7 @@ config X86_MCE_NONFATAL

config X86_MCE_P4THERMAL
bool "check for P4 thermal throttling interrupt."
depends on X86_32 && X86_MCE && (X86_UP_APIC || SMP) && !X86_VISWS
depends on X86_32 && X86_MCE && (X86_UP_APIC || SMP)
help
Enabling this feature will cause a message to be printed when the P4
enters thermal throttling.
Expand Down Expand Up @@ -1414,7 +1414,7 @@ config X86_APM_BOOT

menuconfig APM
tristate "APM (Advanced Power Management) BIOS support"
depends on X86_32 && PM_SLEEP && !X86_VISWS
depends on X86_32 && PM_SLEEP
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with
Expand Down Expand Up @@ -1561,7 +1561,7 @@ config PCI

choice
prompt "PCI access mode"
depends on X86_32 && PCI && !X86_VISWS
depends on X86_32 && PCI
default PCI_GOANY
---help---
On PCI systems, the BIOS can be used to detect the PCI devices and
Expand Down Expand Up @@ -1598,12 +1598,12 @@ endchoice

config PCI_BIOS
def_bool y
depends on X86_32 && !X86_VISWS && PCI && (PCI_GOBIOS || PCI_GOANY)
depends on X86_32 && PCI && (PCI_GOBIOS || PCI_GOANY)

# x86-64 doesn't support PCI BIOS access from long mode so always go direct.
config PCI_DIRECT
def_bool y
depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC) || X86_VISWS)
depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC))

config PCI_MMCONFIG
def_bool y
Expand Down Expand Up @@ -1663,7 +1663,7 @@ if X86_32

config ISA
bool "ISA support"
depends on !(X86_VOYAGER || X86_VISWS)
depends on !X86_VOYAGER
help
Find out whether you have ISA slots on your motherboard. ISA is the
name of a bus system, i.e. the way the CPU talks to the other stuff
Expand All @@ -1690,7 +1690,7 @@ config EISA
source "drivers/eisa/Kconfig"

config MCA
bool "MCA support" if !(X86_VISWS || X86_VOYAGER)
bool "MCA support" if !X86_VOYAGER
default y if X86_VOYAGER
help
MicroChannel Architecture is found in some IBM PS/2 machines and
Expand Down
4 changes: 0 additions & 4 deletions arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ mcore-y := arch/x86/mach-default/
mflags-$(CONFIG_X86_VOYAGER) := -Iinclude/asm-x86/mach-voyager
mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager/

# VISWS subarch support
mflags-$(CONFIG_X86_VISWS) := -Iinclude/asm-x86/mach-visws
mcore-$(CONFIG_X86_VISWS) := arch/x86/mach-visws/

# generic subarchitecture
mflags-$(CONFIG_X86_GENERICARCH):= -Iinclude/asm-x86/mach-generic
fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
obj-y += traps_$(BITS).o irq_$(BITS).o
obj-y += time_$(BITS).o ioport.o ldt.o
obj-y += setup.o i8259.o irqinit_$(BITS).o setup_percpu.o
obj-$(CONFIG_X86_VISWS) += visws_quirks.o
obj-$(CONFIG_X86_32) += probe_roms_32.o
obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o
obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ void __cpuinit setup_local_APIC(void)
* Double-check whether this APIC is really registered.
*/
if (!apic_id_registered())
BUG();
WARN_ON_ONCE(1);

/*
* Intel recommends to set DFR, LDR and TPR before enabling
Expand Down
11 changes: 11 additions & 0 deletions arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,11 @@ void __init e820_reserve_resources(void)
}
}

/*
* Non-standard memory setup can be specified via this quirk:
*/
char * (*arch_memory_setup_quirk)(void);

char *__init default_machine_specific_memory_setup(void)
{
char *who = "BIOS-e820";
Expand Down Expand Up @@ -1353,6 +1358,12 @@ char *__init default_machine_specific_memory_setup(void)

char *__init __attribute__((weak)) machine_specific_memory_setup(void)
{
if (arch_memory_setup_quirk) {
char *who = arch_memory_setup_quirk();

if (who)
return who;
}
return default_machine_specific_memory_setup();
}

Expand Down
20 changes: 18 additions & 2 deletions arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,23 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)

static struct intel_mp_floating *mpf_found;

/*
* Machine specific quirk for finding the SMP config before other setup
* activities destroy the table:
*/
int (*mach_get_smp_config_quirk)(unsigned int early);

/*
* Scan the memory blocks for an SMP configuration block.
*/
static void __init __get_smp_config(unsigned early)
static void __init __get_smp_config(unsigned int early)
{
struct intel_mp_floating *mpf = mpf_found;

if (mach_get_smp_config_quirk) {
if (mach_get_smp_config_quirk(early))
return;
}
if (acpi_lapic && early)
return;
/*
Expand Down Expand Up @@ -889,10 +899,16 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
return 0;
}

static void __init __find_smp_config(unsigned reserve)
int (*mach_find_smp_config_quirk)(unsigned int reserve);

static void __init __find_smp_config(unsigned int reserve)
{
unsigned int address;

if (mach_find_smp_config_quirk) {
if (mach_find_smp_config_quirk(reserve))
return;
}
/*
* FIXME: Linux assumes you have 640K of base ram..
* this continues the error...
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ void __init setup_arch(char **cmdline_p)
{
#ifdef CONFIG_X86_32
memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
visws_early_detect();
pre_setup_arch_hook();
early_cpu_init();
#else
Expand Down
Loading

0 comments on commit 6c82a00

Please sign in to comment.