NetBSD-Bugs archive

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

Re: kern/57320: ATF test case kernel/t_magic_symlinks:machine_arch fails on RPI02W/evbarm only



The following reply was made to PR kern/57320; it has been noted by GNATS.

From: "David H. Gutteridge" <david%gutteridge.ca@localhost>
To: gnats-bugs%netbsd.org@localhost, mlelstv%serpens.de@localhost, martin%duskware.de@localhost
Cc: 
Subject: Re: kern/57320: ATF test case kernel/t_magic_symlinks:machine_arch
 fails on RPI02W/evbarm only
Date: Wed, 19 Apr 2023 21:59:29 -0400

 On Wed, 2023-04-12 at 08:50 +0000, Michael van Elst wrote:
 > The following reply was made to PR kern/57320; it has been noted by
 > GNATS.
 >=20
 > From: mlelstv%serpens.de@localhost=C2=A0(Michael van Elst)
 > To: gnats-bugs%netbsd.org@localhost
 > Cc:=20
 > Subject: Re: kern/57320: ATF test case
 > kernel/t_magic_symlinks:machine_arch fails on RPI02W/evbarm only
 > Date: Wed, 12 Apr 2023 08:45:54 -0000 (UTC)
 >=20
 > =C2=A0martin%duskware.de@localhost=C2=A0(Martin Husemann) writes:
 > =C2=A0
 > =C2=A0> I am confused. uname -p and -m print hw.machine ("evbarm") and
 > =C2=A0> hw.machine_arch ("earmv6hf") respectively. Those are the values
 > that
 > =C2=A0> the magic symlinks should use too (and I think they do).
 > =C2=A0>=20
 > =C2=A0> Where does the ABI name ("earm") come into play?
 > =C2=A0
 > =C2=A0vfs uses the compile time constant MACHINE_ARCH =3D=3D "earm". It m=
 ight
 > =C2=A0better use the variable machine_arch, but that wouldn't change
 > =C2=A0anything.
 > =C2=A0
 > =C2=A0MACHINE_ARCH is set in arm/param.h, when not overriden by
 > =C2=A0build.sh, the kernel only uses earm, arm, earmeb or armeb.
 > =C2=A0
 > =C2=A0Userland gets more refined values depending on the compiler
 > =C2=A0target.
 > =C2=A0
 > =C2=A0
 > =C2=A0sysctl uses (P)->p_md.md_march, which is initially MACHINE_ARCH
 > =C2=A0but then gets overridden by ep_machine_arch which is the
 > =C2=A0ELF_NOTE_MARCH_NAME of the executable currently running.
 > =C2=A0
 > =C2=A0Displaying notes found in: .note.netbsd.march
 > =C2=A0=C2=A0 Owner=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Data size=C2=A0=C2=A0=C2=A0=C2=A0=C2=
 =A0=C2=A0=C2=A0 Description
 > =C2=A0=C2=A0 NetBSD=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0x00000009=C2=A0=C2=A0=C2=A0=C2=A0=C2=
 =A0 MARCH <earmv6hf>
 > =C2=A0
 > =C2=A0
 > =C2=A0Changing vfs to use PROC_MACHINE_ARCH(p) might help, but
 > =C2=A0PROC_MACHINE_ARCH is a MD thing (arm + mips). sysctl defaults
 > =C2=A0to use machine_arch if the arch doesn't define the macro.
 
 Thanks, Michael, that's what I was alluding to without giving any useful
 details. :) I imagine given that magic symlinks are not enabled by
 default and that what's happening here is contrary to documentation and
 what someone would probably prefer in order for it to be useful on these
 specific architectures, change here is probably not controversial?
 
 Dave
 


Home | Main Index | Thread Index | Old Index