Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fusion: remove dead MTRR code

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>

authored by

Luis R. Rodriguez and committed by
James Bottomley
8cd1943b 8810eac8

-25
-24
drivers/message/fusion/mptbase.c
··· 59 59 #include <linux/delay.h> 60 60 #include <linux/interrupt.h> /* needed for in_interrupt() proto */ 61 61 #include <linux/dma-mapping.h> 62 - #include <asm/io.h> 63 - #ifdef CONFIG_MTRR 64 - #include <asm/mtrr.h> 65 - #endif 66 62 #include <linux/kthread.h> 67 63 #include <scsi/scsi_host.h> 68 64 ··· 2816 2820 pci_disable_device(ioc->pcidev); 2817 2821 pci_release_selected_regions(ioc->pcidev, ioc->bars); 2818 2822 2819 - #if defined(CONFIG_MTRR) && 0 2820 - if (ioc->mtrr_reg > 0) { 2821 - mtrr_del(ioc->mtrr_reg, 0, 0); 2822 - dprintk(ioc, printk(MYIOC_s_INFO_FMT "MTRR region de-registered\n", ioc->name)); 2823 - } 2824 - #endif 2825 - 2826 2823 /* Zap the adapter lookup ptr! */ 2827 2824 list_del(&ioc->list); 2828 2825 ··· 4500 4511 ioc->name, mem, (void *)(ulong)alloc_dma)); 4501 4512 4502 4513 ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); 4503 - 4504 - #if defined(CONFIG_MTRR) && 0 4505 - /* 4506 - * Enable Write Combining MTRR for IOC's memory region. 4507 - * (at least as much as we can; "size and base must be 4508 - * multiples of 4 kiB" 4509 - */ 4510 - ioc->mtrr_reg = mtrr_add(ioc->req_frames_dma, 4511 - sz, 4512 - MTRR_TYPE_WRCOMB, 1); 4513 - dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MTRR region registered (base:size=%08x:%x)\n", 4514 - ioc->name, ioc->req_frames_dma, sz)); 4515 - #endif 4516 4514 4517 4515 for (i = 0; i < ioc->req_depth; i++) { 4518 4516 alloc_dma += ioc->req_sz;
-1
drivers/message/fusion/mptbase.h
··· 671 671 u8 *HostPageBuffer; /* SAS - host page buffer support */ 672 672 u32 HostPageBuffer_sz; 673 673 dma_addr_t HostPageBuffer_dma; 674 - int mtrr_reg; 675 674 struct pci_dev *pcidev; /* struct pci_dev pointer */ 676 675 int bars; /* bitmask of BAR's that must be configured */ 677 676 int msi_enable;