All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Smith <alex.smith@imgtec.com>
To: Huacai Chen <chenhc@lemote.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	John Crispin <john@phrozen.org>,
	"Steven J. Hill" <Steven.Hill@imgtec.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	<linux-mips@linux-mips.org>, Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	Hongliang Tao <taohl@lemote.com>, Hua Yan <yanh@lemote.com>
Subject: Re: [PATCH V16 09/12] MIPS: Loongson: Add Loongson-3 Kconfig options
Date: Thu, 9 Jan 2014 13:07:30 +0000	[thread overview]
Message-ID: <52CE9F12.3080205@imgtec.com> (raw)
In-Reply-To: <1389149068-24376-10-git-send-email-chenhc@lemote.com>

On 08/01/14 02:44, Huacai Chen wrote:
> Added Kconfig options include: Loongson-3 CPU and machine definition,
> CPU cache features, UEFI-like firmware interface (LEFI), HT-linked PCI,
> and big memory support.
>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> Signed-off-by: Hongliang Tao <taohl@lemote.com>
> Signed-off-by: Hua Yan <yanh@lemote.com>
> ---
>   arch/mips/Kconfig           |   29 +++++++++++++++++++++++++++-
>   arch/mips/loongson/Kconfig  |   44 +++++++++++++++++++++++++++++++++++++++++++
>   arch/mips/loongson/Platform |    1 +
>   3 files changed, 73 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 17cc7ff..513e941 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -1487,6 +1487,18 @@ config CPU_LOONGSON2
>   	select CPU_SUPPORTS_HIGHMEM
>   	select CPU_SUPPORTS_HUGEPAGES
>
> +config CPU_LOONGSON3
> +	bool "Loongson 3 CPU"
> +	depends on SYS_HAS_CPU_LOONGSON3
> +	select CPU_SUPPORTS_64BIT_KERNEL
> +	select CPU_SUPPORTS_HIGHMEM
> +	select CPU_SUPPORTS_HUGEPAGES
> +	select WEAK_ORDERING
> +	select WEAK_REORDERING_BEYOND_LLSC
> +	help
> +		The Loongson 3 processor implements the MIPS III instruction set
> +		with many extensions.
> +

This should be moved into the "CPU type" choice block. Currently this 
appears as an option outside of that choice, and so it is possible to 
build a kernel without any CPU type selected.

Also, as Aurelien said on the previous version, shouldn't the comment be 
changed to MIPS64R2 rather than MIPS III even if you aren't selecting 
the MIPS64 CPU types for the time being? Note, if you replied to that 
comment I may not have seen it - I think the list is filtering your 
replies because they're HTML emails.

>   config CPU_LOONGSON1
>   	bool
>   	select CPU_MIPS32
> @@ -1513,6 +1526,10 @@ config SYS_HAS_CPU_LOONGSON2F
>   	select CPU_SUPPORTS_ADDRWINCFG if 64BIT
>   	select CPU_SUPPORTS_UNCACHED_ACCELERATED
>
> +config SYS_HAS_CPU_LOONGSON3
> +	bool
> +	select CPU_SUPPORTS_CPUFREQ
> +
>   config SYS_HAS_CPU_LOONGSON1B
>   	bool
>
> @@ -1703,7 +1720,7 @@ choice
>
>   config PAGE_SIZE_4KB
>   	bool "4kB"
> -	depends on !CPU_LOONGSON2
> +	depends on !CPU_LOONGSON2 && !CPU_LOONGSON3
>   	help
>   	 This option select the standard 4kB Linux page size.  On some
>   	 R3000-family processors this is the only available page size.  Using
> @@ -2373,6 +2390,16 @@ config PCI
>   	  your box. Other bus systems are ISA, EISA, or VESA. If you have PCI,
>   	  say Y, otherwise N.
>
> +config HT_PCI
> +	bool "Support for HT-linked PCI"
> +	depends on CPU_LOONGSON3
> +	select PCI_DOMAINS
> +	help
> +	  Loongson family machines use Hyper-Transport bus for inter-core
> +	  connection and device connection. The PCI bus is a subordinate
> +	  linked at HT. Choose Y unless you are using Loongson 2E/2F based
> +	  machines.
> +

Should this default to y, given that it is selected in the defconfig? 
Also, the comment referring to 2E/2F is redundant given that it depends 
on CPU_LOONGSON3 and cannot be selected on those machines.

>   config PCI_DOMAINS
>   	bool
>
> diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
> index 263beb9..4f3967c 100644
> --- a/arch/mips/loongson/Kconfig
> +++ b/arch/mips/loongson/Kconfig
> @@ -59,6 +59,33 @@ config LEMOTE_MACH2F
>
>   	  These family machines include fuloong2f mini PC, yeeloong2f notebook,
>   	  LingLoong allinone PC and so forth.
> +
> +config LEMOTE_MACH3A
> +	bool "Lemote Loongson 3A family machines"
> +	select ARCH_SPARSEMEM_ENABLE
> +	select GENERIC_ISA_DMA_SUPPORT_BROKEN
> +	select GENERIC_HARDIRQS_NO__DO_IRQ
> +	select BOOT_ELF32
> +	select BOARD_SCACHE
> +	select CSRC_R4K
> +	select CEVT_R4K
> +	select CPU_HAS_WB
> +	select HW_HAS_PCI
> +	select ISA
> +	select I8259
> +	select IRQ_CPU
> +	select SYS_HAS_CPU_LOONGSON3
> +	select SYS_HAS_EARLY_PRINTK
> +	select SYS_SUPPORTS_SMP
> +	select SYS_SUPPORTS_64BIT_KERNEL
> +	select SYS_SUPPORTS_HIGHMEM
> +	select SYS_SUPPORTS_LITTLE_ENDIAN
> +	select LOONGSON_MC146818
> +	select ZONE_DMA32 if 64BIT
> +	select LEFI_FIRMWARE_INTERFACE
> +	help
> +		Lemote Loongson 3A family machines utilize the 3A revision of
> +		Loongson processor and RS780/SBX00 chipset.
>   endchoice

Add "select NR_CPUS_DEFAULT_4" on here? Currently creating a 
configuration without using the loongson3_defconfig will default to 2, 
but unless I'm mistaken, all 3A machines are quad core?

>
>   config CS5536
> @@ -86,8 +114,24 @@ config LOONGSON_UART_BASE
>   	default y
>   	depends on EARLY_PRINTK || SERIAL_8250
>
> +config IOMMU_HELPER
> +	bool
> +
> +config NEED_SG_DMA_LENGTH
> +	bool
> +
> +config SWIOTLB
> +	bool "Soft IOMMU Support for Big Memory (>4GB)"
> +	depends on CPU_LOONGSON3
> +	select IOMMU_HELPER
> +	select NEED_SG_DMA_LENGTH
> +	select NEED_DMA_MAP_STATE
> +

Again, default to y?

Thanks,
Alex

>   config LOONGSON_MC146818
>   	bool
>   	default n
>
> +config LEFI_FIRMWARE_INTERFACE
> +	bool
> +
>   endif # MACH_LOONGSON
> diff --git a/arch/mips/loongson/Platform b/arch/mips/loongson/Platform
> index 29692e5..6205372 100644
> --- a/arch/mips/loongson/Platform
> +++ b/arch/mips/loongson/Platform
> @@ -30,3 +30,4 @@ platform-$(CONFIG_MACH_LOONGSON) += loongson/
>   cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson -mno-branch-likely
>   load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000
>   load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000
> +load-$(CONFIG_CPU_LOONGSON3) += 0xffffffff80200000
>

WARNING: multiple messages have this Message-ID (diff)
From: Alex Smith <alex.smith@imgtec.com>
To: Huacai Chen <chenhc@lemote.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	John Crispin <john@phrozen.org>,
	"Steven J. Hill" <Steven.Hill@imgtec.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	Hongliang Tao <taohl@lemote.com>, Hua Yan <yanh@lemote.com>
Subject: Re: [PATCH V16 09/12] MIPS: Loongson: Add Loongson-3 Kconfig options
Date: Thu, 9 Jan 2014 13:07:30 +0000	[thread overview]
Message-ID: <52CE9F12.3080205@imgtec.com> (raw)
Message-ID: <20140109130730.zzaaspqYo2w1-7xL27-TfI7r_FE-69IsEVFjAoThhnk@z> (raw)
In-Reply-To: <1389149068-24376-10-git-send-email-chenhc@lemote.com>

