On Wed, Apr 17, 2024 at 11:01:08PM -0700, Shradha Gupta wrote:
> > > > > +static ssize_t mana_attr_show(struct device *dev,
> > > > > + struct device_attribute *attr, char *buf)
> > > > > +{
> > > > > + struct pci_dev *pdev = to_pci_dev(dev);
> > > > > + struct
On Mon, Apr 15, 2024 at 02:49:49AM -0700, Shradha Gupta wrote:
> Add new device attributes to view multiport, msix, and adapter MTU
> setting for MANA device.
>
> Signed-off-by: Shradha Gupta
> ---
> .../net/ethernet/microsoft/mana/gdma_main.c | 74 +++
>
On Tue, Nov 21, 2023 at 04:06:15PM +, Robin Murphy wrote:
> > Obviously. I rejected that right away because of how incredibly
> > wrongly layered and hacky it is to do something like that.
>
> What, and dressing up the fundamental layering violation by baking it even
> further into the API
On Tue, Nov 21, 2023 at 03:47:48PM +0900, Hector Martin wrote:
> > Which is sensitive only to !NULL fwspec, and if EPROBE_DEFER is
> > returned fwspec will be freed and dev->iommu->fwspec will be NULL
> > here.
> >
> > In the NULL case it does a 'bus probe' with a NULL fwspec and all the
> >
On Sun, Nov 19, 2023 at 06:19:43PM +0900, Hector Martin wrote:
> >> +static int iommu_fwspec_assign_iommu(struct iommu_fwspec *fwspec,
> >> + struct device *dev,
> >> + struct fwnode_handle *iommu_fwnode)
> >> +{
> >> + const struct
On Wed, Nov 15, 2023 at 08:23:54PM +, Robin Murphy wrote:
> On 2023-11-15 3:36 pm, Jason Gunthorpe wrote:
> > On Wed, Nov 15, 2023 at 03:22:09PM +, Robin Murphy wrote:
> > > On 2023-11-15 2:05 pm, Jason Gunthorpe wrote:
> > > > [Several people have teste
On Wed, Nov 15, 2023 at 03:22:09PM +, Robin Murphy wrote:
> On 2023-11-15 2:05 pm, Jason Gunthorpe wrote:
> > [Several people have tested this now, so it is something that should sit in
> > linux-next for a while]
>
> What's the aim here? This is obviously far, far too mu
There are no external callers now.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 3 ++-
include/linux/iommu.h | 7 ---
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 5af98cad06f9ef..ea6aede326131e 100644
he bus.
The lifecycle logic is a bit tortured because of how the existing driver
code works. The new routine unconditionally takes ownership, even for
failure. This could be simplified we can get rid of the remaining
iommu_fwspec_init() callers someday.
Reviewed-by: Jerry Snitselaar
Signed-off-by:
ved logging
v1: https://lore.kernel.org/r/0-v1-5f734af130a3+34f-iommu_fwspec_...@nvidia.com
Jason Gunthorpe (17):
iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops()
iommmu/of: Do not return struct iommu_ops from of_iommu_configure()
iommu/of: Use -ENODEV consistently in of_iommu_c
gt;probe observing a
partially initialized fwspec.
Reviewed-by: Jerry Snitselaar
Reported-by: Zhenhua Huang
Closes:
https://lore.kernel.org/linux-arm-kernel/20231017163337.ge282...@ziepe.ca/T/#mee0d7bdc375541934a571ae69f43b9660f8e7312
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c |
Allow fwspec to exist independently from the dev->iommu by providing
functions to allow allocating and freeing the raw struct iommu_fwspec.
Reflow the existing paths to call the new alloc/dealloc functions.
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iomm
ase
optimization.
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 20
include/linux/iommu.h | 3 ++-
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index f17a1113f3d
at all, and doesn't require the
iommu_probe_device_lock.
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 +---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 8 +---
drivers/iommu/iommu.c | 3 +++
drivers/iommu/
led configure functions thought there was an iommu and we should try to
probe it. Remove it.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/of_iommu.c | 48 +---
1 file changed, 15 insertions(+), 33 deletions(-)
diff --git a/drivers/iommu/of_iommu.c b/drivers/io
These days the core code will free the fwspec if probe fails, no reason
for any driver to call this on a probe failure path.
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 14 +-
drivers/iommu/tegra-smmu.c| 1
iewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c| 29 ++
drivers/iommu/of_iommu.c | 82 +---
include/linux/iommu.h| 3 ++
3 files changed, 67 insertions(+), 47 deletions(-)
diff --git a/drivers/iommu/iommu.c
cher
Signed-off-by: Jason Gunthorpe
---
drivers/acpi/arm64/iort.c | 42 +-
drivers/acpi/scan.c | 89 ++-
drivers/acpi/viot.c | 45 +++-
drivers/iommu/iommu.c | 5 +--
include/acpi/acpi_bus.h | 8 ++--
i
This is only used internally to iommu.c now, get rid of it to discourage
things outside iommu.c from trying to manipulate dev->iommu->fwspec.
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 2 +-
include/linux/iommu.h | 6 --
2 files chan
turned on because FSL_PAMU uses a
global static for its priv and abuses priv for its domain.
Remove the pointless stores of NULL, all these are on paths where the core
code will free dev->iommu after the op returns.
Reviewed-by: Lu Baolu
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Guntho
Allocation of dev->iommu must be done under the
iommu_probe_device_lock. Mark this with lockdep to discourage future
mistakes.
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/iommu.
Snitselaar
Reviewed-by: Lu Baolu
Reviewed-by: Moritz Fischer
Acked-by: Christoph Hellwig
Acked-by: Rob Herring
Signed-off-by: Jason Gunthorpe
---
arch/arc/mm/dma.c | 2 +-
arch/arm/mm/dma-mapping-nommu.c | 2 +-
arch/arm/mm/dma-mapping.c | 10 +-
arch/arm64/mm/dma
This is a version of iommu_fwspec_add_ids() that takes in the fwspec as an
argument instead of getting it through dev->iommu.
Reviewed-by: Jerry Snitselaar
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 17 +++--
include/linux/iommu.h | 1 +
2 files changed,
Nothing needs this pointer. Return a normal error code with the usual
IOMMU semantic that ENODEV means 'there is no IOMMU driver'.
Reviewed-by: Jerry Snitselaar
Acked-by: Rob Herring
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/of_iommu.c | 31 +++
drivers
Nothing needs this pointer. Return a normal error code with the usual
IOMMU semantic that ENODEV means 'there is no IOMMU driver'.
Acked-by: Rafael J. Wysocki
Signed-off-by: Jason Gunthorpe
---
drivers/acpi/scan.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions
On Sun, Nov 12, 2023 at 09:44:18AM -0800, Moritz Fischer wrote:
> On Fri, Nov 03, 2023 at 01:44:55PM -0300, Jason Gunthorpe wrote:
> > This call chain is using dev->iommu->fwspec to pass around the fwspec
> > between the three parts (acpi_iommu_configure(), a
On Wed, Nov 08, 2023 at 06:34:58PM +, André Draszik wrote:
> For me, it's working fine so far on master, and I've also done my own back
> port
> to 6.1 and am currently testing both. An official back port once finalised
> could be useful, though :-)
Great, I'll post a non-RFC version next
On Fri, Nov 03, 2023 at 02:42:01PM -0700, Jerry Snitselaar wrote:
> On Fri, Nov 03, 2023 at 01:44:47PM -0300, Jason Gunthorpe wrote:
> > Nothing needs this pointer. Return a normal error code with the usual
> > IOMMU semantic that ENODEV means 'there is no IOMMU driver'.
>
On Fri, Nov 03, 2023 at 03:03:53PM -0700, Jerry Snitselaar wrote:
> With this the following can be simplified in of_iommu_configure_dev_id:
>
> diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
> index 4f77495a2543..b9b995712029 100644
> --- a/drivers/iommu/of_iommu.c
> +++
On Fri, Nov 03, 2023 at 05:48:01PM -0700, Jerry Snitselaar wrote:
> > @@ -1632,10 +1633,15 @@ int acpi_dma_configure_id(struct device *dev, enum
> > dev_dma_attr attr,
> >
> > acpi_arch_dma_setup(dev);
> >
> > - iommu = acpi_iommu_configure_id(dev, input_id);
> > - if (PTR_ERR(iommu)
Nothing needs this pointer. Return a normal error code with the usual
IOMMU semantic that ENODEV means 'there is no IOMMU driver'.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/of_iommu.c | 29 ++---
drivers/of/device.c | 22 +++---
include/linux
This is a version of iommu_fwspec_add_ids() that takes in the fwspec as an
argument instead of getting it through dev->iommu.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 17 +++--
include/linux/iommu.h | 1 +
2 files changed, 12 insertions(+), 6 deletions(-)
d
led configure functions thought there was an iommu and we should try to
probe it. Remove it.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/of_iommu.c | 42 +---
1 file changed, 13 insertions(+), 29 deletions(-)
diff --git a/drivers/iommu/of_iommu.c b/drivers/io
gt;probe observing a
partially initialized fwspec.
Reported-by: Zhenhua Huang
Closes:
https://lore.kernel.org/linux-arm-kernel/20231017163337.ge282...@ziepe.ca/T/#mee0d7bdc375541934a571ae69f43b9660f8e7312
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 12 ++--
1 file chan
the start of acpu_iommu_configure(),
pass it through all functions on the stack to fill it with data, and
finally pass it into iommu_probe_device_fwspec() which will load it into
dev->iommu under a lock.
Signed-off-by: Jason Gunthorpe
---
drivers/acpi/arm64/iort.c | 39 -
turned on because FSL_PAMU uses a
global static for its priv and abuses priv for its domain.
Remove the pointless stores of NULL, all these are on paths where the core
code will free dev->iommu after the op returns.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/amd/iommu.c
This is not being used to pass ops, it is just a way to tell if an
iommu driver was probed. These days this can be detected directly via
device_iommu_mapped(). Call device_iommu_mapped() in the two places that
need to check it and remove the iommu parameter everywhere.
Signed-off-by: Jason
the start of of_iommu_configure(), pass
it through all functions on the stack to fill it with data, and finally
pass it into iommu_probe_device_fwspec() which will load it into
dev->iommu under a lock.
Move the actual call to ops->of_xlate into the core code under
iommu_fwspec_of_xlate().
Signe
These days the core code will free the fwspec if probe fails, no reason
for any driver to call this on a probe failure path.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 14 +-
drivers/iommu/tegra-smmu.c| 1 -
2 files changed, 5 insertions
There are no external callers now.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 3 ++-
include/linux/iommu.h | 6 --
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 62c82a28cd5db3..becd1b881e62dc 100644
Allocation of dev->iommu must be done under the
iommu_probe_device_lock. Mark this with lockdep to discourage future
mistakes.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
in
Allow fwspec to exist independently from the dev->iommu by providing
functions to allow allocating and freeing the raw struct iommu_fwspec.
Reflow the existing paths to call the new alloc/dealloc functions.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c |
This is only used internally to iommu.c now, get rid of it to discourage
things outside iommu.c from trying to manipulate dev->iommu->fwspec.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 2 +-
include/linux/iommu.h | 6 --
2 files changed, 1 insertion(+), 7 deletions(-)
at all, and doesn't require the
iommu_probe_device_lock.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 +---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 8 +---
drivers/iommu/iommu.c | 3 +++
drivers/iommu/virtio-iommu.c
he bus.
The lifecycle logic is a bit tortured because of how the existing driver
code works. The new routine unconditionally takes ownership, even for
failure. This could be simplified we can get rid of the remaining
iommu_fwspec_init() callers someday.
Signed-off-by: Jason Gunthorpe
---
drivers
he dev->iommu when it calls probe.
This also removes all the touches of iommu_ops from
the *_iommu_configure() paths and makes that mechanism private to the
iommu core.
A few more lockdep assertions are added to discourage future mis-use.
This is on github: https://github.com/jgunthorpe/linux/commit
Nothing needs this pointer. Return a normal error code with the usual
IOMMU semantic that ENODEV means 'there is no IOMMU driver'.
Signed-off-by: Jason Gunthorpe
---
drivers/acpi/scan.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/acpi
ase
optimization.
Signed-off-by: Jason Gunthorpe
---
drivers/iommu/iommu.c | 20
include/linux/iommu.h | 3 ++-
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index c9a05bb49bfa17..d5e86985f6d363 100644
--- a/drivers/io
On Fri, Oct 27, 2023 at 09:35:05PM +, Long Li wrote:
> > Subject: RE: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp
> >
> >
> > > -Original Message-
> > > From: Jason Gunthorpe
> > > Sent: Monday, October 23, 2023 11
On Mon, Oct 16, 2023 at 03:12:02PM -0700, sharmaa...@linuxonhyperv.com wrote:
> diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c
> index ef3275ac92a0..19fae28985c3 100644
> --- a/drivers/infiniband/hw/mana/qp.c
> +++ b/drivers/infiniband/hw/mana/qp.c
> @@ -210,6
On Mon, Oct 16, 2023 at 03:12:00PM -0700, sharmaa...@linuxonhyperv.com wrote:
> From: Ajay Sharma
>
> Create adapter object as nice container for VF resources.
> Add error eq needed for adapter creation and later used
> for notification from Management SW. The management
> software uses this
On Mon, Oct 16, 2023 at 03:11:59PM -0700, sharmaa...@linuxonhyperv.com wrote:
> diff --git a/drivers/infiniband/hw/mana/device.c
> b/drivers/infiniband/hw/mana/device.c
> index 083f27246ba8..ea4c8c8fc10d 100644
> --- a/drivers/infiniband/hw/mana/device.c
> +++
On Mon, Oct 16, 2023 at 03:11:58PM -0700, sharmaa...@linuxonhyperv.com wrote:
> From: Ajay Sharma
>
> This patch does not introduce any functional changes. It
> creates naming convention to distinguish especially when
> used in the same function.Renaming all mana_ib_dev type
> variables to
On Fri, Sep 15, 2023 at 11:24:25AM -0700, sharmaa...@linuxonhyperv.com wrote:
> From: Ajay Sharma
>
> Change from v5:
> Use xarray for qp lookup.
this series is malformed somehow, it does not appear in patchworks
Jason
54 matches
Mail list logo