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

2018-09-30 Thread Guo Ren
Dt-bingdings doc for C-SKY SMP system setting. Changelog: - Drop the interrupt-parent. Signed-off-by: Guo Ren --- .../devicetree/bindings/timer/csky,mptimer.txt | 42 ++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/csky

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

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

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

2018-09-30 Thread Guo Ren
Dt-bindings doc about C-SKY Multi-processors interrupt controller. Changelog: - Should be: '#interrupt-cells' not 'interrupt-cells' Signed-off-by: Guo Ren --- .../bindings/interrupt-controller/csky,mpintc.txt | 40 ++ 1 file changed, 40 insertions(+)

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

2018-09-30 Thread Guo Ren
irq map, reserve soft_irq & private_irq space - Add License and Copyright - Support set_affinity for irq balance in SMP Signed-off-by: Guo Ren --- drivers/irqchip/Kconfig | 8 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-csky-mpintc.c |

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

2018-09-30 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 6/8] irqchip: add C-SKY APB bus interrupt controller

2018-09-30 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 3/8] clocksource: add C-SKY SMP timer

2018-09-30 Thread Guo Ren
. - Coding convention with upstream feed-back. Signed-off-by: Guo Ren --- drivers/clocksource/Kconfig| 8 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/csky_mptimer.c | 176 + include/linux/cpuhotplug.h | 1 + 4 files changed

Re: [PATCH V7 3/8] clocksource: add C-SKY SMP timer

2018-09-30 Thread Guo Ren
On Sun, Sep 30, 2018 at 09:22:30PM +0200, Daniel Lezcano wrote: > On 30/09/2018 18:18, Guo Ren wrote: > > This timer is used by SMP system and use mfcr/mtcr instruction > > to access the regs. > > > > Changelog: > > - Remove #define CPUHP_

[PATCH V9 4/8] dt-bindings: timer: C-SKY Multi-processor timer

2018-09-30 Thread Guo Ren
Dt-bingdings doc for C-SKY SMP system setting. Changelog: - Drop the interrupt-parent. Signed-off-by: Guo Ren --- .../devicetree/bindings/timer/csky,mptimer.txt | 42 ++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/csky

[PATCH V9 6/8] irqchip: add C-SKY APB bus interrupt controller

2018-09-30 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 V9 1/8] irqchip: add C-SKY SMP interrupt controller

2018-09-30 Thread Guo Ren
irq map, reserve soft_irq & private_irq space - Add License and Copyright - Support set_affinity for irq balance in SMP Signed-off-by: Guo Ren --- drivers/irqchip/Kconfig | 8 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-csky-mpintc.c |

[PATCH V9 7/8] dt-bindings: timer: gx6605s SOC timer

2018-09-30 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 V9 2/8] dt-bindings: interrupt-controller: C-SKY SMP intc

2018-09-30 Thread Guo Ren
Dt-bindings doc about C-SKY Multi-processors interrupt controller. Changelog: - Should be: '#interrupt-cells' not 'interrupt-cells' Signed-off-by: Guo Ren --- .../bindings/interrupt-controller/csky,mpintc.txt | 40 ++ 1 file changed, 40 insertions(+)

[PATCH V9 5/8] dt-bindings: interrupt-controller: C-SKY APB intc

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

[PATCH V9 0/8] C-SKY(csky) Linux Kernel Drivers

2018-09-30 Thread Guo Ren
oo big now. Any feedback is welcome, thx for all people review my patchset. Best Regards Guo Ren (8): irqchip: add C-SKY SMP interrupt controller dt-bindings: interrupt-controller: C-SKY SMP intc clocksource: add C-SKY SMP timer dt-bindings: timer: C-SKY Multi-processor timer dt-bindi

[PATCH V9 3/8] clocksource: add C-SKY SMP timer

2018-09-30 Thread Guo Ren
. - Coding convention with upstream feed-back. Signed-off-by: Guo Ren --- drivers/clocksource/Kconfig| 8 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/csky_mptimer.c | 176 + include/linux/cpuhotplug.h | 1 + 4 files changed

[PATCH V9 8/8] clocksource: add gx6605s SOC system timer

2018-09-30 Thread Guo Ren
Changelog: - Add COMIPLE_TEST in Kconfig - no cast is needed for "struct clock_event_device *ce = dev" - remove: extra space after (u64) - Add License and Copyright - Use timer-of framework - Change name with upstream feedback - Use clksource_mmio framework Signed-off-b

Re: [PATCH V9 3/8] clocksource: add C-SKY SMP timer

2018-10-01 Thread Guo Ren
On Mon, Oct 01, 2018 at 11:14:14AM +0200, Daniel Lezcano wrote: > On 01/10/2018 03:35, Guo Ren wrote: > > This timer is used by SMP system and use mfcr/mtcr instruction > > to access the regs. > > > > Changelog: > > - Remove #define CPUHP_

[PATCH V8 1/6] csky/dma: bugfix dma_sync_for_cpu/device

2018-09-19 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 V8 4/6] dt-bindings: interrupt-controller: C-SKY SMP intc

2018-09-19 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 V8 6/6] dt-bindings: timer: C-SKY Multi-processor timer

2018-09-19 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 V8 2/6] csky: remove irq_mapping from smp.c

2018-09-19 Thread Guo Ren
- Add irq_mapping return check - Move IPI_IRQ into irq-driver - 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 | 27

[PATCH V8 3/6] irqchip: add C-SKY SMP interrupt controller

2018-09-19 Thread Guo Ren
irq map, reserve soft_irq & private_irq space - Add License and Copyright - Support set_affinity for irq balance in SMP Signed-off-by: Guo Ren --- drivers/irqchip/Kconfig | 8 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-csky-mpintc.c |

[PATCH V8 0/6] C-SKY(csky) Linux Kernel Port

2018-09-19 Thread Guo Ren
- Add irq-csky-mpintc.c patch in this patchset - Add mptimer.c patch in this patchset - Fixup dma_sync_for_cpu/device in dma-mapping.c Guo Ren (6): csky/dma: bugfix dma_sync_for_cpu/device csky: remove irq_mapping from smp.c irqchip: add C-SKY SMP interrupt controller dt-bindings: interrupt-co

[PATCH V8 5/6] clocksource: add C-SKY SMP timer

2018-09-19 Thread Guo Ren
-off-by: Guo Ren --- drivers/clocksource/Kconfig| 8 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/csky_mptimer.c | 178 + include/linux/cpuhotplug.h | 1 + 4 files changed, 188 insertions(+) create mode 100644 drivers

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

2018-09-19 Thread Guo Ren
ot;%s IRQ request failed\n", __func__); > > To be honest, I'd tend to question the need for this level of > abstraction, unless you actually plan for multiple SMP-capable > interrupt controllers... But at the end of the day, that's your call, > and the above code looks mostly correct. Thx for the review. I will consider your suggestion. Best Regards GUo Ren

Re: [PATCH V8 5/6] clocksource: add C-SKY SMP timer

2018-09-19 Thread Guo Ren
On Thu, Sep 20, 2018 at 01:39:31PM +0800, Guo Ren wrote: > +struct clocksource csky_clocksource = { > + .name = "csky", > + .rating = 400, > + .mask = CLOCKSOURCE_MASK(32), > + .flags = CLOCK_SOURCE_IS_CONTINUOUS, > + .read = clksr

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

2018-09-20 Thread Guo Ren
- Dt-bindings documentation - timer-gx6605s driver 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

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

2018-09-20 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 V8 2/2] dt-bindings: timer: gx6605s SOC timer

2018-09-20 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 V8 2/2] dt-bindings: interrupt-controller: C-SKY APB intc

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

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

2018-09-20 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 V8 0/2] irqchip: add C-SKY APB bus interrupt controller

2018-09-20 Thread Guo Ren
- Dt-bindings documentation - irq-csky-apb-intc driver 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 | 62 + drivers/irqchip/Kconfig| 8

[PATCH] MAINTAINERS: Add csky

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

Re: [PATCH] MAINTAINERS: Add csky

2018-09-20 Thread Guo Ren
On Thu, Sep 20, 2018 at 12:17:43PM +0200, Greg KH wrote: > On Thu, Sep 20, 2018 at 06:14:07PM +0800, Guo Ren wrote: > > Add a maintainer information for the csky(C-SKY) architecture. > > > > Signed-off-by: Guo Ren > > --- > > MAINTAINERS | 16 &

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

2018-09-20 Thread Guo Ren
On Thu, Sep 20, 2018 at 06:06:19PM +0200, Daniel Lezcano wrote: > On 20/09/2018 10:03, Guo Ren wrote: > > Changelog: > > - Add License and Copyright > > - Use timer-of framework > > - Change name with upstream feedback > > - Use clksource_mmio framewor

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

2018-09-21 Thread Guo Ren
On Fri, Sep 21, 2018 at 01:57:27AM +0200, Daniel Lezcano wrote: > On 21/09/2018 01:31, Guo Ren wrote: > > On Thu, Sep 20, 2018 at 06:06:19PM +0200, Daniel Lezcano wrote: > >> On 20/09/2018 10:03, Guo Ren wrote: > >>> Changelog: > >>> - Add License and

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

2018-09-21 Thread Guo Ren
; >> On Wed, Sep 12, 2018 at 3:25 PM Guo Ren wrote: > > I don't want to hijack this thread, but in RISC-V land we were hoping to > > have a > > user ABI free of 32-bit time_t. Our 32-bit glibc ABI hasn't been finalized > > yet, and when I talked to the glibc

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 *)) > >

[PATCH 07/19] csky: Atomic operations

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/kernel/atomic.S | 55 +++ 1 file changed, 55 insertions(+) create mode 100644 arch/csky/kernel/atomic.S diff --git a/arch/csky/kernel/atomic.S b/arch/csky/kernel/atomic.S new file mode 100644 index 000

[PATCH 09/19] csky: VDSO and rt_sigreturn

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/vdso.h | 19 + arch/csky/abiv2/inc/abi/vdso.h | 18 + arch/csky/include/asm/vdso.h | 12 ++ arch/csky/kernel/vdso.c| 89 ++ 4 files changed, 138 insertions(+) create mode

[PATCH 04/19] csky: MMU and page talbe management

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/ckmmu.h| 140 +++ arch/csky/abiv1/inc/abi/page.h | 26 +++ arch/csky/abiv1/inc/abi/pgtable-bits.h | 36 arch/csky/abiv1/src/mmap.c | 65 +++ arch/csky/abiv2/inc/abi/ckmmu.h| 126

[PATCH 19/19] irqchip: add irq-nationalchip.c and irq-csky.c

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-csky.c | 151 drivers/irqchip/irq-nationalchip.c | 196 + 3 files changed, 348 insertions(+) create mode 100644 drivers/irqchip/irq

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

2018-03-18 Thread Guo Ren
ream is on going and the source code is here: https://github.com/c-sky It's my first patchset to linux and any feedback is welcome :) Guo Ren (19): csky: Kernel booting csky: Exception handling and syscall csky: Cache and TLB routines csky: MMU and page talbe management csky: Proc

[PATCH 13/19] csky: User access

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/include/asm/uaccess.h | 408 arch/csky/include/asm/user.h| 102 ++ 2 files changed, 510 insertions(+) create mode 100644 arch/csky/include/asm/uaccess.h create mode 100644 arch/csky/include/asm/user.h

[PATCH 12/19] csky: Debug and Ptrace GDB

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/include/uapi/asm/ptrace.h | 97 +++ arch/csky/kernel/dumpstack.c| 65 +++ arch/csky/kernel/ptrace.c | 339 3 files changed, 501 insertions(+) create mode 100644 arch/csky/include/uapi/asm

[PATCH 17/19] csky: defconfig

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/configs/gx66xx_defconfig | 549 + arch/csky/configs/qemu_ck807_defconfig | 541 2 files changed, 1090 insertions(+) create mode 100644 arch/csky/configs/gx66xx_defconfig create mode 100644

[PATCH 02/19] csky: Exception handling and syscall

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/entry.h | 171 arch/csky/abiv1/src/alignment.c | 513 arch/csky/abiv2/inc/abi/entry.h | 154 +++ arch/csky/include/asm/syscalls.h| 14 + arch/csky/include/asm/traps.h

