Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2024-08-06 Thread John Paul Adrian Glaubitz
Hi,

On Fri, 2019-12-13 at 08:47 +0100, Romain Dolbeau wrote:
> Le jeu. 12 déc. 2019 à 22:40, Andreas Schwab  a écrit :
> > I'm using 4K pages, in case that matters
> 
> Yes it does matter, as it seems to be the difference between "working"
> and "not working" :-)
> Thank you for the config & pointing out the culprit!
> 
> With your config, my machine boots (though it's missing some features
> as the config seems quite tuned).
> 
> Moving from 64k pages to 4k pages on 'my' config (essentially,
> Debian's 5.3 with default values for changes since), my machine boots
> as well & everything seems to work fine.

Just as a heads-up: Starting with kernel 6.10, Debian has now separate kernel
packages for 4k and 64k page support for both ppc64 and ppc64el [1].

So, anyone who has run into this issue in the past has a chance to try again
with kernel 6.10.

Thanks,
Adrian

> [1] 
> https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/changelog?ref_type=heads

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-07 Thread Michel Dänzer
On 2020-01-06 8:11 p.m., Romain Dolbeau wrote:
> 
> Unfortunately I don't have a PCIe OpenFirmware ATI card to test the
> theory further.

FWIW, a non-OF Radeon >= R(V)5xx card should work in Linux (though
obviously won't light up in OF itself or MacOS).


-- 
Earthling Michel Dänzer   |   https://redhat.com
Libre software enthusiast | Mesa and X developer


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-06 Thread Michael Ellerman
"Aneesh Kumar K.V"  writes:
> Romain Dolbeau  writes:
>
>> Le sam. 21 déc. 2019 à 05:31, Aneesh Kumar K.V
>>  a écrit :
>>> I don't have direct access to this system, I have asked if we can get a run
>>> with 64K.
>>
>> OK, thanks! Do you know which model it is? It seems to be working on
>> some systems,
>> but we don't have enough samples to figure out why at this time, I think.
>>
>>> Meanwhile is there a way to find out what caused MachineCheck? more
>>> details on this? I was checking the manual and I don't see any
>>> restrictions w.r.t effective address. We now have very high EA with 64K
>>> page size.
>>
>> Sorry, no idea, completely out of my depth here. I can try some kernel
>> (build, runtime) options and/or patch, but someone will have to tell
>> me what to try,
>> as I have no ideas.
>
>
> Can you try this change.
>
> modified   arch/powerpc/include/asm/book3s/64/mmu-hash.h
> @@ -580,7 +580,7 @@ extern void slb_set_size(u16 size);
>  #if (MAX_PHYSMEM_BITS > MAX_EA_BITS_PER_CONTEXT)
>  #define MAX_KERNEL_CTX_CNT   (1UL << (MAX_PHYSMEM_BITS - 
> MAX_EA_BITS_PER_CONTEXT))
>  #else
> -#define MAX_KERNEL_CTX_CNT   1
> +#define MAX_KERNEL_CTX_CNT   4
>  #endif

Didn't help.

Same crash, here's a previous one OCR'ed from a photo:

