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

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

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

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

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

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

[tip: timers/urgent] clocksource/drivers/timer-gx6605s: Fixup counter reload

2020-09-27 Thread tip-bot2 for Guo Ren
The following commit has been merged into the timers/urgent branch of tip: Commit-ID: bc6717d55d07110d8f3c6d31ec2af50c11b07091 Gitweb: https://git.kernel.org/tip/bc6717d55d07110d8f3c6d31ec2af50c11b07091 Author:Guo Ren AuthorDate:Tue, 18 Aug 2020 07:31:17 Committer

Re: [PATCH] csky: Fix a size determination in gpr_get()

2020-09-25 Thread Guo Ren
On Wed, Sep 23, 2020 at 12:52 PM Al Viro wrote: > > On Wed, Sep 23, 2020 at 10:37:31AM +0800, Guo Ren wrote: > > > > What's going on there? The mapping is really weird - assuming > > > you had v0..v31 in the first 32 elements of regs->vr[], you > > > end u

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

2020-09-24 Thread Guo Ren
. > > -- > Andreas Schwab, sch...@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different." -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH] csky: Fix a size determination in gpr_get()

2020-09-22 Thread Guo Ren
On Wed, Sep 23, 2020 at 8:23 AM Al Viro wrote: > > On Wed, Sep 23, 2020 at 08:03:20AM +0800, Guo Ren wrote: > > Thx Duan, > > > > Acked-by: Guo Ren > > > > Hi AI, > > > > I found the broken commit still has a question: > > > > > c

Re: [patch RFC 06/15] csky/mm/highmem: Switch to generic kmap atomic

2020-09-22 Thread Guo Ren
Acked-by: Guo Ren On Sat, Sep 19, 2020 at 5:50 PM Thomas Gleixner wrote: > > Signed-off-by: Thomas Gleixner > Cc: Guo Ren > Cc: linux-c...@vger.kernel.org > --- > Note: Completely untested > --- > arch/csky/Kconfig |1 > arch/csky/include/asm/

Re: [PATCH] csky: Fix a size determination in gpr_get()

2020-09-22 Thread Guo Ren
Thx Duan, Acked-by: Guo Ren Hi AI, I found the broken commit still has a question: > commit dcad7854fcce6a2d49b6a3ead5bbefeff047e559 > Author: Al Viro > Date: Tue Jun 16 15:28:29 2020 -0400 >csky: switch to ->regset_get() >NB: WTF "- what the fuck :(&q

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

2020-09-11 Thread Guo Ren
2020-06-27 13:57, guo...@kernel.org wrote: > > From: Guo Ren > > > > When enable LOCKDEP, static_obj() will cause error. Because some > > __initdata static variables is before _stext: > > > > static int static_obj(const void *obj) > > { > > unsign

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

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

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

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

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

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

Re: [PATCH] ftrace: Fixup lockdep assert held of text_mutex

2020-08-06 Thread Guo Ren
On Fri, Aug 7, 2020 at 12:01 PM Steven Rostedt wrote: > > On Fri, 7 Aug 2020 10:59:16 +0800 > Guo Ren wrote: > > > > > > This looks like a bug in the lockdep_assert_held() in whatever arch > > > (riscv) is running. > > Seems you think it's a bug o

Re: [PATCH] ftrace: Fixup lockdep assert held of text_mutex

2020-08-06 Thread Guo Ren
On Thu, Aug 6, 2020 at 11:48 PM Steven Rostedt wrote: > > On Thu, 6 Aug 2020 14:50:54 + > guo...@kernel.org wrote: > > > From: Guo Ren > > > > The function ftrace_process_locs() will modify text code, so we > > should give a text_mutex lock. Because so

Re: csky: smp_mb__after_spinlock

2020-08-06 Thread Guo Ren
Acked-by: Guo Ren On Thu, Aug 6, 2020 at 3:55 AM wrote: > > On Wed, Aug 05, 2020 at 12:41:46PM +0200, pet...@infradead.org wrote: > > Hi, > > > > While doing an audit of smp_mb__after_spinlock, I found that csky > > defines it, why? > > > > C

Re: csky: smp_mb__after_spinlock

2020-08-06 Thread Guo Ren
s a bit heavy, are any tickets-like comm spinlock infrastructures in the plan? -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH 06/24] csky: use asm-generic/mmu_context.h for no-op implementations

