From nobody Wed Mar 23 15:34:31 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 00C7C11D5BD3 for ; Wed, 23 Mar 2022 15:45:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.gq1.yahoo.com (sonic305-20.consmr.mail.gq1.yahoo.com [98.137.64.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KNt3r1dLKz4yX4 for ; Wed, 23 Mar 2022 15:45:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1648050337; bh=/xSrbxUvOhrIHrhBK55v1OEtYrFw/jtCDuUVsQSu0ik=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=R4TuLh96IpL9wH1GCxKPSTg9lnFR5xV+qN1HxZZuSPScPIpJpRTC5xd3hxNPhBu49X2cNmwtz7/WCqLEhMg1RdWBa+LCLOmxEQG9e7R0s4jeUFewi3De0hCfobGeQIQil1F7EB3ksuycihHbFN8KcASerQlao6zOPeOLUZUMJgFkOxIWLNAA6gJ7nVT+haGhpLlJERUBOK5It/3kXL3mpP16OsK3/ytaJMp5roP00+QqkzKQaNjWj5MptQbUuHPI6146COrMIv5xjZTMgjOwmLj+90CYL87LObNJs5E9hvV0+wO1PF6xnjxuh2CT6PAYX6Op+ANKLxc2DEt6jQyy4g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1648050337; bh=Fhigjci8vjp76DWdm49Ju9bhb30+feBj+PpEcO+KJ1w=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=LBFliILLMaA+r2Su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jsJRC01hTu4lj wN.weqLJCOougoUmb83M7xV_EidsKruT3NNEprsT0tw_Z02ATSrsN2OPCtsPRaFAF9IOmr8Rj65J Au1S5ftwThBSZ89YcVCKGqIpsKCvEODGjkZlc_amORgfC6FJ8P2.ezinqrWOMV.phwXW.YwLTUiP M_O7y1M_FF9cxALNkYKj46jRSZnOrTdSg.W0hSxUr0F6Qez2_hxJSLsV6RO06CHY1RGbsdsUC8CB ZSGSnDdGpMiw5.fCFwWp6DQQr4911dx_Bl.7kDHY9.K.Q.JgcndEt_SwANJPI5zK_kXaL2mjGSQS dtrmXKTI.pO2rAqqkwgIUSacIviFcsXWHZTYLRJ0F0p1F97xQfILiGUyiyOy0MAIo5TY9fvBQFgy iOX3c320E24QOwC4rLa1E7JcIi2JwK6.oBfJkapzqcVdNYLmt6ufAflmXcJDIz83i.lSso6RgiM1 RcHcbbkaACfv6MvuEp6JvBp20m_QlWxfKDknR7zoyZqklyWkbALTG6aEzE4QiSbKbIpb68874OX. 7MfPMKEBp_F_enI.rIEbHHoTEyHtCqy91tvkI6NyTuC6ieRAqf_raXfbc2g-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Wed, 23 Mar 2022 15:45:37 +0000 Received: by hermes--canary-production-bf1-665cdb9985-x6p65 (VZM Hermes SMTP Server) with ESMTPA ID 13a231051e4e31f703dcdf29d14c6090; Wed, 23 Mar 2022 15:34:34 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: /usr/src/sys/net/if_epair.c:181:6: error: ... From: Mark Millard In-Reply-To: <4782B40F-EEB3-4051-A345-FE73708C51E4@FreeBSD.org> Date: Wed, 23 Mar 2022 08:34:31 -0700 Cc: "grembo@freebsd.org" , Free BSD Content-Transfer-Encoding: quoted-printable Message-Id: References: <20220323012657.GA82109@www.zefox.net> <43A846B1-4AD4-48C7-ADAB-82D1CAFF6DDB@yahoo.com> <3049B57B-CDEC-4EE8-A33D-97B833BB4A78@yahoo.com> <4782B40F-EEB3-4051-A345-FE73708C51E4@FreeBSD.org> To: Kristof Provost , bob prohaska X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4KNt3r1dLKz4yX4 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=R4TuLh96; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.83:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.83:from]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On 2022-Mar-23, at 03:51, Kristof Provost wrote: > Hi Mark, Hello. > On 23 Mar 2022, at 4:23, Mark Millard wrote: >> On 2022-Mar-22, at 20:16, Mark Millard wrote: >>=20 >>> [Trying again after getting material from the wrong >>> commit the first time.] >>>=20 >>> On 2022-Mar-22, at 18:26, bob prohaska wrote: >>>=20 >>>> A Pi2 running >>>> FreeBSD www.zefox.net 12.3-STABLE FreeBSD 12.3-STABLE r371495 = GENERIC arm >>>>=20 >>>> stops buildkernel with: >>>> --- if_epair.o --- >>>> /usr/src/sys/net/if_epair.c:181:6: error: implicit declaration of = function 'atomic_testandclear_long' is invalid in C99 = [-Werror,-Wimplicit-function-declaration] >>>> if (atomic_testandclear_long(&q->state, BIT_MBUF_QUEUED)) >>>> ^ >>>>=20 >>>> Not sure if this is specific to the Raspberry Pi 2, it didn't show = up on a pair of Pi3's >>>> and a single Pi4. The system is still using svnlite, info reports >>>> root@www:/usr/src # svnlite info >>>> Path: . >>>> Working Copy Root Path: /usr/src >>>> URL: svn://svn.freebsd.org/base/stable/12 >>>> Relative URL: ^/stable/12 >>>> Repository Root: svn://svn.freebsd.org/base >>>> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f >>>> Revision: 371771 >>>> Node Kind: directory >>>> Schedule: normal >>>> Last Changed Author: 0mp >>>> Last Changed Rev: 371771 >>>> Last Changed Date: 2022-03-22 15:28:40 -0700 (Tue, 22 Mar 2022) >>>>=20 >>>>=20 >>>> Didn't see anything similar on bugs.freebsd.org, if it's worth a = bug report or >>>> there's a workaround please post. It was built using WITH_META_MODE = if that >>>> matters. >>>=20 >>> QUOTE >>> author Kristof Provost 2022-03-17 = 02:35:13 +0000 >>> committer Kristof Provost 2022-03-20 = 00:25:06 +0000 >>> commit b1a3f8dccb6203036b7ee81201fd5b5a8de36f0d (patch) >>> . . . >>> if_epair: build fix >>> 66acf7685b failed to build on riscv (and mips). This is because the >>> atomic_testandset_int() (and friends) functions do not exist there. >>> Happily those platforms do have the long variant, so switch to that. >>> END QUOTE >>>=20 >>> broke things for stable/12 by adding the atomic_testandclear_long >>> usage without defining it as well. >>>=20 >>> It goes like this: >>>=20 >>> path: root/sys/arm/include/atomic.h >>> Commit message (Expand) Author Age Files Lines >>> * MFC r341787 by hselasky: Implement atomic_swap_xxx() for all = platforms. Andriy Gapon 2019-10-24 1 -0/+7 >>> * Remove arm-specific implementations of atomic_load/store_xxx() = now that Ian Lepore 2017-12-20 1 -27/+0 >>> . . . >>>=20 >>> So not updated in a long time. But for armv7 and the like, it = includes: >>>=20 >>> path: root/sys/arm/include/atomic-v6.h >>> Commit message (Expand) Author Age Files Lines >>> * MFC r352938: Ian Lepore 2019-12-07 1 = -100/+256 >>> * MFC r341679: Michal Meloun 2018-12-14 1 -1/+1 >>> . . . >>>=20 >>> Also not updated in a long time. >>>=20 >>> sys/arm/include/atomic-v6.h has various "atomic_testand" >>> examples ( sys/arm/include/atomic.h does not ): >>>=20 >>> atomic_testandset_32 >>> atomic_testandset_int >>> atomic_testandset_long >>> atomic_testandset_64 >>>=20 >>> But no examples of "atomic_testandclear" >>>=20 >>>=20 >>=20 >> The slightly older commit: >>=20 >> QUOTE >> author Michael Gmelin 2022-03-16 = 22:08:55 +0000 >> committer Kristof Provost 2022-03-20 = 00:24:51 +0000 >> commit fb3644ab2afe777fdd2539bc996a390443f052f1 (patch) >> . . . >> if_epair: fix race condition on multi-core systems >> END QUOTE >>=20 >> has a use of "atomic_testandclear_int" as well. >>=20 >>=20 > Thanks for the report. >=20 > Can you try the attached patch? I=E2=80=99m not going to argue with = the MI code about the atomic_testandclear_int, but instead revert the = new if_epair code (in stable/12 only, of course). We will see if Bob P. can try it. (But his builds take time, given the machine type involved.) I'm not set up to build anything for 12. I just looked up what was going on in Bob's report and commented. Ultimately, if needed, I could deal with setting up a temporary context for building stable/12 on aarch64. =3D=3D=3D Mark Millard marklmi at yahoo.com