Re: [RFC] Fix BUG splat during nubus_driver_register()
Hi Finn, Am 03.05.18 um 12:52 schrieb Finn Thain: >> No need for a Mac test in nubus_proc_init() as it appears to work just >> fine. >> > Yes. I suggested a MACH_IS_MAC() test because zorro_proc_init() has a > similar test. The postcore_initcall() approach retains the MACH_IS_MAC() > test, so as to bypass nubus_proc_init(). Either way is fine with me. OK, that'll eliminate /proc/nubus, and legacy software won't know about /sys/nubus anyway. >> Are we confusing any legacy user space tools that might check for >> presence of /proc/nubus with this patch? > I doubt it. Me too. But I've been wrong before. >> Do you want an alternative patch tested (MACH_IS_MAC() test in >> nubus_driver_register() instead)? >> > The second patch might be worth testing, but I would wait to hear from > Geert before I did so. > Fair enough - your patch fixes the issue, that's what matters. FWIW: Tested-by: Michael Schmitz-- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] Fix BUG splat during nubus_driver_register()
On Thu, 3 May 2018, Michael Schmitz wrote: > Hi Finn, > > with your patch, 4.17rc2 boots again to user space. > OK. > # ls -lrt /sys/bus/nubus/devices/ > total 0 > # cat /proc/bus/nubus/devices > [no output] > > No need for a Mac test in nubus_proc_init() as it appears to work just > fine. > Yes. I suggested a MACH_IS_MAC() test because zorro_proc_init() has a similar test. The postcore_initcall() approach retains the MACH_IS_MAC() test, so as to bypass nubus_proc_init(). Either way is fine with me. > Are we confusing any legacy user space tools that might check for > presence of /proc/nubus with this patch? I doubt it. > Do you want an alternative patch tested (MACH_IS_MAC() test in > nubus_driver_register() instead)? > The second patch might be worth testing, but I would wait to hear from Geert before I did so. -- > Cheers, > > Michael > -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] Fix BUG splat during nubus_driver_register()
Hi Finn, with your patch, 4.17rc2 boots again to user space. # ls -lrt /sys/bus/nubus/devices/ total 0 # cat /proc/bus/nubus/devices [no output] No need for a Mac test in nubus_proc_init() as it appears to work just fine. Are we confusing any legacy user space tools that might check for presence of /proc/nubus with this patch? Do you want an alternative patch tested (MACH_IS_MAC() test in nubus_driver_register() instead)? Cheers, Michael On Wed, May 2, 2018 at 5:42 PM, Michael Schmitzwrote: > Hi Finn, > > I'll try that one - will require a new kernel though, and I can't > currently reach elgar by ssh... > > Quite confident this is the right way to fix the issue. > > Regarding zorro bus drivers - bus_register is called unconditionally > from a core initcall for the Zorro bus code. I suppose it's always > initialized even on ARAnyM. But Geert should know - AFAIR he tests all > his kernels using ARAnyM. > > Cheers, > > Michael > > > Am 02.05.2018 um 16:24 schrieb Finn Thain: >> Please consider the patch below. The approach here is to always register >> the bus type, regardless of platform. >> >> An alternative approach would be to add another MACH_IS_MAC() test to >> nubus_driver_register(). >> >> Arguably this patch should add a MACH_IS_MAC() test in nubus_proc_init(). >> >> BTW, does zorro_register_driver() cause the same failure? What happens if >> you do 'modprobe zorro7xx' on Aranym? >> >> diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c >> index 4621ff98138c..5152dbdb0707 100644 >> --- a/drivers/nubus/nubus.c >> +++ b/drivers/nubus/nubus.c >> @@ -861,6 +861,9 @@ static void __init nubus_scan_bus(void) >> { >> int slot; >> >> + if (!MACH_IS_MAC) >> + return 0; >> + >> pr_info("NuBus: Scanning NuBus slots.\n"); >> for (slot = 9; slot < 15; slot++) { >> nubus_probe_slot(slot); >> @@ -871,9 +874,6 @@ static int __init nubus_init(void) >> { >> int err; >> >> - if (!MACH_IS_MAC) >> - return 0; >> - >> nubus_proc_init(); >> err = nubus_bus_register(); >> if (err) >> -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] Fix BUG splat during nubus_driver_register()
Hi Finn, I'll try that one - will require a new kernel though, and I can't currently reach elgar by ssh... Quite confident this is the right way to fix the issue. Regarding zorro bus drivers - bus_register is called unconditionally from a core initcall for the Zorro bus code. I suppose it's always initialized even on ARAnyM. But Geert should know - AFAIR he tests all his kernels using ARAnyM. Cheers, Michael Am 02.05.2018 um 16:24 schrieb Finn Thain: > Please consider the patch below. The approach here is to always register > the bus type, regardless of platform. > > An alternative approach would be to add another MACH_IS_MAC() test to > nubus_driver_register(). > > Arguably this patch should add a MACH_IS_MAC() test in nubus_proc_init(). > > BTW, does zorro_register_driver() cause the same failure? What happens if > you do 'modprobe zorro7xx' on Aranym? > > diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c > index 4621ff98138c..5152dbdb0707 100644 > --- a/drivers/nubus/nubus.c > +++ b/drivers/nubus/nubus.c > @@ -861,6 +861,9 @@ static void __init nubus_scan_bus(void) > { > int slot; > > + if (!MACH_IS_MAC) > + return 0; > + > pr_info("NuBus: Scanning NuBus slots.\n"); > for (slot = 9; slot < 15; slot++) { > nubus_probe_slot(slot); > @@ -871,9 +874,6 @@ static int __init nubus_init(void) > { > int err; > > - if (!MACH_IS_MAC) > - return 0; > - > nubus_proc_init(); > err = nubus_bus_register(); > if (err) > -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html