diff options
author | Mark Nelson <markn@au1.ibm.com> | 2010-01-31 15:12:58 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-03-08 19:55:26 -0500 |
commit | f09b7b2a1115d3afe02c66156746287f6c63bba0 (patch) | |
tree | 0f76fd4bf6ccc29a11276e145aaad888a03641bc /arch/powerpc | |
parent | 856f70a368022645a08fbecc5d30ec218f13232d (diff) |
powerpc/pseries: Pass CPPR value to H_XIRR hcall
Now that we properly keep track of the CPPR value (since
49bd3647134ea47420067aea8d1401e722bf2aac, "powerpc/pseries: Track previous
CPPR values to correctly EOI interrupts") we can pass it to the
H_XIRR hcall.
This is needed because the Partition Adjunct Option of new versions of
pHyp extend the H_XIRR hcall to include the CPPR as an input parameter.
Earlier versions not supporting this option just disregard the extra
input parameter, so this doesn't cause any problems for existing systems.
The Partition Adjunct Option is required for future systems that will
support SR-IOV capable devices.
Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/plpar_wrappers.h | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index 0603c91538ae..a05f8d427856 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -259,12 +259,12 @@ static inline long plpar_ipi(unsigned long servernum, unsigned long mfrr) | |||
259 | return plpar_hcall_norets(H_IPI, servernum, mfrr); | 259 | return plpar_hcall_norets(H_IPI, servernum, mfrr); |
260 | } | 260 | } |
261 | 261 | ||
262 | static inline long plpar_xirr(unsigned long *xirr_ret) | 262 | static inline long plpar_xirr(unsigned long *xirr_ret, unsigned char cppr) |
263 | { | 263 | { |
264 | long rc; | 264 | long rc; |
265 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; | 265 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
266 | 266 | ||
267 | rc = plpar_hcall(H_XIRR, retbuf); | 267 | rc = plpar_hcall(H_XIRR, retbuf, cppr); |
268 | 268 | ||
269 | *xirr_ret = retbuf[0]; | 269 | *xirr_ret = retbuf[0]; |
270 | 270 | ||
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 4ca641042ec3..1bcedd8b4616 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -120,12 +120,12 @@ static inline void direct_qirr_info(int n_cpu, u8 value) | |||
120 | 120 | ||
121 | /* LPAR low level accessors */ | 121 | /* LPAR low level accessors */ |
122 | 122 | ||
123 | static inline unsigned int lpar_xirr_info_get(void) | 123 | static inline unsigned int lpar_xirr_info_get(unsigned char cppr) |
124 | { | 124 | { |
125 | unsigned long lpar_rc; | 125 | unsigned long lpar_rc; |
126 | unsigned long return_value; | 126 | unsigned long return_value; |
127 | 127 | ||
128 | lpar_rc = plpar_xirr(&return_value); | 128 | lpar_rc = plpar_xirr(&return_value, cppr); |
129 | if (lpar_rc != H_SUCCESS) | 129 | if (lpar_rc != H_SUCCESS) |
130 | panic(" bad return code xirr - rc = %lx\n", lpar_rc); | 130 | panic(" bad return code xirr - rc = %lx\n", lpar_rc); |
131 | return (unsigned int)return_value; | 131 | return (unsigned int)return_value; |
@@ -331,7 +331,8 @@ static unsigned int xics_get_irq_direct(void) | |||
331 | 331 | ||
332 | static unsigned int xics_get_irq_lpar(void) | 332 | static unsigned int xics_get_irq_lpar(void) |
333 | { | 333 | { |
334 | unsigned int xirr = lpar_xirr_info_get(); | 334 | struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr); |
335 | unsigned int xirr = lpar_xirr_info_get(os_cppr->stack[os_cppr->index]); | ||
335 | unsigned int vec = xics_xirr_vector(xirr); | 336 | unsigned int vec = xics_xirr_vector(xirr); |
336 | unsigned int irq; | 337 | unsigned int irq; |
337 | 338 | ||