From owner-dev-commits-src-main@freebsd.org Wed Jan 20 15:00:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81B824F974A; Wed, 20 Jan 2021 15:00:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DLTGl3Fdpz4tD6; Wed, 20 Jan 2021 15:00:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 5D698774C; Wed, 20 Jan 2021 15:00:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f52.google.com with SMTP id j18so11001120qvu.3; Wed, 20 Jan 2021 07:00:31 -0800 (PST) X-Gm-Message-State: AOAM532UoIAY6r22dO9NggHjWryxKandRCTM6c0UtJaJ+u2Na28NBMLh TAhPNINF3eX95VLmJcnoRQMVh0uwqQKG7A/a+6c= X-Google-Smtp-Source: ABdhPJw93zow2zaa02K+X+kSkg9xbCCt9dDikJUNI4NL/piH3kw+wvMGAoItV9y64lgbw0k0bFJd7A+P4ChsMuFAxus= X-Received: by 2002:a0c:b59a:: with SMTP id g26mr9731043qve.26.1611154830837; Wed, 20 Jan 2021 07:00:30 -0800 (PST) MIME-Version: 1.0 References: <202101140704.10E74KhX070996@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 20 Jan 2021 09:00:17 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: bd72252aace3 - main - [mips] revert r366664 - flip mips back from -O2 to -O To: Adrian Chadd Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Mateusz Guzik , Alex Richardson Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2021 15:00:31 -0000 On Thu, Jan 14, 2021 at 7:26 AM Mateusz Guzik wrote: > > This breaks tinderbox, for example: > > make[5]: "/usr/src/share/mk/sys.mk" line 169: Malformed conditional > (${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc") > make[5]: Fatal errors encountered -- cannot continue > make[5]: stopped in /usr/obj/usr/src/mips.mips64/sys/BERI_NETFPGA_MDROOT > Adrian, ping. Tinderbox has been broken from this for nearly a full week now, and it makes it hard to defend mips when we apparently can't garner up the energy to fix stuff like this in a timely fashion. sys.mk is way too early for checking COMPILER_TYPE, we should either revert back to -O2 or to the previous version entirely by dropping the COMPILER_TYPE check. freebsd-wifi-build can set CFLAGS to override it, so it's tempting to say we should just revert this and you can override CFLAGS in freebsd-wifi-build until you can work out why gcc6 vomits at runtime. Thanks, Kyle Evans > On 1/14/21, Adrian Chadd wrote: > > The branch main has been updated by adrian: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=bd72252aace382921840ddbceea712b96f4ad242 > > > > commit bd72252aace382921840ddbceea712b96f4ad242 > > Author: Adrian Chadd > > AuthorDate: 2021-01-12 21:13:20 +0000 > > Commit: Adrian Chadd > > CommitDate: 2021-01-14 07:03:53 +0000 > > > > [mips] revert r366664 - flip mips back from -O2 to -O > > > > Now that I have -head fitting in 8MB of flash again, I can test > > out freebsd-head on my home AP test setup. Unfortunately, > > the introduction of -O2 in r366664 causes the following infinite > > loop shortly after boot: > > > > ------ > > > > MAP: No valid partition found at map/rootfs.uzip > > Warning: no time-of-day clock registered, system time will not be set > > accurately > > start_init: trying /sbin/init > > BAD_PAGE_FAULT: pid 1 tid 100001 (init), uid 0: pc 0x4042c320 got a read > > fault (type 0x2) at 0x2e3a0 > > Trapframe Register Dump: > > zero: 0 at: 0 v0: 0 v1: 0 > > a0: 0x1af34 a1: 0 a2: 0 a3: 0x7fffeff0 > > t0: 0 t1: 0 t2: 0 t3: 0 > > t4: 0 t5: 0 t6: 0 t7: 0 > > t8: 0 t9: 0x152e8 s0: 0x7fffee84 s1: 0 > > s2: 0 s3: 0 s4: 0 s5: 0 > > s6: 0 s7: 0 k0: 0 k1: 0 > > gp: 0x362c0 sp: 0x7fffedf0 s8: 0 ra: 0x40417df0 > > sr: 0xf413 mullo: 0 mulhi: 0 badvaddr: > > 0x2e3a0 > > cause: 0xffffffff80000008 pc: 0x4042c31c > > Page table info for pc address 0x4042c320: pde = 0x80712000, pte = > > 0xa002065a > > Dumping 4 words starting at pc address 0x4042c320: > > 8f9980e0 80820000 10400067 00809825 > > Page table info for bad address 0x2e3a0: pde = 0, pte = 0 > > > > ------ > > > > I'm not yet sure why, but until I figure it out with the mips64/cheri > > folk this should be reverted. > > > > This should only use -O on GCC generated code for MIPS platforms. > > > > Tested: > > > > * QCA934x (mips74k) - WDR-3600/WDR-4300 APs > > > > Differential Revision: https://reviews.freebsd.org/D28122 > > --- > > share/mk/sys.mk | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/share/mk/sys.mk b/share/mk/sys.mk > > index 8f456b28593a..72f458397683 100644 > > --- a/share/mk/sys.mk > > +++ b/share/mk/sys.mk > > @@ -166,7 +166,14 @@ CC ?= c89 > > CFLAGS ?= -O > > .else > > CC ?= cc > > +.if ${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc" > > +# Note: there are currently issues generating code gcc-6.x targeting > > +# code for at least mips32. The system hits infinite page faults > > +# when starting /sbin/init if -O2 is used. > > +CFLAGS ?= -O -pipe > > +.else > > CFLAGS ?= -O2 -pipe > > +.endif > > .if defined(NO_STRICT_ALIASING) > > CFLAGS += -fno-strict-aliasing > > .endif > > _______________________________________________ > > dev-commits-src-all@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > > To unsubscribe, send any mail to > > "dev-commits-src-all-unsubscribe@freebsd.org" > > > > > -- > Mateusz Guzik