From: Greg Ungerer <gerg@linux-m68k.org>
To: linux-m68k@vger.kernel.org
Cc: geert@linux-m68k.org, linux-kernel@vger.kernel.org,
arnd@arndb.de, Greg Ungerer <gerg@linux-m68k.org>,
kernel test robot <lkp@intel.com>
Subject: [PATCH] m68knommu: fix undefined reference to `mach_get_rtc_pll'
Date: Fri, 13 May 2022 16:49:52 +1000 [thread overview]
Message-ID: <20220513064952.3610672-1-gerg@linux-m68k.org> (raw)
Configuring for a nommu classic m68k target and enabling the generic rtc
driver (CONFIG_RTC_DRV_GENERIC) will result in the following compile
error:
m68k-linux-ld: arch/m68k/kernel/time.o: in function `rtc_ioctl':
time.c:(.text+0x82): undefined reference to `mach_get_rtc_pll'
m68k-linux-ld: time.c:(.text+0xbc): undefined reference to `mach_set_rtc_pll'
m68k-linux-ld: time.c:(.text+0xf4): undefined reference to `mach_set_rtc_pll'
"mach_set_rtc_pll" and "mach_get_rtc_pll" are only defined in the common
MMU setup code, and are really only implemented in any meaningful way on
classic M68K MMU enabled machines. So conditionally limit their use to
MMU enabled classic M68K systems.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
---
arch/m68k/kernel/time.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 340ffeea0a9d..c8b70b425ada 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -62,7 +62,7 @@ void timer_heartbeat(void)
}
#endif /* CONFIG_HEARTBEAT */
-#ifdef CONFIG_M68KCLASSIC
+#if defined(CONFIG_M68KCLASSIC) && defined(CONFIG_MMU)
#if !IS_BUILTIN(CONFIG_RTC_DRV_GENERIC)
void read_persistent_clock64(struct timespec64 *ts)
{
@@ -140,7 +140,7 @@ static int __init rtc_init(void)
module_init(rtc_init);
#endif /* CONFIG_RTC_DRV_GENERIC */
-#endif /* CONFIG M68KCLASSIC */
+#endif /* CONFIG M68KCLASSIC && CONFIG_MMU */
void __init time_init(void)
{
--
2.25.1
next reply other threads:[~2022-05-13 6:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 6:49 Greg Ungerer [this message]
2022-05-13 7:12 ` Geert Uytterhoeven
2022-05-13 7:48 ` Arnd Bergmann
2022-05-13 12:25 ` Greg Ungerer
2022-05-13 12:59 ` Arnd Bergmann
2022-05-16 6:08 ` Greg Ungerer
2022-05-16 7:15 ` Geert Uytterhoeven
2022-05-17 7:38 ` Greg Ungerer
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=20220513064952.3610672-1-gerg@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=lkp@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®