Re: [PATCH 08/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver

2018-06-06 Thread Finn Thain
On Wed, 6 Jun 2018, Geert Uytterhoeven wrote:

> So 4.17 mac_defconfig won't work on PMU_68K_V1 machines? Perhaps that 
> should be fixed first.
> 

AFAICT there's nothing to fix.

$ grep PMU arch/m68k/configs/mac_defconfig 
CONFIG_ADB_PMU68K=y

This works fine for PMU_68K_V2 machines. But if you try to boot a 
PMU_68K_V1 machine, you will have trouble starting the kernel. Sometimes 
you can boot by fiddling with ADB devices, but not always. This is not a 
new problem. The via-pmu68k driver has never worked on PMU_68K_V1 
machines.

So as far as PMU_68K_V1 is concerned, there's no need to bisect any of the 
changes under review. To answer your question, "Shouldn't that be a 
separate patch?", all I can say is "not to my knowledge". But I'm probably 
missing something.

-- 


Re: [PATCH 08/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver

2018-06-06 Thread Geert Uytterhoeven
Hi Finn,

On Wed, Jun 6, 2018 at 8:57 AM, Finn Thain  wrote:
> On Mon, 4 Jun 2018, Geert Uytterhoeven wrote:
>> > Don't call pmu_shutdown() or pmu_restart() on early PowerBooks: the
>> > PMU device found in these PowerBooks isn't supported.
>>
>> Shouldn't that be a separate patch?
>>
>> > --- a/arch/m68k/mac/misc.c
>> > +++ b/arch/m68k/mac/misc.c
>>
>> > @@ -477,9 +445,8 @@ void mac_poweroff(void)
>> >macintosh_config->adb_type == MAC_ADB_CUDA) {
>> > cuda_shutdown();
>> >  #endif
>> > -#ifdef CONFIG_ADB_PMU68K
>> > -   } else if (macintosh_config->adb_type == MAC_ADB_PB1
>> > -   || macintosh_config->adb_type == MAC_ADB_PB2) {
>> > +#ifdef CONFIG_ADB_PMU
>> > +   } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
>> > pmu_shutdown();
>> >  #endif
>> > }
>> > @@ -519,9 +486,8 @@ void mac_reset(void)
>> >macintosh_config->adb_type == MAC_ADB_CUDA) {
>> > cuda_restart();
>> >  #endif
>> > -#ifdef CONFIG_ADB_PMU68K
>> > -   } else if (macintosh_config->adb_type == MAC_ADB_PB1
>> > -   || macintosh_config->adb_type == MAC_ADB_PB2) {
>> > +#ifdef CONFIG_ADB_PMU
>> > +   } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
>> > pmu_restart();
>> >  #endif
>> > } else if (CPU_IS_030) {
>>
>
> The stability problem here is bigger than just pmu_restart() and
> pmu_shutdown(), so those hunks are insufficient. You need to prevent the
> via-pmu68k driver from loading in the first place and to drop all the
> PMU_68K_V1 cases.
>
> But splitting this patch in that way creates potential merge conflicts,
> which is a hassle. E.g. this hunk:
>
> -   
> -   switch (macintosh_config->adb_type) {
> -   case MAC_ADB_PB1:
> -   pmu_kind = PMU_68K_V1;
> -   break;
> -   case MAC_ADB_PB2:
> -   pmu_kind = PMU_68K_V2;
> -   break;
> -   default:
> -   pmu_kind = PMU_UNKNOWN;
> -   return -ENODEV;
> -   }
> -   ...
>
> would get split over two patches.
>
> The way I see it, having no PMU driver for PMU_68K_V1 machines is a bug.
> And loading any of the existing PMU drivers on that hardware is also a
> bug. These bugs are equivalent in that either one means you can't use the
> keyboard, trackpad etc. So there's no value in cherry-picking the other
> bug.
>
> If you are using v4.17 on a PMU_68K_V1 machine, you probably already have
> CONFIG_ADB_PMU68K=n. With that config, here's nothing to be gained from
> bisecting these changes.
>
> Does that make sense? Did I overlook other possible reason(s) to split up
> this patch?

So 4.17 mac_defconfig won't work on PMU_68K_V1 machines?
Perhaps that should be fixed first.

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH 08/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver

2018-06-06 Thread Finn Thain
On Mon, 4 Jun 2018, Geert Uytterhoeven wrote:

> 
> > Don't call pmu_shutdown() or pmu_restart() on early PowerBooks: the 
> > PMU device found in these PowerBooks isn't supported.
> 
> Shouldn't that be a separate patch?
> 
> > --- a/arch/m68k/mac/misc.c
> > +++ b/arch/m68k/mac/misc.c
> 
> > @@ -477,9 +445,8 @@ void mac_poweroff(void)
> >macintosh_config->adb_type == MAC_ADB_CUDA) {
> > cuda_shutdown();
> >  #endif
> > -#ifdef CONFIG_ADB_PMU68K
> > -   } else if (macintosh_config->adb_type == MAC_ADB_PB1
> > -   || macintosh_config->adb_type == MAC_ADB_PB2) {
> > +#ifdef CONFIG_ADB_PMU
> > +   } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
> > pmu_shutdown();
> >  #endif
> > }
> > @@ -519,9 +486,8 @@ void mac_reset(void)
> >macintosh_config->adb_type == MAC_ADB_CUDA) {
> > cuda_restart();
> >  #endif
> > -#ifdef CONFIG_ADB_PMU68K
> > -   } else if (macintosh_config->adb_type == MAC_ADB_PB1
> > -   || macintosh_config->adb_type == MAC_ADB_PB2) {
> > +#ifdef CONFIG_ADB_PMU
> > +   } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
> > pmu_restart();
> >  #endif
> > } else if (CPU_IS_030) {
> 

The stability problem here is bigger than just pmu_restart() and 
pmu_shutdown(), so those hunks are insufficient. You need to prevent the 
via-pmu68k driver from loading in the first place and to drop all the 
PMU_68K_V1 cases.

But splitting this patch in that way creates potential merge conflicts, 
which is a hassle. E.g. this hunk:

-   
-   switch (macintosh_config->adb_type) {
-   case MAC_ADB_PB1:
-   pmu_kind = PMU_68K_V1;
-   break;
-   case MAC_ADB_PB2:
-   pmu_kind = PMU_68K_V2;
-   break;
-   default:
-   pmu_kind = PMU_UNKNOWN;
-   return -ENODEV;
-   }
-   ...

would get split over two patches.

The way I see it, having no PMU driver for PMU_68K_V1 machines is a bug. 
And loading any of the existing PMU drivers on that hardware is also a 
bug. These bugs are equivalent in that either one means you can't use the 
keyboard, trackpad etc. So there's no value in cherry-picking the other 
bug.

If you are using v4.17 on a PMU_68K_V1 machine, you probably already have 
CONFIG_ADB_PMU68K=n. With that config, here's nothing to be gained from 
bisecting these changes.

Does that make sense? Did I overlook other possible reason(s) to split up 
this patch?

-- 


Re: [PATCH 08/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver

2018-06-04 Thread Geert Uytterhoeven
Hi Finn,

On Sat, Jun 2, 2018 at 5:27 AM, Finn Thain  wrote:
> Now that the PowerMac via-pmu driver supports m68k PowerBooks,
> switch over to that driver and remove the via-pmu68k driver.

Thanks!

> Don't call pmu_shutdown() or pmu_restart() on early PowerBooks:
> the PMU device found in these PowerBooks isn't supported.

Shouldn't that be a separate patch?

> --- a/arch/m68k/mac/misc.c
> +++ b/arch/m68k/mac/misc.c

> @@ -477,9 +445,8 @@ void mac_poweroff(void)
>macintosh_config->adb_type == MAC_ADB_CUDA) {
> cuda_shutdown();
>  #endif
> -#ifdef CONFIG_ADB_PMU68K
> -   } else if (macintosh_config->adb_type == MAC_ADB_PB1
> -   || macintosh_config->adb_type == MAC_ADB_PB2) {
> +#ifdef CONFIG_ADB_PMU
> +   } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
> pmu_shutdown();
>  #endif
> }
> @@ -519,9 +486,8 @@ void mac_reset(void)
>macintosh_config->adb_type == MAC_ADB_CUDA) {
> cuda_restart();
>  #endif
> -#ifdef CONFIG_ADB_PMU68K
> -   } else if (macintosh_config->adb_type == MAC_ADB_PB1
> -   || macintosh_config->adb_type == MAC_ADB_PB2) {
> +#ifdef CONFIG_ADB_PMU
> +   } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
> pmu_restart();
>  #endif
> } else if (CPU_IS_030) {

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds