* [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver.
@ 2014-06-24 13:57 Varun Sethi
[not found] ` <1403618237-26248-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
[not found] ` <1403618237-26248-2-git-send-email-Varun.Sethi__13822.953499812$1403630309$gmane$org@freescale.com>
0 siblings, 2 replies; 12+ messages in thread
From: Varun Sethi @ 2014-06-24 13:57 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
joro-zLv9SwRftAIdnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
alex.williamson-H+wXaHxf7aLQT0dZR+AlfA
Cc: Varun Sethi
This patch set contains fixes for the PAMU driver.
The patches are based on 3.16-rc1.
Varun Sethi (3):
Fix PAMU window size check.
Fix the device domain attach condition.
Fix the error condition during iommu group creation.
drivers/iommu/fsl_pamu.c | 8 ++++----
drivers/iommu/fsl_pamu_domain.c | 19 +++++++++----------
2 files changed, 13 insertions(+), 14 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 12+ messages in thread[parent not found: <1403618237-26248-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* [PATCH 1/3] iommu/fsl: Fix PAMU window size check. [not found] ` <1403618237-26248-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2014-06-24 13:57 ` Varun Sethi [not found] ` <1403618237-26248-2-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-06-24 13:57 ` [PATCH 2/3] iommu/fsl: Fix the device domain attach condition Varun Sethi ` (2 subsequent siblings) 3 siblings, 1 reply; 12+ messages in thread From: Varun Sethi @ 2014-06-24 13:57 UTC (permalink / raw) To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, joro-zLv9SwRftAIdnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, alex.williamson-H+wXaHxf7aLQT0dZR+AlfA Cc: Varun Sethi is_power_of_2 requires an unsigned long parameter which would lead to truncation of 64 bit values on 32 bit architectures. __ffs also expects an unsigned long parameter thus won't work for 64 bit values on 32 bit architectures. Signed-off-by: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/iommu/fsl_pamu.c | 8 ++++---- drivers/iommu/fsl_pamu_domain.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index b99dd88..bb446d7 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -170,10 +170,10 @@ int pamu_disable_liodn(int liodn) static unsigned int map_addrspace_size_to_wse(phys_addr_t addrspace_size) { /* Bug if not a power of 2 */ - BUG_ON(!is_power_of_2(addrspace_size)); + BUG_ON((addrspace_size & (addrspace_size - 1))); /* window size is 2^(WSE+1) bytes */ - return __ffs(addrspace_size) - 1; + return fls64(addrspace_size) - 2; } /* Derive the PAACE window count encoding for the subwindow count */ @@ -351,7 +351,7 @@ int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, struct paace *ppaace; unsigned long fspi; - if (!is_power_of_2(win_size) || win_size < PAMU_PAGE_SIZE) { + if ((win_size & (win_size - 1)) || win_size < PAMU_PAGE_SIZE) { pr_debug("window size too small or not a power of two %llx\n", win_size); return -EINVAL; } @@ -464,7 +464,7 @@ int pamu_config_spaace(int liodn, u32 subwin_cnt, u32 subwin, return -ENOENT; } - if (!is_power_of_2(subwin_size) || subwin_size < PAMU_PAGE_SIZE) { + if ((subwin_size & (subwin_size - 1)) || subwin_size < PAMU_PAGE_SIZE) { pr_debug("subwindow size out of range, or not a power of 2\n"); return -EINVAL; } diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index 93072ba..3dd0b8e 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -301,7 +301,7 @@ static int check_size(u64 size, dma_addr_t iova) * Size must be a power of two and at least be equal * to PAMU page size. */ - if (!is_power_of_2(size) || size < PAMU_PAGE_SIZE) { + if ((size & (size - 1)) || size < PAMU_PAGE_SIZE) { pr_debug("%s: size too small or not a power of two\n", __func__); return -EINVAL; } -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 12+ messages in thread
[parent not found: <1403618237-26248-2-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH 1/3] iommu/fsl: Fix PAMU window size check. [not found] ` <1403618237-26248-2-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2014-07-04 10:44 ` Joerg Roedel [not found] ` <20140704104430.GD13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 12+ messages in thread From: Joerg Roedel @ 2014-07-04 10:44 UTC (permalink / raw) To: Varun Sethi Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Tue, Jun 24, 2014 at 07:27:15PM +0530, Varun Sethi wrote: > /* window size is 2^(WSE+1) bytes */ > - return __ffs(addrspace_size) - 1; > + return fls64(addrspace_size) - 2; This looks bogus, why do you replace ffs (find-first-bit) by fls (find-last-bit)? Joerg ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <20140704104430.GD13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>]
* RE: [PATCH 1/3] iommu/fsl: Fix PAMU window size check. [not found] ` <20140704104430.GD13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> @ 2014-07-04 12:47 ` Varun Sethi 0 siblings, 0 replies; 12+ messages in thread From: Varun Sethi @ 2014-07-04 12:47 UTC (permalink / raw) To: Joerg Roedel Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > -----Original Message----- > From: Joerg Roedel [mailto:joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org] > Sent: Friday, July 04, 2014 4:15 PM > To: Sethi Varun-B16395 > Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; > linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org > Subject: Re: [PATCH 1/3] iommu/fsl: Fix PAMU window size check. > > On Tue, Jun 24, 2014 at 07:27:15PM +0530, Varun Sethi wrote: > > /* window size is 2^(WSE+1) bytes */ > > - return __ffs(addrspace_size) - 1; > > + return fls64(addrspace_size) - 2; > > This looks bogus, why do you replace ffs (find-first-bit) by fls (find- > last-bit)? > Address space size is always a power of 2. This change was required to handle address sizes > 32bit width on 32 bit architectures. -Varun ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/3] iommu/fsl: Fix the device domain attach condition. [not found] ` <1403618237-26248-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-06-24 13:57 ` [PATCH 1/3] iommu/fsl: Fix PAMU window size check Varun Sethi @ 2014-06-24 13:57 ` Varun Sethi [not found] ` <1403618237-26248-3-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-06-24 13:57 ` [PATCH 3/3] iommu/fsl: Fix the error condition during iommu group Varun Sethi 2014-07-07 8:32 ` [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver Joerg Roedel 3 siblings, 1 reply; 12+ messages in thread From: Varun Sethi @ 2014-06-24 13:57 UTC (permalink / raw) To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, joro-zLv9SwRftAIdnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, alex.williamson-H+wXaHxf7aLQT0dZR+AlfA Cc: Varun Sethi ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <1403618237-26248-3-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>]
* Re: [PATCH 2/3] iommu/fsl: Fix the device domain attach condition. [not found] ` <1403618237-26248-3-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> @ 2014-07-04 10:54 ` Joerg Roedel [not found] ` <20140704105430.GE13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 12+ messages in thread From: Joerg Roedel @ 2014-07-04 10:54 UTC (permalink / raw) To: Varun Sethi Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA Hmm, On Tue, Jun 24, 2014 at 07:27:16PM +0530, Varun Sethi wrote: > - old_domain_info = find_domain(dev); > + old_domain_info = dev->archdata.iommu_domain; > if (old_domain_info && old_domain_info->domain != dma_domain) { > spin_unlock_irqrestore(&device_domain_lock, flags); > detach_device(dev, old_domain_info->domain); Wouldn't this set dev->archdata.iommu_domain to NULL anyway, so that ... > @@ -399,7 +394,7 @@ static void attach_device(struct fsl_dma_domain *dma_domain, int liodn, struct d > * the info for the first LIODN as all > * LIODNs share the same domain > */ > - if (!old_domain_info) > + if (!dev->archdata.iommu_domain) > dev->archdata.iommu_domain = info; We already know that it _must_ be NULL here? > spin_unlock_irqrestore(&device_domain_lock, flags); This would shrink down the patch to: diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index 93072ba..d21b554 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -399,8 +399,7 @@ static void attach_device(struct fsl_dma_domain *dma_domain, int liodn, struct d * the info for the first LIODN as all * LIODNs share the same domain */ - if (!old_domain_info) - dev->archdata.iommu_domain = info; + dev->archdata.iommu_domain = info; spin_unlock_irqrestore(&device_domain_lock, flags); } ^ permalink raw reply related [flat|nested] 12+ messages in thread
[parent not found: <20140704105430.GE13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>]
* RE: [PATCH 2/3] iommu/fsl: Fix the device domain attach condition. [not found] ` <20140704105430.GE13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> @ 2014-07-04 12:50 ` Varun Sethi 0 siblings, 0 replies; 12+ messages in thread From: Varun Sethi @ 2014-07-04 12:50 UTC (permalink / raw) To: Joerg Roedel Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > -----Original Message----- > From: Joerg Roedel [mailto:joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org] > Sent: Friday, July 04, 2014 4:25 PM > To: Sethi Varun-B16395 > Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; > linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org > Subject: Re: [PATCH 2/3] iommu/fsl: Fix the device domain attach > condition. > > Hmm, > > On Tue, Jun 24, 2014 at 07:27:16PM +0530, Varun Sethi wrote: > > - old_domain_info = find_domain(dev); > > + old_domain_info = dev->archdata.iommu_domain; > > if (old_domain_info && old_domain_info->domain != dma_domain) { > > spin_unlock_irqrestore(&device_domain_lock, flags); > > detach_device(dev, old_domain_info->domain); > > Wouldn't this set dev->archdata.iommu_domain to NULL anyway, so that ... > Not for the case where device has multiple LIODNs. > > @@ -399,7 +394,7 @@ static void attach_device(struct fsl_dma_domain > *dma_domain, int liodn, struct d > > * the info for the first LIODN as all > > * LIODNs share the same domain > > */ > > - if (!old_domain_info) > > + if (!dev->archdata.iommu_domain) > > dev->archdata.iommu_domain = info; > > We already know that it _must_ be NULL here? > That won't be true for devices having multiple LIODNs > > spin_unlock_irqrestore(&device_domain_lock, flags); > > This would shrink down the patch to: > > diff --git a/drivers/iommu/fsl_pamu_domain.c > b/drivers/iommu/fsl_pamu_domain.c index 93072ba..d21b554 100644 > --- a/drivers/iommu/fsl_pamu_domain.c > +++ b/drivers/iommu/fsl_pamu_domain.c > @@ -399,8 +399,7 @@ static void attach_device(struct fsl_dma_domain > *dma_domain, int liodn, struct d > * the info for the first LIODN as all > * LIODNs share the same domain > */ > - if (!old_domain_info) > - dev->archdata.iommu_domain = info; > + dev->archdata.iommu_domain = info; For devices having multiple LIODNs, we don't want to overwrite the info. -Varun ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/3] iommu/fsl: Fix the error condition during iommu group [not found] ` <1403618237-26248-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 2014-06-24 13:57 ` [PATCH 1/3] iommu/fsl: Fix PAMU window size check Varun Sethi 2014-06-24 13:57 ` [PATCH 2/3] iommu/fsl: Fix the device domain attach condition Varun Sethi @ 2014-06-24 13:57 ` Varun Sethi 2014-07-07 8:32 ` [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver Joerg Roedel 3 siblings, 0 replies; 12+ messages in thread From: Varun Sethi @ 2014-06-24 13:57 UTC (permalink / raw) To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, joro-zLv9SwRftAIdnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, alex.williamson-H+wXaHxf7aLQT0dZR+AlfA Cc: Varun Sethi Earlier PTR_ERR was being returned even if group was set to null. Now, we explicitly set an ERR_PTR value in case the group pointer is NULL. Signed-off-by: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> --- drivers/iommu/fsl_pamu_domain.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index 54060d1..af47648 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -1037,12 +1037,15 @@ root_bus: group = get_shared_pci_device_group(pdev); } + if (!group) + group = ERR_PTR(-ENODEV); + return group; } static int fsl_pamu_add_device(struct device *dev) { - struct iommu_group *group = NULL; + struct iommu_group *group = ERR_PTR(-ENODEV); struct pci_dev *pdev; const u32 *prop; int ret, len; @@ -1065,7 +1068,7 @@ static int fsl_pamu_add_device(struct device *dev) group = get_device_iommu_group(dev); } - if (!group || IS_ERR(group)) + if (IS_ERR(group)) return PTR_ERR(group); ret = iommu_group_add_device(group, dev); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver. [not found] ` <1403618237-26248-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> ` (2 preceding siblings ...) 2014-06-24 13:57 ` [PATCH 3/3] iommu/fsl: Fix the error condition during iommu group Varun Sethi @ 2014-07-07 8:32 ` Joerg Roedel [not found] ` <20140707083216.GA1958-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> 3 siblings, 1 reply; 12+ messages in thread From: Joerg Roedel @ 2014-07-07 8:32 UTC (permalink / raw) To: Varun Sethi Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Tue, Jun 24, 2014 at 07:27:14PM +0530, Varun Sethi wrote: > This patch set contains fixes for the PAMU driver. > The patches are based on 3.16-rc1. > > Varun Sethi (3): > Fix PAMU window size check. > Fix the device domain attach condition. > Fix the error condition during iommu group creation. > > drivers/iommu/fsl_pamu.c | 8 ++++---- > drivers/iommu/fsl_pamu_domain.c | 19 +++++++++---------- > 2 files changed, 13 insertions(+), 14 deletions(-) Applied to iommu/fixes, thanks. ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <20140707083216.GA1958-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>]
* RE: [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver. [not found] ` <20140707083216.GA1958-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> @ 2014-07-07 8:55 ` Varun Sethi 0 siblings, 0 replies; 12+ messages in thread From: Varun Sethi @ 2014-07-07 8:55 UTC (permalink / raw) To: Joerg Roedel Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Thanks Joerg. > -----Original Message----- > From: Joerg Roedel [mailto:joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org] > Sent: Monday, July 07, 2014 2:02 PM > To: Sethi Varun-B16395 > Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; > linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org > Subject: Re: [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver. > > On Tue, Jun 24, 2014 at 07:27:14PM +0530, Varun Sethi wrote: > > This patch set contains fixes for the PAMU driver. > > The patches are based on 3.16-rc1. > > > > Varun Sethi (3): > > Fix PAMU window size check. > > Fix the device domain attach condition. > > Fix the error condition during iommu group creation. > > > > drivers/iommu/fsl_pamu.c | 8 ++++---- > > drivers/iommu/fsl_pamu_domain.c | 19 +++++++++---------- > > 2 files changed, 13 insertions(+), 14 deletions(-) > > Applied to iommu/fixes, thanks. > ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <1403618237-26248-2-git-send-email-Varun.Sethi__13822.953499812$1403630309$gmane$org@freescale.com>]
* Re: [PATCH 1/3] iommu/fsl: Fix PAMU window size check. [not found] ` <1403618237-26248-2-git-send-email-Varun.Sethi__13822.953499812$1403630309$gmane$org@freescale.com> @ 2014-07-02 7:46 ` Emil Medve [not found] ` <53B3B8B9.30400-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org> 0 siblings, 1 reply; 12+ messages in thread From: Emil Medve @ 2014-07-02 7:46 UTC (permalink / raw) To: Varun Sethi, iommu, joro, linux-kernel, linuxppc-dev, alex.williamson On 06/24/2014 08:57 AM, Varun Sethi wrote: > is_power_of_2 requires an unsigned long parameter which would > lead to truncation of 64 bit values on 32 bit architectures. > > __ffs also expects an unsigned long parameter thus won't work > for 64 bit values on 32 bit architectures. > > Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> > --- > drivers/iommu/fsl_pamu.c | 8 ++++---- > drivers/iommu/fsl_pamu_domain.c | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) Tested-by: Emil Medve <Emilian.Medve@Freescale.com> On a P4080 DS (i.e. 32-bit SoC) Cheers, _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <53B3B8B9.30400-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>]
* RE: [PATCH 1/3] iommu/fsl: Fix PAMU window size check. [not found] ` <53B3B8B9.30400-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org> @ 2014-07-02 8:58 ` Varun Sethi 0 siblings, 0 replies; 12+ messages in thread From: Varun Sethi @ 2014-07-02 8:58 UTC (permalink / raw) To: Emilian Medve, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Thanks Emil. > -----Original Message----- > From: Emil Medve [mailto:Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org] > Sent: Wednesday, July 02, 2014 1:16 PM > To: Sethi Varun-B16395; iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; > joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linuxppc- > dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org > Subject: Re: [PATCH 1/3] iommu/fsl: Fix PAMU window size check. > > On 06/24/2014 08:57 AM, Varun Sethi wrote: > > is_power_of_2 requires an unsigned long parameter which would lead to > > truncation of 64 bit values on 32 bit architectures. > > > > __ffs also expects an unsigned long parameter thus won't work for 64 > > bit values on 32 bit architectures. > > > > Signed-off-by: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org> > > --- > > drivers/iommu/fsl_pamu.c | 8 ++++---- > > drivers/iommu/fsl_pamu_domain.c | 2 +- > > 2 files changed, 5 insertions(+), 5 deletions(-) > > Tested-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org> > > On a P4080 DS (i.e. 32-bit SoC) > > > Cheers, ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-07-07 8:55 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-24 13:57 [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver Varun Sethi
[not found] ` <1403618237-26248-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-06-24 13:57 ` [PATCH 1/3] iommu/fsl: Fix PAMU window size check Varun Sethi
[not found] ` <1403618237-26248-2-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-07-04 10:44 ` Joerg Roedel
[not found] ` <20140704104430.GD13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-07-04 12:47 ` Varun Sethi
2014-06-24 13:57 ` [PATCH 2/3] iommu/fsl: Fix the device domain attach condition Varun Sethi
[not found] ` <1403618237-26248-3-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-07-04 10:54 ` Joerg Roedel
[not found] ` <20140704105430.GE13434-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-07-04 12:50 ` Varun Sethi
2014-06-24 13:57 ` [PATCH 3/3] iommu/fsl: Fix the error condition during iommu group Varun Sethi
2014-07-07 8:32 ` [PATCH 0/3] iommu/fsl: Fixes for the PAMU driver Joerg Roedel
[not found] ` <20140707083216.GA1958-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-07-07 8:55 ` Varun Sethi
[not found] ` <1403618237-26248-2-git-send-email-Varun.Sethi__13822.953499812$1403630309$gmane$org@freescale.com>
2014-07-02 7:46 ` [PATCH 1/3] iommu/fsl: Fix PAMU window size check Emil Medve
[not found] ` <53B3B8B9.30400-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
2014-07-02 8:58 ` Varun Sethi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).