diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-11-03 15:30:49 +1100 |
---|---|---|
committer | Michael Ellerman <michael@ellerman.id.au> | 2005-11-03 15:30:49 +1100 |
commit | cab0af98dfbbf8076d1af01f2927af491a76a33f (patch) | |
tree | baf3a5cda6e4c117652667ca013db28906497e4c /arch/powerpc/kernel/process.c | |
parent | 60d4f4c6567f2be77f58838156e7b667238a9580 (diff) | |
download | blackbird-op-linux-cab0af98dfbbf8076d1af01f2927af491a76a33f.tar.gz blackbird-op-linux-cab0af98dfbbf8076d1af01f2927af491a76a33f.zip |
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/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8f85dabe4df3..96843211cc5c 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -48,8 +48,8 @@ #include <asm/prom.h> #ifdef CONFIG_PPC64 #include <asm/firmware.h> -#include <asm/plpar_wrappers.h> #include <asm/time.h> +#include <asm/machdep.h> #endif extern unsigned long _get_SP(void); @@ -201,27 +201,15 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) } #endif /* CONFIG_SPE */ -static void set_dabr_spr(unsigned long val) -{ - mtspr(SPRN_DABR, val); -} - int set_dabr(unsigned long dabr) { - int ret = 0; - #ifdef CONFIG_PPC64 - if (firmware_has_feature(FW_FEATURE_XDABR)) { - /* We want to catch accesses from kernel and userspace */ - unsigned long flags = H_DABRX_KERNEL|H_DABRX_USER; - ret = plpar_set_xdabr(dabr, flags); - } else if (firmware_has_feature(FW_FEATURE_DABR)) { - ret = plpar_set_dabr(dabr); - } else + if (ppc_md.set_dabr) + return ppc_md.set_dabr(dabr); #endif - set_dabr_spr(dabr); - return ret; + mtspr(SPRN_DABR, dabr); + return 0; } #ifdef CONFIG_PPC64 |