Re: [PATCH] nds32: add NULL entry to the end of_device_id array

2018-08-07 Thread Greentime Hu
s[] __initconst = { > - {.compatible = "andestech,atl2c",} > + {.compatible = "andestech,atl2c",}, > + {} > }; > > static int __init atl2c_of_init(void) Hi Yuehaibing, Thank you for your patch. Acked-by: Greentime Hu

[PATCH 3/3] nds32: fix build error because of wrong semicolon

2018-08-28 Thread Greentime Hu
n expansion of macro 'ELF_DATA' [EI_DATA] = ELF_DATA, ^~~~ /kisskb/src/fs/proc/kcore.c:312:15: note: to match this '{' .e_ident = { ^ /kisskb/src/scripts/Makefile.build:307: recipe for target 'fs/proc/kcore.o' failed Signed-off-b

[PATCH 1/3] nds32: Only print one page of stack when die to prevent printing too much information.

2018-08-28 Thread Greentime Hu
It may print too much information sometimes if the stack is wrong or too big. This patch can limit the debug information in a page of stack. Signed-off-by: Greentime Hu --- arch/nds32/kernel/traps.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/nds32/kernel

[PATCH 2/3] nds32: Fix a kernel panic issue because of wrong frame pointer access.

2018-08-28 Thread Greentime Hu
,ae3xx (DT) Call Trace: [] dump_stack+0x2c/0x38 [] die+0x128/0x18c [] do_page_fault+0x3b8/0x4e0 [] ret_from_exception+0x0/0x10 [] common_exception_handler+0xda/0xf4 Signed-off-by: Greentime Hu --- arch/nds32/kernel/ex-entry.S | 2 +- arch/nds32/kernel/ex-exit.S | 4 ++-- arch/nds32/kernel/ftrace.c

Re: linux-next: build warnings from the build of Linus' tree

2018-08-28 Thread Greentime Hu
Arnd Bergmann 於 2018年8月24日 週五 下午8:48寫道: > > On Fri, Aug 24, 2018 at 10:23 AM Masami Hiramatsu wrote: > > > > On Fri, 24 Aug 2018 13:32:06 +1000 > > Stephen Rothwell wrote: > > > > > Hi all, > > > > > > After merging the origin tree, today's linux-next build (powerpc > > > allyesconfig) produced

Re: [PATCH 0/2] Remove the deprecated ABI implementation

2018-08-21 Thread Greentime Hu
i (2): > nds32: Remove the deprecated ABI implementation > nds32: Add macro definition for offset of lp register on stack > > arch/nds32/include/asm/nds32.h | 1 + > arch/nds32/kernel/stacktrace.c | 2 +- > arch/nds32/kernel/traps.c | 7 +-- > 3 files changed, 3 inser

Re: [PATCH 0/6] Support ftrace on NDS32 architecture

2018-08-21 Thread Greentime Hu
97 > > arch/nds32/kernel/stacktrace.c | 4 + > arch/nds32/kernel/traps.c | 30 +--- > scripts/recordmcount.pl | 3 + > 8 files changed, 370 insertions(+), 24 deletions(-) > create mode 100644 arch/nds32/include/asm/ftrace.h > create mode 100644 arch/nds32/kernel/ftrace.c Acked-by: Greentime Hu

Re: [PATCH 0/3] Fix get_user and put_user pointer issue

2018-08-21 Thread Greentime Hu
get_user/put_user macro expand pointer problem > nds32: Clean up the coding style > nds32: Extract the checking and getting pointer to a macro > > arch/nds32/include/asm/uaccess.h | 229 > --- > 1 file changed, 119 insertions(+), 110 deletions(-) > Acked-by: Greentime Hu

Re: [GIT PULL] nds32 fixes for 4.18

2018-07-19 Thread Greentime Hu
Greentime Hu 於 2018年7月17日 週二 下午2:34寫道: > > Hi Linus, > Greentime Hu 於 2018年7月9日 週一 下午4:19寫道: > > > > The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40: > > > > Linux 4.18-rc1 (2018-06-17 08:04:49 +0900) > > >

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-23 Thread Greentime Hu
Hi, Arnd: 2018-01-23 16:23 GMT+08:00 Greentime Hu : > Hi, Arnd: > > 2018-01-18 18:26 GMT+08:00 Arnd Bergmann : >> On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >>> From: Greentime Hu >>> >>> This patch adds support for the DMA mapping AP

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-24 Thread Greentime Hu
Hi, Arnd: 2018-01-24 19:36 GMT+08:00 Arnd Bergmann : > On Tue, Jan 23, 2018 at 12:52 PM, Greentime Hu wrote: >> Hi, Arnd: >> >> 2018-01-23 16:23 GMT+08:00 Greentime Hu : >>> Hi, Arnd: >>> >>> 2018-01-18 18:26 GMT+08:00 Arnd Bergmann : >>&

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-25 Thread Greentime Hu
Hi, Arnd: 2018-01-25 18:42 GMT+08:00 Arnd Bergmann : > On Thu, Jan 25, 2018 at 4:45 AM, Greentime Hu wrote: >> 2018-01-24 19:36 GMT+08:00 Arnd Bergmann : >>> On Tue, Jan 23, 2018 at 12:52 PM, Greentime Hu wrote: >>>> 2018-01-23 16:23 GMT+08:00 Greentime Hu : &g

Re: [PATCH v6 07/36] nds32: Exception handling

2018-01-30 Thread Greentime Hu
Hi, Arnd: 2018-01-30 21:33 GMT+08:00 Arnd Bergmann : > On Tue, Jan 30, 2018 at 11:01 AM, Vincent Chen wrote: >> 2018-01-24 19:10 GMT+08:00 Arnd Bergmann : >>> On Wed, Jan 24, 2018 at 12:09 PM, Arnd Bergmann wrote: On Wed, Jan 24, 2018 at 11:53 AM, Vincent Chen wrote: > 2018-01-18 18:14

Re: [PATCH v6 03/36] sparc: io: To use the define of ioremap_[nocache|wc|wb] in asm-generic/io.h

2018-01-19 Thread Greentime Hu
2018-01-18 17:56 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> It will be built failed if commit id: d25ea659 is selected. This patch >> can fix this build error. >> >> Signed-off-by: Greent

Re: [PATCH v6 24/36] nds32: Loadable modules

2018-01-19 Thread Greentime Hu
2018-01-18 18:41 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds support for loadable modules. > > One detail: > > You still seem to have both the ELF_REL and ELF_RELA based functions &g

Re: [PATCH v6 31/36] dt-bindings: nds32 CPU Bindings

2018-01-19 Thread Greentime Hu
2018-01-18 19:02 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds nds32 CPU binding documents. >> >> Signed-off-by: Vincent Chen >> Signed-off-by: Rick Chen >> Signed-of

Re: [PATCH v6 31/36] dt-bindings: nds32 CPU Bindings

2018-01-19 Thread Greentime Hu
2018-01-19 22:52 GMT+08:00 Arnd Bergmann : > On Fri, Jan 19, 2018 at 3:32 PM, Greentime Hu wrote: >> 2018-01-18 19:02 GMT+08:00 Arnd Bergmann : >>> On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >>>> From: Greentime Hu >>>> >&g

Re: [PATCH v6 31/36] dt-bindings: nds32 CPU Bindings

2018-01-19 Thread Greentime Hu
2018-01-19 23:29 GMT+08:00 Geert Uytterhoeven : > Hi Greentime, > > On Fri, Jan 19, 2018 at 4:18 PM, Greentime Hu wrote: >> 2018-01-19 22:52 GMT+08:00 Arnd Bergmann : >>> On Fri, Jan 19, 2018 at 3:32 PM, Greentime Hu wrote: >>>> 2018-01-18 19:02 GMT+08:00

Re: [PATCH v6 06/36] nds32: Kernel booting and initialization

2018-01-19 Thread Greentime Hu
Hi, Arnd: 2018-01-18 18:11 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: > > I had not looked at this patch in enough detail earlier, sorry about > that. It should be > easy enough to fix though. > >> +#ifdef CONFIG_VGA_CONSOL

Re: [PATCH v6 06/36] nds32: Kernel booting and initialization

2018-01-22 Thread Greentime Hu
2018-01-20 0:41 GMT+08:00 Arnd Bergmann : > On Fri, Jan 19, 2018 at 5:34 PM, Greentime Hu wrote: >> Hi, Arnd: >> >> 2018-01-18 18:11 GMT+08:00 Arnd Bergmann : >>> On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >>> >>> I had not looked at

Re: [PATCH v6 31/36] dt-bindings: nds32 CPU Bindings

2018-01-22 Thread Greentime Hu
Hi, Geert: 2018-01-19 23:37 GMT+08:00 Geert Uytterhoeven : > Hi Greentime, > > On Fri, Jan 19, 2018 at 4:35 PM, Greentime Hu wrote: >> 2018-01-19 23:29 GMT+08:00 Geert Uytterhoeven : >>> On Fri, Jan 19, 2018 at 4:18 PM, Greentime Hu wrote: >>>> 2018

Re: [PATCH v6 31/36] dt-bindings: nds32 CPU Bindings

2018-01-22 Thread Greentime Hu
Hi, Arnd: 2018-01-22 19:15 GMT+08:00 Arnd Bergmann : > On Mon, Jan 22, 2018 at 10:53 AM, Greentime Hu wrote: >> 2018-01-19 23:37 GMT+08:00 Geert Uytterhoeven : >>> On Fri, Jan 19, 2018 at 4:35 PM, Greentime Hu wrote: >>>> 2018-01-19 23:29 GMT+08:00 Geert Uytte

Re: [PATCH v6 29/36] nds32: Build infrastructure

2018-01-22 Thread Greentime Hu
Hi, Arnd: 2018-01-18 19:00 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds Makefile, Kconfig and vmlinux.lds.S files required for >> building >> an nds32 kernel. >> >>

Re: [PATCH v6 29/36] nds32: Build infrastructure

2018-01-22 Thread Greentime Hu
Hi, Arnd: 2018-01-22 23:38 GMT+08:00 Arnd Bergmann : > On Mon, Jan 22, 2018 at 4:20 PM, Greentime Hu wrote: > BE >>> >>> I think it's better to drop GENERIC_IRQ_PROBE here, no modern driver >>> should rely on that. >> >> I will drop

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-23 Thread Greentime Hu
Hi, Arnd: 2018-01-18 18:26 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds support for the DMA mapping API. It uses dma_map_ops for >> flexibility. >> >> Signed-off-by: Vince

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

2018-01-05 Thread Greentime Hu
Hi, Daniel: 2018-01-05 3:48 GMT+08:00 Daniel Lezcano : > On 04/01/2018 15:06, Greentime Hu wrote: >> Hi, Daniel: >> >> 2018-01-04 21:50 GMT+08:00 Daniel Lezcano : >>> >>> Hi, >>> >>> sorry I missed your answer. Comments below. >>

[PATCH v6 11/36] nds32: Cache and TLB routines

2018-01-14 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 v6 06/36] nds32: Kernel booting and initialization

