public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: Fix crashes with hotplug serverworks
@ 2005-06-20 20:21 Alan Cox
  2005-06-21  6:52 ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2005-06-20 20:21 UTC (permalink / raw)
  To: Linux Kernel Mailing List, akpm

You can't install the base kernel on a Stratus box because of the
overuse of __init. Affects both IDE layers identically. It isn't the
only misuser of __init so more review of other drivers (or fixing
ide_register code to know about hotplug v non-hotplug chipsets) would be
good.

Signed-off-by: Alan Cox <alan@redhat.com>
Original issue found by Stratus and their patch was the inspiration for
this trivial one.

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.12/drivers/ide/pci/serverworks.c linux-2.6.12/drivers/ide/pci/serverworks.c
--- linux.vanilla-2.6.12/drivers/ide/pci/serverworks.c	2005-06-19 11:30:47.000000000 +0100
+++ linux-2.6.12/drivers/ide/pci/serverworks.c	2005-06-20 20:45:50.000000000 +0100
@@ -442,7 +442,7 @@
 	return (dev->irq) ? dev->irq : 0;
 }
 
-static unsigned int __init ata66_svwks_svwks (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif)
 {
 	return 1;
 }
@@ -454,7 +454,7 @@
  * Bit 14 clear = primary IDE channel does not have 80-pin cable.
  * Bit 14 set   = primary IDE channel has 80-pin cable.
  */
