aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2008-10-09 21:56:32 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-13 01:24:17 -0400
commit9dc2d44113d1521d8ead8e89e0772c0957b093c2 (patch)
treed704d4615ed9c04f5169183fa61356e7e148605f /arch/powerpc/platforms
parent0641cc91b08937578263589feb15182b9ad2b0fc (diff)
powerpc/xics: Change *_xirr_info_set() prototype to avoid casts
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>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/pseries/xics.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index c98e3a128468..98e737204333 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -87,7 +87,7 @@ static inline unsigned int direct_xirr_info_get(void)
87 return in_be32(&xics_per_cpu[cpu]->xirr.word); 87 return in_be32(&xics_per_cpu[cpu]->xirr.word);
88} 88}
89 89
90static inline void direct_xirr_info_set(int value) 90static inline void direct_xirr_info_set(unsigned int value)
91{ 91{
92 int cpu = smp_processor_id(); 92 int cpu = smp_processor_id();
93 93
@@ -120,15 +120,14 @@ static inline unsigned int lpar_xirr_info_get(void)
120 return (unsigned int)return_value; 120 return (unsigned int)return_value;
121} 121}
122 122
123static inline void lpar_xirr_info_set(int value) 123static inline void lpar_xirr_info_set(unsigned int value)
124{ 124{
125 unsigned long lpar_rc; 125 unsigned long lpar_rc;
126 unsigned long val64 = value & 0xffffffff;
127 126
128 lpar_rc = plpar_eoi(val64); 127 lpar_rc = plpar_eoi(value);
129 if (lpar_rc != H_SUCCESS) 128 if (lpar_rc != H_SUCCESS)
130 panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc, 129 panic("bad return code EOI - rc = %ld, value=%x\n", lpar_rc,
131 val64); 130 value);
132} 131}
133 132
134static inline void lpar_cppr_info(u8 value) 133static inline void lpar_cppr_info(u8 value)