From patchwork Wed Mar 22 13:25:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 9638817 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 75E8860328 for ; Wed, 22 Mar 2017 13:28:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6845228461 for ; Wed, 22 Mar 2017 13:28:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BF4128464; Wed, 22 Mar 2017 13:28:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 832FF28460 for ; Wed, 22 Mar 2017 13:28:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934577AbdCVN0X (ORCPT ); Wed, 22 Mar 2017 09:26:23 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:59839 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934189AbdCVNZp (ORCPT ); Wed, 22 Mar 2017 09:25:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding: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=/0sN1icqTUHxvhiSXO7VW3hIx1hmEOwADqfEhK65lTE=; b=S9gxzPREG5FO2+3//L1BolB5i icOS4i6gzzWfeASuh8DAJ0so43ez+LX5sjzmfe+rb/36KbMZSfB7FffYfYMi0K+GEwOiaAUd2XN9r RSTD1tuB/MMDdq5Cvqb6+pRIVFj+AJfPipo9JSZKQnEGxEMpjsvnkTyK60XazqZfB/QN9AvhhjT/n 5G8rMA+l8e4+DVt/axOgdGARwibIiU2uwq1lcMhHQXA9zvC6+Y6QPu6sqHGibWfcQqHto7tXyUj8/ 9Qbw+slqZ0JEgWUY7tDueMdNQDAl36RkkfiOcbh5bYOTqmJ0FSOnwqZ8BxSYzSj39muNrTu5KX0Xf xrzrsDiQw==; Received: from i7.infradead.org ([90.155.92.213]) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1cqgGa-000723-Ub; Wed, 22 Mar 2017 13:25:33 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1cqgGZ-0005r2-9r; Wed, 22 Mar 2017 13:25:31 +0000 From: David Woodhouse To: linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/17] cris: Use generic pci_mmap_resource_range() Date: Wed, 22 Mar 2017 13:25:25 +0000 Message-Id: <1e68573b4fe52b24d770a8582a7db59272862a52.1490188942.git.dwmw2@infradead.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: References: In-Reply-To: References: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: David Woodhouse Signed-off-by: David Woodhouse Acked-by: Jesper Nilsson --- arch/cris/arch-v32/drivers/pci/bios.c | 23 ----------------------- arch/cris/include/asm/pci.h | 1 + 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c index a589686d..394c2a73 100644 --- a/arch/cris/arch-v32/drivers/pci/bios.c +++ b/arch/cris/arch-v32/drivers/pci/bios.c @@ -14,29 +14,6 @@ void pcibios_set_master(struct pci_dev *dev) pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); } -int pci_mmap_page_range(struct pci_dev *dev, int bar, - struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, int write_combine) -{ - unsigned long prot; - - /* Leave vm_pgoff as-is, the PCI space address is the physical - * address on this platform. - */ - prot = pgprot_val(vma->vm_page_prot); - vma->vm_page_prot = __pgprot(prot); - - /* Write-combine setting is ignored, it is changed via the mtrr - * interfaces on this platform. - */ - if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, - vma->vm_end - vma->vm_start, - vma->vm_page_prot)) - return -EAGAIN; - - return 0; -} - resource_size_t pcibios_align_resource(void *data, const struct resource *res, resource_size_t size, resource_size_t align) diff --git a/arch/cris/include/asm/pci.h b/arch/cris/include/asm/pci.h index 65198cb..6e50533 100644 --- a/arch/cris/include/asm/pci.h +++ b/arch/cris/include/asm/pci.h @@ -42,6 +42,7 @@ struct pci_dev; #define PCI_DMA_BUS_IS_PHYS (1) #define HAVE_PCI_MMAP +#define ARCH_GENERIC_PCI_MMAP_RESOURCE #endif /* __KERNEL__ */