2013-07-02 16:08:36

by Grant Grundler

[permalink] [raw]
Subject: [PATCH] iommu/exynos: remove dead code (set_prefbuf)

exynos_sysmmu_set_prefbuf() is not called any where.

Signed-off-by: Grant Grundler <[email protected]>
---
drivers/iommu/exynos-iommu.c | 44 --------------------------------------------
1 file changed, 44 deletions(-)

diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 3f32d64..0740189 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -247,50 +247,6 @@ static void __sysmmu_set_prefbuf(void __iomem *sfrbase, unsigned long base,
__raw_writel(size - 1 + base, sfrbase + REG_PB0_EADDR + idx * 8);
}

-void exynos_sysmmu_set_prefbuf(struct device *dev,
- unsigned long base0, unsigned long size0,
- unsigned long base1, unsigned long size1)
-{
- struct sysmmu_drvdata *data = dev_get_drvdata(dev->archdata.iommu);
- unsigned long flags;
- int i;
-
- BUG_ON((base0 + size0) <= base0);
- BUG_ON((size1 > 0) && ((base1 + size1) <= base1));
-
- read_lock_irqsave(&data->lock, flags);
- if (!is_sysmmu_active(data))
- goto finish;
-
- for (i = 0; i < data->nsfrs; i++) {
- if ((readl(data->sfrbases[i] + REG_MMU_VERSION) >> 28) == 3) {
- if (!sysmmu_block(data->sfrbases[i]))
- continue;
-
- if (size1 == 0) {
- if (size0 <= SZ_128K) {
- base1 = base0;
- size1 = size0;
- } else {
- size1 = size0 -
- ALIGN(size0 / 2, SZ_64K);
- size0 = size0 - size1;
- base1 = base0 + size0;
- }
- }
-
- __sysmmu_set_prefbuf(
- data->sfrbases[i], base0, size0, 0);
- __sysmmu_set_prefbuf(
- data->sfrbases[i], base1, size1, 1);
-
- sysmmu_unblock(data->sfrbases[i]);
- }
- }
-finish:
- read_unlock_irqrestore(&data->lock, flags);
-}
-
static void __set_fault_handler(struct sysmmu_drvdata *data,
sysmmu_fault_handler_t handler)
{
--
1.8.3


2013-08-05 16:39:49

by Grant Grundler

[permalink] [raw]
Subject: Re: [PATCH] iommu/exynos: remove dead code (set_prefbuf)

Ping?

Adding linux-iommu ML.

thanks,
grant

On Tue, Jul 2, 2013 at 9:08 AM, Grant Grundler <[email protected]> wrote:
> exynos_sysmmu_set_prefbuf() is not called any where.
>
> Signed-off-by: Grant Grundler <[email protected]>
> ---
> drivers/iommu/exynos-iommu.c | 44 --------------------------------------------
> 1 file changed, 44 deletions(-)
>
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index 3f32d64..0740189 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -247,50 +247,6 @@ static void __sysmmu_set_prefbuf(void __iomem *sfrbase, unsigned long base,
> __raw_writel(size - 1 + base, sfrbase + REG_PB0_EADDR + idx * 8);
> }
>
> -void exynos_sysmmu_set_prefbuf(struct device *dev,
> - unsigned long base0, unsigned long size0,
> - unsigned long base1, unsigned long size1)
> -{
> - struct sysmmu_drvdata *data = dev_get_drvdata(dev->archdata.iommu);
> - unsigned long flags;
> - int i;
> -
> - BUG_ON((base0 + size0) <= base0);
> - BUG_ON((size1 > 0) && ((base1 + size1) <= base1));
> -
> - read_lock_irqsave(&data->lock, flags);
> - if (!is_sysmmu_active(data))
> - goto finish;
> -
> - for (i = 0; i < data->nsfrs; i++) {
> - if ((readl(data->sfrbases[i] + REG_MMU_VERSION) >> 28) == 3) {
> - if (!sysmmu_block(data->sfrbases[i]))
> - continue;
> -
> - if (size1 == 0) {
> - if (size0 <= SZ_128K) {
> - base1 = base0;
> - size1 = size0;
> - } else {
> - size1 = size0 -
> - ALIGN(size0 / 2, SZ_64K);
> - size0 = size0 - size1;
> - base1 = base0 + size0;
> - }
> - }
> -
> - __sysmmu_set_prefbuf(
> - data->sfrbases[i], base0, size0, 0);
> - __sysmmu_set_prefbuf(
> - data->sfrbases[i], base1, size1, 1);
> -
> - sysmmu_unblock(data->sfrbases[i]);
> - }
> - }
> -finish:
> - read_unlock_irqrestore(&data->lock, flags);
> -}
> -
> static void __set_fault_handler(struct sysmmu_drvdata *data,
> sysmmu_fault_handler_t handler)
> {
> --
> 1.8.3
>

2013-08-06 09:47:46

by Cho KyongHo

[permalink] [raw]
Subject: RE: [PATCH] iommu/exynos: remove dead code (set_prefbuf)

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Grant Grundler
> Sent: Tuesday, August 06, 2013 1:40 AM
>
> Ping?
>
> Adding linux-iommu ML.
>
> thanks,
> grant
>
> On Tue, Jul 2, 2013 at 9:08 AM, Grant Grundler <[email protected]> wrote:
> > exynos_sysmmu_set_prefbuf() is not called any where.
> >
> > Signed-off-by: Grant Grundler <[email protected]>

Reviewed-by: Cho KyongHo <[email protected]>

Thank you.

KyongHo.
> > ---
> > drivers/iommu/exynos-iommu.c | 44 --------------------------------------------
> > 1 file changed, 44 deletions(-)
> >
> > diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> > index 3f32d64..0740189 100644
> > --- a/drivers/iommu/exynos-iommu.c
> > +++ b/drivers/iommu/exynos-iommu.c
> > @@ -247,50 +247,6 @@ static void __sysmmu_set_prefbuf(void __iomem *sfrbase, unsigned long base,
> > __raw_writel(size - 1 + base, sfrbase + REG_PB0_EADDR + idx * 8);
> > }
> >
> > -void exynos_sysmmu_set_prefbuf(struct device *dev,
> > - unsigned long base0, unsigned long size0,
> > - unsigned long base1, unsigned long size1)
> > -{
> > - struct sysmmu_drvdata *data = dev_get_drvdata(dev->archdata.iommu);
> > - unsigned long flags;
> > - int i;
> > -
> > - BUG_ON((base0 + size0) <= base0);
> > - BUG_ON((size1 > 0) && ((base1 + size1) <= base1));
> > -
> > - read_lock_irqsave(&data->lock, flags);
> > - if (!is_sysmmu_active(data))
> > - goto finish;
> > -
> > - for (i = 0; i < data->nsfrs; i++) {
> > - if ((readl(data->sfrbases[i] + REG_MMU_VERSION) >> 28) == 3) {
> > - if (!sysmmu_block(data->sfrbases[i]))
> > - continue;
> > -
> > - if (size1 == 0) {
> > - if (size0 <= SZ_128K) {
> > - base1 = base0;
> > - size1 = size0;
> > - } else {
> > - size1 = size0 -
> > - ALIGN(size0 / 2, SZ_64K);
> > - size0 = size0 - size1;
> > - base1 = base0 + size0;
> > - }
> > - }
> > -
> > - __sysmmu_set_prefbuf(
> > - data->sfrbases[i], base0, size0, 0);
> > - __sysmmu_set_prefbuf(
> > - data->sfrbases[i], base1, size1, 1);
> > -
> > - sysmmu_unblock(data->sfrbases[i]);
> > - }
> > - }
> > -finish:
> > - read_unlock_irqrestore(&data->lock, flags);
> > -}
> > -
> > static void __set_fault_handler(struct sysmmu_drvdata *data,
> > sysmmu_fault_handler_t handler)
> > {
> > --
> > 1.8.3
> >

2013-08-14 09:30:14

by Joerg Roedel

[permalink] [raw]
Subject: Re: [PATCH] iommu/exynos: remove dead code (set_prefbuf)

On Tue, Jul 02, 2013 at 09:08:27AM -0700, Grant Grundler wrote:
> exynos_sysmmu_set_prefbuf() is not called any where.
>
> Signed-off-by: Grant Grundler <[email protected]>
> ---
> drivers/iommu/exynos-iommu.c | 44 --------------------------------------------
> 1 file changed, 44 deletions(-)

Applied to arm/exynos, thanks.