Port-m68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New pmap status update



> On Nov 29, 2025, at 1:17 PM, Jason Thorpe <thorpej%me.com@localhost> wrote:
> 
> 
> 
>> On Nov 29, 2025, at 9:46 AM, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> wrote:
>> 
>> - On HP9000/319C (68020+68851) and 330 NEWPMAP with RAS patch kernel
>>  boots (i.e. shows kernel messages), but even 10.1 GENERIC (i.e. with
>>  traditional pmap_motorola.c) cannot start /bin/sh:
>>  (maybe more CAS instruction issue?)
> 
> The problem is that other atomic_*() functions use the CAS instruction, as well, because CAS is the only one that provides the intended atomicity.  Some rework of libkern’s atomics is needed.

Ok, I have pushed a modified version of your NO_CAS patch and also made a tweak to pmap_motorola.c to avoid the atomic functions that use CAS under the covers.  I’d like to pull those change into netbsd-11 possibly, if they work on your 313 / 330 with the old pmap.

I’ve also made changes to the new pmap to avoid CAS-using atomics as well, except for the one place where atomic_cas_uint() is used, because on hp300 that will now use the restartable atomic sequence implementation per your NO_CAS patch.  I prefer to keep using atomic_cas_uint() there because the 68030 and 68040 manuals clearly state that both of those CPUs also use the indivisible R-M-W cycles during MMU table walks (to update the U and M bits).

-- thorpej



Home | Main Index | Thread Index | Old Index