Skip to content

Commit

Permalink
powerpc/xics: Change *_xirr_info_set() prototype to avoid casts
Browse files Browse the repository at this point in the history
The xirr is 32 bits in hardware, but the hypervisor requries the upper
bits of the register to be clear on the hcall.  By changing the type
from signed to unsigned int we can drop masking it back to 32 bits.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Milton Miller authored and Benjamin Herrenschmidt committed Oct 13, 2008
1 parent 0641cc9 commit 9dc2d44
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static inline unsigned int direct_xirr_info_get(void)
return in_be32(&xics_per_cpu[cpu]->xirr.word);
}

static inline void direct_xirr_info_set(int value)
static inline void direct_xirr_info_set(unsigned int value)
{
int cpu = smp_processor_id();

Expand Down Expand Up @@ -120,15 +120,14 @@ static inline unsigned int lpar_xirr_info_get(void)
return (unsigned int)return_value;
}

static inline void lpar_xirr_info_set(int value)
static inline void lpar_xirr_info_set(unsigned int value)
{
unsigned long lpar_rc;
unsigned long val64 = value & 0xffffffff;

lpar_rc = plpar_eoi(val64);
lpar_rc = plpar_eoi(value);
if (lpar_rc != H_SUCCESS)
panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc,
val64);
panic("bad return code EOI - rc = %ld, value=%x\n", lpar_rc,
value);
}

static inline void lpar_cppr_info(u8 value)
Expand Down

0 comments on commit 9dc2d44

Please sign in to comment.