IP27: Really set PCI64_ATTR_VIRTUAL, not PCI64_ATTR_PREC.
Subsystems (2)
IOC3's homegrown DMA mapping functions that are used to optimize things a little on IP27 set the wrong bit.
drivers/net/ioc3-eth.c +1 -1
@@ -145,7 +145,7 @@ static inline struct sk_buff * ioc3_allostatic inline unsigned long ioc3_map (void *ptr,unsigned long vdev) {#ifdef CONFIG_SGI_IP27 - vdev <<=58 ;/* Shift to PCI64_ATTR_VIRTUAL */ + vdev <<=57 ;/* Shift to PCI64_ATTR_VIRTUAL */ return vdev | (0xaUL <<PCI64_ATTR_TARG_SHFT ) |PCI64_ATTR_PREF | ((unsigned long )ptr &TO_PHYS_MASK );
Hi Ralf,
Ralf Baechle :
Quoted 2 lines
IOC3's homegrown DMA mapping functions that are used to optimize things a little on IP27 set the wrong bit.
What about using a symbol instead of magic numbers? That way one at least sees the intention of the coder.
drivers/net/ioc3-eth.c static inline struct sk_buff * ioc3_allo · line 148
Quoted 12 lines
Signed-off-by Ralf Baechle <[email protected]>drivers/net/ioc3-eth.c +1
-1@@ -145,7 +145,7 @@ static inline struct sk_buff * ioc3_allostatic inline unsigned long ioc3_map (void *ptr,unsigned long vdev) {#ifdef CONFIG_SGI_IP27 - vdev <<=58 ;/* Shift to PCI64_ATTR_VIRTUAL */ + vdev <<=57 ;/* Shift to PCI64_ATTR_VIRTUAL */
So please use a symbolic value here.
Regards
Ingo Oeser
Quoted 19 lines · Ingo Oeser
From: Ingo Oeser <[email protected]>
To: Ralf Baechle <[email protected]>
Subject: Re: [IOC3] IP27: Really setPCI64_ATTR_VIRTUAL, notPCI64_ATTR_PREC.
Date: Tue, 20 Jun 2006 10:15:01 +0200
Cc: [email protected], Jeff Garzik <[email protected]>
Content-Type: text/plain;
charset="iso-8859-1"Hi Ralf,
Ralf Baechle :
Quoted 2 lines
IOC3's homegrown DMA mapping functions that are used to optimize things a little on IP27 set the wrong bit.
What about using a symbol instead of magic numbers? That way one at least sees the intention of the coder.
Quoted 2 lines
Signed-off-by Ralf Baechle <[email protected]>
Quoted 12 lines
drivers/net/ioc3-eth.c static inline struct sk_buff * ioc3_allo · line 148
Quoted 10 lines
drivers/net/ioc3-eth.c +1
-1@@ -145,7 +145,7 @@ static inline struct sk_buff * ioc3_allostatic inline unsigned long ioc3_map (void *ptr,unsigned long vdev) {#ifdef CONFIG_SGI_IP27 - vdev <<=58 ;/* Shift to PCI64_ATTR_VIRTUAL */ + vdev <<=57 ;/* Shift to PCI64_ATTR_VIRTUAL */ So please use a symbolic value here.
It is a hack and meant to look like one, loudly marked with #ifdef.
Ralf