Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-02-11 Thread Vineet Gupta
On Monday 11 February 2013 04:59 PM, James Hogan wrote:
> Hi Vineet,
> 
> On 24/01/13 10:50, Vineet Gupta wrote:
>> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
>> new file mode 100644
>> index 000..b0b09ae
>> --- /dev/null
>> +++ b/arch/arc/Kconfig
>> @@ -0,0 +1,328 @@
>> +#
>> +# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
>> +#
>> +# This program is free software; you can redistribute it and/or modify
>> +# it under the terms of the GNU General Public License version 2 as
>> +# published by the Free Software Foundation.
>> +#
>> +
>> +config ARC
>> +def_bool y
>> +select ARCH_NO_VIRT_TO_BUS
> 
> I noticed this in linux-next. ARCH_NO_VIRT_TO_BUS was defined
> generically in the past in linux-next but the patch seems to have gone.
> Therefore with an arc defconfig I see CONFIG_VIRT_TO_BUS=y defined which
> I'm guessing it shouldn't be.

Good catch ! I'll add a config ARCH_NO_VIRT_TO_BUS, but it would seem this is
better done in arch/Kconfig and get rid of extraneous defs in arch/*/Kconfig. I
can spin that patch, the only issue is merging logistics - our trees are not yet
apt for such changes.

Thx,
-Vineet
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-02-11 Thread James Hogan
Hi Vineet,

On 24/01/13 10:50, Vineet Gupta wrote:
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> new file mode 100644
> index 000..b0b09ae
> --- /dev/null
> +++ b/arch/arc/Kconfig
> @@ -0,0 +1,328 @@
> +#
> +# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License version 2 as
> +# published by the Free Software Foundation.
> +#
> +
> +config ARC
> + def_bool y
> + select ARCH_NO_VIRT_TO_BUS

I noticed this in linux-next. ARCH_NO_VIRT_TO_BUS was defined
generically in the past in linux-next but the patch seems to have gone.
Therefore with an arc defconfig I see CONFIG_VIRT_TO_BUS=y defined which
I'm guessing it shouldn't be.

Cheers
James

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-02-11 Thread James Hogan
Hi Vineet,

On 24/01/13 10:50, Vineet Gupta wrote:
 diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
 new file mode 100644
 index 000..b0b09ae
 --- /dev/null
 +++ b/arch/arc/Kconfig
 @@ -0,0 +1,328 @@
 +#
 +# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
 +#
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License version 2 as
 +# published by the Free Software Foundation.
 +#
 +
 +config ARC
 + def_bool y
 + select ARCH_NO_VIRT_TO_BUS

I noticed this in linux-next. ARCH_NO_VIRT_TO_BUS was defined
generically in the past in linux-next but the patch seems to have gone.
Therefore with an arc defconfig I see CONFIG_VIRT_TO_BUS=y defined which
I'm guessing it shouldn't be.

Cheers
James

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-02-11 Thread Vineet Gupta
On Monday 11 February 2013 04:59 PM, James Hogan wrote:
 Hi Vineet,
 
 On 24/01/13 10:50, Vineet Gupta wrote:
 diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
 new file mode 100644
 index 000..b0b09ae
 --- /dev/null
 +++ b/arch/arc/Kconfig
 @@ -0,0 +1,328 @@
 +#
 +# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
 +#
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License version 2 as
 +# published by the Free Software Foundation.
 +#
 +
 +config ARC
 +def_bool y
 +select ARCH_NO_VIRT_TO_BUS
 
 I noticed this in linux-next. ARCH_NO_VIRT_TO_BUS was defined
 generically in the past in linux-next but the patch seems to have gone.
 Therefore with an arc defconfig I see CONFIG_VIRT_TO_BUS=y defined which
 I'm guessing it shouldn't be.

Good catch ! I'll add a config ARCH_NO_VIRT_TO_BUS, but it would seem this is
better done in arch/Kconfig and get rid of extraneous defs in arch/*/Kconfig. I
can spin that patch, the only issue is merging logistics - our trees are not yet
apt for such changes.

Thx,
-Vineet
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-29 Thread Sam Ravnborg
On Tue, Jan 29, 2013 at 07:15:07PM +0530, Vineet Gupta wrote:
> On Tuesday 29 January 2013 12:14 AM, Sam Ravnborg wrote:
> > On Mon, Jan 28, 2013 at 11:59:36AM +0530, Vineet Gupta wrote:
> >> Hi Sam,
> >>
> >> On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
> >>> Arnd in his review pointed out that arch Kconfig organisation has several
> >>> deficiencies:
> >>>
> >>> * Build time entries for things which can be runtime extracted from DT
> >>>   (e.g. SDRAM size, core clk frequency..)
> >>> * Not multi-platform-image-build friendly (choice .. endchoice constructs)
> >>> * cpu variants support (750/770) is exclusive.
> >>>
> >>> The first 2 have been fixed in subsequent patches.
> >>> Due to the nature of the 750 and 770, it is not possible to build for
> >>> both together, w/o special runtime glue code which would hurt
> >>> performance.
> >>>
> >>> Signed-off-by: Vineet Gupta 
> >>> Cc: Arnd Bergmann 
> >>> Cc: Sam Ravnborg 
> > Looks good - all former comments addressed, and nothing were jumping
> > into my eyes now.
> > Many existing architectures looks worse from the build stuff perspective...
> >
> > Acked-by: Sam Ravnborg 
> >
> > Sam
> 
> Thx Sam. I have a following one liner change to the version you reviewed. 
> Will it
> be OK to add your ACK despite that or do I need to send the updated patch for 
> you
> to take a look again.
OK
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-29 Thread Vineet Gupta
On Tuesday 29 January 2013 12:14 AM, Sam Ravnborg wrote:
> On Mon, Jan 28, 2013 at 11:59:36AM +0530, Vineet Gupta wrote:
>> Hi Sam,
>>
>> On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
>>> Arnd in his review pointed out that arch Kconfig organisation has several
>>> deficiencies:
>>>
>>> * Build time entries for things which can be runtime extracted from DT
>>>   (e.g. SDRAM size, core clk frequency..)
>>> * Not multi-platform-image-build friendly (choice .. endchoice constructs)
>>> * cpu variants support (750/770) is exclusive.
>>>
>>> The first 2 have been fixed in subsequent patches.
>>> Due to the nature of the 750 and 770, it is not possible to build for
>>> both together, w/o special runtime glue code which would hurt
>>> performance.
>>>
>>> Signed-off-by: Vineet Gupta 
>>> Cc: Arnd Bergmann 
>>> Cc: Sam Ravnborg 
> Looks good - all former comments addressed, and nothing were jumping
> into my eyes now.
> Many existing architectures looks worse from the build stuff perspective...
>
> Acked-by: Sam Ravnborg 
>
>   Sam

Thx Sam. I have a following one liner change to the version you reviewed. Will 
it
be OK to add your ACK despite that or do I need to send the updated patch for 
you
to take a look again.

-Vineet

->8---
diff --git a/arch/arc/plat-arcfpga/Kconfig b/arch/arc/plat-arcfpga/Kconfig
index 3fecd6f..b41e786 100644
--- a/arch/arc/plat-arcfpga/Kconfig
+++ b/arch/arc/plat-arcfpga/Kconfig
@@ -8,6 +8,7 @@
 
 menuconfig ARC_PLAT_FPGA_LEGACY
 bool "\"Legacy\" ARC FPGA dev Boards"
+select ISS_SMP_EXTN if SMP
 help
   Support for ARC development boards, provided by Synopsys.
   These are based on FPGA or ISS. e.g.
@@ -19,7 +20,6 @@ if ARC_PLAT_FPGA_LEGACY
 
 config ARC_BOARD_ANGEL4
 bool "ARC Angel4"
-select ISS_SMP_EXTN if SMP
 default y
 help
   ARC Angel4 FPGA Ref Platform (Xilinx Virtex Based)