[PATCH 11/19] csky: Library functions

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/abiv1/src/bswapdi.c| 18 ++ arch/csky/abiv1/src/bswapsi.c| 15 ++ arch/csky/abiv1/src/memcpy.S | 344 +++ arch/csky/abiv2/src/fpu.c| 312 +++ arch/csky/abiv2/src

[PATCH 16/19] csky: Device tree

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/boot/dts/gx6605s.dts | 159 + arch/csky/boot/dts/include/dt-bindings | 1 + arch/csky/boot/dts/qemu.dts| 87 ++ 3 files changed, 247 insertions(+) create mode 100644 arch/csky/boot/dts

[PATCH 01/19] csky: Kernel booting

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/kernel/head.S | 20 ++ arch/csky/kernel/setup.c | 157 +++ 2 files changed, 177 insertions(+) create mode 100644 arch/csky/kernel/head.S create mode 100644 arch/csky/kernel/setup.c diff --git a/arch/csky

[PATCH 15/19] csky: Build infrastructure

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/Kconfig | 203 ++ arch/csky/Kconfig.debug | 22 + arch/csky/Makefile| 92 + arch/csky/abiv1/Makefile | 8 ++ arch/csky/abiv2/Makefile | 3

[PATCH 03/19] csky: Cache and TLB routines

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/cacheflush.h | 40 +++ arch/csky/abiv1/src/cacheflush.c | 32 ++ arch/csky/abiv2/inc/abi/cacheflush.h | 9 ++ arch/csky/include/asm/barrier.h | 14 +++ arch/csky/include/asm/cache.h | 32 ++ arch/csky

[PATCH 14/19] csky: Misc headers

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/abiv1/inc/abi/reg_ops.h | 79 + arch/csky/abiv1/inc/abi/regdef.h | 27 +++ arch/csky/abiv2/inc/abi/fpu.h | 296 + arch/csky/abiv2/inc/abi/reg_ops.h | 86 ++ arch/csky/abiv2/inc/abi

[PATCH 18/19] clocksource: add timer-nationalchip.c

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-nationalchip.c | 149 +++ 2 files changed, 150 insertions(+) create mode 100644 drivers/clocksource/timer-nationalchip.c diff --git a/drivers/clocksource/Makefile

[PATCH 06/19] csky: IRQ handling

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/include/asm/irq.h | 12 + arch/csky/include/asm/irqflags.h | 55 arch/csky/kernel/irq.c | 41 ++ 3 files changed, 108 insertions(+) create mode 100644 arch/csky

[PATCH 05/19] csky: Process management

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/include/asm/mmu_context.h | 140 ++ arch/csky/include/asm/processor.h | 140 ++ arch/csky/include/asm/thread_info.h | 77 +++ arch/csky/kernel/process.c | 147

[PATCH 08/19] csky: ELF and module probe

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/include/asm/elf.h | 151 arch/csky/kernel/module.c | 130 ++ 2 files changed, 281 insertions(+) create mode 100644 arch/csky/include/asm/elf.h create mode 100644 arch/csky

[PATCH 10/19] csky: Signal handling

2018-03-18 Thread Guo Ren
Signed-off-by: Guo Ren --- arch/csky/include/uapi/asm/sigcontext.h | 33 +++ arch/csky/include/uapi/asm/signal.h | 164 ++ arch/csky/kernel/signal.c | 379 3 files changed, 576 insertions(+) create mode 100644 arch/csky/include

Re: [PATCH 02/19] csky: Exception handling and syscall

2018-03-18 Thread Guo Ren
lementing THREAD_INFO_IN_TASK_STRUCT. > Em... I'll think about it. > For consistency, and in case you change your stack size in future, this should > be THREADSIZE_MASK_BIT. > OK > > +if (unlikely(address >= VMALLOC_START && address <= VMALLOC_END)) > > +goto vmalloc_fault; > > You might want to check if this was a user mode fault here, so that users > can't trigger vmalloc faults. Is it necessary to check user mode? If a user-process touch a kernel-addr, it will cause a supervisor exception. Best Regards Guo Ren

Re: [PATCH 18/19] clocksource: add timer-nationalchip.c

