All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: sfr@canb.auug.org.au, devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, davem@davemloft.net
Subject: Re: [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure to ibmebus
Date: Fri, 25 Feb 2011 19:53:39 +1100	[thread overview]
Message-ID: <1298624019.8833.607.camel@pasglop> (raw)
In-Reply-To: <201102241546.48790.arnd@arndb.de>

On Thu, 2011-02-24 at 15:46 +0100, Arnd Bergmann wrote:
> On Wednesday 23 February 2011, Grant Likely wrote:
> > arch/powerpc/kernel/ibmebus.c is the only remaining user of the
> > of_bus_type support code for initializing the bus and registering
> > drivers.  All others have either been switched to the vanilla platform
> > bus or already have their own infrastructure.
> > 
> > This patch moves the functionality that ibmebus is using out of
> > drivers/of/{platform,device}.c and into ibmebus.c where it is actually
> > used.  Also renames the moved symbols from of_platform_* to
> > ibmebus_bus_* to reflect the actual usage.
> > 
> > This patch is part of moving all of the of_platform_bus_type users
> > over to the platform_bus_type.
> > 
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> 
> The ibmebus is essentially the platform bus of the IBM Power Systems (a.k.a.
> pSeries a.k.a. System p), I think it would make a lot of sense to convert
> the two drivers (ehca and ehea) on this bus into platform drivers as well.
> 
> The original reason for this bus was to provide a different IOMMU for them
> than what is used on the PCI devices. This should now be possible in simpler
> ways.

Well, it's really the IBM "GX" bus but yeah, it could be converted I
suppose. The "special" iommu functions mostly derive from the fact that
the two adapters we are interested in have their own translation
mechanism built-in. The GX bus sits "above" the TCEs used as an iommu on
these systems.

> > +static void ibmebus_bus_device_shutdown(struct device *dev)
> > +{
> > +	struct platform_device *of_dev = to_platform_device(dev);
> > +	struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
> > +
> > +	if (dev->driver && drv->shutdown)
> > +		drv->shutdown(of_dev);
> > +}
> 
> neither of the drivers provides a shutdown function.

Right but they might grow one ... and people will wonder why it doesn't
work if you remove the above :-)

 .../...

> These are also unused in the drivers.

Same reasoning, however it becomes moot if we convert them to platform.

Cheers,
Ben.

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: devicetree-discuss@lists.ozlabs.org,
	Grant Likely <grant.likely@secretlab.ca>,
	sfr@canb.auug.org.au, linux-kernel@vger.kernel.org,
	davem@davemloft.net, sparclinux@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure
Date: Fri, 25 Feb 2011 08:53:39 +0000	[thread overview]
Message-ID: <1298624019.8833.607.camel@pasglop> (raw)
In-Reply-To: <201102241546.48790.arnd@arndb.de>

On Thu, 2011-02-24 at 15:46 +0100, Arnd Bergmann wrote:
> On Wednesday 23 February 2011, Grant Likely wrote:
> > arch/powerpc/kernel/ibmebus.c is the only remaining user of the
> > of_bus_type support code for initializing the bus and registering
> > drivers.  All others have either been switched to the vanilla platform
> > bus or already have their own infrastructure.
> > 
> > This patch moves the functionality that ibmebus is using out of
> > drivers/of/{platform,device}.c and into ibmebus.c where it is actually
> > used.  Also renames the moved symbols from of_platform_* to
> > ibmebus_bus_* to reflect the actual usage.
> > 
> > This patch is part of moving all of the of_platform_bus_type users
> > over to the platform_bus_type.
> > 
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> 
> The ibmebus is essentially the platform bus of the IBM Power Systems (a.k.a.
> pSeries a.k.a. System p), I think it would make a lot of sense to convert
> the two drivers (ehca and ehea) on this bus into platform drivers as well.
> 
> The original reason for this bus was to provide a different IOMMU for them
> than what is used on the PCI devices. This should now be possible in simpler
> ways.

Well, it's really the IBM "GX" bus but yeah, it could be converted I
suppose. The "special" iommu functions mostly derive from the fact that
the two adapters we are interested in have their own translation
mechanism built-in. The GX bus sits "above" the TCEs used as an iommu on
these systems.

> > +static void ibmebus_bus_device_shutdown(struct device *dev)
> > +{
> > +	struct platform_device *of_dev = to_platform_device(dev);
> > +	struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
> > +
> > +	if (dev->driver && drv->shutdown)
> > +		drv->shutdown(of_dev);
> > +}
> 
> neither of the drivers provides a shutdown function.

Right but they might grow one ... and people will wonder why it doesn't
work if you remove the above :-)

 .../...

> These are also unused in the drivers.

Same reasoning, however it becomes moot if we convert them to platform.

Cheers,
Ben.



WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: devicetree-discuss@lists.ozlabs.org,
	Grant Likely <grant.likely@secretlab.ca>,
	sfr@canb.auug.org.au, linux-kernel@vger.kernel.org,
	davem@davemloft.net, sparclinux@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure to ibmebus
Date: Fri, 25 Feb 2011 19:53:39 +1100	[thread overview]
Message-ID: <1298624019.8833.607.camel@pasglop> (raw)
In-Reply-To: <201102241546.48790.arnd@arndb.de>

On Thu, 2011-02-24 at 15:46 +0100, Arnd Bergmann wrote:
> On Wednesday 23 February 2011, Grant Likely wrote:
> > arch/powerpc/kernel/ibmebus.c is the only remaining user of the
> > of_bus_type support code for initializing the bus and registering
> > drivers.  All others have either been switched to the vanilla platform
> > bus or already have their own infrastructure.
> > 
> > This patch moves the functionality that ibmebus is using out of
> > drivers/of/{platform,device}.c and into ibmebus.c where it is actually
> > used.  Also renames the moved symbols from of_platform_* to
> > ibmebus_bus_* to reflect the actual usage.
> > 
> > This patch is part of moving all of the of_platform_bus_type users
> > over to the platform_bus_type.
> > 
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> 
> The ibmebus is essentially the platform bus of the IBM Power Systems (a.k.a.
> pSeries a.k.a. System p), I think it would make a lot of sense to convert
> the two drivers (ehca and ehea) on this bus into platform drivers as well.
> 
> The original reason for this bus was to provide a different IOMMU for them
> than what is used on the PCI devices. This should now be possible in simpler
> ways.

Well, it's really the IBM "GX" bus but yeah, it could be converted I
suppose. The "special" iommu functions mostly derive from the fact that
the two adapters we are interested in have their own translation
mechanism built-in. The GX bus sits "above" the TCEs used as an iommu on
these systems.

> > +static void ibmebus_bus_device_shutdown(struct device *dev)
> > +{
> > +	struct platform_device *of_dev = to_platform_device(dev);
> > +	struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
> > +
> > +	if (dev->driver && drv->shutdown)
> > +		drv->shutdown(of_dev);
> > +}
> 
> neither of the drivers provides a shutdown function.

Right but they might grow one ... and people will wonder why it doesn't
work if you remove the above :-)

 .../...

> These are also unused in the drivers.

Same reasoning, however it becomes moot if we convert them to platform.

