All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2013-12-30  6:55 ` Chen Baozi
  0 siblings, 0 replies; 30+ messages in thread
From: Chen Baozi @ 2013-12-30  6:55 UTC (permalink / raw)
  To: linux-arm-kernel, xen-devel
  Cc: catalin.marinas, stefano.stabellini, linux-kernel, msalter, Chen Baozi

xen_remap used to be defined as ioremap_cached on arm64. In commit
c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
was deleted, while xen_remap stays the same. This would lead to
the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
on arm64 as ioremap_cache on arm64 to fix it.

Signed-off-by: Chen Baozi <baozich@gmail.com>
---
 arch/arm/include/asm/xen/page.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 75579a9..b3368df 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 	return __set_phys_to_machine(pfn, mfn);
 }
 
+#ifdef CONFIG_ARM64
+#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
+#else
 #define xen_remap(cookie, size) ioremap_cached((cookie), (size));
+#endif
 
 #endif /* _ASM_ARM_XEN_PAGE_H */
-- 
1.8.4.3


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2013-12-30  6:55 ` Chen Baozi
  0 siblings, 0 replies; 30+ messages in thread
From: Chen Baozi @ 2013-12-30  6:55 UTC (permalink / raw)
  To: linux-arm-kernel

xen_remap used to be defined as ioremap_cached on arm64. In commit
c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
was deleted, while xen_remap stays the same. This would lead to
the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
on arm64 as ioremap_cache on arm64 to fix it.

Signed-off-by: Chen Baozi <baozich@gmail.com>
---
 arch/arm/include/asm/xen/page.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 75579a9..b3368df 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 	return __set_phys_to_machine(pfn, mfn);
 }
 
+#ifdef CONFIG_ARM64
+#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
+#else
 #define xen_remap(cookie, size) ioremap_cached((cookie), (size));
+#endif
 
 #endif /* _ASM_ARM_XEN_PAGE_H */
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [Xen-devel] [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30  6:55 ` Chen Baozi
@ 2013-12-30  9:43   ` Wei Liu
  -1 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-30  9:43 UTC (permalink / raw)
  To: Chen Baozi
  Cc: linux-arm-kernel, xen-devel, catalin.marinas, msalter,
	linux-kernel, Stefano Stabellini

On Mon, Dec 30, 2013 at 6:55 AM, Chen Baozi <baozich@gmail.com> wrote:
> xen_remap used to be defined as ioremap_cached on arm64. In commit
> c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> was deleted, while xen_remap stays the same. This would lead to
> the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> on arm64 as ioremap_cache on arm64 to fix it.
>
> Signed-off-by: Chen Baozi <baozich@gmail.com>
> ---
>  arch/arm/include/asm/xen/page.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
> index 75579a9..b3368df 100644
> --- a/arch/arm/include/asm/xen/page.h
> +++ b/arch/arm/include/asm/xen/page.h
> @@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
>         return __set_phys_to_machine(pfn, mfn);
>  }
>
> +#ifdef CONFIG_ARM64
> +#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
> +#else
>  #define xen_remap(cookie, size) ioremap_cached((cookie), (size));

Looks like there's an redundant semicolon in the original implementation.

Wei.

> +#endif
>
>  #endif /* _ASM_ARM_XEN_PAGE_H */
> --
> 1.8.4.3
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Xen-devel] [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2013-12-30  9:43   ` Wei Liu
  0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-30  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 30, 2013 at 6:55 AM, Chen Baozi <baozich@gmail.com> wrote:
> xen_remap used to be defined as ioremap_cached on arm64. In commit
> c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> was deleted, while xen_remap stays the same. This would lead to
> the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> on arm64 as ioremap_cache on arm64 to fix it.
>
> Signed-off-by: Chen Baozi <baozich@gmail.com>
> ---
>  arch/arm/include/asm/xen/page.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
> index 75579a9..b3368df 100644
> --- a/arch/arm/include/asm/xen/page.h
> +++ b/arch/arm/include/asm/xen/page.h
> @@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
>         return __set_phys_to_machine(pfn, mfn);
>  }
>
> +#ifdef CONFIG_ARM64
> +#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
> +#else
>  #define xen_remap(cookie, size) ioremap_cached((cookie), (size));

Looks like there's an redundant semicolon in the original implementation.

Wei.

> +#endif
>
>  #endif /* _ASM_ARM_XEN_PAGE_H */
> --
> 1.8.4.3
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel at lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30  6:55 ` Chen Baozi
  (?)
@ 2013-12-30  9:43 ` Wei Liu
  -1 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2013-12-30  9:43 UTC (permalink / raw)
  To: Chen Baozi
  Cc: Stefano Stabellini, catalin.marinas, linux-kernel, msalter,
	xen-devel, linux-arm-kernel

On Mon, Dec 30, 2013 at 6:55 AM, Chen Baozi <baozich@gmail.com> wrote:
> xen_remap used to be defined as ioremap_cached on arm64. In commit
> c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> was deleted, while xen_remap stays the same. This would lead to
> the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> on arm64 as ioremap_cache on arm64 to fix it.
>
> Signed-off-by: Chen Baozi <baozich@gmail.com>
> ---
>  arch/arm/include/asm/xen/page.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
> index 75579a9..b3368df 100644
> --- a/arch/arm/include/asm/xen/page.h
> +++ b/arch/arm/include/asm/xen/page.h
> @@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
>         return __set_phys_to_machine(pfn, mfn);
>  }
>
> +#ifdef CONFIG_ARM64
> +#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
> +#else
>  #define xen_remap(cookie, size) ioremap_cached((cookie), (size));

Looks like there's an redundant semicolon in the original implementation.

Wei.

> +#endif
>
>  #endif /* _ASM_ARM_XEN_PAGE_H */
> --
> 1.8.4.3
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30  6:55 ` Chen Baozi
@ 2013-12-30 19:20   ` Mark Salter
  -1 siblings, 0 replies; 30+ messages in thread
From: Mark Salter @ 2013-12-30 19:20 UTC (permalink / raw)
  To: Chen Baozi
  Cc: linux-arm-kernel, xen-devel, catalin.marinas, stefano.stabellini,
	linux-kernel

On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> xen_remap used to be defined as ioremap_cached on arm64. In commit
> c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> was deleted, while xen_remap stays the same. This would lead to
> the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> on arm64 as ioremap_cache on arm64 to fix it.
> 

I missed that include of arm header by arm64 when looking for users
of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
grepping the kernel tree, I see:

  ioremap_cached()
    defined by: arm, metag, unicore32
    used by: arch/arm/include/asm/xen/page.h
             drivers/mtd/maps/pxa2xx-flash.c

  ioremap_cache()
    defined by: arm64, sh, xtensa, ia64, x86
    used by: drivers/video/vesafb.c
             drivers/char/toshiba.c
             drivers/acpi/apei
             drivers/lguest/lguest_device.c
             drivers/sfi/sfi_core.c
             include/linux/acpi_io.h

I think it would be better to just avoid the confusion and the ifdef in
asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.

--Mark



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2013-12-30 19:20   ` Mark Salter
  0 siblings, 0 replies; 30+ messages in thread
From: Mark Salter @ 2013-12-30 19:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> xen_remap used to be defined as ioremap_cached on arm64. In commit
> c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> was deleted, while xen_remap stays the same. This would lead to
> the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> on arm64 as ioremap_cache on arm64 to fix it.
> 

I missed that include of arm header by arm64 when looking for users
of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
grepping the kernel tree, I see:

  ioremap_cached()
    defined by: arm, metag, unicore32
    used by: arch/arm/include/asm/xen/page.h
             drivers/mtd/maps/pxa2xx-flash.c

  ioremap_cache()
    defined by: arm64, sh, xtensa, ia64, x86
    used by: drivers/video/vesafb.c
             drivers/char/toshiba.c
             drivers/acpi/apei
             drivers/lguest/lguest_device.c
             drivers/sfi/sfi_core.c
             include/linux/acpi_io.h

I think it would be better to just avoid the confusion and the ifdef in
asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.

--Mark

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30  6:55 ` Chen Baozi
                   ` (2 preceding siblings ...)
  (?)
@ 2013-12-30 19:20 ` Mark Salter
  -1 siblings, 0 replies; 30+ messages in thread
From: Mark Salter @ 2013-12-30 19:20 UTC (permalink / raw)
  To: Chen Baozi
  Cc: xen-devel, stefano.stabellini, linux-kernel, linux-arm-kernel,
	catalin.marinas

On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> xen_remap used to be defined as ioremap_cached on arm64. In commit
> c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> was deleted, while xen_remap stays the same. This would lead to
> the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> on arm64 as ioremap_cache on arm64 to fix it.
> 

I missed that include of arm header by arm64 when looking for users
of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
grepping the kernel tree, I see:

  ioremap_cached()
    defined by: arm, metag, unicore32
    used by: arch/arm/include/asm/xen/page.h
             drivers/mtd/maps/pxa2xx-flash.c

  ioremap_cache()
    defined by: arm64, sh, xtensa, ia64, x86
    used by: drivers/video/vesafb.c
             drivers/char/toshiba.c
             drivers/acpi/apei
             drivers/lguest/lguest_device.c
             drivers/sfi/sfi_core.c
             include/linux/acpi_io.h

I think it would be better to just avoid the confusion and the ifdef in
asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.

--Mark

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30 19:20   ` Mark Salter
@ 2014-01-03 13:13     ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:13 UTC (permalink / raw)
  To: Mark Salter
  Cc: Chen Baozi, linux-arm-kernel, xen-devel, catalin.marinas,
	stefano.stabellini, linux-kernel, Konrad Rzeszutek Wilk

On Mon, 30 Dec 2013, Mark Salter wrote:
> On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > was deleted, while xen_remap stays the same. This would lead to
> > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > on arm64 as ioremap_cache on arm64 to fix it.
> > 
> 
> I missed that include of arm header by arm64 when looking for users
> of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> grepping the kernel tree, I see:
> 
>   ioremap_cached()
>     defined by: arm, metag, unicore32
>     used by: arch/arm/include/asm/xen/page.h
>              drivers/mtd/maps/pxa2xx-flash.c
> 
>   ioremap_cache()
>     defined by: arm64, sh, xtensa, ia64, x86
>     used by: drivers/video/vesafb.c
>              drivers/char/toshiba.c
>              drivers/acpi/apei
>              drivers/lguest/lguest_device.c
>              drivers/sfi/sfi_core.c
>              include/linux/acpi_io.h
> 
> I think it would be better to just avoid the confusion and the ifdef in
> asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.

While I welcome the suggestion, this is a critical fix for a regression
that I think should go in as soon as possible, maybe 3.13-rc7, while I
don't think that a global s/ioremap_cached/ioremap_cache would be
acceptable at this stage.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2014-01-03 13:13     ` Stefano Stabellini
  0 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 30 Dec 2013, Mark Salter wrote:
> On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > was deleted, while xen_remap stays the same. This would lead to
> > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > on arm64 as ioremap_cache on arm64 to fix it.
> > 
> 
> I missed that include of arm header by arm64 when looking for users
> of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> grepping the kernel tree, I see:
> 
>   ioremap_cached()
>     defined by: arm, metag, unicore32
>     used by: arch/arm/include/asm/xen/page.h
>              drivers/mtd/maps/pxa2xx-flash.c
> 
>   ioremap_cache()
>     defined by: arm64, sh, xtensa, ia64, x86
>     used by: drivers/video/vesafb.c
>              drivers/char/toshiba.c
>              drivers/acpi/apei
>              drivers/lguest/lguest_device.c
>              drivers/sfi/sfi_core.c
>              include/linux/acpi_io.h
> 
> I think it would be better to just avoid the confusion and the ifdef in
> asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.

While I welcome the suggestion, this is a critical fix for a regression
that I think should go in as soon as possible, maybe 3.13-rc7, while I
don't think that a global s/ioremap_cached/ioremap_cache would be
acceptable at this stage.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30 19:20   ` Mark Salter
  (?)
@ 2014-01-03 13:13   ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:13 UTC (permalink / raw)
  To: Mark Salter
  Cc: stefano.stabellini, catalin.marinas, linux-kernel, xen-devel,
	Chen Baozi, linux-arm-kernel

On Mon, 30 Dec 2013, Mark Salter wrote:
> On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > was deleted, while xen_remap stays the same. This would lead to
> > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > on arm64 as ioremap_cache on arm64 to fix it.
> > 
> 
> I missed that include of arm header by arm64 when looking for users
> of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> grepping the kernel tree, I see:
> 
>   ioremap_cached()
>     defined by: arm, metag, unicore32
>     used by: arch/arm/include/asm/xen/page.h
>              drivers/mtd/maps/pxa2xx-flash.c
> 
>   ioremap_cache()
>     defined by: arm64, sh, xtensa, ia64, x86
>     used by: drivers/video/vesafb.c
>              drivers/char/toshiba.c
>              drivers/acpi/apei
>              drivers/lguest/lguest_device.c
>              drivers/sfi/sfi_core.c
>              include/linux/acpi_io.h
> 
> I think it would be better to just avoid the confusion and the ifdef in
> asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.

While I welcome the suggestion, this is a critical fix for a regression
that I think should go in as soon as possible, maybe 3.13-rc7, while I
don't think that a global s/ioremap_cached/ioremap_cache would be
acceptable at this stage.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Xen-devel] [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30  9:43   ` Wei Liu
@ 2014-01-03 13:19     ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:19 UTC (permalink / raw)
  To: Wei Liu
  Cc: Chen Baozi, linux-arm-kernel, xen-devel, catalin.marinas,
	msalter, linux-kernel, Stefano Stabellini

On Mon, 30 Dec 2013, Wei Liu wrote:
> On Mon, Dec 30, 2013 at 6:55 AM, Chen Baozi <baozich@gmail.com> wrote:
> > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > was deleted, while xen_remap stays the same. This would lead to
> > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > on arm64 as ioremap_cache on arm64 to fix it.
> >
> > Signed-off-by: Chen Baozi <baozich@gmail.com>
> > ---
> >  arch/arm/include/asm/xen/page.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
> > index 75579a9..b3368df 100644
> > --- a/arch/arm/include/asm/xen/page.h
> > +++ b/arch/arm/include/asm/xen/page.h
> > @@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
> >         return __set_phys_to_machine(pfn, mfn);
> >  }
> >
> > +#ifdef CONFIG_ARM64
> > +#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
> > +#else
> >  #define xen_remap(cookie, size) ioremap_cached((cookie), (size));
> 
> Looks like there's an redundant semicolon in the original implementation.

Well spotted. We can fix this separately.
Do you want to send a patch for it?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Xen-devel] [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2014-01-03 13:19     ` Stefano Stabellini
  0 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 30 Dec 2013, Wei Liu wrote:
> On Mon, Dec 30, 2013 at 6:55 AM, Chen Baozi <baozich@gmail.com> wrote:
> > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > was deleted, while xen_remap stays the same. This would lead to
> > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > on arm64 as ioremap_cache on arm64 to fix it.
> >
> > Signed-off-by: Chen Baozi <baozich@gmail.com>
> > ---
> >  arch/arm/include/asm/xen/page.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
> > index 75579a9..b3368df 100644
> > --- a/arch/arm/include/asm/xen/page.h
> > +++ b/arch/arm/include/asm/xen/page.h
> > @@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
> >         return __set_phys_to_machine(pfn, mfn);
> >  }
> >
> > +#ifdef CONFIG_ARM64
> > +#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
> > +#else
> >  #define xen_remap(cookie, size) ioremap_cached((cookie), (size));
> 
> Looks like there's an redundant semicolon in the original implementation.

Well spotted. We can fix this separately.
Do you want to send a patch for it?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2013-12-30  9:43   ` Wei Liu
  (?)
@ 2014-01-03 13:19   ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:19 UTC (permalink / raw)
  To: Wei Liu
  Cc: Stefano Stabellini, catalin.marinas, linux-kernel, msalter,
	xen-devel, Chen Baozi, linux-arm-kernel

On Mon, 30 Dec 2013, Wei Liu wrote:
> On Mon, Dec 30, 2013 at 6:55 AM, Chen Baozi <baozich@gmail.com> wrote:
> > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > was deleted, while xen_remap stays the same. This would lead to
> > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > on arm64 as ioremap_cache on arm64 to fix it.
> >
> > Signed-off-by: Chen Baozi <baozich@gmail.com>
> > ---
> >  arch/arm/include/asm/xen/page.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
> > index 75579a9..b3368df 100644
> > --- a/arch/arm/include/asm/xen/page.h
> > +++ b/arch/arm/include/asm/xen/page.h
> > @@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
> >         return __set_phys_to_machine(pfn, mfn);
> >  }
> >
> > +#ifdef CONFIG_ARM64
> > +#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
> > +#else
> >  #define xen_remap(cookie, size) ioremap_cached((cookie), (size));
> 
> Looks like there's an redundant semicolon in the original implementation.

Well spotted. We can fix this separately.
Do you want to send a patch for it?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 13:13     ` Stefano Stabellini
@ 2014-01-03 13:32       ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:32 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Mark Salter, Chen Baozi, linux-arm-kernel, xen-devel,
	catalin.marinas, linux-kernel, Konrad Rzeszutek Wilk,
	robherring2, will.deacon, linux