2018-03-19 Thread Guo Ren
gt; OK > > + /* register */ > > + clockevents_config_and_register(&nc_ced, freq, 1, ULONG_MAX); > > + > > + nc_csd_enable(); > > + clocksource_mmio_init(NC_VA_COUNTER_2_VALUE, "nationalchip-clksource", > > freq, 200, 32, clocksource_mmio_readl_up); > > s/nationalchip-clksource/nationalchip/ > > line wrap > OK > > + sched_clock_register(nc_sched_clock_read, 32, freq); > > + > > + return 0; > > +} > > +CLOCKSOURCE_OF_DECLARE(nc_timer, "nationalchip,timer-v1", nc_timer_init); > > s/CLOCKSOURCE_OF_DECLARE/TIMER_OF_DECLARE/ > OK Best Regards Guo Ren

Re: [PATCH 18/19] clocksource: add timer-nationalchip.c

2018-03-19 Thread Guo Ren
CKSOURCE_OF_DECLARE(nc_timer, "nationalchip,timer-v1", nc_timer_init); > > This needs a devicetree binding document. Please see > Documentation/devicetree/bindings/submitting-patches.txt. > OK Best Regards Guo Ren

Re: [PATCH 19/19] irqchip: add irq-nationalchip.c and irq-csky.c

2018-03-19 Thread Guo Ren
On Mon, Mar 19, 2018 at 04:26:00AM +, Mark Rutland wrote: > On Mon, Mar 19, 2018 at 03:51:41AM +0800, Guo Ren wrote: > > +static unsigned int intc_reg; > > This should be a void __iomem *ptr; > OK > > +#define CK_VA_INTC_ICR (void *)(intc_reg + 0x00)

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

2018-03-19 Thread Guo Ren
Thx Joe, On Sun, Mar 18, 2018 at 01:25:57PM -0700, Joe Perches wrote: > On Mon, 2018-03-19 at 03:51 +0800, Guo Ren wrote: > > This patchset adds architecture support to Linux for C-SKY's 32-bit embedded > > CPU cores and the patches are based on linux-4.16-rc5. > > >

Re: [PATCH 02/19] csky: Exception handling and syscall

2018-03-19 Thread Guo Ren
next and check the unistd.h again. Best Regards Guo Ren

Re: [PATCH V1 0/5] riscv: Add k/uprobe supported

2020-07-04 Thread Guo Ren
No single step! So I insert a "ebreak" instruction behind the target single-step instruction to simulate the same mechanism. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH V2] riscv: Fixup compile error BUILD_BUG_ON failed

2020-06-29 Thread Guo Ren
Hi Palmer, On Tue, Jun 30, 2020 at 7:22 AM Palmer Dabbelt wrote: > > On Sun, 28 Jun 2020 09:25:24 PDT (-0700), mhira...@kernel.org wrote: > > On Sun, 28 Jun 2020 16:07:37 + > > guo...@kernel.org wrote: > > > >> From: Guo Ren > >> > >> U

Re: [PATCH] csky: remove unusued thread_saved_pc and *_segments functions/macros