Cheers,
Ben.



  reply	other threads:[~2011-02-25  8:53 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23  4:33 [RFC PATCH 00/15] Remove last remains of of_platform_bus_type Grant Likely
2011-02-23  4:33 ` Grant Likely
2011-02-23  4:33 ` Grant Likely
2011-02-23  4:33 ` [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure to ibmebus Grant Likely
2011-02-23  4:33   ` [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure to Grant Likely
2011-02-24 14:46   ` [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure to ibmebus Arnd Bergmann
2011-02-24 14:46     ` Arnd Bergmann
2011-02-24 14:46     ` Arnd Bergmann
2011-02-25  8:53     ` Benjamin Herrenschmidt [this message]
2011-02-25  8:53       ` Benjamin Herrenschmidt
2011-02-25  8:53       ` [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure Benjamin Herrenschmidt
2011-02-28  7:35     ` [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure to ibmebus Grant Likely
2011-02-28  7:35       ` Grant Likely
2011-02-28  7:35       ` [RFC PATCH 01/15] dt/powerpc: move of_bus_type infrastructure Grant Likely
2011-02-23  4:33 ` [RFC PATCH 02/15] dt: add a match table pointer to struct device Grant Likely
2011-02-23  4:33   ` Grant Likely
2011-02-23 18:29   ` Rob Herring
2011-02-23 18:29     ` Rob Herring
2011-02-23 18:29     ` Rob Herring
2011-02-23 18:44     ` Grant Likely
2011-02-23 18:44       ` Grant Likely
2011-02-23 18:44       ` [RFC PATCH 02/15] dt: add a match table pointer to struct Grant Likely
2011-02-23 21:18     ` Open Firmware and interrupt trigger Robert Thorhuus
2011-02-24 20:46       ` Benjamin Herrenschmidt
2011-02-25  7:29         ` Robert Thorhuus
2011-02-25  8:47           ` Benjamin Herrenschmidt
2011-02-23  4:33 ` [RFC PATCH 03/15] dt/powerpc: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:33   ` Grant Likely
2011-02-23  4:33   ` [RFC PATCH 03/15] dt/powerpc: Eliminate users of of_platform_{, Grant Likely
2011-02-23  4:33 ` [RFC PATCH 04/15] dt/sparc: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:33   ` [RFC PATCH 04/15] dt/sparc: Eliminate users of of_platform_{, Grant Likely
2011-02-23  4:34 ` [RFC PATCH 05/15] leds/leds-gpio: merge platform_driver with of_platform_driver Grant Likely
2011-02-23  4:34   ` [RFC PATCH 05/15] leds/leds-gpio: merge platform_driver with Grant Likely
2011-02-23  4:34 ` [RFC PATCH 06/15] dt: xilinx_hwicap: merge platform and of_platform driver bindings Grant Likely
2011-02-23  4:34   ` [RFC PATCH 06/15] dt: xilinx_hwicap: merge platform and of_platform Grant Likely
2011-02-25 18:25   ` [RFC PATCH 06/15] dt: xilinx_hwicap: merge platform and of_platformdriver bindings Stephen Neuendorffer
2011-02-25 18:25     ` Stephen Neuendorffer
2011-02-25 18:25     ` Stephen Neuendorffer
2011-02-25 18:25     ` Stephen Neuendorffer
2011-02-28  7:41     ` Grant Likely
2011-02-28  7:41       ` Grant Likely
2011-02-28  7:41       ` Grant Likely
2011-02-28  7:41       ` [RFC PATCH 06/15] dt: xilinx_hwicap: merge platform and Grant Likely
2011-02-23  4:34 ` [RFC PATCH 07/15] dt: uartlite: merge platform and of_platform driver bindings Grant Likely
2011-02-23  4:34   ` [RFC PATCH 07/15] dt: uartlite: merge platform and of_platform driver Grant Likely
2011-02-23  8:58   ` [RFC PATCH 07/15] dt: uartlite: merge platform and of_platform driver bindings Peter Korsgaard
2011-02-23  8:58     ` Peter Korsgaard
2011-02-23  8:58     ` Peter Korsgaard
2011-02-23 18:10     ` Grant Likely
2011-02-23 18:10       ` Grant Likely
2011-02-23 18:10       ` [RFC PATCH 07/15] dt: uartlite: merge platform and of_platform Grant Likely
2011-02-23  4:34 ` [RFC PATCH 08/15] dt/spi: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:34   ` [RFC PATCH 08/15] dt/spi: Eliminate users of of_platform_{, Grant Likely
2011-02-23  4:34 ` [RFC PATCH 09/15] dt/sound: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:34   ` [RFC PATCH 09/15] dt/sound: Eliminate users of of_platform_{, Grant Likely
2011-02-23  4:34 ` [RFC PATCH 10/15] dt/net: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:34   ` [RFC PATCH 10/15] dt/net: Eliminate users of of_platform_{, Grant Likely
2011-02-23  4:34 ` [RFC PATCH 11/15] dt/video: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:34   ` [RFC PATCH 11/15] dt/video: Eliminate users of of_platform_{, Grant Likely
2011-02-23  4:34 ` [RFC PATCH 12/15] dt/usb: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:34   ` [RFC PATCH 12/15] dt/usb: Eliminate users of of_platform_{, Grant Likely
2011-02-23  4:34 ` [RFC PATCH 13/15] dt/serial: Eliminate users of of_platform_{, un}register_driver Grant Likely
2011-02-23  4:34   ` [RFC PATCH 13/15] dt/serial: Eliminate users of of_platform_{, Grant Likely
2011-02-24 16:34   ` [RFC PATCH 13/15] dt/serial: Eliminate users of of_platform_{, un}register_driver Arnd Bergmann
2011-02-24 16:34     ` Arnd Bergmann
2011-02-24 16:34     ` Arnd Bergmann
2011-02-24 16:34     ` Arnd Bergmann
2011-02-23  4:34 ` [RFC PATCH 14/15] dt: Eliminate of_platform_{,un}register_driver Grant Likely
2011-02-23  4:34   ` Grant Likely
2011-02-23 16:56   ` Rob Herring
2011-02-23 16:56     ` Rob Herring
2011-02-23 16:56     ` Rob Herring
2011-02-23 17:22     ` Grant Likely
2011-02-23 17:22       ` Grant Likely
2011-02-23 17:22       ` Grant Likely
2011-02-23 17:22       ` Grant Likely
2011-02-23  4:34 ` [RFC PATCH 15/15] dt: eliminate of_platform_driver shim code Grant Likely
2011-02-23  4:34   ` Grant Likely

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=1298624019.8833.607.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sparclinux@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 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.