From patchwork Wed Mar 22 13:25:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 9638857 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 7E79B6020B for ; Wed, 22 Mar 2017 13:31:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F3DC283F3 for ; Wed, 22 Mar 2017 13:31:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 641FE28460; Wed, 22 Mar 2017 13:31: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=ham 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 15E20283F3 for ; Wed, 22 Mar 2017 13:31:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934631AbdCVNbN (ORCPT ); Wed, 22 Mar 2017 09:31:13 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47286 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759809AbdCVNZd (ORCPT ); Wed, 22 Mar 2017 09:25:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=DuxqS4BvH4l+aT1GiSVyrhSxNU02Z+Nfjg+vMK6Si44=; b=eZ7bobHsxaMMteN4LzytgTJic 1h2WTxXPw1o2nEQx0lhPHWCEOxxAtIjiIq6Ae/DBswzhMus3CBgqpShsRwA7hRw7rQKdc7WTDNwOq MR8GGHhN7s/QhoMfJfL8qu8tS+ievlJM+/TnAsMHaQpOtAHBM0X5+T0rId7vHkkO7NpL7+2zls6kw cNH8pRhUqqBZwkGQwrCPkCPDkLcBTtz4UVPwtQVrO9Otmw0ngXnelMYFTBj+x4LcJ604jY9qCGRF6 AMH3QgKeSck1i5h+CfvFvH/Yv4WuPgJRUwzdovAw5WkAxSbQvzvJ6R2gT1PP4OPXZ1dWIuCNUzx9Q OVNSpjWiQ==; Received: from i7.infradead.org ([90.155.92.213]) by merlin.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1cqgGa-0005ip-7p; Wed, 22 Mar 2017 13:25:32 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1cqgGZ-0005qx-96; 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 10/17] arm: Use generic pci_mmap_resource_range() Date: Wed, 22 Mar 2017 13:25:24 +0000 Message-Id: <60f1a26d0f10bf8b6f1e88283ba1df1b3b1d0c0a.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 merlin.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 --- arch/arm/include/asm/pci.h | 1 + arch/arm/kernel/bios32.c | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h index 51118a0..396c92b 100644 --- a/arch/arm/include/asm/pci.h +++ b/arch/arm/include/asm/pci.h @@ -29,6 +29,7 @@ static inline int pci_proc_domain(struct pci_bus *bus) #define PCI_DMA_BUS_IS_PHYS (1) #define HAVE_PCI_MMAP +#define ARCH_GENERIC_PCI_MMAP_RESOURCE static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) { diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index a4fc3f4..b259956 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -597,26 +597,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, return start; } -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) -{ - if (mmap_state == pci_mmap_io) - return -EINVAL; - - /* - * Mark this as IO - */ - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - - 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; -} - void __init pci_map_io_early(unsigned long pfn) { struct map_desc pci_io_desc = {