mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/7] platform_device: better support builtin boilerplate avoidance
Date: Wed, 3 Jun 2015 10:07:19 -0400	[thread overview]
Message-ID: <556F0A17.2050306@windriver.com> (raw)
In-Reply-To: <CACRpkdb8GFyPpyAfs67Shac3zVAcaoOTbTHquwG0TpfcjJAt+A@mail.gmail.com>

On 15-06-02 05:19 AM, Linus Walleij wrote:
> On Thu, May 28, 2015 at 2:50 AM, Paul Gortmaker
> <paul.gortmaker@windriver.com> wrote:
>> [Re: [PATCH 1/7] platform_device: better support builtin boilerplate avoidance] On 12/05/2015 (Tue 13:46) Linus Walleij wrote:
>>
>>> This does not inhibit probe() and remove() to be
>>> triggered from sysfs does it?
>>>
>>> What is needed on builtin drivers is to set
>>> .suppress_bind_attrs = true on the struct device_driver
>>> so that we inhibit the creation of sysfs files to probe
>>> and remove the driver by operator intervention.
>>
>> Is this needed?  I think we will break existing use cases if we do this.
>>
>> For example, I have IGB as built-in, but I can still unbind one of the
>> four devices and make it available for PCI pass through to KVM with:
>>
>> echo "0000:0a:00.1" > /sys/bus/pci/drivers/igb/unbind
>> echo "0000:0a:00.1" > /sys/bus/pci/drivers/pci-stub/bind
> 
> Aha PCI device which noone else is dependent on, I guess
> it's true.
> 
> I think we have a problem as to what "builtin" really means.

Well, people have had trouble with what "is" means before, so
I guess it is possible.  However, I think here it is pretty clear
that builtin means a Kconfig which is "y" and where "m" is not a
possible selection.

> For example if this is a builtin regulator, clock, GPIO, DMA etc
> driver, we want to suppress the binding/unbinding from userspace
> too, since these drivers provide resources to others and
> if you unbind them, nasty things happen. Unbinding/rebinding
> is fine as long as noone else depend on you. However for
> a large number of builtins, that is the case :P

So, to summarize:

1) Currently drivers can unbind that really should not do so.

2) This is not a new issue, nor is it introduced by this series.

3) We can't set policy based on built in vs modular; the only
   sane thing appears to be to let the driver decide itself.

Paul.
--

> 
> Yours,
> Linus Walleij
> 

  reply	other threads:[~2015-06-03 14:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 19:49 [PATCH 0/7] Introduce builtin_driver and use it for non-modular code Paul Gortmaker
2015-05-10 19:49 ` [PATCH 1/7] platform_device: better support builtin boilerplate avoidance Paul Gortmaker
2015-05-12 11:46   ` Linus Walleij
2015-05-28  0:50     ` Paul Gortmaker
2015-06-02  9:19       ` Linus Walleij
2015-06-03 14:07         ` Paul Gortmaker [this message]
2015-06-10  7:35           ` Linus Walleij
2015-05-10 19:49 ` [PATCH 2/7] drivers/platform: Convert non-modular pdev_bus to use builtin_driver_register Paul Gortmaker
2015-05-10 19:49 ` [PATCH 3/7] drivers/cpuidle: Convert non-modular drivers " Paul Gortmaker
2015-05-11 17:13   ` Daniel Lezcano
2015-05-10 19:49 ` [PATCH 4/7] drivers/cpufreq: " Paul Gortmaker
2015-05-12  7:04   ` Viresh Kumar
2015-05-13  3:17     ` Paul Gortmaker
2015-06-03 20:59     ` Paul Gortmaker
2015-06-03 21:12     ` [PATCH v2] drivers/cpufreq: Convert non-modular s5pv210-cpufreq.c to use builtin_platform_driver Paul Gortmaker
2015-06-04  2:28       ` Viresh Kumar
2015-06-15 23:50       ` Rafael J. Wysocki
2015-06-16 15:37         ` Paul Gortmaker
2015-05-10 19:49 ` [PATCH 5/7] drivers/soc: Convert non-modular tegra/pmc to use builtin_driver_register Paul Gortmaker
2015-05-10 19:49 ` [PATCH 6/7] drivers/soc: Convert non-modular soc-realview " Paul Gortmaker
2015-05-12 11:39   ` Linus Walleij
2015-05-10 19:49 ` [PATCH 7/7] drivers/power: Convert non-modular syscon-reboot " Paul Gortmaker
2015-05-23 17:55   ` Sebastian Reichel
2015-06-03 19:09 ` [PATCH] drivers/clk: convert sunxi/clk-mod0.c to use builtin_platform_driver Paul Gortmaker
2015-06-04 16:21   ` Maxime Ripard
2015-06-04 22:50   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556F0A17.2050306@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome