All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: "steve.glendinning@shawell.net" <steve.glendinning@shawell.net>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Jeremy Linton <Jeremy.Linton@arm.com>,
	"hanjun.guo@linaro.org" <hanjun.guo@linaro.org>,
	"suravee.suthikulpanit@amd.com" <suravee.suthikulpanit@amd.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] Convert smsc911x to use ACPI as well as DT
Date: Thu, 24 Sep 2015 15:01:57 +0100	[thread overview]
Message-ID: <20150924140157.GB30475@red-moon> (raw)
In-Reply-To: <1443095558.74600.84.camel@infradead.org>

On Thu, Sep 24, 2015 at 12:52:38PM +0100, David Woodhouse wrote:

[...]

> And think about it... we *really* don't want a given peripheral device
> to have *different* bindings depending on whether it's discovered with
> a specific ACPI HID, vs. when it's discovered via DT or the PRP0001
> HID. That way lies complete insanity.

There are "devices" that we do _not_ want to discover at all when
booting with ACPI (eg drivers/clk, drivers/regulator) because the way
they interact with ACPI standard power management AML methods may
definitely clash.

PRP0001 allows to pull everything in (depending on what the Coccinelle
script will look like, because AFAIK that's the only thing that stops
people from enabling eg drivers/clk drivers in ACPI systems with PRP0001,
namely the OF to FW node API conversion).

> In some ways, your proposal would be actively *counterproductive*. You
> say you want to train people *not* to keep patching the kernel. But
> where they *could* have just used PRP0001 and used a pre-existing
> kernel, you then tell them "oh, but now you need to patch the kernel
> because we want you to make up a new HID and not be compatible with
> what already exists."

We do not want people to reuse DT drivers that are handled in ACPI with
existing methods (again, power management is a prime example).

I do not think we want to enable DT PCI host controllers drivers either
since the ACPI model for PCI works differently already.

Should I mention CPUfreq and CPUidle DT drivers ?

The list of concerns goes on, it does not stop here.

> If you go down this road, I predict we'll start seeing *separate*
> drivers for identical components, because the bindings for DT vs. ACPI
> properties are different. We really don't want that.
> 
> > The pro ARM ACPI camp has been very vocal against DT in the server
> > space. I'd like to seem them as vocal about PRP0001, unless they find it
> > acceptable (and should apologise for bashing DT ;)).
> 
> Fundamentally, that DT vs. ACPI distinction has gone away with the
> introduction of _DSD. We *need* the flexibility that we gain from being
> able to provide device properties rather than inventing a new HID for
> every permutation, and with that flexibility comes a certain amount of
> responsibility to do things sensibly.

How do you enforce that apart from limiting the number of drivers you
convert to the FW node API ? What drivers are we going to convert and
on what basis ?

I think that's a debate worth having before making a tree-wide conversion
of OF API calls to the generic FW node API.

Thanks,
Lorenzo

WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] Convert smsc911x to use ACPI as well as DT
Date: Thu, 24 Sep 2015 15:01:57 +0100	[thread overview]
Message-ID: <20150924140157.GB30475@red-moon> (raw)
In-Reply-To: <1443095558.74600.84.camel@infradead.org>

On Thu, Sep 24, 2015 at 12:52:38PM +0100, David Woodhouse wrote:

[...]

> And think about it... we *really* don't want a given peripheral device
> to have *different* bindings depending on whether it's discovered with
> a specific ACPI HID, vs. when it's discovered via DT or the PRP0001
> HID. That way lies complete insanity.

There are "devices" that we do _not_ want to discover at all when
booting with ACPI (eg drivers/clk, drivers/regulator) because the way
they interact with ACPI standard power management AML methods may
definitely clash.

PRP0001 allows to pull everything in (depending on what the Coccinelle
script will look like, because AFAIK that's the only thing that stops
people from enabling eg drivers/clk drivers in ACPI systems with PRP0001,
namely the OF to FW node API conversion).

> In some ways, your proposal would be actively *counterproductive*. You
> say you want to train people *not* to keep patching the kernel. But
> where they *could* have just used PRP0001 and used a pre-existing
> kernel, you then tell them "oh, but now you need to patch the kernel
> because we want you to make up a new HID and not be compatible with
> what already exists."

We do not want people to reuse DT drivers that are handled in ACPI with
existing methods (again, power management is a prime example).

I do not think we want to enable DT PCI host controllers drivers either
since the ACPI model for PCI works differently already.

Should I mention CPUfreq and CPUidle DT drivers ?

The list of concerns goes on, it does not stop here.

> If you go down this road, I predict we'll start seeing *separate*
> drivers for identical components, because the bindings for DT vs. ACPI
> properties are different. We really don't want that.
> 
> > The pro ARM ACPI camp has been very vocal against DT in the server
> > space. I'd like to seem them as vocal about PRP0001, unless they find it
> > acceptable (and should apologise for bashing DT ;)).
> 
> Fundamentally, that DT vs. ACPI distinction has gone away with the
> introduction of _DSD. We *need* the flexibility that we gain from being
> able to provide device properties rather than inventing a new HID for
> every permutation, and with that flexibility comes a certain amount of
> responsibility to do things sensibly.

