Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48685
b: refs/heads/master
c: 7f8f97c
h: refs/heads/master
i:
  48683: 58848e1
v: v3
  • Loading branch information
Len Brown committed Feb 13, 2007
1 parent a9c0467 commit b0cf0fa
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 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: 7cda93e008e1a477970adbf82dba81a5d4f0ae40
refs/heads/master: 7f8f97c3cc75d5783d0b45cf323dedf17684be19
5 changes: 2 additions & 3 deletions trunk/arch/i386/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,9 @@ static inline int acpi_parse_madt_ioapic_entries(void)
static void __init acpi_process_madt(void)
{
#ifdef CONFIG_X86_LOCAL_APIC
int count, error;
int error;

count = acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt);
if (count >= 1) {
if (!acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {

/*
* Parse MADT LAPIC entries
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86_64/kernel/early-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ static void nvidia_bugs(void)
return;

nvidia_hpet_detected = 0;
acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
if (acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check))
return;

if (nvidia_hpet_detected == 0) {
acpi_skip_timer_override = 1;
printk(KERN_INFO "Nvidia board "
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86_64/pci/mmconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ void __init pci_mmcfg_init(int type)
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
return;

acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
if (acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg))
return;

if ((pci_mmcfg_config_num == 0) ||
(pci_mmcfg_config == NULL) ||
(pci_mmcfg_config[0].address == 0))
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/acpi/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,15 @@ int __init acpi_numa_init(void)
int result;

/* SRAT: Static Resource Affinity Table */
result = acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat);

if (result > 0) {
if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
result = acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY,
acpi_parse_processor_affinity,
NR_CPUS);
result = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, acpi_parse_memory_affinity, NR_NODE_MEMBLKS); // IA64 specific
}

/* SLIT: System Locality Information Table */
result = acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit);
acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit);

acpi_numa_arch_fixup();
return 0;
Expand Down
13 changes: 11 additions & 2 deletions trunk/drivers/acpi/tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ acpi_table_parse_madt(enum acpi_madt_type id,
handler, max_entries);
}

/**
* acpi_table_parse - find table with @id, run @handler on it
*
* @id: table id to find
* @handler: handler to run
*
* Scan the ACPI System Descriptor Table (STD) for a table matching @id,
* run @handler on it. Return 0 if table found, return on if not.
*/
int __init acpi_table_parse(char *id, acpi_table_handler handler)
{
struct acpi_table_header *table = NULL;
Expand All @@ -235,9 +244,9 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler)
acpi_get_table(id, 0, &table);
if (table) {
handler(table);
return 1;
} else
return 0;
} else
return 1;
}

/*
Expand Down

0 comments on commit b0cf0fa

Please sign in to comment.