Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100040
b: refs/heads/master
c: ff1b15b
h: refs/heads/master
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Jul 9, 2008
1 parent 7e49b69 commit b439617
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 216 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: a737abd11ac4eb9f4226fa8c9f1d9b5be12a96c1
refs/heads/master: ff1b15b646177c6cc465ac2dd0be6ae16e965654
44 changes: 6 additions & 38 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <asm/pgtable.h>
#include <asm/io_apic.h>
#include <asm/apic.h>
#include <asm/genapic.h>
#include <asm/io.h>
#include <asm/mpspec.h>
#include <asm/smp.h>
Expand Down Expand Up @@ -1374,6 +1373,8 @@ static void __init acpi_process_madt(void)
return;
}

#ifdef __i386__

static int __init disable_acpi_irq(const struct dmi_system_id *d)
{
if (!acpi_force) {
Expand Down Expand Up @@ -1434,17 +1435,6 @@ dmi_disable_irq0_through_ioapic(const struct dmi_system_id *d)
return 0;
}

/*
* Force ignoring BIOS IRQ0 pin2 override
*/
static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
{
pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n", d->ident);
acpi_skip_timer_override = 1;
force_mask_ioapic_irq_2();
return 0;
}

/*
* If your system is blacklisted here, but you find that acpi=force
* works for you, please contact acpi-devel@sourceforge.net
Expand Down Expand Up @@ -1638,35 +1628,11 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6325"),
},
},
/*
* HP laptops which use a DSDT reporting as HP/SB400/10000,
* which includes some code which overrides all temperature
* trip points to 16C if the INTIN2 input of the I/O APIC
* is enabled. This input is incorrectly designated the
* ISA IRQ 0 via an interrupt source override even though
* it is wired to the output of the master 8259A and INTIN0
* is not connected at all. Force ignoring BIOS IRQ0 pin2
* override in that cases.
*/
{
.callback = dmi_ignore_irq0_timer_override,
.ident = "HP NX6125 laptop",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6125"),
},
},
{
.callback = dmi_ignore_irq0_timer_override,
.ident = "HP NX6325 laptop",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6325"),
},
},
{}
};

#endif /* __i386__ */

/*
* acpi_boot_table_init() and acpi_boot_init()
* called from setup_arch(), always.
Expand Down Expand Up @@ -1694,7 +1660,9 @@ int __init acpi_boot_table_init(void)
{
int error;

#ifdef __i386__
dmi_check_system(acpi_dmi_table);
#endif

/*
* If acpi_disabled, bail out
Expand Down
26 changes: 6 additions & 20 deletions trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,25 +1056,12 @@ unsigned long __initdata end_user_pfn = MAX_ARCH_PFN;
/*
* Find the highest page frame number we have available
*/
unsigned long __init e820_end(void)
unsigned long __init e820_end_of_ram(void)
{
int i;
unsigned long last_pfn = 0;
unsigned long last_pfn;
unsigned long max_arch_pfn = MAX_ARCH_PFN;

for (i = 0; i < e820.nr_map; i++) {
struct e820entry *ei = &e820.map[i];
unsigned long end_pfn;

#ifdef CONFIG_X86_32
if (ei->type != E820_RAM)
continue;
#endif

end_pfn = (ei->addr + ei->size) >> PAGE_SHIFT;
if (end_pfn > last_pfn)
last_pfn = end_pfn;
}
last_pfn = find_max_pfn_with_active_regions();

if (last_pfn > max_arch_pfn)
last_pfn = max_arch_pfn;
Expand Down Expand Up @@ -1198,17 +1185,16 @@ static int __init parse_memmap_opt(char *p)
char *oldp;
u64 start_at, mem_size;

if (!p)
return -EINVAL;

if (!strcmp(p, "exactmap")) {
#ifdef CONFIG_CRASH_DUMP
/*
* If we are doing a crash dump, we still need to know
* the real mem size before original memory map is
* reset.
*/
saved_max_pfn = e820_end();
e820_register_active_regions(0, 0, -1UL);
saved_max_pfn = e820_end_of_ram();
remove_all_active_ranges();
#endif
e820.nr_map = 0;
userdef = 1;
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/x86/kernel/io_apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
static DEFINE_SPINLOCK(ioapic_lock);
static DEFINE_SPINLOCK(vector_lock);

static bool mask_ioapic_irq_2 __initdata;

void __init force_mask_ioapic_irq_2(void)
{
mask_ioapic_irq_2 = true;
}

int timer_through_8259 __initdata;

/*
Expand Down Expand Up @@ -2179,9 +2172,6 @@ static inline void __init check_timer(void)
printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
vector, apic1, pin1, apic2, pin2);

if (mask_ioapic_irq_2)
mask_IO_APIC_irq(2);

/*
* Some BIOS writers are clueless and report the ExtINTA
* I/O APIC input from the cascaded 8259A as the timer
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/x86/kernel/io_apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ static int no_timer_check;

static int disable_timer_pin_1 __initdata;

static bool mask_ioapic_irq_2 __initdata;

void __init force_mask_ioapic_irq_2(void)
{
mask_ioapic_irq_2 = true;
}

int timer_through_8259 __initdata;

/* Where if anywhere is the i8259 connect in external int mode */
Expand Down Expand Up @@ -1705,9 +1698,6 @@ static inline void __init check_timer(void)
apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
cfg->vector, apic1, pin1, apic2, pin2);

if (mask_ioapic_irq_2)
mask_IO_APIC_irq(2);

/*
* Some BIOS writers are clueless and report the ExtINTA
* I/O APIC input from the cascaded 8259A as the timer
Expand Down
13 changes: 10 additions & 3 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,18 +709,22 @@ void __init setup_arch(char **cmdline_p)
early_gart_iommu_check();
#endif

e820_register_active_regions(0, 0, -1UL);
/*
* partially used pages are not usable - thus
* we are rounding upwards:
*/
max_pfn = e820_end();
max_pfn = e820_end_of_ram();

/* preallocate 4k for mptable mpc */
early_reserve_e820_mpc_new();
/* update e820 for memory not covered by WB MTRRs */
mtrr_bp_init();
if (mtrr_trim_uncached_memory(max_pfn))
max_pfn = e820_end();
if (mtrr_trim_uncached_memory(max_pfn)) {
remove_all_active_ranges();
e820_register_active_regions(0, 0, -1UL);
max_pfn = e820_end_of_ram();
}

#ifdef CONFIG_X86_32
/* max_low_pfn get updated here */
Expand Down Expand Up @@ -763,6 +767,9 @@ void __init setup_arch(char **cmdline_p)
*/
acpi_boot_table_init();

/* Remove active ranges so rediscovery with NUMA-awareness happens */
remove_all_active_ranges();

#ifdef CONFIG_ACPI_NUMA
/*
* Parse SRAT to discover nodes.
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/lib/delay_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ static void delay_loop(unsigned long loops)
"1: jmp 2f \n"

".align 16 \n"
"2: decl %0 \n"
"2: dec %0 \n"
" jnz 2b \n"
"3: decl %0 \n"
"3: dec %0 \n"

: /* we don't need output */
:"a" (loops)
Expand Down
Loading

0 comments on commit b439617

Please sign in to comment.