Oops: Machine check, sig: 7 [#1]
BE PAGE SIZE-64 MMU-Hash SMP NR_CPUS 4 NUMA PowerMac
Modules linked in:
CPU: PID: 1 Comn: init Tainted: G M 5.5.0-rc4-gcc-8.2.0-00919-g443b9413a05e 
#1465
NIP: c026f528 LR: c0296138 CTR: 
REGS: ce000ffa3d70 TRAP: 0200 Tainted: G M 
(5.5.0-rc-gcc-8.2.0-00919-g443b9413a05e)
MSR: 90109032  CR: 24282048 XER: 
DAR: c00c00612c80 DSISR: 0400 IRQ MASK: 8
GPR00: c02970d0 c001bc343a90 c1399600 c001bc01c800
GPR04: ce01bc39 ce01bc3439d4 c001bc343a9c c001bb4b73b8
GPR08: c001bc32 00612c78 c1442a98 0fe0
GPR12: 7f7f7f7f7f7f7f7f c16a  f7df38c8
GPR16: 0002  ffb14bac f7df5690
GPRZ0: f7df26c4 000d 8000 f7ddfc0c
GPR24: ff9c 0010 0002 c001bc343db8
GPR28: c0296138 c00c00612c78 c001bc39 c001bc01c800
NIP [c000626f528] .kmem_cache_free+8x58/0x140
LR [c0296138] .putname.0x08/0xa
Call Trace:
c001bc343b40 [c0296138] .putname+0x88/0xa0
c001bc343bc0 [c02970d0] .filename_lookup.part.76+0xb0/0x160
ce01bc343d40 [c08000279b20] .do_faccessat+0xe0/0x380
c001bc343e20 [c000a40c] systen_call+0x5c/0x68
Instruction dump:
408201e8 2fa3 419e0080 fb8100c0 fb4100080 fb610088 789d8502 3d22000b
39499498 1d3d0038 ebaa 7fbd4a14  712a0001 40820240 3422001e


cheers



Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-06 Thread Lennart Sorensen
On Mon, Jan 06, 2020 at 08:11:47PM +0100, Romain Dolbeau wrote:
> Interesting idea (and I have a 6600 aka NV43 in there, indeed) but I
> don't think so, as
> a) 'nouveau' works in 4.19 with 64 KiB pages
> b) using "module_blacklist=nouveau" doesn't help, I just tried
> c) my original 'bisect' was probably using 'nouveau' when the kernel
> was booting, so at least some 5.x w/o the offending commit and 64 KiB
> pages is fine
> d) to my untrained eye, the crash happens _before_ nouveau is loaded
> (it seems to me I'm still on the OpenFirmware framebuffer, font change
> occurs later).
> 
> Unfortunately I don't have a PCIe OpenFirmware ATI card to test the
> theory further.
> (... well I _do_ have a Sun XVR-300 ... technically it fits the bill ... )

Oh well.  I guess that means they did fix it for all cards and I just
don't see which change was relevant for the older chips then.

Unless something was missed that only triggers occationally.  That would
be annoying.

-- 
Len Sorensen


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-06 Thread Romain Dolbeau
Le lun. 6 janv. 2020 à 19:54, Lennart Sorensen
 a écrit :
> Is it possible this has to do with nouveau and not supporting 64K page
> size on older nvidia chips?

Interesting idea (and I have a 6600 aka NV43 in there, indeed) but I
don't think so, as
a) 'nouveau' works in 4.19 with 64 KiB pages
b) using "module_blacklist=nouveau" doesn't help, I just tried
c) my original 'bisect' was probably using 'nouveau' when the kernel
was booting, so at least some 5.x w/o the offending commit and 64 KiB
pages is fine
d) to my untrained eye, the crash happens _before_ nouveau is loaded
(it seems to me I'm still on the OpenFirmware framebuffer, font change
occurs later).

Unfortunately I don't have a PCIe OpenFirmware ATI card to test the
theory further.
(... well I _do_ have a Sun XVR-300 ... technically it fits the bill ... )

Cordially,

-- 
Romain Dolbeau


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-06 Thread Lennart Sorensen
On Mon, Jan 06, 2020 at 07:18:30PM +0100, Romain Dolbeau wrote:
> Applied, recompiled with 64 KiB pages, still crashes.
> 
> The backtrace seems more readable this time (and wasn't overwritten by
> something else), bad photo here:
> 

Is it possible this has to do with nouveau and not supporting 64K page
size on older nvidia chips?  My reading of the driver is that only
NV50 and above has implemented support for anything other than 4K pages,
so a geforce 6xxx series that I believe some of the G5 machines had would
be a problem with 64K pages, while those with ATI cards would probably
not have a problem.

Maybe I read the driver changes wrong, but it sure looks like only
NV50/G84 and up got the needed fixes a couple of years ago.

