提交 f09b7b2a 编写于 作者: M Mark Nelson 提交者: Benjamin Herrenschmidt

powerpc/pseries: Pass CPPR value to H_XIRR hcall

Now that we properly keep track of the CPPR value (since
49bd3647, "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: NMark Nelson <markn@au1.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 856f70a3
...@@ -259,12 +259,12 @@ static inline long plpar_ipi(unsigned long servernum, unsigned long mfrr) ...@@ -259,12 +259,12 @@ static inline long plpar_ipi(unsigned long servernum, unsigned long mfrr)
return plpar_hcall_norets(H_IPI, servernum, mfrr); return plpar_hcall_norets(H_IPI, servernum, mfrr);
} }
static inline long plpar_xirr(unsigned long *xirr_ret) static inline long plpar_xirr(unsigned long *xirr_ret, unsigned char cppr)
{ {
long rc; long rc;
unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
rc = plpar_hcall(H_XIRR, retbuf); rc = plpar_hcall(H_XIRR, retbuf, cppr);
*xirr_ret = retbuf[0]; *xirr_ret = retbuf[0];
......
...@@ -120,12 +120,12 @@ static inline void direct_qirr_info(int n_cpu, u8 value) ...@@ -120,12 +120,12 @@ static inline void direct_qirr_info(int n_cpu, u8 value)
/* LPAR low level accessors */ /* LPAR low level accessors */
static inline unsigned int lpar_xirr_info_get(void) static inline unsigned int lpar_xirr_info_get(unsigned char cppr)
{ {
unsigned long lpar_rc; unsigned long lpar_rc;
unsigned long return_value; unsigned long return_value;
lpar_rc = plpar_xirr(&return_value); lpar_rc = plpar_xirr(&return_value, cppr);
if (lpar_rc != H_SUCCESS) if (lpar_rc != H_SUCCESS)
panic(" bad return code xirr - rc = %lx\n", lpar_rc); panic(" bad return code xirr - rc = %lx\n", lpar_rc);
return (unsigned int)return_value; return (unsigned int)return_value;
...@@ -331,7 +331,8 @@ static unsigned int xics_get_irq_direct(void) ...@@ -331,7 +331,8 @@ static unsigned int xics_get_irq_direct(void)
static unsigned int xics_get_irq_lpar(void) static unsigned int xics_get_irq_lpar(void)
{ {
unsigned int xirr = lpar_xirr_info_get(); struct xics_cppr *os_cppr = &__get_cpu_var(xics_cppr);
unsigned int xirr = lpar_xirr_info_get(os_cppr->stack[os_cppr->index]);
unsigned int vec = xics_xirr_vector(xirr); unsigned int vec = xics_xirr_vector(xirr);
unsigned int irq; unsigned int irq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册