Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99864
b: refs/heads/master
c: 3c999f1
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent e21b5d2 commit e09a4ba
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88a6846c70ad6bf33a545d554ace801d69e8a1a5
refs/heads/master: 3c999f142665265afd0fe9190204dd051f17e505
14 changes: 14 additions & 0 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,20 @@ static int __init parse_pci(char *arg)
}
early_param("pci", parse_pci);

int __init acpi_mps_check(void)
{
#if defined(CONFIG_X86_LOCAL_APIC) && !defined(CONFIG_X86_MPPARSE)
/* mptable code is not built-in*/
if (acpi_disabled || acpi_noirq) {
printk(KERN_WARNING "MPS support code is not built-in.\n"
"Using acpi=off or acpi=noirq or pci=noacpi "
"may have problem\n");
return 1;
}
#endif
return 0;
}

#ifdef CONFIG_X86_IO_APIC
static int __init parse_acpi_skip_timer_override(char *arg)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ unsigned long mp_lapic_addr;
*
* -1=force-disable, +1=force-enable
*/
static int enable_local_apic __initdata;
int enable_local_apic;

/* Local APIC timer verification ok */
static int local_apic_timer_verify_ok;
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ void __init setup_per_cpu_areas(void)
char *ptr;
int cpu;

/* no processor from mptable or madt */
if (!num_processors)
num_processors = 1;

#ifdef CONFIG_HOTPLUG_CPU
prefill_possible_map();
#else
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ void __init setup_arch(char **cmdline_p)

parse_early_param();

if (acpi_mps_check()){
enable_local_apic = -1;
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
}

finish_e820_parsing();

probe_roms();
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ void __init setup_arch(char **cmdline_p)

parse_early_param();

if (acpi_mps_check()) {
disable_apic = 1;
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
}

#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
if (init_ohci1394_dma_early)
init_ohci1394_dma_on_all_controllers();
Expand Down Expand Up @@ -723,6 +728,10 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
cpu_devs[c->x86_vendor]->c_early_init(c);

validate_pat_support(c);

/* early_param could clear that, but recall get it set again */
if (disable_apic)
clear_cpu_cap(c, X86_FEATURE_APIC);
}

/*
Expand Down
6 changes: 5 additions & 1 deletion trunk/include/asm-x86/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ extern int apic_verbosity;
extern int local_apic_timer_c2_ok;

extern int ioapic_force;
extern int disable_apic;

#ifdef CONFIG_X86_64
extern int disable_apic;
#else
extern int enable_local_apic;
#endif
/*
* Basic functions accessing APICs.
*/
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
int early_acpi_boot_init(void);
int acpi_boot_init (void);
int acpi_boot_table_init (void);
int acpi_mps_check (void);
int acpi_numa_init (void);

int acpi_table_init (void);
Expand Down Expand Up @@ -250,6 +251,11 @@ static inline int acpi_boot_table_init(void)
return 0;
}

static inline int acpi_mps_check(void)
{
return 0;
}

static inline int acpi_check_resource_conflict(struct resource *res)
{
return 0;
Expand Down

0 comments on commit e09a4ba

Please sign in to comment.