Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-17 Thread Joerg Roedel
On Mon, Dec 17, 2018 at 11:41:10AM +0530, Vinod Koul wrote: > On 11-12-18, 14:43, Joerg Roedel wrote: > > From: Joerg Roedel > > > > Some places in the kernel check the iommu_group pointer in > > 'struct device' in

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-12 Thread Joerg Roedel
On Wed, Dec 12, 2018 at 12:04:35PM +0100, Greg Kroah-Hartman wrote: > On Tue, Dec 11, 2018 at 02:43:38PM +0100, Joerg Roedel wrote: > > Cc: Greg Kroah-Hartman > > Acked-by: Greg Kroah-Hartman > > No need to have a cc: line if I have already acked it :) Right, I'l

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-11 Thread Joerg Roedel
On Tue, Dec 11, 2018 at 05:59:33PM +0300, Sergei Shtylyov wrote: > > +static inline bool device_iommu_mapped(struct device *dev) > > +{ > > + return (dev->iommu_group != NULL); > >You know that parens are unnecessary here, right? :-) Yes, I know, but it feels incomplete to me without them :

[PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Some places in the kernel check the iommu_group pointer in 'struct device' in order to find ot whether a device is mapped by an IOMMU. This is not good way to make this check, as the pointer will be moved to 'struct dev_iommu_data'. This way to make the ch

[PATCH 0/6 v2] Introduce device_iommu_mapped() function

2018-12-11 Thread Joerg Roedel
d on the first version. Please review and provide Acks, if there are no objections. I have some iommu patches that depend on these, so I'd like to carry this patch-set in the IOMMU tree. Regards, Joerg Joerg Roedel (6): driver core: Introduce device_iommu_mapped() function

[PATCH 3/6] ACPI/IORT: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Replace the iommu-check with a proper and readable function call. Cc: Lorenzo Pieralisi Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/acpi/arm64/iort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers

[PATCH 5/6] xhci: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Replace the dev->iommu_group check with a proper function call that better reprensents its purpose. Cc: Mathias Nyman Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH 2/6] iommu/of: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu

[PATCH 4/6] powerpc/iommu: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Use the new function to replace the open-coded iommu check. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Russell Currey Cc: Sam Bobroff Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- arch/powerpc/kernel/eeh.c | 2 +- arch/powerpc/kernel/iommu.c | 6

[PATCH 6/6] dmaengine: sh: rcar-dmac: Use device_iommu_mapped()

2018-12-11 Thread Joerg Roedel
From: Joerg Roedel Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers

Re: [PATCH v1] ACPI: Switch to use generic UUID API

2017-05-04 Thread Joerg Roedel
; - obj = acpi_evaluate_dsm_typed(handle, dmar_hp_uuid, DMAR_DSM_REV_ID, > + obj = acpi_evaluate_dsm_typed(handle, &dmar_hp_uuid, DMAR_DSM_REV_ID, > func, NULL, ACPI_TYPE_BUFFER); > if (!obj) > return -ENODEV;

Re: I'd like to donate a MacBook Pro

2017-05-03 Thread Joerg Roedel
On Wed, May 03, 2017 at 08:35:47AM -0600, Alex Henrie wrote: > 2017-05-03 5:58 GMT-06:00 Greg KH : > > On Tue, May 02, 2017 at 10:55:09PM -0600, Alex Henrie wrote: > >> Today I ran a regression test to determine which commit made the > >> keyboard stop working entirely. The last commit that worked

Re: [PATCH] keys/encrypted: Fix two crypto-on-the-stack bugs

2016-12-14 Thread Joerg Roedel
On Tue, Dec 13, 2016 at 08:40:00AM -0800, Andy Lutomirski wrote: > But I think this is rather silly. Joerg, Linus, etc: would it be okay > to change lib/dma-debug.c to allow DMA *from* rodata? Yeah, this would be fine for DMA_TO_DEVICE mappings. At least I can't think of a reason right now to not

Re: OHCI unplug kernel crash in kernel 4.3, 4.4 and 4.5

2016-02-29 Thread Joerg Roedel
Hi Stefani, On Mon, Feb 29, 2016 at 06:43:54PM +0100, Stefani Seibold wrote: > It seems that this patch solve the problem. This is the kernel log with > your patch together with the one from alan. Great, thanks for testing the fix. I queued it as a patch to my iommu/fixes branch and send it upstr

Re: OHCI unplug kernel crash in kernel 4.3, 4.4 and 4.5

2016-02-29 Thread Joerg Roedel
On Mon, Feb 29, 2016 at 10:36:07AM -0500, Alan Stern wrote: > The lines added by the patch were never executed. This means that > dev->archdata.iommu is getting set to NULL some place other than > unlink_domain_info(). I have no idea where that would be. > > Joerg, can you suggest any possibilit