-- 
Len Sorensen


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-06 Thread Romain Dolbeau
Le dim. 5 janv. 2020 à 16:06, Bertrand Dekoninck
 a écrit :
> I can now test on powermac 7,3 (with an ATI card)
> How can I build a deb package of this kernel ? Or is there a package to 
> download somewhere ?

I usually cross-compile on x86-64 from upstream sources. On a Debian
Buster with the powerpc tools installed,
it's just:

#
make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- oldconfig && nice
-19 make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- -j56
bindeb-pkg
#

(alter the -j56 for your own build system). For the dependency, as far
as I remember I only needed "gcc-powerpc64-linux-gnu" and
dependencies. My '.config' is Debian's 5.3 plus default values for
changes - with the exception of 4 KiB pages.

I've also uploaded the working kernel with 4 KiB pages DEB here:
, as it might be easier for a quick test.

Cordially,

-- 
Romain Dolbeau


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-06 Thread Romain Dolbeau
Le lun. 6 janv. 2020 à 15:06, Aneesh Kumar K.V
 a écrit :
> Can you try this change.

Applied, recompiled with 64 KiB pages, still crashes.

The backtrace seems more readable this time (and wasn't overwritten by
something else), bad photo here:


Cordially,

-- 
Romain Dolbeau


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-06 Thread Aneesh Kumar K.V
Romain Dolbeau  writes:

> Le sam. 21 déc. 2019 à 05:31, Aneesh Kumar K.V
>  a écrit :
>> I don't have direct access to this system, I have asked if we can get a run
>> with 64K.
>
> OK, thanks! Do you know which model it is? It seems to be working on
> some systems,
> but we don't have enough samples to figure out why at this time, I think.
>
>> Meanwhile is there a way to find out what caused MachineCheck? more
>> details on this? I was checking the manual and I don't see any
>> restrictions w.r.t effective address. We now have very high EA with 64K
>> page size.
>
> Sorry, no idea, completely out of my depth here. I can try some kernel
> (build, runtime) options and/or patch, but someone will have to tell
> me what to try,
> as I have no ideas.


Can you try this change.

modified   arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -580,7 +580,7 @@ extern void slb_set_size(u16 size);
 #if (MAX_PHYSMEM_BITS > MAX_EA_BITS_PER_CONTEXT)
 #define MAX_KERNEL_CTX_CNT (1UL << (MAX_PHYSMEM_BITS - 
MAX_EA_BITS_PER_CONTEXT))
 #else
-#define MAX_KERNEL_CTX_CNT 1
+#define MAX_KERNEL_CTX_CNT 4
 #endif
 
 #define MAX_VMALLOC_CTX_CNT1


-aneesh


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-05 Thread Bertrand Dekoninck


> Le 14 déc. 2019 à 10:32, Jeroen Diederen  a écrit :
> 
> on my iMac iSight:
> 
> 
> grep CONFIG_PPC.*PAGE config-5.3.0-3-powerpc64 
> # CONFIG_PPC_4K_PAGES is not set
> CONFIG_PPC_64K_PAGES=y
> CONFIG_PPC_PAGE_SHIFT=16
> # CONFIG_PPC_SUBPAGE_PROT is not set
> 
> I can't give you info about the G5 PowerMac 7,3 as it is not my machine.

I can now test on powermac 7,3 (with an ATI card)
How can I build a deb package of this kernel ? Or is there a package to 
download somewhere ?
Bertrand

Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2020-01-05 Thread Romain Dolbeau
Le sam. 21 déc. 2019 à 05:31, Aneesh Kumar K.V
 a écrit :
> I don't have direct access to this system, I have asked if we can get a run
> with 64K.

OK, thanks! Do you know which model it is? It seems to be working on
some systems,
but we don't have enough samples to figure out why at this time, I think.

> Meanwhile is there a way to find out what caused MachineCheck? more
> details on this? I was checking the manual and I don't see any
> restrictions w.r.t effective address. We now have very high EA with 64K
> page size.

