Skip to content

Commit

Permalink
powerpc: Add helper functions set the DAWR and CIABR using set_mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ian Munsie authored and Benjamin Herrenschmidt committed Jan 10, 2013
1 parent 1580b3b commit 376a864
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/powerpc/platforms/pseries/plpar_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 376a864

Please sign in to comment.