On 08/01/14 02:44, Huacai Chen wrote:
> Added Kconfig options include: Loongson-3 CPU and machine definition,
> CPU cache features, UEFI-like firmware interface (LEFI), HT-linked PCI,
> and big memory support.
>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> Signed-off-by: Hongliang Tao <taohl@lemote.com>
> Signed-off-by: Hua Yan <yanh@lemote.com>
> ---
>   arch/mips/Kconfig           |   29 +++++++++++++++++++++++++++-
>   arch/mips/loongson/Kconfig  |   44 +++++++++++++++++++++++++++++++++++++++++++
>   arch/mips/loongson/Platform |    1 +
>   3 files changed, 73 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 17cc7ff..513e941 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -1487,6 +1487,18 @@ config CPU_LOONGSON2
>   	select CPU_SUPPORTS_HIGHMEM
>   	select CPU_SUPPORTS_HUGEPAGES
>
> +config CPU_LOONGSON3
> +	bool "Loongson 3 CPU"
> +	depends on SYS_HAS_CPU_LOONGSON3
> +	select CPU_SUPPORTS_64BIT_KERNEL
> +	select CPU_SUPPORTS_HIGHMEM
> +	select CPU_SUPPORTS_HUGEPAGES
> +	select WEAK_ORDERING
> +	select WEAK_REORDERING_BEYOND_LLSC
> +	help
> +		The Loongson 3 processor implements the MIPS III instruction set
> +		with many extensions.
> +

This should be moved into the "CPU type" choice block. Currently this 
appears as an option outside of that choice, and so it is possible to 
build a kernel without any CPU type selected.

Also, as Aurelien said on the previous version, shouldn't the comment be 
changed to MIPS64R2 rather than MIPS III even if you aren't selecting 
the MIPS64 CPU types for the time being? Note, if you replied to that 
comment I may not have seen it - I think the list is filtering your 
replies because they're HTML emails.

>   config CPU_LOONGSON1
>   	bool
>   	select CPU_MIPS32
> @@ -1513,6 +1526,10 @@ config SYS_HAS_CPU_LOONGSON2F
>   	select CPU_SUPPORTS_ADDRWINCFG if 64BIT
>   	select CPU_SUPPORTS_UNCACHED_ACCELERATED
>
> +config SYS_HAS_CPU_LOONGSON3
> +	bool
> +	select CPU_SUPPORTS_CPUFREQ
> +
>   config SYS_HAS_CPU_LOONGSON1B
>   	bool
>
> @@ -1703,7 +1720,7 @@ choice
>
>   config PAGE_SIZE_4KB
>   	bool "4kB"
> -	depends on !CPU_LOONGSON2
> +	depends on !CPU_LOONGSON2 && !CPU_LOONGSON3
>   	help
>   	 This option select the standard 4kB Linux page size.  On some
>   	 R3000-family processors this is the only available page size.  Using
> @@ -2373,6 +2390,16 @@ config PCI
>   	  your box. Other bus systems are ISA, EISA, or VESA. If you have PCI,
>   	  say Y, otherwise N.
>
> +config HT_PCI
> +	bool "Support for HT-linked PCI"
> +	depends on CPU_LOONGSON3
> +	select PCI_DOMAINS
> +	help
> +	  Loongson family machines use Hyper-Transport bus for inter-core
> +	  connection and device connection. The PCI bus is a subordinate
> +	  linked at HT. Choose Y unless you are using Loongson 2E/2F based
> +	  machines.
> +

Should this default to y, given that it is selected in the defconfig? 
Also, the comment referring to 2E/2F is redundant given that it depends 
on CPU_LOONGSON3 and cannot be selected on those machines.

