[PATCH V8 01/21] csky: Build infrastructure

2018-10-11 Thread Guo Ren
Makefile. Signed-off-by: Guo Ren --- arch/csky/Kconfig | 205 + arch/csky/Kconfig.debug| 9 ++ arch/csky/Makefile | 93 +++ arch/csky/abiv1/Makefile | 8 ++ arch/csky/abiv2/Makefile

[PATCH V8 00/21] C-SKY(csky) Linux Kernel Port

2018-10-11 Thread Guo Ren
52ab022 csky: add mfcr() mtcr() in asm/reg_ops.h bdcd8f3 csky: revert back Kconfig select. 590c7e6 csky: bugfix compile error with CONFIG_AUDIT 1989292 csky: revert some back with cleanup unistd.h f1454fe csky: cleanup unistd.h 5d2985f csky: cleanup Kconfig and Makefile. 423d97e csky: cancel

[PATCH V8 02/21] csky: defconfig

2018-10-11 Thread Guo Ren
This patch adds csky defconfig. Signed-off-by: Guo Ren --- arch/csky/configs/defconfig | 61 + 1 file changed, 61 insertions(+) create mode 100644 arch/csky/configs/defconfig diff --git a/arch/csky/configs/defconfig b/arch/csky/configs/defconfig new

[PATCH V8 03/21] csky: Kernel booting

2018-10-11 Thread Guo Ren
This patch add boot code. Thx boot params is all in dtb and it's the only way to let kernel get bootloader param information. Changelog: - Use built-in dtb when dtb param is NULL. - Add dummy console for allmodconfig. Signed-off-by: Guo Ren --- arch/csky/kernel/head.S

[PATCH V8 05/21] csky: System Call

2018-10-11 Thread Guo Ren
This patch adds files related to syscall. Signed-off-by: Guo Ren --- arch/csky/include/asm/syscall.h | 71 + arch/csky/include/asm/syscalls.h| 15 arch/csky/include/uapi/asm/unistd.h | 10 ++ arch/csky/kernel/syscall.c | 43

[PATCH V8 04/21] csky: Exception handling and mm-fault

2018-10-11 Thread Guo Ren
This patch adds exception handling code, cpuinfo and mm-fault code. Signed-off-by: Guo Ren --- arch/csky/abiv1/alignment.c | 323 arch/csky/abiv1/inc/abi/entry.h | 160 arch/csky/abiv2/inc/abi/entry.h | 156 arch/csky

[PATCH V8 09/21] csky: VDSO and rt_sigreturn

2018-10-11 Thread Guo Ren
This patch adds files related to VDSO and our VDSO only support rt_sigreturn. Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/vdso.h | 17 + arch/csky/abiv2/inc/abi/vdso.h | 23 +++ arch/csky/include/asm/vdso.h | 12 ++ arch/csky/kernel/vdso.c| 86

[PATCH V8 07/21] csky: MMU and page table management

2018-10-11 Thread Guo Ren
.gh17...@n2100.armlinux.org.uk/ Signed-off-by: Guo Ren Cc: Christoph Hellwig --- arch/csky/abiv1/inc/abi/ckmmu.h| 75 arch/csky/abiv1/inc/abi/page.h | 27 +++ arch/csky/abiv1/inc/abi/pgtable-bits.h | 37 arch/csky/abiv1/mmap.c | 66 +++ arch/csky

[PATCH V8 06/21] csky: Cache and TLB routines

2018-10-11 Thread Guo Ren
l with vma->mm's asid for cache_flush_line and we use cache_wbinv_all() first. Wwe'll improve with cache_flush(vma, start, end) in future. For tlb_start_vma, we make it the same as other arch. - remove the abi/tlb.h Signed-off-by: Guo Ren --- arch/csky/abiv1/cacheflush.c

[PATCH V8 11/21] csky: Atomic operations

2018-10-11 Thread Guo Ren
This patch adds atomic, cmpxchg, spinlock files. Changlog: - SMP supported - ticklock supported - queue-rwlock supported Signed-off-by: Guo Ren Cc: Peter Zijlstra Cc: Andrea Parri --- arch/csky/include/asm/atomic.h | 212 + arch/csky/include/asm/cmpxchg.h

[PATCH V8 10/21] csky: IRQ handling

2018-10-11 Thread Guo Ren
This patch adds IRQ handling files. Changelog: - Use CONFIG_GENERIC_IRQ_MULTI_HANDLER Signed-off-by: Guo Ren Cc: Thomas Gleixner --- arch/csky/include/asm/irqflags.h | 49 arch/csky/kernel/irq.c | 22 ++ 2 files changed, 71

[PATCH V8 08/21] csky: Process management and Signal

2018-10-11 Thread Guo Ren
This patch adds files related to task_switch, sigcontext, signal. Changelog: - abiv2/fpu.c: Userspace should never be sent NSIGXXX as a si_code. Use FPE_FLTUNK instead. - abiv2/fpu.c: Use force_sig_fault instead. Signed-off-by: Guo Ren --- arch/csky/abiv2/fpu.c | 275

[PATCH V8 13/21] csky: Library functions

2018-10-11 Thread Guo Ren
This patch adds string optimize codes and some auxiliary code. Changelog: - Use bt instead of jbt in asm, jbt will cause relocation problem. - remove kernel/platform.c Signed-off-by: Chen Linfei Signed-off-by: Mao Han Signed-off-by: Guo Ren --- arch/csky/abiv1/bswapdi.c| 12

[PATCH V8 12/21] csky: ELF and module probe

2018-10-11 Thread Guo Ren
This patch adds ELF definition and module relocate codes. Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/elf.h | 26 arch/csky/abiv2/inc/abi/elf.h | 43 arch/csky/include/asm/elf.h | 85 +++ arch/csky/kernel/module.c

[PATCH V8 14/21] csky: User access

2018-10-11 Thread Guo Ren
This patch adds "user access from kernel" codes. Signed-off-by: Guo Ren --- arch/csky/include/asm/uaccess.h | 416 arch/csky/lib/usercopy.c| 262 + 2 files changed, 678 insertions(+) create mode 100644 arch/cs

[PATCH V8 16/21] csky: SMP support

2018-10-11 Thread Guo Ren
not directly use IPI_IRQ. The modification also involves csky_mp_intc. Signed-off-by: Guo Ren Cc: Marc Zyngier Cc: Mark Rutland Cc: Peter Zijlstra --- arch/csky/include/asm/smp.h | 28 ++ arch/csky/kernel/smp.c | 237 2 files changed, 2

[PATCH V8 15/21] csky: Debug and Ptrace GDB

2018-10-11 Thread Guo Ren
This patch adds arch ptrace implementation, stack dump and bug.h. Signed-off-by: Guo Ren --- arch/csky/include/asm/bug.h | 26 +++ arch/csky/include/uapi/asm/ptrace.h | 104 arch/csky/kernel/dumpstack.c| 66 arch/csky/kernel/ptrace.c | 314

[PATCH V7 02/20] csky: defconfig

2018-10-04 Thread Guo Ren
This patch adds csky defconfig. Signed-off-by: Guo Ren --- arch/csky/configs/defconfig | 61 + 1 file changed, 61 insertions(+) create mode 100644 arch/csky/configs/defconfig diff --git a/arch/csky/configs/defconfig b/arch/csky/configs/defconfig new

[PATCH V7 03/20] csky: Kernel booting

2018-10-04 Thread Guo Ren
This patch add boot code. Thx boot params is all in dtb and it's the only way to let kernel get bootloader param information. Signed-off-by: Guo Ren --- arch/csky/kernel/head.S| 77 + arch/csky/kernel/setup.c

[PATCH V7 05/20] csky: System Call

2018-10-04 Thread Guo Ren
This patch adds files related to syscall. Signed-off-by: Guo Ren --- arch/csky/include/asm/syscall.h | 71 + arch/csky/include/asm/syscalls.h| 15 arch/csky/include/uapi/asm/unistd.h | 10 ++ arch/csky/kernel/syscall.c | 43

[PATCH V7 06/20] csky: Cache and TLB routines

2018-10-04 Thread Guo Ren
che_wbinv_all() first. Wwe'll improve with cache_flush(vma, start, end) in future. For tlb_start_vma, we make it the same as other arch. - remove the abi/tlb.h Signed-off-by: Guo Ren --- arch/csky/abiv1/cacheflush.c | 52 arch/csky/abiv1/inc/abi/cacheflush.h | 49

[PATCH V7 00/20] C-SKY(csky) Linux Kernel Port

2018-10-04 Thread Guo Ren
onfig select. 590c7e6 csky: bugfix compile error with CONFIG_AUDIT 1989292 csky: revert some back with cleanup unistd.h f1454fe csky: cleanup unistd.h 5d2985f csky: cleanup Kconfig and Makefile. 423d97e csky: cancel subdirectories cae2af4 csky: use asm-generic/fcntl.h Guo Ren (20): csky: Build in

[PATCH V7 07/20] csky: MMU and page table management

2018-10-04 Thread Guo Ren
date* BIDIR writeback invalidate writeback invalidate Link:https://lore.kernel.org/lkml/20180518215548.gh17...@n2100.armlinux.org.uk/ Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/ckmmu.h| 75 arch/csky/abiv1/inc/abi/page.h | 27 +++ arch/csky

[PATCH V7 08/20] csky: Process management and Signal

2018-10-04 Thread Guo Ren
This patch adds files related to task_switch, sigcontext, signal. Changelog: - abiv2/fpu.c: Userspace should never be sent NSIGXXX as a si_code. Use FPE_FLTUNK instead. - abiv2/fpu.c: Use force_sig_fault instead. Signed-off-by: Guo Ren --- arch/csky/abiv2/fpu.c | 275

[PATCH V7 01/20] csky: Build infrastructure

2018-10-04 Thread Guo Ren
This patch adds Makefile, Kconfig for build infrastructure. Changelog: - Add compat.h in asm/Kbuild. - Add select DMA_DIRECT_OPS in Kconfig. - remove kernel/platform.c in Makefile. Signed-off-by: Guo Ren --- arch/csky/Kconfig | 205

[PATCH V7 04/20] csky: Exception handling and mm-fault