2018-01-14 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 | 188

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

2018-01-14 Thread Greentime Hu
o_user()/clear_user()/get_user()/memmove()/memcpy() - Refine ioremap.c - Refine irq-ativic32.c - Fix a bug of earlycon.c - Export ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt - Add atcpit100 driver Greentime Hu (36): asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ior

[PATCH v6 02/36] openrisc: add ioremap_nocache declaration before include asm-generic/io.h and sync ioremap prototype with it.

2018-01-14 Thread Greentime Hu
From: Greentime Hu It will be built failed if commit id: d25ea659 is selected. This patch can fix this build error. Signed-off-by: Greentime Hu --- arch/openrisc/include/asm/io.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/openrisc/include/asm/io.h b/arch

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

2018-01-14 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 v6 13/36] nds32: IRQ handling

2018-01-14 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 v6 05/36] nds32: Assembly macros and definitions

2018-01-14 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 v6 21/36] nds32: Library functions

2018-01-14 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 v6 15/36] nds32: Device specific operations

2018-01-14 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 v6 19/36] nds32: VDSO support

2018-01-14 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 v6 24/36] nds32: Loadable modules

2018-01-14 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 v6 17/36] nds32: ELF definitions

2018-01-14 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 | 171 ++ arch/nds32/include/uapi/asm