On Fri, 3 Jan 2014, Stefano Stabellini wrote:
> On Mon, 30 Dec 2013, Mark Salter wrote:
> > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > was deleted, while xen_remap stays the same. This would lead to
> > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > on arm64 as ioremap_cache on arm64 to fix it.
> > > 
> > 
> > I missed that include of arm header by arm64 when looking for users
> > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > grepping the kernel tree, I see:
> > 
> >   ioremap_cached()
> >     defined by: arm, metag, unicore32
> >     used by: arch/arm/include/asm/xen/page.h
> >              drivers/mtd/maps/pxa2xx-flash.c
> > 
> >   ioremap_cache()
> >     defined by: arm64, sh, xtensa, ia64, x86
> >     used by: drivers/video/vesafb.c
> >              drivers/char/toshiba.c
> >              drivers/acpi/apei
> >              drivers/lguest/lguest_device.c
> >              drivers/sfi/sfi_core.c
> >              include/linux/acpi_io.h
> > 
> > I think it would be better to just avoid the confusion and the ifdef in
> > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> 
> While I welcome the suggestion, this is a critical fix for a regression
> that I think should go in as soon as possible, maybe 3.13-rc7, while I
> don't think that a global s/ioremap_cached/ioremap_cache would be
> acceptable at this stage.

BTW Rob Herring sent a patch in November to solve the problem by
renaming ioremap_cached to ioremap_cache under arch/arm:

http://marc.info/?l=linux-arm-kernel&m=138394601804783

I wrongly assumed that was going to go in.
I think it is too late for that now. We'll have to go this this patch
for 3.13.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2014-01-03 13:32       ` Stefano Stabellini
  0 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 3 Jan 2014, Stefano Stabellini wrote:
> On Mon, 30 Dec 2013, Mark Salter wrote:
> > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > was deleted, while xen_remap stays the same. This would lead to
> > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > on arm64 as ioremap_cache on arm64 to fix it.
> > > 
> > 
> > I missed that include of arm header by arm64 when looking for users
> > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > grepping the kernel tree, I see:
> > 
> >   ioremap_cached()
> >     defined by: arm, metag, unicore32
> >     used by: arch/arm/include/asm/xen/page.h
> >              drivers/mtd/maps/pxa2xx-flash.c
> > 
> >   ioremap_cache()
> >     defined by: arm64, sh, xtensa, ia64, x86
> >     used by: drivers/video/vesafb.c
> >              drivers/char/toshiba.c
> >              drivers/acpi/apei
> >              drivers/lguest/lguest_device.c
> >              drivers/sfi/sfi_core.c
> >              include/linux/acpi_io.h
> > 
> > I think it would be better to just avoid the confusion and the ifdef in
> > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> 
> While I welcome the suggestion, this is a critical fix for a regression
> that I think should go in as soon as possible, maybe 3.13-rc7, while I
> don't think that a global s/ioremap_cached/ioremap_cache would be
> acceptable at this stage.

BTW Rob Herring sent a patch in November to solve the problem by
renaming ioremap_cached to ioremap_cache under arch/arm:

http://marc.info/?l=linux-arm-kernel&m=138394601804783

I wrongly assumed that was going to go in.
I think it is too late for that now. We'll have to go this this patch
for 3.13.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 13:13     ` Stefano Stabellini
  (?)
@ 2014-01-03 13:32     ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 13:32 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: linux, catalin.marinas, will.deacon, linux-kernel, robherring2,
	Mark Salter, xen-devel, Chen Baozi, linux-arm-kernel

On Fri, 3 Jan 2014, Stefano Stabellini wrote:
> On Mon, 30 Dec 2013, Mark Salter wrote:
> > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > was deleted, while xen_remap stays the same. This would lead to
> > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > on arm64 as ioremap_cache on arm64 to fix it.
> > > 
> > 
> > I missed that include of arm header by arm64 when looking for users
> > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > grepping the kernel tree, I see:
> > 
> >   ioremap_cached()
> >     defined by: arm, metag, unicore32
> >     used by: arch/arm/include/asm/xen/page.h
> >              drivers/mtd/maps/pxa2xx-flash.c
> > 
> >   ioremap_cache()
> >     defined by: arm64, sh, xtensa, ia64, x86
> >     used by: drivers/video/vesafb.c
> >              drivers/char/toshiba.c
> >              drivers/acpi/apei
> >              drivers/lguest/lguest_device.c
> >              drivers/sfi/sfi_core.c
> >              include/linux/acpi_io.h
> > 
> > I think it would be better to just avoid the confusion and the ifdef in
> > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> 
> While I welcome the suggestion, this is a critical fix for a regression
> that I think should go in as soon as possible, maybe 3.13-rc7, while I
> don't think that a global s/ioremap_cached/ioremap_cache would be
> acceptable at this stage.

BTW Rob Herring sent a patch in November to solve the problem by
renaming ioremap_cached to ioremap_cache under arch/arm:

http://marc.info/?l=linux-arm-kernel&m=138394601804783

I wrongly assumed that was going to go in.
I think it is too late for that now. We'll have to go this this patch
for 3.13.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 13:13     ` Stefano Stabellini
@ 2014-01-03 14:31       ` Russell King - ARM Linux
  -1 siblings, 0 replies; 30+ messages in thread
From: Russell King - ARM Linux @ 2014-01-03 14:31 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Mark Salter, catalin.marinas, Konrad Rzeszutek Wilk,
	linux-kernel, xen-devel, Chen Baozi, linux-arm-kernel

On Fri, Jan 03, 2014 at 01:13:57PM +0000, Stefano Stabellini wrote:
> On Mon, 30 Dec 2013, Mark Salter wrote:
> > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > was deleted, while xen_remap stays the same. This would lead to
> > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > on arm64 as ioremap_cache on arm64 to fix it.
> > > 
> > 
> > I missed that include of arm header by arm64 when looking for users
> > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > grepping the kernel tree, I see:
> > 
> >   ioremap_cached()
> >     defined by: arm, metag, unicore32
> >     used by: arch/arm/include/asm/xen/page.h
> >              drivers/mtd/maps/pxa2xx-flash.c
> > 
> >   ioremap_cache()
> >     defined by: arm64, sh, xtensa, ia64, x86
> >     used by: drivers/video/vesafb.c
> >              drivers/char/toshiba.c
> >              drivers/acpi/apei
> >              drivers/lguest/lguest_device.c
> >              drivers/sfi/sfi_core.c
> >              include/linux/acpi_io.h
> > 
> > I think it would be better to just avoid the confusion and the ifdef in
> > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> 
> While I welcome the suggestion, this is a critical fix for a regression
> that I think should go in as soon as possible, maybe 3.13-rc7, while I
> don't think that a global s/ioremap_cached/ioremap_cache would be
> acceptable at this stage.

Since it's just one driver, just make the change for ARM (provided the
grep is accurate.)  pxa2xx-flash is only used on ARM and not the other
two listed there, so looks like metag and unicore just decided to copy
ARM.

My grep concurs with yours.

So... just change ioremap_cached -> ioremap_cache in
arch/arm/include/asm/io.h
arch/arm/include/asm/xen/page.h
drivers/mtd/maps/pxa2xx-flash.c

to fix the problem.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2014-01-03 14:31       ` Russell King - ARM Linux
  0 siblings, 0 replies; 30+ messages in thread
From: Russell King - ARM Linux @ 2014-01-03 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 03, 2014 at 01:13:57PM +0000, Stefano Stabellini wrote:
> On Mon, 30 Dec 2013, Mark Salter wrote:
> > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > was deleted, while xen_remap stays the same. This would lead to
> > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > on arm64 as ioremap_cache on arm64 to fix it.
> > > 
> > 
> > I missed that include of arm header by arm64 when looking for users
> > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > grepping the kernel tree, I see:
> > 
> >   ioremap_cached()
> >     defined by: arm, metag, unicore32
> >     used by: arch/arm/include/asm/xen/page.h
> >              drivers/mtd/maps/pxa2xx-flash.c
> > 
> >   ioremap_cache()
> >     defined by: arm64, sh, xtensa, ia64, x86
> >     used by: drivers/video/vesafb.c
> >              drivers/char/toshiba.c
> >              drivers/acpi/apei
> >              drivers/lguest/lguest_device.c
> >              drivers/sfi/sfi_core.c
> >              include/linux/acpi_io.h
> > 
> > I think it would be better to just avoid the confusion and the ifdef in
> > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> 
> While I welcome the suggestion, this is a critical fix for a regression
> that I think should go in as soon as possible, maybe 3.13-rc7, while I
> don't think that a global s/ioremap_cached/ioremap_cache would be
> acceptable at this stage.

Since it's just one driver, just make the change for ARM (provided the
grep is accurate.)  pxa2xx-flash is only used on ARM and not the other
two listed there, so looks like metag and unicore just decided to copy
ARM.

My grep concurs with yours.

So... just change ioremap_cached -> ioremap_cache in
arch/arm/include/asm/io.h
arch/arm/include/asm/xen/page.h
drivers/mtd/maps/pxa2xx-flash.c

to fix the problem.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 13:13     ` Stefano Stabellini
                       ` (2 preceding siblings ...)
  (?)
@ 2014-01-03 14:31     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 30+ messages in thread
From: Russell King - ARM Linux @ 2014-01-03 14:31 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: catalin.marinas, linux-kernel, Mark Salter, xen-devel,
	Chen Baozi, linux-arm-kernel

On Fri, Jan 03, 2014 at 01:13:57PM +0000, Stefano Stabellini wrote:
> On Mon, 30 Dec 2013, Mark Salter wrote:
> > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > was deleted, while xen_remap stays the same. This would lead to
> > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > on arm64 as ioremap_cache on arm64 to fix it.
> > > 
> > 
> > I missed that include of arm header by arm64 when looking for users
> > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > grepping the kernel tree, I see:
> > 
> >   ioremap_cached()
> >     defined by: arm, metag, unicore32
> >     used by: arch/arm/include/asm/xen/page.h
> >              drivers/mtd/maps/pxa2xx-flash.c
> > 
> >   ioremap_cache()
> >     defined by: arm64, sh, xtensa, ia64, x86
> >     used by: drivers/video/vesafb.c
> >              drivers/char/toshiba.c
> >              drivers/acpi/apei
> >              drivers/lguest/lguest_device.c
> >              drivers/sfi/sfi_core.c
> >              include/linux/acpi_io.h
> > 
> > I think it would be better to just avoid the confusion and the ifdef in
> > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> 
> While I welcome the suggestion, this is a critical fix for a regression
> that I think should go in as soon as possible, maybe 3.13-rc7, while I
> don't think that a global s/ioremap_cached/ioremap_cache would be
> acceptable at this stage.

Since it's just one driver, just make the change for ARM (provided the
grep is accurate.)  pxa2xx-flash is only used on ARM and not the other
two listed there, so looks like metag and unicore just decided to copy
ARM.

My grep concurs with yours.

So... just change ioremap_cached -> ioremap_cache in
arch/arm/include/asm/io.h
arch/arm/include/asm/xen/page.h
drivers/mtd/maps/pxa2xx-flash.c

to fix the problem.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 14:31       ` Russell King - ARM Linux
@ 2014-01-03 14:49         ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 14:49 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Stefano Stabellini, Mark Salter, catalin.marinas,
	Konrad Rzeszutek Wilk, linux-kernel, xen-devel, Chen Baozi,
	linux-arm-kernel