->8---

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-29 Thread Vineet Gupta
On Tuesday 29 January 2013 12:14 AM, Sam Ravnborg wrote:
 On Mon, Jan 28, 2013 at 11:59:36AM +0530, Vineet Gupta wrote:
 Hi Sam,

 On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
 Arnd in his review pointed out that arch Kconfig organisation has several
 deficiencies:

 * Build time entries for things which can be runtime extracted from DT
   (e.g. SDRAM size, core clk frequency..)
 * Not multi-platform-image-build friendly (choice .. endchoice constructs)
 * cpu variants support (750/770) is exclusive.

 The first 2 have been fixed in subsequent patches.
 Due to the nature of the 750 and 770, it is not possible to build for
 both together, w/o special runtime glue code which would hurt
 performance.

 Signed-off-by: Vineet Gupta vgu...@synopsys.com
 Cc: Arnd Bergmann a...@arndb.de
 Cc: Sam Ravnborg s...@ravnborg.org
 Looks good - all former comments addressed, and nothing were jumping
 into my eyes now.
 Many existing architectures looks worse from the build stuff perspective...

 Acked-by: Sam Ravnborg s...@ravnborg.org

   Sam

Thx Sam. I have a following one liner change to the version you reviewed. Will 
it
be OK to add your ACK despite that or do I need to send the updated patch for 
you
to take a look again.

-Vineet

-8---
diff --git a/arch/arc/plat-arcfpga/Kconfig b/arch/arc/plat-arcfpga/Kconfig
index 3fecd6f..b41e786 100644
--- a/arch/arc/plat-arcfpga/Kconfig
+++ b/arch/arc/plat-arcfpga/Kconfig
@@ -8,6 +8,7 @@
 
 menuconfig ARC_PLAT_FPGA_LEGACY
 bool \Legacy\ ARC FPGA dev Boards
+select ISS_SMP_EXTN if SMP
 help
   Support for ARC development boards, provided by Synopsys.
   These are based on FPGA or ISS. e.g.
@@ -19,7 +20,6 @@ if ARC_PLAT_FPGA_LEGACY
 
 config ARC_BOARD_ANGEL4
 bool ARC Angel4
-select ISS_SMP_EXTN if SMP
 default y
 help
   ARC Angel4 FPGA Ref Platform (Xilinx Virtex Based)
-8---

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-29 Thread Sam Ravnborg
On Tue, Jan 29, 2013 at 07:15:07PM +0530, Vineet Gupta wrote:
 On Tuesday 29 January 2013 12:14 AM, Sam Ravnborg wrote:
  On Mon, Jan 28, 2013 at 11:59:36AM +0530, Vineet Gupta wrote:
  Hi Sam,
 
  On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
  Arnd in his review pointed out that arch Kconfig organisation has several
  deficiencies:
 
  * Build time entries for things which can be runtime extracted from DT
(e.g. SDRAM size, core clk frequency..)
  * Not multi-platform-image-build friendly (choice .. endchoice constructs)
  * cpu variants support (750/770) is exclusive.
 
  The first 2 have been fixed in subsequent patches.
  Due to the nature of the 750 and 770, it is not possible to build for
  both together, w/o special runtime glue code which would hurt
  performance.
 
  Signed-off-by: Vineet Gupta vgu...@synopsys.com
  Cc: Arnd Bergmann a...@arndb.de
  Cc: Sam Ravnborg s...@ravnborg.org
  Looks good - all former comments addressed, and nothing were jumping
  into my eyes now.
  Many existing architectures looks worse from the build stuff perspective...
 
  Acked-by: Sam Ravnborg s...@ravnborg.org
 
  Sam
 
 Thx Sam. I have a following one liner change to the version you reviewed. 
 Will it
 be OK to add your ACK despite that or do I need to send the updated patch for 
 you
 to take a look again.
OK
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-28 Thread Sam Ravnborg
On Mon, Jan 28, 2013 at 11:59:36AM +0530, Vineet Gupta wrote:
> Hi Sam,
> 
> On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
> > Arnd in his review pointed out that arch Kconfig organisation has several
> > deficiencies:
> > 
> > * Build time entries for things which can be runtime extracted from DT
> >   (e.g. SDRAM size, core clk frequency..)
> > * Not multi-platform-image-build friendly (choice .. endchoice constructs)
> > * cpu variants support (750/770) is exclusive.
> > 
> > The first 2 have been fixed in subsequent patches.
> > Due to the nature of the 750 and 770, it is not possible to build for
> > both together, w/o special runtime glue code which would hurt
> > performance.
> > 
> > Signed-off-by: Vineet Gupta 
> > Cc: Arnd Bergmann 
> > Cc: Sam Ravnborg 

