Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Default Kconfig state for hw_random drivers

1 view
Skip to first unread message

Olof Johansson

unread,
Apr 26, 2012, 10:17:35 AM4/26/12
to Mark Brown, Herbert Xu, Matt Mackall, linux-...@vger.kernel.org, Arnd Bergmann, Nicolas Ferre
On Thu, Apr 26, 2012 at 4:42 AM, Mark Brown
<bro...@opensource.wolfsonmicro.com> wrote:
> An Atmel hw_random driver just appeared in -next.  Since it's just a
> regular platform device it has no dependencies on any particular
> platform so following the behaviour of other hw_random drivers it's set
> to default enabled if hw_random is enabled, even on non-Atmel platforms.
>
> This doesn't feel like the right thing to do - it'd mean that most of
> the embedded RNGs would end up getting enabled by default which probably
> isn't what we want.

Indeed, thanks for catching this. The driver isn't new but it had a
previous dependency on just one AT91 chip family.

Looking at other options in the same Kconfig, it would be appropriate
to make it depend on ARCH_AT91 instead.

Nicolas?


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Nicolas Ferre

unread,
Apr 27, 2012, 8:31:57 AM4/27/12
to Olof Johansson, Mark Brown, Arnd Bergmann, ba...@ti.com, Herbert Xu, Matt Mackall, linux-...@vger.kernel.org
On 04/26/2012 04:17 PM, Olof Johansson :
> On Thu, Apr 26, 2012 at 4:42 AM, Mark Brown
> <bro...@opensource.wolfsonmicro.com> wrote:
>> An Atmel hw_random driver just appeared in -next. Since it's just a
>> regular platform device it has no dependencies on any particular
>> platform so following the behaviour of other hw_random drivers it's set
>> to default enabled if hw_random is enabled, even on non-Atmel platforms.
>>
>> This doesn't feel like the right thing to do - it'd mean that most of
>> the embedded RNGs would end up getting enabled by default which probably
>> isn't what we want.
>
> Indeed, thanks for catching this. The driver isn't new but it had a
> previous dependency on just one AT91 chip family.
>
> Looking at other options in the same Kconfig, it would be appropriate
> to make it depend on ARCH_AT91 instead.
>
> Nicolas?

Hi,

I had the same kind of discussion with Felipe and Arnd in this thread:
http://thread.gmane.org/gmane.linux.ports.arm.kernel/122248/focus=122304

The conclusion came out after Arnd's strong arguments:
http://article.gmane.org/gmane.linux.ports.arm.kernel/122962

Maybe adding a "default" directive can be an valid option?

Best regards,
--
Nicolas Ferre

Arnd Bergmann

unread,
Apr 27, 2012, 8:56:06 AM4/27/12
to Mark Brown, Nicolas Ferre, Olof Johansson, ba...@ti.com, Herbert Xu, Matt Mackall, linux-...@vger.kernel.org
On Friday 27 April 2012, Mark Brown wrote:
> There is one, that's the problem - the driver is defaulting to the same
> state as the main hw_random option (as is idiomatic for this subsystem).
> This means that if you've enabled any hw_random device this driver will
> be enabled by default. I would argue that this default directive only
> makes sense if there's an explicit dependency limiting the platforms it
> can build on. If it can build on any platform then omitting the default
> and just defaulting to N as is normal for drivers would be better.

How about making it default to (HW_RANDOM && ARCH_AT91) then?

Arnd
0 new messages