Message ID | 20221106062536.26369-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1363824wru; Sun, 6 Nov 2022 00:06:30 -0700 (PDT) X-Google-Smtp-Source: AA0mqf57yUwlgEExFSrsxVXZubqVlBbL92LiCXa2PsxrZO84RV6CwKziaLYmfBvln1J3m41nn2Ur X-Received: by 2002:a17:906:3bc6:b0:7ae:4f89:686d with SMTP id v6-20020a1709063bc600b007ae4f89686dmr5288311ejf.262.1667718389944; Sun, 06 Nov 2022 00:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667718389; cv=none; d=google.com; s=arc-20160816; b=KbdKvp4p2KovJPx1QMQDFAvLX9seg5QhFVZNIFd+kTDymjXXKTYM0Xsbdy+CCXoS+p 4I39vlzHLm0DI2LbcrtKLLEaW6EVmN06wlqKg+AnhySZWeHeoT1nX7cbWVqN7GceYZk5 igqjhogUZg8cNXFYNp/1YkLdV8FRp9ZaV3g3U+NY8k1at0NwWAvjIcOCH5IEL7Mx07oo 0UnMUCWA+6+n/NyyZs3qab834wdOj8490x6fns27djufTqnRUCgoSn5n4TiBqzXxPSDC LBXxV7DBxrrA6AFCsgtYpeiiN9KCIZcAjMe9/7oxfo23FI2K9C7pA1V72HAifkql4s5I KA/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5SDRXSxMWlUUbPkDm/PxbafoOSGwgChTiTX8o4kcnFs=; b=vjrPWQTSBmCdx1/kuFprz58mC6iNNYKvs/jH9HWUlxNFVHXS/KQ5sO0a6FqIPVAeOP GdcB5k++Em4ph7lp1DBSbTTLwatYzjy1c8l1bBaiONC/bpLsO+EH1dryG5KLbO+F86j5 L4gvwX/QVW86bDW23IH4Bf+kvV++/TVb8OWXJna629ms75CY8eSxO7KF2Z3rU7TnNH3h rEdbn8DofG4E3gANAZQtKky7KqZfNhj1LVKIh5yPVhjFqN+H99yh7W16yg33JGd/Bxsy qUREiceK0iocgadhd+D4KnZS5fHC9ya2oQr6r5tqfDJ3z9N99+J7Q2p1FzDJmZuhmZ4I 7Gwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OtHvTeo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa42-20020a17090786aa00b0073fc8e72882si5190562ejc.28.2022.11.06.00.06.06; Sun, 06 Nov 2022 00:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OtHvTeo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229678AbiKFGZu (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Sun, 6 Nov 2022 01:25:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiKFGZt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 6 Nov 2022 01:25:49 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 221C3DF59; Sat, 5 Nov 2022 23:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=5SDRXSxMWlUUbPkDm/PxbafoOSGwgChTiTX8o4kcnFs=; b=OtHvTeo+vzTRfVCnhEJDuEKv1/ wV69kB36ag1cN6N67bOEKgN9X9koB+S2VWXL3eBOnzdvqpSeDPSxrWI7T7fWvlOhjUgOLJZS8+LN/ dMCVzDce7fZeTobLxQcy8JVI2IMJ3YeFFCs64bmKIGTIJaDnkIHJEYSh/jhsla/ygVlsWOp6iON7v UEH/laLwCPmvF+ZSAz9NqVD3pYUkOSRny2IWBlV43UEbvigmZvsONWUmxkl61W6jmx0QmzOoHcIW8 WMjCEK2oXyXPePRd/clLr1cv6gAikUeQghlPyjZ0dABCsCUUwmnS/ZvIbqkry5jvh2X7pwYZYAsHN nmokIXcQ==; Received: from [2601:1c2:d80:3110::a2e7] (helo=casper.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1orZ6J-008eYA-0p; Sun, 06 Nov 2022 06:25:47 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, kernel test robot <lkp@intel.com>, Aaro Koskinen <aaro.koskinen@iki.fi>, Janusz Krzysztofik <jmkrzyszt@gmail.com>, Tony Lindgren <tony@atomide.com>, Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1 Date: Sat, 5 Nov 2022 23:25:36 -0700 Message-Id: <20221106062536.26369-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748729478555609291?= X-GMAIL-MSGID: =?utf-8?q?1748729478555609291?= |
Series |
ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1
|
|
Commit Message
Randy Dunlap
Nov. 6, 2022, 6:25 a.m. UTC
Fix a build error by setting ARCH_OMAP1_ANY Kconfig symbol.
Fixes this build error:
arm-linux-gnueabi-ld: drivers/video/backlight/omap1_bl.o: in function `omapbl_probe':
omap1_bl.c:(.text+0x1b4): undefined reference to `omap_cfg_reg'
Fixes: 7036440eab3e ("ARM: omap1: enable multiplatform")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
---
arch/arm/mach-omap1/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Sun, Nov 6, 2022, at 07:25, Randy Dunlap wrote: > Fix a build error by setting ARCH_OMAP1_ANY Kconfig symbol. > Fixes this build error: > > arm-linux-gnueabi-ld: drivers/video/backlight/omap1_bl.o: in function > `omapbl_probe': > omap1_bl.c:(.text+0x1b4): undefined reference to `omap_cfg_reg' > > Fixes: 7036440eab3e ("ARM: omap1: enable multiplatform") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Reported-by: kernel test robot <lkp@intel.com> > Cc: Aaro Koskinen <aaro.koskinen@iki.fi> > Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com> > Cc: Tony Lindgren <tony@atomide.com> > Cc: Russell King <linux@armlinux.org.uk> > Cc: Arnd Bergmann <arnd@arndb.de> > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-omap@vger.kernel.org > --- > arch/arm/mach-omap1/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff -- a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig > --- a/arch/arm/mach-omap1/Kconfig > +++ b/arch/arm/mach-omap1/Kconfig > @@ -47,7 +47,8 @@ config ARCH_OMAP16XX > > config ARCH_OMAP1_ANY > select ARCH_OMAP > - def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX > + def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || \ > + ARCH_OMAP16XX || ARCH_OMAP1 I think this would introduce other build failures, because it makes ARCH_OMAP1_ANY the same as ARCH_OMAP1, bringing back the problems I solved with 615dce5bf736 ("ARM: omap1: fix build with no SoC selected"). What you probably see here is a preexisting bug that bisects to 7036440eab3e because of the contents of your .config file that no longer enable ARCH_OMAP1 without 7036440eab3e. I have not tested it, but I suspect what we want instead is the change below, limiting OMAP_MUX and related symbols to configs that enable at least one of the OMAP1 variants. Arnd --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY select ARCH_OMAP def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX -config ARCH_OMAP +config ARCH_OMAP1_ANY bool comment "OMAP Feature Selections"
Hi Randy,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tmlind-omap/for-next]
[also build test WARNING on linus/master v6.1-rc3 next-20221104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Randy-Dunlap/ARM-omap1-set-ARCH_OMAP1_ANY-for-ARCH_OMAP1/20221106-142818
base: https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git for-next
patch link: https://lore.kernel.org/r/20221106062536.26369-1-rdunlap%40infradead.org
patch subject: [PATCH] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1
config: arm-randconfig-r032-20221106
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/4e4d77cfb79b150e9f99202283604a52d9d238d4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Randy-Dunlap/ARM-omap1-set-ARCH_OMAP1_ANY-for-ARCH_OMAP1/20221106-142818
git checkout 4e4d77cfb79b150e9f99202283604a52d9d238d4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm/mach-omap1/serial.c:24:
>> arch/arm/mach-omap1/pm.h:113:2: warning: #warning "Power management for this processor not implemented yet" [-Wcpp]
113 | #warning "Power management for this processor not implemented yet"
| ^~~~~~~
vim +113 arch/arm/mach-omap1/pm.h
9ad5897c2659b3 include/asm-arm/arch-omap/pm.h Tony Lindgren 2005-11-10 108
9ad5897c2659b3 include/asm-arm/arch-omap/pm.h Tony Lindgren 2005-11-10 109 #if !defined(CONFIG_ARCH_OMAP730) && \
1f73b4de93e06d arch/arm/mach-omap1/pm.h Alistair Buxton 2009-09-18 110 !defined(CONFIG_ARCH_OMAP850) && \
9ad5897c2659b3 include/asm-arm/arch-omap/pm.h Tony Lindgren 2005-11-10 111 !defined(CONFIG_ARCH_OMAP15XX) && \
c912f7e1eae169 arch/arm/mach-omap1/pm.h Kevin Hilman 2009-05-15 112 !defined(CONFIG_ARCH_OMAP16XX)
87d99d6f7ee3ec arch/arm/plat-omap/include/mach/pm.h David Brownell 2009-03-04 @113 #warning "Power management for this processor not implemented yet"
^1da177e4c3f41 include/asm-arm/arch-omap/pm.h Linus Torvalds 2005-04-16 114 #endif
^1da177e4c3f41 include/asm-arm/arch-omap/pm.h Linus Torvalds 2005-04-16 115
On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: > --- a/arch/arm/mach-omap1/Kconfig > +++ b/arch/arm/mach-omap1/Kconfig > @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY > select ARCH_OMAP > def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX > > -config ARCH_OMAP > +config ARCH_OMAP1_ANY This patch can't be right - look at the first line of context above, you have symbols that select ARCH_OMAP and you've just removed the definition of ARCH_OMAP.
On Sun, Nov 6, 2022, at 11:26, Russell King (Oracle) wrote: > On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: >> --- a/arch/arm/mach-omap1/Kconfig >> +++ b/arch/arm/mach-omap1/Kconfig >> @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY >> select ARCH_OMAP >> def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX >> >> -config ARCH_OMAP >> +config ARCH_OMAP1_ANY > > This patch can't be right - look at the first line of context above, you > have symbols that select ARCH_OMAP and you've just removed the > definition of ARCH_OMAP. Right, I misread this, I thought this was an 'if ARCH_OMAP' block instead of the Kconfig symbol. Part of the problem is now is possibly that there are two symbols with that name now, I'll have to try to reproduce the problem first and then see what caused it originally. Arnd
On Sun, Nov 6, 2022, at 11:37, Arnd Bergmann wrote: > On Sun, Nov 6, 2022, at 11:26, Russell King (Oracle) wrote: >> On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: >>> --- a/arch/arm/mach-omap1/Kconfig >>> +++ b/arch/arm/mach-omap1/Kconfig >>> @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY >>> select ARCH_OMAP >>> def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX >>> >>> -config ARCH_OMAP >>> +config ARCH_OMAP1_ANY >> >> This patch can't be right - look at the first line of context above, you >> have symbols that select ARCH_OMAP and you've just removed the >> definition of ARCH_OMAP. > > Right, I misread this, I thought this was an 'if ARCH_OMAP' block > instead of the Kconfig symbol. Part of the problem is now is > possibly that there are two symbols with that name now, I'll have > to try to reproduce the problem first and then see what caused it > originally. It seems the root cause was actually 804f7f19c2e2 ("fbdev: omap: avoid using mach/*.h files"), where I started allowing building with CONFIG_COMPILE_TEST, but this fails when ARCH_OMAP1_ANY is disabled, as Randy correctly found. We could tighten this gain by adding something like depends on ARCH_OMAP1_ANY || !OMAP_MUX to still allow compile-testing but specifically avoiding the broken case. I think we have the same problem in the pcmcia and spi-uwire drivers, so maybe something like this would be a better approach: --- a/include/linux/soc/ti/omap1-mux.h +++ b/include/linux/soc/ti/omap1-mux.h @@ -302,7 +302,7 @@ enum omap1xxx_index { }; -#ifdef CONFIG_OMAP_MUX +#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP1_ANY) extern int omap_cfg_reg(unsigned long reg_cfg); #else static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } Arnd
On 11/6/22 03:32, Arnd Bergmann wrote: > On Sun, Nov 6, 2022, at 11:37, Arnd Bergmann wrote: >> On Sun, Nov 6, 2022, at 11:26, Russell King (Oracle) wrote: >>> On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote: >>>> --- a/arch/arm/mach-omap1/Kconfig >>>> +++ b/arch/arm/mach-omap1/Kconfig >>>> @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY >>>> select ARCH_OMAP >>>> def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX >>>> >>>> -config ARCH_OMAP >>>> +config ARCH_OMAP1_ANY >>> >>> This patch can't be right - look at the first line of context above, you >>> have symbols that select ARCH_OMAP and you've just removed the >>> definition of ARCH_OMAP. >> >> Right, I misread this, I thought this was an 'if ARCH_OMAP' block >> instead of the Kconfig symbol. Part of the problem is now is >> possibly that there are two symbols with that name now, I'll have >> to try to reproduce the problem first and then see what caused it >> originally. > > It seems the root cause was actually 804f7f19c2e2 ("fbdev: omap: > avoid using mach/*.h files"), where I started allowing building with > CONFIG_COMPILE_TEST, but this fails when ARCH_OMAP1_ANY is disabled, > as Randy correctly found. > > We could tighten this gain by adding something like > > depends on ARCH_OMAP1_ANY || !OMAP_MUX > > to still allow compile-testing but specifically avoiding the > broken case. I think we have the same problem in the pcmcia and > spi-uwire drivers, so maybe something like this would be > a better approach: > > --- a/include/linux/soc/ti/omap1-mux.h > +++ b/include/linux/soc/ti/omap1-mux.h > @@ -302,7 +302,7 @@ enum omap1xxx_index { > > }; > > -#ifdef CONFIG_OMAP_MUX > +#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP1_ANY) > extern int omap_cfg_reg(unsigned long reg_cfg); > #else > static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } That seems to work. Push it into -next and see what happens. :)
diff -- a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig @@ -47,7 +47,8 @@ config ARCH_OMAP16XX config ARCH_OMAP1_ANY select ARCH_OMAP - def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX + def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || \ + ARCH_OMAP16XX || ARCH_OMAP1 config ARCH_OMAP bool