Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245717
b: refs/heads/master
c: 2706a0b
h: refs/heads/master
i:
  245715: f8c63c3
v: v3
  • Loading branch information
Tejun Heo committed May 2, 2011
1 parent bf09feb commit 2d0117d
Show file tree
Hide file tree
Showing 3 changed files with 13 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: c6f58878204b0414e00b43f9bcebf754284f95b4
refs/heads/master: 2706a0bf7b02693ed88752df877f10c2206292ff
2 changes: 1 addition & 1 deletion trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
config AMD_NUMA
def_bool y
prompt "Old style AMD Opteron NUMA detection"
depends on X86_64 && NUMA && PCI
depends on NUMA && PCI
---help---
Enable AMD NUMA node topology detection. You should say Y here if
you have a multi processor AMD system. This uses an old method to
Expand Down
21 changes: 11 additions & 10 deletions trunk/arch/x86/mm/amdtopology.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/nodemask.h>
#include <linux/memblock.h>
#include <linux/bootmem.h>

#include <asm/io.h>
#include <linux/pci_ids.h>
Expand Down Expand Up @@ -69,10 +70,10 @@ static __init void early_get_boot_cpu_id(void)

int __init amd_numa_init(void)
{
unsigned long start = PFN_PHYS(0);
unsigned long end = PFN_PHYS(max_pfn);
u64 start = PFN_PHYS(0);
u64 end = PFN_PHYS(max_pfn);
unsigned numnodes;
unsigned long prevbase;
u64 prevbase;
int i, j, nb;
u32 nodeid, reg;
unsigned int bits, cores, apicid_base;
Expand All @@ -95,7 +96,7 @@ int __init amd_numa_init(void)

prevbase = 0;
for (i = 0; i < 8; i++) {
unsigned long base, limit;
u64 base, limit;

base = read_pci_config(0, nb, 1, 0x40 + i*8);
limit = read_pci_config(0, nb, 1, 0x44 + i*8);
Expand All @@ -107,18 +108,18 @@ int __init amd_numa_init(void)
continue;
}
if (nodeid >= numnodes) {
pr_info("Ignoring excess node %d (%lx:%lx)\n", nodeid,
pr_info("Ignoring excess node %d (%Lx:%Lx)\n", nodeid,
base, limit);
continue;
}

if (!limit) {
pr_info("Skipping node entry %d (base %lx)\n",
pr_info("Skipping node entry %d (base %Lx)\n",
i, base);
continue;
}
if ((base >> 8) & 3 || (limit >> 8) & 3) {
pr_err("Node %d using interleaving mode %lx/%lx\n",
pr_err("Node %d using interleaving mode %Lx/%Lx\n",
nodeid, (base >> 8) & 3, (limit >> 8) & 3);
return -EINVAL;
}
Expand Down Expand Up @@ -150,19 +151,19 @@ int __init amd_numa_init(void)
continue;
}
if (limit < base) {
pr_err("Node %d bogus settings %lx-%lx.\n",
pr_err("Node %d bogus settings %Lx-%Lx.\n",
nodeid, base, limit);
continue;
}

/* Could sort here, but pun for now. Should not happen anyroads. */
if (prevbase > base) {
pr_err("Node map not sorted %lx,%lx\n",
pr_err("Node map not sorted %Lx,%Lx\n",
prevbase, base);
return -EINVAL;
}

pr_info("Node %d MemBase %016lx Limit %016lx\n",
pr_info("Node %d MemBase %016Lx Limit %016Lx\n",
nodeid, base, limit);

prevbase = base;
Expand Down

0 comments on commit 2d0117d

Please sign in to comment.