2018-10-04 Thread Guo Ren
This patch adds exception handling code, cpuinfo and mm-fault code. Signed-off-by: Guo Ren --- arch/csky/abiv1/alignment.c | 323 arch/csky/abiv1/inc/abi/entry.h | 160 arch/csky/abiv2/inc/abi/entry.h | 156 arch/csky

[PATCH V7 11/20] csky: Atomic operations

2018-10-04 Thread Guo Ren
This patch adds atomic, cmpxchg, spinlock files. Changlog: - SMP supported - ticklock supported - queue-rwlock supported Signed-off-by: Guo Ren --- arch/csky/include/asm/atomic.h | 212 + arch/csky/include/asm/cmpxchg.h| 73 + arch/csky

[PATCH V7 09/20] csky: VDSO and rt_sigreturn

2018-10-04 Thread Guo Ren
This patch adds files related to VDSO and our VDSO only support rt_sigreturn. Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/vdso.h | 17 + arch/csky/abiv2/inc/abi/vdso.h | 23 +++ arch/csky/include/asm/vdso.h | 12 ++ arch/csky/kernel/vdso.c| 86

[PATCH V7 13/20] csky: Library functions

2018-10-04 Thread Guo Ren
This patch adds string optimize codes and some auxiliary code. Changelog: - Use bt instead of jbt in asm, jbt will cause relocation problem. - remove kernel/platform.c Signed-off-by: Chen Linfei Signed-off-by: Mao Han Signed-off-by: Guo Ren --- arch/csky/abiv1/bswapdi.c| 12

[PATCH V7 14/20] csky: User access

2018-10-04 Thread Guo Ren
This patch adds "user access from kernel" codes. Signed-off-by: Guo Ren --- arch/csky/include/asm/uaccess.h | 416 arch/csky/lib/usercopy.c| 262 + 2 files changed, 678 insertions(+) create mode 100644 arch/cs

[PATCH V7 16/20] csky: SMP support

2018-10-04 Thread Guo Ren
because it's a interrupt controller specific. - Bugfix request_irq with IPI_IRQ, we must use irq_mapping return value not directly use IPI_IRQ. The modification also involves csky_mp_intc. Signed-off-by: Guo Ren --- arch/csky/include/asm/smp.h | 30 ++ arch/csky/kern

[PATCH V7 15/20] csky: Debug and Ptrace GDB

2018-10-04 Thread Guo Ren
This patch adds arch ptrace implementation, stack dump and bug.h. Signed-off-by: Guo Ren --- arch/csky/include/asm/bug.h | 26 +++ arch/csky/include/uapi/asm/ptrace.h | 104 arch/csky/kernel/dumpstack.c| 66 arch/csky/kernel/ptrace.c | 314

[PATCH V7 17/20] csky: Misc headers

2018-10-04 Thread Guo Ren
This patch adds csky register definition, byteorder, asm-offsets codes. Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/reg_ops.h | 27 +++ arch/csky/abiv1/inc/abi/regdef.h | 26 ++ arch/csky/abiv2/inc/abi/reg_ops.h | 17 +++ arch/csky/abiv2/inc/abi

[PATCH V7 10/20] csky: IRQ handling

2018-10-04 Thread Guo Ren
This patch adds IRQ handling files. Signed-off-by: Guo Ren --- arch/csky/include/asm/irqflags.h | 49 arch/csky/kernel/irq.c | 22 ++ 2 files changed, 71 insertions(+) create mode 100644 arch/csky/include/asm/irqflags.h create

[PATCH V7 12/20] csky: ELF and module probe

2018-10-04 Thread Guo Ren
This patch adds ELF definition and module relocate codes. Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/elf.h | 26 arch/csky/abiv2/inc/abi/elf.h | 43 arch/csky/include/asm/elf.h | 85 +++ arch/csky/kernel/module.c

[PATCH V7 19/20] dt-bindings: Add vendor prefix for csky

2018-10-05 Thread Guo Ren
Add csky vendor definition. Signed-off-by: Guo Ren Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor

[PATCH V7 18/20] dt-bindings: csky CPU Bindings

2018-10-05 Thread Guo Ren
This patch adds the documentation to describe that how to add cpu nodes in dts for SMP. Signed-off-by: Guo Ren --- Documentation/devicetree/bindings/csky/cpus.txt | 70 + 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/csky/cpus.txt

[PATCH V7 20/20] MAINTAINERS: Add csky

2018-10-05 Thread Guo Ren
Add a maintainer information for the csky(C-SKY) architecture. Signed-off-by: Guo Ren --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d870cb5..9dac20e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3211,6 +3211,15 @@ T: git git

Re: [PATCH V10 5/8] clocksource: add C-SKY SMP timer

2018-10-05 Thread Guo Ren
Hi Daniel, On Fri, Oct 05, 2018 at 03:48:58PM +0200, Daniel Lezcano wrote: > On 04/10/2018 19:22, Guo Ren wrote: > > This timer is used by SMP system and use mfcr/mtcr instruction > > to access the regs. > > > > Changelog: > > - Add rollback for timer_of_clean

Re: [PATCH V10 8/8] dt-bindings: timer: gx6605s SOC timer

