Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-07 Thread Dan Williams
On Mon, Dec 6, 2021 at 7:04 AM Jason Gunthorpe  wrote:
>
> On Mon, Dec 06, 2021 at 06:47:45AM -0800, Christoph Hellwig wrote:
> > On Mon, Dec 06, 2021 at 10:45:35AM -0400, Jason Gunthorpe via iommu wrote:
> > > IIRC the only thing this function does is touch ACPI and OF stuff?
> > > Isn't that firmware?
> > >
> > > AFAICT amba uses this because AMBA devices might be linked to DT
> > > descriptions?
> >
> > But DT descriptions aren't firmware.  They are usually either passed onb
> > the bootloader or in some deeply embedded setups embedded into the
> > kernel image.
>
> Pedenatically yes, but do you know of a common word to refer to both
> OF and ACPI that is better than firmware? :)
>
> AFAICT we already use firwmare for this in a few places, eg
> fwnode_handle and so on.

I've always thought 'platform' was the generic name for otherwise
non-enumerable platform-firmware/data things enumerated by ACPI / OF.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-06 Thread Lu Baolu

On 12/6/21 11:04 PM, Jason Gunthorpe wrote:

On Mon, Dec 06, 2021 at 06:47:45AM -0800, Christoph Hellwig wrote:

On Mon, Dec 06, 2021 at 10:45:35AM -0400, Jason Gunthorpe via iommu wrote:

IIRC the only thing this function does is touch ACPI and OF stuff?
Isn't that firmware?

AFAICT amba uses this because AMBA devices might be linked to DT
descriptions?

But DT descriptions aren't firmware.  They are usually either passed onb
the bootloader or in some deeply embedded setups embedded into the
kernel image.

Pedenatically yes, but do you know of a common word to refer to both
OF and ACPI that is better than firmware?:)


If the firmware_ name is confusing, how about common_dma_configure()?
Or, copy the 6 lines of code to amba bus driver?

Best regards,
baolu
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-06 Thread Jason Gunthorpe via iommu
On Mon, Dec 06, 2021 at 06:47:45AM -0800, Christoph Hellwig wrote:
> On Mon, Dec 06, 2021 at 10:45:35AM -0400, Jason Gunthorpe via iommu wrote:
> > IIRC the only thing this function does is touch ACPI and OF stuff?
> > Isn't that firmware?
> > 
> > AFAICT amba uses this because AMBA devices might be linked to DT
> > descriptions?
> 
> But DT descriptions aren't firmware.  They are usually either passed onb
> the bootloader or in some deeply embedded setups embedded into the
> kernel image.

Pedenatically yes, but do you know of a common word to refer to both
OF and ACPI that is better than firmware? :)

AFAICT we already use firwmare for this in a few places, eg
fwnode_handle and so on.

Jason
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-06 Thread Christoph Hellwig
On Mon, Dec 06, 2021 at 10:45:35AM -0400, Jason Gunthorpe via iommu wrote:
> IIRC the only thing this function does is touch ACPI and OF stuff?
> Isn't that firmware?
> 
> AFAICT amba uses this because AMBA devices might be linked to DT
> descriptions?

But DT descriptions aren't firmware.  They are usually either passed onb
the bootloader or in some deeply embedded setups embedded into the
kernel image.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-06 Thread Jason Gunthorpe via iommu
On Mon, Dec 06, 2021 at 06:13:01AM -0800, Christoph Hellwig wrote:
> On Mon, Dec 06, 2021 at 08:53:07AM +0100, Greg Kroah-Hartman wrote:
> > On Mon, Dec 06, 2021 at 09:58:48AM +0800, Lu Baolu wrote:
> > > The platform_dma_configure() is shared between platform and amba bus
> > > drivers. Rename the common helper to firmware_dma_configure() so that
> > > both platform and amba bus drivers could customize their dma_configure
> > > callbacks.
> > 
> > Please, if you are going to call these functions "firmware_" then move
> > them to the drivers/firmware/ location, they do not belong in
> > drivers/base/platform.c anymore, right?
> 
> firmware seems rather misnamed anyway, amba doesn't reall have anything
> to do with "firmware".

IIRC the only thing this function does is touch ACPI and OF stuff?
Isn't that firmware?

AFAICT amba uses this because AMBA devices might be linked to DT
descriptions?

Jason
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-06 Thread Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 06:13:01AM -0800, Christoph Hellwig wrote:
> On Mon, Dec 06, 2021 at 08:53:07AM +0100, Greg Kroah-Hartman wrote:
> > On Mon, Dec 06, 2021 at 09:58:48AM +0800, Lu Baolu wrote:
> > > The platform_dma_configure() is shared between platform and amba bus
> > > drivers. Rename the common helper to firmware_dma_configure() so that
> > > both platform and amba bus drivers could customize their dma_configure
> > > callbacks.
> > 
> > Please, if you are going to call these functions "firmware_" then move
> > them to the drivers/firmware/ location, they do not belong in
> > drivers/base/platform.c anymore, right?
> 
> firmware seems rather misnamed anyway, amba doesn't reall have anything
> to do with "firmware".

Then the name is not a good one and should be called something else :)
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-06 Thread Christoph Hellwig
On Mon, Dec 06, 2021 at 08:53:07AM +0100, Greg Kroah-Hartman wrote:
> On Mon, Dec 06, 2021 at 09:58:48AM +0800, Lu Baolu wrote:
> > The platform_dma_configure() is shared between platform and amba bus
> > drivers. Rename the common helper to firmware_dma_configure() so that
> > both platform and amba bus drivers could customize their dma_configure
> > callbacks.
> 
> Please, if you are going to call these functions "firmware_" then move
> them to the drivers/firmware/ location, they do not belong in
> drivers/base/platform.c anymore, right?

firmware seems rather misnamed anyway, amba doesn't reall have anything
to do with "firmware".
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure()

2021-12-05 Thread Greg Kroah-Hartman
On Mon, Dec 06, 2021 at 09:58:48AM +0800, Lu Baolu wrote:
> The platform_dma_configure() is shared between platform and amba bus
> drivers. Rename the common helper to firmware_dma_configure() so that
> both platform and amba bus drivers could customize their dma_configure
> callbacks.

Please, if you are going to call these functions "firmware_" then move
them to the drivers/firmware/ location, they do not belong in
drivers/base/platform.c anymore, right?

thanks,

greg k-h
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu