aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 3981ae4cb58e..30c44e6b0413 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -230,14 +230,16 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigne
230{ 230{
231 unsigned int isu = src_no >> mpic->isu_shift; 231 unsigned int isu = src_no >> mpic->isu_shift;
232 unsigned int idx = src_no & mpic->isu_mask; 232 unsigned int idx = src_no & mpic->isu_mask;
233 unsigned int val;
233 234
235 val = _mpic_read(mpic->reg_type, &mpic->isus[isu],
236 reg + (idx * MPIC_INFO(IRQ_STRIDE)));
234#ifdef CONFIG_MPIC_BROKEN_REGREAD 237#ifdef CONFIG_MPIC_BROKEN_REGREAD
235 if (reg == 0) 238 if (reg == 0)
236 return mpic->isu_reg0_shadow[idx]; 239 val = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) |
237 else 240 mpic->isu_reg0_shadow[src_no];
238#endif 241#endif
239 return _mpic_read(mpic->reg_type, &mpic->isus[isu], 242 return val;
240 reg + (idx * MPIC_INFO(IRQ_STRIDE)));
241} 243}
242 244
243static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, 245static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,
@@ -251,7 +253,8 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,
251 253
252#ifdef CONFIG_MPIC_BROKEN_REGREAD 254#ifdef CONFIG_MPIC_BROKEN_REGREAD
253 if (reg == 0) 255 if (reg == 0)
254 mpic->isu_reg0_shadow[idx] = value; 256 mpic->isu_reg0_shadow[src_no] =
257 value & ~(MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY);
255#endif 258#endif
256} 259}
257 260