2020-07-27 Thread Guo Ren
Acked-by: Guo Ren On Tue, Jul 28, 2020 at 11:34 AM Nicholas Piggin wrote: > > Cc: Guo Ren > Cc: linux-c...@vger.kernel.org > Signed-off-by: Nicholas Piggin > --- > arch/csky/include/asm/mmu_context.h | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) >

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-22 Thread Guo Ren
id using scripts/recordmcount.pl script and directly generate nops for _mcount. It's different from -fpatchable-function-entry=2 which generating nops before function prologue in arm64, isn't it? On Tue, Jul 21, 2020 at 9:27 PM Masami Hiramatsu wrote: > > On Wed, 15 Jul 2020 00:24:54

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-22 Thread Guo Ren
Hi Masami, On Tue, Jul 21, 2020 at 9:27 PM Masami Hiramatsu wrote: > > On Wed, 15 Jul 2020 00:24:54 +0800 > Guo Ren wrote: > > > Thx Masami, > > > > On Tue, Jul 14, 2020 at 7:38 PM Masami Hiramatsu > > wrote: > > > > > > On Mon, 13

Re: [PATCH] csky: Fix build with upstream gcc

2020-07-21 Thread Guo Ren
Thx Joerg & Guenter, Cool work! Acked-by: Guo Ren Approve to next branch. On Tue, Jul 21, 2020 at 9:21 PM Guenter Roeck wrote: > > On Tue, Jul 21, 2020 at 01:23:14PM +0200, Joerg Roedel wrote: > > From: Joerg Roedel > > > > Building a kern

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

2020-07-16 Thread Guo Ren
uly/549910.html On Tue, Jul 14, 2020 at 4:37 PM Will Deacon wrote: > > On Mon, Jul 13, 2020 at 04:03:33AM +, guo...@kernel.org wrote: > > From: Guo Ren > > > > TSK_STACK_CANARY only used in arm64/Makefile with > > CONFIG_STACKPROTECTOR_PER_TASK wrap. So

Re: [PATCH v3 0/7] riscv: Add k/uprobe supported

2020-07-15 Thread Guo Ren
On Tue, Jul 14, 2020 at 7:23 PM Masami Hiramatsu wrote: > > Hi Guo, > > On Mon, 13 Jul 2020 23:39:15 + > guo...@kernel.org wrote: > > > From: Guo Ren > > > > The patchset includes kprobe/uprobe support and some related fixups. > > Patrick provi

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

2020-07-14 Thread Guo Ren
eturn; if (kprobe_breakpoint_handler(regs)) return; #endif #ifdef CONFIG_UPROBES if (uprobe_single_step_handler(regs)) return; if (uprobe_breakpoint_handler(regs)) return; #endif current->thread.bad_cause = regs-&

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-14 Thread Guo Ren
Thx Masami, On Tue, Jul 14, 2020 at 7:38 PM Masami Hiramatsu wrote: > > On Mon, 13 Jul 2020 23:39:21 + > guo...@kernel.org wrote: > > > From: Guo Ren > > > > This patch adds support for kprobes on ftrace call sites to avoids > > much of the overhead with

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

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

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

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

Re: [PATCH v3 2/2] riscv: Enable per-task stack canaries

2020-07-12 Thread Guo Ren
Hi Kees, On Mon, Jul 13, 2020 at 10:40 AM Kees Cook wrote: > > On Fri, Jul 10, 2020 at 04:19:58PM +, guo...@kernel.org wrote: > > From: Guo Ren > > > > This enables the use of per-task stack canary values if GCC has > > support for emitting the s

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

2020-07-10 Thread Guo Ren
s on > this behevior, so could you consider to support it in the "ftrace" > implementation at first? (And if it is enabled, you can enable the > livepatch on RISCV too) Great message! But can you show me codes that bpf and err-jnject using the behavior? Thx I'll try to fix up it :) -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

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

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

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

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

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

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

Re: [PATCH V1 4/5] riscv: Add kprobes supported

2020-07-07 Thread Guo Ren
On Tue, Jul 7, 2020 at 4:26 PM Zong Li wrote: > > On Mon, Jul 6, 2020 at 6:12 PM Masami Hiramatsu wrote: > > > > Hi Guo, > > > > On Sat, 4 Jul 2020 03:34:18 + > > guo...@kernel.org wrote: > > > > > From: Guo Ren > > > >

Re: [RFC PATCH] riscv: enable per-task stack canaries

2020-07-05 Thread Guo Ren
On Mon, Jul 6, 2020 at 9:21 AM Kees Cook wrote: > > On Mon, Jul 06, 2020 at 09:01:51AM +0800, Guo Ren wrote: > > Yeah! :) I just want to show you, how about the format: use tp in gpr > > to do that. The format is similar to arm64. > > > > tp is the task_struct p

Re: [RFC PATCH] riscv: enable per-task stack canaries

2020-07-05 Thread Guo Ren
On Mon, Jul 6, 2020 at 4:40 AM Kees Cook wrote: > > On Sun, Jul 05, 2020 at 02:13:17PM +, guo...@kernel.org wrote: > > From: Guo Ren > > > > After compare arm64 and x86 implementations, seems arm64's is more > > flexible and readable. The key p

Re: [PATCH] riscv: Add STACKPROTECTOR supported

2020-07-05 Thread Guo Ren
On Mon, Jul 6, 2020 at 4:31 AM Kees Cook wrote: > > On Sun, Jul 05, 2020 at 10:16:14PM +0800, Guo Ren wrote: > > On Sun, Jul 5, 2020 at 2:53 PM Kees Cook wrote: > > > On Sun, Jul 05, 2020 at 06:24:15AM +, guo...@kernel.org wrote: > > > > +static __always_i

Re: [PATCH] riscv: Add STACKPROTECTOR supported

2020-07-05 Thread Guo Ren
Hi Kees, On Sun, Jul 5, 2020 at 2:53 PM Kees Cook wrote: > > On Sun, Jul 05, 2020 at 06:24:15AM +, guo...@kernel.org wrote: > > From: Guo Ren > > > > The -fstack-protector & -fstack-protector-strong features are from > > gcc. The patch only add basic

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

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

Re: [PATCH v4 06/26] mm/csky: Use general page fault accounting

2020-06-30 Thread Guo Ren
Acked-by: Guo Ren On Wed, Jul 1, 2020 at 4:45 AM Peter Xu wrote: > > Use the general page fault accounting by passing regs into handle_mm_fault(). > It naturally solve the issue of multiple page fault accounting when page fault > retry happened. > > CC: Guo Ren > CC: linux

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

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

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

2020-06-28 Thread Guo Ren
On Sun, Jun 28, 2020 at 10:52 PM Masami Hiramatsu wrote: > > On Sun, 28 Jun 2020 14:12:07 +0800 > Guo Ren wrote: > > > On Sun, Jun 28, 2020 at 10:59 AM Masami Hiramatsu > > wrote: > > > > > > On Sat, 27 Jun 2020 16:20:02 + > > > g

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

2020-06-28 Thread Guo Ren
On Sun, Jun 28, 2020 at 10:59 AM Masami Hiramatsu wrote: > > On Sat, 27 Jun 2020 16:20:02 + > guo...@kernel.org wrote: > > > From: Guo Ren > > > > Unfortunately, the current code couldn't be compiled, because > > BUILD_BUG_ON needs a static defined value

Re: [PATCH 06/26] mm/csky: Use general page fault accounting

2020-06-19 Thread Guo Ren
On Sat, Jun 20, 2020 at 12:05 AM Peter Xu wrote: > > Use the general page fault accounting by passing regs into handle_mm_fault(). > It naturally solve the issue of multiple page fault accounting when page fault > retry happened. > > CC: Guo Ren > CC: linux-c...@vger.ke

Re: [PATCH 07/25] mm/csky: Use mm_fault_accounting()

2020-06-17 Thread Guo Ren
Hi Peter, On Tue, Jun 16, 2020 at 6:16 AM Peter Xu wrote: > > Use the new mm_fault_accounting() helper for page fault accounting. > Also, move the accounting to be after release of mmap_sem. > > CC: Guo Ren > CC: linux-c...@vger.kernel.org > Signed-off-by: Peter Xu

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

2020-06-17 Thread Guo Ren
I can do it. On Mon, Jun 15, 2020 at 4:43 PM Tobias Klauser wrote: > > On 2020-06-13 at 10:42:07 +0200, Guo Ren wrote: > > Acked-by: Guo Ren > > Thanks for the Ack. Are you taking this patch through your own tree or > should I directly submit to someone else? > > &

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

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

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

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

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-06-09 Thread Guo Ren
+ return -EINVAL; > + > pagefault_disable(); > result = __get_user(opcode, (uprobe_opcode_t __user *)vaddr); > pagefault_enable(); > -- > 2.25.1.362.g51ebf55 > > Looks good to me, thx. Reviewed-by: Guo Ren -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-06-09 Thread Guo Ren
igned to UPROBE_SWBP_INSN_SIZE. > > Not sure if it would have been possible to try to create a uprobe on an > odd address. If yes, then the new IS_ALIGNED check certainly makes this > better for s390, so the patch looks sane. Adding Vasily and Sven to double > check. Also good to csky. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [RFC PATCH v4 00/13] riscv: Add vector ISA support

2020-06-01 Thread Guo Ren
On Tue, Jun 2, 2020 at 10:21 AM Greentime Hu wrote: > > Guo Ren 於 2020年5月31日 週日 下午11:52寫道: > > > > Hi Greentime & Vincent, > > > > Thx for the dynamic vlen implementation. I've two suggestions: > > - Please give out glibc patches mail URL, we need

Re: [PATCH v6 3/6] irqchip: RISC-V per-HART local interrupt controller driver

2020-06-01 Thread Guo Ren
andle MSI and does not have virtualization support > pass-through interrupts. We will most likely see a new RISC-V interrupt > controller spec for these capabilities. > > Also, the PLIC spec is now owned by RISC-V foundation (not SiFive) so > we will have to rename the driver to "irq-riscv-plic" and will have a new > generic compatible string "riscv,plic-1.0.0". One of us (me or Palmer) will > send separate patches for this renaming. I hope you will be fine with this?? > (Refer, https://github.com/riscv/riscv-plic-spec) That's great, we follow riscv-plic in hardware, but don't want to use sifive string in dts. Acked & Thx for the job. -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [RFC PATCH v4 11/13] riscv: Add ptrace vector support

2020-06-01 Thread Guo Ren
Since it has been redesigned with new version spec, please change the first-author :) And add me as Co-developed. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch adds ptrace support for riscv vector. The vector registers will > be saved i

Re: [RFC PATCH v4 07/13] riscv: Add has_vector/riscv_vsize to save vector features.

2020-06-01 Thread Guo Ren
Since it has been redesigned with new version spec, please change the first-author :) And add me as Co-developed. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch is used to detect vector support status of CPU and use > riscv_vsize to save

Re: [RFC PATCH v4 12/13] riscv: Add sigcontext save/restore for vector

2020-06-01 Thread Guo Ren
Since it has been redesigned with new version spec, please change the first-author :) And add me as Co-developed. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch adds sigcontext save/restore for vector. The vector registers > will be saved i

Re: [RFC PATCH v4 10/13] riscv: Add task switch support for vector

2020-06-01 Thread Guo Ren
Since it has been redesigned with new version spec, please change the first-author :) And add me as Co-developed. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch adds task switch support for vector. It supports lazy > save and restore mec

Re: [RFC PATCH v4 09/13] riscv: Add vector struct and assembler definitions

2020-06-01 Thread Guo Ren
Since it has been redesigned with new version spec, please change the first-author :) And add me as Co-developed. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > Add vector state context struct in struct thread and asm-offsets.c > definitions. > >

Re: [RFC PATCH v4 05/13] riscv: Add new csr defines related to vector extension

