aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-09 21:37:51 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-09 21:37:51 -0500
commit799d6046d3fb557006e6d7c9767fdb96479b0e0a (patch)
treefff321e3c0c0e6d1192f453aab23ad204f350851 /arch/powerpc/kernel/setup-common.c
parent3ddfbcf19b15ccd25a0b4b2dc2e38000e08de739 (diff)
[PATCH] powerpc: merge code values for identifying platforms
This patch merges platform codes. systemcfg->platform is no longer used, systemcfg use in general is deprecated as much as possible (and renamed _systemcfg before it gets completely moved elsewhere in a future patch), _machine is now used on ppc64 along as ppc32. Platform codes aren't gone yet but we are getting a step closer. A bunch of asm code in head[_64].S is also turned into C code. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r--arch/powerpc/kernel/setup-common.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 17c46a2e356d..06e4ef215627 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -33,6 +33,7 @@
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/prom.h> 34#include <asm/prom.h>
35#include <asm/processor.h> 35#include <asm/processor.h>
36#include <asm/systemcfg.h>
36#include <asm/pgtable.h> 37#include <asm/pgtable.h>
37#include <asm/smp.h> 38#include <asm/smp.h>
38#include <asm/elf.h> 39#include <asm/elf.h>
@@ -63,6 +64,11 @@
63#define DBG(fmt...) 64#define DBG(fmt...)
64#endif 65#endif
65 66
67#ifdef CONFIG_PPC_MULTIPLATFORM
68int _machine = 0;
69EXPORT_SYMBOL(_machine);
70#endif
71
66/* 72/*
67 * This still seems to be needed... -- paulus 73 * This still seems to be needed... -- paulus
68 */ 74 */
@@ -513,8 +519,8 @@ void __init smp_setup_cpu_maps(void)
513 * On pSeries LPAR, we need to know how many cpus 519 * On pSeries LPAR, we need to know how many cpus
514 * could possibly be added to this partition. 520 * could possibly be added to this partition.
515 */ 521 */
516 if (systemcfg->platform == PLATFORM_PSERIES_LPAR && 522 if (_machine == PLATFORM_PSERIES_LPAR &&
517 (dn = of_find_node_by_path("/rtas"))) { 523 (dn = of_find_node_by_path("/rtas"))) {
518 int num_addr_cell, num_size_cell, maxcpus; 524 int num_addr_cell, num_size_cell, maxcpus;
519 unsigned int *ireg; 525 unsigned int *ireg;
520 526
@@ -558,7 +564,7 @@ void __init smp_setup_cpu_maps(void)
558 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); 564 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]);
559 } 565 }
560 566
561 systemcfg->processorCount = num_present_cpus(); 567 _systemcfg->processorCount = num_present_cpus();
562#endif /* CONFIG_PPC64 */ 568#endif /* CONFIG_PPC64 */
563} 569}
564#endif /* CONFIG_SMP */ 570#endif /* CONFIG_SMP */