From: Tony Lindgren <tony@atomide.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq
Date: Mon, 18 Nov 2013 15:21:47 -0800 [thread overview]
Message-ID: <20131118232145.GX10317@atomide.com> (raw)
In-Reply-To: <528A9E8C.9040903@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [131118 15:11]:
> On Monday 18 November 2013 04:58 PM, Tony Lindgren wrote:
> > If CONFIG_SOC_HAS_REALTIME_COUNTER is not selected for omap5
> > or dra7xx, we can get the following error:
> >
> > arch/arm/mach-omap2/built-in.o: In function `omap4_secondary_init':
> > :(.text+0x7ab0): undefined reference to `set_cntfreq'
> >
> > Fix the issue by not trying to initalize the realtime counter
> > unles CONFIG_SOC_HAS_REALTIME_COUNTER is selected.
> >
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> >
> How about a dummy inline function of set_cntfreq() ?
> Having #ifdef in middle of the code looks pretty ugly.
Sure, here's an updated version.
Tony
From: Tony Lindgren <tony@atomide.com>
Date: Mon, 18 Nov 2013 13:56:48 -0800
Subject: [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq
If CONFIG_SOC_HAS_REALTIME_COUNTER is not selected for omap5
or dra7xx, we can get the following error:
arch/arm/mach-omap2/built-in.o: In function `omap4_secondary_init':
:(.text+0x7ab0): undefined reference to `set_cntfreq'
Fix the issue by not trying to initalize the realtime counter
unles CONFIG_SOC_HAS_REALTIME_COUNTER is selected.
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/arch/arm/mach-omap2/omap-secure.h
+++ b/arch/arm/mach-omap2/omap-secure.h
@@ -76,6 +76,13 @@ static inline void omap_barrier_reserve_memblock(void)
{ }
#endif
+#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
void set_cntfreq(void);
+#else
+static inline void set_cntfreq(void)
+{
+}
+#endif
+
#endif /* __ASSEMBLER__ */
#endif /* OMAP_ARCH_OMAP_SECURE_H */
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq
Date: Mon, 18 Nov 2013 15:21:47 -0800 [thread overview]
Message-ID: <20131118232145.GX10317@atomide.com> (raw)
In-Reply-To: <528A9E8C.9040903@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [131118 15:11]:
> On Monday 18 November 2013 04:58 PM, Tony Lindgren wrote:
> > If CONFIG_SOC_HAS_REALTIME_COUNTER is not selected for omap5
> > or dra7xx, we can get the following error:
> >
> > arch/arm/mach-omap2/built-in.o: In function `omap4_secondary_init':
> > :(.text+0x7ab0): undefined reference to `set_cntfreq'
> >
> > Fix the issue by not trying to initalize the realtime counter
> > unles CONFIG_SOC_HAS_REALTIME_COUNTER is selected.
> >
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> >
> How about a dummy inline function of set_cntfreq() ?
> Having #ifdef in middle of the code looks pretty ugly.
Sure, here's an updated version.
Tony
From: Tony Lindgren <tony@atomide.com>
Date: Mon, 18 Nov 2013 13:56:48 -0800
Subject: [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq
If CONFIG_SOC_HAS_REALTIME_COUNTER is not selected for omap5
or dra7xx, we can get the following error:
arch/arm/mach-omap2/built-in.o: In function `omap4_secondary_init':
:(.text+0x7ab0): undefined reference to `set_cntfreq'
Fix the issue by not trying to initalize the realtime counter
unles CONFIG_SOC_HAS_REALTIME_COUNTER is selected.
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/arch/arm/mach-omap2/omap-secure.h
+++ b/arch/arm/mach-omap2/omap-secure.h
@@ -76,6 +76,13 @@ static inline void omap_barrier_reserve_memblock(void)
{ }
#endif
+#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
void set_cntfreq(void);
+#else
+static inline void set_cntfreq(void)
+{
+}
+#endif
+
#endif /* __ASSEMBLER__ */
#endif /* OMAP_ARCH_OMAP_SECURE_H */
next prev parent reply other threads:[~2013-11-18 23:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 21:58 [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq Tony Lindgren
2013-11-18 21:58 ` Tony Lindgren
2013-11-18 23:11 ` Santosh Shilimkar
2013-11-18 23:11 ` Santosh Shilimkar
2013-11-18 23:21 ` Tony Lindgren [this message]
2013-11-18 23:21 ` Tony Lindgren
2013-11-19 0:04 ` Santosh Shilimkar
2013-11-19 0:04 ` Santosh Shilimkar
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=20131118232145.GX10317@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.