2020-06-01 Thread Guo Ren
Since it has been redesigned with new version spec, please change the first-author :) And add me as Co-developed. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > Follow the riscv vector spec to add new csr number. > > [greentime...@sifive.com: update

Re: [RFC PATCH v4 05/13] riscv: Add new csr defines related to vector extension

2020-06-01 Thread Guo Ren
On Mon, Jun 1, 2020 at 4:15 PM Greentime Hu wrote: > > Guo Ren 於 2020年5月31日 週日 上午9:56寫道: > > > > Hi Greentime, > > > > Why remove vxrm and xstat ? > > > > > Appendix B: Calling Convention > > > In the RISC-V psABI, the vector regist

Re: [RFC PATCH v4 10/13] riscv: Add task switch support for vector

2020-05-31 Thread Guo Ren
only need switch_context or sigcontext vector when the flag is set. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch adds task switch support for vector. It supports lazy > save and restore mechanism. It also supports all lengths of vlen.

Re: [RFC PATCH v4 00/13] riscv: Add vector ISA support

2020-05-31 Thread Guo Ren
_save->vstate_save". > - Fixup wrong saved registers' length in vector.S. > - Seperate unrelated patches from this one. > > Greentime Hu (1): > ptrace: Use regset_size() for dynamic regset size. > > Guo Ren (11): > riscv: Separate patch for cflags and aflags > r

Re: [RFC PATCH v4 10/13] riscv: Add task switch support for vector

2020-05-31 Thread Guo Ren
Hi Greentime, On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch adds task switch support for vector. It supports lazy > save and restore mechanism. It also supports all lengths of vlen. > > [greentime...@sifive.com: add support

Re: [RFC PATCH v4 12/13] riscv: Add sigcontext save/restore for vector

2020-05-31 Thread Guo Ren
Hi Greentime, On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch adds sigcontext save/restore for vector. The vector registers > will be saved in datap pointer. The datap pointer will be allocaed > dynamically when the task needs in kerne

Re: [RFC PATCH v4 05/13] riscv: Add new csr defines related to vector extension

2020-05-30 Thread Guo Ren
tioned above, vxrm and vxsat are thread storage duration. When timer 's interrupt coming, we still need to save them in context_switch. On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > Follow the riscv vector spec to add new csr number. > > [greentime...@

Re: [RFC PATCH v4 07/13] riscv: Add has_vector/riscv_vsize to save vector features.

2020-05-30 Thread Guo Ren
Reviewed-by: Guo Ren On Tue, May 26, 2020 at 3:03 PM Greentime Hu wrote: > > From: Guo Ren > > This patch is used to detect vector support status of CPU and use > riscv_vsize to save the size of all the vector registers. It assumes > all harts has the same capabili

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

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

Re: [PATCH] csky: Fixup calltrace panic

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

Re: [PATCH] csky: Fixup calltrace panic

2020-05-20 Thread Guo Ren
Hi Guenter, > 在 2020年5月18日,上午1:52,Guenter Roeck 写道: > > Hi, > > On Wed, May 13, 2020 at 03:15:25PM +0800, Guo Ren wrote: >> The implementation of show_stack will panic with wrong fp: >> >> addr= *fp++; >> >> because the fp isn't checked

Re: [PATCH 06/34] csky: Use CONFIG_PREEMPTION

2019-10-16 Thread Guo Ren
Thx for explanation. Acked-by: Guo Ren On Wed, Oct 16, 2019 at 3:39 PM Sebastian Andrzej Siewior wrote: > > On 2019-10-16 07:29:34 [+0800], Guo Ren wrote: > > Could CONFIG_PREEMPT_RT be supported in csky ? Any arch backend porting ? > > It could. HIGH_RE

Re: [PATCH 06/34] csky: Use CONFIG_PREEMPTION

2019-10-15 Thread Guo Ren
equire the same functionality which today > depends on CONFIG_PREEMPT. > > Switch the entry code over to use CONFIG_PREEMPTION. > > Cc: Guo Ren > Signed-off-by: Thomas Gleixner > Signed-off-by: Sebastian Andrzej Siewior > --- > arch/csky/kernel/entry.S | 4 ++-- >

Re: [PATCH] csky: Initial stack protector support

2019-10-11 Thread Guo Ren
flow in kill system call. > > Signed-off-by: Mao Han > Cc: Guo Ren > --- > arch/csky/Kconfig | 1 + > arch/csky/include/asm/stackprotector.h | 29 + > arch/csky/kernel/process.c | 6 ++ > 3 files changed, 36 inser

Re: [GIT PULL] csky changes for v5.3-rc1

2019-09-30 Thread Guo Ren
ernel/process.c | 2 +- > arch/csky/mm/cachev1.c | 7 +++- > arch/csky/mm/cachev2.c | 11 +- > arch/csky/mm/dma-mapping.c | 76 > +--- > arch/csky/mm/init.c | 16 > arch/csky/mm/ioremap.c | 27 - > 17 files changed, 291 insertions(+), 212 deletions(-) -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH v2 3/9] csky: entry: Remove unneeded need_resched() loop

2019-09-23 Thread Guo Ren
Ok, I'll put in my tree :) On Mon, Sep 23, 2019 at 10:36 PM Valentin Schneider wrote: > > Since the enabling and disabling of IRQs within preempt_schedule_irq() > is contained in a need_resched() loop, we don't need the outer arch > code loop. > > Acked-by: Guo Ren > Si

Re: [PATCH V6 0/3] riscv: Add perf callchain support

2019-09-04 Thread Guo Ren
force to build kernel with -fno-omit-frame-pointer if perf > > event is enabled > > > > Changes since v1: > > - simplify implementation and code convention > > > > Cc: Paul Walmsley > > Cc: Greentime Hu > > Cc: Palmer Dabbelt > > Cc: linux-r

Re: [PATCH] csky: Move static keyword to the front of declaration

2019-09-03 Thread Guo Ren
Thx, Acked by: Guo Ren You may also modify others' ➜ linux-next git:(linux-next-for-v5.4) ✗ grep "const static" * -r arch/csky/kernel/perf_event.c:const static struct of_device_id csky_pmu_of_device_ids[] = { arch/nds32/kernel/perf_event_cpu.c:const static struct of

Re: [PATCH] csky: use generic free_initrd_mem()

2019-08-28 Thread Guo Ren
Sure, no problem. On Wed, Aug 28, 2019 at 10:39 PM Mike Rapoport wrote: > > Hi, > > On Wed, Aug 28, 2019 at 10:12:52PM +0800, Guo Ren wrote: > > Acked-by: Guo Ren > > Do you mind taking it via csky tree? > > > On Wed, Aug 28, 2019 at 9:35 PM Mike Rapo

Re: [PATCH] csky: use generic free_initrd_mem()

2019-08-28 Thread Guo Ren
Acked-by: Guo Ren On Wed, Aug 28, 2019 at 9:35 PM Mike Rapoport wrote: > > The csky implementation of free_initrd_mem() is an open-coded version of > free_reserved_area() without poisoning. > > Remove it and make csky use the generic version of free_initrd_mem(). > >

Re: [PATCH V5 1/3] riscv: Add perf callchain support

2019-08-26 Thread Guo Ren
On Mon, Aug 26, 2019 at 4:03 PM Greentime Hu wrote: > > Hi Guo, > > Guo Ren 於 2019年8月24日 週六 上午8:54寫道: > > > > Please check CONFIG_FRAME_POINTER > > > > 1 *frame = *((struct stackframe *)frame->fp - 1); > > This code is origionally from riscv/kernel/s

Re: [PATCH V2] csky: Fixup 610 vipt cache flush mechanism

2019-08-26 Thread Guo Ren
Thx Christoph, On Mon, Aug 26, 2019 at 2:38 PM Christoph Hellwig wrote: > > On Thu, Aug 22, 2019 at 11:05:22AM +0800, guo...@kernel.org wrote: > > From: Guo Ren > > > > 610 has vipt aliasing issue, so we need to finish the cache flush > > apis mentioned in cachetl

Re: [PATCH V5 1/3] riscv: Add perf callchain support

2019-08-23 Thread Guo Ren
llchain sampling on riscv platform. > > The return address of leaf function is retrieved from pt_regs as > > it is not saved in the outmost frame. > > > > Signed-off-by: Mao Han > > Cc: Paul Walmsley > > Cc: Greentime Hu > > Cc: Palmer Dabbelt > > Cc

Re: [PATCH 1/3] csky: Fixup arch_get_unmapped_area() implementation

2019-08-20 Thread Guo Ren
invalidate_kernel_vmap_range functions to avoid data corruption when > doing I/O on vmalloc/vmap ranges. I'll give another patch for this issue -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH 3/3] csky: Support kernel non-aligned access

2019-08-20 Thread Guo Ren
Thx Christoph On Wed, Aug 21, 2019 at 10:17 AM Christoph Hellwig wrote: > > On Tue, Aug 20, 2019 at 08:34:29PM +0800, guo...@kernel.org wrote: > > From: Guo Ren > > > > We prohibit non-aligned access in kernel mode, but some special NIC > > driver needs to support

Re: [PATCH] csky: Fixup ioremap function losing

2019-08-20 Thread Guo Ren
On Mon, Aug 19, 2019 at 2:21 AM Christoph Hellwig wrote: > > On Sun, Aug 18, 2019 at 10:20:18AM +0800, Guo Ren wrote: > > > > Also change flag VM_ALLOC to VM_IOREMAP in get_vm_area_caller. > > > > > > Looks generally fine, but two comments: > > > >

Re: [PATCH] csky: Fixup ioremap function losing

2019-08-17 Thread Guo Ren
Thx Christoph, On Fri, Aug 16, 2019 at 3:03 PM Christoph Hellwig wrote: > > On Thu, Aug 15, 2019 at 07:28:57PM +0800, guo...@kernel.org wrote: > > From: Guo Ren > > > > Implement the following apis to meet usage in different scenarios. > > > > - iore

Re: [PATCH 3/4] csky/dma: Fixup cache_op failed when cross memory ZONEs

2019-08-06 Thread Guo Ren
ase keep the postcore_initcall next to the function it calls. Ok. Change arch_initcall back to postcore_initcall. :) -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH 4/4] csky: Add dma_inv_range for DMA_FROM_DEVICE

2019-07-30 Thread Guo Ren
Thx Arnd, On Tue, Jul 30, 2019 at 11:22 PM Arnd Bergmann wrote: > > On Tue, Jul 30, 2019 at 5:11 PM Guo Ren wrote: > > > > diff --git a/arch/csky/mm/dma-mapping.c b/arch/csky/mm/dma-mapping.c > > > > cache_op(paddr, size, dma_wb_range);

Re: [PATCH 1/4] csky: Fixup dma_rmb/wmb synchronization problem

2019-07-30 Thread Guo Ren
Thx Arnd, On Tue, Jul 30, 2019 at 9:29 PM Arnd Bergmann wrote: > > On Tue, Jul 30, 2019 at 2:15 PM wrote: > > > > From: Guo Ren > > > > If arch didn't define dma_r/wmb(), linux will use w/rmb instead. Csky > > use bar.xxx to implement mb() and th

Re: [PATCH 1/4] csky: Fixup dma_rmb/wmb synchronization problem

2019-07-30 Thread Guo Ren
On Tue, Jul 30, 2019 at 9:29 PM Arnd Bergmann wrote: > > On Tue, Jul 30, 2019 at 2:15 PM wrote: > > > > From: Guo Ren > > > > If arch didn't define dma_r/wmb(), linux will use w/rmb instead. Csky > > use bar.xxx to implement mb() and that will cause proble

Re: [PATCH 4/4] csky: Add dma_inv_range for DMA_FROM_DEVICE

2019-07-30 Thread Guo Ren
Thx Arnd, On Tue, Jul 30, 2019 at 9:43 PM Arnd Bergmann wrote: > > On Tue, Jul 30, 2019 at 2:16 PM wrote: > > From: Guo Ren > > > diff --git a/arch/csky/mm/dma-mapping.c b/arch/csky/mm/dma-mapping.c > > index 3f1ff9d..d8f0f81 100644 > > --- a/arch/csky/mm/dma

Re: [PATCH] csky: Improve abiv1 mem ops performance with glibc codes

2019-07-01 Thread Guo Ren
Hi Arnd, On Mon, Jul 1, 2019 at 10:52 PM Arnd Bergmann wrote: > > On Sat, Jun 29, 2019 at 7:36 AM wrote: > > > > From: Guo Ren > > > > These codes are copied from glibc/string directory, they are the generic > > implementation for string oper

Re: [PATCH 1/1] perf annotate csky: Add perf annotate support

2019-06-26 Thread Guo Ren
On Thu, Jun 27, 2019 at 2:52 AM Arnaldo Carvalho de Melo wrote: > > Em Wed, Jun 26, 2019 at 02:56:55PM +0800, Guo Ren escreveu: > > Thx Mao, > > > > Approved! > > I guess I can take this as a: > > Acked-by: Guo Ren > > Or would this better be: > &

Re: [PATCH 1/1] perf annotate csky: Add perf annotate support

2019-06-26 Thread Guo Ren
Thx Mao, Approved! Best Regards Guo Ren On Wed, Jun 26, 2019 at 2:53 PM Mao Han wrote: > > This patch add basic arch initialization and instruction associate support > for csky. > > perf annotate --stdio2 > Samples: 161 of event 'cpu-clock:pppH', 4000 Hz, Event count (ap

Re: [PATCH] csky: dts: Add NationalChip GX6605S

2019-06-24 Thread Guo Ren
Hi Andreas, On Tue, Jun 25, 2019 at 9:25 AM Andreas Färber wrote: > > Am 25.06.19 um 02:45 schrieb Guo Ren: > > Thx for the patch. No need seperate part into dtsi, > > Sorry, I know from many arm contributions that using a .dtsi is the > right thing here. It logically se

Re: [PATCH] csky: dts: Add NationalChip GX6605S

2019-06-24 Thread Guo Ren
ompatible = "ns16550a"; > + reg = <0x00403000 0x400>; > + interrupts = <15>; > + clock-frequency = <29491200>; > + reg-shift = <2>; > + reg-io-width = <1>; > + }; > + > + intc: interrupt-controller@50 { > + compatible = "csky,gx6605s-intc"; > + reg = <0x0050 0x400>; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + > + ehci_hcd: usb@90 { > + compatible = "generic-ehci"; > + reg = <0x0090 0x400>; > + interrupts = <59>; > + }; > + > + ohci_hcd0: usb@a0 { > + compatible = "generic-ohci"; > + reg = <0x00a0 0x400>; > + interrupts = <58>; > + }; > + > + ohci_hcd1: usb@b0 { > + compatible = "generic-ohci"; > + reg = <0x00b0 0x400>; > + interrupts = <57>; > + }; > + }; > +}; > -- > 2.16.4 > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/

Re: [PATCH] arm64: asid: Optimize cache_flush for SMT

2019-06-24 Thread Guo Ren
lk is on this thread: https://lore.kernel.org/linux-arm-kernel/20190624102209.ngwtosgr5fvp3ler@willie-the-truck/T/#m92396a2f238c9eece660cdc0f275e787531d4ec1 > > On Mon, Jun 24, 2019 at 12:04:29AM +0800, guo...@kernel.org wrote: > > From: Guo Ren > > > > The hardware threads of one c

Re: [PATCH V2 2/4] csky: Add new asid lib code from arm

2019-06-21 Thread Guo Ren
Sorry, I forgot delete arm's. It's mistake, no change arm64 file. On Fri, Jun 21, 2019 at 6:10 PM Julien Grall wrote: > > Hi, > > On 21/06/2019 10:39, guo...@kernel.org wrote: > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > Cc: Julien Grall >

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

2019-06-13 Thread Guo Ren
Acked-by: Guo Ren thread_saved_pc should be used in unwind stack and I'll give another patch to optimize the unwind flow for csky. On Wed, Jun 12, 2019 at 7:22 PM Tobias Klauser wrote: > > These are used nowhere in the tree (except for some architectures which > define them for thei

Re: [PATCH V4 3/4] irqchip/irq-csky-mpintc: Support auto irq deliver to all cpus

2019-06-04 Thread Guo Ren
Hello Marc, On Tue, Jun 4, 2019 at 7:54 PM Marc Zyngier wrote: > > On 04/06/2019 12:05, guo...@kernel.org wrote: > > From: Guo Ren > > > > The csky,mpintc could deliver a external irq to one cpu or all cpus, but > > it couldn't deliver a external irq to a group of

Re: [PATCH V4 6/6] csky: Fix perf record in kernel/user space

2019-06-04 Thread Guo Ren
gt; space or user space, csky_pmu_event_init is called twice with no > attr specified. Configuration will be overwritten with sampling in > both kernel space and user space. --all-kernel/--all-user is > useless without this patch applied. > > Signed-off-by: Mao Han > Cc: Guo Ren >

Re: [PATCH V4 3/6] csky: Add pmu interrupt support

2019-06-04 Thread Guo Ren
Hello Mao, Nice job and see my comment below. On Tue, Jun 4, 2019 at 10:25 AM Mao Han wrote: > > This patch add interrupt request and handler for csky pmu. > perf can record on hardware event with this patch applied. > > Signed-off-by: Mao Han > Cc: Guo Ren > --

Re: [PATCH V4 1/6] csky: Init pmu as a device

2019-06-03 Thread Guo Ren
Hello Mao, On Tue, Jun 4, 2019 at 10:25 AM Mao Han wrote: > > This patch change the csky pmu initialization from arch init to > device init. The pmu can be configued with information from > device tree(pmu device name, irq number and etc.). > > Signed-off-by: Mao

<    1   2   3   4   5   6   7   8   9   10   >