From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Stephen Zhang <starzhangzsd@gmail.com>,
liam.howlett@oracle.com, ebiederm@xmission.com, alobakin@pm.me,
f.fainelli@gmail.com, paul@crapouillou.net, linux@roeck-us.net,
anemo@mba.ocn.ne.jp, zhangshida@kylinos.cn,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org
Subject: Re: [PATCH v2] MIPS: undefine and redefine cpu_has_fpu when it is overrided
Date: Fri, 29 Apr 2022 16:11:38 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.2.21.2204291559490.9383@angie.orcam.me.uk> (raw)
In-Reply-To: <20220429095104.GA11365@alpha.franken.de>
On Fri, 29 Apr 2022, Thomas Bogendoerfer wrote:
> > diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
> > index de8cb2ccb781..38eb469008b6 100644
> > --- a/arch/mips/include/asm/cpu-features.h
> > +++ b/arch/mips/include/asm/cpu-features.h
> > @@ -134,6 +134,10 @@
> > # endif
> > #else
> > # define raw_cpu_has_fpu cpu_has_fpu
> > +# ifndef CONFIG_MIPS_FP_SUPPORT
> > +# undef cpu_has_fpu
> > +# define cpu_has_fpu 0
> > +# endif
> > #endif
> > #ifndef cpu_has_32fpr
> > #define cpu_has_32fpr __isa_ge_or_opt(1, MIPS_CPU_32FPR)
> > --
> > 2.30.2
>
> I prefer just removing the #defines from ip27/ip30 cpu-feasture-overrides.h.
> Or isn't that enough for fixing the problem ?
That's what I've meant, and I have now posted fixes, successfully
build-tested.
Additionally I've thought of adding something like:
#if cpu_has_fpu
# undef cpu_has_fpu
#endif
or maybe even:
#if cpu_has_fpu
# error "Forcing `cpu_has_fpu' to non-zero is not supported"
#endif
to arch/mips/include/asm/cpu-features.h, but maybe that's an overkill.
Maciej
next prev parent reply other threads:[~2022-04-29 15:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 3:26 [PATCH v2] MIPS: undefine and redefine cpu_has_fpu when it is overrided Stephen Zhang
2022-04-29 9:19 ` Maciej W. Rozycki
2022-04-29 9:51 ` Thomas Bogendoerfer
2022-04-29 15:11 ` Maciej W. Rozycki [this message]
2022-04-30 3:36 ` Stephen Zhang
2022-04-30 15:38 ` Maciej W. Rozycki
2022-05-01 2:54 ` Stephen Zhang
2022-05-01 11:31 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.2204291559490.9383@angie.orcam.me.uk \
--to=macro@orcam.me.uk \
--cc=alobakin@pm.me \
--cc=anemo@mba.ocn.ne.jp \
--cc=ebiederm@xmission.com \
--cc=f.fainelli@gmail.com \
--cc=liam.howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=paul@crapouillou.net \
--cc=starzhangzsd@gmail.com \
--cc=tsbogend@alpha.franken.de \
--cc=zhangshida@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).