2018-10-06 Thread Guo Ren
Hi Rob, Thx for the review. On Fri, Oct 05, 2018 at 03:21:08PM -0500, Rob Herring wrote: > On Fri, Oct 05, 2018 at 01:22:28AM +0800, Guo Ren wrote: > > Dt-bindings doc for gx6605s SOC's system timer. > > > > Signed-off-by: Guo Ren > > --- > > ...

Re: [PATCH V7 00/20] C-SKY(csky) Linux Kernel Port

2018-10-06 Thread Guo Ren
On Sat, Oct 06, 2018 at 10:06:49PM +0200, Eugene Syromiatnikov wrote: > On Fri, Oct 05, 2018 at 01:41:42PM +0800, Guo Ren wrote: > > This is the 7th version patchset to add the Linux kernel port for > > C-SKY(csky) based on linux-4.19-rc3. > > > > In this patchset so

Re: [PATCH V7 00/20] C-SKY(csky) Linux Kernel Port

2018-10-07 Thread Guo Ren
request to Greg? Or could you help pull-request? Best Regards Guo Ren On Fri, Oct 05, 2018 at 01:41:42PM +0800, Guo Ren wrote: > This is the 7th version patchset to add the Linux kernel port for > C-SKY(csky) based on linux-4.19-rc3. > > In this patchset some fixup patches are folde

Re: [PATCH V10 1/8] irqchip: add C-SKY SMP interrupt controller

2018-10-08 Thread Guo Ren
Hi Marc, On Mon, Oct 08, 2018 at 05:35:19PM +0100, Marc Zyngier wrote: > Hi Guo, > > On 04/10/18 18:22, Guo Ren wrote: > > - Irq-csky-mpintc is C-SKY smp system interrupt controller and it > >could support 16 soft irqs, 16 private irqs, and 992 max common > >

Re: [PATCH V3 06/26] csky: Cache and TLB routines

2018-09-07 Thread Guo Ren
On Fri, Sep 07, 2018 at 10:14:38AM +0200, Arnd Bergmann wrote: > On Fri, Sep 7, 2018 at 5:04 AM Guo Ren wrote: > > > > On Thu, Sep 06, 2018 at 04:31:16PM +0200, Arnd Bergmann wrote: > > > On Wed, Sep 5, 2018 at 2:08 PM Guo Ren wrote: > > > > > > Can

Re: [PATCH V3 21/26] dt-bindings: interrupt-controller: C-SKY APB intc

2018-09-07 Thread Guo Ren
On Fri, Sep 07, 2018 at 10:13:13AM -0500, Rob Herring wrote: > On Thu, Sep 6, 2018 at 8:05 AM Arnd Bergmann wrote: > > > > On Thu, Sep 6, 2018 at 4:13 AM Guo Ren wrote: > > > > > > On Wed, Sep 05, 2018 at 07:43:10PM -0500, Rob Herring wrote: > > > >

Re: [PATCH V3 06/26] csky: Cache and TLB routines

2018-09-07 Thread Guo Ren
On Fri, Sep 07, 2018 at 04:13:35PM +0200, Arnd Bergmann wrote: > On Fri, Sep 7, 2018 at 2:55 PM Guo Ren wrote: > > > > On Fri, Sep 07, 2018 at 10:14:38AM +0200, Arnd Bergmann wrote: > > > On Fri, Sep 7, 2018 at 5:04 AM Guo Ren wrote: > > > > On Thu, Se

Re: [PATCH V3 10/26] csky: IRQ handling

2018-09-10 Thread Guo Ren
On Thu, Sep 06, 2018 at 03:39:01PM +0200, Thomas Gleixner wrote: > On Wed, 5 Sep 2018, Guo Ren wrote: > > > +static void (*handle_arch_irq)(struct pt_regs *regs) = NULL; > > + > > +void __init set_handle_irq(void (*handle_irq)(struct pt_regs *)) > >

Re: [PATCH V4 00/27] C-SKY(csky) Linux Kernel Port

2018-09-15 Thread Guo Ren
On Wed, Sep 12, 2018 at 04:30:36PM +0200, Arnd Bergmann wrote: > On Wed, Sep 12, 2018 at 3:25 PM Guo Ren wrote: > > > > This is the 3th version patchset to add the Linux kernel port for > > C-SKY(csky). > > Thanks to everyone who provided feedback on the previous ver

Re: [PATCH V4 00/27] C-SKY(csky) Linux Kernel Port

2018-09-15 Thread Guo Ren
Hello Stephen, I'm Guo Ren from C-SKY and I'm working on csky linux port upstream. I've prepared my git-tree based on linux-4.19-rc3: git clone -b linux-next https://github.com/c-sky/csky-linux.git Here is the pre-built cross compiler for fast test from our CI: https://g

[PATCH V5 3/3] dt-bindings: interrupt-controller: C-SKY SMP intc

2018-09-16 Thread Guo Ren
Signed-off-by: Guo Ren --- .../bindings/interrupt-controller/csky,mpintc.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/csky,mpintc.txt diff --git a/Documentation/devicetree/bindings/interrupt

[PATCH V5 2/3] dt-bindings: interrupt-controller: C-SKY APB intc

