Re: [PATCH v2 06/35] nds32: MMU fault handling and page table management

2017-12-07 Thread Greentime Hu
2017-12-08 0:40 GMT+08:00 Al Viro : > On Mon, Nov 27, 2017 at 08:27:53PM +0800, Greentime Hu wrote: >> +void do_page_fault(unsigned long entry, unsigned long addr, >> +unsigned int error_code, struct pt_regs *regs) > [snip] >> + /* >> + * If

Re: [PATCH v2 08/35] nds32: Process management

2017-12-07 Thread Greentime Hu
2017-12-08 0:45 GMT+08:00 Al Viro : > On Mon, Nov 27, 2017 at 08:27:55PM +0800, Greentime Hu wrote: > >> +#define start_thread(regs,pc,stack) \ >> +({ \ >> + set_fs(USER_DS);

[PATCH v3 00/33] Andes(nds32) Linux Kernel Port

2017-12-08 Thread Greentime Hu
irq-ativic32.c - Fix a bug of earlycon.c - Export ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt - Add atcpit100 driver Greentime Hu (33): asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU earlycon: add reg-offset to physical address

[PATCH v3 04/33] nds32: Kernel booting and initialization

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes the kernel startup code. It can get dtb pointer passed from bootloader. It will create a temp mapping by tlb instructions at beginning and goto start_kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/kernel/head.S | 202

[PATCH v3 02/33] earlycon: add reg-offset to physical address before mapping

2017-12-08 Thread Greentime Hu
From: Greentime Hu It will get the wrong virtual address because port->mapbase is not added the correct reg-offset yet. We have to update it before earlycon_map() is called Signed-off-by: Greentime Hu --- drivers/tty/serial/earlycon.c |3 ++- 1 file changed, 2 insertions(+), 1 delet

[PATCH v3 03/33] nds32: Assembly macros and definitions

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes assembly macros, bit field definitions used in .S files across arch/nds32/. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/assembler.h | 52 ++ arch/nds32/include/asm/bitfield.h | 976

[PATCH v3 01/33] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU

2017-12-08 Thread Greentime Hu
From: Greentime Hu It allows some architectures to use this generic macro instead of defining theirs. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- include/asm-generic/io.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/asm

[PATCH v3 22/33] nds32: Loadable modules

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds support for loadable modules. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/module.h | 24 arch/nds32/kernel/module.c | 299 +++ 2 files changed, 323 insertions(+) create

[PATCH v3 26/33] nds32: defconfig

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds nds32 defconfig. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/configs/defconfig | 108 ++ 1 file changed, 108 insertions(+) create mode 100644 arch/nds32/configs/defconfig diff --git a

[PATCH v3 28/33] MAINTAINERS: Add nds32

2017-12-08 Thread Greentime Hu
From: Greentime Hu Signed-off-by: Greentime Hu --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2f4e462..20284c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -857,6 +857,17 @@ X: drivers/iio/*/adjd* F: drivers/staging/iio

[PATCH v3 27/33] nds32: Build infrastructure

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds Makefile, Kconfig and vmlinux.lds.S files required for building an nds32 kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/Kconfig | 108 arch/nds32/Kconfig.cpu | 161

[PATCH v3 33/33] net: faraday add nds32 support.

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch is used to support nds32 architecture to use these faraday mac IP. Signed-off-by: Greentime Hu --- drivers/net/ethernet/faraday/Kconfig |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/Kconfig b/drivers

[PATCH v3 25/33] nds32: Miscellaneous header files

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch introduces some miscellaneous header files. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/delay.h | 51 +++ arch/nds32/include/asm/linkage.h| 24 +++ arch/nds32

[PATCH v3 29/33] dt-bindings: nds32 CPU Bindings

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds nds32 CPU binding documents. Signed-off-by: Vincent Chen Signed-off-by: Rick Chen Signed-off-by: Zong Li Signed-off-by: Greentime Hu --- Documentation/devicetree/bindings/nds32/cpus.txt | 37 ++ 1 file changed, 37 insertions

[PATCH v3 30/33] dt-bindings: nds32 SoC Bindings

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds nds32 SoC(AE3XX and AG101P) binding documents. Signed-off-by: Greentime Hu --- .../devicetree/bindings/nds32/andestech-boards | 40 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/nds32