On Fri, 3 Jan 2014, Russell King - ARM Linux wrote:
> On Fri, Jan 03, 2014 at 01:13:57PM +0000, Stefano Stabellini wrote:
> > On Mon, 30 Dec 2013, Mark Salter wrote:
> > > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > > was deleted, while xen_remap stays the same. This would lead to
> > > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > > on arm64 as ioremap_cache on arm64 to fix it.
> > > > 
> > > 
> > > I missed that include of arm header by arm64 when looking for users
> > > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > > grepping the kernel tree, I see:
> > > 
> > >   ioremap_cached()
> > >     defined by: arm, metag, unicore32
> > >     used by: arch/arm/include/asm/xen/page.h
> > >              drivers/mtd/maps/pxa2xx-flash.c
> > > 
> > >   ioremap_cache()
> > >     defined by: arm64, sh, xtensa, ia64, x86
> > >     used by: drivers/video/vesafb.c
> > >              drivers/char/toshiba.c
> > >              drivers/acpi/apei
> > >              drivers/lguest/lguest_device.c
> > >              drivers/sfi/sfi_core.c
> > >              include/linux/acpi_io.h
> > > 
> > > I think it would be better to just avoid the confusion and the ifdef in
> > > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> > 
> > While I welcome the suggestion, this is a critical fix for a regression
> > that I think should go in as soon as possible, maybe 3.13-rc7, while I
> > don't think that a global s/ioremap_cached/ioremap_cache would be
> > acceptable at this stage.
> 
> Since it's just one driver, just make the change for ARM (provided the
> grep is accurate.)  pxa2xx-flash is only used on ARM and not the other
> two listed there, so looks like metag and unicore just decided to copy
> ARM.
> 
> My grep concurs with yours.
> 
> So... just change ioremap_cached -> ioremap_cache in
> arch/arm/include/asm/io.h
> arch/arm/include/asm/xen/page.h
> drivers/mtd/maps/pxa2xx-flash.c
> 
> to fix the problem.

OK. That would be Rob's patch below.
Are you going to take care of sending it to Linus?

Thanks for the quick reply.


>From robherring2@gmail.com Fri Nov  8 21:26:03 2013
Date: Fri, 8 Nov 2013 15:25:56 -0600
From: Rob Herring <robherring2@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Rob Herring <rob.herring@calxeda.com>, Russell King <linux@arm.linux.org.uk>, Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>
Subject: [PATCH] ARM: rename ioremap_cached to ioremap_cache

From: Rob Herring <rob.herring@calxeda.com>

ioremap_cache is more aligned with other architectures. There are only
2 users of this in the kernel: pxa2xx-flash and Xen.

This fixes Xen build failures on arm64:

drivers/tty/hvc/hvc_xen.c:233:2: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
drivers/xen/grant-table.c:1174:3: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
drivers/xen/xenbus/xenbus_probe.c:778:4: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
---
 arch/arm/include/asm/io.h       | 2 +-
 arch/arm/include/asm/xen/page.h | 2 +-
 drivers/mtd/maps/pxa2xx-flash.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 3c597c2..fbeb39c 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -329,7 +329,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  */
 #define ioremap(cookie,size)		__arm_ioremap((cookie), (size), MT_DEVICE)
 #define ioremap_nocache(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE)
-#define ioremap_cached(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
+#define ioremap_cache(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
 #define ioremap_wc(cookie,size)		__arm_ioremap((cookie), (size), MT_DEVICE_WC)
 #define iounmap				__arm_iounmap
 
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 5d0e4c5..a8591fb 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -123,6 +123,6 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 	return __set_phys_to_machine(pfn, mfn);
 }
 
-#define xen_remap(cookie, size) ioremap_cached((cookie), (size));
+#define xen_remap(cookie, size) ioremap_cache((cookie), (size));
 
 #endif /* _ASM_ARM_XEN_PAGE_H */
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index d210d13..0f55589 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -73,7 +73,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 	info->map.cached =
-		ioremap_cached(info->map.phys, info->map.size);
+		ioremap_cache(info->map.phys, info->map.size);
 	if (!info->map.cached)
 		printk(KERN_WARNING "Failed to ioremap cached %s\n",
 		       info->map.name);
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2014-01-03 14:49         ` Stefano Stabellini
  0 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 14:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 3 Jan 2014, Russell King - ARM Linux wrote:
> On Fri, Jan 03, 2014 at 01:13:57PM +0000, Stefano Stabellini wrote:
> > On Mon, 30 Dec 2013, Mark Salter wrote:
> > > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > > was deleted, while xen_remap stays the same. This would lead to
> > > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > > on arm64 as ioremap_cache on arm64 to fix it.
> > > > 
> > > 
> > > I missed that include of arm header by arm64 when looking for users
> > > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > > grepping the kernel tree, I see:
> > > 
> > >   ioremap_cached()
> > >     defined by: arm, metag, unicore32
> > >     used by: arch/arm/include/asm/xen/page.h
> > >              drivers/mtd/maps/pxa2xx-flash.c
> > > 
> > >   ioremap_cache()
> > >     defined by: arm64, sh, xtensa, ia64, x86
> > >     used by: drivers/video/vesafb.c
> > >              drivers/char/toshiba.c
> > >              drivers/acpi/apei
> > >              drivers/lguest/lguest_device.c
> > >              drivers/sfi/sfi_core.c
> > >              include/linux/acpi_io.h
> > > 
> > > I think it would be better to just avoid the confusion and the ifdef in
> > > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> > 
> > While I welcome the suggestion, this is a critical fix for a regression
> > that I think should go in as soon as possible, maybe 3.13-rc7, while I
> > don't think that a global s/ioremap_cached/ioremap_cache would be
> > acceptable at this stage.
> 
> Since it's just one driver, just make the change for ARM (provided the
> grep is accurate.)  pxa2xx-flash is only used on ARM and not the other
> two listed there, so looks like metag and unicore just decided to copy
> ARM.
> 
> My grep concurs with yours.
> 
> So... just change ioremap_cached -> ioremap_cache in
> arch/arm/include/asm/io.h
> arch/arm/include/asm/xen/page.h
> drivers/mtd/maps/pxa2xx-flash.c
> 
> to fix the problem.

OK. That would be Rob's patch below.
Are you going to take care of sending it to Linus?

Thanks for the quick reply.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 14:31       ` Russell King - ARM Linux
  (?)
  (?)