Looks good - all former comments addressed, and nothing were jumping
into my eyes now.
Many existing architectures looks worse from the build stuff perspective...

Acked-by: Sam Ravnborg 

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-28 Thread Sam Ravnborg
On Mon, Jan 28, 2013 at 11:59:36AM +0530, Vineet Gupta wrote:
 Hi Sam,
 
 On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
  Arnd in his review pointed out that arch Kconfig organisation has several
  deficiencies:
  
  * Build time entries for things which can be runtime extracted from DT
(e.g. SDRAM size, core clk frequency..)
  * Not multi-platform-image-build friendly (choice .. endchoice constructs)
  * cpu variants support (750/770) is exclusive.
  
  The first 2 have been fixed in subsequent patches.
  Due to the nature of the 750 and 770, it is not possible to build for
  both together, w/o special runtime glue code which would hurt
  performance.
  
  Signed-off-by: Vineet Gupta vgu...@synopsys.com
  Cc: Arnd Bergmann a...@arndb.de
  Cc: Sam Ravnborg s...@ravnborg.org

Looks good - all former comments addressed, and nothing were jumping
into my eyes now.
Many existing architectures looks worse from the build stuff perspective...

Acked-by: Sam Ravnborg s...@ravnborg.org

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-27 Thread Vineet Gupta
Hi Sam,

On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
> Arnd in his review pointed out that arch Kconfig organisation has several
> deficiencies:
> 
> * Build time entries for things which can be runtime extracted from DT
>   (e.g. SDRAM size, core clk frequency..)
> * Not multi-platform-image-build friendly (choice .. endchoice constructs)
> * cpu variants support (750/770) is exclusive.
> 
> The first 2 have been fixed in subsequent patches.
> Due to the nature of the 750 and 770, it is not possible to build for
> both together, w/o special runtime glue code which would hurt
> performance.
> 
> Signed-off-by: Vineet Gupta 
> Cc: Arnd Bergmann 
> Cc: Sam Ravnborg 
> ---
>  arch/arc/Kbuild|2 +
>  arch/arc/Kconfig   |  328 
> 
>  arch/arc/Kconfig.debug |   34 
>  arch/arc/Makefile  |  115 ++
>  arch/arc/boot/Makefile |   26 +++
>  arch/arc/include/asm/Kbuild|1 +
>  arch/arc/kernel/Makefile   |   16 ++
>  arch/arc/kernel/arcksyms.c |   56 +++
>  arch/arc/kernel/asm-offsets.c  |   46 ++
>  arch/arc/kernel/vmlinux.lds.S  |  116 ++
>  arch/arc/lib/Makefile  |9 +
>  arch/arc/mm/Makefile   |   10 ++
>  arch/arc/plat-arcfpga/Kconfig  |   33 
>  arch/arc/plat-arcfpga/Makefile |9 +
>  14 files changed, 801 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arc/Kbuild
>  create mode 100644 arch/arc/Kconfig
>  create mode 100644 arch/arc/Kconfig.debug
>  create mode 100644 arch/arc/Makefile
>  create mode 100644 arch/arc/boot/Makefile
>  create mode 100644 arch/arc/kernel/Makefile
>  create mode 100644 arch/arc/kernel/arcksyms.c
>  create mode 100644 arch/arc/kernel/asm-offsets.c
>  create mode 100644 arch/arc/kernel/vmlinux.lds.S
>  create mode 100644 arch/arc/lib/Makefile
>  create mode 100644 arch/arc/mm/Makefile
>  create mode 100644 arch/arc/plat-arcfpga/Kconfig
>  create mode 100644 arch/arc/plat-arcfpga/Makefile
> 
> diff --git a/arch/arc/Kbuild b/arch/arc/Kbuild
> new file mode 100644
> index 000..082d329
> --- /dev/null
> +++ b/arch/arc/Kbuild
> @@ -0,0 +1,2 @@
> +obj-y += kernel/
> +obj-y += mm/
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> new file mode 100644
> index 000..b0b09ae
> --- /dev/null
> +++ b/arch/arc/Kconfig
> @@ -0,0 +1,328 @@
> +#
> +# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License version 2 as
> +# published by the Free Software Foundation.
> +#
> +
> +config ARC
> + def_bool y
> + select ARCH_NO_VIRT_TO_BUS
> + # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev
> + select DEVTMPFS if !INITRAMFS_SOURCE=""
> + select GENERIC_ATOMIC64
> + select GENERIC_CLOCKEVENTS
> + select GENERIC_FIND_FIRST_BIT
> + # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
> + select GENERIC_IRQ_SHOW
> + select GENERIC_PENDING_IRQ if SMP
> + select GENERIC_SMP_IDLE_THREAD
> + select HAVE_GENERIC_HARDIRQS
> + select MODULES_USE_ELF_RELA
> +
> +config SCHED_OMIT_FRAME_POINTER
> + def_bool y
> +
> +config GENERIC_CSUM
> + def_bool y
> +
> +config RWSEM_GENERIC_SPINLOCK
> + def_bool y
> +
> +config ARCH_FLATMEM_ENABLE
> + def_bool y
> +
> +config MMU
> + def_bool y
> +
> +config NO_IOPORT
> + def_bool y
> +
> +config GENERIC_CALIBRATE_DELAY
> + def_bool y
> +
> +config GENERIC_HWEIGHT
> + def_bool y
> +
> +config BINFMT_ELF
> + def_bool y
> +
> +config HAVE_LATENCYTOP_SUPPORT
> + def_bool y
> +
> +config NO_DMA
> + def_bool n
> +
> +source "init/Kconfig"
> +source "kernel/Kconfig.freezer"
> +
> +menu "ARC Architecture Configuration"
> +
> +choice
> + prompt "ARC Platform"
> + default ARC_PLAT_FPGA_LEGACY
> +
> +config ARC_PLAT_FPGA_LEGACY
> + bool "\"Legacy\" ARC FPGA dev platform"
> + help
> +   Support for ARC development platforms, provided by Synopsys.
> +   These are based on FPGA or ISS. e.g.
> +   - ARCAngel4
> +   - ML509
> +   - MetaWare ISS
> +
> +#New platform adds here
> +endchoice
> +
> +menu "ARC CPU Configuration"
> +
> +choice
> + prompt "ARC Core"
> + default ARC_CPU_770
> +
> +config ARC_CPU_750D
> + bool "ARC750D"
> + help
> +   Support for ARC750 core
> +
> +config ARC_CPU_770
> + bool "ARC770"
> + select ARC_CPU_REL_4_10
> + help
> +   Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
> +   This core has a bunch of cool new features:
> +   -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
> +   Shared Address Spaces (for sharing TLB entires in MMU)
> +   -Caches: New Prog Model, Region Flush
> +   -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
> +
> 

