public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Zhou Yanjie <zhouyanjie@wanyeetech.com>
Cc: "Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Paul Burton" <paulburton@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	od@zcrc.me, linux-kernel@vger.kernel.org,
	linux-mips@vger.kernel.org, 漆鹏振 <aric.pzqi@ingenic.com>,
	dongsheng.qiu@ingenic.com, rick.tyliu@ingenic.com,
	yanfei.li@ingenic.com, xuwanhao@wanyeetech.com
Subject: Re: [PATCH 00/13] MIPS: Convert Ingenic to a generic board
Date: Fri, 07 Aug 2020 18:45:57 +0200	[thread overview]
Message-ID: <L8DPEQ.71Z8YA0QXBJA@crapouillou.net> (raw)
In-Reply-To: <ab985296-8441-4006-210d-a71503bd01f0@wanyeetech.com>

Hi Zhou,

Le sam. 8 août 2020 à 0:23, Zhou Yanjie <zhouyanjie@wanyeetech.com> a 
écrit :
> Hi Paul,
> 
> I'm not too sure if remove "cpu-feature-overrides.h" will cause some 
> problems for X2000, because according to my current test on X2000, I 
> found that it is somewhat different from the SoCs using XBurst1 CPU 
> core, with the kernel source code provided by Ingenic, for example, 
> we must configure "#define cpu_has_tlbinv 1" in 
> "cpu-feature-overrides.h" to make the X2000 work normally, otherwise 
> the kernel will get stuck. And X2000's interrupt controller has also 
> been redesigned. If these differences make it impossible to share 
> code, should we set a subdirectory of "xburst" and "xburst2" in 
> "arch/mips/ingenic"? (I am just worried about this situation, so far 
> I have not been able to successfully run the mainline kernel on 
> X2000).

The <cpu-feature-overrides.h> is kind of a hack, to hardcode settings 
in case the CPU is not properly detected. The cpu-probe.c should be 
able to auto-detect these settings, including the inverted TLB that the 
X2000 has, reading from the CPU config registers ("TLB INV" info should 
be in config4). Right now cpu_probe_ingenic() doesn't read config4 (not 
present on older SoCs) but that's trivial to add.

As for your other question, I don't see any reason why we wouldn't be 
able to support the X2000 aside the others in a generic kernel, so 
don't worry :)

Cheers,
-Paul

> 
> I have added some related engineers from Ingenic to CC
> 
> Thanks and best regards!
> 
> 在 2020/8/4 上午1:01, Paul Cercueil 写道:
>> Hi Thomas & list,
>> 
>> Here is a set of patches for 5.10 (no rush) to move Ingenic support 
>> from
>> arch/mips/jz4740/ to arch/mips/generic/.
>> 
>> There are some Kconfig changes that I think should be reviewed in 
>> detail
>> to avoid breakages elsewhere. The idea behind these changes is to 
>> allow
>> the Ingenic "generic" code to be built in a non-generic kernel, since
>> generic kernels bring lots of dependencies which result in a +7% size
>> increase.
>> 
>> Support for booting the generic kernel with a built-in and/or 
>> appended
>> devicetree, as well as support for compressed (vmlinuz) kernels, has
>> been added as well.
>> 
>> Cheers,
>> -Paul
>> 
>> Paul Cercueil (13):
>>    MIPS: cpu-probe: Set Ingenic's writecombine to _CACHE_CACHABLE_WA
>>    MIPS: cpu-probe: Mark XBurst CPU as having vtagged caches
>>    MIPS: cpu-probe: ingenic: Fix broken BUG_ON
>>    MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol
>>    MIPS: machine: Add get_system_type callback
>>    MIPS: generic: Call the machine's .get_system_type callback if
>>      provided
>>    MIPS: generic: Support booting with built-in or appended DTB
>>    MIPS: generic: Add support for zboot
>>    MIPS: generic: Increase NR_IRQS to 256
>>    MIPS: generic: Add support for Ingenic SoCs
>>    MIPS: jz4740: Drop folder
>>    MIPS: configs: Regenerate configs of Ingenic boards
>>    MAINTAINERS: Update paths to Ingenic platform code
>> 
>>   MAINTAINERS                                   |   4 +-
>>   arch/mips/Kbuild.platforms                    |   1 -
>>   arch/mips/Kconfig                             |  43 ++++--
>>   arch/mips/configs/ci20_defconfig              |   4 +-
>>   arch/mips/configs/cu1000-neo_defconfig        |  16 +-
>>   arch/mips/configs/gcw0_defconfig              |   2 +-
>>   arch/mips/configs/qi_lb60_defconfig           |   5 +-
>>   arch/mips/configs/rs90_defconfig              |   4 +-
>>   arch/mips/generic/Kconfig                     |   8 +-
>>   arch/mips/generic/Makefile                    |   2 +-
>>   arch/mips/generic/Platform                    |   1 +
>>   arch/mips/generic/board-ingenic.c             | 108 +++++++++++++
>>   arch/mips/generic/init.c                      |  28 +++-
>>   arch/mips/generic/proc.c                      |  25 ---
>>   arch/mips/include/asm/mach-generic/irq.h      |   2 +-
>>   .../asm/mach-jz4740/cpu-feature-overrides.h   |  50 ------
>>   arch/mips/include/asm/mach-jz4740/irq.h       |  13 --
>>   arch/mips/include/asm/machine.h               |   1 +
>>   arch/mips/include/asm/pgtable-bits.h          |   5 -
>>   arch/mips/{jz4740 => ingenic}/Kconfig         |  16 +-
>>   arch/mips/jz4740/Makefile                     |   9 --
>>   arch/mips/jz4740/Platform                     |   3 -
>>   arch/mips/jz4740/setup.c                      | 145 
>> ------------------
>>   arch/mips/kernel/cpu-probe.c                  |   8 +-
>>   24 files changed, 198 insertions(+), 305 deletions(-)
>>   create mode 100644 arch/mips/generic/board-ingenic.c
>>   delete mode 100644 arch/mips/generic/proc.c
>>   delete mode 100644 
>> arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h
>>   delete mode 100644 arch/mips/include/asm/mach-jz4740/irq.h
>>   rename arch/mips/{jz4740 => ingenic}/Kconfig (91%)
>>   delete mode 100644 arch/mips/jz4740/Makefile
>>   delete mode 100644 arch/mips/jz4740/Platform
>>   delete mode 100644 arch/mips/jz4740/setup.c
>> 



  reply	other threads:[~2020-08-07 16:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 17:01 [PATCH 00/13] MIPS: Convert Ingenic to a generic board Paul Cercueil
2020-08-03 17:01 ` [PATCH 01/13] MIPS: cpu-probe: Set Ingenic's writecombine to _CACHE_CACHABLE_WA Paul Cercueil
2020-08-03 17:01 ` [PATCH 02/13] MIPS: cpu-probe: Mark XBurst CPU as having vtagged caches Paul Cercueil
2020-08-03 17:01 ` [PATCH 03/13] MIPS: cpu-probe: ingenic: Fix broken BUG_ON Paul Cercueil
2020-08-03 17:01 ` [PATCH 04/13] MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol Paul Cercueil
2020-08-03 17:01 ` [PATCH 05/13] MIPS: machine: Add get_system_type callback Paul Cercueil
2020-08-03 17:01 ` [PATCH 06/13] MIPS: generic: Call the machine's .get_system_type callback if provided Paul Cercueil
2020-08-11 12:43   ` Paul Cercueil
2020-08-03 17:01 ` [PATCH 07/13] MIPS: generic: Support booting with built-in or appended DTB Paul Cercueil
2020-08-03 17:01 ` [PATCH 08/13] MIPS: generic: Add support for zboot Paul Cercueil
2020-08-03 17:01 ` [PATCH 09/13] MIPS: generic: Increase NR_IRQS to 256 Paul Cercueil
2020-08-03 17:01 ` [PATCH 10/13] MIPS: generic: Add support for Ingenic SoCs Paul Cercueil
2020-08-03 17:01 ` [PATCH 11/13] MIPS: jz4740: Drop folder Paul Cercueil
2020-08-03 17:01 ` [PATCH 12/13] MIPS: configs: Regenerate configs of Ingenic boards Paul Cercueil
2020-08-03 17:01 ` [PATCH 13/13] MAINTAINERS: Update paths to Ingenic platform code Paul Cercueil
2020-08-07 17:22   ` Zhou Yanjie
2020-08-07 17:43     ` Zhou Yanjie
2020-08-07 16:23 ` [PATCH 00/13] MIPS: Convert Ingenic to a generic board Zhou Yanjie
2020-08-07 16:45   ` Paul Cercueil [this message]
2020-08-07 17:20     ` Zhou Yanjie
2020-08-08  2:39     ` Jiaxun Yang
2020-08-21 19:23     ` Maciej W. Rozycki
2020-08-21 23:19       ` Paul Cercueil
2020-08-22  2:29         ` Maciej W. Rozycki
2020-08-22 13:17           ` Paul Cercueil
2020-08-22 14:00             ` Maciej W. Rozycki
2020-10-26 14:25           ` Zhou Yanjie

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=L8DPEQ.71Z8YA0QXBJA@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=aric.pzqi@ingenic.com \
    --cc=dongsheng.qiu@ingenic.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=od@zcrc.me \
    --cc=paulburton@kernel.org \
    --cc=rick.tyliu@ingenic.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=xuwanhao@wanyeetech.com \
    --cc=yanfei.li@ingenic.com \
    --cc=zhouyanjie@wanyeetech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox