Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100083
b: refs/heads/master
c: de989ef
h: refs/heads/master
i:
  100081: d9d1f36
  100079: 102d581
v: v3
  • Loading branch information
Ingo Molnar committed Jul 9, 2008
1 parent d99ea9e commit 4263bdc
Show file tree
Hide file tree
Showing 10 changed files with 214 additions and 71 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: 22cac1670786108ccd4caa0656c39fa4ba69fa7d
refs/heads/master: de989ef093623ab5259f885f30be699c431d4006
44 changes: 38 additions & 6 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#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 @@ -1373,8 +1374,6 @@ 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 @@ -1435,6 +1434,17 @@ 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 @@ -1628,11 +1638,35 @@ 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 @@ -1660,9 +1694,7 @@ 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: 20 additions & 6 deletions trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,12 +1056,25 @@ unsigned long __initdata end_user_pfn = MAX_ARCH_PFN;
/*
* Find the highest page frame number we have available
*/
unsigned long __init e820_end_of_ram(void)
unsigned long __init e820_end(void)
{
unsigned long last_pfn;
int i;
unsigned long last_pfn = 0;
unsigned long max_arch_pfn = MAX_ARCH_PFN;

last_pfn = find_max_pfn_with_active_regions();
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;
}

if (last_pfn > max_arch_pfn)
last_pfn = max_arch_pfn;
Expand Down Expand Up @@ -1185,16 +1198,17 @@ 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.
*/
e820_register_active_regions(0, 0, -1UL);
saved_max_pfn = e820_end_of_ram();
remove_all_active_ranges();
saved_max_pfn = e820_end();
#endif
e820.nr_map = 0;
userdef = 1;
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/x86/kernel/io_apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ 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 @@ -2172,6 +2179,9 @@ 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: 10 additions & 0 deletions trunk/arch/x86/kernel/io_apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ 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 @@ -1698,6 +1705,9 @@ 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: 3 additions & 10 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,22 +709,18 @@ 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_of_ram();
max_pfn = e820_end();

/* 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)) {
remove_all_active_ranges();
e820_register_active_regions(0, 0, -1UL);
max_pfn = e820_end_of_ram();
}
if (mtrr_trim_uncached_memory(max_pfn))
max_pfn = e820_end();

#ifdef CONFIG_X86_32
/* max_low_pfn get updated here */
Expand Down Expand Up @@ -767,9 +763,6 @@ 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
Loading

0 comments on commit 4263bdc

Please sign in to comment.