From: Anton Blanchard <anton@samba.org>
To: stewart@linux.vnet.ibm.com, benh@kernel.crashing.org, paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/4] powerpc/powernv: Fix little endian issues with opal_do_notifier calls
Date: Thu, 27 Mar 2014 16:20:21 +1100 [thread overview]
Message-ID: <20140327162021.4510477c@kryten> (raw)
In-Reply-To: <20140327161849.791432d0@kryten>
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>
---
Index: b/arch/powerpc/platforms/powernv/opal.c
===================================================================
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -216,14 +216,14 @@ void opal_notifier_update_evt(uint64_t e
void opal_notifier_enable(void)
{
int64_t rc;
- uint64_t evt = 0;
+ __be64 evt = 0;
atomic_set(&opal_notifier_hold, 0);
/* Process pending events */
rc = opal_poll_events(&evt);
if (rc == OPAL_SUCCESS && evt)
- opal_do_notifier(evt);
+ opal_do_notifier(be64_to_cpu(evt));
}
void opal_notifier_disable(void)
@@ -501,7 +501,7 @@ static irqreturn_t opal_interrupt(int ir
opal_handle_interrupt(virq_to_hw(irq), &events);
- opal_do_notifier(events);
+ opal_do_notifier(be64_to_cpu(events));
return IRQ_HANDLED;
}
next prev parent reply other threads:[~2014-03-27 5:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 5:18 [PATCH 1/4] powerpc/powernv: Use uint64_t instead of size_t in OPAL APIs Anton Blanchard
2014-03-27 5:19 ` [PATCH 2/4] powerpc/powernv: Remove some OPAL function declaration duplication Anton Blanchard
2014-03-27 5:20 ` Anton Blanchard [this message]
2014-03-27 5:20 ` [PATCH 4/4] powerpc/powernv: Fix little endian issues OPAL error log code Anton Blanchard
2014-03-27 6:17 ` Stewart Smith
2014-03-27 22:04 ` Anton Blanchard
2014-03-27 5:54 ` [PATCH 1/4] powerpc/powernv: Use uint64_t instead of size_t in OPAL APIs Stewart Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140327162021.4510477c@kryten \
--to=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=stewart@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).