diff mbox

ARM: provide XIP_VIRT_ADDR for no-MMU builds

Message ID 1323467451-12128-1-git-send-email-u.kleine-koenig@pengutronix.de
State New
Headers show

Commit Message

Uwe Kleine-König Dec. 9, 2011, 9:50 p.m. UTC
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/arm/include/asm/memory.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Nicolas Pitre Dec. 9, 2011, 11:12 p.m. UTC | #1
On Fri, 9 Dec 2011, Uwe Kleine-König wrote:

> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Nicolas Pitre <nico@linaro.org>

> ---
>  arch/arm/include/asm/memory.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index a8997d7..fcb5757 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -116,6 +116,8 @@
>  #define MODULES_END		(END_MEM)
>  #define MODULES_VADDR		(PHYS_OFFSET)
>  
> +#define XIP_VIRT_ADDR(physaddr)  (physaddr)
> +
>  #endif /* !CONFIG_MMU */
>  
>  /*
> -- 
> 1.7.7.3
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
Russell King - ARM Linux Dec. 10, 2011, 1:02 a.m. UTC | #2
On Fri, Dec 09, 2011 at 10:50:51PM +0100, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Lack of changelog.  Say why this change is required.

> ---
>  arch/arm/include/asm/memory.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index a8997d7..fcb5757 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -116,6 +116,8 @@
>  #define MODULES_END		(END_MEM)
>  #define MODULES_VADDR		(PHYS_OFFSET)
>  
> +#define XIP_VIRT_ADDR(physaddr)  (physaddr)
> +
>  #endif /* !CONFIG_MMU */
>  
>  /*
> -- 
> 1.7.7.3
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Uwe Kleine-König Dec. 10, 2011, 9:52 a.m. UTC | #3
On Sat, Dec 10, 2011 at 01:02:21AM +0000, Russell King - ARM Linux wrote:
> On Fri, Dec 09, 2011 at 10:50:51PM +0100, Uwe Kleine-König wrote:
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Lack of changelog.  Say why this change is required.
Something like:

	XIP_VIRT_ADDR is needed for XIP builds and currently only
	defined for builds with CONFIG_MMU.

	Also provide it for no-MMU builds to make it possible to build
	an XIP kernel for MMU-less machines. As these lack an MMU it has
	to be an identity mapping.

?

Best regards
Uwe
Russell King - ARM Linux Dec. 10, 2011, 10:11 a.m. UTC | #4
On Sat, Dec 10, 2011 at 10:52:53AM +0100, Uwe Kleine-König wrote:
> On Sat, Dec 10, 2011 at 01:02:21AM +0000, Russell King - ARM Linux wrote:
> > On Fri, Dec 09, 2011 at 10:50:51PM +0100, Uwe Kleine-König wrote:
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > Lack of changelog.  Say why this change is required.
> Something like:
> 
> 	XIP_VIRT_ADDR is needed for XIP builds and currently only
> 	defined for builds with CONFIG_MMU.
> 
> 	Also provide it for no-MMU builds to make it possible to build
> 	an XIP kernel for MMU-less machines. As these lack an MMU it has
> 	to be an identity mapping.

You seem to be saying from the above that this is required also for
non-XIP kernel builds as well as XIP kernel builds.  That sounds wrong -
XIP_VIRT_ADDR is only required for XIP kernel builds.  Use outside of
that would be a bug.

Please clarify.

(And this illustrates why it is very important to give an explanation
of changes.)
Uwe Kleine-König Dec. 10, 2011, 9:58 p.m. UTC | #5
Hi Russell,

On Sat, Dec 10, 2011 at 10:11:22AM +0000, Russell King - ARM Linux wrote:
> On Sat, Dec 10, 2011 at 10:52:53AM +0100, Uwe Kleine-König wrote:
> > On Sat, Dec 10, 2011 at 01:02:21AM +0000, Russell King - ARM Linux wrote:
> > > On Fri, Dec 09, 2011 at 10:50:51PM +0100, Uwe Kleine-König wrote:
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > Lack of changelog.  Say why this change is required.
> > Something like:
> > 
> > 	XIP_VIRT_ADDR is needed for XIP builds and currently only
> > 	defined for builds with CONFIG_MMU.
> > 
> > 	Also provide it for no-MMU builds to make it possible to build
> > 	an XIP kernel for MMU-less machines. As these lack an MMU it has
> > 	to be an identity mapping.
> 
> You seem to be saying from the above that this is required also for
> non-XIP kernel builds as well as XIP kernel builds.  That sounds wrong -
> XIP_VIRT_ADDR is only required for XIP kernel builds.  Use outside of
> that would be a bug.
> 
> Please clarify.
After rereading my changelog a few times I don't see where I suggest
that XIP_VIRT_ADDR is needed for non-XIP builds. Can you please be a bit
more concrete?

Thanks
Uwe
diff mbox

Patch

diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index a8997d7..fcb5757 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -116,6 +116,8 @@ 
 #define MODULES_END		(END_MEM)
 #define MODULES_VADDR		(PHYS_OFFSET)
 
+#define XIP_VIRT_ADDR(physaddr)  (physaddr)
+
 #endif /* !CONFIG_MMU */
 
 /*