>   config PCI_DOMAINS
>   	bool
>
> diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
> index 263beb9..4f3967c 100644
> --- a/arch/mips/loongson/Kconfig
> +++ b/arch/mips/loongson/Kconfig
> @@ -59,6 +59,33 @@ config LEMOTE_MACH2F
>
>   	  These family machines include fuloong2f mini PC, yeeloong2f notebook,
>   	  LingLoong allinone PC and so forth.
> +
> +config LEMOTE_MACH3A
> +	bool "Lemote Loongson 3A family machines"
> +	select ARCH_SPARSEMEM_ENABLE
> +	select GENERIC_ISA_DMA_SUPPORT_BROKEN
> +	select GENERIC_HARDIRQS_NO__DO_IRQ
> +	select BOOT_ELF32
> +	select BOARD_SCACHE
> +	select CSRC_R4K
> +	select CEVT_R4K
> +	select CPU_HAS_WB
> +	select HW_HAS_PCI
> +	select ISA
> +	select I8259
> +	select IRQ_CPU
> +	select SYS_HAS_CPU_LOONGSON3
> +	select SYS_HAS_EARLY_PRINTK
> +	select SYS_SUPPORTS_SMP
> +	select SYS_SUPPORTS_64BIT_KERNEL
> +	select SYS_SUPPORTS_HIGHMEM
> +	select SYS_SUPPORTS_LITTLE_ENDIAN
> +	select LOONGSON_MC146818
> +	select ZONE_DMA32 if 64BIT
> +	select LEFI_FIRMWARE_INTERFACE
> +	help
> +		Lemote Loongson 3A family machines utilize the 3A revision of
> +		Loongson processor and RS780/SBX00 chipset.
>   endchoice

Add "select NR_CPUS_DEFAULT_4" on here? Currently creating a 
configuration without using the loongson3_defconfig will default to 2, 
but unless I'm mistaken, all 3A machines are quad core?

>
>   config CS5536
> @@ -86,8 +114,24 @@ config LOONGSON_UART_BASE
>   	default y
>   	depends on EARLY_PRINTK || SERIAL_8250
>
> +config IOMMU_HELPER
> +	bool
> +
> +config NEED_SG_DMA_LENGTH
> +	bool
> +
> +config SWIOTLB
> +	bool "Soft IOMMU Support for Big Memory (>4GB)"
> +	depends on CPU_LOONGSON3
> +	select IOMMU_HELPER
> +	select NEED_SG_DMA_LENGTH
> +	select NEED_DMA_MAP_STATE
> +

Again, default to y?

Thanks,
Alex

