[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>
This commit is contained in:

committad av
Paul Mackerras

förälder
3d15910bfb
incheckning
57cfb814f6
@@ -246,7 +246,7 @@ static void __init pSeries_setup_arch(void)
|
||||
ppc_md.idle_loop = default_idle;
|
||||
}
|
||||
|
||||
if (platform_is_lpar())
|
||||
if (firmware_has_feature(FW_FEATURE_LPAR))
|
||||
ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
|
||||
else
|
||||
ppc_md.enable_pmcs = power4_enable_pmcs;
|
||||
@@ -324,12 +324,12 @@ static void __init pSeries_init_early(void)
|
||||
|
||||
fw_feature_init();
|
||||
|
||||
if (platform_is_lpar())
|
||||
if (firmware_has_feature(FW_FEATURE_LPAR))
|
||||
hpte_init_lpar();
|
||||
else
|
||||
hpte_init_native();
|
||||
|
||||
if (platform_is_lpar())
|
||||
if (firmware_has_feature(FW_FEATURE_LPAR))
|
||||
find_udbg_vterm();
|
||||
|
||||
if (firmware_has_feature(FW_FEATURE_DABR))
|
||||
@@ -385,6 +385,9 @@ static int __init pSeries_probe(int platform)
|
||||
* it here ...
|
||||
*/
|
||||
|
||||
if (platform == PLATFORM_PSERIES_LPAR)
|
||||
ppc64_firmware_features |= FW_FEATURE_LPAR;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -524,7 +527,7 @@ static void pseries_shared_idle(void)
|
||||
|
||||
static int pSeries_pci_probe_mode(struct pci_bus *bus)
|
||||
{
|
||||
if (platform_is_lpar())
|
||||
if (firmware_has_feature(FW_FEATURE_LPAR))
|
||||
return PCI_PROBE_DEVTREE;
|
||||
return PCI_PROBE_NORMAL;
|
||||
}
|
||||
|
Referens i nytt ärende
Block a user