Re: [PATCH V2 11/19] csky: Atomic operations

2018-07-07 Thread Guo Ren
On Sat, Jul 07, 2018 at 10:10:24PM +0200, Andrea Parri wrote: > On Sat, Jul 07, 2018 at 04:08:47PM +0800, Guo Ren wrote: > > On Fri, Jul 06, 2018 at 02:17:16PM +0200, Peter Zijlstra wrote: > > > CPU0CPU1 > > > > WRITE_ONCE(x, 1)

Re: [PATCH 1/2] nds32: To implement these icache invalidation APIs since nds32 cores don't snoop data cache. This issue is found by Guo Ren. Based on the Documentation/core-api/cachetlb.rst and it say

2018-06-29 Thread Guo Ren
K); > + flush_icache_range(_addr, _addr + len); > +} The same as above. Guo Ren

Re: [PATCH V2 19/19] irqchip: add C-SKY irqchip drivers

2018-07-03 Thread Guo Ren
X-License-Identifier: GPL-2.0 > > +// Copyright (C) 2018 Hangzhou NationalChip Science & Technology Co.,Ltd. > > See above Ok, stick an empty newline > > + writel_relaxed(expand_byte_to_word(i) + 0x03020100, > > This magic number is the reverse of the above magic. Is that intentional. > > > + reg_base + INTC_SOURCE + i); > > + } > > See above. No magic number and use inline func. > > +static int __init > > +intc_init(struct device_node *node, struct device_node *parent) > > +{ > > + u32 clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; > > + int ret; > > Aside of that the whole thing might share the code with the other one, but > it might not be worth it. At least this wants to be documented in the > changelog why sharing the code is not useful... Do you mean merge irq-csky-v1.c irq-csky-v2.c irq-nationalchip.c into one file eg: irq-csky.c? Guo Ren

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Guo Ren
t; > + csky_timer_dying_cpu); > > Oh no. Just picking a random hotplug event is not how it works. Add your > own please and make sure it's at the proper place. like this? include/linux/cpuhotplug.h: CPUHP_AP_KVM_ARM_TIMER_STARTING, + CPUHP_AP_CSKY_TIMER_STARTING, /* Must be the last timer callback */ CPUHP_AP_DUMMY_TIMER_STARTING, > > + struct clock_event_device *ce = (struct clock_event_device *) dev; > > Pointless type cast. Ok. struct clock_event_device *ce = dev; > > + .flags = IRQF_TIMER | IRQF_IRQPOLL, > > + }, > > See above Ok, tabular Guo Ren

Re: [PATCH V2 13/19] csky: Library functions

2018-07-04 Thread Guo Ren
On Tue, Jul 03, 2018 at 10:04:57PM +0200, Arnd Bergmann wrote: > It's better to avoid relying on libgcc here. Please use the > CONFIG_GENERIC_LIB_ASHLDI3/ASHRDI3/LSHRDI3/etc > helpers that we already have in the kernel. Ok, I'll try Guo Ren

Re: [PATCH V2 01/19] csky: Build infrastructure

2018-07-04 Thread Guo Ren
> > +generic-y += auxvec.h > > You should not need asm/auxvec.h or uapi/asm/auxvec.h Ok. > > +generic-y += bug.h > > providing your own bug.h might be helpful too. > Have a look Ok. > > +generic-y += cputime.h > > asm-generic/cputime.h no loinger exists Ok, remove it. > > +generic-y += kvm_para.h > > Do you support KVM? No, remove it, thx. > > +generic-y += sizes.h > > Deprecated and should not be needed Ok, remove it. Guo Ren

Re: [PATCH V2 05/19] csky: System Call

2018-07-04 Thread Guo Ren
map_arg_struct { > > + unsigned long addr; > > + unsigned long len; > > + unsigned long prot; > > + unsigned long flags; > > + unsigned long fd; > > + unsigned long offset; > > +}; > > + > > +SYSCALL_DEFINE1(mmap, > > + struct mmap_arg_struct *, arg) > > +{ > > + struct mmap_arg_struct a; > > + > > + if (copy_from_user(&a, arg, sizeof(a))) > > + return -EINVAL; > > + > > + if (unlikely(a.offset & ~PAGE_MASK)) > > + return -EINVAL; > > + > > + return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, > > a.offset >> PAGE_SHIFT); > > +} > > This can be removed since there is mmap2() Ok. Guo Ren

Re: [PATCH V2 19/19] irqchip: add C-SKY irqchip drivers

2018-07-04 Thread Guo Ren
On Wed, Jul 04, 2018 at 08:43:29AM +0200, Thomas Gleixner wrote: > > Do you mean merge irq-csky-v1.c irq-csky-v2.c irq-nationalchip.c into > > one file eg: irq-csky.c? > > Yes, but only if there is enough code to share without creating an ifdef > mess. But that looks doabl

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Guo Ren
_IRQPOLL, > > + }, > > +}; > > + > > +static u64 notrace nc_sched_clock_read(void) > > +{ > > + void __iomem *base; > > + > > + base = timer_of_base(&to) + CLKSRC_OFFSET; > > + > > + return (u64) readl_relaxed(base + TIMER_VALUE); > > +} > > + > > +static void nc_timer_set_div(void __iomem *base) > > +{ > > + unsigned int div; > > + > > + div = timer_of_rate(&to)/TIMER_FREQ - 1; > > space ' / ' > > Is it > (timer_of_rate(&to) / TIMER_FREQ) - 1 > or > timer_of_rate(&to) / (TIMER_FREQ - 1) > > ? Thx, I'll modify it like this: div = (timer_of_rate(&to) / TIMER_FREQ) - 1; > > + clocksource_mmio_init(base + TIMER_VALUE, "nationalchip", TIMER_FREQ, > > 200, 32, > > + clocksource_mmio_readl_up); > > return code check ? Ok, add return code check. > > +TIMER_OF_DECLARE(nc_timer, "nationalchip,timer-v1", nc_timer_init); > > same comment than cksy timer. Ok. Guo Ren

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Guo Ren
On Wed, Jul 04, 2018 at 04:35:43PM +0200, Thomas Gleixner wrote: > On Wed, 4 Jul 2018, Guo Ren wrote: > > On Tue, Jul 03, 2018 at 11:39:05AM +0200, Thomas Gleixner wrote: > > > > +static inline u64 get_ccvr(void) > > > > +{ > > > > +

Re: [PATCH V2 05/19] csky: System Call

2018-07-04 Thread Guo Ren
kernel/syscall_table.c: > > #define sys_fadvise64_64 csky_fadvise64_64 Thx for the tip :) Guo Ren

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-05 Thread Guo Ren
ic ops is set. Got it, add set_oneshot. > > Thx, I'll modify it like this: > > div = (timer_of_rate(&to) / TIMER_FREQ) - 1; > > I wanted to be sure it wasn't the latter. In this case, you don't need > parenthesis, so just add the spaces around the '/' operator. Ok Guo Ren

Re: [PATCH V2 16/19] csky: SMP support

2018-07-05 Thread Guo Ren
On Thu, Jul 05, 2018 at 08:05:03PM +0200, Peter Zijlstra wrote: > On Mon, Jul 02, 2018 at 01:30:19AM +0800, Guo Ren wrote: > > +static irqreturn_t handle_ipi(int irq, void *dev) > > +{ > > + unsigned long *pending_ipis = &ipi_data[smp_processor_id()].bits;

Re: [PATCH V2 11/19] csky: Atomic operations

2018-07-06 Thread Guo Ren
On Thu, Jul 05, 2018 at 07:50:59PM +0200, Peter Zijlstra wrote: > On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote: > > > +#include > > + > > +#defi

Re: [PATCH V2 16/19] csky: SMP support

2018-07-06 Thread Guo Ren
tmp = mfcr("cr<29, 0>"); > > + tmp |= 1 << cpu; > > + mtcr("cr<29, 0>", tmp); > > + > > + while (!cpu_online(cpu)); > > + > > + secondary_stack = 0; > > + > > + return 0; > > +} > > I don't see a start address being setup here, so I assume that CPUs branch to > a > fixed address out-of-reset. Does that mean that the kernel has to be loaded at > a particular physical address on a given platform? No, not a fixed address. I put it arch/csky/kernel/traps.c:79-83 trap_init() #ifdef CONFIG_SMP mtcr("cr<28, 0>", virt_to_phys(vec_base)); VEC_INIT(VEC_RESET, (void *)virt_to_phys(_start_smp_secondary)); #endi Guo Ren

Re: [PATCH V2 11/19] csky: Atomic operations

2018-07-06 Thread Guo Ren
On Thu, Jul 05, 2018 at 07:59:02PM +0200, Peter Zijlstra wrote: > On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote: > > > +static inline void arch_spin_lock(arch_spinlock_t *lock) > > +{ > > + unsigned int *p = &lock->lock; > > + unsigne

Re: [PATCH V2 11/19] csky: Atomic operations

2018-07-06 Thread Guo Ren
On Thu, Jul 05, 2018 at 08:00:08PM +0200, Peter Zijlstra wrote: > On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote: > > +#ifdef CONFIG_CPU_HAS_LDSTEX > > +ENTRY(csky_cmpxchg) > > + USPTOKSP > > + mfcra3, epc > > + INCTRAP a3 > > + > >

Re: [PATCH V2 16/19] csky: SMP support

2018-07-06 Thread Guo Ren
It's the only SMP bringup mechanism architectual for C-SKY SMP. There is no another way in future and SOC vendor couldn't change it. > You probably want to use an enable-method property to describe this. No, thx. Guo Ren

Re: [PATCH V2 16/19] csky: SMP support

2018-07-06 Thread Guo Ren
On Fri, Jul 06, 2018 at 11:39:32AM +0200, Peter Zijlstra wrote: > On Fri, Jul 06, 2018 at 02:07:40PM +0800, Guo Ren wrote: > > > > Please explain those mb()'s... I'm thinking you meant to use smp_mb(). > > Yes, smp_mb(). Current smp_mb()&mb() is the same: sync

Re: [PATCH V2 11/19] csky: Atomic operations

2018-07-06 Thread Guo Ren
On Fri, Jul 06, 2018 at 02:05:32PM +0200, Peter Zijlstra wrote: > On Fri, Jul 06, 2018 at 07:48:12PM +0800, Guo Ren wrote: > > On Thu, Jul 05, 2018 at 08:00:08PM +0200, Peter Zijlstra wrote: > > > On Mon, Jul 02, 2018 at 01:30:14AM +0800, Guo Ren wrote: > > > >

Re: [PATCH V2 11/19] csky: Atomic operations

2018-07-06 Thread Guo Ren
next version patch. > > If you need inspiration, look at: > arch/arm/include/asm/spinlock.h > > Or look at the current version of that file and ignore the LSE version. > > Note that unlock is a store half-word (u16), not having seen your arch > manual yet I don't know if you even have that. Nice tips, thank you very much. Guo Ren

Re: working toolchain for c-sky

2018-12-11 Thread Guo Ren
//gitlab.com/c-sky/buildroot/-/jobs/131973812/artifacts/browse/output/images/ See readme.txt for run. Best Regards Guo Ren

Re: [PATCH v6 07/27] elf-em.h: add EM_CSKY

2018-12-13 Thread Guo Ren
Reviewed-by: Guo Ren On Thu, Dec 13, 2018 at 08:22:00PM +0300, Dmitry V. Levin wrote: > The uapi/linux/audit.h header is going to use EM_CSKY in order > to define AUDIT_ARCH_CSKY which is needed to implement > syscall_get_arch() which in turn is required to extend > the generic ptr

Re: [PATCH v6 08/27] csky: define syscall_get_arch()

2018-12-13 Thread Guo Ren
Thx Dmitry, Reviewed-by: Guo Ren On Thu, Dec 13, 2018 at 08:22:07PM +0300, Dmitry V. Levin wrote: > syscall_get_arch() is required to be implemented on all architectures > in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO > request. > > Cc: Guo Ren > Cc

Re: [PATCH v6 08/27] csky: define syscall_get_arch()

2018-12-21 Thread Guo Ren
On Fri, Dec 21, 2018 at 05:36:41AM +0300, Dmitry V. Levin wrote: > Hi, > > On Fri, Dec 14, 2018 at 12:44:12PM +0800, Guo Ren wrote: > > Thx Dmitry, > > > > Reviewed-by: Guo Ren > > Given that the whole series is going to be pinged for quite some > time y

Re: [PATCH v6 07/27] elf-em.h: add EM_CSKY

2018-12-21 Thread Guo Ren
On Fri, Dec 21, 2018 at 05:35:52AM +0300, Dmitry V. Levin wrote: > Hi, > > On Fri, Dec 14, 2018 at 12:43:08PM +0800, Guo Ren wrote: > > Reviewed-by: Guo Ren > > Given that the whole series is going to be pinged for quite some > time yet, would you mind taking this patc

Re: Linux 5.0-rc1 (test results)

2019-01-08 Thread Guo Ren
return NULL; for (i = 0; i < PAGE_SIZE/sizeof(pte_t); i++) (pte + i)->pte_low = _PAGE_GLOBAL; return pte; } static inline struct page *pte_alloc_one(struct mm_struct *mm) { struct page *pte; pte = alloc_pages(GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_ZERO, 0); if (!pte) return NULL; if (!pgtable_page_ctor(pte)) { __free_page(pte); return NULL; } return pte; } Best Regards Guo Ren

Re: [PATCH] csky: fix refcount leak in setup_smp()

2018-12-27 Thread Guo Ren
; > continue; > + } > + > + of_node_put(node); If success, of_node_put ? > > if (cpu >= NR_CPUS) Here need a of_node_put()? > continue; Can you use for_each_of_cpu_node() for the patch? Thx Guo Ren

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

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

2018-10-09 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 Reviewed-by: Rob Herring --- .../bindings/interrupt-controller/csky,mpintc.txt | 40 ++

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

2018-10-09 Thread Guo Ren
CPUHP_AP_CSKY_TIMER_STARTING. - Add CPUHP_AP_CSKY_TIMER_STARTING in cpuhotplug.h. - 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 Cc: Daniel Lezcano --- drivers/clocksource/Kconfig

[PATCH V11 3/8] irqchip: add C-SKY APB bus interrupt controller

2018-10-09 Thread Guo Ren
k - add INTC_IFR to clear irq-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 Cc: Mark Rutland --- drivers/irqchip/Kconfig | 8 ++ drivers/irqchip/Makef

[PATCH V11 6/8] dt-bindings: timer: C-SKY Multi-processor timer

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

[PATCH V11 0/8] C-SKY(csky) Linux Kernel Driver

2018-10-09 Thread Guo Ren
et. - Add COMPILE_TEST for csky_mp_timer. - Fixup smp boot error, cpuhp_setup_state must after timer_of_init() for csky_mp_timer. Any feedback is welcome, thx for all people review my patchset. Guo Ren (8): irqchip: add C-SKY SMP interrupt controller dt-bindings: interrupt-controller: C-SK

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

2018-10-09 Thread Guo Ren
ckpatch.pl - Move IPI_IRQ into the driver - Remove irq_set_default_host() and use set_ipi_irq_mapping() - Change name with upstream feed-back - Change irq map, reserve soft_irq & private_irq space - Add License and Copyright - Support set_affinity for irq balance in SMP Signed-off-by: Guo

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

2018-10-09 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 V11 7/8] clocksource: add gx6605s SOC system timer

