Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1445077ybm; Thu, 23 May 2019 00:51:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzauW47LT8/Bt1rIxuKdczsiUdQ87pzQbMNW9s6MU8z1ZhIBwzZPjhyS1voeDXuDgPsgRog X-Received: by 2002:a63:e018:: with SMTP id e24mr12753818pgh.361.1558597880672; Thu, 23 May 2019 00:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558597880; cv=none; d=google.com; s=arc-20160816; b=v38kYuEJO3ILHHoBZomyM4LlLi8jwjjyf2t1+Onj3N42ZS9e5eO6MYwqqmCte93Cww /VyJkpAd2XvOb+hvOR2OGPYYfziRI/C1bnXFmej6uVc6Da+kRxZoFHJjOKnT2CogwQ+V JsEN6CLpRrxWg2fgmRch25Y5kT+FucV7WYSBwj9wK5xBim/Ob3MTlofV5JAOWC7KboiL 9vKF6vkVgKyBrKgvWj1zd6Y+7br7AxM4muzYe2BoLXsyu3BP1ZDaE5KtTfEYyhCIsx4Q 6SVHgcbJ31lNggkpR5/EDZcuW3BSUwS/1GDdG8awtAqJ77okxdrJ31EWiLixyhWTQqeB mzUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9Q2p0j43MsF+X9DOOmIlHyGyT1FzOSD7+xv3fn/dl1M=; b=NuC7gmZRi0s92G+wBUgi4v6l7+3ujK8P/H9fYeljAa9X1F1LYUHMxBVKepdAtgUism aCt1l5gTFBYM17z/4L7i9H0xUVpkyNcdqZFka+PmYTuv1NXFAqA/ItDL5IHEr5JHh0VQ uOxsm3yyOo/uiXtjFjGNcMWC1ob9WEZiBQ494DAZ+IWd+id5R9K224S3bhfqHX3dvtz4 a1wq9ifawnQxoS0r5PnyQ2w1yuFtvsFVCcOVaMrPjG+/NsC+dPVlPhxcRBQ3Kw5962Pd 2UuXtotJ2NbRPN85ISZ9+RUEQ8Ui6p1uIrlE6EeiJqEA6nNMPbrcTT8mixC4PGrHx8ic WlZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AWDXzNVl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si27079123plo.386.2019.05.23.00.51.02; Thu, 23 May 2019 00:51:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AWDXzNVl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730012AbfEWHti (ORCPT + 99 others); Thu, 23 May 2019 03:49:38 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35808 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727919AbfEWHti (ORCPT ); Thu, 23 May 2019 03:49:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9Q2p0j43MsF+X9DOOmIlHyGyT1FzOSD7+xv3fn/dl1M=; b=AWDXzNVlHpRylUo6Q8Fo4ZwFpo Ymn3vE2zge/sVfgm3TOrIcoDESwXEJNnnuBT+vxT6k4ZBvq+MDLkcCbjmMN1d2SlU0LAwRAxPR2he p2mCCXWS+JA1oeo4yMhe62+Z77kaaHSqexyA/qHIEejEce2zW9zvTvi4WJG1a/23DXxbiPHR1zQ69 5uKxaIwVeJN9GUgh6ycmkTkMFmA7sKUmc0s3xCu8pdh06t75e08laxnnxoz49Q6xuo+pWkb26KKjm 8szzFOwpCA5rt+0e63smJW+rCQeM7+QGoB1VL03qnkSQhRc4HvdkJEiSiMVPBT60Y1VwjjygAezcu Nto+xZiw==; Received: from 213-225-10-46.nat.highway.a1.net ([213.225.10.46] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTiTj-00043Y-Pu; Thu, 23 May 2019 07:49:32 +0000 From: Christoph Hellwig To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] powerpc/powernv: remove the unused tunneling exports Date: Thu, 23 May 2019 09:49:22 +0200 Message-Id: <20190523074924.19659-3-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523074924.19659-1-hch@lst.de> References: <20190523074924.19659-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These have been unused ever since they've been added to the kernel. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/pnv-pci.h | 4 -- arch/powerpc/platforms/powernv/pci-ioda.c | 4 +- arch/powerpc/platforms/powernv/pci.c | 71 ----------------------- arch/powerpc/platforms/powernv/pci.h | 1 - 4 files changed, 3 insertions(+), 77 deletions(-) diff --git a/arch/powerpc/include/asm/pnv-pci.h b/arch/powerpc/include/asm/pnv-pci.h index 9fcb0bc462c6..1ab4b0111abc 100644 --- a/arch/powerpc/include/asm/pnv-pci.h +++ b/arch/powerpc/include/asm/pnv-pci.h @@ -27,12 +27,8 @@ extern int pnv_pci_get_power_state(uint64_t id, uint8_t *state); extern int pnv_pci_set_power_state(uint64_t id, uint8_t state, struct opal_msg *msg); -extern int pnv_pci_enable_tunnel(struct pci_dev *dev, uint64_t *asnind); -extern int pnv_pci_disable_tunnel(struct pci_dev *dev); extern int pnv_pci_set_tunnel_bar(struct pci_dev *dev, uint64_t addr, int enable); -extern int pnv_pci_get_as_notify_info(struct task_struct *task, u32 *lpid, - u32 *pid, u32 *tid); int pnv_phb_to_cxl_mode(struct pci_dev *dev, uint64_t mode); int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int hwirq, unsigned int virq); diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 126602b4e399..6b0caa2d0425 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -54,6 +54,8 @@ static const char * const pnv_phb_names[] = { "IODA1", "IODA2", "NPU_NVLINK", "NPU_OCAPI" }; +static void pnv_pci_ioda2_set_bypass(struct pnv_ioda_pe *pe, bool enable); + void pe_level_printk(const struct pnv_ioda_pe *pe, const char *level, const char *fmt, ...) { @@ -2360,7 +2362,7 @@ static long pnv_pci_ioda2_set_window(struct iommu_table_group *table_group, return 0; } -void pnv_pci_ioda2_set_bypass(struct pnv_ioda_pe *pe, bool enable) +static void pnv_pci_ioda2_set_bypass(struct pnv_ioda_pe *pe, bool enable) { uint16_t window_id = (pe->pe_number << 1 ) + 1; int64_t rc; diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index 8d28f2932c3b..fc69f5611020 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c @@ -868,54 +868,6 @@ struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev) } EXPORT_SYMBOL(pnv_pci_get_phb_node); -int pnv_pci_enable_tunnel(struct pci_dev *dev, u64 *asnind) -{ - struct device_node *np; - const __be32 *prop; - struct pnv_ioda_pe *pe; - uint16_t window_id; - int rc; - - if (!radix_enabled()) - return -ENXIO; - - if (!(np = pnv_pci_get_phb_node(dev))) - return -ENXIO; - - prop = of_get_property(np, "ibm,phb-indications", NULL); - of_node_put(np); - - if (!prop || !prop[1]) - return -ENXIO; - - *asnind = (u64)be32_to_cpu(prop[1]); - pe = pnv_ioda_get_pe(dev); - if (!pe) - return -ENODEV; - - /* Increase real window size to accept as_notify messages. */ - window_id = (pe->pe_number << 1 ) + 1; - rc = opal_pci_map_pe_dma_window_real(pe->phb->opal_id, pe->pe_number, - window_id, pe->tce_bypass_base, - (uint64_t)1 << 48); - return opal_error_code(rc); -} -EXPORT_SYMBOL_GPL(pnv_pci_enable_tunnel); - -int pnv_pci_disable_tunnel(struct pci_dev *dev) -{ - struct pnv_ioda_pe *pe; - - pe = pnv_ioda_get_pe(dev); - if (!pe) - return -ENODEV; - - /* Restore default real window size. */ - pnv_pci_ioda2_set_bypass(pe, true); - return 0; -} -EXPORT_SYMBOL_GPL(pnv_pci_disable_tunnel); - int pnv_pci_set_tunnel_bar(struct pci_dev *dev, u64 addr, int enable) { __be64 val; @@ -970,29 +922,6 @@ int pnv_pci_set_tunnel_bar(struct pci_dev *dev, u64 addr, int enable) } EXPORT_SYMBOL_GPL(pnv_pci_set_tunnel_bar); -#ifdef CONFIG_PPC64 /* for thread.tidr */ -int pnv_pci_get_as_notify_info(struct task_struct *task, u32 *lpid, u32 *pid, - u32 *tid) -{ - struct mm_struct *mm = NULL; - - if (task == NULL) - return -EINVAL; - - mm = get_task_mm(task); - if (mm == NULL) - return -EINVAL; - - *pid = mm->context.id; - mmput(mm); - - *tid = task->thread.tidr; - *lpid = mfspr(SPRN_LPID); - return 0; -} -EXPORT_SYMBOL_GPL(pnv_pci_get_as_notify_info); -#endif - void pnv_pci_shutdown(void) { struct pci_controller *hose; diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h index 4f11c077af62..469c24463247 100644 --- a/arch/powerpc/platforms/powernv/pci.h +++ b/arch/powerpc/platforms/powernv/pci.h @@ -195,7 +195,6 @@ extern int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type); extern void pnv_teardown_msi_irqs(struct pci_dev *pdev); extern struct pnv_ioda_pe *pnv_ioda_get_pe(struct pci_dev *dev); extern void pnv_set_msi_irq_chip(struct pnv_phb *phb, unsigned int virq); -extern void pnv_pci_ioda2_set_bypass(struct pnv_ioda_pe *pe, bool enable); extern unsigned long pnv_pci_ioda2_get_table_size(__u32 page_shift, __u64 window_size, __u32 levels); extern int pnv_eeh_post_init(void); -- 2.20.1