powerpc: Add helper functions set the DAWR and CIABR using set_mode
authorIan Munsie <imunsie@au1.ibm.com>
Thu, 20 Dec 2012 14:06:41 +0000 (14:06 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Jan 2013 06:01:36 +0000 (17:01 +1100)
These are just wrappers around the new set_mode HCALL.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/plpar_wrappers.h

index b93384929c4cbc2f7274820dbfaf549aa9e274fd..f368668d97b3f318f93a6929d1c54607243e8258 100644 (file)
@@ -312,4 +312,14 @@ static inline long disable_reloc_on_exceptions(void) {
        return plpar_set_mode(0, 3, 0, 0);
 }
 
+static inline long plapr_set_ciabr(unsigned long ciabr)
+{
+       return plpar_set_mode(0, 1, ciabr, 0);
+}
+
+static inline long plapr_set_watchpoint0(unsigned long dawr0, unsigned long dawrx0)
+{
+       return plpar_set_mode(0, 2, dawr0, dawrx0);
+}
+
 #endif /* _PSERIES_PLPAR_WRAPPERS_H */