linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h'
@ 2016-06-03  0:58 Guenter Roeck
  2016-06-03 12:11 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2016-06-03  0:58 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Alexandre Belloni, linux-kernel, Jiri Kosina

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().

Guenter

---
Bisect log:

# bad: [bb65e54d78161268e500e9744342920de782874e] mn10300: Add missing include file to proc-init.c
# good: [1a695a905c18548062509178b98bc91e67510864] Linux 4.7-rc1
git bisect start 'HEAD' 'v4.7-rc1'
# good: [2dcacc3943642b0e8f403c486b56fecb054e9764] Merge remote-tracking branch 'thermal/next'
git bisect good 2dcacc3943642b0e8f403c486b56fecb054e9764
# good: [07f0ec96d422b0d454b5cbf4fdd732c27f053d1d] Merge remote-tracking branch 'sound/for-next'
git bisect good 07f0ec96d422b0d454b5cbf4fdd732c27f053d1d
# good: [6ef7078aac785fceffc4bce468ccf68ff20826fa] Merge remote-tracking branch 'spi/for-next'
git bisect good 6ef7078aac785fceffc4bce468ccf68ff20826fa
# good: [9fc82ec042e638ea8b45c7f44bc6f7c366758545] Merge remote-tracking branch 'pinctrl/for-next'
git bisect good 9fc82ec042e638ea8b45c7f44bc6f7c366758545
# good: [179a961299a005ab2b3813c545e59aa05e9a803b] Merge remote-tracking branch 'coresight/next'
git bisect good 179a961299a005ab2b3813c545e59aa05e9a803b
# good: [8d2a69f1b02b4c2b340d7b9036fee573d9b1c2f1] samples/kprobe: convert the printk to pr_info/pr_err
git bisect good 8d2a69f1b02b4c2b340d7b9036fee573d9b1c2f1
# bad: [95df4c078bf315b7590d4439db24494837bddf88] char/genrtc: remove the rest of the driver
git bisect bad 95df4c078bf315b7590d4439db24494837bddf88
# bad: [6187350e54676a69d9742aaa9c30720d146df4a2] rtc: parisc: provide rtc_class_ops directly
git bisect bad 6187350e54676a69d9742aaa9c30720d146df4a2
# bad: [fd09cc80165cc96a2cd42abed98553549b4d09fc] rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h
git bisect bad fd09cc80165cc96a2cd42abed98553549b4d09fc
# good: [7af6a2e1c2565396f6b941ff2a989b989b24a97b] MAINTAINERS: Add file patterns for rtc device tree bindings
git bisect good 7af6a2e1c2565396f6b941ff2a989b989b24a97b
# good: [23999733c6445da22a12d373cb45d64f0afe462a] rtc: cmos: remove empty asm/mc146818rtc.h files
git bisect good 23999733c6445da22a12d373cb45d64f0afe462a
# first bad commit: [fd09cc80165cc96a2cd42abed98553549b4d09fc] rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h'
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-06-03 12:11 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Alexandre Belloni, linux-kernel, Jiri Kosina

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?

Thanks!

	Arnd

> 
> ---
> Bisect log:
> 
> # bad: [bb65e54d78161268e500e9744342920de782874e] mn10300: Add missing include file to proc-init.c
> # good: [1a695a905c18548062509178b98bc91e67510864] Linux 4.7-rc1
> git bisect start 'HEAD' 'v4.7-rc1'
> # good: [2dcacc3943642b0e8f403c486b56fecb054e9764] Merge remote-tracking branch 'thermal/next'
> git bisect good 2dcacc3943642b0e8f403c486b56fecb054e9764
> # good: [07f0ec96d422b0d454b5cbf4fdd732c27f053d1d] Merge remote-tracking branch 'sound/for-next'
> git bisect good 07f0ec96d422b0d454b5cbf4fdd732c27f053d1d
> # good: [6ef7078aac785fceffc4bce468ccf68ff20826fa] Merge remote-tracking branch 'spi/for-next'
> git bisect good 6ef7078aac785fceffc4bce468ccf68ff20826fa
> # good: [9fc82ec042e638ea8b45c7f44bc6f7c366758545] Merge remote-tracking branch 'pinctrl/for-next'
> git bisect good 9fc82ec042e638ea8b45c7f44bc6f7c366758545
> # good: [179a961299a005ab2b3813c545e59aa05e9a803b] Merge remote-tracking branch 'coresight/next'
> git bisect good 179a961299a005ab2b3813c545e59aa05e9a803b
> # good: [8d2a69f1b02b4c2b340d7b9036fee573d9b1c2f1] samples/kprobe: convert the printk to pr_info/pr_err
> git bisect good 8d2a69f1b02b4c2b340d7b9036fee573d9b1c2f1
> # bad: [95df4c078bf315b7590d4439db24494837bddf88] char/genrtc: remove the rest of the driver
> git bisect bad 95df4c078bf315b7590d4439db24494837bddf88
> # bad: [6187350e54676a69d9742aaa9c30720d146df4a2] rtc: parisc: provide rtc_class_ops directly
> git bisect bad 6187350e54676a69d9742aaa9c30720d146df4a2
> # bad: [fd09cc80165cc96a2cd42abed98553549b4d09fc] rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h
> git bisect bad fd09cc80165cc96a2cd42abed98553549b4d09fc
> # good: [7af6a2e1c2565396f6b941ff2a989b989b24a97b] MAINTAINERS: Add file patterns for rtc device tree bindings
> git bisect good 7af6a2e1c2565396f6b941ff2a989b989b24a97b
> # good: [23999733c6445da22a12d373cb45d64f0afe462a] rtc: cmos: remove empty asm/mc146818rtc.h files
> git bisect good 23999733c6445da22a12d373cb45d64f0afe462a
> # first bad commit: [fd09cc80165cc96a2cd42abed98553549b4d09fc] rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h
> 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h'
  2016-06-03 12:11 ` Arnd Bergmann
@ 2016-06-03 14:44   ` Guenter Roeck
  2016-06-03 22:16     ` Alexandre Belloni
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2016-06-03 14:44 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Alexandre Belloni, linux-kernel, Jiri Kosina

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h'
  2016-06-03 14:44   ` Guenter Roeck
@ 2016-06-03 22:16     ` Alexandre Belloni
  2016-06-04  9:38       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2016-06-03 22:16 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Arnd Bergmann, linux-kernel, Jiri Kosina

Hi,

On 03/06/2016 at 07:44:55 -0700, Guenter Roeck wrote :
> On 06/03/2016 05:11 AM, Arnd Bergmann wrote:
> > 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.
> 

Arnd, do you mind sending a proper patch that I'll apply before 'rtc:
cmos: move mc146818rtc code out of asm-generic/rtc.h'? Else, I could
squash it in but I think the former is cleaner.

Thanks!

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h'
  2016-06-03 22:16     ` Alexandre Belloni
@ 2016-06-04  9:38       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-06-04  9:38 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: Guenter Roeck, linux-kernel, Jiri Kosina

On Saturday, June 4, 2016 12:16:57 AM CEST Alexandre Belloni wrote:
> 
> Arnd, do you mind sending a proper patch that I'll apply before 'rtc:
> cmos: move mc146818rtc code out of asm-generic/rtc.h'? Else, I could
> squash it in but I think the former is cleaner.
> 

I thought I had already sent id, but just in case I've done it once more now.
See "sparc32: remove stale RTC_PORT definition"

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-04  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-06-03 22:16     ` Alexandre Belloni
2016-06-04  9:38       ` Arnd Bergmann

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).