Re: [PATCH v3 02/71] ARC: Build system: Makefiles, Kconfig, Linker script

2013-01-27 Thread Vineet Gupta
Hi Sam,

On Thursday 24 January 2013 04:20 PM, Vineet Gupta wrote:
 Arnd in his review pointed out that arch Kconfig organisation has several
 deficiencies:
 
 * Build time entries for things which can be runtime extracted from DT
   (e.g. SDRAM size, core clk frequency..)
 * Not multi-platform-image-build friendly (choice .. endchoice constructs)
 * cpu variants support (750/770) is exclusive.
 
 The first 2 have been fixed in subsequent patches.
 Due to the nature of the 750 and 770, it is not possible to build for
 both together, w/o special runtime glue code which would hurt
 performance.
 
 Signed-off-by: Vineet Gupta vgu...@synopsys.com
 Cc: Arnd Bergmann a...@arndb.de
 Cc: Sam Ravnborg s...@ravnborg.org
 ---
  arch/arc/Kbuild|2 +
  arch/arc/Kconfig   |  328 
 
  arch/arc/Kconfig.debug |   34 
  arch/arc/Makefile  |  115 ++
  arch/arc/boot/Makefile |   26 +++
  arch/arc/include/asm/Kbuild|1 +
  arch/arc/kernel/Makefile   |   16 ++
  arch/arc/kernel/arcksyms.c |   56 +++
  arch/arc/kernel/asm-offsets.c  |   46 ++
  arch/arc/kernel/vmlinux.lds.S  |  116 ++
  arch/arc/lib/Makefile  |9 +
  arch/arc/mm/Makefile   |   10 ++
  arch/arc/plat-arcfpga/Kconfig  |   33 
  arch/arc/plat-arcfpga/Makefile |9 +
  14 files changed, 801 insertions(+), 0 deletions(-)
  create mode 100644 arch/arc/Kbuild
  create mode 100644 arch/arc/Kconfig
  create mode 100644 arch/arc/Kconfig.debug
  create mode 100644 arch/arc/Makefile
  create mode 100644 arch/arc/boot/Makefile
  create mode 100644 arch/arc/kernel/Makefile
  create mode 100644 arch/arc/kernel/arcksyms.c
  create mode 100644 arch/arc/kernel/asm-offsets.c
  create mode 100644 arch/arc/kernel/vmlinux.lds.S
  create mode 100644 arch/arc/lib/Makefile
  create mode 100644 arch/arc/mm/Makefile
  create mode 100644 arch/arc/plat-arcfpga/Kconfig
  create mode 100644 arch/arc/plat-arcfpga/Makefile
 
 diff --git a/arch/arc/Kbuild b/arch/arc/Kbuild
 new file mode 100644
 index 000..082d329
 --- /dev/null
 +++ b/arch/arc/Kbuild
 @@ -0,0 +1,2 @@
 +obj-y += kernel/
 +obj-y += mm/
 diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
 new file mode 100644
 index 000..b0b09ae
 --- /dev/null
 +++ b/arch/arc/Kconfig
 @@ -0,0 +1,328 @@
 +#
 +# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
 +#
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License version 2 as
 +# published by the Free Software Foundation.
 +#
 +
 +config ARC
 + def_bool y
 + select ARCH_NO_VIRT_TO_BUS
 + # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev
 + select DEVTMPFS if !INITRAMFS_SOURCE=
 + select GENERIC_ATOMIC64
 + select GENERIC_CLOCKEVENTS
 + select GENERIC_FIND_FIRST_BIT
 + # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
 + select GENERIC_IRQ_SHOW
 + select GENERIC_PENDING_IRQ if SMP
 + select GENERIC_SMP_IDLE_THREAD
 + select HAVE_GENERIC_HARDIRQS
 + select MODULES_USE_ELF_RELA
 +
 +config SCHED_OMIT_FRAME_POINTER
 + def_bool y
 +
 +config GENERIC_CSUM
 + def_bool y
 +
 +config RWSEM_GENERIC_SPINLOCK
 + def_bool y
 +
 +config ARCH_FLATMEM_ENABLE
 + def_bool y
 +
 +config MMU
 + def_bool y
 +
 +config NO_IOPORT
 + def_bool y
 +
 +config GENERIC_CALIBRATE_DELAY
 + def_bool y
 +
 +config GENERIC_HWEIGHT
 + def_bool y
 +
 +config BINFMT_ELF
 + def_bool y
 +
 +config HAVE_LATENCYTOP_SUPPORT
 + def_bool y
 +
 +config NO_DMA
 + def_bool n
 +
 +source init/Kconfig
 +source kernel/Kconfig.freezer
 +
 +menu ARC Architecture Configuration
 +
 +choice
 + prompt ARC Platform
 + default ARC_PLAT_FPGA_LEGACY
 +
 +config ARC_PLAT_FPGA_LEGACY
 + bool \Legacy\ ARC FPGA dev platform
 + help
 +   Support for ARC development platforms, provided by Synopsys.
 +   These are based on FPGA or ISS. e.g.
 +   - ARCAngel4
 +   - ML509
 +   - MetaWare ISS
 +
 +#New platform adds here
 +endchoice
 +
 +menu ARC CPU Configuration
 +
 +choice
 + prompt ARC Core
 + default ARC_CPU_770
 +
 +config ARC_CPU_750D
 + bool ARC750D
 + help
 +   Support for ARC750 core
 +
 +config ARC_CPU_770
 + bool ARC770
 + select ARC_CPU_REL_4_10
 + help
 +   Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
 +   This core has a bunch of cool new features:
 +   -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
 +   Shared Address Spaces (for sharing TLB entires in MMU)
 +   -Caches: New Prog Model, Region Flush
 +   -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
 +
 +endchoice
 +
 +config CPU_BIG_ENDIAN
 + bool Enable Big Endian Mode
 + default n
 + help
 +   Build kernel for Big