All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Greg Ungerer <gerg@linux-m68k.org>
Cc: "Linux/m68k" <linux-m68k@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 1/3] m68knommu: fix undefined reference to `mach_get_rtc_pll'
Date: Tue, 24 May 2022 09:49:28 +0200	[thread overview]
Message-ID: <CAMuHMdV+k4kGv+vKSGNnwhKCk3eYv5uQd=UgNJQ1HVYxuOUv5g@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdXTn6ysmjg5cr2RvYG=8f3azC1B4v=via0ePua_hv6TgA@mail.gmail.com>

Hi Greg,

On Tue, May 24, 2022 at 9:46 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Wed, May 18, 2022 at 8:56 AM Greg Ungerer <gerg@linux-m68k.org> wrote:
> > 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'
> >
> > There is no definitions of "mach_set_rtc_pll" and "mach_get_rtc_pll" in the
> > nommu code paths. Move these definitions and the associated "mach_hwclk",
> > so that they are around their use case in time.c. This means they will
> > always be defined on the builds that require them, and not on those that
> > cannot use them - such as ColdFire (both with and without MMU enabled).
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
>
> > --- a/arch/m68k/kernel/time.c
> > +++ b/arch/m68k/kernel/time.c
> > @@ -82,6 +86,11 @@ void read_persistent_clock64(struct timespec64 *ts)
> >  #endif
> >
> >  #if IS_ENABLED(CONFIG_RTC_DRV_GENERIC)
> > +int (*mach_get_rtc_pll)(struct rtc_pll_info *);
> > +int (*mach_set_rtc_pll)(struct rtc_pll_info *);
> > +EXPORT_SYMBOL(mach_get_rtc_pll);
> > +EXPORT_SYMBOL(mach_set_rtc_pll);
>
> Oops, this causes build failures for Q40 with CONFIG_RTC_DRV_GENERIC=n,
> as arch/m68k/q40/config.c uses mach_]gs]et_rtc_pll() unconditionally.

I think the simplest solution is to move these up, next to mach_hwclk.

>
> > +
> >  static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm)
> >  {
> >         mach_hwclk(0, tm);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2022-05-24  7:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  6:56 [PATCH 0/3] m68k: build fixes and cleanup Greg Ungerer
2022-05-18  6:56 ` [PATCH 1/3] m68knommu: fix undefined reference to `mach_get_rtc_pll' Greg Ungerer
2022-05-18  8:38   ` Geert Uytterhoeven
2022-05-18 12:26   ` Arnd Bergmann
2022-05-24  7:46   ` Geert Uytterhoeven
2022-05-24  7:49     ` Geert Uytterhoeven [this message]
2022-05-24 14:01       ` Greg Ungerer
2022-05-18  6:56 ` [PATCH 2/3] m68k: removed unused "mach_get_ss" Greg Ungerer
2022-05-18  8:39   ` Geert Uytterhoeven
2022-05-18 12:24   ` Arnd Bergmann
2022-05-18  6:56 ` [PATCH 3/3] m68knommu: fix 68000 CPU link with no platform selected Greg Ungerer
2022-05-18  9:20   ` Geert Uytterhoeven
2022-05-18 13:18     ` 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='CAMuHMdV+k4kGv+vKSGNnwhKCk3eYv5uQd=UgNJQ1HVYxuOUv5g@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=gerg@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 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.