* [PATCH] [TULIP] Fix section mismatch in de2104x.c
@ 2006-10-06 18:12 Matthew Wilcox
2006-10-06 18:03 ` Stephen Hemminger
2006-10-06 18:39 ` Jeff Garzik
0 siblings, 2 replies; 11+ messages in thread
From: Matthew Wilcox @ 2006-10-06 18:12 UTC (permalink / raw)
To: Val Henson; +Cc: netdev, Helge Deller, Kyle McMartin, Matthew Wilcox
From: Helge Deller <deller@parisc-linux.org>
WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .init.text:de_init_one from .data.rel.local after 'de_driver' (at offset 0x20)
WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .exit.text:de_remove_one from .data.rel.local after 'de_driver' (at offset 0x28)
Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
---
drivers/net/tulip/de2104x.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 2cfd963..f6b3a94 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1730,7 +1730,7 @@ static void __init de21040_get_media_inf
}
/* Note: this routine returns extra data bits for size detection. */
-static unsigned __init tulip_read_eeprom(void __iomem *regs, int location, int addr_len)
+static unsigned __devinit tulip_read_eeprom(void __iomem *regs, int location, int addr_len)
{
int i;
unsigned retval = 0;
@@ -1926,7 +1926,7 @@ bad_srom:
goto fill_defaults;
}
-static int __init de_init_one (struct pci_dev *pdev,
+static int __devinit de_init_one (struct pci_dev *pdev,
const struct pci_device_id *ent)
{
struct net_device *dev;
@@ -2082,7 +2082,7 @@ err_out_free:
return rc;
}
-static void __exit de_remove_one (struct pci_dev *pdev)
+static void __devexit de_remove_one (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct de_private *de = dev->priv;
@@ -2164,7 +2164,7 @@ static struct pci_driver de_driver = {
.name = DRV_NAME,
.id_table = de_pci_tbl,
.probe = de_init_one,
- .remove = __exit_p(de_remove_one),
+ .remove = __devexit_p(de_remove_one),
#ifdef CONFIG_PM
.suspend = de_suspend,
.resume = de_resume,
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 18:12 [PATCH] [TULIP] Fix section mismatch in de2104x.c Matthew Wilcox
@ 2006-10-06 18:03 ` Stephen Hemminger
2006-10-06 19:18 ` Jeff Garzik
2006-10-06 18:39 ` Jeff Garzik
1 sibling, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2006-10-06 18:03 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Val Henson, netdev, Helge Deller, Kyle McMartin
On Fri, 06 Oct 2006 12:12:34 -0600
Matthew Wilcox <matthew@wil.cx> wrote:
> From: Helge Deller <deller@parisc-linux.org>
>
> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .init.text:de_init_one from .data.rel.local after 'de_driver' (at offset 0x20)
> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .exit.text:de_remove_one from .data.rel.local after 'de_driver' (at offset 0x28)
This is caused because with PCI hotplug the device might be probed after the init section
has been removed. Ditto for remove.
The fix looks correct.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 18:03 ` Stephen Hemminger
@ 2006-10-06 19:18 ` Jeff Garzik
2006-10-06 19:25 ` Matthew Wilcox
0 siblings, 1 reply; 11+ messages in thread
From: Jeff Garzik @ 2006-10-06 19:18 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Matthew Wilcox, Val Henson, netdev, Helge Deller, Kyle McMartin
Stephen Hemminger wrote:
> On Fri, 06 Oct 2006 12:12:34 -0600
> Matthew Wilcox <matthew@wil.cx> wrote:
>
>> From: Helge Deller <deller@parisc-linux.org>
>>
>> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .init.text:de_init_one from .data.rel.local after 'de_driver' (at offset 0x20)
>> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .exit.text:de_remove_one from .data.rel.local after 'de_driver' (at offset 0x28)
>
> This is caused because with PCI hotplug the device might be probed after the init section
> has been removed. Ditto for remove.
This device will never ever meet a platform where it can be hotplugged.
Jeff
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 19:18 ` Jeff Garzik
@ 2006-10-06 19:25 ` Matthew Wilcox
2006-10-06 19:44 ` Jeff Garzik
0 siblings, 1 reply; 11+ messages in thread
From: Matthew Wilcox @ 2006-10-06 19:25 UTC (permalink / raw)
To: Jeff Garzik
Cc: Stephen Hemminger, Val Henson, netdev, Helge Deller,
Kyle McMartin
On Fri, Oct 06, 2006 at 03:18:33PM -0400, Jeff Garzik wrote:
> Stephen Hemminger wrote:
> >On Fri, 06 Oct 2006 12:12:34 -0600
> >Matthew Wilcox <matthew@wil.cx> wrote:
> >
> >>From: Helge Deller <deller@parisc-linux.org>
> >>
> >>WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
> >>.init.text:de_init_one from .data.rel.local after 'de_driver' (at offset
> >>0x20)
> >>WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
> >>.exit.text:de_remove_one from .data.rel.local after 'de_driver' (at
> >>offset 0x28)
> >
> >This is caused because with PCI hotplug the device might be probed after
> >the init section
> >has been removed. Ditto for remove.
>
> This device will never ever meet a platform where it can be hotplugged.
According to a FreeBSD list from 1995, you could get these chips on a PCI
card from several different vendors.
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=37148+0+archive/1995/freebsd-hardware/19951001.freebsd-hardware
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 19:25 ` Matthew Wilcox
@ 2006-10-06 19:44 ` Jeff Garzik
2006-10-06 19:54 ` Matthew Wilcox
0 siblings, 1 reply; 11+ messages in thread
From: Jeff Garzik @ 2006-10-06 19:44 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Stephen Hemminger, Val Henson, netdev, Helge Deller,
Kyle McMartin
Matthew Wilcox wrote:
> On Fri, Oct 06, 2006 at 03:18:33PM -0400, Jeff Garzik wrote:
>> Stephen Hemminger wrote:
>>> On Fri, 06 Oct 2006 12:12:34 -0600
>>> Matthew Wilcox <matthew@wil.cx> wrote:
>>>
>>>> From: Helge Deller <deller@parisc-linux.org>
>>>>
>>>> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
>>>> .init.text:de_init_one from .data.rel.local after 'de_driver' (at offset
>>>> 0x20)
>>>> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
>>>> .exit.text:de_remove_one from .data.rel.local after 'de_driver' (at
>>>> offset 0x28)
>>> This is caused because with PCI hotplug the device might be probed after
>>> the init section
>>> has been removed. Ditto for remove.
>> This device will never ever meet a platform where it can be hotplugged.
>
> According to a FreeBSD list from 1995, you could get these chips on a PCI
> card from several different vendors.
>
> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=37148+0+archive/1995/freebsd-hardware/19951001.freebsd-hardware
Yes, they are ancient 32-bit PCI cards, which will never make an
appearance on a PCI hotplug platform. So, it's wasteful to support
hotplug in code that will never be hotplugged (as I've said for years).
Jeff
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 19:44 ` Jeff Garzik
@ 2006-10-06 19:54 ` Matthew Wilcox
2006-10-06 20:11 ` Jeff Garzik
0 siblings, 1 reply; 11+ messages in thread
From: Matthew Wilcox @ 2006-10-06 19:54 UTC (permalink / raw)
To: Jeff Garzik
Cc: Stephen Hemminger, Val Henson, netdev, Helge Deller,
Kyle McMartin
On Fri, Oct 06, 2006 at 03:44:30PM -0400, Jeff Garzik wrote:
> Matthew Wilcox wrote:
> >On Fri, Oct 06, 2006 at 03:18:33PM -0400, Jeff Garzik wrote:
> >>This device will never ever meet a platform where it can be hotplugged.
> >
> >According to a FreeBSD list from 1995, you could get these chips on a PCI
> >card from several different vendors.
> >
>
> Yes, they are ancient 32-bit PCI cards, which will never make an
> appearance on a PCI hotplug platform. So, it's wasteful to support
> hotplug in code that will never be hotplugged (as I've said for years).
Sorry, you're saying that anyone who has found one of these cards and
wants to plug them into a hotplug slot in their shiny new server is just
SOL? That makes no sense, Jeff. We've fixed *so* many old drivers to
confirm to these rules, why's this one so special? I'd understand if it
were only found on motherboards, but it can be found on cards.
Plus it silences a warning. Isn't that enough reason of its own?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 19:54 ` Matthew Wilcox
@ 2006-10-06 20:11 ` Jeff Garzik
0 siblings, 0 replies; 11+ messages in thread
From: Jeff Garzik @ 2006-10-06 20:11 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Stephen Hemminger, Val Henson, netdev, Helge Deller,
Kyle McMartin
Matthew Wilcox wrote:
> On Fri, Oct 06, 2006 at 03:44:30PM -0400, Jeff Garzik wrote:
>> Matthew Wilcox wrote:
>>> On Fri, Oct 06, 2006 at 03:18:33PM -0400, Jeff Garzik wrote:
>>>> This device will never ever meet a platform where it can be hotplugged.
>>> According to a FreeBSD list from 1995, you could get these chips on a PCI
>>> card from several different vendors.
>>>
>> Yes, they are ancient 32-bit PCI cards, which will never make an
>> appearance on a PCI hotplug platform. So, it's wasteful to support
>> hotplug in code that will never be hotplugged (as I've said for years).
>
> Sorry, you're saying that anyone who has found one of these cards and
> wants to plug them into a hotplug slot in their shiny new server is just
> SOL? That makes no sense, Jeff. We've fixed *so* many old drivers to
> confirm to these rules, why's this one so special? I'd understand if it
> were only found on motherboards, but it can be found on cards.
>
> Plus it silences a warning. Isn't that enough reason of its own?
Early tulips were electrically "special", so I am highly doubtful it
would work in any case.
But overall it doesn't make sense to me to force code to exist, that we
know will likely never ever be needed.
Whatever. This patch comes up every year or two, so I suppose I should
just quit fighting and eat the needless code size increase, to silence
the human warnings :)
Jeff
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 18:12 [PATCH] [TULIP] Fix section mismatch in de2104x.c Matthew Wilcox
2006-10-06 18:03 ` Stephen Hemminger
@ 2006-10-06 18:39 ` Jeff Garzik
2006-10-06 18:45 ` Matthew Wilcox
2006-10-06 19:25 ` More info on section mismatches (was Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c) Valerie Henson
1 sibling, 2 replies; 11+ messages in thread
From: Jeff Garzik @ 2006-10-06 18:39 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Val Henson, netdev, Helge Deller, Kyle McMartin
Matthew Wilcox wrote:
> From: Helge Deller <deller@parisc-linux.org>
>
> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .init.text:de_init_one from .data.rel.local after 'de_driver' (at offset 0x20)
> WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to .exit.text:de_remove_one from .data.rel.local after 'de_driver' (at offset 0x28)
I'm a bit blind, so help me out here... what precisely is mismatched?
AFAICS everything is properly marked __init or __exit.
Jeff
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 18:39 ` Jeff Garzik
@ 2006-10-06 18:45 ` Matthew Wilcox
2006-10-06 18:50 ` Jeff Garzik
2006-10-06 19:25 ` More info on section mismatches (was Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c) Valerie Henson
1 sibling, 1 reply; 11+ messages in thread
From: Matthew Wilcox @ 2006-10-06 18:45 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Val Henson, netdev, Helge Deller, Kyle McMartin
On Fri, Oct 06, 2006 at 02:39:41PM -0400, Jeff Garzik wrote:
> I'm a bit blind, so help me out here... what precisely is mismatched?
>
> AFAICS everything is properly marked __init or __exit.
Wasn't my patch, but the markings are now consistent with tulip_core at least.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c
2006-10-06 18:45 ` Matthew Wilcox
@ 2006-10-06 18:50 ` Jeff Garzik
0 siblings, 0 replies; 11+ messages in thread
From: Jeff Garzik @ 2006-10-06 18:50 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Val Henson, netdev, Helge Deller, Kyle McMartin
Matthew Wilcox wrote:
> On Fri, Oct 06, 2006 at 02:39:41PM -0400, Jeff Garzik wrote:
>> I'm a bit blind, so help me out here... what precisely is mismatched?
>>
>> AFAICS everything is properly marked __init or __exit.
>
> Wasn't my patch, but the markings are now consistent with tulip_core at least.
That's a totally separate driver :)
These section mismatch warnings occasionally stump me, and this is one
of them. I don't want to ACK it until I know _why_ it is needed...
Jeff
^ permalink raw reply [flat|nested] 11+ messages in thread
* More info on section mismatches (was Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c)
2006-10-06 18:39 ` Jeff Garzik
2006-10-06 18:45 ` Matthew Wilcox
@ 2006-10-06 19:25 ` Valerie Henson
1 sibling, 0 replies; 11+ messages in thread
From: Valerie Henson @ 2006-10-06 19:25 UTC (permalink / raw)
To: Jeff Garzik
Cc: Matthew Wilcox, netdev, Helge Deller, Kyle McMartin,
Richard Henderson, Arjan van de Ven, linux-kernel
On Fri, Oct 06, 2006 at 02:39:41PM -0400, Jeff Garzik wrote:
> Matthew Wilcox wrote:
> >From: Helge Deller <deller@parisc-linux.org>
> >
> >WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
> >.init.text:de_init_one from .data.rel.local after 'de_driver' (at offset
> >0x20)
> >WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
> >.exit.text:de_remove_one from .data.rel.local after 'de_driver' (at offset
> >0x28)
>
> I'm a bit blind, so help me out here... what precisely is mismatched?
>
> AFAICS everything is properly marked __init or __exit.
(Cc'd Richard Henderson as resident gcc guru.)
We're discussing a way to get more information out of section mismatch
reports so that the causes of section mismatches are a little more
obvious. I'd like to see something like:
foo() is marked __init at line 34
bar() calls foo() at line 57
Arjan points out that optimization may make this difficult; I'm happy
with a separate script running at a lower level of optimization that
you can run by hand when one of these warnings shows up.
Ideas?
-VAL
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-10-06 20:11 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 18:12 [PATCH] [TULIP] Fix section mismatch in de2104x.c Matthew Wilcox
2006-10-06 18:03 ` Stephen Hemminger
2006-10-06 19:18 ` Jeff Garzik
2006-10-06 19:25 ` Matthew Wilcox
2006-10-06 19:44 ` Jeff Garzik
2006-10-06 19:54 ` Matthew Wilcox
2006-10-06 20:11 ` Jeff Garzik
2006-10-06 18:39 ` Jeff Garzik
2006-10-06 18:45 ` Matthew Wilcox
2006-10-06 18:50 ` Jeff Garzik
2006-10-06 19:25 ` More info on section mismatches (was Re: [PATCH] [TULIP] Fix section mismatch in de2104x.c) Valerie Henson
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).