From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Luis R. Rodriguez" Subject: [PATCH v3] fusion: remove dead MTRR code Date: Tue, 21 Apr 2015 13:46:06 -0700 Message-ID: <1429649166-18294-1-git-send-email-mcgrof@do-not-panic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-kernel-owner@vger.kernel.org To: nagalakshmi.nandigama@avagotech.com, praveen.krishnamoorthy@avagotech.com, sreekanth.reddy@avagotech.com, abhijit.mahajan@avagotech.com, MPT-FusionLinux.pdl@avagotech.com, linux-scsi@vger.kernel.org Cc: luto@amacapital.net, mst@redhat.com, "Luis R. Rodriguez" , Toshi Kani , Christoph Hellwig , Suresh Siddha , Ingo Molnar , Thomas Gleixner , Juergen Gross , Daniel Vetter , Dave Airlie , Antonino Daplas , Tomi Valkeinen , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Mel Gorman , Vlastimil Babka , Borislav Petkov , Davidlohr Bueso , Jean-Christophe Plagniol-Villard , linux-kernel@vger.kernel.org List-Id: linux-scsi@vger.kernel.org =46rom: "Luis R. Rodriguez" If and when this gets enabled the driver could should split up IO memory space properly and that is quite a bit of work. Just remove the uncommented dead MTRR code then. There are a few motivations for this: a) Take advantage of PAT when available b) Help bury MTRR code away, MTRR is architecture specific and on x86 its replaced by PAT c) Help with the goal of eventually using _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit de33c442e titled "x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()") Cc: Toshi Kani Cc: Christoph Hellwig Cc: Nagalakshmi Nandigama Cc: Praveen Krishnamoorthy Cc: Sreekanth Reddy Cc: Abhijit Mahajan Cc: linux-scsi@vger.kernel.org Cc: Andy Lutomirski Cc: Suresh Siddha Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Juergen Gross Cc: Daniel Vetter Cc: Juergen Gross Cc: Dave Airlie Cc: Antonino Daplas Cc: Tomi Valkeinen Cc: Ville Syrj=C3=A4l=C3=A4 Cc: Mel Gorman Cc: Vlastimil Babka Cc: Borislav Petkov Cc: Davidlohr Bueso 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 | 24 ------------------------ drivers/message/fusion/mptbase.h | 1 - 2 files changed, 25 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/= mptbase.c index 187f836..5dcc031 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 =20 @@ -2820,13 +2816,6 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc) pci_disable_device(ioc->pcidev); pci_release_selected_regions(ioc->pcidev, ioc->bars); =20 -#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)); - } -#endif - /* Zap the adapter lookup ptr! */ list_del(&ioc->list); =20 @@ -4512,19 +4501,6 @@ PrimeIocFifos(MPT_ADAPTER *ioc) =20 ioc->req_frames_low_dma =3D (u32) (alloc_dma & 0xFFFFFFFF); =20 -#if defined(CONFIG_MTRR) && 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 =3D mtrr_add(ioc->req_frames_dma, - sz, - MTRR_TYPE_WRCOMB, 1); - dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MTRR region registered (base:= size=3D%08x:%x)\n", - ioc->name, ioc->req_frames_dma, sz)); -#endif - for (i =3D 0; i < ioc->req_depth; i++) { alloc_dma +=3D ioc->req_sz; mem +=3D ioc->req_sz; diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/= mptbase.h index 8f14090..813d463 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -671,7 +671,6 @@ typedef struct _MPT_ADAPTER u8 *HostPageBuffer; /* SAS - host page buffer support */ u32 HostPageBuffer_sz; dma_addr_t HostPageBuffer_dma; - int mtrr_reg; struct pci_dev *pcidev; /* struct pci_dev pointer */ int bars; /* bitmask of BAR's that must be configured */ int msi_enable; --=20 2.3.2.209.gd67f9d5.dirty