X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Fnumaq.c;h=5f5b075f860a8c97ceddf6fed27f45ef153f4622;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=ed41eebf09e8607d15fd070e78ba669167a0bae5;hpb=70790a4b5cd6c0291e5b1a2836e2832d46036ac6;p=linux-2.6.git diff --git a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c index ed41eebf0..5f5b075f8 100644 --- a/arch/i386/kernel/numaq.c +++ b/arch/i386/kernel/numaq.c @@ -28,10 +28,10 @@ #include #include #include +#include #include - -/* These are needed before the pgdat's are created */ -extern long node_start_pfn[], node_end_pfn[]; +#include +#include #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) @@ -39,8 +39,7 @@ extern long node_start_pfn[], node_end_pfn[]; * Function: smp_dump_qct() * * Description: gets memory layout from the quad config table. This - * function also increments numnodes with the number of nodes (quads) - * present. + * function also updates node_online_map with the nodes (quads) present. */ static void __init smp_dump_qct(void) { @@ -49,17 +48,22 @@ static void __init smp_dump_qct(void) struct sys_cfg_data *scd = (struct sys_cfg_data *)__va(SYS_CFG_DATA_PRIV_ADDR); - numnodes = 0; - for(node = 0; node < MAX_NUMNODES; node++) { - if(scd->quads_present31_0 & (1 << node)) { + nodes_clear(node_online_map); + for_each_node(node) { + if (scd->quads_present31_0 & (1 << node)) { node_set_online(node); - numnodes++; eq = &scd->eq[node]; /* Convert to pages */ node_start_pfn[node] = MB_TO_PAGES( eq->hi_shrd_mem_start - eq->priv_mem_size); node_end_pfn[node] = MB_TO_PAGES( eq->hi_shrd_mem_start + eq->hi_shrd_mem_size); + + memory_present(node, + node_start_pfn[node], node_end_pfn[node]); + node_remap_size[node] = node_memmap_size_bytes(node, + node_start_pfn[node], + node_end_pfn[node]); } } } @@ -74,3 +78,11 @@ int __init get_memcfg_numaq(void) smp_dump_qct(); return 1; } + +static int __init numaq_dsc_disable(void) +{ + printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); + tsc_disable = 1; + return 0; +} +core_initcall(numaq_dsc_disable);