Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346820
b: refs/heads/master
c: 798042d
h: refs/heads/master
v: v3
  • Loading branch information
Ian Munsie authored and Benjamin Herrenschmidt committed Nov 15, 2012
1 parent 20c6ba4 commit ef6c099
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8f48ecc0e81cbc52a8eac907e02916d98dbfb5a
refs/heads/master: 798042da4e039ef551ff6e1b1ead50a763181daa
25 changes: 25 additions & 0 deletions trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,29 @@ static inline long plpar_set_mode(unsigned long mflags, unsigned long resource,
{
return plpar_hcall_norets(H_SET_MODE, mflags, resource, value1, value2);
}

/*
* Enable relocation on exceptions on this partition
*
* Note: this call has a partition wide scope and can take a while to complete.
* If it returns H_LONG_BUSY_* it should be retried periodically until it
* returns H_SUCCESS.
*/
static inline long enable_reloc_on_exceptions(void)
{
/* mflags = 3: Exceptions at 0xC000000000004000 */
return plpar_set_mode(3, 3, 0, 0);
}

/*
* Disable relocation on exceptions on this partition
*
* Note: this call has a partition wide scope and can take a while to complete.
* If it returns H_LONG_BUSY_* it should be retried periodically until it
* returns H_SUCCESS.
*/
static inline long disable_reloc_on_exceptions(void) {
return plpar_set_mode(0, 3, 0, 0);
}

#endif /* _PSERIES_PLPAR_WRAPPERS_H */

0 comments on commit ef6c099

Please sign in to comment.