Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-30 Thread Arnd Bergmann
On 10/30/18, Yoshinori Sato  wrote:
> On Mon, 29 Oct 2018 18:44:59 +0900, Arnd Bergmann wrote:
>> just like ARM has mostly killed off the custom vendor-specific
>> instruction
>> sets already. If we add another architecture in the future, it may
>> instead
>> be something like the LLVM bitcode or WebAssembly, who knows?
>>
>
> I have one another port.
> Now we have a build environment so we can not merge right away,
> but I'd like to update it to the latest within a few months.

Ok, cool. Which one is that?

   Arnd


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-30 Thread Yoshinori Sato
On Mon, 29 Oct 2018 18:44:59 +0900,
Arnd Bergmann wrote:
> 
> On Sun, Oct 28, 2018 at 10:11 PM Linus Torvalds
>  wrote:
> >
> > Arnd,
> >  I was kind of hoping/expecting to get an explicit ack for this from
> > you, since it's a new architecture.
> >
> > Good to merge?
> 
> Yes.
> 
> For the pull request (in case you want to add it to the merge changelog):
> 
> I did a thorough review of the ABI, which as usual mainly consists of spotting
> any files that don't use the asm-generic ABI itself, and having it changed to
> it matches exactly what we do on other new architectures.
> 
> I also looked at every other patch and commented on maybe half of them
> where I saw something that did not quite seem right. Others have reviewed
> specific patches in greater depth. I'm sure that one could fine more of the
> minor details, but as long as they are not ABI relevant, they can be fixed
> later.
> 
> The only patch that is part of the ABI and that nobody reviewed is the
> signal handling. This is one of the areas I never worked on in much detail.
> I did not see anything wrong with it, but I also don't know what the problems
> with the other architectures are here, and we seem to be hitting issues
> occasionally, and we never managed to generalize this enough for new
> architectures to have a trivial implementation.
> 
> I was originally hoping that we could have the 64-bit time_t interfaces
> ready in time to completely drop the 32-bit ones, but that did not
> happen. We might still remove them in the next merge window
> depending on whether the libc upstream people prefer to keep them
> or not.
> 
> Acked-by: Arnd Bergmann 
> ---
> You may note that Guo rebased the series on top of v4.19. I tried
> to explain a while ago that it's better not to do that, but I suppose he
> was trying to add the last-minute Acks and it seemed like a good idea.
> 
> Guo, in the future I recommend to add all patches on top of the latest
> -rc1 (or maybe a later -rc) but not rebase them or pull in the mainline
> kernel into your own tree.
> 
> One more general comment: I think this may well be the last new CPU
> architecture we ever add to the kernel. Both nds32 and c-sky are made
> by companies that also work on risc-v, and generally speaking risc-v
> seems to be killing off any of the minor licensable instruction set projects,
> just like ARM has mostly killed off the custom vendor-specific instruction
> sets already. If we add another architecture in the future, it may instead
> be something like the LLVM bitcode or WebAssembly, who knows?
> 

I have one another port.
Now we have a build environment so we can not merge right away,
but I'd like to update it to the latest within a few months.

>Arnd

-- 
Yosinori Sato


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Guo Ren
On Mon, Oct 29, 2018 at 11:54:26AM -0500, Rob Herring wrote:
> On Fri, Oct 26, 2018 at 11:09 PM Guo Ren  wrote:
> >
> > The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:
> >
> >   Linux 4.19 (2018-10-22 07:37:37 +0100)
> >
> > are available in the git repository at:
> >
> >   https://github.com/c-sky/csky-linux.git tags/csky-for-linus-4.20
> >
> > for you to fetch changes up to 2347e7e1aea410865e3c3f92014b07ff7d4c5b02:
> >
> >   dt-bindings: interrupt-controller: C-SKY APB intc (2018-10-26 00:54:31 
> > +0800)
> >
> > 
> > This tag contains the Linux port for C-SKY(csky) based on linux-4.19
> > Release, which has been through 10 rounds of review on mailing list.
> >
> > We almost got the Acked-by/Reviewed-by of all patches except "Process
> > management and Signal", but all've been tested.
> 
> I just noticed a couple of build related issues. First, you agreed to
> remove the built-in dtb part way back on v1[1], but that's still
> there. Please remove it. As Arnd mentioned that is for legacy use and
> we shouldn't be adding that for new arches.
> 
> Second, the dtb build infrastructure was re-worked for 4.20. See
> commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build
> rules"). You'll need similar changes for c-sky as other arches. It's
> mostly deleting lines.
Ok, I'll give an another patch include deleting built-in dtb and
deleting lines in Makefile for 4.20 dtb build infrastructure. 

> Rob
> 
> [1] https://lkml.org/lkml/2018/3/21/332


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Rob Herring
On Fri, Oct 26, 2018 at 11:09 PM Guo Ren  wrote:
>
> The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:
>
>   Linux 4.19 (2018-10-22 07:37:37 +0100)
>
> are available in the git repository at:
>
>   https://github.com/c-sky/csky-linux.git tags/csky-for-linus-4.20
>
> for you to fetch changes up to 2347e7e1aea410865e3c3f92014b07ff7d4c5b02:
>
>   dt-bindings: interrupt-controller: C-SKY APB intc (2018-10-26 00:54:31 
> +0800)
>
> 
> This tag contains the Linux port for C-SKY(csky) based on linux-4.19
> Release, which has been through 10 rounds of review on mailing list.
>
> We almost got the Acked-by/Reviewed-by of all patches except "Process
> management and Signal", but all've been tested.

I just noticed a couple of build related issues. First, you agreed to
remove the built-in dtb part way back on v1[1], but that's still
there. Please remove it. As Arnd mentioned that is for legacy use and
we shouldn't be adding that for new arches.

Second, the dtb build infrastructure was re-worked for 4.20. See
commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build
rules"). You'll need similar changes for c-sky as other arches. It's
mostly deleting lines.

Rob

[1] https://lkml.org/lkml/2018/3/21/332


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Guo Ren
Thx Arnd,

On Mon, Oct 29, 2018 at 10:44:59AM +0100, Arnd Bergmann wrote:
[...]
> Guo, in the future I recommend to add all patches on top of the latest
> -rc1 (or maybe a later -rc) but not rebase them or pull in the mainline
> kernel into your own tree
Ok, I'll follow the rules.   

> 
> One more general comment: I think this may well be the last new CPU
> architecture we ever add to the kernel. Both nds32 and c-sky are made
> by companies that also work on risc-v, and generally speaking risc-v
> seems to be killing off any of the minor licensable instruction set projects,
> just like ARM has mostly killed off the custom vendor-specific instruction
> sets already. If we add another architecture in the future, it may instead
> be something like the LLVM bitcode or WebAssembly, who knows?
 ISA is like a language, we will learn foreign languages, but we will
 not give up our mother tongue. RISC-V is a great ISA, and it will
 promote other ISAs to be more open.

 From ecology, diversity will make Linux more robust.

 We will continue to improve csky subsystem, and now is only the
 beginning.

 Best Regards
  Guo Ren


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Linus Torvalds
On Fri, Oct 26, 2018 at 9:08 PM Guo Ren  wrote:
>
> This tag contains the Linux port for C-SKY(csky) based on linux-4.19
> Release, which has been through 10 rounds of review on mailing list.
>
> We almost got the Acked-by/Reviewed-by of all patches except "Process
> management and Signal", but all've been tested.

Pulled,

Linus


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Geert Uytterhoeven
Hi Arnd,

On Mon, Oct 29, 2018 at 12:27 PM Arnd Bergmann  wrote:
> On Mon, Oct 29, 2018 at 11:26 AM Geert Uytterhoeven
>  wrote:
> > On Mon, Oct 29, 2018 at 10:45 AM Arnd Bergmann  wrote:
> > > One more general comment: I think this may well be the last new CPU
> > > architecture we ever add to the kernel. Both nds32 and c-sky are made
> > > by companies that also work on risc-v, and generally speaking risc-v
> > > seems to be killing off any of the minor licensable instruction set 
> > > projects,
> > > just like ARM has mostly killed off the custom vendor-specific instruction
> > > sets already. If we add another architecture in the future, it may instead
> > > be something like the LLVM bitcode or WebAssembly, who knows?
> >
> > Kalray MPPA?
> >
>
> Ok, I stand corrected. I found the sources at [1], which look like they
> are getting ready for an initial submission.
>
>Arnd
>
> [1] https://github.com/kalray/linux_coolidge/commits/kalray-v4.19-rc8

Cool, I didn't know they were that close ;-)

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Arnd Bergmann
On Mon, Oct 29, 2018 at 11:26 AM Geert Uytterhoeven
 wrote:
>
> On Mon, Oct 29, 2018 at 10:45 AM Arnd Bergmann  wrote:
> > One more general comment: I think this may well be the last new CPU
> > architecture we ever add to the kernel. Both nds32 and c-sky are made
> > by companies that also work on risc-v, and generally speaking risc-v
> > seems to be killing off any of the minor licensable instruction set 
> > projects,
> > just like ARM has mostly killed off the custom vendor-specific instruction
> > sets already. If we add another architecture in the future, it may instead
> > be something like the LLVM bitcode or WebAssembly, who knows?
>
> Kalray MPPA?
>

