aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-11-02 23:30:49 -0500
committerMichael Ellerman <michael@ellerman.id.au>2005-11-02 23:30:49 -0500
commitcab0af98dfbbf8076d1af01f2927af491a76a33f (patch)
treebaf3a5cda6e4c117652667ca013db28906497e4c /arch/powerpc/platforms
parent60d4f4c6567f2be77f58838156e7b667238a9580 (diff)
powerpc: Make set_dabr() a ppc_md function
Move pSeries specific code in set_dabr() into a ppc_md function, this will allow us to keep plpar_wrappers.h private to platforms/pseries. Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/pseries/setup.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index c0a3d918148a..ee468f07f378 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -350,6 +350,16 @@ static void pSeries_mach_cpu_die(void)
350 for(;;); 350 for(;;);
351} 351}
352 352
353static int pseries_set_dabr(unsigned long dabr)
354{
355 if (firmware_has_feature(FW_FEATURE_XDABR)) {
356 /* We want to catch accesses from kernel and userspace */
357 return plpar_set_xdabr(dabr, H_DABRX_KERNEL | H_DABRX_USER);
358 }
359
360 return plpar_set_dabr(dabr);
361}
362
353 363
354/* 364/*
355 * Early initialization. Relocation is on but do not reference unbolted pages 365 * Early initialization. Relocation is on but do not reference unbolted pages
@@ -385,6 +395,8 @@ static void __init pSeries_init_early(void)
385 DBG("Hello World !\n"); 395 DBG("Hello World !\n");
386 } 396 }
387 397
398 if (firmware_has_feature(FW_FEATURE_XDABR | FW_FEATURE_DABR))
399 ppc_md.set_dabr = pseries_set_dabr;
388 400
389 iommu_init_early_pSeries(); 401 iommu_init_early_pSeries();
390 402