>   config LOONGSON_MC146818
>   	bool
>   	default n
>
> +config LEFI_FIRMWARE_INTERFACE
> +	bool
> +
>   endif # MACH_LOONGSON
> diff --git a/arch/mips/loongson/Platform b/arch/mips/loongson/Platform
> index 29692e5..6205372 100644
> --- a/arch/mips/loongson/Platform
> +++ b/arch/mips/loongson/Platform
> @@ -30,3 +30,4 @@ platform-$(CONFIG_MACH_LOONGSON) += loongson/
>   cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson -mno-branch-likely
>   load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000
>   load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000
> +load-$(CONFIG_CPU_LOONGSON3) += 0xffffffff80200000
>

  reply	other threads:[~2014-01-09 13:09 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08  2:44 [PATCH V16 00/12] MIPS: Add Loongson-3 based machines support Huacai Chen
2014-01-08  2:44 ` [PATCH V16 01/12] MIPS: Loongson: Add basic Loongson-3 definition Huacai Chen
2014-01-08 19:58   ` Aurelien Jarno
2014-01-08  2:44 ` [PATCH V16 02/12] MIPS: Loongson: Add basic Loongson-3 CPU support Huacai Chen
2014-01-08 19:58   ` Aurelien Jarno
     [not found]     ` <CAAhV-H4tx=sCk=iUwuCfnCS+rbmtu5Y_UcpAn6JXDoobA+OGrQ@mail.gmail.com>
2014-01-09 21:36       ` Aurelien Jarno
2014-01-12  9:03         ` Huacai Chen
2014-01-12  9:57           ` Aurelien Jarno
2014-01-12 12:10             ` Aaro Koskinen
2014-01-18  1:54               ` John Crispin
2014-01-08  2:44 ` [PATCH V16 03/12] MIPS: Loongson 3: Add Lemote-3A machtypes definition Huacai Chen
2014-01-08 19:58   ` Aurelien Jarno
2014-01-08  2:44 ` [PATCH V16 04/12] MIPS: Loongson: Add UEFI-like firmware interface (LEFI) support Huacai Chen
2014-01-08 22:58   ` Aurelien Jarno
2014-01-09 12:43     ` Alex Smith
2014-01-09 12:43       ` Alex Smith
     [not found]     ` <CAAhV-H64BXsw5CBL-KW1eqXkYcadhHF2NeBH9YmWQz046Lpzzw@mail.gmail.com>
2014-01-09 21:37       ` Aurelien Jarno
2014-01-09 12:37   ` Alex Smith
2014-01-09 12:37     ` Alex Smith
2014-01-08  2:44 ` [PATCH V16 05/12] MIPS: Loongson 3: Add HT-linked PCI support Huacai Chen
2014-01-08 22:58   ` Aurelien Jarno
     [not found]     ` <CAAhV-H57tDmYByjVwhf3teFZkGowR4E9+OO1vO0kP3iAKTNJVw@mail.gmail.com>
2014-01-09 21:38       ` Aurelien Jarno
2014-01-08  2:44 ` [PATCH V16 06/12] MIPS: Loongson 3: Add IRQ init and dispatch support Huacai Chen
2014-01-08 22:58   ` Aurelien Jarno
2014-01-09 12:52   ` Alex Smith
2014-01-09 12:52     ` Alex Smith
2014-01-08  2:44 ` [PATCH V16 07/12] MIPS: Loongson 3: Add serial port support Huacai Chen
2014-01-08 22:58   ` Aurelien Jarno
2014-01-08  2:44 ` [PATCH V16 08/12] MIPS: Loongson: Add swiotlb to support big memory (>4GB) Huacai Chen
2014-01-08 22:58   ` Aurelien Jarno
     [not found]     ` <CAAhV-H4h43N2OR4znwVv3miVbGkWJLapdgr9Jou1j4R8-9TRyA@mail.gmail.com>
2014-01-09 22:08       ` Aurelien Jarno
     [not found]         ` <CAAhV-H7WFdt-4jYG5qPV36UWJQnSfkSa2J-3CAs2+QLqwHVhuA@mail.gmail.com>
2014-01-11 15:24           ` Aurelien Jarno
2014-01-09 12:56   ` Alex Smith
2014-01-09 12:56     ` Alex Smith
     [not found]     ` <CAAhV-H7ZO0gNzQ5wQ-yD=NiP2AJrc3-bWLXHo-HDngf27c9+gQ@mail.gmail.com>
2014-01-11 15:25       ` Aurelien Jarno
2014-01-12  9:12         ` Huacai Chen
2014-01-12  9:57           ` Aurelien Jarno
2014-01-08  2:44 ` [PATCH V16 09/12] MIPS: Loongson: Add Loongson-3 Kconfig options Huacai Chen
2014-01-09 13:07   ` Alex Smith [this message]
2014-01-09 13:07     ` Alex Smith
2014-01-11 15:24     ` Aurelien Jarno
2014-01-13  3:02       ` Huacai Chen
2014-01-13  4:30         ` Aurelien Jarno
2014-01-13 10:15           ` Huacai Chen
2014-01-13 10:38             ` Aurelien Jarno
2014-01-13 12:15               ` Huacai Chen
2014-01-08  2:44 ` [PATCH V16 10/12] MIPS: Loongson 3: Add Loongson-3 SMP support Huacai Chen
2014-01-09 13:19   ` Alex Smith
2014-01-09 13:19     ` Alex Smith
2014-01-08  2:44 ` [PATCH V16 11/12] MIPS: Loongson 3: Add CPU hotplug support Huacai Chen
2014-01-11 15:24   ` Aurelien Jarno
2014-01-08  2:44 ` [PATCH V16 12/12] MIPS: Loongson: Add a Loongson-3 default config file Huacai Chen
2014-01-08  7:26 ` [PATCH V16 00/12] MIPS: Add Loongson-3 based machines support John Crispin
2014-01-18  9:38 ` Andreas Barth
     [not found]   ` <0466fa9d60b91233d2157d5ce0b51333.squirrel@mail.lemote.com>
2014-02-06 23:27     ` Andreas Barth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52CE9F12.3080205@imgtec.com \
    --to=alex.smith@imgtec.com \
    --cc=Steven.Hill@imgtec.com \
    --cc=aurelien@aurel32.net \
    --cc=chenhc@lemote.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=taohl@lemote.com \
    --cc=wuzhangjin@gmail.com \
    --cc=yanh@lemote.com \
    --cc=zhangfx@lemote.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.