]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fusion: remove dead MTRR code
authorLuis R. Rodriguez <mcgrof@suse.com>
Tue, 21 Apr 2015 20:46:06 +0000 (13:46 -0700)
committerJames Bottomley <JBottomley@Odin.com>
Sat, 13 Jun 2015 15:44:14 +0000 (08:44 -0700)
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()")

Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Acked-by: Sreekanth Reddy <ureekanth.reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptbase.h

index 187f83629f7ef8df1fcf4f5d7c6c7d83cff49fb5..5dcc0313c38a677d5f1960483dd64bb47f779891 100644 (file)
 #include <linux/delay.h>
 #include <linux/interrupt.h>           /* needed for in_interrupt() proto */
 #include <linux/dma-mapping.h>
-#include <asm/io.h>
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
 #include <linux/kthread.h>
 #include <scsi/scsi_host.h>
 
@@ -2820,13 +2816,6 @@ 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));
-       }
-#endif
-
        /*  Zap the adapter lookup ptr!  */
        list_del(&ioc->list);
 
@@ -4512,19 +4501,6 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
 
                ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF);
 
-#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 = 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));
-#endif
-
                for (i = 0; i < ioc->req_depth; i++) {
                        alloc_dma += ioc->req_sz;
                        mem += ioc->req_sz;
index 8f14090b8b7151a66f43e23345c9bd5c280d1aa5..813d46311f6ac224a976545e1219d6465226a80d 100644 (file)
@@ -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;