2018-10-09 Thread Guo Ren
Signed-off-by: Guo Ren Cc: Daniel Lezcano --- drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile| 1 + drivers/clocksource/timer-gx6605s.c | 154 3 files changed, 163 insertions(+) create mode 100644 drivers/clocksource/timer

[PATCH V11 4/8] dt-bindings: interrupt-controller: C-SKY APB intc

2018-10-09 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

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

2018-10-09 Thread Guo Ren
a result of create_mapping by arch_ipi_irq_mapping() callback in irq-csky-mpintc.c void __init setup_smp_ipi(void) { int rc; ipi_irq = arch_ipi_irq_mapping(); if (ipi_irq == 0) panic("%s IRQ mapping failed\n", __func__); rc = request_percpu_irq(ipi_irq, handle_ipi, "IPI Interrupt", &ipi_dummy_dev); if (rc) panic("%s IRQ request failed\n", __func__); enable_smp_ipi(); } Best Regards Guo Ren

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

2018-10-29 Thread Guo Ren
s, 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: [PATCH V13 1/4] clocksource: add C-SKY SMP timer

2018-10-29 Thread Guo Ren
gards Guo Ren On Mon, Oct 15, 2018 at 01:07:41PM +0800, Guo Ren wrote: > The driver is for C-SKY SMP timer. It only support oneshot event > and 32bit overflow for clocksource. Per cpu core has one timer and > all timers share one clock-counter-input the same clocksource. > >

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

