From: Stuart Yoder <stuart.yoder@freescale.com>
To: <mikey@neuling.org>
Cc: sfr@canb.auug.org.au, Stuart Yoder <stuart.yoder@freescale.com>,
matt@ozlabs.org, gang.chen@asianux.com,
linux-kernel@vger.kernel.org, paulus@samba.org,
imunsie@au1.ibm.com, chen.gang.flying.transformer@gmail.com,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported
Date: Fri, 22 Mar 2013 14:12:13 -0500 [thread overview]
Message-ID: <1363979533-24485-1-git-send-email-stuart.yoder@freescale.com> (raw)
From: Stuart Yoder <stuart.yoder@freescale.com>
For 32-bit, CONFIG_EPAPR_PARAVIRT pulls in both epapr_paravirt.c
and epapr_hcalls.c which contains the 32-bit paravirt idle loop.
For 64-bit, the paravirt idle loop is in idle_book3e.S and that
source file is included only if CONFIG_PPC_BOOK3E_64 defined.
This patch makes that dependency for 64-bit explicit.
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
arch/powerpc/kernel/epapr_paravirt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c
index f3eab85..d44a571 100644
--- a/arch/powerpc/kernel/epapr_paravirt.c
+++ b/arch/powerpc/kernel/epapr_paravirt.c
@@ -23,8 +23,10 @@
#include <asm/code-patching.h>
#include <asm/machdep.h>
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
extern void epapr_ev_idle(void);
extern u32 epapr_ev_idle_start[];
+#endif
bool epapr_paravirt_enabled;
@@ -47,11 +49,15 @@ static int __init epapr_paravirt_init(void)
for (i = 0; i < (len / 4); i++) {
patch_instruction(epapr_hypercall_start + i, insts[i]);
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
patch_instruction(epapr_ev_idle_start + i, insts[i]);
+#endif
}
+#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
if (of_get_property(hyper_node, "has-idle", NULL))
ppc_md.power_save = epapr_ev_idle;
+#endif
epapr_paravirt_enabled = true;
--
1.7.9.7
next reply other threads:[~2013-03-22 19:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 19:12 Stuart Yoder [this message]
2013-03-25 0:34 ` [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported Michael Neuling
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=1363979533-24485-1-git-send-email-stuart.yoder@freescale.com \
--to=stuart.yoder@freescale.com \
--cc=chen.gang.flying.transformer@gmail.com \
--cc=gang.chen@asianux.com \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=matt@ozlabs.org \
--cc=mikey@neuling.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/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).