Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 2021 14:26:38 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: bd72252aace3 - main - [mips] revert r366664 - flip mips back from -O2 to -O
Message-ID:  <CAGudoHHQ7-40pjvpwvHxrU5ibuQ_pRb9jSnEFHySWVLcpZMZWg@mail.gmail.com>
In-Reply-To: <202101140704.10E74KhX070996@gitrepo.freebsd.org>
References:  <202101140704.10E74KhX070996@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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

On 1/14/21, Adrian Chadd <adrian@freebsd.org> wrote:
> The branch main has been updated by adrian:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=bd72252aace382921840ddbceea712b96f4ad242
>
> commit bd72252aace382921840ddbceea712b96f4ad242
> Author:     Adrian Chadd <adrian@FreeBSD.org>
> AuthorDate: 2021-01-12 21:13:20 +0000
> Commit:     Adrian Chadd <adrian@FreeBSD.org>
> 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 <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHHQ7-40pjvpwvHxrU5ibuQ_pRb9jSnEFHySWVLcpZMZWg>