[GIT PULL] fixup dtb Kbuild for C-SKY(csky) Port

2018-10-31 Thread Guo Ren
up patches for linux-4.20-rc1 These patches are complementary to "C-SKY(csky) Port for Linux 4.20" and fixup dtb Kbuild to follow the new Devicetree dtb build rules. Link: https://lore.kernel.org/lkml/cabggisxiwaqn9qdqpfxewcckkgjfmzfvspgvuhqk7ob404-...@mail.gmail.com/ Si

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

2018-10-15 Thread Guo Ren
nistd.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 (21): csky: Build infrastructure csky: defconfig csky: Kernel booting csky: Exception handling and mm-fault csky: System Call c

[PATCH V9 02/21] csky: defconfig

2018-10-15 Thread Guo Ren
This patch adds csky defconfig. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- 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

[PATCH V9 03/21] csky: Kernel booting

2018-10-15 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 Cc: Arnd Bergmann --- Changelog: - Use built-in dtb when dtb param is NULL. - Add dummy console for allmodconfig. --- --- arch/csky/k

[PATCH V9 01/21] csky: Build infrastructure

2018-10-15 Thread Guo Ren
This patch adds Makefile, Kconfig for build infrastructure. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- Changelog: - make allmodconfig is OK. - Use BUILTIN_DTB as string, remove bool define for compile. - Add xor.h in asm/Kbuild - Add compat.h in asm/Kbuild. - Add select DMA_DIRECT_OPS in

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