Ok, I stand corrected. I found the sources at [1], which look like they
are getting ready for an initial submission.

   Arnd

[1] https://github.com/kalray/linux_coolidge/commits/kalray-v4.19-rc8


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Geert Uytterhoeven
On Mon, Oct 29, 2018 at 10:45 AM Arnd Bergmann  wrote:
> One more general comment: I think this may well be the last new CPU
> architecture we ever add to the kernel. Both nds32 and c-sky are made
> by companies that also work on risc-v, and generally speaking risc-v
> seems to be killing off any of the minor licensable instruction set projects,
> just like ARM has mostly killed off the custom vendor-specific instruction
> sets already. If we add another architecture in the future, it may instead
> be something like the LLVM bitcode or WebAssembly, who knows?

Kalray MPPA?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-29 Thread Arnd Bergmann
On Sun, Oct 28, 2018 at 10:11 PM Linus Torvalds
 wrote:
>
> Arnd,
>  I was kind of hoping/expecting to get an explicit ack for this from
> you, since it's a new architecture.
>
> Good to merge?

Yes.

For the pull request (in case you want to add it to the merge changelog):

I did a thorough review of the ABI, which as usual mainly consists of spotting
any files that don't use the asm-generic ABI itself, and having it changed to
it matches exactly what we do on other new architectures.

I also looked at every other patch and commented on maybe half of them
where I saw something that did not quite seem right. Others have reviewed
specific patches in greater depth. I'm sure that one could fine more of the
minor details, but as long as they are not ABI relevant, they can be fixed
later.

The only patch that is part of the ABI and that nobody reviewed is the
signal handling. This is one of the areas I never worked on in much detail.
I did not see anything wrong with it, but I also don't know what the problems
with the other architectures are here, and we seem to be hitting issues
occasionally, and we never managed to generalize this enough for new
architectures to have a trivial implementation.

I was originally hoping that we could have the 64-bit time_t interfaces
ready in time to completely drop the 32-bit ones, but that did not
happen. We might still remove them in the next merge window
depending on whether the libc upstream people prefer to keep them
or not.

Acked-by: Arnd Bergmann 
---
You may note that Guo rebased the series on top of v4.19. I tried
to explain a while ago that it's better not to do that, but I suppose he
was trying to add the last-minute Acks and it seemed like a good idea.

Guo, in the future I recommend to add all patches on top of the latest
-rc1 (or maybe a later -rc) but not rebase them or pull in the mainline
kernel into your own tree.

One more general comment: I think this may well be the last new CPU
architecture we ever add to the kernel. Both nds32 and c-sky are made
by companies that also work on risc-v, and generally speaking risc-v
seems to be killing off any of the minor licensable instruction set projects,
just like ARM has mostly killed off the custom vendor-specific instruction
sets already. If we add another architecture in the future, it may instead
be something like the LLVM bitcode or WebAssembly, who knows?

   Arnd


