From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754498AbcHXUHS (ORCPT ); Wed, 24 Aug 2016 16:07:18 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:50672 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbcHXUGt (ORCPT ); Wed, 24 Aug 2016 16:06:49 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Masahiro Yamada , Axel Lin , Linux Kernel Mailing List , Hans de Goede , Alban Bedel , Philipp Zabel , Maxime Ripard , Lee Jones Subject: Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Date: Wed, 24 Aug 2016 22:06:04 +0200 Message-ID: <1779401.H3WQxbgf2J@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-31-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1472045342-7434-1-git-send-email-p.zabel@pengutronix.de> <20643424.8eBLZWavEG@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:XzKqLx6s9AY+bd6mpi9GHCjDSCcHJ3jLEpU3pMNflmbMvUPMH3Q QnsCeGI0H7pPQbC3Gpf3oPEtI7ppHKiqNISLjnyUs8mkbdKX/rsf9rxnzk6pn/H84+7psqq Sf/N8MXhtiVWncCS5yKUOM4Z19uQC7DyTWeDiUkWTDXXqN0RahtZbju5yRNZTXRVzUku0K9 QjVPXP5UtoxqqwfvVV+fw== X-UI-Out-Filterresults: notjunk:1;V01:K0:mGVz2aHj8z8=:wVel+uQeilyJyNDkvDLFEv qhfFAfu8KG+jkfbFbV3Ehpm9rcsEpMaGJQ0XMOBse+QG/EwgR8H7+MCSzcosTiVKn+Ye1nUGK fbc7EbO4duA53HvTUHT5qT2yQTUlaQKcjmOH3LxBuxKwntL2FW8Y2L+bAWEiKMb+HE0F/73f/ ikJXyTOx9ZA6uSFAifiZ88es60y/+KxUbqi6KY4kSVstqAQFfR6kPQM0S1iCo5nGLCyjo7NwY zMjKZCy1rYvvimOxeIKAEujmvxu6MPhIeH+4aphNTGBDmi5QxEx3ru76WMQuazK9o6Y2w5T0p zB5wqRQdKxojNyA+qnvhUyMka6Rp6kej+HtT7z+cReLNHfRuepmDjdUNPPoKdbF9qQuw9GRaQ h0Z7kIVTMhDnucWZdZAwWzVf9TRohMwjG7CR8gR3+dtjswSkNUd39NOISRZpmAOeCIY82iAzq dybi/oea+bkonh7DCaNoNpmSTuqWJflCJgApRuC4gTm/yV9RU9Q6mkyfvohO3f7icWQ4O2ons nqVwW/9PUF0jkrYkNJYcJP+rH71PJtl7ciY0n1zCtCNpWJqWUBR9xTY+zEUGl2qOaYo2iUmj0 BbRvM1EX30wh9rzLsNZQQgiLUat0fTdNC4Zyi3eXF4YcXiSOeRSHadlCzxsMjVq2HUmo6GwSA buu1IyY76RPyPaATbTH0pHQ2qAE28GkBzuXo7pCSUq9hbOrVWEpZqSIgR05g5og9UCGUv9C/M 5V8Zq/5brhtXMsf9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, August 25, 2016 3:18:55 AM CEST Masahiro Yamada wrote: > Hi Arnd, > > > 2016-08-25 0:51 GMT+09:00 Arnd Bergmann : > > On Wednesday, August 24, 2016 3:28:53 PM CEST Philipp Zabel wrote: > >> if RESET_CONTROLLER > >> > >> +config RESET_ATH79 > >> + bool "AR71xx Reset Driver" if COMPILE_TEST > >> + default ATH79 > >> + help > >> + This enables the ATH79 reset controller driver that supports the > >> + AR71xx SoC reset controller. > >> + > >> > > > > Nice series! > > > > Just note that there is one possible problem with COMPILE_TEST > > when the platforms are enabled, as you can then disable a driver > > that is normally there, and that can in turn cause problems in > > rare cases, e.g. when the driver has a global function that is > > called from platform code. I don't know if any of the drivers > > do that, but if they do, you'd have to use > > > > config RESET_ATH79 > > bool "AR71xx Reset Driver" if COMPILE_TEST && !ATH79 > > default ATH79 > > > > to ensure that it's impossible to disable the driver on platforms > > that require it. > > Hmm, > Can we do this only when we really have to do so? > I think we should not care about such a rare case that may not happen. > > Let's start with only "if COMPILE_TEST", > and take a look at it if a build error is detected. > > Anyway, depending on platform code is a sign of weird implementation. > > It might be better to find a potential issue rather than hide it. > > > I just checked the object files in an allyesconfig build and found one instance: arch/arm/mach-sunxi/sunxi.c:extern void __init sun6i_reset_init(void); arch/arm/mach-sunxi/sunxi.c: sun6i_reset_init(); drivers/reset/reset-sunxi.c:void __init sun6i_reset_init(void) We should definitely make sure this one is handled right, and maybe check the source code for other instances. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 24 Aug 2016 22:06:04 +0200 Subject: [PATCH 01/10] reset: ath79: add driver Kconfig option In-Reply-To: References: <1472045342-7434-1-git-send-email-p.zabel@pengutronix.de> <20643424.8eBLZWavEG@wuerfel> Message-ID: <1779401.H3WQxbgf2J@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thursday, August 25, 2016 3:18:55 AM CEST Masahiro Yamada wrote: > Hi Arnd, > > > 2016-08-25 0:51 GMT+09:00 Arnd Bergmann : > > On Wednesday, August 24, 2016 3:28:53 PM CEST Philipp Zabel wrote: > >> if RESET_CONTROLLER > >> > >> +config RESET_ATH79 > >> + bool "AR71xx Reset Driver" if COMPILE_TEST > >> + default ATH79 > >> + help > >> + This enables the ATH79 reset controller driver that supports the > >> + AR71xx SoC reset controller. > >> + > >> > > > > Nice series! > > > > Just note that there is one possible problem with COMPILE_TEST > > when the platforms are enabled, as you can then disable a driver > > that is normally there, and that can in turn cause problems in > > rare cases, e.g. when the driver has a global function that is > > called from platform code. I don't know if any of the drivers > > do that, but if they do, you'd have to use > > > > config RESET_ATH79 > > bool "AR71xx Reset Driver" if COMPILE_TEST && !ATH79 > > default ATH79 > > > > to ensure that it's impossible to disable the driver on platforms > > that require it. > > Hmm, > Can we do this only when we really have to do so? > I think we should not care about such a rare case that may not happen. > > Let's start with only "if COMPILE_TEST", > and take a look at it if a build error is detected. > > Anyway, depending on platform code is a sign of weird implementation. > > It might be better to find a potential issue rather than hide it. > > > I just checked the object files in an allyesconfig build and found one instance: arch/arm/mach-sunxi/sunxi.c:extern void __init sun6i_reset_init(void); arch/arm/mach-sunxi/sunxi.c: sun6i_reset_init(); drivers/reset/reset-sunxi.c:void __init sun6i_reset_init(void) We should definitely make sure this one is handled right, and maybe check the source code for other instances. Arnd