2018-10-15 Thread Guo Ren
This patch adds exception handling code, cpuinfo and mm-fault code. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- Changelog: - Fixup r15 may used by unalignment access and remove r1. --- --- arch/csky/abiv1/alignment.c | 326 + arch/csky/abiv1/inc/abi

[PATCH V9 11/21] csky: Atomic operations

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

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

2018-10-15 Thread Guo Ren
This patch adds cache and tlb sync codes for abiv1 & abiv2. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- Changelog: - fixup module compile error for EXPORT_SYMBOL(cache_wbinv_range). - tlb.h & cacheflush.h: fix flush_cache_range and tlb_start_vma of abiv1 in flush_cache_r

[PATCH V9 05/21] csky: System Call

2018-10-15 Thread Guo Ren
This patch adds files related to syscall. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- 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

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

2018-10-15 Thread Guo Ren
This patch adds files related to VDSO and our VDSO only support rt_sigreturn. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- 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

[PATCH V9 10/21] csky: IRQ handling

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

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

2018-10-15 Thread Guo Ren
This patch adds files related to task_switch, sigcontext, signal, fpu context switch. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- 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

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

2018-10-15 Thread Guo Ren
.gh17...@n2100.armlinux.org.uk/ Signed-off-by: Guo Ren Cc: Christoph Hellwig Cc: Arnd Bergmann --- Changelog: - fixup pfn_valid(pfn) compile error for modules. - fixup compile warning for CONFIG_DEBUG_HIGHMEM. - fixup module compile error for EXPORT_SYMBOL(empty_zero_page). - dma-mapping: fix

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

2018-10-15 Thread Guo Ren
This patch adds ELF definition and module relocate codes. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- 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

[PATCH V9 13/21] csky: Library functions

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