Sorry, no idea, completely out of my depth here. I can try some kernel
(build, runtime) options and/or patch, but someone will have to tell
me what to try,
as I have no ideas.

Cordially & Happy New Year!

-- 
Romain Dolbeau


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2019-12-20 Thread Aneesh Kumar K.V
Romain Dolbeau  writes:

> Le jeu. 12 déc. 2019 à 22:40, Andreas Schwab  a écrit :
>> I'm using 4K pages, in case that matters
>
> Yes it does matter, as it seems to be the difference between "working"
> and "not working" :-)
> Thank you for the config & pointing out the culprit!
>
> With your config, my machine boots (though it's missing some features
> as the config seems quite tuned).
>
> Moving from 64k pages to 4k pages on 'my' config (essentially,
> Debian's 5.3 with default values for changes since), my machine boots
> as well & everything seems to work fine.
>
> So question to Aneesh - did you try 64k pages on your G5, or only 4k?
> In the second case, could you try with 64k to see if you can reproduce
> the crash?

I don't have direct access to this system, I have asked if we can get a run
with 64K. 

Meanwhile is there a way to find out what caused MachineCheck? more
details on this? I was checking the manual and I don't see any
restrictions w.r.t effective address. We now have very high EA with 64K
page size. 

-aneesh


Re: PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2019-12-14 Thread Jeroen Diederen
on my iMac iSight:


grep CONFIG_PPC.*PAGE config-5.3.0-3-powerpc64 
# CONFIG_PPC_4K_PAGES is not set
CONFIG_PPC_64K_PAGES=y
CONFIG_PPC_PAGE_SHIFT=16
# CONFIG_PPC_SUBPAGE_PROT is not set

I can't give you info about the G5 PowerMac 7,3 as it is not my machine.

Regards,
Jeroen

On Fri, 13 Dec 2019 08:47:49 +0100
Romain Dolbeau  wrote:

> Le jeu. 12 déc. 2019 à 22:40, Andreas Schwab  a écrit :
> > I'm using 4K pages, in case that matters
> 
> Yes it does matter, as it seems to be the difference between "working"
> and "not working" :-)
> Thank you for the config & pointing out the culprit!
> 
> With your config, my machine boots (though it's missing some features
> as the config seems quite tuned).
> 
> Moving from 64k pages to 4k pages on 'my' config (essentially,
> Debian's 5.3 with default values for changes since), my machine boots
> as well & everything seems to work fine.
> 
> So question to Aneesh - did you try 64k pages on your G5, or only 4k?
> In the second case, could you try with 64k to see if you can reproduce
> the crash?
> 
> To Jeroen - is your iMac booting with 4k or 64k pages? Same question
> for the crashing G5, though I assume the answer is going to be 64k
> there.
> 
> Thanks & cordially,
> 
> -- 
> Romain Dolbeau


-- 
Jeroen Diederen 


PPC64: G5 & 4k/64k page size (was: Re: Call for report - G5/PPC970 status)

2019-12-12 Thread Romain Dolbeau
Le jeu. 12 déc. 2019 à 22:40, Andreas Schwab  a écrit :
> I'm using 4K pages, in case that matters

Yes it does matter, as it seems to be the difference between "working"
and "not working" :-)
Thank you for the config & pointing out the culprit!

With your config, my machine boots (though it's missing some features
as the config seems quite tuned).

Moving from 64k pages to 4k pages on 'my' config (essentially,
Debian's 5.3 with default values for changes since), my machine boots
as well & everything seems to work fine.

So question to Aneesh - did you try 64k pages on your G5, or only 4k?
In the second case, could you try with 64k to see if you can reproduce
the crash?

To Jeroen - is your iMac booting with 4k or 64k pages? Same question
for the crashing G5, though I assume the answer is going to be 64k
there.

Thanks & cordially,

-- 
Romain Dolbeau