All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	linux-kernel@vger.kernel.org, Jiri Kosina <jikos@kernel.org>
Subject: Re: Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h'
Date: Fri, 3 Jun 2016 07:44:55 -0700	[thread overview]
Message-ID: <575197E7.5010201@roeck-us.net> (raw)
In-Reply-To: <4034375.QyTnDIyzuW@wuerfel>

On 06/03/2016 05:11 AM, Arnd Bergmann wrote:
> On Thursday, June 2, 2016 5:58:48 PM CEST Guenter Roeck wrote:
>> Hi Arnd,
>>
>> sparc32:allmodconfig fails to build in next-20160602 as follows.
>>
>> In file included from drivers/block/floppy.c:185:0:
>> include/linux/mc146818rtc.h: In function 'mc146818_is_updating':
>> include/linux/mc146818rtc.h:138:9: error: 'rtc_port' undeclared (first use in this function)
>> include/linux/mc146818rtc.h:138:9: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/mc146818rtc.h: In function 'mc146818_get_time':
>> include/linux/mc146818rtc.h:172:17: error: 'rtc_port' undeclared (first use in this function)
>> include/linux/mc146818rtc.h: In function 'mc146818_set_time':
>> include/linux/mc146818rtc.h:278:8: error: 'rtc_port' undeclared (first use in this function)
>> scripts/Makefile.build:295: recipe for target 'drivers/block/floppy.o' failed
>>
>> Bisect points to commit fd09cc80165c ("rtc: cmos: move mc146818rtc code out of
>> asm-generic/rtc.h"). Bisct log is attached.
>>
>> Note that removing the offending include file works for sparc32 but
>> not for x86; it results in a missing definition of CMOS_READ().
>
> I have trouble reproducing this, but I think the problem here is that there
> are two definitions of CMOS_READ() in sparc, and we pick up the wrong one
> here: there is no 'rtc_port' variable outside of drivers/char/rtc.c, and we
> don't build that file any more on sparc32, so we probably want this patch:
>
> diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
> index 57f26c398dc9..4dd268a3a8b0 100644
> --- a/arch/sparc/include/asm/io_32.h
> +++ b/arch/sparc/include/asm/io_32.h
> @@ -140,16 +140,6 @@ void ioport_unmap(void __iomem *);
>   struct pci_dev;
>   void pci_iounmap(struct pci_dev *dev, void __iomem *);
>
> -
> -
> -/*
> - * At the moment, we do not use CMOS_READ anywhere outside of rtc.c,
> - * so rtc_port is static in it. This should not change unless a new
> - * hardware pops up.
> - */
> -#define RTC_PORT(x)   (rtc_port + (x))
> -#define RTC_ALWAYS_BCD  0
> -
>   static inline int sbus_can_dma_64bit(void)
>   {
>   	return 0; /* actually, sparc_cpu_model==sun4d */
>
>
>
> Can you check if this fixes the problem?
>

Yes, it does. I did test builds with both sparc:allmodconfig and sparc64:allmodconfig
after applying above diff; both passed.

Guenter

  reply	other threads:[~2016-06-03 14:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03  0:58 Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h' Guenter Roeck
2016-06-03 12:11 ` Arnd Bergmann
2016-06-03 14:44   ` Guenter Roeck [this message]
2016-06-03 22:16     ` Alexandre Belloni
2016-06-04  9:38       ` Arnd Bergmann

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=575197E7.5010201@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=arnd@arndb.de \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.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 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.