From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Luis R. Rodriguez" Subject: [PATCH v1 16/47] fusion: use __arch_phys_wc_add() Date: Fri, 20 Mar 2015 16:18:06 -0700 Message-ID: <1426893517-2511-17-git-send-email-mcgrof__26674.5043024004$1426895887$gmane$org@do-not-panic.com> References: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YZ6lx-0007Il-AL for xen-devel@lists.xenproject.org; Fri, 20 Mar 2015 23:56:13 +0000 Received: by pabxg6 with SMTP id xg6so110700862pab.0 for ; Fri, 20 Mar 2015 16:56:10 -0700 (PDT) In-Reply-To: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: luto@amacapital.net, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, jgross@suse.com, JBeulich@suse.com, bp@suse.de, suresh.b.siddha@intel.com, venkatesh.pallipadi@intel.com, airlied@redhat.com Cc: Abhijit Mahajan , linux-fbdev@vger.kernel.org, Antonino Daplas , Nagalakshmi Nandigama , Daniel Vetter , "Luis R. Rodriguez" , x86@kernel.org, linux-kernel@vger.kernel.org, Sreekanth Reddy , Praveen Krishnamoorthy , Tomi Valkeinen , linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, Ingo Molnar , Jean-Christophe Plagniol-Villard , MPT-FusionLinux.pdl@avagotech.com List-Id: xen-devel@lists.xenproject.org From: "Luis R. Rodriguez" If and when this gets enabled the driver should address using ioremap_wc() on the same area, that could require a bit of work as it would mean a split with two ioremap'd areas. Annotate this. Cc: Andy Lutomirski Cc: Suresh Siddha Cc: Venkatesh Pallipadi Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Juergen Gross Cc: Daniel Vetter Cc: Nagalakshmi Nandigama Cc: Praveen Krishnamoorthy Cc: Sreekanth Reddy Cc: Abhijit Mahajan Cc: Juergen Gross Cc: Dave Airlie Cc: Antonino Daplas Cc: Tomi Valkeinen Cc: Jean-Christophe Plagniol-Villard Cc: MPT-FusionLinux.pdl@avagotech.com Cc: linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez --- drivers/message/fusion/mptbase.c | 19 ++++--------------- drivers/message/fusion/mptbase.h | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 187f836..c7b1a55 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -59,10 +59,6 @@ #include #include /* needed for in_interrupt() proto */ #include -#include -#ifdef CONFIG_MTRR -#include -#endif #include #include @@ -2820,11 +2816,8 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc) pci_disable_device(ioc->pcidev); pci_release_selected_regions(ioc->pcidev, ioc->bars); -#if defined(CONFIG_MTRR) && 0 - if (ioc->mtrr_reg > 0) { - mtrr_del(ioc->mtrr_reg, 0, 0); - dprintk(ioc, printk(MYIOC_s_INFO_FMT "MTRR region de-registered\n", ioc->name)); - } +#if 0 + __arch_phys_wc_del(ioc->wc_cookie); #endif /* Zap the adapter lookup ptr! */ @@ -4512,17 +4505,13 @@ PrimeIocFifos(MPT_ADAPTER *ioc) ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); -#if defined(CONFIG_MTRR) && 0 +#if 0 /* * Enable Write Combining MTRR for IOC's memory region. * (at least as much as we can; "size and base must be * multiples of 4 kiB" */ - ioc->mtrr_reg = mtrr_add(ioc->req_frames_dma, - sz, - MTRR_TYPE_WRCOMB, 1); - dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MTRR region registered (base:size=%08x:%x)\n", - ioc->name, ioc->req_frames_dma, sz)); + ioc->wc_cookie = arch_phys_wc_add(ioc->req_frames_dma, sz); #endif for (i = 0; i < ioc->req_depth; i++) { diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 8f14090..f0bff11 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -671,7 +671,7 @@ typedef struct _MPT_ADAPTER u8 *HostPageBuffer; /* SAS - host page buffer support */ u32 HostPageBuffer_sz; dma_addr_t HostPageBuffer_dma; - int mtrr_reg; + int wc_cookie; struct pci_dev *pcidev; /* struct pci_dev pointer */ int bars; /* bitmask of BAR's that must be configured */ int msi_enable; -- 2.3.2.209.gd67f9d5.dirty