2020-06-13 Thread Guo Ren
Acked-by: Guo Ren On Wed, Jun 10, 2020 at 11:45 PM Tobias Klauser wrote: > > These are used nowhere in the tree (except for some architectures which > define them for their own use) and were already removed for other > architectures in: > > commit 6474924e2b5d ("ar

Re: [PATCH] doc: devicetree: bindings: fix spelling mistake

2020-06-13 Thread Guo Ren
Acked-by: Guo Ren On Thu, Jun 11, 2020 at 5:58 PM Flavio Suligoi wrote: > > Fix typo: "triger" --> "trigger" > > Signed-off-by: Flavio Suligoi > --- > Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt | 2 +- > .../devicetree/bindings

Re: [PATCH v2 6/6] riscv: Add KPROBES_ON_FTRACE supported

2020-07-13 Thread Guo Ren
Hi Masami, On Sun, Jul 12, 2020 at 9:37 PM Masami Hiramatsu wrote: > > On Sat, 11 Jul 2020 09:32:01 +0800 > Guo Ren wrote: > > > Thx Masami, > > > > On Fri, Jul 10, 2020 at 9:50 PM Masami Hiramatsu > > wrote: > > > > > > Hi Guo, &g

Re: [PATCH] arm64: Make TSK_STACK_CANARY more accurate defined

2020-07-14 Thread Guo Ren
On 2020/7/14 下午4:37, Will Deacon wrote: On Mon, Jul 13, 2020 at 04:03:33AM +, guo...@kernel.org wrote: From: Guo Ren TSK_STACK_CANARY only used in arm64/Makefile with CONFIG_STACKPROTECTOR_PER_TASK wrap. So use the same policy in asm-offset.c. Signed-off-by: Guo Ren Co-developed-by

Re: [PATCH V2 1/3] riscv: Fixup static_obj() fail

2020-10-06 Thread Guo Ren
On Tue, Oct 6, 2020 at 3:14 AM Atish Patra wrote: > > On Thu, Sep 24, 2020 at 9:19 AM Guo Ren wrote: > > > > How about this, revert the commit and don't free INIT_DATA_SECTION. I > > think the solution is safe enough, but wast a little memory. > > > > dif

Re: [PATCH V2 1/3] riscv: Fixup static_obj() fail

2020-10-06 Thread Guo Ren
patch (signed off and such) posted for this, do you > mind posting one? Otherwise I'll take a crack at constructing the revert > myself. Please have a look: https://lore.kernel.org/linux-riscv/1602002973-92934-1-git-send-email-guo...@kernel.org/T/#u The only revert couldn't solve the static_obj problem. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH V2 1/3] riscv: Fixup static_obj() fail

2020-10-07 Thread Guo Ren
On Wed, Oct 7, 2020 at 4:39 AM Atish Patra wrote: > > On Tue, Oct 6, 2020 at 9:46 AM Guo Ren wrote: > > > > On Tue, Oct 6, 2020 at 3:14 AM Atish Patra wrote: > > > > > > On Thu, Sep 24, 2020 at 9:19 AM Guo Ren wrote: > > > > > >

Re: [PATCH 2/2] riscv: Fixup static_obj() fail v2

2020-10-07 Thread Guo Ren
On Thu, Oct 8, 2020 at 3:46 AM Atish Patra wrote: > > On Wed, Oct 7, 2020 at 8:09 AM wrote: > > > > From: Guo Ren > > > > v1 is commit: 6184358da0004c8fd940afda6c0a0fa4027dc911 which has > > been reverted. > > > > When enable LOCKDEP, static_obj

Re: [PATCH 2/2] riscv: Fixup static_obj() fail v2

2020-10-08 Thread Guo Ren
On Thu, Oct 8, 2020 at 11:54 AM Palmer Dabbelt wrote: > > On Wed, 07 Oct 2020 08:08:33 PDT (-0700), guo...@kernel.org wrote: > > From: Guo Ren > > > > v1 is commit: 6184358da0004c8fd940afda6c0a0fa4027dc911 which has > > been reverted. > > > > When ena

Re: [PATCH] riscv: Remove unnecessary path for syscall_trace

2020-05-25 Thread Guo Ren
Hi Tycho, On Mon, May 25, 2020 at 10:36 PM Tycho Andersen wrote: > > On Mon, May 25, 2020 at 02:18:26PM +, guo...@kernel.org wrote: > > From: Guo Ren > > > > Obviously, there is no need to recover a0-a7 in reject path. > > > > Previous modification

Re: [PATCH] csky: Fixup calltrace panic

2020-05-22 Thread Guo Ren
KBUILD_CFLAGS += -mbacktrace endif We'll upstream -mbacktrace to gcc 9 soon, sorry for the confusion. Thx for your work on maintaining. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH v3 06/16] csky: kprobes: Use generic kretprobe trampoline handler

2020-08-28 Thread Guo Ren
Looks more clear. Acked-by: Guo Ren On Fri, Aug 28, 2020 at 12:39 AM Masami Hiramatsu wrote: > > Signed-off-by: Masami Hiramatsu > --- > arch/csky/kernel/probes/kprobes.c | 78 > + > 1 file changed, 3 insertions(+), 75 deletions(-) >

Re: [PATCH v3 3/7] riscv: Fixup kprobes handler couldn't change pc

2020-08-17 Thread Guo Ren
On Sat, Aug 15, 2020 at 6:36 AM Palmer Dabbelt wrote: > > On Mon, 13 Jul 2020 16:39:18 PDT (-0700), guo...@kernel.org wrote: > > From: Guo Ren > > > > The "Changing Execution Path" section in the Documentation/kprobes.txt > > said: > > > > Si

Re: [PATCH v3 4/7] riscv: Add kprobes supported

2020-08-17 Thread Guo Ren
On Sat, Aug 15, 2020 at 6:36 AM Palmer Dabbelt wrote: > > On Mon, 13 Jul 2020 16:39:19 PDT (-0700), guo...@kernel.org wrote: > > From: Guo Ren > > > > This patch enables "kprobe & kretprobe" to work with ftrace > > interface. It utilized soft

Re: [PATCH v4 9/9] riscv: Fixup lockdep_assert_held(&text_mutex) in patch_insn_write

2020-10-20 Thread Guo Ren
On Mon, Oct 19, 2020 at 4:36 PM Masami Hiramatsu wrote: > > On Sat, 17 Oct 2020 07:06:17 + > guo...@kernel.org wrote: > > > From: Guo Ren > > > > It will cause warning messages: > > echo function_graph > /sys/kernel/debug/tracing/current_tracer &g

Re: [PATCH v4 9/9] riscv: Fixup lockdep_assert_held(&text_mutex) in patch_insn_write

2020-10-20 Thread Guo Ren
On Tue, Oct 20, 2020 at 2:54 AM Atish Patra wrote: > > On Sat, Oct 17, 2020 at 12:07 AM wrote: > > > > From: Guo Ren > > > > It will cause warning messages: > > echo function_graph > /sys/kernel/debug/tracing/current_tracer &g

Re: [PATCH v4 9/9] riscv: Fixup lockdep_assert_held(&text_mutex) in patch_insn_write

2020-10-21 Thread Guo Ren
On Wed, Oct 21, 2020 at 4:41 AM Steven Rostedt wrote: > > On Tue, 20 Oct 2020 19:18:01 +0800 > Guo Ren wrote: > > > > What platform are you testing ? We are seeing a crash while enabling > > > any of the tracers multiple times > > > on Qemu/HiFive Unleashed

Re: [PATCH] stop_machine: Mark functions as notrace

2020-10-28 Thread Guo Ren
__asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy)); With your patch, it's solved. For this patch, I'll give: Tested by: Guo Ren But that's not enough, we still need: diff --git a/arch/riscv/kernel/sbi.c b/arch/riscv/kernel/sbi.c index 226ccce..12b88

Re: [PATCH 1/3] irqchip/irq-sifive-plic: Fixup wrong size of xxx_PER_HART and reg base

2020-10-23 Thread Guo Ren
On Fri, Oct 23, 2020 at 8:31 PM Anup Patel wrote: > > On Fri, Oct 23, 2020 at 3:48 PM wrote: > > > > From: Guo Ren > > > > ENABLE and CONTEXT registers contain M & S status for per-hart, so > > ref to the specification the correct definition is double to

Re: [PATCH 2/3] irqchip/irq-sifive-plic: Fixup couldn't broadcast to multi CPUs

2020-10-23 Thread Guo Ren
On Fri, Oct 23, 2020 at 8:17 PM Anup Patel wrote: > > On Fri, Oct 23, 2020 at 3:48 PM wrote: > > > > From: Guo Ren > > > > If "echo 3 > /proc/irq/1/smp_affinity", we want irq 1 could be > > broadcast to CPU0 & CPU1 and one of them w

Re: [PATCH 1/3] irqchip/irq-sifive-plic: Fixup wrong size of xxx_PER_HART and reg base

2020-10-26 Thread Guo Ren
Hi Anup, On Sun, Oct 25, 2020 at 5:18 PM Anup Patel wrote: > > On Sat, Oct 24, 2020 at 8:40 AM Guo Ren wrote: > > > > On Fri, Oct 23, 2020 at 8:31 PM Anup Patel wrote: > > > > > > On Fri, Oct 23, 2020 at 3:48 PM wrote: > > > > > >

Re: [PATCH] stop_machine: Mark functions as notrace