[PATCH V9 14/21] csky: User access

2018-10-15 Thread Guo Ren
The patch adds "user access from kernel" codes. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/include/asm/uaccess.h | 416 arch/csky/lib/usercopy.c| 262 + 2 files changed, 678 insertions(+) create m

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

2018-10-15 Thread Guo Ren
This patch adds arch ptrace implementation, stack dump and bug.h. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- 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

[PATCH V9 16/21] csky: SMP support

2018-10-15 Thread Guo Ren
This patch adds boot, ipi, hotplug codes for SMP. Signed-off-by: Guo Ren Cc: Marc Zyngier Cc: Mark Rutland Cc: Peter Zijlstra Cc: Arnd Bergmann --- Changelog: - Use PER_CPU_DEFINE for ipi_data. - Remove unused variable and add static for enable_smp_ipi(). - Add comment to explain pass

[PATCH V9 17/21] csky: Misc headers

2018-10-15 Thread Guo Ren
This patch adds csky registers' definition, bitops, byteorder, asm-offsets codes. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- 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

[PATCH V9 18/21] dt-bindings: csky CPU Bindings

2018-10-15 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 Cc: Rob Herring --- Changelog: - Add compatible. - Remove status part. --- --- Documentation/devicetree/bindings/csky/cpus.txt | 73 + 1 file changed, 73

[PATCH V9 19/21] dt-bindings: Add vendor prefix for csky

2018-10-15 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 V9 20/21] MAINTAINERS: Add csky

2018-10-15 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

[PATCH V9 21/21] csky: support dword access for get_user_size()

2018-10-15 Thread Guo Ren
follow abiv2 gcc ABI for dword access. abiv1 couldn't support __get_user_dword now. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/include/asm/uaccess.h | 140 1 file changed, 56 insertions(+), 84 deletions(-) diff --git a/arch/csky/include/a

[PATCH V13 0/4] C-SKY(csky) Linux Intc Driver

2018-10-16 Thread Guo Ren
changelog. Hope it could be merged into linux-4.20 and I'm very grateful to any help. Guo Ren (4): irqchip: add C-SKY SMP interrupt controller dt-bindings: interrupt-controller: C-SKY SMP intc irqchip: add C-SKY APB bus interrupt controller dt-bindings: interrupt-controller:

[PATCH V13 3/4] irqchip: add C-SKY APB bus interrupt controller

2018-10-16 Thread Guo Ren
The driver is for C-SKY APB bus interrupt controller. It's a simple interrupt controller which use pending reg to detect the irq and use enable/disable reg to mask/unmask interrupt sources. A lot of SOCs based on C-SKY CPU use the interrupt controller as root controller. Signed-off-by: Gu

[PATCH V13 1/4] irqchip: add C-SKY SMP interrupt controller

2018-10-16 Thread Guo Ren
The driver is for C-SKY SMP interrupt controller. It support 16 soft-irqs, 16 private-irqs, and 992 max external-irqs, a total of 1024 interrupts. C-SKY CPU 807/810/860 SMP/non-SMP could use it. Signed-off-by: Guo Ren Cc: Thomas Gleixner Cc: Marc Zyngier --- Changelog: - Remove

[PATCH V13 4/4] dt-bindings: interrupt-controller: C-SKY APB intc

2018-10-16 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 V13 2/4] dt-bindings: interrupt-controller: C-SKY SMP intc

2018-10-16 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 Reviewed-by: Rob Herring --- .../bindings/interrupt-controller/csky,mpintc.txt | 40 ++

Re: [PATCH V13 0/4] C-SKY(csky) Linux Intc Driver

2018-10-16 Thread Guo Ren
Hi Marc, On Tue, Oct 16, 2018 at 03:41:05PM +0100, Marc Zyngier wrote: > Guo, > > On 16/10/18 15:08, Guo Ren wrote: > > This is about 13th patchset for C-SKY linux intc drivers and it should pair > > with 9th kernel patchset. Timer drivers are seperated accordin

Re: [PATCH V13 0/4] C-SKY(csky) Linux Intc Driver

