Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Finn Thain
On Tue, 8 May 2018, Geert Uytterhoeven wrote: > nubus_bus_register() two things: > > 1. Register the NuBus parent device, which represents the bus host, > 2. Register the NuBus bus, which represents the bus type. > > I think this should be split in two, and only the latter should be done >

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Michael Schmitz
Hi Greg, Am 08.05.2018 um 19:25 schrieb Greg Kroah-Hartman: > On Tue, May 08, 2018 at 09:07:27AM +0200, Geert Uytterhoeven wrote: >> Hi Greg, >> >> On Tue, May 8, 2018 at 9:00 AM, Greg Kroah-Hartman >> wrote: >>> On Mon, May 07, 2018 at 09:51:12AM +1200, Michael Schmitz wrote: the BUG() was

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Finn Thain
On Tue, 8 May 2018, Geert Uytterhoeven wrote: > > This example is the sort of flag removal that I had in mind -- > > > > diff --git a/drivers/base/driver.c b/drivers/base/driver.c > > index ba912558a510..4ee22fb3db92 100644 > > --- a/drivers/base/driver.c > > +++ b/drivers/base/driver.c > > @@ -14

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Greg Kroah-Hartman
On Tue, May 08, 2018 at 09:35:10AM +0200, Geert Uytterhoeven wrote: > Hi Greg, > > On Tue, May 8, 2018 at 9:25 AM, Greg Kroah-Hartman > wrote: > > On Tue, May 08, 2018 at 09:07:27AM +0200, Geert Uytterhoeven wrote: > >> On Tue, May 8, 2018 at 9:00 AM, Greg Kroah-Hartman > >> wrote: > >> > On Mon

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Geert Uytterhoeven
Hi Finn, On Sun, May 6, 2018 at 3:47 AM, Finn Thain wrote: > Loading a NuBus driver module on a non-NuBus machine triggers the > BUG_ON(!drv->bus->p) in driver_register() because the bus does not get > registered unless MACH_IS_MAC(). Avoid this by registering the bus > unconditionally using post

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Geert Uytterhoeven
Hi Greg, On Tue, May 8, 2018 at 9:25 AM, Greg Kroah-Hartman wrote: > On Tue, May 08, 2018 at 09:07:27AM +0200, Geert Uytterhoeven wrote: >> On Tue, May 8, 2018 at 9:00 AM, Greg Kroah-Hartman >> wrote: >> > On Mon, May 07, 2018 at 09:51:12AM +1200, Michael Schmitz wrote: >> >> the BUG() was trigg

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Greg Kroah-Hartman
On Tue, May 08, 2018 at 09:07:27AM +0200, Geert Uytterhoeven wrote: > Hi Greg, > > On Tue, May 8, 2018 at 9:00 AM, Greg Kroah-Hartman > wrote: > > On Mon, May 07, 2018 at 09:51:12AM +1200, Michael Schmitz wrote: > >> the BUG() was triggered by loading a Mac Nubus network card module on > >> a mul

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Geert Uytterhoeven
Hi Greg, On Tue, May 8, 2018 at 9:00 AM, Greg Kroah-Hartman wrote: > On Mon, May 07, 2018 at 09:51:12AM +1200, Michael Schmitz wrote: >> the BUG() was triggered by loading a Mac Nubus network card module on >> a multiplatform kernel running on an Amiga machine. Up to Finn's Nubus >> core rewrite

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Greg Kroah-Hartman
On Mon, May 07, 2018 at 09:57:22AM +1000, Finn Thain wrote: > On Sun, 6 May 2018, Greg Kroah-Hartman wrote: > > > > > Why not just have an "bus is registered" flag in your driver > > > > register function that refuses to let drivers register with the > > > > driver core if it isn't set? > > > >

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-08 Thread Greg Kroah-Hartman
On Mon, May 07, 2018 at 09:51:12AM +1200, Michael Schmitz wrote: > Hi Greg, > > the BUG() was triggered by loading a Mac Nubus network card module on > a multiplatform kernel running on an Amiga machine. Up to Finn's Nubus > core rewrite (this February), we've seen no errors. Since then, Nubus > d

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-07 Thread Geert Uytterhoeven
Hi Finn, On Tue, May 8, 2018 at 1:44 AM, Finn Thain wrote: > On Mon, 7 May 2018, I wrote: >> On Sun, 6 May 2018, Greg Kroah-Hartman wrote: >> > > > Why not just have an "bus is registered" flag in your driver >> > > > register function that refuses to let drivers register with the >> > > > driver

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-07 Thread Geert Uytterhoeven
Hi Greg, On Mon, May 7, 2018 at 4:45 PM, Greg Kroah-Hartman wrote: > On Mon, May 07, 2018 at 02:53:13PM +0200, Geert Uytterhoeven wrote: >> On Mon, May 7, 2018 at 1:57 AM, Finn Thain >> wrote: >> > On Sun, 6 May 2018, Greg Kroah-Hartman wrote: >> >> > > Why not just have an "bus is registered"

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-07 Thread Finn Thain
On Mon, 7 May 2018, I wrote: > On Sun, 6 May 2018, Greg Kroah-Hartman wrote: > > > > > Why not just have an "bus is registered" flag in your driver > > > > register function that refuses to let drivers register with the > > > > driver core if it isn't set? > > > > > > Perhaps that should happe

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-07 Thread Greg Kroah-Hartman
On Mon, May 07, 2018 at 02:53:13PM +0200, Geert Uytterhoeven wrote: > Hi Finn, > > (responding immediately to patches doing non-kosher things ;-) > > On Mon, May 7, 2018 at 1:57 AM, Finn Thain wrote: > > On Sun, 6 May 2018, Greg Kroah-Hartman wrote: > >> > > Why not just have an "bus is register

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-07 Thread Geert Uytterhoeven
Hi Finn, (responding immediately to patches doing non-kosher things ;-) On Mon, May 7, 2018 at 1:57 AM, Finn Thain wrote: > On Sun, 6 May 2018, Greg Kroah-Hartman wrote: >> > > Why not just have an "bus is registered" flag in your driver >> > > register function that refuses to let drivers regis

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-06 Thread Finn Thain
On Sun, 6 May 2018, Greg Kroah-Hartman wrote: > > > Why not just have an "bus is registered" flag in your driver > > > register function that refuses to let drivers register with the > > > driver core if it isn't set? > > > > Perhaps that should happen in the core driver_register() function. >

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-06 Thread Michael Schmitz
Hi Greg, the BUG() was triggered by loading a Mac Nubus network card module on a multiplatform kernel running on an Amiga machine. Up to Finn's Nubus core rewrite (this February), we've seen no errors. Since then, Nubus drivers fail to register because the Nubus bus is only registered on Macs. Ca

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-06 Thread Greg Kroah-Hartman
On Sun, May 06, 2018 at 04:00:15PM +1000, Finn Thain wrote: > On Sat, 5 May 2018, Greg Kroah-Hartman wrote: > > > On Sun, May 06, 2018 at 11:47:52AM +1000, Finn Thain wrote: > > > Loading a NuBus driver module on a non-NuBus machine triggers the > > > BUG_ON(!drv->bus->p) in driver_register() beca

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-05 Thread Finn Thain
On Sat, 5 May 2018, Greg Kroah-Hartman wrote: > On Sun, May 06, 2018 at 11:47:52AM +1000, Finn Thain wrote: > > Loading a NuBus driver module on a non-NuBus machine triggers the > > BUG_ON(!drv->bus->p) in driver_register() because the bus does not get > > registered unless MACH_IS_MAC(). Avoid th

Re: [PATCH] nubus: Unconditionally register bus type

2018-05-05 Thread Greg Kroah-Hartman
On Sun, May 06, 2018 at 11:47:52AM +1000, Finn Thain wrote: > Loading a NuBus driver module on a non-NuBus machine triggers the > BUG_ON(!drv->bus->p) in driver_register() because the bus does not get > registered unless MACH_IS_MAC(). Avoid this by registering the bus > unconditionally using postc

[PATCH] nubus: Unconditionally register bus type

2018-05-05 Thread Finn Thain
Loading a NuBus driver module on a non-NuBus machine triggers the BUG_ON(!drv->bus->p) in driver_register() because the bus does not get registered unless MACH_IS_MAC(). Avoid this by registering the bus unconditionally using postcore_initcall(). Cc: Greg Kroah-Hartman Reported-by: Michael Schmit