Introduce BROKEN_ON_64BIT facility
Subsystems (9)
PATCH 1/1 Introduce BROKEN_ON_64BIT facility
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.
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(-)
drivers/atm/Kconfig +1 -1
@@ -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.
drivers/char/ftape/Kconfig +1 -1
@@ -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
drivers/isdn/capi/Kconfig +2 -2
@@ -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
drivers/isdn/hardware/eicon/Kconfig +1 -1
@@ -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.
drivers/isdn/hisax/Kconfig +1 -0
@@ -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
drivers/message/i2o/Kconfig +1 -1
@@ -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
drivers/net/irda/Kconfig +1 -1
@@ -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
drivers/scsi/megaraid/Kconfig.megaraid +1 -1
@@ -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
drivers/usb/misc/sisusbvga/Kconfig +1 -1
@@ -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.
init/Kconfig +5 -0
@@ -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
sound/oss/Kconfig +5 -5
@@ -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
Quoted 3 lines · 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.
When I had this problem in the past I just used && !64BIT. How is this new option different?
drivers/isdn/capi/Kconfig config ISDN_CAPI_CAPIFS · line 47
Quoted 13 lines
config
ISDN_CAPI_CAPI20drivers/isdn/capi/Kconfig +2
-2tristate "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.
drivers/message/i2o/Kconfig config I2O_EXT_ADAPTEC_DMA64 · line 61
Quoted 12 lines
drivers/message/i2o/Kconfig +1
-1@@ -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
Quoted 8 lines · Andi Kleen
Quoted 3 lines · 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.
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.
Quoted 2 lines
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
Hello,
Quoted 11 lines · Jeff Garzik
Quoted 6 lines · Andi Kleen
Quoted 3 lines · 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.
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_SMPseparate fromCONFIG_SMP.Quoted 2 lines
AFAIK I2O got fixed too. Do you have any evidence that it is really broken on 64bit?
i2o_configdid 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: [email protected] URL: http://www.shadowconnect.com
Ar Llu, 2006-10-02 am 00:55 -0400, ysgrifennodd Jeff Garzik:
Quoted 3 lines
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)
Quoted 4 lines · In message <[email protected]>,Jeff Garzik writes:
Several driver have been marked as dependent on
CONFIG_32BITin the past, when they should really be dependent on this newCONFIG_BROKEN_ON_64BIToption, 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:
drivers/atm/Kconfig +6 -6
@@ -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
Ar Llu, 2006-10-02 am 09:52 -0400, ysgrifennodd chas williams - CONTRACTOR:
Quoted 2 lines
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
Binary files linux.vanilla-2.6.18-mm2/drivers/atm/fore200e_mkfirm and linux-2.6.18-mm2/drivers/atm/fore200e_mkfirm differ
drivers/atm/iphase.c +10 -13
@@ -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);
drivers/atm/iphase.c line 1426
Quoted 12 lines · Alan Cox
drivers/atm/iphase.c +2
-2@@ -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).
drivers/atm/iphase.c line 2913
Quoted 2 lines
drivers/atm/iphase.c +1
-1-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.
Quoted 7 lines
(whitespace damaged; more for comment than for application).
drivers/atm/iphase.c line 2913
Quoted 2 lines
drivers/atm/iphase.c +1
-1-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.