From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933062AbcFCOpA (ORCPT ); Fri, 3 Jun 2016 10:45:00 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:44809 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932301AbcFCOo5 (ORCPT ); Fri, 3 Jun 2016 10:44:57 -0400 Subject: Re: Build failure in -next due to 'rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h' To: Arnd Bergmann References: <20160603005848.GA11147@roeck-us.net> <4034375.QyTnDIyzuW@wuerfel> Cc: Alexandre Belloni , linux-kernel@vger.kernel.org, Jiri Kosina From: Guenter Roeck Message-ID: <575197E7.5010201@roeck-us.net> Date: Fri, 3 Jun 2016 07:44:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <4034375.QyTnDIyzuW@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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