From patchwork Wed Apr 12 12:26:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 749984 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 3w33FD3fPrz9s8J for ; Wed, 12 Apr 2017 22:31:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="h90DSQUY"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754279AbdDLMbW (ORCPT ); Wed, 12 Apr 2017 08:31:22 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:47526 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753537AbdDLM0S (ORCPT ); Wed, 12 Apr 2017 08:26:18 -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=2iXCtVuGo6i2hGUXBpL60zJoJeupE6yh0cEdizMrLAg=; b=h90DSQUYaItdO79F1YAMNVfX5 8rN0WkdvI+8rZdnsY+3UR8otofn2zMTusSE9sruTdYbHZ7jOhP4vNi2sQeRuboPgvwP0HIHNUPdEA jBByqbHqTtB1jHGJwyc1W8njdXZbhiY4aPXy2qo5InhjTxQnNEpKy2MW8/NkS0rJ5LOoI2dwCZBgi 2IA1S7WCQAoDaMYnkZoQi1SPPwuJ6fHZXYnVjkS0vzOr3G/H/M8bmM86WtAOzOnI/bAWgdyjYMHIO W9+CxqEw8wUtVfINiSWx4ZM2TwTGMl2fUfRHmzOghs/r/zrrYGWumvuI9+nNDg0UKrPaqdxMtQW6i FjhWxmT4A==; Received: from i7.infradead.org ([2001:8b0:10b:1:21e:67ff:fecb:7a92]) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1cyHLm-0003DZ-5k; Wed, 12 Apr 2017 12:26:18 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1cyHLk-000bZb-Jz; Wed, 12 Apr 2017 13:26:16 +0100 From: David Woodhouse To: linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 13/27] mips: Use generic pci_mmap_resource_range() Date: Wed, 12 Apr 2017 13:26:02 +0100 Message-Id: <9afaaa92928c01c73c2c008cd0d9539cb592010f.1491999859.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 From: David Woodhouse Signed-off-by: David Woodhouse --- arch/mips/include/asm/pci.h | 2 +- arch/mips/pci/pci.c | 25 ------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index 3141e2a..1000c1b 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h @@ -110,7 +110,7 @@ extern unsigned long PCIBIOS_MIN_MEM; extern void pcibios_set_master(struct pci_dev *dev); #define HAVE_PCI_MMAP - +#define ARCH_GENERIC_PCI_MMAP_RESOURCE #define HAVE_ARCH_PCI_RESOURCE_TO_USER /* diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index f189502..bd67ac7 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -57,28 +57,3 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, *start = fixup_bigphys_addr(rsrc->start, size); *end = rsrc->start + size; } - -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; - - /* - * I/O space can be accessed via normal processor loads and stores on - * this platform but for now we elect not to do this and portable - * drivers should not do this anyway. - */ - if (mmap_state == pci_mmap_io) - return -EINVAL; - - /* - * Ignore write-combine; for now only return uncached mappings. - */ - prot = pgprot_val(vma->vm_page_prot); - prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED; - vma->vm_page_prot = __pgprot(prot); - - return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, - vma->vm_end - vma->vm_start, vma->vm_page_prot); -}