2018-10-17 Thread Guo Ren
Hi Marc, On Wed, Oct 17, 2018 at 09:29:45AM +0100, Marc Zyngier wrote: > Hi Guo, > > On 17/10/18 02:55, Guo Ren wrote: > > Hi Marc, > > > > On Tue, Oct 16, 2018 at 03:41:05PM +0100, Marc Zyngier wrote: > >> Guo, > >> > >> On 16/10/18 15:08,

Re: [PATCH V9 05/21] csky: System Call

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:02:33PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:01 AM Guo Ren wrote: > > > > This patch adds files related to syscall. > > > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > Reviewed-by: Arnd Bergmann >

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

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:06:56PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:01 AM Guo Ren wrote: > > > > This patch adds files related to memory management and here is our > > memory-layout: > > > >Fixmap : 0xffc02000 – 0xf000

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

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:11:00PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:01 AM Guo Ren wrote: > > > > This patch adds files related to task_switch, sigcontext, signal, > > fpu context switch. > > > > Signed-off-by: Guo Ren > > C

Re: [PATCH V9 10/21] csky: IRQ handling

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:14:48PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:02 AM Guo Ren wrote: > > > > This patch adds IRQ handling files. > > > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > Cc: Thomas Glei

Re: [PATCH V9 11/21] csky: Atomic operations

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:17:05PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:02 AM Guo Ren wrote: > > > > This patch adds atomic, cmpxchg, spinlock files. > > > > Signed-off-by: Guo Ren > > Cc: Peter Zijlstra > > Cc: Andrea Parri > >

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

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:18:49PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:02 AM Guo Ren wrote: > > > > This patch adds ELF definition and module relocate codes. > > > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > >

Re: [PATCH V9 13/21] csky: Library functions

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:24:36PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:02 AM Guo Ren wrote: > > > +++ b/arch/csky/lib/delay.c > > @@ -0,0 +1,39 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +// Copyright (C) 2018 Hangzhou C-SKY Micro

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

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:46:56PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:06 AM Guo Ren wrote: > > > > This patch adds arch ptrace implementation, stack dump and bug.h. > > > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > Reviewed

Re: [PATCH V9 18/21] dt-bindings: csky CPU Bindings

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:50:33PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:30 AM Guo Ren wrote: > > > > This patch adds the documentation to describe that how to add cpu nodes in > > dts for SMP. > > > > Signed-off-by: Guo Ren > > Cc: Rob H

Re: [PATCH V9 21/21] csky: support dword access for get_user_size()

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:44:17PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:33 AM Guo Ren wrote: > > > > Support dword access for get_user_size and redesign put_user_size with > > the same style of get_user_size. It's Ok to use xxx_user_asm_common for >

Re: [PATCH V9 18/21] dt-bindings: csky CPU Bindings

2018-10-17 Thread Guo Ren
On Thu, Oct 18, 2018 at 11:21:30AM +0800, Guo Ren wrote: > On Wed, Oct 17, 2018 at 05:50:33PM +0200, Arnd Bergmann wrote: > > On Tue, Oct 16, 2018 at 5:30 AM Guo Ren wrote: > > > > > > This patch adds the documentation to describe that how to add cpu nodes in > >

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

2018-10-17 Thread Guo Ren
On Wed, Oct 17, 2018 at 05:58:46PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 4:58 AM Guo Ren wrote: > > > > This is the 9th version patchset to add the Linux kernel port for > > C-SKY(csky) based on linux-4.19-rc3. > > > > There are only a few cha

[PATCH] MAINTAINERS: add maintainer for C-SKY drivers

2018-11-05 Thread Guo Ren
There are two intc drivers and two clocksource drivers, also include related dt-bindings' documentations. Signed-off-by: Guo Ren --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f485597..fb7286a 100644 --- a/MAINTAINERS +++ b/MAINTA

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

2018-10-11 Thread Guo Ren
Hi Marc, On Tue, Oct 09, 2018 at 04:11:05PM +0100, Marc Zyngier wrote: > On 09/10/18 15:41, 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 > >irqs. > > &

[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

<    1   2   3   4   5   6   7   8   >