From patchwork Fri Mar 22 19:12:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Yoder X-Patchwork-Id: 230244 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id C10D42C0161 for ; Sat, 23 Mar 2013 06:13:25 +1100 (EST) Received: from am1outboundpool.messaging.microsoft.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 557482C00D1 for ; Sat, 23 Mar 2013 06:12:50 +1100 (EST) Received: from mail66-am1-R.bigfish.com (10.3.201.254) by AM1EHSOBE024.bigfish.com (10.3.207.146) with Microsoft SMTP Server id 14.1.225.23; Fri, 22 Mar 2013 19:12:44 +0000 Received: from mail66-am1 (localhost [127.0.0.1]) by mail66-am1-R.bigfish.com (Postfix) with ESMTP id 6482BE0087; Fri, 22 Mar 2013 19:12:44 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1155h) Received: from mail66-am1 (localhost.localdomain [127.0.0.1]) by mail66-am1 (MessageSwitch) id 1363979562562890_21966; Fri, 22 Mar 2013 19:12:42 +0000 (UTC) Received: from AM1EHSMHS014.bigfish.com (unknown [10.3.201.230]) by mail66-am1.bigfish.com (Postfix) with ESMTP id 858BA20059; Fri, 22 Mar 2013 19:12:42 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS014.bigfish.com (10.3.207.152) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 22 Mar 2013 19:12:42 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.328.11; Fri, 22 Mar 2013 19:12:40 +0000 Received: from right.am.freescale.net (right.am.freescale.net [10.82.176.228]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r2MJCVLi001429; Fri, 22 Mar 2013 12:12:33 -0700 From: Stuart Yoder To: Subject: [PATCH] PPC: define the conditions where the ePAPR idle hcall can be supported Date: Fri, 22 Mar 2013 14:12:13 -0500 Message-ID: <1363979533-24485-1-git-send-email-stuart.yoder@freescale.com> X-Mailer: git-send-email 1.7.9.7 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: sfr@canb.auug.org.au, Stuart Yoder , 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Stuart Yoder 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 --- 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 #include +#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;