scsi/initio: section mismatches with HOTPLUG=n
PATCH 1/1 scsi/initio: section mismatches with HOTPLUG=n
From: Randy Dunlap <[email protected]>
WARNING: drivers/scsi/initio.o - Section mismatch: reference to .init.data: from .text between 'i91u_detect' (at offset 0x26e8) and 'i91uSCBPost'
WARNING: drivers/scsi/initio.o - Section mismatch: reference to .init.data:i91u_pci_devices from .text between 'i91u_detect' (at offset 0x26ef) and 'i91uSCBPost'
--- drivers/scsi/initio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/initio.c +1 -1
@@ -170,7 +170,7 @@ static int setup_debug = 0;static void i91uSCBPost (BYTE * pHcb,BYTE * pScb);/* PCI Devices supported by this driver */ -static struct pci_device_id i91u_pci_devices[]__devinitdata = { +static struct pci_device_id i91u_pci_devices[] = { {PCI_VENDOR_ID_INIT ,I950_DEVICE_ID ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, {PCI_VENDOR_ID_INIT ,I940_DEVICE_ID ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 }, {PCI_VENDOR_ID_INIT ,I935_DEVICE_ID ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 },
---
Quoted 4 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
WARNING:
drivers/scsi/initio.o- Section mismatch: reference to .init.data: from .text between 'i91u_detect' (at offset0x26e8) and 'i91uSCBPost'
WARNING:drivers/scsi/initio.o- Section mismatch: reference to .init.data:i91u_pci_devices from .text between 'i91u_detect' (at offset0x26ef) and 'i91uSCBPost'
Hmm, this apparently got into the tree unreviewed via Ben Collins:
commit 012887327875915f76a6208e81fe0d67a682ec15
Author: Ben Collins <[email protected]> Date: Wed Oct 18 08:40:57 2006 -0400
[initio] Add pci dev table for module auto loading.
Ben, for future reference, would you send SCSI patches over the SCSI list, please. Secondly, do you intend to complete this change? What Randy proposes will restore the driver to its original state. However, it could also be fixed properly by adding __devinit to all the relevant PCI initialisation routines, which would be preferable.
James
Quoted 14 lines · James Bottomley
Quoted 4 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
WARNING:
drivers/scsi/initio.o- Section mismatch: reference to .init.data: from .text between 'i91u_detect' (at offset0x26e8) and 'i91uSCBPost'
WARNING:drivers/scsi/initio.o- Section mismatch: reference to .init.data:i91u_pci_devices from .text between 'i91u_detect' (at offset0x26ef) and 'i91uSCBPost'Hmm, this apparently got into the tree unreviewed via Ben Collins:
commit
012887327875915f76a6208e81fe0d67a682ec15Author: Ben Collins <[email protected]> Date: Wed Oct 18 08:40:57 2006 -0400[initio] Add pci dev table for module auto loading.
Quoted 7 lines
Signed-off-by Ben Collins <[email protected]>Ben, for future reference, would you send SCSI patches over the SCSI list, please. Secondly, do you intend to complete this change? What Randy proposes will restore the driver to its original state. However, it could also be fixed properly by adding
__devinitto all the relevant PCI initialisation routines, which would be preferable.
The patch went in with about half a dozen others for similar changes, so it was a group set.
Sorry about the mismatches. I've only been building with HOTPLUG=y.
I can do a patch if you want, just let me know.
Quoted 6 lines · Ben Collins
The patch went in with about half a dozen others for similar changes, so it was a group set.
Sorry about the mismatches. I've only been building with HOTPLUG=y.
I can do a patch if you want, just let me know.
Well, I was sort of hoping you weren't just randomly introducing __devinitdata but had all the necessary support patches for converting the driver to hotplug. However, if that's not the case, the safest thing to do is remove the section annotation ... I don't think anyone cares enough about this driver to convert it fully and test it.
James
Quoted 6 lines · James Bottomley
Quoted 5 lines · Ben Collins
The patch went in with about half a dozen others for similar changes, so it was a group set.
Sorry about the mismatches. I've only been building with HOTPLUG=y.
Quoted 7 lines
Quoted 1 line
I can do a patch if you want, just let me know.
Well, I was sort of hoping you weren't just randomly introducing
__devinitdatabut had all the necessary support patches for converting the driver to hotplug. However, if that's not the case, the safest thing to do is remove the section annotation ... I don't think anyone cares enough about this driver to convert it fully and test it.
The MODULE_DEV_TABLE was added so userspace has an easier time loading a driver for the device, without special rules. It wasn't meant to make the driver hot-pluggable. I think the idea that a module alias is just for hotplug is a little short-sighted.
Quoted 5 lines · Ben Collins
The
MODULE_DEV_TABLEwas added so userspace has an easier time loading a
driver for the device, without special rules. It wasn't meant to make the driver hot-pluggable. I think the idea that a module alias is just for hotplug is a little short-sighted.
The module device table isn't the problem. The problem is the fact that you marked the table __devinitdata. __devinitdata is a sectional marking that causes the table to be placed in a discardable init data section for CONFIG_HOTPLUG=n. However, the routines accessing it still occur in the standard text segment hence the mismatch. If you want to mark data __devinitdata, you have to ensure that all the routines accessing it are marked __devinit.
James
Quoted 7 lines · James Bottomley
Quoted 5 lines · Ben Collins
The
MODULE_DEV_TABLEwas added so userspace has an easier time loading a
driver for the device, without special rules. It wasn't meant to make the driver hot-pluggable. I think the idea that a module alias is just for hotplug is a little short-sighted.
Quoted 7 lines
The module device table isn't the problem. The problem is the fact that you marked the table
__devinitdata.__devinitdatais a sectional marking that causes the table to be placed in a discardable init data section forCONFIG_HOTPLUG=n. However, the routines accessing it still occur in the standard text segment hence the mismatch. If you want to mark data__devinitdata, you have to ensure that all the routines accessing it are marked__devinit.
I know what the section is :) I wasn't aware that it was causing a problem with HOTPLUG=n. I'll get a patch to fix it up.