diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 934d7006353f..e78c39368841 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -354,14 +354,15 @@ static void pSeries_mach_cpu_die(void) | |||
354 | 354 | ||
355 | static int pseries_set_dabr(unsigned long dabr) | 355 | static int pseries_set_dabr(unsigned long dabr) |
356 | { | 356 | { |
357 | if (firmware_has_feature(FW_FEATURE_XDABR)) { | 357 | return plpar_hcall_norets(H_SET_DABR, dabr); |
358 | /* We want to catch accesses from kernel and userspace */ | ||
359 | return plpar_set_xdabr(dabr, H_DABRX_KERNEL | H_DABRX_USER); | ||
360 | } | ||
361 | |||
362 | return plpar_set_dabr(dabr); | ||
363 | } | 358 | } |
364 | 359 | ||
360 | static int pseries_set_xdabr(unsigned long dabr) | ||
361 | { | ||
362 | /* We want to catch accesses from kernel and userspace */ | ||
363 | return plpar_hcall_norets(H_SET_XDABR, dabr, | ||
364 | H_DABRX_KERNEL | H_DABRX_USER); | ||
365 | } | ||
365 | 366 | ||
366 | /* | 367 | /* |
367 | * Early initialization. Relocation is on but do not reference unbolted pages | 368 | * Early initialization. Relocation is on but do not reference unbolted pages |
@@ -397,8 +398,10 @@ static void __init pSeries_init_early(void) | |||
397 | DBG("Hello World !\n"); | 398 | DBG("Hello World !\n"); |
398 | } | 399 | } |
399 | 400 | ||
400 | if (firmware_has_feature(FW_FEATURE_XDABR | FW_FEATURE_DABR)) | 401 | if (firmware_has_feature(FW_FEATURE_DABR)) |
401 | ppc_md.set_dabr = pseries_set_dabr; | 402 | ppc_md.set_dabr = pseries_set_dabr; |
403 | else if (firmware_has_feature(FW_FEATURE_XDABR)) | ||
404 | ppc_md.set_dabr = pseries_set_xdabr; | ||
402 | 405 | ||
403 | iommu_init_early_pSeries(); | 406 | iommu_init_early_pSeries(); |
404 | 407 | ||