2020-10-29 Thread Guo Ren
On Thu, Oct 29, 2020 at 8:23 AM Atish Patra wrote: > > On Wed, Oct 28, 2020 at 8:44 AM Guo Ren wrote: > > > > Hi Zong & Atish, > > > > In our 2 harts c910 chip, we found: > > > > echo function > /sys/kernel/debug/tracing/current_tracer &g

Re: [PATCH] stop_machine: Mark functions as notrace

2020-10-29 Thread Guo Ren
On Thu, Oct 29, 2020 at 10:34 AM Zong Li wrote: > > On Thu, Oct 29, 2020 at 8:23 AM Atish Patra wrote: > > > > On Wed, Oct 28, 2020 at 8:44 AM Guo Ren wrote: > > > > > > Hi Zong & Atish, > > > > > > In our 2 harts c910 chip, we fo

Re: [PATCH] stop_machine: Mark functions as notrace

2020-10-29 Thread Guo Ren
On Fri, Oct 30, 2020 at 2:46 AM Atish Patra wrote: > > On Thu, Oct 29, 2020 at 9:06 AM Guo Ren wrote: > > > > On Thu, Oct 29, 2020 at 10:34 AM Zong Li wrote: > > > > > > On Thu, Oct 29, 2020 at 8:23 AM Atish Patra wrote: > > > > > &

Re: [PATCH] stop_machine: Mark functions as notrace

2020-10-31 Thread Guo Ren
m ftrace. My patch just use notrace flag setting on some functions. @Atish How do think: CFLAGS_REMOVE_cacheflush.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE) -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH] riscv: Enable ELF-ASLR for riscv

2020-07-09 Thread Guo Ren
On Thu, Jul 9, 2020 at 1:32 PM Alex Ghiti wrote: > > Hi Guo, > > Le 7/9/20 à 12:38 AM, guo...@kernel.org a écrit : > > From: Guo Ren > > > > Let riscv enable randomizes the stack, heap and binary images of > > ELF binaries. Seems it's ok at all after qem

Re: [PATCH v2 1/2] riscv: Add STACKPROTECTOR supported

2020-07-09 Thread Guo Ren
unsigned long tsc; > 22 > 23 /* Try to get a semi random initial value. */ > 24 get_random_bytes(&canary, sizeof(canary)); > 25 tsc = get_cycles(); > > 26 canary += tsc + (tsc << 32UL); > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH V2 0/3] riscv: Enable LOCKDEP

2020-07-09 Thread Guo Ren
Thank you, Palmer On Fri, Jul 10, 2020 at 6:06 AM Palmer Dabbelt wrote: > > On Sat, 27 Jun 2020 06:57:05 PDT (-0700), guo...@kernel.org wrote: > > From: Guo Ren > > > > Lockdep is needed by proving the spinlocks and rwlocks. To support it, > > we need to add

Re: [PATCH v4 9/9] riscv: Fixup lockdep_assert_held(&text_mutex) in patch_insn_write

2020-10-19 Thread Guo Ren
Good Idea! I'll try :P On Mon, Oct 19, 2020 at 4:36 PM Masami Hiramatsu wrote: > > On Sat, 17 Oct 2020 07:06:17 + > guo...@kernel.org wrote: > > > From: Guo Ren > > > > It will cause warning messages: > > echo function_graph > /sys/kernel/de

Re: [PATCH v4] riscv: Enable per-task stack canaries

2020-11-04 Thread Guo Ren
Hi Kees, Ping? Any feedback? On Sun, Oct 18, 2020 at 8:39 PM wrote: > > From: Guo Ren > > This enables the use of per-task stack canary values if GCC has > support for emitting the stack canary reference relative to the > value of tp, which holds the task struct pointer in

Re: [PATCH v4] riscv: Enable per-task stack canaries

2020-11-14 Thread Guo Ren
Hi Palmer, Could you help move the patch into your next-tree with Kees' review added? On Sat, Nov 14, 2020 at 6:57 AM Kees Cook wrote: > > On Sun, Oct 18, 2020 at 12:38:17PM +, guo...@kernel.org wrote: > > From: Guo Ren > > > > This enables the use of per-ta

<    2   3   4   5   6   7   8   >