@ 2014-01-03 14:49       ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 14:49 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: catalin.marinas, Stefano Stabellini, linux-kernel, Mark Salter,
	xen-devel, Chen Baozi, linux-arm-kernel

On Fri, 3 Jan 2014, Russell King - ARM Linux wrote:
> On Fri, Jan 03, 2014 at 01:13:57PM +0000, Stefano Stabellini wrote:
> > On Mon, 30 Dec 2013, Mark Salter wrote:
> > > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote:
> > > > xen_remap used to be defined as ioremap_cached on arm64. In commit
> > > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
> > > > was deleted, while xen_remap stays the same. This would lead to
> > > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
> > > > on arm64 as ioremap_cache on arm64 to fix it.
> > > > 
> > > 
> > > I missed that include of arm header by arm64 when looking for users
> > > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway,
> > > grepping the kernel tree, I see:
> > > 
> > >   ioremap_cached()
> > >     defined by: arm, metag, unicore32
> > >     used by: arch/arm/include/asm/xen/page.h
> > >              drivers/mtd/maps/pxa2xx-flash.c
> > > 
> > >   ioremap_cache()
> > >     defined by: arm64, sh, xtensa, ia64, x86
> > >     used by: drivers/video/vesafb.c
> > >              drivers/char/toshiba.c
> > >              drivers/acpi/apei
> > >              drivers/lguest/lguest_device.c
> > >              drivers/sfi/sfi_core.c
> > >              include/linux/acpi_io.h
> > > 
> > > I think it would be better to just avoid the confusion and the ifdef in
> > > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache.
> > 
> > While I welcome the suggestion, this is a critical fix for a regression
> > that I think should go in as soon as possible, maybe 3.13-rc7, while I
> > don't think that a global s/ioremap_cached/ioremap_cache would be
> > acceptable at this stage.
> 
> Since it's just one driver, just make the change for ARM (provided the
> grep is accurate.)  pxa2xx-flash is only used on ARM and not the other
> two listed there, so looks like metag and unicore just decided to copy
> ARM.
> 
> My grep concurs with yours.
> 
> So... just change ioremap_cached -> ioremap_cache in
> arch/arm/include/asm/io.h
> arch/arm/include/asm/xen/page.h
> drivers/mtd/maps/pxa2xx-flash.c
> 
> to fix the problem.

OK. That would be Rob's patch below.
Are you going to take care of sending it to Linus?

Thanks for the quick reply.


>From robherring2@gmail.com Fri Nov  8 21:26:03 2013
Date: Fri, 8 Nov 2013 15:25:56 -0600
From: Rob Herring <robherring2@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Rob Herring <rob.herring@calxeda.com>, Russell King <linux@arm.linux.org.uk>, Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>
Subject: [PATCH] ARM: rename ioremap_cached to ioremap_cache

From: Rob Herring <rob.herring@calxeda.com>

ioremap_cache is more aligned with other architectures. There are only
2 users of this in the kernel: pxa2xx-flash and Xen.

This fixes Xen build failures on arm64:

drivers/tty/hvc/hvc_xen.c:233:2: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
drivers/xen/grant-table.c:1174:3: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
drivers/xen/xenbus/xenbus_probe.c:778:4: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
---
 arch/arm/include/asm/io.h       | 2 +-
 arch/arm/include/asm/xen/page.h | 2 +-
 drivers/mtd/maps/pxa2xx-flash.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 3c597c2..fbeb39c 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -329,7 +329,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  */
 #define ioremap(cookie,size)		__arm_ioremap((cookie), (size), MT_DEVICE)
 #define ioremap_nocache(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE)
-#define ioremap_cached(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
+#define ioremap_cache(cookie,size)	__arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
 #define ioremap_wc(cookie,size)		__arm_ioremap((cookie), (size), MT_DEVICE_WC)
 #define iounmap				__arm_iounmap
 
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 5d0e4c5..a8591fb 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -123,6 +123,6 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 	return __set_phys_to_machine(pfn, mfn);
 }
 
-#define xen_remap(cookie, size) ioremap_cached((cookie), (size));
+#define xen_remap(cookie, size) ioremap_cache((cookie), (size));
 
 #endif /* _ASM_ARM_XEN_PAGE_H */
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index d210d13..0f55589 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -73,7 +73,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 	info->map.cached =
-		ioremap_cached(info->map.phys, info->map.size);
+		ioremap_cache(info->map.phys, info->map.size);
 	if (!info->map.cached)
 		printk(KERN_WARNING "Failed to ioremap cached %s\n",
 		       info->map.name);
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 14:49         ` Stefano Stabellini
@ 2014-01-03 14:59           ` Russell King - ARM Linux
  -1 siblings, 0 replies; 30+ messages in thread
From: Russell King - ARM Linux @ 2014-01-03 14:59 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Mark Salter, catalin.marinas, Konrad Rzeszutek Wilk,
	linux-kernel, xen-devel, Chen Baozi, linux-arm-kernel

On Fri, Jan 03, 2014 at 02:49:54PM +0000, Stefano Stabellini wrote:
> OK. That would be Rob's patch below.

Looks fine to me.

> Are you going to take care of sending it to Linus?

If you want to stick it in the patch system, I'll throw it in my tree.
I need to push out the next set of fixes soon anyway.

Thanks.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2014-01-03 14:59           ` Russell King - ARM Linux
  0 siblings, 0 replies; 30+ messages in thread
From: Russell King - ARM Linux @ 2014-01-03 14:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 03, 2014 at 02:49:54PM +0000, Stefano Stabellini wrote:
> OK. That would be Rob's patch below.

Looks fine to me.

> Are you going to take care of sending it to Linus?

If you want to stick it in the patch system, I'll throw it in my tree.
I need to push out the next set of fixes soon anyway.

Thanks.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 14:49         ` Stefano Stabellini
  (?)
  (?)
