diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-03-21 04:45:59 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-21 23:04:17 -0500 |
commit | 57cfb814f698d30894bc28e22125550193ebe549 (patch) | |
tree | 755fd11b1a528f8de7913119b457f866734cb81a /arch/powerpc/platforms/pseries/setup.c | |
parent | 3d15910bfbeb02286ce4b5009c53754e88066ccb (diff) |
[PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
It has been decreed that platform numbers are evil, so as a step in that
direction, replace platform_is_lpar() with a FW_FEATURE_LPAR bit.
Currently FW_FEATURE_LPAR really means i/pSeries LPAR, in the future we might
have to clean that up if we need to be more specific about what LPAR actually
means. But that's another patch ...
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 149751a3742a..44d5c7fdcd97 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -246,7 +246,7 @@ static void __init pSeries_setup_arch(void) | |||
246 | ppc_md.idle_loop = default_idle; | 246 | ppc_md.idle_loop = default_idle; |
247 | } | 247 | } |
248 | 248 | ||
249 | if (platform_is_lpar()) | 249 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; | 250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; |
251 | else | 251 | else |
252 | ppc_md.enable_pmcs = power4_enable_pmcs; | 252 | ppc_md.enable_pmcs = power4_enable_pmcs; |
@@ -324,12 +324,12 @@ static void __init pSeries_init_early(void) | |||
324 | 324 | ||
325 | fw_feature_init(); | 325 | fw_feature_init(); |
326 | 326 | ||
327 | if (platform_is_lpar()) | 327 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
328 | hpte_init_lpar(); | 328 | hpte_init_lpar(); |
329 | else | 329 | else |
330 | hpte_init_native(); | 330 | hpte_init_native(); |
331 | 331 | ||
332 | if (platform_is_lpar()) | 332 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
333 | find_udbg_vterm(); | 333 | find_udbg_vterm(); |
334 | 334 | ||
335 | if (firmware_has_feature(FW_FEATURE_DABR)) | 335 | if (firmware_has_feature(FW_FEATURE_DABR)) |
@@ -385,6 +385,9 @@ static int __init pSeries_probe(int platform) | |||
385 | * it here ... | 385 | * it here ... |
386 | */ | 386 | */ |
387 | 387 | ||
388 | if (platform == PLATFORM_PSERIES_LPAR) | ||
389 | ppc64_firmware_features |= FW_FEATURE_LPAR; | ||
390 | |||
388 | return 1; | 391 | return 1; |
389 | } | 392 | } |
390 | 393 | ||
@@ -524,7 +527,7 @@ static void pseries_shared_idle(void) | |||
524 | 527 | ||
525 | static int pSeries_pci_probe_mode(struct pci_bus *bus) | 528 | static int pSeries_pci_probe_mode(struct pci_bus *bus) |
526 | { | 529 | { |
527 | if (platform_is_lpar()) | 530 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
528 | return PCI_PROBE_DEVTREE; | 531 | return PCI_PROBE_DEVTREE; |
529 | return PCI_PROBE_NORMAL; | 532 | return PCI_PROBE_NORMAL; |
530 | } | 533 | } |