2018-09-16 Thread Guo Ren
Signed-off-by: Guo Ren --- .../interrupt-controller/csky,apb-intc.txt | 70 ++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/csky,apb-intc.txt diff --git a/Documentation/devicetree/bindings/interrupt

[PATCH V5 1/3] irqchip: add C-SKY irqchip drivers

2018-09-16 Thread Guo Ren
e in SMP - add INTC_IFR to clear irq-pending - use irq_domain_add_linear instead of leagcy Signed-off-by: Guo Ren --- drivers/irqchip/Kconfig | 16 +++ drivers/irqchip/Makefile | 2 + drivers/irqchip/irq-csky-mpintc.c | 191 irq-csky-apb-in

[PATCH V5 1/2] clocksource: add C-SKY SMP timer

2018-09-16 Thread Guo Ren
This timer is used by SMP system and use mfcr/mtcr instruction to access the regs. Changelog: - Support csky mp timer alpha version. - Just use low-counter with 32bit width as clocksource. - Coding convention with upstream feed-back. Signed-off-by: Guo Ren --- drivers/clocksource/Kconfig

[PATCH V5 2/2] dt-bindings: timer: C-SKY Multi-processor timer

2018-09-16 Thread Guo Ren
Signed-off-by: Guo Ren --- .../devicetree/bindings/timer/csky,mptimer.txt | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/csky,mptimer.txt diff --git a/Documentation/devicetree/bindings/timer/csky,mptimer.txt b

[PATCH V5 2/2] dt-bindings: timer: gx6605s SOC timer

2018-09-16 Thread Guo Ren
Signed-off-by: Guo Ren --- .../bindings/timer/csky,gx6605s-timer.txt | 42 ++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/csky,gx6605s-timer.txt diff --git a/Documentation/devicetree/bindings/timer/csky,gx6605s

[PATCH V5 1/2] clocksource: add gx6605s SOC system timer

2018-09-16 Thread Guo Ren
Changelog: - Add License and Copyright - Use timer-of framework - Change name with upstream feedback - Use clksource_mmio framework Signed-off-by: Guo Ren --- drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile| 1 + drivers/clocksource/timer-gx6605s.c | 150

[PATCH V6 2/2] dt-bindings: timer: gx6605s SOC timer

2018-09-16 Thread Guo Ren
Signed-off-by: Guo Ren --- .../bindings/timer/csky,gx6605s-timer.txt | 42 ++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/csky,gx6605s-timer.txt diff --git a/Documentation/devicetree/bindings/timer/csky,gx6605s

[PATCH V6 1/2] clocksource: add gx6605s SOC system timer

2018-09-16 Thread Guo Ren
Changelog: - Add License and Copyright - Use timer-of framework - Change name with upstream feedback - Use clksource_mmio framework Signed-off-by: Guo Ren --- drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile| 1 + drivers/clocksource/timer-gx6605s.c | 150

Re: [PATCH V5 1/2] clocksource: add C-SKY SMP timer

2018-09-16 Thread Guo Ren
Sorry for duplicate patch-sets, for gx6605s-timer See PATCH V6. On Sun, Sep 16, 2018 at 05:13:57PM +0800, Guo Ren wrote: > This timer is used by SMP system and use mfcr/mtcr instruction > to access the regs. > > Changelog: > - Support csky mp timer alpha version. > - Just us

