Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1469686

Re: [PATCH 01/10] reset: ath79: add driver Kconfig option

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH 01/10] reset: ath79: add driver Kconfig option
Date 2016-08-24 22:10 +0200
Message-ID <s9MEN-7el-29@gated-at.bofh.it> (permalink)
References <s9GpH-2LQ-3@gated-at.bofh.it> <s9IKR-4jv-19@gated-at.bofh.it> <s9L62-62m-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <arnd@arndb.de>:
> > 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/10] reset: ath79: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:30 +0200
  [PATCH 10/10] reset: hi6220: allow to compile test driver on other architectures Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:30 +0200
    Re: [PATCH 10/10] reset: hi6220: allow to compile test driver on  other architectures Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-24 20:10 +0200
      Re: [PATCH 10/10] reset: hi6220: allow to compile test driver on  other architectures Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-25 09:30 +0200
  [PATCH 04/10] reset: meson: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:30 +0200
    Re: [PATCH 04/10] reset: meson: add driver Kconfig option Neil Armstrong <narmstrong@baylibre.com> - 2016-08-24 15:40 +0200
  [PATCH 07/10] reset: stm32: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:30 +0200
  [PATCH 09/10] reset: zynq: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:30 +0200
    Re: [PATCH 09/10] reset: zynq: add driver Kconfig option Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-24 20:00 +0200
      Re: [PATCH 09/10] reset: zynq: add driver Kconfig option Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-25 06:30 +0200
        Re: [PATCH 09/10] reset: zynq: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-25 09:30 +0200
          Re: [PATCH 09/10] reset: zynq: add driver Kconfig option Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-25 09:50 +0200
            Re: [PATCH 09/10] reset: zynq: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-25 10:30 +0200
  [PATCH 05/10] reset: pistachio: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:40 +0200
    RE: [PATCH 05/10] reset: pistachio: add driver Kconfig option James Hartley <James.Hartley@imgtec.com> - 2016-08-29 22:50 +0200
  [PATCH 02/10] reset: berlin: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:40 +0200
  [PATCH 06/10] reset: socfpga: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:40 +0200
    Re: [PATCH 06/10] reset: socfpga: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-25 09:30 +0200
  [PATCH 08/10] reset: sunxi: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:40 +0200
    Re: [PATCH 08/10] reset: sunxi: add driver Kconfig option Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-24 20:00 +0200
  [PATCH 03/10] reset: lpc18xx: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-24 15:40 +0200
    Re: [PATCH 03/10] reset: lpc18xx: add driver Kconfig option Joachim Eastwood <manabian@gmail.com> - 2016-08-24 22:50 +0200
      Re: [PATCH 03/10] reset: lpc18xx: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-25 09:30 +0200
  Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Arnd Bergmann <arnd@arndb.de> - 2016-08-24 18:00 +0200
    Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-24 20:30 +0200
      Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Arnd Bergmann <arnd@arndb.de> - 2016-08-24 22:10 +0200
        Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-25 06:40 +0200
        Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-25 09:30 +0200
          Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-08-25 09:50 +0200
            Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-25 10:00 +0200
  Re: [PATCH 01/10] reset: ath79: add driver Kconfig option Alban <albeu@free.fr> - 2016-08-25 13:20 +0200

csiph-web