* [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr [not found] <20100903095504.GC13643@pengutronix.de> @ 2010-09-03 9:56 ` 2010-09-03 13:39 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to Eric Miao 2010-09-14 8:08 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr Paul Mundt 0 siblings, 2 replies; 5+ messages in thread From: @ 2010-09-03 9:56 UTC (permalink / raw) To: linux-arm-kernel The calculated value in Makefile.boot isn't used anymore since e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions) and physoffset can better be set in mach/memory.h depending on the actual machine type. Cc: Paul Mundt <lethal@linux-sh.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: linux-sh@vger.kernel.org Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- arch/arm/mach-shmobile/Kconfig | 11 ----------- arch/arm/mach-shmobile/Makefile.boot | 9 --------- arch/arm/mach-shmobile/include/mach/memory.h | 15 ++++++++++++++- 3 files changed, 14 insertions(+), 21 deletions(-) delete mode 100644 arch/arm/mach-shmobile/Makefile.boot diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 54b479c..45e134e 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -61,17 +61,6 @@ comment "SH-Mobile System Configuration" menu "Memory configuration" -config MEMORY_START - hex "Physical memory start address" - default "0x50000000" if MACH_G3EVM - default "0x40000000" if MACH_G4EVM - default "0x40000000" if MACH_AP4EVB - default "0x00000000" - ---help--- - Tweak this only when porting to a new machine which does not - already have a defconfig. Changing it from the known correct - value on any of the known systems will only lead to disaster. - config MEMORY_SIZE hex "Physical memory size" default "0x08000000" if MACH_G3EVM diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot deleted file mode 100644 index 1c08ee9..0000000 --- a/arch/arm/mach-shmobile/Makefile.boot +++ /dev/null @@ -1,9 +0,0 @@ -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ - $$[$(CONFIG_MEMORY_START) + 0x8000]') - - zreladdr-y := $(__ZRELADDR) - -# Unsupported legacy stuff -# -#params_phys-y (Instead: Pass atags pointer in r2) -#initrd_phys-y (Instead: Use compiled-in initramfs) diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h index 377584e..100f734 100644 --- a/arch/arm/mach-shmobile/include/mach/memory.h +++ b/arch/arm/mach-shmobile/include/mach/memory.h @@ -1,7 +1,20 @@ #ifndef __ASM_MACH_MEMORY_H #define __ASM_MACH_MEMORY_H -#define PHYS_OFFSET UL(CONFIG_MEMORY_START) +#define SH7367_PHYS_OFFSET UL(0x50000000) +#define SH7372_PHYS_OFFSET UL(0x40000000) +#define SH7377_PHYS_OFFSET UL(0x40000000) + +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) +# if defined(CONFIG_ARCH_SH7367) +# define PHYS_OFFSET SH7367_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7372) +# define PHYS_OFFSET SH7372_PHYS_OFFSET +# elif defined(CONFIG_ARCH_SH7377) +# define PHYS_OFFSET SH7377_PHYS_OFFSET +# endif +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ + #define MEM_SIZE UL(CONFIG_MEMORY_SIZE) /* DMA memory at 0xf6000000 - 0xffdfffff */ -- 1.7.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to 2010-09-03 9:56 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr @ 2010-09-03 13:39 ` Eric Miao 2010-09-03 18:53 ` 2010-09-14 8:08 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr Paul Mundt 1 sibling, 1 reply; 5+ messages in thread From: Eric Miao @ 2010-09-03 13:39 UTC (permalink / raw) To: linux-arm-kernel 2010/9/3 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: > The calculated value in Makefile.boot isn't used anymore since > > e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions) > > and physoffset can better be set in mach/memory.h depending on the > actual machine type. > > Cc: Paul Mundt <lethal@linux-sh.org> > Cc: Magnus Damm <magnus.damm@gmail.com> > Cc: linux-sh@vger.kernel.org > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > arch/arm/mach-shmobile/Kconfig | 11 ----------- > arch/arm/mach-shmobile/Makefile.boot | 9 --------- > arch/arm/mach-shmobile/include/mach/memory.h | 15 ++++++++++++++- > 3 files changed, 14 insertions(+), 21 deletions(-) > delete mode 100644 arch/arm/mach-shmobile/Makefile.boot > > diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig > index 54b479c..45e134e 100644 > --- a/arch/arm/mach-shmobile/Kconfig > +++ b/arch/arm/mach-shmobile/Kconfig > @@ -61,17 +61,6 @@ comment "SH-Mobile System Configuration" > > menu "Memory configuration" > > -config MEMORY_START > - hex "Physical memory start address" > - default "0x50000000" if MACH_G3EVM > - default "0x40000000" if MACH_G4EVM > - default "0x40000000" if MACH_AP4EVB > - default "0x00000000" > - ---help--- > - Tweak this only when porting to a new machine which does not > - already have a defconfig. Changing it from the known correct > - value on any of the known systems will only lead to disaster. > - > config MEMORY_SIZE > hex "Physical memory size" > default "0x08000000" if MACH_G3EVM > diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot > deleted file mode 100644 > index 1c08ee9..0000000 > --- a/arch/arm/mach-shmobile/Makefile.boot > +++ /dev/null > @@ -1,9 +0,0 @@ > -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ > - $$[$(CONFIG_MEMORY_START) + 0x8000]') > - > - zreladdr-y := $(__ZRELADDR) > - > -# Unsupported legacy stuff > -# > -#params_phys-y (Instead: Pass atags pointer in r2) > -#initrd_phys-y (Instead: Use compiled-in initramfs) > diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h > index 377584e..100f734 100644 > --- a/arch/arm/mach-shmobile/include/mach/memory.h > +++ b/arch/arm/mach-shmobile/include/mach/memory.h > @@ -1,7 +1,20 @@ > #ifndef __ASM_MACH_MEMORY_H > #define __ASM_MACH_MEMORY_H > > -#define PHYS_OFFSET UL(CONFIG_MEMORY_START) > +#define SH7367_PHYS_OFFSET UL(0x50000000) > +#define SH7372_PHYS_OFFSET UL(0x40000000) > +#define SH7377_PHYS_OFFSET UL(0x40000000) > + > +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) > +# if defined(CONFIG_ARCH_SH7367) > +# define PHYS_OFFSET SH7367_PHYS_OFFSET > +# elif defined(CONFIG_ARCH_SH7372) > +# define PHYS_OFFSET SH7372_PHYS_OFFSET > +# elif defined(CONFIG_ARCH_SH7377) > +# define PHYS_OFFSET SH7377_PHYS_OFFSET > +# endif > +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ > + Looks like the CONFIG_MEMORY_START was a configurable option, tho not sure if it can be configured to other values, but making it fixed here doesn't seem to be a consistent change. (meaning there is assumption here). > #define MEM_SIZE UL(CONFIG_MEMORY_SIZE) > > /* DMA memory at 0xf6000000 - 0xffdfffff */ > -- > 1.7.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to 2010-09-03 13:39 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to Eric Miao @ 2010-09-03 18:53 ` 0 siblings, 0 replies; 5+ messages in thread From: @ 2010-09-03 18:53 UTC (permalink / raw) To: linux-arm-kernel Hello Eric, On Fri, Sep 03, 2010 at 09:39:45PM +0800, Eric Miao wrote: > 2010/9/3 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: > > The calculated value in Makefile.boot isn't used anymore since > > > > e69edc79 (ARM: Auto calculate ZRELADDR and provide option for exceptions) > > > > and physoffset can better be set in mach/memory.h depending on the > > actual machine type. > > > > Cc: Paul Mundt <lethal@linux-sh.org> > > Cc: Magnus Damm <magnus.damm@gmail.com> > > Cc: linux-sh@vger.kernel.org > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > --- > > arch/arm/mach-shmobile/Kconfig | 11 ----------- > > arch/arm/mach-shmobile/Makefile.boot | 9 --------- > > arch/arm/mach-shmobile/include/mach/memory.h | 15 ++++++++++++++- > > 3 files changed, 14 insertions(+), 21 deletions(-) > > delete mode 100644 arch/arm/mach-shmobile/Makefile.boot > > > > diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig > > index 54b479c..45e134e 100644 > > --- a/arch/arm/mach-shmobile/Kconfig > > +++ b/arch/arm/mach-shmobile/Kconfig > > @@ -61,17 +61,6 @@ comment "SH-Mobile System Configuration" > > > > menu "Memory configuration" > > > > -config MEMORY_START > > - hex "Physical memory start address" > > - default "0x50000000" if MACH_G3EVM > > - default "0x40000000" if MACH_G4EVM > > - default "0x40000000" if MACH_AP4EVB > > - default "0x00000000" > > - ---help--- > > - Tweak this only when porting to a new machine which does not > > - already have a defconfig. Changing it from the known correct > > - value on any of the known systems will only lead to disaster. > > - > > config MEMORY_SIZE > > hex "Physical memory size" > > default "0x08000000" if MACH_G3EVM > > diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot > > deleted file mode 100644 > > index 1c08ee9..0000000 > > --- a/arch/arm/mach-shmobile/Makefile.boot > > +++ /dev/null > > @@ -1,9 +0,0 @@ > > -__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ > > - $$[$(CONFIG_MEMORY_START) + 0x8000]') > > - > > - zreladdr-y := $(__ZRELADDR) > > - > > -# Unsupported legacy stuff > > -# > > -#params_phys-y (Instead: Pass atags pointer in r2) > > -#initrd_phys-y (Instead: Use compiled-in initramfs) > > diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h > > index 377584e..100f734 100644 > > --- a/arch/arm/mach-shmobile/include/mach/memory.h > > +++ b/arch/arm/mach-shmobile/include/mach/memory.h > > @@ -1,7 +1,20 @@ > > #ifndef __ASM_MACH_MEMORY_H > > #define __ASM_MACH_MEMORY_H > > > > -#define PHYS_OFFSET UL(CONFIG_MEMORY_START) > > +#define SH7367_PHYS_OFFSET UL(0x50000000) > > +#define SH7372_PHYS_OFFSET UL(0x40000000) > > +#define SH7377_PHYS_OFFSET UL(0x40000000) > > + > > +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) > > +# if defined(CONFIG_ARCH_SH7367) > > +# define PHYS_OFFSET SH7367_PHYS_OFFSET > > +# elif defined(CONFIG_ARCH_SH7372) > > +# define PHYS_OFFSET SH7372_PHYS_OFFSET > > +# elif defined(CONFIG_ARCH_SH7377) > > +# define PHYS_OFFSET SH7377_PHYS_OFFSET > > +# endif > > +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ > > + > > Looks like the CONFIG_MEMORY_START was a configurable option, tho > not sure if it can be configured to other values, but making it fixed here > doesn't seem to be a consistent change. (meaning there is assumption > here). That is why I put RFC in the subject :-) Anyhow, ZRELADDR is hard coded since e69edc79 (without ZRELADDR_AUTO). And the help text suggested to only tweak it "when porting to a new machine which does not already have a defconfig". As a person making a new port should be able to add a new default for ZRELADDR to arch/arm/Kconfig I think it's OK to remove the possibility to create a broken kernel for the people that don't work on a new port. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr 2010-09-03 9:56 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr 2010-09-03 13:39 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to Eric Miao @ 2010-09-14 8:08 ` Paul Mundt 2010-09-14 12:23 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to 1 sibling, 1 reply; 5+ messages in thread From: Paul Mundt @ 2010-09-14 8:08 UTC (permalink / raw) To: linux-arm-kernel On Fri, Sep 03, 2010 at 11:56:53AM +0200, Uwe Kleine-K??nig wrote: > -config MEMORY_START > - hex "Physical memory start address" > - default "0x50000000" if MACH_G3EVM > - default "0x40000000" if MACH_G4EVM > - default "0x40000000" if MACH_AP4EVB > - default "0x00000000" > - ---help--- > - Tweak this only when porting to a new machine which does not > - already have a defconfig. Changing it from the known correct > - value on any of the known systems will only lead to disaster. > - [snip] > -#define PHYS_OFFSET UL(CONFIG_MEMORY_START) > +#define SH7367_PHYS_OFFSET UL(0x50000000) > +#define SH7372_PHYS_OFFSET UL(0x40000000) > +#define SH7377_PHYS_OFFSET UL(0x40000000) > + > +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) > +# if defined(CONFIG_ARCH_SH7367) > +# define PHYS_OFFSET SH7367_PHYS_OFFSET > +# elif defined(CONFIG_ARCH_SH7372) > +# define PHYS_OFFSET SH7372_PHYS_OFFSET > +# elif defined(CONFIG_ARCH_SH7377) > +# define PHYS_OFFSET SH7377_PHYS_OFFSET > +# endif > +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ > + You've taken a board-specific property and made it CPU-specific. There is nothing about these CPUs that mandates memory starting here, it just happens that for the moment we have 1 board per CPU, but that's not an assumption we can really bank on. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to 2010-09-14 8:08 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr Paul Mundt @ 2010-09-14 12:23 ` 0 siblings, 0 replies; 5+ messages in thread From: @ 2010-09-14 12:23 UTC (permalink / raw) To: linux-arm-kernel Hello Paul, On Tue, Sep 14, 2010 at 05:08:29PM +0900, Paul Mundt wrote: > On Fri, Sep 03, 2010 at 11:56:53AM +0200, Uwe Kleine-K??nig wrote: > > -config MEMORY_START > > - hex "Physical memory start address" > > - default "0x50000000" if MACH_G3EVM > > - default "0x40000000" if MACH_G4EVM > > - default "0x40000000" if MACH_AP4EVB > > - default "0x00000000" > > - ---help--- > > - Tweak this only when porting to a new machine which does not > > - already have a defconfig. Changing it from the known correct > > - value on any of the known systems will only lead to disaster. > > - > > [snip] > > > -#define PHYS_OFFSET UL(CONFIG_MEMORY_START) > > +#define SH7367_PHYS_OFFSET UL(0x50000000) > > +#define SH7372_PHYS_OFFSET UL(0x40000000) > > +#define SH7377_PHYS_OFFSET UL(0x40000000) > > + > > +#if !defined(CONFIG_RUNTIME_PHYS_OFFSET) > > +# if defined(CONFIG_ARCH_SH7367) > > +# define PHYS_OFFSET SH7367_PHYS_OFFSET > > +# elif defined(CONFIG_ARCH_SH7372) > > +# define PHYS_OFFSET SH7372_PHYS_OFFSET > > +# elif defined(CONFIG_ARCH_SH7377) > > +# define PHYS_OFFSET SH7377_PHYS_OFFSET > > +# endif > > +#endif /* if !defined(CONFIG_RUNTIME_PHYS_OFFSET) */ > > + > > You've taken a board-specific property and made it CPU-specific. There is > nothing about these CPUs that mandates memory starting here, it just > happens that for the moment we have 1 board per CPU, but that's not an > assumption we can really bank on. I choosed to do so as CONFIG_ZRELADDR (which is now reverted) used the ARCH_... symbols, too, to select the needed values. And that's my I marked the patch as RFC. So would you consider this patch acceptible if I respin it using the MACH_... symbols? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-14 12:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100903095504.GC13643@pengutronix.de>
2010-09-03 9:56 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr
2010-09-03 13:39 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to Eric Miao
2010-09-03 18:53 `
2010-09-14 8:08 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to calculate zreladdr Paul Mundt
2010-09-14 12:23 ` [PATCH 2/7] [RFC] ARM: shmobile: remove unneeded hack to
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).