[PATCH v6 33/36] dt-bindings: nds32 SoC Bindings

2018-01-14 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 v6 29/36] nds32: Build infrastructure

2018-01-14 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 | 107 arch/nds32/Kconfig.cpu | 161

[PATCH v6 27/36] nds32: Miscellaneous header files

2018-01-14 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 | 39 +++ arch/nds32/include/asm/linkage.h| 11 + arch/nds32/include

[PATCH v6 31/36] dt-bindings: nds32 CPU Bindings

2018-01-14 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 v6 36/36] net: faraday add nds32 support.

2018-01-14 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 |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/Kconfig b/drivers

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

2018-01-14 Thread Greentime Hu
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 underflow and res

[PATCH v6 35/36] irqchip: Andestech Internal Vector Interrupt Controller driver

2018-01-14 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 v6 3/3] dt-bindings: timer: Add andestech atcpit100 timer binding doc

2018-01-14 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 v6 2/3] clocksource/drivers/atcpit100: VDSO support

2018-01-14 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 e34b2fe..4cf69e2 100644 --- a/drivers/clocksource/timer-atcpit100.c +++ b/drivers

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

2018-01-14 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 v6 34/36] dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller

2018-01-14 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 v6 30/36] MAINTAINERS: Add nds32

2018-01-14 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 v6 32/36] dt-bindings: nds32 L2 cache controller Bindings

2018-01-14 Thread Greentime Hu
From: Greentime Hu This patch adds nds32 L2 cache controller binding documents. Signed-off-by: Greentime Hu Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/nds32/atl2c.txt | 29 + 1 file changed, 29 insertions(+) create mode 100644 Documentation

[PATCH v6 28/36] nds32: defconfig

2018-01-14 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 | 107 ++ 1 file changed, 107 insertions(+) create mode 100644 arch/nds32/configs/defconfig diff --git a

[PATCH v6 26/36] nds32: Device tree support

2018-01-14 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 | 85 + arch/nds32/kernel/devtree.c | 19 + 3

[PATCH v6 23/36] nds32: L2 cache support

2018-01-14 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 | 137 + arch/nds32/kernel/atl2c.c | 64 + 2 files changed, 201 insertions

[PATCH v6 25/36] nds32: Generic timers support

2018-01-14 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 v6 20/36] nds32: Signal handling support

2018-01-14 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 v6 22/36] nds32: Debugging support

2018-01-14 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 v6 18/36] nds32: System calls handling

2018-01-14 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 v6 16/36] nds32: DMA mapping API

2018-01-14 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 v6 14/36] nds32: Atomic operations

2018-01-14 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 v6 12/36] nds32: Process management

2018-01-14 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 v6 09/36] nds32: MMU initialization

2018-01-14 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 v6 10/36] nds32: MMU fault handling and page table management

2018-01-14 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 v6 08/36] nds32: MMU definitions

2018-01-14 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 v6 07/36] nds32: Exception handling

2018-01-14 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 v6 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU

2018-01-14 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

[PATCH v6 03/36] sparc: io: To use the define of ioremap_[nocache|wc|wb] in asm-generic/io.h

2018-01-14 Thread Greentime Hu
From: Greentime Hu It will be built failed if commit id: d25ea659 is selected. This patch can fix this build error. Signed-off-by: Greentime Hu --- arch/sparc/include/asm/io_32.h |5 - arch/sparc/kernel/ioport.c |4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff

Re: [PATCH v6 02/36] openrisc: add ioremap_nocache declaration before include asm-generic/io.h and sync ioremap prototype with it.

2018-01-15 Thread Greentime Hu
2018-01-15 21:07 GMT+08:00 Stafford Horne : > On Mon, Jan 15, 2018 at 01:53:10PM +0800, Greentime Hu wrote: >> From: Greentime Hu >> >> It will be built failed if commit id: d25ea659 is selected. This patch can >> fix this >> build error. > > Hello, &g

Re: [PATCH] dump_stack: convert generic dump_stack into a weak symbol

2018-03-05 Thread Greentime Hu
O __ksymtab 0008 ___ksymtab_dump_stack > 002653d4 l O __ksymtab_strings 000c ___kstrtab_dump_stack > 51a8 g F .text 0042 _dump_stack > 002b69dc g F .init.text 002a _dump_stack_set_arch_desc > 001c2a90 g F .text 00a4 _dump_sta

Re: [PATCH] dump_stack: convert generic dump_stack into a weak symbol

2018-03-05 Thread Greentime Hu
2018-03-06 12:31 GMT+08:00 Sergey Senozhatsky : > On (03/06/18 10:50), Greentime Hu wrote: > [..] >> > Greentime Hu, you tested this on nds32. Could I use your Tested-by, >> > please? >> > >> >> Yes, please use it. :) > > Thanks. > > To be

Re: [PATCH] dump_stack: convert generic dump_stack into a weak symbol

2018-03-07 Thread Greentime Hu
2018-03-07 17:09 GMT+08:00 Petr Mladek : > Ah, there was a mid-air collision. Arnd already answered most of my > questions and even more. > > On Wed 2018-03-07 09:46:27, Arnd Bergmann wrote: >> On Wed, Mar 7, 2018 at 3:21 AM, Sergey Senozhatsky >> wrote: >> > On (03/06/18 14:27), Arnd Bergmann wro

[PATCH] nds32: To use the generic dump_stack()

2018-03-07 Thread Greentime Hu
Use the generic dump_stack() instead of nds32 one because they are doing the same thing. Signed-off-by: Greentime Hu Acked-by: Arnd Bergmann --- arch/nds32/kernel/traps.c | 12 1 file changed, 12 deletions(-) diff --git a/arch/nds32/kernel/traps.c b/arch/nds32/kernel/traps.c

[PATCH] nds32: fix building failed if using elf toolchain.

2018-03-07 Thread Greentime Hu
ff-by: Greentime Hu --- arch/nds32/kernel/vdso/vdso.lds.S | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/nds32/kernel/vdso/vdso.lds.S b/arch/nds32/kernel/vdso/vdso.lds.S index 36630352ee02..1f2b16004594 100644 --- a/arch/nds32/kernel/vdso/vdso.lds.S +++ b/arch/nds32/kernel/vdso/vdso.lds.S @@

Re: [PATCH v4 0/5] nds32 FPU port

2018-11-22 Thread Greentime Hu
h/nds32/math-emu/fnegd.c > create mode 100644 arch/nds32/math-emu/fnegs.c > create mode 100644 arch/nds32/math-emu/fpuemu.c > create mode 100644 arch/nds32/math-emu/fs2d.c > create mode 100644 arch/nds32/math-emu/fsqrtd.c > create mode 100644 arch/nds32/math-emu/fsqrts.c > create mode 100644 arch/nds32/math-emu/fsubd.c > create mode 100644 arch/nds32/math-emu/fsubs.c Hi Vincent, Thank you. Acked-by: Greentime Hu

[GIT PULL] nds32 new features and bug fix for 4.20

2018-11-09 Thread Greentime Hu
Hi Linus, The following changes since commit 651022382c7f8da46cb4872a545ee1da6d097d2a: Linux 4.20-rc1 (2018-11-04 15:37:52 -0800) are available in the Git repository at: ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/greentime/linux.git tags/nds32-for-linus-4.20 for you to fetch c

Re: [GIT PULL] nds32 new features and bug fix for 4.20

2018-11-09 Thread Greentime Hu
Linus Torvalds 於 2018年11月9日 週五 下午10:03寫道: > > On Fri, Nov 9, 2018 at 4:01 AM Greentime Hu wrote: > > > > nds32 patches for 4.20 > > Much much too late for 4.20. > > Send these the next merge window please. Sorry for late. I will send these in the next merge window.

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-07-02 Thread Greentime Hu
Guo Ren 於 2018年6月29日 週五 下午4:46寫道: > > On Thu, Jun 28, 2018 at 06:49:27PM +0800, Greentime Hu wrote: > > +void flush_icache_page(struct vm_area_struct *vma, struct page *page) > > +{ > > + unsigned long flags; > > + local_irq_save(flags); > > + c

[GIT PULL] nds32 fixes for 4.18

2018-07-09 Thread Greentime Hu
Greentime Hu Greentime Hu (4): 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

[PATCH 2/2] nds32: Fix the dts pointer is not passed correctly issue.

2018-06-28 Thread Greentime Hu
We found that the original implementation will only use the built-in dtb pointer instead of the pointer pass from bootloader. This bug is fixed by this patch. Signed-off-by: Greentime Hu --- arch/nds32/kernel/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch

[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 says:

2018-06-28 Thread Greentime Hu
oes not snoop stores then this routine(flush_icache_range) will need to flush it." Signed-off-by: Guo Ren Signed-off-by: Greentime Hu --- arch/nds32/include/asm/cacheflush.h | 9 +-- arch/nds32/mm/cacheflush.c | 49 + 2 files changed, 35 in

[GIT PULL] nds32 fixes for 4.17

2018-05-27 Thread Greentime Hu
Version: 4.17.0-rc5-00018-g27288975a735 Machine Architecture: nds32 Signed-off-by: Greentime Hu Greentime Hu (12): nds32: lib: To use generic lib instead of libgcc to prevent the symbol undefined issue. nds32: Fix

[PATCH v2 3/3] nds32: To simplify the implementation of update_mmu_cache()

2018-07-03 Thread Greentime Hu
The checking code is done in kmap_atomic() so that we don't need to check it in update_mmu_cache() again. There is no need to implement it for cache aliasing or cache non-aliasing versions. We can just implement one version for both. Signed-off-by: Greentime Hu --- arch/nds32/mm/cachefl

[PATCH v2 2/3] nds32: Fix the dts pointer is not passed correctly issue.

2018-07-03 Thread Greentime Hu
We found that the original implementation will only use the built-in dtb pointer instead of the pointer pass from bootloader. This bug is fixed by this patch. Signed-off-by: Greentime Hu --- arch/nds32/kernel/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH v2 1/3] 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 says

2018-07-03 Thread Greentime Hu
oes not snoop stores then this routine(flush_icache_range) will need to flush it." Signed-off-by: Guo Ren Signed-off-by: Greentime Hu --- arch/nds32/include/asm/cacheflush.h | 9 +-- arch/nds32/mm/cacheflush.c | 53 ++--- 2 files changed, 39 in

[PATCH] nds32: fix build error "relocation truncated to fit: R_NDS32_25_PCREL_RELA" when make allyesconfig

2018-07-05 Thread Greentime Hu
kernel/futex.o:(.fixup+0xbc): relocation truncated to fit: R_NDS32_25_PCREL_RELA against `.text' nds32le-linux-ld: kernel/futex.o:(.fixup+0xc4): relocation truncated to fit: R_NDS32_25_PCREL_RELA against `.text' Makefile:1010: recipe for target 'vmlinux' failed make: *** [vmlinux] E

Re: [PATCH v2] nds32: Fix build error caused by configuration flag rename

2018-06-14 Thread Greentime Hu
o `__lshrdi3' > > Rename all 6 selects in nds32 and adjust the ordering accordingly to be > alphabetical. > > Fixes: 763f96944c95 ("Merge tag 'mips_4.18' of > git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux") > Signed-off-by: Guenter Roeck >

Re: [PATCH v2] nds32: Fix build error caused by configuration flag rename

2018-06-15 Thread Greentime Hu
James Hogan 於 2018年6月15日 週五 下午8:34寫道: > > On Fri, Jun 15, 2018 at 02:12:58PM +0800, Greentime Hu wrote: > > Thank you James and Guenter. > > Should I pick it in my tree? It will be ok to put in your tree. :) > > > > Acked-by: Greentime Hu > > I think your

Re: [PATCH 0/3]nds32: Correct the cache operation for catch aliasing case

2018-05-16 Thread Greentime Hu
page at vmaddr instead of kaddr in > flush_anon_page > nds32: Disable local irq before calling cpu_dcache_wb_page in > copy_user_highpage > > arch/nds32/mm/cacheflush.c | 34 -- > 1 files changed, 20 insertions(+), 14 deletions(-) > Thank you, Vincent. Reviewed-by: Greentime Hu

[GIT PULL] nds32 new features and bug fix for 4.21

2018-12-28 Thread Greentime Hu
Hi Linus, The following changes since commit 651022382c7f8da46cb4872a545ee1da6d097d2a: Linux 4.20-rc1 (2018-11-04 15:37:52 -0800) are available in the Git repository at: ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/greentime/linux.git tags/nds32-for-linus-4.21 for you to fetch c

Re: [PATCH -next] nds32: Remove duplicated include from pm.c

2018-10-30 Thread Greentime Hu
Pavel Machek 於 2018年10月30日 週二 下午3:15寫道: > > On Tue 2018-10-30 02:22:42, YueHaibing wrote: > > Remove duplicated include. > > > > Signed-off-by: YueHaibing > > Acked-by: Pavel Machek > Hi Pavel and YueHaibin, Thank you. Acked-by: Greentime Hu

Re: [PATCH 0/2] Remove the no longer used mechanism

2018-10-17 Thread Greentime Hu
redundant assignment > nds32: Fill all TLB entries with kernel image mapping > > arch/nds32/kernel/head.S | 11 +-- > 1 file changed, 1 insertion(+), 10 deletions(-) > Zong, Thank you. Acked-by: Greentime Hu

Re: [PATCH v3 0/5] nds32 FPU port

2018-11-06 Thread Greentime Hu
4 arch/nds32/math-emu/fnegs.c > create mode 100644 arch/nds32/math-emu/fpuemu.c > create mode 100644 arch/nds32/math-emu/fs2d.c > create mode 100644 arch/nds32/math-emu/fsqrtd.c > create mode 100644 arch/nds32/math-emu/fsqrts.c > create mode 100644 arch/nds32/math-emu/fsubd.c > create mode 100644 arch/nds32/math-emu/fsubs.c Thank you. Acked-by: Greentime Hu

Re: [PATCH 1/2] nds32: Fix the missing "fpu_dp" message.

2018-11-06 Thread Greentime Hu
Hi Nylon, Nylon Chen 於 2018年11月7日 週三 下午1:32寫道: > > The "fpu_dp" should be added to hwcap_str table to make sure the cpu features > displayed correctly. > > Signed-off-by: Nylon Chen > --- > arch/nds32/kernel/setup.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/nds32/kernel/setu

Re: [PATCH v4 0/4] nds32: Perf support

2018-10-25 Thread Greentime Hu
> create mode 100644 arch/nds32/include/asm/stacktrace.h > create mode 100644 arch/nds32/kernel/perf_event_cpu.c > create mode 100644 tools/perf/arch/nds32/Build > create mode 100644 tools/perf/arch/nds32/util/Build > create mode 100644 tools/perf/arch/nds32/util/header.c > create mode 100644 tools/perf/pmu-events/arch/nds32/mapfile.csv > create mode 100644 tools/perf/pmu-events/arch/nds32/n13/atcpmu.json > Hi Nick, Thank you. Acked-by: Greentime Hu

Re: [PATCH v2 1/1] nds32: Power management for nds32

2018-10-25 Thread Greentime Hu
d long int_mask = __nds32__mfsr(NDS32_SR_INT_MASK); > + static unsigned long irq_orig_bit; > + u32 bit = 1 << data->hwirq; > + > + if (on) { > + if (int_mask & bit) > + __assign_bit(data->hwirq, &irq_orig_bit, true); > + else > + __assign_bit(data->hwirq, &irq_orig_bit, false); > + > + __assign_bit(data->hwirq, &int_mask, true); > + __assign_bit(data->hwirq, &wake_mask, true); > + > + } else { > + if (!(irq_orig_bit & bit)) > + __assign_bit(data->hwirq, &int_mask, false); > + > + __assign_bit(data->hwirq, &wake_mask, false); > + __assign_bit(data->hwirq, &irq_orig_bit, false); > + } > + > + __nds32__mtsr_dsb(int_mask, NDS32_SR_INT_MASK); > + > + return 0; > +} > + > static struct irq_chip ativic32_chip = { > .name = "ativic32", > .irq_ack = ativic32_ack_irq, > .irq_mask = ativic32_mask_irq, > .irq_unmask = ativic32_unmask_irq, > + .irq_set_wake = nointc_set_wake, > }; > > static unsigned int __initdata nivic_map[6] = { 6, 2, 10, 16, 24, 32 }; Hi Nick, Thank you. Acked-by: Greentime Hu

Re: [PATCH 1/1] nds32: Fix gcc 8.0 compiler option incompatible.

2018-10-19 Thread Greentime Hu
ointer > + > +ifdef CONFIG_FUNCTION_TRACER > +CFLAGS_REMOVE_proc.o = $(CC_FLAGS_FTRACE) > +endif > +CFLAGS_proc.o += -fomit-frame-pointer Hi Nick, Thanks. Acked-by: Greentime Hu

Re: [PATCH 0/3] nds32: Unaligned access handler fix

2018-10-19 Thread Greentime Hu
aps.c | 4 +++- > arch/nds32/mm/alignment.c | 43 +++ > 3 files changed, 30 insertions(+), 20 deletions(-) > Hi Nick, Thanks Acked-by: Greentime Hu

Re: [GIT PULL] nds32 fixes for 4.18

2018-07-16 Thread Greentime Hu
Hi Linus, Greentime Hu 於 2018年7月9日 週一 下午4:19寫道: > > The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40: > > Linux 4.18-rc1 (2018-06-17 08:04:49 +0900) > > are available in the Git repository at: > > ssh://g...@gitolite.kernel.org/pub/scm/li

Re: [PATCH 1/3] nds32: Cleanup deprecated function strlen_user

2021-04-20 Thread Greentime Hu
st_check long strnlen_user(const char __user * str, long n); > extern unsigned long __arch_copy_from_user(void *to, const void __user * > from, > unsigned long n); Thank you, Guo. Acked-by: Greentime Hu

Re: [PATCH v5 0/6] Add SiFive FU740 PCIe host controller driver support

2021-04-08 Thread Greentime Hu
Lorenzo Pieralisi 於 2021年4月9日 週五 上午12:25寫道: > > On Tue, Apr 06, 2021 at 05:26:28PM +0800, Greentime Hu wrote: > > This patchset includes SiFive FU740 PCIe host controller driver. We also > > add pcie_aux clock and pcie_power_on_reset controller to prci driver for > &g

  1   2   3   4   5   6   7   >