* [PATCH] Introduce BROKEN_ON_64BIT facility
@ 2006-10-02 4:55 Jeff Garzik
2006-10-02 9:51 ` Andi Kleen
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Jeff Garzik @ 2006-10-02 4:55 UTC (permalink / raw)
To: Andrew Morton, LKML
Cc: chas, netdev, kkeil, kai.germaschewski, isdn4linux, mac,
markus.lidel, samuel, Neela.Kolli, linux-scsi, Greg KH, thomas,
ak
Add a broken-on-64bit option, similar to the existing broken-on-smp
config option. This is just the first pass, marking the obvious
candidates.
Several driver have been marked as dependent on CONFIG_32BIT in the
past, when they should really be dependent on this new
CONFIG_BROKEN_ON_64BIT option, because the 32BIT marker was due to bugs
rather than fundamentals.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/atm/Kconfig | 2 +-
drivers/char/ftape/Kconfig | 2 +-
drivers/isdn/capi/Kconfig | 4 ++--
drivers/isdn/hardware/eicon/Kconfig | 2 +-
drivers/isdn/hisax/Kconfig | 1 +
drivers/message/i2o/Kconfig | 2 +-
drivers/net/irda/Kconfig | 2 +-
drivers/scsi/megaraid/Kconfig.megaraid | 2 +-
drivers/usb/misc/sisusbvga/Kconfig | 2 +-
init/Kconfig | 5 +++++
sound/oss/Kconfig | 10 +++++-----
11 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig
index cfa5af8..36c0fd7 100644
--- a/drivers/atm/Kconfig
+++ b/drivers/atm/Kconfig
@@ -139,7 +139,7 @@ config ATM_ENI_BURST_RX_2W
config ATM_FIRESTREAM
tristate "Fujitsu FireStream (FS50/FS155) "
- depends on PCI && ATM
+ depends on PCI && ATM && BROKEN_ON_64BIT
help
Driver for the Fujitsu FireStream 155 (MB86697) and
FireStream 50 (MB86695) ATM PCI chips.
diff --git a/drivers/char/ftape/Kconfig b/drivers/char/ftape/Kconfig
index 0d65189..13c9460 100644
--- a/drivers/char/ftape/Kconfig
+++ b/drivers/char/ftape/Kconfig
@@ -56,7 +56,7 @@ comment "The compressor will be built as
config ZFT_COMPRESSOR
tristate
- depends on FTAPE!=n && ZFTAPE!=n
+ depends on FTAPE!=n && ZFTAPE!=n && BROKEN_ON_64BIT
default m
config FT_NR_BUFFERS
diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig
index 8b6c9a4..064b7bb 100644
--- a/drivers/isdn/capi/Kconfig
+++ b/drivers/isdn/capi/Kconfig
@@ -21,7 +21,7 @@ config ISDN_CAPI_MIDDLEWARE
config ISDN_CAPI_CAPI20
tristate "CAPI2.0 /dev/capi support"
- depends on ISDN_CAPI
+ depends on ISDN_CAPI && BROKEN_ON_64BIT
help
This option will provide the CAPI 2.0 interface to userspace
applications via /dev/capi20. Applications should use the
@@ -44,7 +44,7 @@ config ISDN_CAPI_CAPIFS
config ISDN_CAPI_CAPIDRV
tristate "CAPI2.0 capidrv interface support"
- depends on ISDN_CAPI && ISDN_I4L
+ depends on ISDN_CAPI && ISDN_I4L && BROKEN_ON_64BIT
help
This option provides the glue code to hook up CAPI driven cards to
the legacy isdn4linux link layer. If you have a card which is
diff --git a/drivers/isdn/hardware/eicon/Kconfig b/drivers/isdn/hardware/eicon/Kconfig
index 51e66bc..d41e99d 100644
--- a/drivers/isdn/hardware/eicon/Kconfig
+++ b/drivers/isdn/hardware/eicon/Kconfig
@@ -32,7 +32,7 @@ config ISDN_DIVAS_PRIPCI
config ISDN_DIVAS_DIVACAPI
tristate "DIVA CAPI2.0 interface support"
- depends on ISDN_DIVAS && ISDN_CAPI
+ depends on ISDN_DIVAS && ISDN_CAPI && BROKEN_ON_64BIT
help
You need this to provide the CAPI interface
for DIVA Server cards.
diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index 6dfc941..b78abd8 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -4,6 +4,7 @@ menu "Passive cards"
config ISDN_DRV_HISAX
tristate "HiSax SiemensChipSet driver support"
+ depends on BROKEN_ON_64BIT
select CRC_CCITT
---help---
This is a driver supporting the Siemens chipset on various
diff --git a/drivers/message/i2o/Kconfig b/drivers/message/i2o/Kconfig
index 6443392..0e135ce 100644
--- a/drivers/message/i2o/Kconfig
+++ b/drivers/message/i2o/Kconfig
@@ -56,7 +56,7 @@ config I2O_EXT_ADAPTEC_DMA64
config I2O_CONFIG
tristate "I2O Configuration support"
- depends on I2O
+ depends on I2O && BROKEN_ON_64BIT
---help---
Say Y for support of the configuration interface for the I2O adapters.
If you have a RAID controller from Adaptec and you want to use the
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 7c8ccc0..f8cf8e1 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -145,7 +145,7 @@ comment "Old SIR device drivers"
config IRPORT_SIR
tristate "IrPORT (IrDA serial driver)"
- depends on IRDA && BROKEN_ON_SMP
+ depends on IRDA && BROKEN_ON_SMP && BROKEN_ON_64BIT
---help---
Say Y here if you want to build support for the IrPORT IrDA device
driver. To compile it as a module, choose M here: the module will be
diff --git a/drivers/scsi/megaraid/Kconfig.megaraid b/drivers/scsi/megaraid/Kconfig.megaraid
index 17419e3..6227125 100644
--- a/drivers/scsi/megaraid/Kconfig.megaraid
+++ b/drivers/scsi/megaraid/Kconfig.megaraid
@@ -66,7 +66,7 @@ config MEGARAID_MAILBOX
config MEGARAID_LEGACY
tristate "LSI Logic Legacy MegaRAID Driver"
- depends on PCI && SCSI
+ depends on PCI && SCSI && BROKEN_ON_64BIT
help
This driver supports the LSI MegaRAID 418, 428, 438, 466, 762, 490
and 467 SCSI host adapters. This driver also support the all U320
diff --git a/drivers/usb/misc/sisusbvga/Kconfig b/drivers/usb/misc/sisusbvga/Kconfig
index 7603cbe..b6cc15c 100644
--- a/drivers/usb/misc/sisusbvga/Kconfig
+++ b/drivers/usb/misc/sisusbvga/Kconfig
@@ -1,7 +1,7 @@
config USB_SISUSBVGA
tristate "USB 2.0 SVGA dongle support (Net2280/SiS315)"
- depends on USB && USB_EHCI_HCD
+ depends on USB && USB_EHCI_HCD && BROKEN_ON_64BIT
---help---
Say Y here if you intend to attach a USB2VGA dongle based on a
Net2280 and a SiS315 chip.
diff --git a/init/Kconfig b/init/Kconfig
index f7a04d0..6bd3dc3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -47,6 +47,11 @@ config BROKEN_ON_SMP
depends on BROKEN || !SMP
default y
+config BROKEN_ON_64BIT
+ bool
+ depends on BROKEN || !64BIT
+ default y
+
config LOCK_KERNEL
bool
depends on SMP || PREEMPT
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig
index 97e38b6..724a3db 100644
--- a/sound/oss/Kconfig
+++ b/sound/oss/Kconfig
@@ -63,7 +63,7 @@ config MIDI_EMU10K1
config SOUND_FUSION
tristate "Crystal SoundFusion (CS4280/461x)"
- depends on SOUND_PRIME && PCI && OSS_OBSOLETE_DRIVER
+ depends on SOUND_PRIME && PCI && OSS_OBSOLETE_DRIVER && BROKEN_ON_64BIT
help
This module drives the Crystal SoundFusion devices (CS4280/46xx
series) when wired as native sound drivers with AC97 codecs. If
@@ -509,7 +509,7 @@ config SOUND_CS4232
config SOUND_SSCAPE
tristate "Ensoniq SoundScape support"
- depends on SOUND_OSS
+ depends on SOUND_OSS && BROKEN_ON_64BIT
help
Answer Y if you have a sound card based on the Ensoniq SoundScape
chipset. Such cards are being manufactured at least by Ensoniq, Spea
@@ -584,7 +584,7 @@ config SOUND_MSS
config SOUND_MPU401
tristate "MPU-401 support (NOT for SB16)"
- depends on SOUND_OSS
+ depends on SOUND_OSS && BROKEN_ON_64BIT
---help---
Be careful with this question. The MPU401 interface is supported by
all sound cards. However, some natively supported cards have their
@@ -634,7 +634,7 @@ config PAS_JOYSTICK
config SOUND_PSS
tristate "PSS (AD1848, ADSP-2115, ESC614) support"
- depends on SOUND_OSS
+ depends on SOUND_OSS && BROKEN_ON_64BIT
help
Answer Y or M if you have an Orchid SW32, Cardinal DSP16, Beethoven
ADSP-16 or some other card based on the PSS chipset (AD1848 codec +
@@ -720,7 +720,7 @@ config SOUND_YM3812
config SOUND_OPL3SA2
tristate "Yamaha OPL3-SA2 and SA3 based PnP cards"
- depends on SOUND_OSS && OSS_OBSOLETE_DRIVER
+ depends on SOUND_OSS && OSS_OBSOLETE_DRIVER && BROKEN_ON_64BIT
help
Say Y or M if you have a card based on one of these Yamaha sound
chipsets or the "SAx", which is actually a SA3. Read
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 4:55 [PATCH] Introduce BROKEN_ON_64BIT facility Jeff Garzik
@ 2006-10-02 9:51 ` Andi Kleen
2006-10-02 9:54 ` Jeff Garzik
2006-10-02 13:03 ` Alan Cox
2006-10-02 13:52 ` chas williams - CONTRACTOR
2 siblings, 1 reply; 9+ messages in thread
From: Andi Kleen @ 2006-10-02 9:51 UTC (permalink / raw)
To: Jeff Garzik
Cc: chas, netdev, kkeil, kai.germaschewski, isdn4linux, mac,
markus.lidel, samuel, Neela.Kolli, linux-scsi, Greg KH, thomas
Jeff Garzik <jeff@garzik.org> writes:
> Add a broken-on-64bit option, similar to the existing broken-on-smp
> config option. This is just the first pass, marking the obvious
> candidates.
When I had this problem in the past I just used && !64BIT.
How is this new option different?
> config ISDN_CAPI_CAPI20
> tristate "CAPI2.0 /dev/capi support"
> - depends on ISDN_CAPI
> + depends on ISDN_CAPI && BROKEN_ON_64BIT
> help
> This option will provide the CAPI 2.0 interface to userspace
> applications via /dev/capi20. Applications should use the
> @@ -44,7 +44,7 @@ config ISDN_CAPI_CAPIFS
>
> config ISDN_CAPI_CAPIDRV
> tristate "CAPI2.0 capidrv interface support"
> - depends on ISDN_CAPI && ISDN_I4L
> + depends on ISDN_CAPI && ISDN_I4L && BROKEN_ON_64BIT
As discussed earlier ISDN is actually ok.
> diff --git a/drivers/message/i2o/Kconfig b/drivers/message/i2o/Kconfig
> index 6443392..0e135ce 100644
> --- a/drivers/message/i2o/Kconfig
> +++ b/drivers/message/i2o/Kconfig
> @@ -56,7 +56,7 @@ config I2O_EXT_ADAPTEC_DMA64
>
> config I2O_CONFIG
> tristate "I2O Configuration support"
> - depends on I2O
> + depends on I2O && BROKEN_ON_64BIT
> ---help---
> Say Y for support of the configuration interface for the I2O adapters.
AFAIK I2O got fixed too. Do you have any evidence that it is really
broken on 64bit?
-Andi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 9:51 ` Andi Kleen
@ 2006-10-02 9:54 ` Jeff Garzik
2006-10-02 14:19 ` Markus Lidel
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2006-10-02 9:54 UTC (permalink / raw)
To: Andi Kleen
Cc: chas, netdev, kkeil, kai.germaschewski, isdn4linux, mac,
markus.lidel, samuel, Neela.Kolli, linux-scsi, Greg KH, thomas
Andi Kleen wrote:
> Jeff Garzik <jeff@garzik.org> writes:
>
>> Add a broken-on-64bit option, similar to the existing broken-on-smp
>> config option. This is just the first pass, marking the obvious
>> candidates.
>
> When I had this problem in the past I just used && !64BIT.
> How is this new option different?
Same reason why we have CONFIG_BROKEN_ON_SMP separate from CONFIG_SMP.
> AFAIK I2O got fixed too. Do you have any evidence that it is really
> broken on 64bit?
i2o_config did not. Just read the code, it's obvious...
Jeff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 9:54 ` Jeff Garzik
@ 2006-10-02 14:19 ` Markus Lidel
0 siblings, 0 replies; 9+ messages in thread
From: Markus Lidel @ 2006-10-02 14:19 UTC (permalink / raw)
To: Jeff Garzik
Cc: Andi Kleen, chas, netdev, kkeil, kai.germaschewski, isdn4linux,
mac, samuel, Neela.Kolli, linux-scsi, Greg KH, thomas
Hello,
Jeff Garzik wrote:
> Andi Kleen wrote:
>> Jeff Garzik <jeff@garzik.org> writes:
>>> Add a broken-on-64bit option, similar to the existing broken-on-smp
>>> config option. This is just the first pass, marking the obvious
>>> candidates.
>> When I had this problem in the past I just used && !64BIT.
>> How is this new option different?
> Same reason why we have CONFIG_BROKEN_ON_SMP separate from CONFIG_SMP.
>> AFAIK I2O got fixed too. Do you have any evidence that it is really
>> broken on 64bit?
> i2o_config did not. Just read the code, it's obvious...
Although the documentation does say it need fixes, it really doesn't. It
is broken if used with 64-bit DMA addresses, but it does work on 64-bit
systems.
Best regards,
Markus Lidel
------------------------------------------
Markus Lidel (Senior IT Consultant)
Shadow Connect GmbH
Carl-Reisch-Weg 12
D-86381 Krumbach
Germany
Phone: +49 82 82/99 51-0
Fax: +49 82 82/99 51-11
E-Mail: Markus.Lidel@shadowconnect.com
URL: http://www.shadowconnect.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 4:55 [PATCH] Introduce BROKEN_ON_64BIT facility Jeff Garzik
2006-10-02 9:51 ` Andi Kleen
@ 2006-10-02 13:03 ` Alan Cox
2006-10-02 13:52 ` chas williams - CONTRACTOR
2 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2006-10-02 13:03 UTC (permalink / raw)
To: Jeff Garzik
Cc: Andrew Morton, LKML, chas, netdev, kkeil, kai.germaschewski,
isdn4linux, mac, markus.lidel, samuel, Neela.Kolli, linux-scsi,
Greg KH, thomas, ak
Ar Llu, 2006-10-02 am 00:55 -0400, ysgrifennodd Jeff Garzik:
> Add a broken-on-64bit option, similar to the existing broken-on-smp
> config option. This is just the first pass, marking the obvious
> candidates.
NAK. This contains lots of stuff whcih isn't broken in the first place.
(Eg Megaraid works with 32bit config tools not 64bit ones and is
otherwise fine, ISDN is just bogus warnings now swatted)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 4:55 [PATCH] Introduce BROKEN_ON_64BIT facility Jeff Garzik
2006-10-02 9:51 ` Andi Kleen
2006-10-02 13:03 ` Alan Cox
@ 2006-10-02 13:52 ` chas williams - CONTRACTOR
2006-10-02 15:12 ` Alan Cox
2 siblings, 1 reply; 9+ messages in thread
From: chas williams - CONTRACTOR @ 2006-10-02 13:52 UTC (permalink / raw)
To: Jeff Garzik
Cc: Andrew Morton, LKML, netdev, kkeil, kai.germaschewski, isdn4linux,
mac, markus.lidel, samuel, Neela.Kolli, linux-scsi, Greg KH,
thomas, ak
In message <20061002045512.GA8835@havoc.gtf.org>,Jeff Garzik writes:
>Several driver have been marked as dependent on CONFIG_32BIT in the
>past, when they should really be dependent on this new
>CONFIG_BROKEN_ON_64BIT option, because the 32BIT marker was due to bugs
>rather than fundamentals.
some of the drivers in atm are already marked with !64BIT and some
need to be marked. this might be more complete for drivers/atm/Kconfig:
diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig
index cfa5af8..f4e0978 100644
--- a/drivers/atm/Kconfig
+++ b/drivers/atm/Kconfig
@@ -139,7 +139,7 @@ config ATM_ENI_BURST_RX_2W
config ATM_FIRESTREAM
tristate "Fujitsu FireStream (FS50/FS155) "
- depends on PCI && ATM
+ depends on PCI && ATM && BROKEN_ON_64BIT
help
Driver for the Fujitsu FireStream 155 (MB86697) and
FireStream 50 (MB86695) ATM PCI chips.
@@ -149,7 +149,7 @@ config ATM_FIRESTREAM
config ATM_ZATM
tristate "ZeitNet ZN1221/ZN1225"
- depends on PCI && ATM
+ depends on PCI && ATM && BROKEN_ON_64BIT
help
Driver for the ZeitNet ZN1221 (MMF) and ZN1225 (UTP-5) 155 Mbps ATM
adapters.
@@ -173,7 +173,7 @@ # bool ' Enable extended debugging
# fi
config ATM_NICSTAR
tristate "IDT 77201 (NICStAR) (ForeRunnerLE)"
- depends on PCI && ATM && !64BIT
+ depends on PCI && ATM && BROKEN_ON_64BIT
help
The NICStAR chipset family is used in a large number of ATM NICs for
25 and for 155 Mbps, including IDT cards and the Fore ForeRunnerLE
@@ -241,7 +241,7 @@ config ATM_IDT77252_USE_SUNI
config ATM_AMBASSADOR
tristate "Madge Ambassador (Collage PCI 155 Server)"
- depends on PCI && ATM
+ depends on PCI && ATM && BROKEN_ON_64BIT
help
This is a driver for ATMizer based ATM card produced by Madge
Networks Ltd. Say Y (or M to compile as a module named ambassador)
@@ -265,7 +265,7 @@ config ATM_AMBASSADOR_DEBUG
config ATM_HORIZON
tristate "Madge Horizon [Ultra] (Collage PCI 25 and Collage PCI 155 Client)"
- depends on PCI && ATM
+ depends on PCI && ATM && BROKEN_ON_64BIT
help
This is a driver for the Horizon chipset ATM adapter cards once
produced by Madge Networks Ltd. Say Y (or M to compile as a module
@@ -289,7 +289,7 @@ config ATM_HORIZON_DEBUG
config ATM_IA
tristate "Interphase ATM PCI x575/x525/x531"
- depends on PCI && ATM && !64BIT
+ depends on PCI && ATM && BROKEN_ON_64BIT
---help---
This is a driver for the Interphase (i)ChipSAR adapter cards
which include a variety of variants in term of the size of the
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 13:52 ` chas williams - CONTRACTOR
@ 2006-10-02 15:12 ` Alan Cox
2006-10-02 15:18 ` Matthew Wilcox
0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2006-10-02 15:12 UTC (permalink / raw)
To: chas3
Cc: Jeff Garzik, Andrew Morton, LKML, netdev, kkeil,
kai.germaschewski, isdn4linux, mac, markus.lidel, samuel,
Neela.Kolli, linux-scsi, Greg KH, thomas, ak
Ar Llu, 2006-10-02 am 09:52 -0400, ysgrifennodd chas williams -
CONTRACTOR:
> some of the drivers in atm are already marked with !64BIT and some
> need to be marked. this might be more complete for drivers/atm/Kconfig:
This should fix Iphase for one. Some of the others look a lot harder
however
Signed-off-by: Alan Cox <alan@redhat.com>
Binary files linux.vanilla-2.6.18-mm2/drivers/atm/fore200e_mkfirm and linux-2.6.18-mm2/drivers/atm/fore200e_mkfirm differ
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-mm2/drivers/atm/iphase.c linux-2.6.18-mm2/drivers/atm/iphase.c
--- linux.vanilla-2.6.18-mm2/drivers/atm/iphase.c 2006-09-20 04:42:06.000000000 +0100
+++ linux-2.6.18-mm2/drivers/atm/iphase.c 2006-10-02 15:28:51.678220488 +0100
@@ -93,10 +93,6 @@
MODULE_LICENSE("GPL");
-#if BITS_PER_LONG != 32
-# error FIXME: this driver only works on 32-bit platforms
-#endif
-
/**************************** IA_LIB **********************************/
static void ia_init_rtn_q (IARTN_Q *que)
@@ -1408,7 +1404,6 @@
struct abr_vc_table *abr_vc_table;
u16 *vc_table;
u16 *reass_table;
- u16 *ptr16;
int i,j, vcsize_sel;
u_short freeq_st_adr;
u_short *freeq_start;
@@ -1423,14 +1418,15 @@
printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
goto err_out;
}
- iadev->rx_dle_q.start = (struct dle*)dle_addr;
+ iadev->rx_dle_q.start = (struct dle *)dle_addr;
iadev->rx_dle_q.read = iadev->rx_dle_q.start;
iadev->rx_dle_q.write = iadev->rx_dle_q.start;
- iadev->rx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE_ENTRIES);
+ iadev->rx_dle_q.end = (struct dle*)((unsigned long)dle_addr+sizeof(struct dle)*DLE_ENTRIES);
/* the end of the dle q points to the entry after the last
DLE that can be used. */
/* write the upper 20 bits of the start address to rx list address register */
+ /* We know this is 32bit bus addressed so the following is safe */
writel(iadev->rx_dle_dma & 0xfffff000,
iadev->dma + IPHASE5575_RX_LIST_ADDR);
IF_INIT(printk("Tx Dle list addr: 0x%08x value: 0x%0x\n",
@@ -1584,11 +1580,12 @@
Set Packet Aging Interval count register to overflow in about 4 us
*/
writew(0xF6F8, iadev->reass_reg+PKT_TM_CNT );
- ptr16 = (u16*)j;
- i = ((u32)ptr16 >> 6) & 0xff;
- ptr16 += j - 1;
- i |=(((u32)ptr16 << 2) & 0xff00);
+
+ i = (j >> 6) & 0xFF;
+ j += 2 * (j - 1);
+ i |= ((j << 2) & 0xFF00);
writew(i, iadev->reass_reg+TMOUT_RANGE);
+
/* initiate the desc_tble */
for(i=0; i<iadev->num_tx_desc;i++)
iadev->desc_tbl[i].timestamp = 0;
@@ -1911,7 +1908,7 @@
iadev->tx_dle_q.start = (struct dle*)dle_addr;
iadev->tx_dle_q.read = iadev->tx_dle_q.start;
iadev->tx_dle_q.write = iadev->tx_dle_q.start;
- iadev->tx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE_ENTRIES);
+ iadev->tx_dle_q.end = (struct dle*)((unsigned long)dle_addr+sizeof(struct dle)*DLE_ENTRIES);
/* write the upper 20 bits of the start address to tx list address register */
writel(iadev->tx_dle_dma & 0xfffff000,
@@ -2913,7 +2910,7 @@
dev_kfree_skb_any(skb);
return 0;
}
- if ((u32)skb->data & 3) {
+ if ((unsigned long)skb->data & 3) {
printk("Misaligned SKB\n");
if (vcc->pop)
vcc->pop(vcc, skb);
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 15:12 ` Alan Cox
@ 2006-10-02 15:18 ` Matthew Wilcox
2006-10-02 16:21 ` Alan Cox
0 siblings, 1 reply; 9+ messages in thread
From: Matthew Wilcox @ 2006-10-02 15:18 UTC (permalink / raw)
To: Alan Cox
Cc: chas3, Jeff Garzik, Andrew Morton, LKML, netdev, kkeil,
kai.germaschewski, isdn4linux, mac, markus.lidel, samuel,
Neela.Kolli, linux-scsi, Greg KH, thomas, ak
On Mon, Oct 02, 2006 at 04:12:35PM +0100, Alan Cox wrote:
> @@ -1423,14 +1418,15 @@
> printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
> goto err_out;
> }
> - iadev->rx_dle_q.start = (struct dle*)dle_addr;
> + iadev->rx_dle_q.start = (struct dle *)dle_addr;
> iadev->rx_dle_q.read = iadev->rx_dle_q.start;
> iadev->rx_dle_q.write = iadev->rx_dle_q.start;
> - iadev->rx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE_ENTRIES);
> + iadev->rx_dle_q.end = (struct dle*)((unsigned long)dle_addr+sizeof(struct dle)*DLE_ENTRIES);
> /* the end of the dle q points to the entry after the last
> DLE that can be used. */
dle_addr is a bit strange. How about:
+++ b/drivers/atm/iphase.c
@@ -1404,7 +1404,7 @@ static int rx_init(struct atm_dev *dev)
IADEV *iadev;
struct rx_buf_desc __iomem *buf_desc_ptr;
unsigned long rx_pkt_start = 0;
- void *dle_addr;
+ struct dle *dle_addr;
struct abr_vc_table *abr_vc_table;
u16 *vc_table;
u16 *reass_table;
@@ -1423,10 +1423,10 @@ static int rx_init(struct atm_dev *dev)
printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
goto err_out;
}
- iadev->rx_dle_q.start = (struct dle*)dle_addr;
+ iadev->rx_dle_q.start = dle_addr;
iadev->rx_dle_q.read = iadev->rx_dle_q.start;
iadev->rx_dle_q.write = iadev->rx_dle_q.start;
- iadev->rx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE
_ENTRIES);
+ iadev->rx_dle_q.end = dle_addr + DLE_ENTRIES;
/* the end of the dle q points to the entry after the last
DLE that can be used. */
@@ -1884,7 +1884,7 @@ static int tx_init(struct atm_dev *dev)
IADEV *iadev;
struct tx_buf_desc *buf_desc_ptr;
unsigned int tx_pkt_start;
- void *dle_addr;
+ struct dle *dle_addr;
int i;
u_short tcq_st_adr;
u_short *tcq_start;
@@ -1908,10 +1908,10 @@ static int tx_init(struct atm_dev *dev)
printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
goto err_out;
}
- iadev->tx_dle_q.start = (struct dle*)dle_addr;
+ iadev->tx_dle_q.start = dle_addr;
iadev->tx_dle_q.read = iadev->tx_dle_q.start;
iadev->tx_dle_q.write = iadev->tx_dle_q.start;
- iadev->tx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE
_ENTRIES);
+ iadev->tx_dle_q.end = dle_addr + DLE_ENTRIES;
/* write the upper 20 bits of the start address to tx list address regis
ter */
writel(iadev->tx_dle_dma & 0xfffff000,
(whitespace damaged; more for comment than for application).
> - if ((u32)skb->data & 3) {
> + if ((unsigned long)skb->data & 3) {
I suppose it quietens a compiler warning. Doesn't actually fix a bug
though.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Introduce BROKEN_ON_64BIT facility
2006-10-02 15:18 ` Matthew Wilcox
@ 2006-10-02 16:21 ` Alan Cox
0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2006-10-02 16:21 UTC (permalink / raw)
To: Matthew Wilcox
Cc: chas3, Jeff Garzik, Andrew Morton, LKML, netdev, kkeil,
kai.germaschewski, isdn4linux, mac, markus.lidel, samuel,
Neela.Kolli, linux-scsi, Greg KH, thomas, ak
> (whitespace damaged; more for comment than for application).
>
> > - if ((u32)skb->data & 3) {
> > + if ((unsigned long)skb->data & 3) {
>
> I suppose it quietens a compiler warning. Doesn't actually fix a bug
> though.
Right but it does no harm casting it to either so its worth cleaning up.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-10-02 15:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-02 4:55 [PATCH] Introduce BROKEN_ON_64BIT facility Jeff Garzik
2006-10-02 9:51 ` Andi Kleen
2006-10-02 9:54 ` Jeff Garzik
2006-10-02 14:19 ` Markus Lidel
2006-10-02 13:03 ` Alan Cox
2006-10-02 13:52 ` chas williams - CONTRACTOR
2006-10-02 15:12 ` Alan Cox
2006-10-02 15:18 ` Matthew Wilcox
2006-10-02 16:21 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).