Re: [GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-28 Thread Linus Torvalds
Arnd,
 I was kind of hoping/expecting to get an explicit ack for this from
you, since it's a new architecture.

Good to merge?

  Linus

On Fri, Oct 26, 2018 at 9:08 PM Guo Ren  wrote:
>
> This tag contains the Linux port for C-SKY(csky) based on linux-4.19
> Release, which has been through 10 rounds of review on mailing list.
>
> We almost got the Acked-by/Reviewed-by of all patches except "Process
> management and Signal", but all've been tested.


[GIT PULL] C-SKY(csky) Port for Linux 4.20

2018-10-26 Thread Guo Ren
The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:

  Linux 4.19 (2018-10-22 07:37:37 +0100)

are available in the git repository at:

  https://github.com/c-sky/csky-linux.git tags/csky-for-linus-4.20

for you to fetch changes up to 2347e7e1aea410865e3c3f92014b07ff7d4c5b02:

  dt-bindings: interrupt-controller: C-SKY APB intc (2018-10-26 00:54:31 +0800)


This tag contains the Linux port for C-SKY(csky) based on linux-4.19
Release, which has been through 10 rounds of review on mailing list.

We almost got the Acked-by/Reviewed-by of all patches except "Process
management and Signal", but all've been tested.

Here is the LTP-20180118 test report:
---
Total Tests: 1298
Total Skipped Tests: 281
Total Failures: 10
Kernel Version: 4.19.0+
Machine Architecture: csky
Hostname: buildroot
---

This patchset adds architecture support to Linux for C-SKY's 32-bit embedded

There are two ABI versions with several CPU cores in this patchset:
  ABIv1: 610 (16-bit instruction, 32-bit data path, VIPT Cache ...)
  ABIv2: 807 810 860 (16/32-bit variable length instruction, PIPT Cache,
 SMP ...)

More information: http://en.c-sky.com
The development repo: https://github.com/c-sky/csky-linux
ABI Documentation: https://github.com/c-sky/csky-doc

Here is the pre-built cross compiler for fast test from our CI:
https://gitlab.com/c-sky/buildroot/-/jobs/101608095/artifacts/file/output/images/csky_toolchain_qemu_csky_ck807f_4.18_glibc_defconfig_482b221e52908be1c9b2ccb444255e1562bb7025.tar.xz

We use buildroot as our CI-test enviornment. "LTP, Lmbench ..."
will be tested for every commit. See here for more details:
https://gitlab.com/c-sky/buildroot/pipelines

We'll continouslly improve csky subsystem in future.

Changes in v10:
 - Remove duplicated headers in asm/Kbuild and uapi/asm/Kbuild.
 - Change to (__NR_arch_specific_syscall + 1) in unistd.h.
 - Drop dword access for get_user_size patch.
 - Involve the interrupt controller drivers after got Reviewed-by.

Changes in v9:
 - Remove unused code in smp.c and use per_cpu for ipi_data.
 - Fixup r15 register access in abiv1/alignment.c.
 - Improve the changelog comment in commit-msg.

Changes in v8:
 - Pass make allmodconfig.
 - Implement abiv1 get_user_dword().
 - Remove set_irq_mapping() used by driver in smp.c.

Changes in v7:
 - Use checkpatch.pl to check all patches and fixup as possible.
 - Remove github.com/c-sky print in bootup.
 - Give a return in DMA_ATTR_NON_CONSISTENT in csky_dma_alloc_atomic().
 - Remove the NSIGXXX in fpu.c and use force_sig_fault() in fpu.c.
 - Remove irq.h and add it in asm/Kbuild.
 - Use byteswap helpers in abiv1/bswapXi.c.
 - Fixup arch_sync_dma() only with one page problem.

Changes in v6:
 - use asm-generic/bitops/atomic.h for all in asm/bitops.h
 - fix flush_cache_range and tlb_start_vma
 - fix compile error with include linux/bug.h in cmpxchg.h
 - improve the comment

Changes in v5:
 - remove redundant smp_mb operations in spinlock.h
 - add commit message for dt-bindings docs
 - add CPUHP_AP_CSKY_TIMER_STARTING in hotplug.h for csky_mptimer
 - add COMPILE_TEST for timer-gx6605s Kconfig
 - seperate csky two interrupt controllers with 2 patches
 - add MAINTAINERS patch for csky
 - move IPI_IRQ into csky_mptimer, fixup irq_mapping problem
 - coding convension

Changes in v4:
 - cleanup defconfig
 - use ksys_ in syscall.c
 - remove wrong comment in vdso.c
 - Use GENERIC_IRQ_MULTI_HANDLER
 - optimize the memset.c
 - fixup dts warnings
 - remove big-endian in byteorder.h

Changes in v3:
dc560f1 csky: change to EM_CSKY 252 for elf.h
2ac3ddf csky: remove gx6605s.dts
af00b8c csky: add defconfig and qemu.dts
6c87efb csky: remove the deprecate name.
f6dda39 csky: add dt-bindings doc.
d9f02a8 csky: remove KERNEL_VERSION in upstream branch
7bd663c csky: Use kernel/dma/noncoherent.c
1544c09 csky: bugfix emmc hang up LINS-976
e963271 csky: cleanup include/asm/Kbuild
cd267ba csky: remove CSKY_DEBUG_INFO
78950da csky: remove dcache invalid.
13fe51d csky: remove csum_ipv6_magic(), use generic one.
a7372db csky: bugfix CK810 access twice error.
1bb7c69 csky: bugfix add gcc asm memory for barrier.
5ea3257 csky: add -msoft-float instead of -mfloat-abi=soft.
38b037d csky: bugfix losing cache flush range.
ab5e8c4 csky: Add ticket-spinlock and qrwlock support.
c9aaec5 csky: rename cskyksyms.c to libgcc_ksyms.c
28c5e48 csky: avoid the MB on failure: trylock
f929c97 csky: bugfix idly4 may cause exception.
09dc496 csky: Use GENERIC_ASHLDI3/ASHRDI3 etc
6ecc99d csky: optimize smp boot code.
16f50df csky: asm/bug.h simple implement.
0ba532a csky: csky asm/atomic.h added.
df66947 csky: asm/compat.h added
275a06f csky: String operations optimization
4c021dd csky: ck860 SMP memory barrier optimize
fc39c66 csky: Add wait/doze/stop
d005144 csky: add GENERIC_ALLOCATOR
4a10074 csky: bugfix cma faile