From patchwork Wed Mar 22 13:25:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 742041 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 3vp9Yh6Zytz9s7b for ; Thu, 23 Mar 2017 00:31:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="eGpIq15V"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759923AbdCVN30 (ORCPT ); Wed, 22 Mar 2017 09:29:26 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47294 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759833AbdCVNZk (ORCPT ); Wed, 22 Mar 2017 09:25:40 -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=JIPD/QIB/OLGvBUk4CJ0c1EGvdiT4kiKpDRbryd842Q=; b=eGpIq15V8lKIgVB2nqrHjktGf GETf3XToJC2fuGMXEY2rlWbp1XS5VtGtwnFJ815W0jloEIdwBMzY87c0Pp6G1YPRBb1lKLNhZKqLC bEqvgj28WK/dFFXLURRDfKmUs9SCy3kd49PySReCdijb6Dmqy/D6PQxF/NIiz4qYgegB0v8OclfU5 voqHwL3v0Mx7TXyMtYte5Tj9XM5GOSkotypiEp9HzhHHyV7YIBO//FPagOoGhuk/MdLDNW5xFNDsS xZJ7SKCa6uOLT3HcqHXdMDZvFuYe9Sy+GgYha/mk6noj14tuBoeA2ZG4s/w+ZUQhEx7yZXb82huAi ekXGUvQOw==; Received: from i7.infradead.org ([90.155.92.213]) by merlin.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1cqgGa-0005iu-C6; 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-0005rT-DN; 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 16/17] unicore: Use generic pci_mmap_resource_range() Date: Wed, 22 Mar 2017 13:25:30 +0000 Message-Id: <47e2b47595ff658ded621e9610f9f7b0226d26b7.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 From: David Woodhouse Signed-off-by: David Woodhouse --- arch/unicore32/include/asm/pci.h | 1 + arch/unicore32/kernel/pci.c | 24 ------------------------ 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/arch/unicore32/include/asm/pci.h b/arch/unicore32/include/asm/pci.h index a5129086..ac5acdf 100644 --- a/arch/unicore32/include/asm/pci.h +++ b/arch/unicore32/include/asm/pci.h @@ -17,6 +17,7 @@ #include /* for PCIBIOS_MIN_* */ #define HAVE_PCI_MMAP +#define ARCH_GENERIC_PCI_MMAP_RESOURCE #endif /* __KERNEL__ */ #endif diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c index 1b43885..1053bca 100644 --- a/arch/unicore32/kernel/pci.c +++ b/arch/unicore32/kernel/pci.c @@ -356,27 +356,3 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) } return 0; } - -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 phys; - - if (mmap_state == pci_mmap_io) - return -EINVAL; - - phys = vma->vm_pgoff; - - /* - * Mark this as IO - */ - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - - if (remap_pfn_range(vma, vma->vm_start, phys, - vma->vm_end - vma->vm_start, - vma->vm_page_prot)) - return -EAGAIN; - - return 0; -}