[PATCH v3 31/33] dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds an irqchip driver document for the Andestech Internal Vector Interrupt Controller. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- .../interrupt-controller/andestech,ativic32.txt| 19 +++ 1 file changed, 19 insertions

[PATCH v3 32/33] irqchip: Andestech Internal Vector Interrupt Controller driver

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds the Andestech Internal Vector Interrupt Controller driver. You can find the spec here. Ch4.9 of AndeStar SPA V3 Manual. http://www.andestech.com/product.php?cls=9 Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- drivers/irqchip/Makefile |1

[PATCH v3 23/33] nds32: Generic timers support

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds support for timer. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/kernel/time.c | 24 1 file changed, 24 insertions(+) create mode 100644 arch/nds32/kernel/time.c diff --git a/arch/nds32/kernel/time.c b

[PATCH v3 24/33] nds32: Device tree support

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds support for device tree. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/boot/dts/Makefile |8 + arch/nds32/boot/dts/ae3xx.dts | 67 ++ arch/nds32/boot/dts/ag101p.dts | 70

[PATCH v3 20/33] nds32: Debugging support

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds ptrace support. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/uapi/asm/ptrace.h | 38 arch/nds32/kernel/ptrace.c | 325 ++ 2 files changed, 363 insertions(+) create mode

[PATCH v3 21/33] nds32: L2 cache support

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds L2 cache support. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/l2_cache.h | 155 + arch/nds32/kernel/atl2c.c | 77 ++ 2 files changed, 232 insertions

[PATCH v3 19/33] nds32: Library functions

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch add support for various library functions. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/string.h | 30 arch/nds32/include/asm/swab.h| 48 +++ arch/nds32/include/asm/uaccess.h | 296

[PATCH v3 18/33] nds32: Signal handling support

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds support for signal handling. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/uapi/asm/sigcontext.h | 73 +++ arch/nds32/kernel/signal.c | 350 ++ 2 files changed, 423 insertions

[PATCH v3 17/33] nds32: VDSO support

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds VDSO support. The VDSO code is currently used for sys_rt_sigreturn() and optimised gettimeofday() (using the SoC timer counter). Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/vdso.h | 35 arch/nds32

[PATCH v3 16/33] nds32: System calls handling

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds support for system calls. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/syscall.h | 203 ++ arch/nds32/include/asm/syscalls.h| 26 + arch/nds32/include/asm/unistd.h

[PATCH v3 15/33] nds32: ELF definitions

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds definitions for the ELF format, relocation types, vdso locations and EXEC_PAGESIZE. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/elf.h | 192 ++ arch/nds32/include/uapi/asm

[PATCH v3 14/33] nds32: DMA mapping API

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch adds support for the DMA mapping API. It uses dma_map_ops for flexibility. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/dma-mapping.h | 27 ++ arch/nds32/kernel/dma.c | 472

[PATCH v3 10/33] nds32: Process management

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes copy_thread(), start_thread() implementation and cpu_context structure definition. nds32 uses $r25 to get current task_struct. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/current.h | 25 arch/nds32

[PATCH v3 13/33] nds32: Device specific operations

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch introduces ioremap implementations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/io.h | 96 +++ arch/nds32/mm/ioremap.c | 75 + 2 files changed

[PATCH v3 12/33] nds32: Atomic operations

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes the atomic and futex operations. Many atomic operations use the load-lock word(llw) and store-condition word(scw) operations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/barrier.h | 28 + arch/nds32

[PATCH v3 11/33] nds32: IRQ handling

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes irq related functions and irqchip_init(). Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/irqflags.h | 49 + arch/nds32/kernel/irq.c | 22 + 2 files

[PATCH v3 08/33] nds32: MMU fault handling and page table management

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes page fault handler, mmap and fixup implementations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/lib/copy_page.S | 50 ++ arch/nds32/mm/extable.c| 29 +++ arch/nds32/mm/fault.c | 424

[PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch contains cache and TLB maintenance functions. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/cache.h | 25 ++ arch/nds32/include/asm/cache_info.h| 26 ++ arch/nds32/include/asm/cacheflush.h| 57 arch

[PATCH v3 06/33] nds32: MMU definitions

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes virtual memory layout, PHYS_OFFSET is defined as 0x0. It also includes the 4KB/8KB page size configurations and pte operations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/fixmap.h | 42 arch/nds32/include

[PATCH v3 07/33] nds32: MMU initialization

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes memory initializations and highmem supporting. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/mm/highmem.c | 92 +++ arch/nds32/mm/init.c | 290 ++ arch/nds32/mm/mm

[PATCH v3 05/33] nds32: Exception handling

2017-12-08 Thread Greentime Hu
From: Greentime Hu This patch includes the exception/interrupt entries, pt_reg structure and related accessors. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/ptrace.h | 79 + arch/nds32/kernel/ex-entry.S| 170 +++ arch/nds32/kernel/ex

Re: [PATCH v3 17/33] nds32: VDSO support

2017-12-08 Thread Greentime Hu
Hi, Mark: 2017-12-08 18:21 GMT+08:00 Mark Rutland : > On Fri, Dec 08, 2017 at 05:12:00PM +0800, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds VDSO support. The VDSO code is currently used for >> sys_rt_sigreturn() and optimised gettimeofday() (usin

Re: [PATCH v3 17/33] nds32: VDSO support

2017-12-08 Thread Greentime Hu
Hi, Marc: 2017-12-08 20:29 GMT+08:00 Marc Zyngier : > On 08/12/17 11:54, Greentime Hu wrote: >> Hi, Mark: >> >> 2017-12-08 18:21 GMT+08:00 Mark Rutland : >>> On Fri, Dec 08, 2017 at 05:12:00PM +0800, Greentime Hu wrote: >>>> From: Greentime Hu >&g

Re: [PATCH v3 04/33] nds32: Kernel booting and initialization

2017-12-08 Thread Greentime Hu
Hi, Philippe: 2017-12-08 21:19 GMT+08:00 Philippe Ombredanne : > Dear Greentime, > > On Fri, Dec 8, 2017 at 10:11 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch includes the kernel startup code. It can get dtb pointer >> passed from bootloader.

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-12 Thread Greentime Hu
2017-12-13 10:16 GMT+08:00 Guo Ren : > On Fri, Dec 08, 2017 at 05:11:52PM +0800, Greentime Hu wrote: >> From: Greentime Hu > [...] >> diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c > [...] >> +#ifndef CONFIG_CPU_CACHE_ALIASING >&

Re: [PATCH v5 1/3] clocksource/drivers/atcpit100: Add andestech atcpit100 timer

2017-12-12 Thread Greentime Hu
Hi, Daniel: 2017-12-12 18:05 GMT+08:00 Daniel Lezcano : > On 12/12/2017 06:46, Rick Chen wrote: >> ATCPIT100 is often used on the Andes architecture, >> This timer provide 4 PIT channels. Each PIT channel is a >> multi-function timer, can be configured as 32,16,8 bit timers >> or PWM as well. >> >

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-13 Thread Greentime Hu
2017-12-13 16:19 GMT+08:00 Guo Ren : > On Wed, Dec 13, 2017 at 01:45:02PM +0800, Greentime Hu wrote: > >> I think it should be fine if an interruption between mtsr_dsb and >> tlbop_rwr because this is a optimization by sw. > > Fine? When there is an unexpected vaddr in SR

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-13 Thread Greentime Hu
2017-12-13 16:53 GMT+08:00 Guo Ren : > On Wed, Dec 13, 2017 at 04:30:41PM +0800, Greentime Hu wrote: >> 2017-12-13 16:19 GMT+08:00 Guo Ren : >> > On Wed, Dec 13, 2017 at 01:45:02PM +0800, Greentime Hu wrote: >> > >> >> I think it should be fine

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-13 Thread Greentime Hu
2017-12-13 17:45 GMT+08:00 Guo Ren : > Hello, > > CPU team could improve the tlbop_*. Eg: Design a hardware > internal flag bit for SR_TLB_VPN, tlbop_* will invalid it and mtsr > SR_TLB_VPN will valid it. > > So: > On Wed, Dec 13, 2017 at 05:03:33PM +0800, Greentime

[PATCH v4 02/36] earlycon: add reg-offset to physical address before mapping

2017-12-17 Thread Greentime Hu
From: Greentime Hu It will get the wrong virtual address because port->mapbase is not added the correct reg-offset yet. We have to update it before earlycon_map() is called Signed-off-by: Greentime Hu --- drivers/tty/serial/earlycon.c |3 ++- 1 file changed, 2 insertions(+), 1 delet

[PATCH v4 12/36] nds32: Atomic operations

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes the atomic and futex operations. Many atomic operations use the load-lock word(llw) and store-condition word(scw) operations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/barrier.h | 15 ++ arch/nds32/include

[PATCH v4 29/36] dt-bindings: nds32 CPU Bindings

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds nds32 CPU binding documents. Signed-off-by: Vincent Chen Signed-off-by: Rick Chen Signed-off-by: Zong Li Signed-off-by: Greentime Hu Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/nds32/cpus.txt | 37 ++ 1 file

[PATCH v4 36/36] dt-bindings: timer: Add andestech atcpit100 timer binding doc

2017-12-17 Thread Greentime Hu
From: Rick Chen Add a document to describe Andestech atcpit100 timer and binding information. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Acked-by: Rob Herring --- .../bindings/timer/andestech,atcpit100-timer.txt | 33 1 file changed, 33 insertions

[PATCH v4 35/36] clocksource/drivers/atcpit100: VDSO support

2017-12-17 Thread Greentime Hu
-by: Greentime Hu --- drivers/clocksource/timer-atcpit100.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/clocksource/timer-atcpit100.c b/drivers/clocksource/timer-atcpit100.c index 0077fdb..9b2b628 100644 --- a/drivers/clocksource/timer-atcpit100.c +++ b/drivers

[PATCH v4 33/36] net: faraday add nds32 support.

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch is used to support nds32 architecture to use these faraday mac IP. Signed-off-by: Greentime Hu --- drivers/net/ethernet/faraday/Kconfig |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/Kconfig b/drivers

[PATCH v4 34/36] clocksource/drivers/atcpit100: Add andestech atcpit100 timer

2017-12-17 Thread Greentime Hu
until underflow and restart again. It also set channel 0 32-bit timer0 as clock event and count downwards until condition match. It will generate an interrupt for handling periodically. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Linus Walleij --- drivers/clocksource/Kconfig

[PATCH v4 31/36] dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds an irqchip driver document for the Andestech Internal Vector Interrupt Controller. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Rob Herring --- .../interrupt-controller/andestech,ativic32.txt| 19 +++ 1 file

[PATCH v4 32/36] irqchip: Andestech Internal Vector Interrupt Controller driver

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds the Andestech Internal Vector Interrupt Controller driver. You can find the spec here. Ch4.9 of AndeStar SPA V3 Manual. http://www.andestech.com/product.php?cls=9 Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Marc Zyngier --- drivers

[PATCH v4 30/36] dt-bindings: nds32 SoC Bindings

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds nds32 SoC(AE3XX and AG101P) binding documents. Signed-off-by: Greentime Hu Reviewed-by: Rob Herring --- .../devicetree/bindings/nds32/andestech-boards | 40 1 file changed, 40 insertions(+) create mode 100644 Documentation

[PATCH v4 27/36] nds32: Build infrastructure

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds Makefile, Kconfig and vmlinux.lds.S files required for building an nds32 kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/Kconfig | 108 arch/nds32/Kconfig.cpu | 161

[PATCH v4 28/36] MAINTAINERS: Add nds32

2017-12-17 Thread Greentime Hu
From: Greentime Hu Signed-off-by: Greentime Hu --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2f4e462..20284c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -857,6 +857,17 @@ X: drivers/iio/*/adjd* F: drivers/staging/iio

[PATCH v4 26/36] nds32: defconfig

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds nds32 defconfig. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/configs/defconfig | 108 ++ 1 file changed, 108 insertions(+) create mode 100644 arch/nds32/configs/defconfig diff --git a

[PATCH v4 25/36] nds32: Miscellaneous header files

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch introduces some miscellaneous header files. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/delay.h | 38 +++ arch/nds32/include/asm/linkage.h| 11 + arch/nds32/include

[PATCH v4 24/36] nds32: Device tree support

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds support for device tree. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/boot/dts/Makefile |8 + arch/nds32/boot/dts/ae3xx.dts | 65 + arch/nds32/kernel/devtree.c | 19

[PATCH v4 22/36] nds32: Loadable modules

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds support for loadable modules. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/module.h | 11 ++ arch/nds32/kernel/module.c | 286 +++ 2 files changed, 297 insertions(+) create

[PATCH v4 23/36] nds32: Generic timers support

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds support for timer. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Reviewed-by: Linus Walleij --- arch/nds32/kernel/time.c | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 arch/nds32/kernel/time.c diff --git a/arch/nds32

[PATCH v4 20/36] nds32: Debugging support

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds ptrace support. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/uapi/asm/ptrace.h | 25 +++ arch/nds32/kernel/ptrace.c | 311 ++ 2 files changed, 336 insertions(+) create mode

[PATCH v4 21/36] nds32: L2 cache support

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds L2 cache support. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/l2_cache.h | 142 + arch/nds32/kernel/atl2c.c | 64 + 2 files changed, 206 insertions

[PATCH v4 16/36] nds32: System calls handling

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds support for system calls. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/syscall.h | 188 ++ arch/nds32/include/asm/syscalls.h| 13 +++ arch/nds32/include/asm/unistd.h

[PATCH v4 18/36] nds32: Signal handling support

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds support for signal handling. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/uapi/asm/sigcontext.h | 60 ++ arch/nds32/kernel/signal.c | 337 ++ 2 files changed, 397 insertions

[PATCH v4 19/36] nds32: Library functions

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch add support for various library functions. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/string.h | 17 +++ arch/nds32/include/asm/swab.h| 35 + arch/nds32/include/asm/uaccess.h | 283

[PATCH v4 17/36] nds32: VDSO support

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds VDSO support. The VDSO code is currently used for sys_rt_sigreturn() and optimised gettimeofday() (using the SoC timer counter). Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/vdso.h | 24 +++ arch/nds32

[PATCH v4 15/36] nds32: ELF definitions

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds definitions for the ELF format, relocation types, vdso locations and EXEC_PAGESIZE. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/elf.h | 179 ++ arch/nds32/include/uapi/asm

[PATCH v4 13/36] nds32: Device specific operations

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch introduces ioremap implementations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/io.h | 83 +++ arch/nds32/mm/ioremap.c | 62 2 files changed

[PATCH v4 14/36] nds32: DMA mapping API

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch adds support for the DMA mapping API. It uses dma_map_ops for flexibility. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/dma-mapping.h | 14 ++ arch/nds32/kernel/dma.c | 459

[PATCH v4 11/36] nds32: IRQ handling

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes irq related functions and irqchip_init(). Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/irqflags.h | 36 arch/nds32/kernel/irq.c |9 + 2 files changed, 45

[PATCH v4 10/36] nds32: Process management

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes copy_thread(), start_thread() implementation and cpu_context structure definition. nds32 uses $r25 to get current task_struct. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/current.h | 12 ++ arch/nds32/include

[PATCH v4 09/36] nds32: Cache and TLB routines

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch contains cache and TLB maintenance functions. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/cache.h | 12 + arch/nds32/include/asm/cache_info.h| 13 + arch/nds32/include/asm/cacheflush.h| 44 +++ arch

[PATCH v4 07/36] nds32: MMU initialization

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes memory initializations and highmem supporting. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/mm/highmem.c | 79 + arch/nds32/mm/init.c | 277 ++ arch/nds32/mm/mm

[PATCH v4 08/36] nds32: MMU fault handling and page table management

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes page fault handler, mmap and fixup implementations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/lib/copy_page.S | 37 arch/nds32/mm/extable.c| 16 ++ arch/nds32/mm/fault.c | 410

[PATCH v4 04/36] nds32: Kernel booting and initialization

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes the kernel startup code. It can get dtb pointer passed from bootloader. It will create a temp mapping by tlb instructions at beginning and goto start_kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/kernel/head.S | 189

[PATCH v4 06/36] nds32: MMU definitions

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes virtual memory layout, PHYS_OFFSET is defined as 0x0. It also includes the 4KB/8KB page size configurations and pte operations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/fixmap.h | 29 +++ arch/nds32/include

[PATCH v4 05/36] nds32: Exception handling

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes the exception/interrupt entries, pt_reg structure and related accessors. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/ptrace.h | 66 + arch/nds32/kernel/ex-entry.S| 157 ++ arch/nds32/kernel/ex

[PATCH v4 03/36] nds32: Assembly macros and definitions

2017-12-17 Thread Greentime Hu
From: Greentime Hu This patch includes assembly macros, bit field definitions used in .S files across arch/nds32/. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/include/asm/assembler.h | 39 ++ arch/nds32/include/asm/bitfield.h | 963

[PATCH v4 00/36] Andes(nds32) Linux Kernel

2017-12-17 Thread Greentime Hu
_uc/ioremap_wc/ioremap_wt - Add atcpit100 driver Greentime Hu (33): asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU earlycon: add reg-offset to physical address before mapping nds32: Assembly macros and definitions nds32: Kernel b

[PATCH v4 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU

2017-12-17 Thread Greentime Hu
From: Greentime Hu It allows some architectures to use this generic macro instead of defining theirs. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann --- include/asm-generic/io.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

Re: [PATCH v3 07/33] nds32: MMU initialization

2017-12-18 Thread Greentime Hu
Hi, Guo Ren: 2017-12-18 17:08 GMT+08:00 Guo Ren : > Hi Greentime, > > On Fri, Dec 08, 2017 at 05:11:50PM +0800, Greentime Hu wrote: > [...] >> >> diff --git a/arch/nds32/mm/highmem.c b/arch/nds32/mm/highmem.c > [...] >> +void *kmap(struct page *page) &

Re: [PATCH v4 13/36] nds32: Device specific operations

2017-12-18 Thread Greentime Hu
2017-12-18 19:26 GMT+08:00 Arnd Bergmann : > On Mon, Dec 18, 2017 at 7:46 AM, Greentime Hu wrote: > >> +#define __ASM_NDS32_IO_H >> + >> +extern void iounmap(void __iomem *addr); > > The prototype here should probably include 'volatile' to avoid warnings

Re: [PATCH v4 25/36] nds32: Miscellaneous header files

2017-12-18 Thread Greentime Hu
Hi, Arnd: 2017-12-18 19:13 GMT+08:00 Arnd Bergmann : > On Mon, Dec 18, 2017 at 7:46 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch introduces some miscellaneous header files. > >> +static inline void __delay(unsigned long loops) >> +{ >>

Re: [PATCH v3 07/33] nds32: MMU initialization

2017-12-18 Thread Greentime Hu
Hi, Guo Ren: 2017-12-18 20:22 GMT+08:00 Guo Ren : > On Mon, Dec 18, 2017 at 07:21:30PM +0800, Greentime Hu wrote: >> Hi, Guo Ren: >> >> 2017-12-18 17:08 GMT+08:00 Guo Ren : >> > Hi Greentime, >> > >> > On Fri, Dec 08, 2017 at 05:11:50PM +0800, Green

Re: [PATCH v4 25/36] nds32: Miscellaneous header files

2017-12-19 Thread Greentime Hu
2017-12-19 17:54 GMT+08:00 Arnd Bergmann : > On Tue, Dec 19, 2017 at 6:34 AM, Greentime Hu wrote: >> Hi, Arnd: >> >> 2017-12-18 19:13 GMT+08:00 Arnd Bergmann : >>> On Mon, Dec 18, 2017 at 7:46 AM, Greentime Hu wrote: >>>> From: Greentime Hu >>

Re: [PATCH v4 04/36] nds32: Kernel booting and initialization

2017-12-19 Thread Greentime Hu
2017-12-20 6:01 GMT+08:00 Randy Dunlap : > On 12/17/2017 10:46 PM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch includes the kernel startup code. It can get dtb pointer >> passed from bootloader. It will create a temp mapping by tlb >> instructions a

Re: [PATCH v4 33/36] net: faraday add nds32 support.

2017-12-20 Thread Greentime Hu
71220] >> [if your patch is applied to the wrong git tree, please drop us a note to >> help improve the system] >> >> url: >> https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937 >> config: sparc64-allyesconfig (attached

[PATCH v7 07/37] nds32: Kernel booting and initialization

2018-02-13 Thread Greentime Hu
This patch includes the kernel startup code. It can get dtb pointer passed from bootloader. It will create a temp mapping by tlb instructions at beginning and goto start_kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/kernel/head.S | 188

[PATCH v7 11/37] nds32: MMU fault handling and page table management

2018-02-13 Thread Greentime Hu
This patch includes page fault handler, mmap and fixup implementations. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann --- arch/nds32/lib/copy_page.S | 37 arch/nds32/mm/extable.c| 16 ++ arch/nds32/mm/fault.c | 410

[PATCH v7 32/37] dt-bindings: nds32 CPU Bindings

2018-02-13 Thread Greentime Hu
This patch adds nds32 CPU binding documents. Signed-off-by: Vincent Chen Signed-off-by: Rick Chen Signed-off-by: Zong Li Signed-off-by: Greentime Hu Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/nds32/cpus.txt | 38 1 file changed, 38 insertions

[PATCH v7 3/3] dt-bindings: timer: Add andestech atcpit100 timer binding doc

2018-02-13 Thread Greentime Hu
From: Rick Chen Add a document to describe Andestech atcpit100 timer and binding information. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Acked-by: Rob Herring Acked-by: Arnd Bergmann --- .../bindings/timer/andestech,atcpit100-timer.txt | 33 ++ 1 file

[PATCH v7 1/3] clocksource/drivers/atcpit100: Add andestech atcpit100 timer

2018-02-13 Thread Greentime Hu
until underflow and restart again. It also set channel 0 32-bit timer0 as clock event and count downwards until condition match. It will generate an interrupt for handling periodically. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Linus Walleij Add andestech atcpit100 timer

[PATCH v7 2/3] clocksource/drivers/atcpit100: VDSO support

2018-02-13 Thread Greentime Hu
-by: Greentime Hu --- drivers/clocksource/timer-atcpit100.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/clocksource/timer-atcpit100.c b/drivers/clocksource/timer-atcpit100.c index 2190096cffa3..5e23d7b4a722 100644 --- a/drivers/clocksource/timer-atcpit100.c +++ b

[PATCH v7 36/37] irqchip: Andestech Internal Vector Interrupt Controller driver

2018-02-13 Thread Greentime Hu
This patch adds the Andestech Internal Vector Interrupt Controller driver. You can find the spec here. Ch4.9 of AndeStar SPA V3 Manual. http://www.andestech.com/product.php?cls=9 Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Marc Zyngier --- drivers/irqchip/Makefile

[PATCH v7 0/3] clocksource/drivers/atcpit100: Add andestech atcpit100 timer

2018-02-13 Thread Greentime Hu
Hi, all: ATCPIT100 is often used on the Andes architecture, This timer provide 4 PIT channels. Each PIT channel is a multi-function timer, can be configured as 32,16,8 bit timers or PWM as well. For system timer it will set channel 1 32-bit timer0 as clock source and count downwards until underfl

[PATCH v7 37/37] net: faraday add nds32 support.

2018-02-13 Thread Greentime Hu
This patch is used to support nds32 architecture to use these faraday mac IP. Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann --- drivers/net/ethernet/faraday/Kconfig | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/Kconfig b/drivers

[PATCH v7 35/37] dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller

2018-02-13 Thread Greentime Hu
This patch adds an irqchip driver document for the Andestech Internal Vector Interrupt Controller. Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Reviewed-by: Rob Herring Acked-by: Arnd Bergmann --- .../interrupt-controller/andestech,ativic32.txt | 19 +++ 1 file

[PATCH v7 34/37] dt-bindings: nds32 SoC Bindings

2018-02-13 Thread Greentime Hu
This patch adds nds32 SoC(AE3XX and AG101P) binding documents. Signed-off-by: Greentime Hu Reviewed-by: Rob Herring Acked-by: Arnd Bergmann --- .../devicetree/bindings/nds32/andestech-boards | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation

[PATCH v7 30/37] nds32: Build infrastructure

2018-02-13 Thread Greentime Hu
This patch adds Makefile, Kconfig and vmlinux.lds.S files required for building an nds32 kernel. Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu --- arch/nds32/Kconfig | 103 ++ arch/nds32/Kconfig.cpu | 174

  1   2   3   4   >