From: Tony Lindgren <tony@atomide.com>
To: "Andrew F. Davis" <afd@ti.com>
Cc: kbuild-all@lists.01.org, kbuild test robot <lkp@intel.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Marc Zyngier <maz@kernel.org>,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: omap-secure.c:undefined reference to `__arm_smccc_smc'
Date: Thu, 20 Feb 2020 09:13:05 -0800 [thread overview]
Message-ID: <20200220171305.GL37466@atomide.com> (raw)
In-Reply-To: <20200220163703.GK37466@atomide.com>
* Tony Lindgren <tony@atomide.com> [200220 16:37]:
> * Andrew F. Davis <afd@ti.com> [200220 16:24]:
> > On 2/20/20 11:20 AM, Tony Lindgren wrote:
> > > * Andrew F. Davis <afd@ti.com> [200220 16:04]:
> > >> On 2/20/20 10:54 AM, Tony Lindgren wrote:
> > >>> Andrew,
> > >>>
> > >>> * kbuild test robot <lkp@intel.com> [200213 10:27]:
> > >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > >>>> head: 0bf999f9c5e74c7ecf9dafb527146601e5c848b9
> > >>>> commit: c37baa06f8a970e4a533d41f7d33e5e57de5ad25 ARM: OMAP2+: Fix undefined reference to omap_secure_init
> > >>>> date: 3 weeks ago
> > >>>> config: arm-randconfig-a001-20200213 (attached as .config)
> > >>>> compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
> > >>>> reproduce:
> > >>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >>>> chmod +x ~/bin/make.cross
> > >>>> git checkout c37baa06f8a970e4a533d41f7d33e5e57de5ad25
> > >>>> # save the attached .config to linux build tree
> > >>>> GCC_VERSION=7.5.0 make.cross ARCH=arm
> > >>>>
> > >>>> If you fix the issue, kindly add following tag
> > >>>> Reported-by: kbuild test robot <lkp@intel.com>
> > >>>>
> > >>>> All errors (new ones prefixed by >>):
> > >>>>
> > >>>> arch/arm/mach-omap2/omap-secure.o: In function `omap_smccc_smc':
> > >>>>>> omap-secure.c:(.text+0x94): undefined reference to `__arm_smccc_smc'
> > >>>
> > >>> Have you looked at this one? Looks like there's still an unhandled
> > >>> randconfig build case.
> > >>>
> > >>
> > >>
> > >> I've had a quick look, all the ARM config does:
> > >>
> > >> select HAVE_ARM_SMCCC if CPU_V7
> > >>
> > >> so I don't think this will happen in any real config, but if we want to
> > >> prevent randconfig issue this we could force ARCH_OMAP2PLUS to "depend"
> > >> on it.
> > >
> > > Seems to happen at least with omap2 only config where we don't have
> > > CPU_V7. Something like below seems to fix it.
> > >
> > > If that looks OK to you, I'll send out a proper fix.
> > >
> >
> >
> > This looks fine to me.
> >
> > A better later fix might be to later stub out the actual __arm_smccc_smc
> > in common code if CONFIG_HAVE_ARM_SMCCC is not set, so any platform will
> > get the fix.
>
> Yeah seems that might be better. Adding Aaro and Marc to Cc.
But if we can in theory have some arm11 machine with smccc, then this
local ifdef below is probably the way to go.
Regards,
Tony
> > > 8< -----------------------
> > > diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c
> > > --- a/arch/arm/mach-omap2/omap-secure.c
> > > +++ b/arch/arm/mach-omap2/omap-secure.c
> > > @@ -77,6 +77,7 @@ u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs, u32 arg1, u32 arg2,
> > > return ret;
> > > }
> > >
> > > +#ifdef CONFIG_HAVE_ARM_SMCCC
> > > void omap_smccc_smc(u32 fn, u32 arg)
> > > {
> > > struct arm_smccc_res res;
> > > @@ -85,6 +86,11 @@ void omap_smccc_smc(u32 fn, u32 arg)
> > > 0, 0, 0, 0, 0, 0, &res);
> > > WARN(res.a0, "Secure function call 0x%08x failed\n", fn);
> > > }
> > > +#else
> > > +void omap_smccc_smc(u32 fn, u32 arg)
> > > +{
> > > +}
> > > +#endif
> > >
> > > void omap_smc1(u32 fn, u32 arg)
> > > {
> > >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-02-20 17:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202002131856.VeW4PhBJ%lkp@intel.com>
[not found] ` <20200220155429.GH37466@atomide.com>
[not found] ` <55ddcd29-ed8b-529e-dd54-cbac5cf74e42@ti.com>
[not found] ` <20200220162012.GI37466@atomide.com>
[not found] ` <d7b685b6-16a2-3743-1786-a5240726ed9c@ti.com>
2020-02-20 16:37 ` omap-secure.c:undefined reference to `__arm_smccc_smc' Tony Lindgren
2020-02-20 17:13 ` Tony Lindgren [this message]
2020-02-20 17:39 ` Andrew F. Davis
2020-02-20 17:57 ` Tony Lindgren
2020-02-20 18:11 ` Tony Lindgren
2020-02-20 18:22 ` Andrew F. Davis
2020-02-21 17:26 ` Tony Lindgren
2020-02-21 17:54 ` Tony Lindgren
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=20200220171305.GL37466@atomide.com \
--to=tony@atomide.com \
--cc=aaro.koskinen@iki.fi \
--cc=afd@ti.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lkp@intel.com \
--cc=maz@kernel.org \
/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).