@ 2014-01-03 14:59         ` Russell King - ARM Linux
  -1 siblings, 0 replies; 30+ messages in thread
From: Russell King - ARM Linux @ 2014-01-03 14:59 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: catalin.marinas, linux-kernel, Mark Salter, xen-devel,
	Chen Baozi, linux-arm-kernel

On Fri, Jan 03, 2014 at 02:49:54PM +0000, Stefano Stabellini wrote:
> OK. That would be Rob's patch below.

Looks fine to me.

> Are you going to take care of sending it to Linus?

If you want to stick it in the patch system, I'll throw it in my tree.
I need to push out the next set of fixes soon anyway.

Thanks.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 14:59           ` Russell King - ARM Linux
@ 2014-01-03 15:17             ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 15:17 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Stefano Stabellini, Mark Salter, catalin.marinas,
	Konrad Rzeszutek Wilk, linux-kernel, xen-devel, Chen Baozi,
	linux-arm-kernel

On Fri, 3 Jan 2014, Russell King - ARM Linux wrote:
> On Fri, Jan 03, 2014 at 02:49:54PM +0000, Stefano Stabellini wrote:
> > OK. That would be Rob's patch below.
> 
> Looks fine to me.
> 
> > Are you going to take care of sending it to Linus?
> 
> If you want to stick it in the patch system, I'll throw it in my tree.
> I need to push out the next set of fixes soon anyway.
> 
> Thanks.

Done. My first time with the patch system, please be lenient :-)

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2014-01-03 15:17             ` Stefano Stabellini
  0 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 3 Jan 2014, Russell King - ARM Linux wrote:
> On Fri, Jan 03, 2014 at 02:49:54PM +0000, Stefano Stabellini wrote:
> > OK. That would be Rob's patch below.
> 
> Looks fine to me.
> 
> > Are you going to take care of sending it to Linus?
> 
> If you want to stick it in the patch system, I'll throw it in my tree.
> I need to push out the next set of fixes soon anyway.
> 
> Thanks.

Done. My first time with the patch system, please be lenient :-)

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH] arm64/xen: redefine xen_remap on arm64
  2014-01-03 14:59           ` Russell King - ARM Linux
  (?)
  (?)
@ 2014-01-03 15:17           ` Stefano Stabellini
  -1 siblings, 0 replies; 30+ messages in thread
From: Stefano Stabellini @ 2014-01-03 15:17 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: catalin.marinas, Stefano Stabellini, linux-kernel, Mark Salter,
	xen-devel, Chen Baozi, linux-arm-kernel

On Fri, 3 Jan 2014, Russell King - ARM Linux wrote:
> On Fri, Jan 03, 2014 at 02:49:54PM +0000, Stefano Stabellini wrote:
> > OK. That would be Rob's patch below.
> 
> Looks fine to me.
> 
> > Are you going to take care of sending it to Linus?
> 
> If you want to stick it in the patch system, I'll throw it in my tree.
> I need to push out the next set of fixes soon anyway.
> 
> Thanks.

Done. My first time with the patch system, please be lenient :-)

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH] arm64/xen: redefine xen_remap on arm64
@ 2013-12-30  6:55 Chen Baozi
  0 siblings, 0 replies; 30+ messages in thread
From: Chen Baozi @ 2013-12-30  6:55 UTC (permalink / raw)
  To: linux-arm-kernel, xen-devel
  Cc: catalin.marinas, Chen Baozi, msalter, linux-kernel, stefano.stabellini

xen_remap used to be defined as ioremap_cached on arm64. In commit
c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached
was deleted, while xen_remap stays the same. This would lead to
the failure when building with CONFIG_HVC_XEN. Redefined xen_remap
on arm64 as ioremap_cache on arm64 to fix it.

Signed-off-by: Chen Baozi <baozich@gmail.com>
---
 arch/arm/include/asm/xen/page.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 75579a9..b3368df 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -117,6 +117,10 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 	return __set_phys_to_machine(pfn, mfn);
 }
 
+#ifdef CONFIG_ARM64
+#define xen_remap(cookie, size) ioremap_cache((cookie), (size))
+#else
 #define xen_remap(cookie, size) ioremap_cached((cookie), (size));
+#endif
 
 #endif /* _ASM_ARM_XEN_PAGE_H */
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-01-03 15:18 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-30  6:55 [PATCH] arm64/xen: redefine xen_remap on arm64 Chen Baozi
2013-12-30  6:55 ` Chen Baozi
2013-12-30  9:43 ` Wei Liu
2013-12-30  9:43 ` [Xen-devel] " Wei Liu
2013-12-30  9:43   ` Wei Liu
2014-01-03 13:19   ` Stefano Stabellini
2014-01-03 13:19   ` [Xen-devel] " Stefano Stabellini
2014-01-03 13:19     ` Stefano Stabellini
2013-12-30 19:20 ` Mark Salter
2013-12-30 19:20 ` Mark Salter
2013-12-30 19:20   ` Mark Salter
2014-01-03 13:13   ` Stefano Stabellini
2014-01-03 13:13   ` Stefano Stabellini
2014-01-03 13:13     ` Stefano Stabellini
2014-01-03 13:32     ` Stefano Stabellini
2014-01-03 13:32     ` Stefano Stabellini
2014-01-03 13:32       ` Stefano Stabellini
2014-01-03 14:31     ` Russell King - ARM Linux
2014-01-03 14:31     ` Russell King - ARM Linux
2014-01-03 14:31       ` Russell King - ARM Linux
2014-01-03 14:49       ` Stefano Stabellini
2014-01-03 14:49         ` Stefano Stabellini
2014-01-03 14:59         ` Russell King - ARM Linux
2014-01-03 14:59           ` Russell King - ARM Linux
2014-01-03 15:17           ` Stefano Stabellini
2014-01-03 15:17             ` Stefano Stabellini
2014-01-03 15:17           ` Stefano Stabellini
2014-01-03 14:59         ` Russell King - ARM Linux
2014-01-03 14:49       ` Stefano Stabellini
2013-12-30  6:55 Chen Baozi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.