* [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
@ 2014-04-18 2:07 Kefeng Wang
[not found] ` <1397786874-11372-1-git-send-email-wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Kefeng Wang @ 2014-04-18 2:07 UTC (permalink / raw)
To: Will Deacon
Cc: Kefeng Wang, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
guohanjun-hv44wF8Li93QT0dZR+AlfA
There is already S2CR_TYPE_TRANS in S2CR_TYPE_TRANS macro,
so drop the second shift.
Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/iommu/arm-smmu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 8b89e33..96755ec 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
for (i = 0; i < master->num_streamids; ++i) {
u32 idx, s2cr;
idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
- s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
+ s2cr = S2CR_TYPE_TRANS |
(smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
[not found] ` <1397786874-11372-1-git-send-email-wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2014-04-18 2:31 ` Kefeng Wang
[not found] ` <53508E75.2080703-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Kefeng Wang @ 2014-04-18 2:31 UTC (permalink / raw)
To: Kefeng Wang
Cc: Will Deacon, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
guohanjun-hv44wF8Li93QT0dZR+AlfA
On 04/18 10:07, Kefeng Wang wrote:
> There is already S2CR_TYPE_TRANS in S2CR_TYPE_TRANS macro,
> so drop the second shift.
Typo issue, please use following patch.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
> drivers/iommu/arm-smmu.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 8b89e33..96755ec 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
> for (i = 0; i < master->num_streamids; ++i) {
> u32 idx, s2cr;
> idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
> - s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
> + s2cr = S2CR_TYPE_TRANS |
> (smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
> writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
> }
>
>From bfcdbee6f5e71c561dfddf8751c4eabdca1e3a56 Mon Sep 17 00:00:00 2001
From: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Date: Fri, 18 Apr 2014 10:20:48 +0800
Subject: [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
There is already S2CR_TYPE_SHIFT in S2CR_TYPE_TRANS macro,
so drop the second shift.
Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/iommu/arm-smmu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 8b89e33..96755ec 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
for (i = 0; i < master->num_streamids; ++i) {
u32 idx, s2cr;
idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
- s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
+ s2cr = S2CR_TYPE_TRANS |
(smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
[not found] ` <53508E75.2080703-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2014-04-22 10:00 ` Will Deacon
[not found] ` <20140422100015.GA7484-5wv7dgnIgG8@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Will Deacon @ 2014-04-22 10:00 UTC (permalink / raw)
To: Kefeng Wang
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
guohanjun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
On Fri, Apr 18, 2014 at 03:31:17AM +0100, Kefeng Wang wrote:
> On 04/18 10:07, Kefeng Wang wrote:
> > There is already S2CR_TYPE_TRANS in S2CR_TYPE_TRANS macro,
> > so drop the second shift.
>
> Typo issue, please use following patch.
They look the same to me -- which one should I take?
Also, since S2CR_TYPE_TRANS is 0x0, this fix isn't critical, so I'll include
it in my updates pull for 3.16.
Cheers,
Will
> > Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> > ---
> > drivers/iommu/arm-smmu.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> > index 8b89e33..96755ec 100644
> > --- a/drivers/iommu/arm-smmu.c
> > +++ b/drivers/iommu/arm-smmu.c
> > @@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
> > for (i = 0; i < master->num_streamids; ++i) {
> > u32 idx, s2cr;
> > idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
> > - s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
> > + s2cr = S2CR_TYPE_TRANS |
> > (smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
> > writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
> > }
> >
>
>
> From bfcdbee6f5e71c561dfddf8751c4eabdca1e3a56 Mon Sep 17 00:00:00 2001
> From: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> Date: Fri, 18 Apr 2014 10:20:48 +0800
> Subject: [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
>
> There is already S2CR_TYPE_SHIFT in S2CR_TYPE_TRANS macro,
> so drop the second shift.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
> drivers/iommu/arm-smmu.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 8b89e33..96755ec 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
> for (i = 0; i < master->num_streamids; ++i) {
> u32 idx, s2cr;
> idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
> - s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
> + s2cr = S2CR_TYPE_TRANS |
> (smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
> writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
> }
> --
> 1.7.1
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
[not found] ` <20140422100015.GA7484-5wv7dgnIgG8@public.gmane.org>
@ 2014-04-22 10:27 ` Kefeng Wang
[not found] ` <5356441E.3040601-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Kefeng Wang @ 2014-04-22 10:27 UTC (permalink / raw)
To: Will Deacon
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
guohanjun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
On 04/22 18:00, Will Deacon wrote:
> On Fri, Apr 18, 2014 at 03:31:17AM +0100, Kefeng Wang wrote:
>> On 04/18 10:07, Kefeng Wang wrote:
>>> There is already S2CR_TYPE_TRANS in S2CR_TYPE_TRANS macro,
^^^^^^^^^^^^^^^
>>> so drop the second shift.
>>
>> Typo issue, please use following patch.
>
> They look the same to me -- which one should I take?
>
> Also, since S2CR_TYPE_TRANS is 0x0, this fix isn't critical, so I'll include
> it in my updates pull for 3.16.
OK, please use second one, thanks.
Kefeng
>
> Cheers,
>
> Will
>
>>> Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>> ---
>>> drivers/iommu/arm-smmu.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
>>> index 8b89e33..96755ec 100644
>>> --- a/drivers/iommu/arm-smmu.c
>>> +++ b/drivers/iommu/arm-smmu.c
>>> @@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
>>> for (i = 0; i < master->num_streamids; ++i) {
>>> u32 idx, s2cr;
>>> idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
>>> - s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
>>> + s2cr = S2CR_TYPE_TRANS |
>>> (smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
>>> writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
>>> }
>>>
>>
>>
>> From bfcdbee6f5e71c561dfddf8751c4eabdca1e3a56 Mon Sep 17 00:00:00 2001
>> From: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>> Date: Fri, 18 Apr 2014 10:20:48 +0800
>> Subject: [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
>>
>> There is already S2CR_TYPE_SHIFT in S2CR_TYPE_TRANS macro,
>> so drop the second shift.
>>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>> ---
>> drivers/iommu/arm-smmu.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
>> index 8b89e33..96755ec 100644
>> --- a/drivers/iommu/arm-smmu.c
>> +++ b/drivers/iommu/arm-smmu.c
>> @@ -1167,7 +1167,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
>> for (i = 0; i < master->num_streamids; ++i) {
>> u32 idx, s2cr;
>> idx = master->smrs ? master->smrs[i].idx : master->streamids[i];
>> - s2cr = (S2CR_TYPE_TRANS << S2CR_TYPE_SHIFT) |
>> + s2cr = S2CR_TYPE_TRANS |
>> (smmu_domain->root_cfg.cbndx << S2CR_CBNDX_SHIFT);
>> writel_relaxed(s2cr, gr0_base + ARM_SMMU_GR0_S2CR(idx));
>> }
>> --
>> 1.7.1
>>
>>
>>
>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT
[not found] ` <5356441E.3040601-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2014-04-22 10:40 ` Will Deacon
0 siblings, 0 replies; 5+ messages in thread
From: Will Deacon @ 2014-04-22 10:40 UTC (permalink / raw)
To: Kefeng Wang
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
guohanjun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
On Tue, Apr 22, 2014 at 11:27:42AM +0100, Kefeng Wang wrote:
> On 04/22 18:00, Will Deacon wrote:
> > On Fri, Apr 18, 2014 at 03:31:17AM +0100, Kefeng Wang wrote:
> >> On 04/18 10:07, Kefeng Wang wrote:
> >>> There is already S2CR_TYPE_TRANS in S2CR_TYPE_TRANS macro,
> ^^^^^^^^^^^^^^^
> >>> so drop the second shift.
> >>
> >> Typo issue, please use following patch.
> >
> > They look the same to me -- which one should I take?
> >
> > Also, since S2CR_TYPE_TRANS is 0x0, this fix isn't critical, so I'll include
> > it in my updates pull for 3.16.
>
> OK, please use second one, thanks.
Ok, thanks.
Will
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-22 10:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 2:07 [PATCH] iommu/arm-smmu: fix incorrect use of S2CR_TYPE_SHIFT Kefeng Wang
[not found] ` <1397786874-11372-1-git-send-email-wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-04-18 2:31 ` Kefeng Wang
[not found] ` <53508E75.2080703-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-04-22 10:00 ` Will Deacon
[not found] ` <20140422100015.GA7484-5wv7dgnIgG8@public.gmane.org>
2014-04-22 10:27 ` Kefeng Wang
[not found] ` <5356441E.3040601-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-04-22 10:40 ` Will Deacon
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).