Skip to contentSkip to conversation

fusion: remove dead MTRR code

PATCH Superseded Luis R. Rodriguez 3 participants 9 messages Apr 21, 2015 – Jun 5, 2015

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 fusion: remove dead MTRR code

From: "Luis R. Rodriguez" <[email protected]>

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 <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Nagalakshmi Nandigama <[email protected]>
Cc Praveen Krishnamoorthy <[email protected]>
Cc Sreekanth Reddy <[email protected]>
Cc Abhijit Mahajan <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Suresh Siddha <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
---
 drivers/message/fusion/mptbase.c | 24 ------------------------
 drivers/message/fusion/mptbase.h |  1 -
 2 files changed, 25 deletions(-)
drivers/message/fusion/mptbase.c +0 -24
index 187f836..5dcc031 100644
@@ -59,10 +59,6 @@
 #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;
drivers/message/fusion/mptbase.h +0 -1
index 8f14090..813d463 100644
@@ -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;
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
#1 lore raw
Quoted 10 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

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

Quoted 8 lines

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()")

Hey folks, who's tree should this go through if agreeable?

Luis

#2 lore raw
Quoted 15 lines · Luis R. Rodriguez
Quoted 13 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

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

Quoted 7 lines
Quoted 5 lines

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()")

Hey folks, who's tree should this go through if agreeable?

Hey folks, can this be applied? Thanks.

Luis

#3 lore raw
In reply to Luis R. Rodriguez
Quoted 15 lines · Luis R. Rodriguez
Quoted 13 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

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

Quoted 7 lines
Quoted 5 lines

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()")

Hey folks, who's tree should this go through if agreeable?

OK its been over 1 month without any replies on this patch which just removes commented out code.

All the maintainers below bounce and the only e-mail not bouncing is for Sreekanth Reddy <[email protected]>, he hasn't been seen active on linux-next since Jan 12 2015 when he did a driver bump for mpt2sas to 20.100.00.00.

What's going on folks? And can this patch go in?

MAINTAINERS +0 -3
index aca2886..73dbc02 100644
@@ -6205,10 +6205,7 @@ S:       Maintained
 F:     arch/arm/mach-lpc32xx/
 
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
-M:     Nagalakshmi Nandigama <[email protected]>
-M:     Praveen Krishnamoorthy <[email protected]>
 M:     Sreekanth Reddy <[email protected]>
-M:     Abhijit Mahajan <[email protected]>
 L:     [email protected]
 L:     [email protected]
 W:     http://www.lsilogic.com/support
#4 lore raw
Quoted 39 lines · Luis R. Rodriguez
Quoted 15 lines · Luis R. Rodriguez
Quoted 13 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

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

Quoted 7 lines
Quoted 5 lines

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()")

Hey folks, who's tree should this go through if agreeable?

OK its been over 1 month without any replies on this patch which just removes commented out code.

All the maintainers below bounce and the only e-mail not bouncing is for Sreekanth Reddy <[email protected]>, he hasn't been seen active on linux-next since Jan 12 2015 when he did a driver bump for mpt2sas to 20.100.00.00.

What's going on folks? And can this patch go in?

MAINTAINERS +0 -0
index aca2886..73dbc02 100644

MAINTAINERS S: Maintained · line 6211

Quoted 10 lines
MAINTAINERS +0 -3
@@ -6205,10 +6205,7 @@ S:       Maintained
 F:     arch/arm/mach-lpc32xx/
 
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
-M:     Nagalakshmi Nandigama <[email protected]>
-M:     Praveen Krishnamoorthy <[email protected]>
 M:     Sreekanth Reddy <[email protected]>
-M:     Abhijit Mahajan <[email protected]>
 L:     [email protected]
 L:     [email protected]
 W:     http://www.lsilogic.com/support

OK so Avago bought Broadcom.

Does that impact how Avago will contribute to the Linux kernel? It has been well over 1 month and I haven't seen any reply from Avago folks.

Andrew, is the silence sufficient enough reason for this patch to go instead through your tree?

Luis

#5 lore raw
In reply to Luis R. Rodriguez

Hi Luis,

Sorry for delay in response. Actually I was looking for the history of this section of code but I couldn't find it. Anyway this is dead code and we are fine with removing this dead code.

James,

Please consider this patch as Acked-by: "Sreekanth Reddy" <[email protected]>

Regards,
Sreekanth

Quoted 113 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

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 <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Nagalakshmi Nandigama <[email protected]>
Cc Praveen Krishnamoorthy <[email protected]>
Cc Sreekanth Reddy <[email protected]>
Cc Abhijit Mahajan <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Suresh Siddha <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Antonino Daplas <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
---
 drivers/message/fusion/mptbase.c | 24 ------------------------
 drivers/message/fusion/mptbase.h |  1 -
 2 files changed, 25 deletions(-)
drivers/message/fusion/mptbase.c +0 -24
index 187f836..5dcc031 100644
@@ -59,10 +59,6 @@
 #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;
drivers/message/fusion/mptbase.h +0 -2
index 8f14090..813d463 100644
@@ -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;
--
Quoted 2 lines

2.3.2.209.gd67f9d5.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 11 lines · Sreekanth Reddy

Hi Luis,

Sorry for delay in response. Actually I was looking for the history of this section of code but I couldn't find it. Anyway this is dead code and we are fine with removing this dead code.

James,

Please consider this patch as:

Great thanks, now who's tree should this patch go through? Last patch for this driver was in 2014 and went through Christoph, but if Christoph doesn't want to take it can it go through Andrew's tree?

Sreekanth, can you also update the MAINTAINERS file to reflect recent changes at your company ?

Luis

#7 lore raw
Quoted 11 lines · Luis R. Rodriguez
Quoted 10 lines · Sreekanth Reddy

Hi Luis,

Sorry for delay in response. Actually I was looking for the history of this section of code but I couldn't find it. Anyway this is dead code and we are fine with removing this dead code.

James,

Please consider this patch as:

Quoted 8 lines
Quoted 1 line

Great thanks, now who's tree should this patch go through? Last patch for this driver was in 2014 and went through Christoph, but if Christoph doesn't want to take it can it go through Andrew's tree?

Sreekanth, can you also update the MAINTAINERS file to reflect recent changes at your company ?

Sure I will do this.

Quoted 2 lines

Luis

Thanks,
Sreekanth

#8 lore raw
Quoted 14 lines · Sreekanth Reddy
Quoted 13 lines · Luis R. Rodriguez
Quoted 11 lines · Sreekanth Reddy

Hi Luis,

Sorry for delay in response. Actually I was looking for the history of this section of code but I couldn't find it. Anyway this is dead code and we are fine with removing this dead code.

James,

Please consider this patch as:

Quoted 8 lines
Quoted 6 lines

Great thanks, now who's tree should this patch go through? Last patch for this driver was in 2014 and went through Christoph, but if Christoph doesn't want to take it can it go through Andrew's tree?

Sreekanth, can you also update the MAINTAINERS file to reflect recent changes at your company ?

Sure I will do this.

Christoph, do you mind this going through Andrew's tree? Or do you want to take it?

Luis