How do you enforce that apart from limiting the number of drivers you
convert to the FW node API ? What drivers are we going to convert and
on what basis ?

I think that's a debate worth having before making a tree-wide conversion
of OF API calls to the generic FW node API.

Thanks,
Lorenzo

  reply	other threads:[~2015-09-24 14:01 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 22:06 [PATCH 0/2] Enable smsc911x for use with ACPI Jeremy Linton
2015-08-12 22:06 ` Jeremy Linton
2015-08-12 22:06 ` [PATCH 1/2] Add a matching set of device_ functions for determining mac/phy Jeremy Linton
2015-08-12 22:06   ` Jeremy Linton
2015-08-12 22:13   ` Florian Fainelli
2015-08-12 22:13     ` Florian Fainelli
2015-08-14 15:55     ` Jeremy Linton
2015-08-14 15:55       ` Jeremy Linton
2015-08-13 11:57   ` Robin Murphy
2015-08-13 11:57     ` Robin Murphy
2015-08-13 14:24     ` Jeremy Linton
2015-08-13 14:24       ` Jeremy Linton
2015-08-12 22:06 ` [PATCH 2/2] Convert smsc911x to use ACPI as well as DT Jeremy Linton
2015-08-12 22:06   ` Jeremy Linton
2015-08-13  8:27   ` Graeme Gregory
2015-08-13  8:27     ` Graeme Gregory
2015-08-13  9:01     ` Lorenzo Pieralisi
2015-08-13  9:01       ` Lorenzo Pieralisi
2015-08-13  9:38       ` Graeme Gregory
2015-08-13  9:38         ` Graeme Gregory
2015-08-13 10:30         ` Lorenzo Pieralisi
2015-08-13 10:30           ` Lorenzo Pieralisi
2015-09-09 16:10   ` Marc Zyngier
2015-09-09 16:10     ` Marc Zyngier
2015-09-23 17:22     ` Jeremy Linton
2015-09-23 17:22       ` Jeremy Linton
2015-09-23 17:46       ` Marc Zyngier
2015-09-23 17:46         ` Marc Zyngier
2015-09-23 17:57       ` Sudeep Holla
2015-09-23 17:57         ` Sudeep Holla
2015-09-24  9:20         ` Catalin Marinas
2015-09-24  9:20           ` Catalin Marinas
2015-11-02 15:48     ` Jeremy Linton
2015-11-02 15:48       ` Jeremy Linton
2015-09-23 18:41   ` David Woodhouse
2015-09-23 18:41     ` David Woodhouse
2015-09-23 20:51     ` Rafael J. Wysocki
2015-09-23 20:51       ` Rafael J. Wysocki
2015-09-23 21:03       ` David Woodhouse
2015-09-23 21:03         ` David Woodhouse
2015-09-23 23:56         ` Hanjun Guo
2015-09-23 23:56           ` Hanjun Guo
2015-09-24  8:16           ` David Woodhouse
2015-09-24  8:16             ` David Woodhouse
2015-09-24 10:31             ` Catalin Marinas
2015-09-24 10:31               ` Catalin Marinas
2015-09-24 11:52               ` David Woodhouse
2015-09-24 11:52                 ` David Woodhouse
2015-09-24 14:01                 ` Lorenzo Pieralisi [this message]
2015-09-24 14:01                   ` Lorenzo Pieralisi
2015-09-24 14:31                   ` David Woodhouse
2015-09-24 14:31                     ` David Woodhouse
2015-09-24 15:15                 ` Catalin Marinas
2015-09-24 15:15                   ` Catalin Marinas
2015-09-24 18:10                   ` David Woodhouse
2015-09-24 18:10                     ` David Woodhouse
2015-09-25 15:28                     ` Catalin Marinas
2015-09-25 15:28                       ` Catalin Marinas
2015-09-26  2:16                       ` Rafael J. Wysocki
2015-09-26  2:16                         ` Rafael J. Wysocki
2015-09-26 15:20                       ` David Woodhouse
2015-09-26 15:20                         ` David Woodhouse
2015-10-01  2:23                       ` Al Stone
2015-10-01  2:23                         ` Al Stone
2015-10-06  0:20                         ` Charles Garcia-Tobin
2015-10-06  0:20                           ` Charles Garcia-Tobin
2015-10-06 11:08                           ` David Woodhouse
2015-10-06 11:08                             ` David Woodhouse
2015-10-08  0:11                             ` Rafael J. Wysocki
2015-10-08  0:11                               ` Rafael J. Wysocki
2015-08-14  0:00 ` [PATCH 0/2] Enable smsc911x for use with ACPI David Miller
2015-08-14  0:00   ` David Miller

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=20150924140157.GB30475@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Jeremy.Linton@arm.com \
    --cc=dwmw2@infradead.org \
    --cc=grant.likely@linaro.org \
    --cc=hanjun.guo@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=steve.glendinning@shawell.net \
    --cc=suravee.suthikulpanit@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.