Re: Merge majors.{arm32,aarch64} into single file (Re: CVS commit: src/sys/arch/evbarm/conf)
On 19/08/2018 01:02, Rin Okuyama wrote: Oops, I forgot to CC to source-changes-d@. [snip] On 2018/08/19 3:48, matthew green wrote: can't we make arm and arm64 use the identical majors file? please! Diff between majors.arm32 and aarch64 reads [snip] - ctcom was added by matt@ back in 2014, but no one uses it now - vchiq is a device of RPI, not still supported in aarch64 mode - zynquart is a device of Xilinx Zynq boards, whose 64bit models are not currently supported It seems harmless to add these devices in majors.aarch64. Therefore, I propose: (1) rename majors.arm32 to majors.arm (2) remove majors.aarch64 (3) make everyone include majors.arm I will commit if there's no objection. rin I support the goal of a single majors file for both arm and aarch64, but when I tried to do this I found problems in MAKEDEV generation or similar. I forget the exact details. Nick
Merge majors.{arm32,aarch64} into single file (Re: CVS commit: src/sys/arch/evbarm/conf)
Oops, I forgot to CC to source-changes-d@. Forwarded Message Subject: Merge majors.{arm32,aarch64} into single file (Re: CVS commit: src/sys/arch/evbarm/conf) To: matthew green Cc: Jared McNeill , Nick Hudson , Ryo Shimizu From: Rin Okuyama Date: Sun, 19 Aug 2018 08:57:53 +0900 On 2018/08/19 3:48, matthew green wrote: can't we make arm and arm64 use the identical majors file? please! Diff between majors.arm32 and aarch64 reads --- arm/conf/majors.arm32 2015-04-24 08:22:51.0 +0900 +++ aarch64/conf/majors.aarch64 2015-04-24 08:22:51.0 +0900 @@ -1,4 +1,4 @@ -# $NetBSD: majors.arm32,v 1.37 2015/04/23 23:22:51 pgoyette Exp $ +# $NetBSD: majors.aarch64,v 1.2 2015/04/23 23:22:51 pgoyette Exp $ # # Device majors for arm32 # @@ -91,7 +91,6 @@ device-major irframe char 95 irframedrv device-major cir char 96 cir device-major radio char 97 radio -device-major ctcom char 98 ctcom device-major kttcp char 99 kttcp device-major ixpcom char 100ixpcom device-major sysmon char 101sysmon @@ -105,8 +104,7 @@ device-major tslcd char 108tslcd device-major twe char 109twe device-major nsmbchar 110nsmb -device-major vchiq char 111vchiq -device-major zynquartchar 112zynquart +#device-major vchiq char 111vchiq # Majors up to 143 are reserved for machine-dependent drivers. # New machine-independent driver majors are assigned in - ctcom was added by matt@ back in 2014, but no one uses it now - vchiq is a device of RPI, not still supported in aarch64 mode - zynquart is a device of Xilinx Zynq boards, whose 64bit models are not currently supported It seems harmless to add these devices in majors.aarch64. Therefore, I propose: (1) rename majors.arm32 to majors.arm (2) remove majors.aarch64 (3) make everyone include majors.arm I will commit if there's no objection. rin
Re: CVS commit: src/sys/arch/evbarm/conf
On 2018/08/19 1:11, Jason Thorpe wrote: On Aug 18, 2018, at 8:49 AM, Rin Okuyama wrote: ... "ifdef" statements refer "attrtab", whose entries are not normalized to lower-case. Therefore, "ifdef arm32" becomes false even if we have "options ARM32", as I wrote in the previous message: http://mail-index.netbsd.org/source-changes-d/2018/08/18/msg010463.html Well, this is a very confusing behavior of config(1). We should normalize everything to lower-case, provided no one depends on this behavior... Well, interestingly enough, this works (of course): # files common to arm32 implementations filearch/arm/arm32/arm32_machdep.c arm32 filearch/arm/arm32/bus_dma.carm32 . . . I'm a little confused why "ifdef" would reference the attrtab, though...it seems like it should be looking at the options / flags table. (It's been a long time since I was deep in the bowels of config(1), though, so entirely possible that something drastic has changed while I wasn't paying attention...) Well, config(1) has too many tables that have similar roles. This problem was pointed in usr.bin/config/TODO: https://nxr.netbsd.org/xref/src/usr.bin/config/TODO#344 Overhaul should be made by someone sometime ;-), although it must be a tough work that affects too wide a range... rin
re: CVS commit: src/sys/arch/evbarm/conf
can't we make arm and arm64 use the identical majors file? please! .mrg.
Re: CVS commit: src/sys/arch/evbarm/conf
> On Aug 18, 2018, at 8:49 AM, Rin Okuyama wrote: > > On 2018/08/19 0:06, Jason Thorpe wrote: >>> On 2018/08/18 20:08, Rin Okuyama wrote: Ah, then it should be "if ARM32". It was "if arm32" in rev. 1.31. >>> >>> Sorry, not 1.31 but 1.30. >> That's because all options are normalized to lower-case. > > Oops, not "if" but "ifdef". > > "ifdef" statements refer "attrtab", whose entries are not normalized to > lower-case. Therefore, "ifdef arm32" becomes false even if we have > "options ARM32", as I wrote in the previous message: > > http://mail-index.netbsd.org/source-changes-d/2018/08/18/msg010463.html > > Well, this is a very confusing behavior of config(1). We should normalize > everything to lower-case, provided no one depends on this behavior... Well, interestingly enough, this works (of course): # files common to arm32 implementations filearch/arm/arm32/arm32_machdep.c arm32 filearch/arm/arm32/bus_dma.carm32 . . . I'm a little confused why "ifdef" would reference the attrtab, though...it seems like it should be looking at the options / flags table. (It's been a long time since I was deep in the bowels of config(1), though, so entirely possible that something drastic has changed while I wasn't paying attention...) -- thorpej
Re: CVS commit: src/lib/libc/arch/aarch64/softfloat
>On Sat, Aug 11, 2018 at 10:06:41AM +, Ryo Shimizu wrote: >> Module Name: src >> Committed By:ryo >> Date:Sat Aug 11 10:06:41 UTC 2018 >> >> Modified Files: >> src/lib/libc/arch/aarch64/softfloat: qp.c >> >> Log Message: >> fix multiple definition of __{ge,lt,gt,le,eq,ne,unordt}tf2 in libc and >> libgcc. >> this fixes the ATF call_once_static, call_once2_static, cxxruntime_static, >> static_destructor_static. >This seems just wrong. libgcc shouldn't provide them IMO. >Side question, this likely should be replaced with comparetf2.c and >friends in libc/compiler_rt/Makefile. s/libgcc/libc/ ? I see. then, is it enough to just remove __{ge,lt,gt,le,eq,ne,unordt}tf2 from libc? currently, clang seems to link libgcc. -- ryo shimizu
Re: CVS commit: src/sys/arch/evbarm/conf
On Sun, 19 Aug 2018, Rin Okuyama wrote: On 2018/08/18 22:41, Jared McNeill wrote: Not sure I understand this change. arm32 should be defined on 32-bit evbarm platforms via std.evbarm. If arm32 is not defined, I wouldn't expect a kernel to link as there are dependencies on it in arch/arm/conf/files.arm as well. No "arm32" is not defined. arch/arm/conf/files.arm is included because of "machine evbarm arm" lines in std.* files for 32bit machines. On the other hand, for 64bit machines, Thanks, I understand the issue now.
Re: CVS commit: src/sys/arch/evbarm/conf
On 2018/08/19 0:06, Jason Thorpe wrote: On 2018/08/18 20:08, Rin Okuyama wrote: Ah, then it should be "if ARM32". It was "if arm32" in rev. 1.31. Sorry, not 1.31 but 1.30. That's because all options are normalized to lower-case. Oops, not "if" but "ifdef". "ifdef" statements refer "attrtab", whose entries are not normalized to lower-case. Therefore, "ifdef arm32" becomes false even if we have "options ARM32", as I wrote in the previous message: http://mail-index.netbsd.org/source-changes-d/2018/08/18/msg010463.html Well, this is a very confusing behavior of config(1). We should normalize everything to lower-case, provided no one depends on this behavior... rin
Re: CVS commit: src/sys/arch/evbarm/conf
On 2018/08/18 22:41, Jared McNeill wrote: Not sure I understand this change. arm32 should be defined on 32-bit evbarm platforms via std.evbarm. If arm32 is not defined, I wouldn't expect a kernel to link as there are dependencies on it in arch/arm/conf/files.arm as well. No "arm32" is not defined. arch/arm/conf/files.arm is included because of "machine evbarm arm" lines in std.* files for 32bit machines. On the other hand, for 64bit machines, arch/aarch64/conf/files.aarch64 is used because of "machine evbarm aarch64". Actually, with files.evbarm rev 1.30, we observe % ktrace config RPI2 && kdump | grep NAMI | grep 'majors\.' Build directory is ../compile/RPI2 Don't forget to run "make depend" 21972 1 config NAMI "../../../../arch/aarch64/conf/majors.aarch64" On the other hand, with files.evbarm rev 1.31, we have % ktrace config RPI2 && kdump | grep NAMI | grep 'majors\.' Build directory is ../compile/RPI2 Don't forget to run "make depend" 6856 1 config NAMI "../../../../arch/arm/conf/majors.arm32" On Sat, 18 Aug 2018, Rin Okuyama wrote: Module Name: src Committed By: rin Date: Sat Aug 18 09:29:45 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: files.evbarm Log Message: Fix a bug introduced in the previous revision; We don't define arm32 anywhere, and majors.aarch64 is used unconditionally. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/conf/files.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/evbarm/conf
> On Aug 18, 2018, at 7:59 AM, Rin Okuyama wrote: > > On 2018/08/18 20:08, Rin Okuyama wrote: >> Ah, then it should be "if ARM32". It was "if arm32" in rev. 1.31. > > Sorry, not 1.31 but 1.30. That's because all options are normalized to lower-case. -- thorpej
Re: CVS commit: src/sys/arch/evbarm/conf
On 2018/08/18 20:08, Rin Okuyama wrote: Ah, then it should be "if ARM32". It was "if arm32" in rev. 1.31. Sorry, not 1.31 but 1.30. On 2018/08/18 18:51, Nick Hudson wrote: On 18/08/2018 10:29, Rin Okuyama wrote: Module Name: src Committed By: rin Date: Sat Aug 18 09:29:45 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: files.evbarm Log Message: Fix a bug introduced in the previous revision; We don't define arm32 anywhere, and majors.aarch64 is used unconditionally. sys/arch/evbarm/conf/std.evbarm:options ARM32 ?
Re: CVS commit: src/sys/arch/evbarm/conf
Not sure I understand this change. arm32 should be defined on 32-bit evbarm platforms via std.evbarm. If arm32 is not defined, I wouldn't expect a kernel to link as there are dependencies on it in arch/arm/conf/files.arm as well. On Sat, 18 Aug 2018, Rin Okuyama wrote: Module Name:src Committed By: rin Date: Sat Aug 18 09:29:45 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: files.evbarm Log Message: Fix a bug introduced in the previous revision; We don't define arm32 anywhere, and majors.aarch64 is used unconditionally. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/conf/files.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/evbarm/conf
Ah, then it should be "if ARM32". It was "if arm32" in rev. 1.31. On 2018/08/18 18:51, Nick Hudson wrote: On 18/08/2018 10:29, Rin Okuyama wrote: Module Name: src Committed By: rin Date: Sat Aug 18 09:29:45 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: files.evbarm Log Message: Fix a bug introduced in the previous revision; We don't define arm32 anywhere, and majors.aarch64 is used unconditionally. sys/arch/evbarm/conf/std.evbarm:options ARM32 ?
Re: CVS commit: src/sys/arch/evbarm/conf
On 18/08/2018 10:29, Rin Okuyama wrote: Module Name:src Committed By: rin Date: Sat Aug 18 09:29:45 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: files.evbarm Log Message: Fix a bug introduced in the previous revision; We don't define arm32 anywhere, and majors.aarch64 is used unconditionally. sys/arch/evbarm/conf/std.evbarm:options ARM32 ?