From patchwork Fri Jun 22 20:05:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Yoder X-Patchwork-Id: 166673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EBB42B6FA1 for ; Sat, 23 Jun 2012 06:06:25 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933025Ab2FVUGY (ORCPT ); Fri, 22 Jun 2012 16:06:24 -0400 Received: from am1ehsobe002.messaging.microsoft.com ([213.199.154.205]:26382 "EHLO am1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933076Ab2FVUGA (ORCPT ); Fri, 22 Jun 2012 16:06:00 -0400 Received: from mail90-am1-R.bigfish.com (10.3.201.226) by AM1EHSOBE009.bigfish.com (10.3.204.29) with Microsoft SMTP Server id 14.1.225.23; Fri, 22 Jun 2012 20:04:28 +0000 Received: from mail90-am1 (localhost [127.0.0.1]) by mail90-am1-R.bigfish.com (Postfix) with ESMTP id 025B22C02C0; Fri, 22 Jun 2012 20:04:28 +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(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bhf0ah) Received: from mail90-am1 (localhost.localdomain [127.0.0.1]) by mail90-am1 (MessageSwitch) id 1340395465121760_29635; Fri, 22 Jun 2012 20:04:25 +0000 (UTC) Received: from AM1EHSMHS001.bigfish.com (unknown [10.3.201.232]) by mail90-am1.bigfish.com (Postfix) with ESMTP id 1B124220046; Fri, 22 Jun 2012 20:04:25 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS001.bigfish.com (10.3.207.101) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 22 Jun 2012 20:04:22 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.298.5; Fri, 22 Jun 2012 15:05:50 -0500 Received: from right.am.freescale.net (right.am.freescale.net [10.82.193.13]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q5MK5nNr014122; Fri, 22 Jun 2012 13:05:50 -0700 From: Stuart Yoder To: , , Subject: [PATCH v11 7/8] powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls Date: Fri, 22 Jun 2012 15:05:49 -0500 Message-ID: <1340395549-17481-1-git-send-email-stuart.yoder@freescale.com> X-Mailer: git-send-email 1.7.3.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org From: Scott Wood Signed-off-by: Scott Wood Signed-off-by: Stuart Yoder --- -new in v11-- this is derived from an internal patch from Scott, without it there will be build issues after hardcoded opcodes for hcalls are removed arch/powerpc/sysdev/fsl_msi.c | 9 +++++++-- arch/powerpc/sysdev/fsl_soc.c | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 6e097de..7e2b2f2 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c @@ -236,7 +236,6 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) u32 intr_index; u32 have_shift = 0; struct fsl_msi_cascade_data *cascade_data; - unsigned int ret; cascade_data = irq_get_handler_data(irq); msi_data = cascade_data->msi_data; @@ -268,7 +267,9 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) case FSL_PIC_IP_IPIC: msir_value = fsl_msi_read(msi_data->msi_regs, msir_index * 0x4); break; - case FSL_PIC_IP_VMPIC: +#ifdef CONFIG_EPAPR_PARAVIRT + case FSL_PIC_IP_VMPIC: { + unsigned int ret; ret = fh_vmpic_get_msir(virq_to_hw(irq), &msir_value); if (ret) { pr_err("fsl-msi: fh_vmpic_get_msir() failed for " @@ -277,6 +278,8 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) } break; } +#endif + } while (msir_value) { intr_index = ffs(msir_value) - 1; @@ -508,10 +511,12 @@ static const struct of_device_id fsl_of_msi_ids[] = { .compatible = "fsl,ipic-msi", .data = (void *)&ipic_msi_feature, }, +#ifdef CONFIG_EPAPR_PARAVIRT { .compatible = "fsl,vmpic-msi", .data = (void *)&vmpic_msi_feature, }, +#endif {} }; diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index c449dbd..97118dc 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -253,6 +253,7 @@ struct platform_diu_data_ops diu_ops; EXPORT_SYMBOL(diu_ops); #endif +#ifdef CONFIG_EPAPR_PARAVIRT /* * Restart the current partition * @@ -278,3 +279,4 @@ void fsl_hv_halt(void) pr_info("hv exit\n"); fh_partition_stop(-1); } +#endif