Commit 56b4c993124d15f3b198cc757ba49a0022b5d695
Committed by
Benjamin Herrenschmidt
1 parent
e2c8b93e65
Exists in
master
and in
13 other branches
powerpc/powernv: Fix little endian issues with opal_do_notifier calls
The bitmap in opal_poll_events and opal_handle_interrupt is big endian, so we need to byteswap it on little endian builds. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
arch/powerpc/platforms/powernv/opal.c
... | ... | @@ -242,14 +242,14 @@ |
242 | 242 | void opal_notifier_enable(void) |
243 | 243 | { |
244 | 244 | int64_t rc; |
245 | - uint64_t evt = 0; | |
245 | + __be64 evt = 0; | |
246 | 246 | |
247 | 247 | atomic_set(&opal_notifier_hold, 0); |
248 | 248 | |
249 | 249 | /* Process pending events */ |
250 | 250 | rc = opal_poll_events(&evt); |
251 | 251 | if (rc == OPAL_SUCCESS && evt) |
252 | - opal_do_notifier(evt); | |
252 | + opal_do_notifier(be64_to_cpu(evt)); | |
253 | 253 | } |
254 | 254 | |
255 | 255 | void opal_notifier_disable(void) |
... | ... | @@ -529,7 +529,7 @@ |
529 | 529 | |
530 | 530 | opal_handle_interrupt(virq_to_hw(irq), &events); |
531 | 531 | |
532 | - opal_do_notifier(events); | |
532 | + opal_do_notifier(be64_to_cpu(events)); | |
533 | 533 | |
534 | 534 | return IRQ_HANDLED; |
535 | 535 | } |