-static unsigned int __init ata66_svwks_dell (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks_dell (ide_hwif_t *hwif)
 {
 	struct pci_dev *dev = hwif->pci_dev;
 	if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
@@ -472,7 +472,7 @@
  *
  * WARNING: this only works on Alpine hardware!
  */
-static unsigned int __init ata66_svwks_cobalt (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks_cobalt (ide_hwif_t *hwif)
 {
 	struct pci_dev *dev = hwif->pci_dev;
 	if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN &&
@@ -483,7 +483,7 @@
 	return 0;
 }
 
-static unsigned int __init ata66_svwks (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif)
 {
 	struct pci_dev *dev = hwif->pci_dev;
 
@@ -573,7 +573,7 @@
 	return ide_setup_pci_device(dev, d);
 }
 
-static int __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
 {
 	if (!(PCI_FUNC(dev->devfn) & 1)) {
 		d->bootable = NEVER_BOARD;


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH: Fix crashes with hotplug serverworks
  2005-06-20 20:21 PATCH: Fix crashes with hotplug serverworks Alan Cox
@ 2005-06-21  6:52 ` Christoph Hellwig
  2005-06-21  8:25   ` Bartlomiej Zolnierkiewicz
  2005-06-21  9:33   ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2005-06-21  6:52 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel Mailing List, akpm

On Mon, Jun 20, 2005 at 09:21:13PM +0100, Alan Cox wrote:
> You can't install the base kernel on a Stratus box because of the
> overuse of __init. Affects both IDE layers identically. It isn't the
> only misuser of __init so more review of other drivers (or fixing
> ide_register code to know about hotplug v non-hotplug chipsets) would be
> good.

Well, because of fake-hotplug we really need to mark every ->probe routine
and what's called from it __devinit.  Debian has patch to do that forever
but Bart refused to take it.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH: Fix crashes with hotplug serverworks
  2005-06-21  6:52 ` Christoph Hellwig
@ 2005-06-21  8:25   ` Bartlomiej Zolnierkiewicz
  2005-06-21  9:33   ` Alan Cox
  1 sibling, 0 replies; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-06-21  8:25 UTC (permalink / raw)
  To: Christoph Hellwig, Alan Cox, Linux Kernel Mailing List, akpm

On 6/21/05, Christoph Hellwig <hch@infradead.org> wrote:
> On Mon, Jun 20, 2005 at 09:21:13PM +0100, Alan Cox wrote:
> > You can't install the base kernel on a Stratus box because of the
> > overuse of __init. Affects both IDE layers identically. It isn't the
> > only misuser of __init so more review of other drivers (or fixing
> > ide_register code to know about hotplug v non-hotplug chipsets) would be
> > good.
> 
> Well, because of fake-hotplug we really need to mark every ->probe routine
> and what's called from it __devinit.  Debian has patch to do that forever
> but Bart refused to take it.

If you care to respin your big patch it I'll gladly take it.
It is indeed needed for PCI hotplug.

Bartlomiej

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH: Fix crashes with hotplug serverworks
  2005-06-21  6:52 ` Christoph Hellwig
  2005-06-21  8:25   ` Bartlomiej Zolnierkiewicz
@ 2005-06-21  9:33   ` Alan Cox
  2005-06-21  9:59     ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 8+ messages in thread
From: Alan Cox @ 2005-06-21  9:33 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Linux Kernel Mailing List, akpm

On Maw, 2005-06-21 at 07:52, Christoph Hellwig wrote:
> Well, because of fake-hotplug we really need to mark every ->probe routine
> and what's called from it __devinit.  Debian has patch to do that forever
> but Bart refused to take it.

I'm not surprised from our experience either.

Actually marking all the devices __devinit may be overkill. One approach
that does also seem to work is passing "hotplug yes/no" information when
registering the driver. This is then used to run the ide scan at boot
and avoid registering that driver with the PCI core for hotplug.

A move to __devinit is certainly simpler.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH: Fix crashes with hotplug serverworks
  2005-06-21  9:33   ` Alan Cox
@ 2005-06-21  9:59     ` Bartlomiej Zolnierkiewicz
  2005-06-21 11:16       ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-06-21  9:59 UTC (permalink / raw)
  To: Alan Cox; +Cc: Christoph Hellwig, Linux Kernel Mailing List, akpm

On 6/21/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Maw, 2005-06-21 at 07:52, Christoph Hellwig wrote:
> > Well, because of fake-hotplug we really need to mark every ->probe routine
> > and what's called from it __devinit.  Debian has patch to do that forever
> > but Bart refused to take it.
> 
> I'm not surprised from our experience either.

Get a life.

> Actually marking all the devices __devinit may be overkill. One approach
> that does also seem to work is passing "hotplug yes/no" information when
> registering the driver. This is then used to run the ide scan at boot
> and avoid registering that driver with the PCI core for hotplug.

* with fake-hotplug driver you always need "hotplug yes"
* these drivers have to be registered with PCI core

> A move to __devinit is certainly simpler.

This is a correct fix.

Bartlomiej

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH: Fix crashes with hotplug serverworks
  2005-06-21  9:59     ` Bartlomiej Zolnierkiewicz
@ 2005-06-21 11:16       ` Alan Cox
  2005-06-21 12:11         ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2005-06-21 11:16 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Christoph Hellwig, Linux Kernel Mailing List, akpm

On Maw, 2005-06-21 at 10:59, Bartlomiej Zolnierkiewicz wrote:
> Get a life.

I think that illustrates the problem with IDE management nicely...


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH: Fix crashes with hotplug serverworks
  2005-06-21 11:16       ` Alan Cox
@ 2005-06-21 12:11         ` Bartlomiej Zolnierkiewicz
  2005-06-21 14:08           ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-06-21 12:11 UTC (permalink / raw)
  To: Alan Cox; +Cc: Christoph Hellwig, Linux Kernel Mailing List, akpm

On 6/21/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Maw, 2005-06-21 at 10:59, Bartlomiej Zolnierkiewicz wrote:
> > Get a life.
> 
> I think that illustrates the problem with IDE management nicely...

Taking my words out of full context is a cheap trick.

The real problem here is your PERSONAL AGENDA against me.
I try to stay focused on TECHNICAL ISSUES while you keep on
your cruciate.  You've became really "difficult" to deal with.

BTW I'm going to apply most (all?) of your patches.

Bartlomiej

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH: Fix crashes with hotplug serverworks
  2005-06-21 12:11         ` Bartlomiej Zolnierkiewicz
@ 2005-06-21 14:08           ` Alan Cox
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Cox @ 2005-06-21 14:08 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Christoph Hellwig, Linux Kernel Mailing List, akpm

On Maw, 2005-06-21 at 13:11, Bartlomiej Zolnierkiewicz wrote:
> I try to stay focused on TECHNICAL ISSUES while you keep on
> your cruciate.  You've became really "difficult" to deal with.

I find the same true in the other direction.

> BTW I'm going to apply most (all?) of your patches.

Glad to hear it. If you make any small changes/fixes in the process
please let me know so I can propogate them back into my tree and also
our vendor release tree.

Thanks

Alan


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-06-21 14:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 20:21 PATCH: Fix crashes with hotplug serverworks Alan Cox
2005-06-21  6:52 ` Christoph Hellwig
2005-06-21  8:25   ` Bartlomiej Zolnierkiewicz
2005-06-21  9:33   ` Alan Cox
2005-06-21  9:59     ` Bartlomiej Zolnierkiewicz
2005-06-21 11:16       ` Alan Cox
2005-06-21 12:11         ` Bartlomiej Zolnierkiewicz
2005-06-21 14:08           ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox