[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:
committed by
Paul Mackerras
parent
3d15910bfb
commit
57cfb814f6
@@ -422,7 +422,7 @@ void __init htab_initialize(void)
|
||||
|
||||
htab_hash_mask = pteg_count - 1;
|
||||
|
||||
if (platform_is_lpar()) {
|
||||
if (firmware_has_feature(FW_FEATURE_LPAR)) {
|
||||
/* Using a hypervisor which owns the htab */
|
||||
htab_address = NULL;
|
||||
_SDR1 = 0;
|
||||
@@ -517,7 +517,7 @@ void __init htab_initialize(void)
|
||||
|
||||
void htab_initialize_secondary(void)
|
||||
{
|
||||
if (!platform_is_lpar())
|
||||
if (!firmware_has_feature(FW_FEATURE_LPAR))
|
||||
mtspr(SPRN_SDR1, _SDR1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user