Re: [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers

2018-09-16 Thread Guo Ren
On Sun, Sep 16, 2018 at 08:07:55PM +0100, Marc Zyngier wrote: > On Sun, 16 Sep 2018 09:50:02 +0100, > Guo Ren wrote: > > +static void csky_mpintc_handler(struct pt_regs *regs) > > +{ > > + void __iomem *reg_base = this_cpu_read(intcl_reg); > > + > > + do

Re: [PATCH V5 2/3] dt-bindings: interrupt-controller: C-SKY APB intc

2018-09-16 Thread Guo Ren
On Sun, Sep 16, 2018 at 08:27:01PM +0100, Marc Zyngier wrote: > On Sun, 16 Sep 2018 09:50:03 +0100, > Guo Ren wrote: > > > > Signed-off-by: Guo Ren > > Please write a commit message. Same thing for the following patch. Ok. Best Regards Guo Ren

Re: [PATCH V5 2/3] dt-bindings: interrupt-controller: C-SKY APB intc

2018-09-17 Thread Guo Ren
On Mon, Sep 17, 2018 at 02:23:36AM -0400, Rob Herring wrote: > On Sun, Sep 16, 2018 at 04:50:03PM +0800, Guo Ren wrote: > > Signed-off-by: Guo Ren > > Needs a commit description. > > > --- > > .../interrupt-controller/csky,apb-intc.txt | 70 > >

Re: [PATCH V4 00/27] C-SKY(csky) Linux Kernel Port

2018-09-17 Thread Guo Ren
On Mon, Sep 17, 2018 at 09:54:43PM +1000, Stephen Rothwell wrote: > Hi Guo, > > On Sun, 16 Sep 2018 12:53:26 +0800 Guo Ren wrote: > > > > I'm Guo Ren from C-SKY and I'm working on csky linux port upstream. > > I've prepared my git-tree based on linux-4

Re: [PATCH V4 00/27] C-SKY(csky) Linux Kernel Port

2018-09-17 Thread Guo Ren
On Mon, Sep 17, 2018 at 10:03:57PM +1000, Stephen Rothwell wrote: > Hi Guo, > > On Mon, 17 Sep 2018 21:54:43 +1000 Stephen Rothwell > wrote: > > > > Added from today (called "csky"). > > Actually from tomorrow :-) Ok.

Re: [PATCH V3 11/27] csky: Atomic operations

2018-09-17 Thread Guo Ren
On Mon, Sep 17, 2018 at 10:17:55AM +0200, Peter Zijlstra wrote: > On Sat, Sep 15, 2018 at 10:55:13PM +0800, Guo Ren wrote: > > > > +#define ATOMIC_OP_RETURN(op, c_op) > > > > \ > > > &

Re: [PATCH V5 2/3] dt-bindings: interrupt-controller: C-SKY APB intc

2018-09-17 Thread Guo Ren
On Mon, Sep 17, 2018 at 07:23:36AM -0700, Rob Herring wrote: > On Mon, Sep 17, 2018 at 1:36 AM Guo Ren wrote: > > > > On Mon, Sep 17, 2018 at 02:23:36AM -0400, Rob Herring wrote: > > > On Sun, Sep 16, 2018 at 04:50:03PM +0800, Guo Ren wrote: > > > > Signed-

Re: [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers

2018-09-18 Thread Guo Ren
On Mon, Sep 17, 2018 at 02:27:31PM +0100, Marc Zyngier wrote: > On Mon, 17 Sep 2018 03:09:29 +0100, > Guo Ren wrote: > > [...] > > > > > + > > > > + irq_set_default_host(root_domain); > > > > > > Please drop this. There is no reas

[PATCH V7 1/2] csky/dma: bugfix dma_sync_for_cpu/device

2018-09-18 Thread Guo Ren
invalidate Signed-off-by: Guo Ren --- arch/csky/mm/dma-mapping.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/csky/mm/dma-mapping.c b/arch/csky/mm/dma-mapping.c index 16c2087..30a2041 100644 --- a/arch/csky/mm/dma-mapping.c +++ b/arch/csky/mm/dma-mapping.c @@ -217,7

[PATCH V7 0/2] bugfix based on csky linux-next

2018-09-18 Thread Guo Ren
Because I've sent to Stephen Roth with the linux-4.19-rc3 git-tree for linux-next, I shouldn't rebase any more. - Fixup smp.c irq mapping problem found by Marc Zyngier - Fixup dma_sync_for_cpu/device in dma-mapping.c Guo Ren (2): csky/dma: bugfix dma_sync_for_cpu/device cs

[PATCH V7 0/2] clocksource: add C-SKY SMP timer

2018-09-18 Thread Guo Ren
Guo Ren (2): clocksource: add C-SKY SMP timer dt-bindings: timer: C-SKY Multi-processor timer .../devicetree/bindings/timer/csky,mptimer.txt | 46 ++ drivers/clocksource/Kconfig| 8 + drivers/clocksource/Makefile | 1 + drivers

[PATCH V7 2/2] csky: remove irq_mapping from smp.c.

2018-09-18 Thread Guo Ren
- remove irq_mapping from smp.c to irq-driver - Add set_ipi_irq_mapping api to irq-driver - update asm/smp.h Signed-off-by: Guo Ren --- arch/csky/include/asm/smp.h | 4 arch/csky/kernel/smp.c | 18 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a

[PATCH V7 1/2] clocksource: add C-SKY SMP timer

2018-09-18 Thread Guo Ren
This timer is used by SMP system and use mfcr/mtcr instruction to access the regs. Changelog: - Support csky mp timer alpha version. - Just use low-counter with 32bit width as clocksource. - Coding convention with upstream feed-back. Signed-off-by: Guo Ren --- drivers/clocksource/Kconfig

[PATCH V7 0/2] clocksource: add gx6605s SOC system timer

2018-09-18 Thread Guo Ren
Guo Ren (2): clocksource: add gx6605s SOC system timer dt-bindings: timer: gx6605s SOC timer .../bindings/timer/csky,gx6605s-timer.txt | 42 ++ drivers/clocksource/Kconfig| 8 ++ drivers/clocksource/Makefile | 1 + drivers

[PATCH V7 2/2] dt-bindings: timer: C-SKY Multi-processor timer

2018-09-18 Thread Guo Ren
- Dt-bingdings doc for C-SKY SMP system setting. Signed-off-by: Guo Ren --- .../devicetree/bindings/timer/csky,mptimer.txt | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/csky,mptimer.txt diff --git a/Documentation

[PATCH V7 2/2] dt-bindings: timer: gx6605s SOC timer

2018-09-18 Thread Guo Ren
- Dt-bindings doc for gx6605s SOC's system timer. Signed-off-by: Guo Ren Reviewed-by: Rob Herring --- .../bindings/timer/csky,gx6605s-timer.txt | 42 ++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/csky,gx

[PATCH V7 1/2] clocksource: add gx6605s SOC system timer

2018-09-18 Thread Guo Ren
Changelog: - Add License and Copyright - Use timer-of framework - Change name with upstream feedback - Use clksource_mmio framework Signed-off-by: Guo Ren --- drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile| 1 + drivers/clocksource/timer-gx6605s.c | 150

[PATCH V7 2/2] dt-bindings: interrupt-controller: C-SKY SMP intc

2018-09-18 Thread Guo Ren
- Dt-bindings doc about C-SKY Multi-processors interrupt controller. Signed-off-by: Guo Ren --- .../bindings/interrupt-controller/csky,mpintc.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/csky

[PATCH V7 0/2] irqchip: add C-SKY APB bus interrupt controller

2018-09-18 Thread Guo Ren
Guo Ren (2): irqchip: add C-SKY APB bus interrupt controller dt-bindings: interrupt-controller: C-SKY APB intc .../interrupt-controller/csky,apb-intc.txt | 70 ++ drivers/irqchip/Kconfig| 8 + drivers/irqchip/Makefile | 1

[PATCH V7 2/2] dt-bindings: interrupt-controller: C-SKY APB intc

2018-09-18 Thread Guo Ren
- Dt-bindings doc about C-SKY apb bus interrupt controller. Signed-off-by: Guo Ren --- .../interrupt-controller/csky,apb-intc.txt | 70 ++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/csky,apb-intc.txt

[PATCH V7 1/2] irqchip: add C-SKY APB bus interrupt controller

2018-09-18 Thread Guo Ren
rq-pending - remove CSKY_VECIRQ_LEGENCY - change to generic irq chip framework - add License and Copyright - use irq_domain_add_linear instead of leagcy Signed-off-by: Guo Ren --- drivers/irqchip/Kconfig | 8 ++ drivers/irqchip/Makefile| 1 + drivers/irqchip/irq-c

[PATCH V7 1/2] irqchip: add C-SKY SMP interrupt controller

2018-09-18 Thread Guo Ren
& private_irq space - add License and Copyright - support set_affinity for irq balance in SMP Signed-off-by: Guo Ren --- drivers/irqchip/Kconfig | 16 drivers/irqchip/Makefile | 2 + drivers/irqchip/irq-csky-mpintc.c | 196 ++ 3 f

[PATCH V7 0/2] irqchip: add C-SKY SMP interrupt controller

2018-09-18 Thread Guo Ren
Guo Ren (2): irqchip: add C-SKY SMP interrupt controller dt-bindings: interrupt-controller: C-SKY SMP intc .../bindings/interrupt-controller/csky,mpintc.txt | 40 + drivers/irqchip/Kconfig| 16 ++ drivers/irqchip/Makefile | 2

Re: [PATCH V5 2/3] dt-bindings: interrupt-controller: C-SKY APB intc

2018-09-18 Thread Guo Ren
On Tue, Sep 18, 2018 at 05:56:50PM -0700, Rob Herring wrote: > > > but does need a vendor prefix. > > vendor prefix? Em ... it's just used in fpga now. > > What I mean is make it: csky,support-pulse-signal Ok. no problem. Best Regards Guo Ren

Re: [PATCH v6 4/9] csky: locks: Optimize coding convention

2021-04-11 Thread Guo Ren
On Wed, Mar 31, 2021 at 10:32 PM wrote: > > From: Guo Ren > > - Using smp_cond_load_acquire in arch_spin_lock by Peter's >advice. > - Using __smp_acquire_fence in arch_spin_trylock > - Using smp_store_release in arch_spin_unlock > > All above are just cod

Re: [PATCH v6 3/9] riscv: locks: Introduce ticket-based spinlock implementation

2021-04-11 Thread Guo Ren
On Wed, Mar 31, 2021 at 10:32 PM wrote: > > From: Guo Ren > > This patch introduces a ticket lock implementation for riscv, along the > same lines as the implementation for arch/arm & arch/csky. > > We still use qspinlock as default. > > Signed-off-by: Guo Ren &

Re: [PATCH v6 3/9] riscv: locks: Introduce ticket-based spinlock implementation

2021-04-11 Thread Guo Ren
On Mon, Apr 12, 2021 at 12:02 AM Guo Ren wrote: > > On Wed, Mar 31, 2021 at 10:32 PM wrote: > > > > From: Guo Ren > > > > This patch introduces a ticket lock implementation for riscv, along the > > same lines as the implementation for arch/arm & arch

Re: [PATCH v6 3/9] riscv: locks: Introduce ticket-based spinlock implementation

2021-04-04 Thread Guo Ren
On Wed, Mar 31, 2021 at 10:32 PM wrote: > > From: Guo Ren > > This patch introduces a ticket lock implementation for riscv, along the > same lines as the implementation for arch/arm & arch/csky. > > We still use qspinlock as default. > > Signed-off-by: Guo Ren &

Re: [PATCH v4 3/4] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-04-05 Thread Guo Ren
Hi Paul, Thx for the explanation, here is my comment. On Wed, Mar 31, 2021 at 1:33 PM Paul Campbell wrote: > > On Wednesday, 31 March 2021 5:18:56 PM NZDT Guo Ren wrote: > > > > [1] > > > > https://github.com/c-sky/csky-linux/commit/e837aad231485427717

Re: [PATCH v4 3/4] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-04-05 Thread Guo Ren
On Wed, Mar 31, 2021 at 12:08 AM Peter Zijlstra wrote: > > On Tue, Mar 30, 2021 at 11:13:55AM +0800, Guo Ren wrote: > > On Mon, Mar 29, 2021 at 8:50 PM Peter Zijlstra wrote: > > > > > > On Mon, Mar 29, 2021 at 08:01:41PM +0800, Guo Ren wrote: > > > >

Re: [PATCH v4 3/4] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-04-05 Thread Guo Ren
On Tue, Mar 30, 2021 at 10:09 PM Waiman Long wrote: > > On 3/29/21 11:13 PM, Guo Ren wrote: > > On Mon, Mar 29, 2021 at 8:50 PM Peter Zijlstra wrote: > >> On Mon, Mar 29, 2021 at 08:01:41PM +0800, Guo Ren wrote: > >>> u32 a = 0x55aa66bb; >

Re: [PATCH] csky: remove unused including

2021-04-05 Thread Guo Ren
dma-mapping.c b/arch/csky/mm/dma-mapping.c > index c3a775a..8244702 100644 > --- a/arch/csky/mm/dma-mapping.c > +++ b/arch/csky/mm/dma-mapping.c > @@ -9,7 +9,6 @@ > #include > #include > #include > -#include > #include > > static inline void cache_op(phys_addr_t paddr, size_t size, > -- > 1.8.3.1 > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH v4 3/4] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-04-05 Thread Guo Ren
gt; wrapper around those (or alternatively we can decide to have them > only deal with fixed-32-bit and long/pointer sized atomics). I think these emulation codes are suitable for some architectures but not riscv. We shouldn't export xchg16/cmpxchg16(emulated by lr.w/sc.w) in riscv, We sh

Re: [PATCH v4 3/4] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-03-27 Thread Guo Ren
On Sun, Mar 28, 2021 at 2:43 AM Waiman Long wrote: > > On 3/27/21 2:06 PM, guo...@kernel.org wrote: > > From: Guo Ren > > > > Some architectures don't have sub-word swap atomic instruction, > > they only have the full word's one. > > > >

Re: [PATCH v4 2/4] riscv: cmpxchg.h: Merge macros

2021-03-27 Thread Guo Ren
Thx Arnd, On Sun, Mar 28, 2021 at 5:25 AM Arnd Bergmann wrote: > > On Sat, Mar 27, 2021 at 7:06 PM wrote: > > > > From: Guo Ren > > > > To reduce assembly codes, let's merge duplicate codes into one > > (xchg_acquire, xchg_release, cmpxchg_release). &g

Re: [PATCH v5 4/7] powerpc/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-03-28 Thread Guo Ren
On Sun, Mar 28, 2021 at 7:14 PM Christophe Leroy wrote: > > > > Le 28/03/2021 à 08:30, guo...@kernel.org a écrit : > > From: Guo Ren > > > > We don't have native hw xchg16 instruction, so let qspinlock > > generic code to deal with it. > > We ha

Re: [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery

2024-02-19 Thread Guo Ren
On Mon, Feb 19, 2024 at 11:40 PM Anna-Maria Behnsen wrote: > > CSKY selects GENERIC_TIME_VSYSCALL. GENERIC_TIME_VSYSCALL dependent > ifdeffery is superfluous. Clean it up. > > Signed-off-by: Anna-Maria Behnsen > Cc: Guo Ren > Cc: linux-c...@vger.kernel.org > --- > a

Re: [PATCH 10/10] csky/vdso: Use generic union vdso_data_store

2024-02-19 Thread Guo Ren
On Mon, Feb 19, 2024 at 11:40 PM Anna-Maria Behnsen wrote: > > There is already a generic union definition for vdso_data_store in vdso > datapage header. > > Use this definition to prevent code duplication. > > Signed-off-by: Anna-Maria Behnsen > Cc: Guo Ren > Cc:

Re: [RFC PATCH 11/14] csky/thread_info: Introduce TIF_NOTIFY_IPI flag

2024-02-22 Thread Guo Ren
> CPU out of idle, as opposed to setting TIF_NEED_RESCHED previously. This > avoids spurious calls to schedule_idle() in cases where an IPI does not > necessarily wake up a task on the idle CPU. > > Cc: Guo Ren > Cc: "Rafael J. Wysocki" > Cc: Daniel Lezcano > Cc: I

Re: [PATCH 1/4] asm-generic/page.h: apply page shift to PFN instead of VA in pfn_to_virt

2024-02-23 Thread Guo Ren
;< PAGE_SHIFT); Oh, that's a terrible bug; Thx for fixing it. Reviewed-by: Guo Ren > } > #define pfn_to_virt pfn_to_virt > > -- > 2.17.1 > -- Best Regards Guo Ren

Re: [PATCH 2/4] csky: apply page shift to PFN instead of VA in pfn_to_virt

2024-02-23 Thread Guo Ren
h/csky/include/asm/page.h > @@ -84,7 +84,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr) > > static inline void * pfn_to_virt(unsigned long pfn) > { > - return (void *)((unsigned long)__va(pfn) << PAGE_SHIFT); > + return __va(pfn << PAGE_

<    1   2   3   4   5   6   7   8   >