RF_EVENTS
> select HAVE_PERF_REGS
> select HAVE_PERF_USER_STACK_DUMP
> diff --git a/arch/csky/include/asm/page.h b/arch/csky/include/asm/page.h
> index 4a0502e324a6..f70f37402d75 100644
> --- a/arch/csky/include/asm/page.h
> +++ b/arch/csky/include/asm/page.h
> @@
ch_jump_label_transform_static
> +
> #endif /* __ASSEMBLY__ */
> #endif /* __ASM_CSKY_JUMP_LABEL_H */
> --
> 2.39.2
>
>
Thank you!
Reviewed-by: Guo Ren
--
Best Regards
Guo Ren
Acked-by: Guo Ren
On Wed, Sep 6, 2023 at 6:04 PM Joel Granados via B4 Relay
wrote:
>
> From: Joel Granados
>
> This commit comes at the tail end of a greater effort to remove the
> empty elements at the end of the ctl_table arrays (sentinels) which
> will reduce the overa
Acked-by: Guo Ren
On Thu, Jun 1, 2023 at 5:34 AM Vishal Moola (Oracle)
wrote:
>
> Part of the conversions to replace pgtable constructor/destructors with
> ptdesc equivalents.
>
> Signed-off-by: Vishal Moola (Oracle)
> ---
> arch/csky/include/asm/pgalloc.h | 4 ++--
b/arch/csky/include/asm/irq_work.h
> index 33aaf39d6f94..d39fcc1f5395 100644
> --- a/arch/csky/include/asm/irq_work.h
> +++ b/arch/csky/include/asm/irq_work.h
> @@ -7,5 +7,5 @@ static inline bool arch_irq_work_has_interrupt(void)
> {
> return true;
> }
> -extern voi
On Fri, May 5, 2023 at 9:19 PM Arnd Bergmann wrote:
>
> On Fri, May 5, 2023, at 07:47, Guo Ren wrote:
> > On Mon, Mar 27, 2023 at 8:15 PM Arnd Bergmann wrote:
>
> >>
> >> riscv also invalidates the caches before the transfer, which does
> >> not appe
break;
> default:
> break;
> --
> 2.39.2
>
--
Best Regards
Guo Ren
(paddr, size, dma_wb_range);
> - break;
> case DMA_FROM_DEVICE:
> case DMA_BIDIRECTIONAL:
> - cache_op(paddr, size, dma_wbinv_range);
> + cache_op(paddr, size, dma_wb_range);
Reviewed-by: Guo Ren
> break;
> default:
> BUG();
> --
> 2.39.2
>
--
Best Regards
Guo Ren
On Sat, Feb 4, 2023 at 10:29 AM Josh Poimboeuf wrote:
>
> On Sat, Feb 04, 2023 at 09:12:31AM +0800, Guo Ren wrote:
> > On Sat, Feb 4, 2023 at 6:05 AM Josh Poimboeuf wrote:
> > >
> > > arch_cpu_idle_dead() doesn't return. Make that more explicit with
rt_idle_dead();
arch_cpu_idle_dead();
+ BUG();
}
arch_cpu_idle_enter();
> }
> #endif
> --
> 2.39.0
>
--
Best Regards
Guo Ren
>
> #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && \
> (void *)(kaddr) < high_memory)
> -#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && ((pfn) -
> ARCH_PFN_OFFSET) < max_mapnr)
For csky part:
> -
> extern unsigned long __stack_chk_guard;
>
> /*
> @@ -15,12 +12,7 @@ extern unsigned long __stack_chk_guard;
> */
> static __always_inline void boot_init_stack_canary(void)
> {
> - unsigned long canary;
> -
> - /* Try to get a semi random initial value.
_valid(), which almost does what we need.
> + * not-valid. Walk the page table and check the PTE_VALID bit.
> *
> * Because this is only called on the kernel linear map, p?d_sect() implies
> * p?d_present(). When debug_pagealloc is enabled, sections mappings are
>
sky/kernel/smp.c
> index 4b605aa2e1d6..fd7f81be16dd 100644
> --- a/arch/csky/kernel/smp.c
> +++ b/arch/csky/kernel/smp.c
> @@ -140,7 +140,7 @@ void smp_send_stop(void)
> on_each_cpu(ipi_stop, NULL, 1);
> }
>
> -void smp_send_reschedule(int cpu)
> +void arch_
Reviewed-by: Guo Ren
On Mon, Sep 19, 2022 at 6:17 PM Peter Zijlstra wrote:
>
> Doing RCU-idle outside the driver, only to then temporarily enable it
> again, at least twice, before going idle is daft.
>
> Signed-off-by: Peter Zijlstra (Intel)
> ---
> drivers/cpuidle/
rch_cpu_idle(void)
> * tricks
> */
> cpu_do_idle();
> - raw_local_irq_enable();
> }
> --- a/arch/csky/kernel/process.c
> +++ b/arch/csky/kernel/process.c
> @@ -100,6 +100,5 @@ void arch_cpu_idle(void)
> #ifdef CONFIG_CPU_PM_STOP
>
For csky part
Acked-by: Guo Ren
On Fri, Aug 19, 2022 at 9:39 AM Kefeng Wang wrote:
>
> Only x86 has own release_thread(), introduce a new weak
> release_thread() function to clean empty definitions in
> other ARCHs.
>
> Signed-off-by: Kefeng Wang
> ---
> arch/alpha
For csky part
Acked-by: Guo Ren
On Mon, Aug 15, 2022 at 10:40 PM Zi Yan wrote:
>
> From: Zi Yan
>
> This Kconfig option is used by individual arch to set its desired
> MAX_ORDER. Rename it to reflect its actual use.
>
> Acked-by: Mike Rapoport
> Signed-off-by: Zi
For csky part.
Acked-by: Guo Ren
On Fri, Jun 24, 2022 at 12:48 PM Anshuman Khandual
wrote:
>
> This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard
> vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks
> up a private and static pr
apis/pipelines/1/runs/1473/signedlogcontent/12?urlExpires=2022-06-08T09%3A37%3A13.9248496Z=HMACV1=fIT7vd0O4NNRwzwKWLXY4UVZBIIF3XiVI9skAsGvV0I%3D
>
Yes, there is no CONFIG_64BIT in userspace, we shouldn't limit it with
(__BITS_PER_LONG == 32 || defined(__KERNEL__)) to break the
compatibility. Just export F_*64 definitions permanently.
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
ct module *mod,
> struct _ddebug *debug)
> ddebug_remove_module(mod->name);
> }
>
> -void * __weak module_alloc(unsigned long size)
> -{
> - return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
> - GFP_KERNEL, PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS,
> - NUMA_NO_NODE, __builtin_return_address(0));
> -}
> -
> bool __weak module_init_section(const char *name)
> {
> return strstarts(name, ".init");
> diff --git a/kernel/module_alloc.c b/kernel/module_alloc.c
> new file mode 100644
> index ..26a4c60998ad
> --- /dev/null
> +++ b/kernel/module_alloc.c
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) 2002 Richard Henderson
> + * Copyright (C) 2001 Rusty Russell, 2002, 2010 Rusty Russell IBM.
> + */
> +
> +#include
> +#include
> +#include
> +
> +void * __weak module_alloc(unsigned long size)
> +{
> + return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
> + GFP_KERNEL, PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS,
> + NUMA_NO_NODE, __builtin_return_address(0));
> +}
> +
> +void __weak module_memfree(void *module_region)
> +{
> + /*
> +* This memory may be RO, and freeing RO memory in an interrupt is not
> +* supported by vmalloc.
> +*/
> + WARN_ON(in_interrupt());
> + vfree(module_region);
> +}
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index 93507330462c..050b2975332e 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -101,6 +101,7 @@ static nokprobe_inline bool trace_kprobe_has_gone(struct
> trace_kprobe *tk)
> return kprobe_gone(>rp.kp);
> }
>
> +#ifdef CONFIG_MODULES
> static nokprobe_inline bool trace_kprobe_within_module(struct trace_kprobe
> *tk,
> struct module *mod)
> {
> @@ -109,11 +110,13 @@ static nokprobe_inline bool
> trace_kprobe_within_module(struct trace_kprobe *tk,
>
> return strncmp(module_name(mod), name, len) == 0 && name[len] == ':';
> }
> +#endif /* CONFIG_MODULES */
>
> static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe
> *tk)
> {
> + bool ret = false;
> +#ifdef CONFIG_MODULES
> char *p;
> - bool ret;
>
> if (!tk->symbol)
> return false;
> @@ -125,6 +128,7 @@ static nokprobe_inline bool
> trace_kprobe_module_exist(struct trace_kprobe *tk)
> ret = !!find_module(tk->symbol);
> rcu_read_unlock_sched();
> *p = ':';
> +#endif /* CONFIG_MODULES */
>
> return ret;
> }
> @@ -668,6 +672,7 @@ static int register_trace_kprobe(struct trace_kprobe *tk)
> return ret;
> }
>
> +#ifdef CONFIG_MODULES
> /* Module notifier call back, checking event on the module */
> static int trace_kprobe_module_callback(struct notifier_block *nb,
>unsigned long val, void *data)
> @@ -702,6 +707,7 @@ static struct notifier_block trace_kprobe_module_nb = {
> .notifier_call = trace_kprobe_module_callback,
> .priority = 1 /* Invoked after kprobe module callback */
> };
> +#endif /* CONFIG_MODULES */
>
> static int __trace_kprobe_create(int argc, const char *argv[])
> {
> @@ -1896,8 +1902,10 @@ static __init int init_kprobe_trace_early(void)
> if (ret)
> return ret;
>
> +#ifdef CONFIG_MODULES
> if (register_module_notifier(_kprobe_module_nb))
> return -EINVAL;
> +#endif /* CONFIG_MODULES */
>
> return 0;
> }
> --
> 2.36.1
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
Acked-by: Guo Ren
On Fri, Jun 3, 2022 at 6:15 PM Anshuman Khandual
wrote:
>
> This defines and exports a platform specific custom vm_get_page_prot() via
> subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX
> macros can be dropped which are no longer needed.
&
nes Berg
, linuxppc-dev ,
"David S . Miller"
Errors-To: linuxppc-dev-bounces+archive=mail-archive@lists.ozlabs.org
Sender: "Linuxppc-dev"
For csky part.
Acked-by: Guo Ren
On Wed, May 25, 2022 at 7:45 AM Peter Xu wrote:
>
> I observed that for each of the s
On Thu, May 26, 2022 at 3:37 AM Heiko Stübner wrote:
>
> Am Mittwoch, 25. Mai 2022, 18:08:22 CEST schrieb Guo Ren:
> > Thx Heiko & Guenter,
> >
> > On Wed, May 25, 2022 at 7:10 PM Heiko Stübner wrote:
> > >
> > > Am Mittwoch, 25. Mai 2022, 12:57:30 C
Thx Heiko & Guenter,
On Wed, May 25, 2022 at 7:10 PM Heiko Stübner wrote:
>
> Am Mittwoch, 25. Mai 2022, 12:57:30 CEST schrieb Heiko Stübner:
> > Am Mittwoch, 25. Mai 2022, 00:06:46 CEST schrieb Guenter Roeck:
> > > On Wed, May 25, 2022 at 01:46:
On Wed, May 25, 2022 at 1:42 AM Guo Ren wrote:
>
> On Mon, May 23, 2022 at 1:45 PM Guenter Roeck wrote:
> >
> > On Tue, Mar 22, 2022 at 10:40:03PM +0800, guo...@kernel.org wrote:
> > > From: Guo Ren
> > >
> > > Adds initial skeletal COMPAT Kbuil
On Mon, May 23, 2022 at 1:45 PM Guenter Roeck wrote:
>
> On Tue, Mar 22, 2022 at 10:40:03PM +0800, guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Adds initial skeletal COMPAT Kbuild (Running 32bit U-mode on
> > 64bit S-mode) support.
> > - Setup kco
ed checks.
Signed-off-by: Tsukasa OI
Reviewed-by: Alistair Francis
Message-Id:
Signed-off-by: Alistair Francis
On Mon, May 23, 2022 at 1:45 PM Guenter Roeck wrote:
>
> On Tue, Mar 22, 2022 at 10:40:03PM +0800, guo...@kernel.org wrote:
> > From: Guo Ren
> >
>
On Fri, May 20, 2022 at 1:50 AM Palmer Dabbelt wrote:
>
> On Tue, 05 Apr 2022 00:12:54 PDT (-0700), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Currently, most 64-bit architectures (x86, parisc, powerpc, arm64,
> > s390, mips, sparc) have supported
g clean through all the
> autobuilders before making it look good, I think it didn't fail this
> time so I'll do a bit more refactoring. Shouldn't be too much longer at
> this point.
Cool, thank you. Hope it could be in v5.19.
>
> >
> >
> > On Tue, Apr 5, 2022 at 3:
r taking care of compat patch series.
On Tue, Apr 5, 2022 at 3:13 PM wrote:
>
> From: Guo Ren
>
> Currently, most 64-bit architectures (x86, parisc, powerpc, arm64,
> s390, mips, sparc) have supported COMPAT mode. But they all have
> history issues and can't use standard li
Hi Palmer,
On Tue, Apr 5, 2022 at 7:06 AM Palmer Dabbelt wrote:
>
> On Mon, 04 Apr 2022 07:28:50 PDT (-0700), guo...@kernel.org wrote:
> > On Sat, Apr 2, 2022 at 10:04 PM Guo Ren wrote:
> >>
> >> Hi Palmer,
> >>
> >> Sorry for the late reply, I s
On Sat, Apr 2, 2022 at 10:04 PM Guo Ren wrote:
>
> Hi Palmer,
>
> Sorry for the late reply, I still want COMPAT to catch up at 5.18..
> I've pushed it into my next branch, and it would get in linux-next the
> next day. You could have a look at that. The repo is:
> https://
for COMPAT, thank you very much.
On Sat, Apr 2, 2022 at 9:53 PM wrote:
>
> From: Guo Ren
>
> Currently, most 64-bit architectures (x86, parisc, powerpc, arm64,
> s390, mips, sparc) have supported COMPAT mode. But they all have
> history issues and can't use standard linux unis
On Sat, Apr 2, 2022 at 9:39 PM Masahiro Yamada wrote:
>
> On Sat, Apr 2, 2022 at 10:36 PM wrote:
> >
> > From: Guo Ren
> >
> > The existing per-arch definitions are pretty much historic cruft.
> > Move SYSVIPC_COMPAT into init/Kconfig.
> >
> > Si
'/home/guoren/source/kernel/build-arm64'
On Sat, Apr 2, 2022 at 8:53 PM Guo Ren wrote:
>
> On Wed, Mar 23, 2022 at 5:00 AM Palmer Dabbelt wrote:
> >
> > On Tue, 22 Mar 2022 07:39:43 PDT (-0700), guo...@kernel.org wrote:
> > > From: Guo Ren
> > >
> > &
On Wed, Mar 23, 2022 at 5:00 AM Palmer Dabbelt wrote:
>
> On Tue, 22 Mar 2022 07:39:43 PDT (-0700), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Currently, most 64-bit architectures (x86, parisc, powerpc, arm64,
> > s390, mips, sparc) have supported
Hi Palmer & Arnd,
Fixup fadvise64_64 arguments problem.
On Tue, Mar 22, 2022 at 10:41 PM wrote:
>
> From: Guo Ren
>
> Implement compat sys_call_table and some system call functions:
> truncate64, ftruncate64, fallocate, pread64, pwrite64,
> sync_file_range, readahead, f
16
#ifndef __ASSEMBLY__
On Wed, Mar 16, 2022 at 3:04 PM wrote:
>
> From: Guo Ren
>
> Make TASK_SIZE from const to dynamic detect TIF_32BIT flag
> function. Refer to arm64 to implement DEFAULT_MAP_WINDOW_64 for
> efi-stub.
>
> Limit 32-bit compatible process
On Sat, Mar 12, 2022 at 4:36 PM Arnd Bergmann wrote:
>
> On Sat, Mar 12, 2022 at 3:13 AM Guo Ren wrote:
> > On Fri, Mar 11, 2022 at 9:38 PM Ben Dooks wrote:
> > > On 11/03/2022 02:38, Guo Ren wrote:
> > > >> --- a/arch/riscv/kernel/process.c
> &
On Fri, Mar 11, 2022 at 9:38 PM Ben Dooks wrote:
>
> On 11/03/2022 02:38, Guo Ren wrote:
> > Hi Arnd,
> >
> > On Mon, Feb 28, 2022 at 12:30 AM wrote:
> >>
> >> From: Guo Ren
> >>
> >> If the current task is in COMPAT mode, set SR_U
Hi Arnd,
On Mon, Feb 28, 2022 at 12:30 AM wrote:
>
> From: Guo Ren
>
> If the current task is in COMPAT mode, set SR_UXL_32 in status for
> returning userspace. We need CONFIG _COMPAT to prevent compiling
> errors with rv32 defconfig.
>
> Signed-off-by: Guo Ren
> S
== EM_RISCV &&
+ hdr->e_ident[EI_CLASS] == ELFCLASS32;
}
static int __init compat_mode_detect(void)
On Mon, Feb 28, 2022 at 12:30 AM wrote:
>
> From: Guo Ren
>
> Implement necessary type and macro for compat elf. See the code
> comment for detail.
>
Acked-by: Guo Ren
On Mon, Feb 28, 2022 at 7:10 PM Anshuman Khandual
wrote:
>
> This defines and exports a platform specific custom vm_get_page_prot() via
> subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX
> macros can be dropped which are no longer needed.
&
On Mon, Feb 28, 2022 at 8:02 PM David Laight wrote:
>
> From: Guo Ren
> > Sent: 28 February 2022 11:52
> >
> > On Mon, Feb 28, 2022 at 2:40 PM David Laight
> > wrote:
> > >
> > > From: guo...@kernel.org
> > > > Sent: 27
;
So how do you think compat_loff_t could be defined with __aligned__(4)?
> marking the structure packed isn't needed.
> I believe compat_u64 and compat_s64 both have aligned(4).
> It is also wrong, consider:
>
> struct foo {
> char x;
> struct compat_flock64 fl64;
> };
>
> There should be 3 bytes of padding after 'x'.
> But you've removed it.
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1
> 1PT, UK
> Registration No: 1397386 (Wales)
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
On Fri, Feb 25, 2022 at 11:50 PM Arnd Bergmann wrote:
>
> On Fri, Feb 25, 2022 at 4:42 PM Guo Ren wrote:
> >
> > Hi Arnd & Palmer,
> >
> > Here is the new modified compat_vdso/Makefile, please have a look,
>
e/guoren/source/kernel/riscv-linux/arch/riscv/kernel/compat_vdso/gen_compat_vdso_offsets.sh
| LC_ALL=C sort > include/generated/compat_vdso-offsets.h
On Thu, Feb 24, 2022 at 6:13 PM Arnd Bergmann wrote:
>
> On Thu, Feb 24, 2022 at 9:54 AM wrote:
> >
> > From: Guo Ren
>
On Fri, Feb 25, 2022 at 1:57 AM Palmer Dabbelt wrote:
>
> On Thu, 24 Feb 2022 00:54:07 PST (-0800), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Reconstruct __setup_additional_pages() by appending vdso info
> > pointer argument to meet compat_vds
On Thu, Feb 24, 2022 at 5:38 PM Arnd Bergmann wrote:
>
> On Thu, Feb 24, 2022 at 9:54 AM wrote:
> >
> > From: Guo Ren
> >
> > Implement compat sys_call_table and some system call functions:
> > truncate64, ftruncate64, fallocate, pread64, pwrite64,
> >
On Wed, Feb 23, 2022 at 9:42 AM Palmer Dabbelt wrote:
>
> On Tue, 01 Feb 2022 07:05:41 PST (-0800), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Reconstruct __setup_additional_pages() by appending vdso info
> > pointer argument to meet compat_vds
51 30664-11
> Gothaer Platz 3, 37083 Göttingen, Germany
> Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
> Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
>
> emlix - smart embedded open source
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
On Wed, Feb 23, 2022 at 9:42 AM Palmer Dabbelt wrote:
>
> On Tue, 01 Feb 2022 07:05:41 PST (-0800), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Reconstruct __setup_additional_pages() by appending vdso info
> > pointer argument to meet compat_vds
On Wed, Feb 23, 2022 at 9:42 AM Palmer Dabbelt wrote:
>
> On Tue, 01 Feb 2022 07:05:40 PST (-0800), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > There is no vgettimeofday supported in rv32 that makes simple to
> > generate rv32 vdso code which only
On Wed, Feb 23, 2022 at 9:42 AM Palmer Dabbelt wrote:
>
> On Tue, 01 Feb 2022 07:05:37 PST (-0800), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > If the current task is in COMPAT mode, set SR_UXL_32 in status for
> > returning userspace. We need CONFI
On Wed, Feb 23, 2022 at 9:42 AM Palmer Dabbelt wrote:
>
> On Tue, 01 Feb 2022 07:05:33 PST (-0800), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Implement riscv asm/compat.h for struct compat_xxx,
> > is_compat_task, compat_user_regset, regset convert.
On Tue, Feb 1, 2022 at 11:06 PM wrote:
>
> From: Guo Ren
>
> Currently, most 64-bit architectures (x86, parisc, powerpc, arm64,
> s390, mips, sparc) have supported COMPAT mode. But they all have
> history issues and can't use standard linux unistd.h. RISC-V would
&
cted\n");
> > + }
>
> I don't think we need these printks here.
Okay
>
> Also this could be simplified to:
>
> compat_mode_supported = (csr_read(CSR_STATUS) & SR_UXL) == SR_UXL_32;
Okay
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
On Tue, Feb 1, 2022 at 11:07 PM wrote:
>
> From: Guo Ren
>
> Detect hardware COMPAT (32bit U-mode) capability in rv64. If not
> support COMPAT mode in hw, compat_elf_check_arch would return
> false by compat_binfmt_elf.c
>
> Signed-off-by: Guo Ren
> Signed-off-by: G
On Wed, Feb 2, 2022 at 12:11 AM Anup Patel wrote:
>
> On Tue, Feb 1, 2022 at 9:31 PM Paolo Bonzini wrote:
> >
> > On 2/1/22 16:44, Anup Patel wrote:
> > > +Paolo
> > >
> > > On Tue, Feb 1, 2022 at 8:38 PM wrote:
> > >>
> > >>
On Tue, Feb 1, 2022 at 7:48 PM Arnd Bergmann wrote:
>
> On Tue, Feb 1, 2022 at 11:26 AM Guo Ren wrote:
> >
> > Hi Arnd & Christoph,
> >
> > The UXL field controls the value of XLEN for U-mode, termed UXLEN,
> > which may differ from the
> > value
riscv_fill_hwcap();
}
On Tue, Feb 1, 2022 at 5:36 PM Arnd Bergmann wrote:
>
> On Tue, Feb 1, 2022 at 10:13 AM Guo Ren wrote:
> > On Tue, Feb 1, 2022 at 3:45 PM Christoph Hellwig wrote:
> > > On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote:
> > >
On Tue, Feb 1, 2022 at 3:45 PM Christoph Hellwig wrote:
>
> On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote:
> > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig
> > wrote:
> > >
> > > Given that most rv64 implementations can't run in rv32
On Tue, Feb 1, 2022 at 11:02 AM Guo Ren wrote:
>
> On Mon, Jan 31, 2022 at 2:49 PM Christoph Hellwig wrote:
> >
> > The F_GETLK64/F_SETLK64/F_SETLKW64 fcntl opcodes are only implemented
> > for the 32-bit syscall APIs, but are also needed for compat handli
neric/fcntl.h
> b/tools/include/uapi/asm-generic/fcntl.h
> index bf961a71802e0..6e16722026f39 100644
> --- a/tools/include/uapi/asm-generic/fcntl.h
> +++ b/tools/include/uapi/asm-generic/fcntl.h
> @@ -115,13 +115,11 @@
> #define F_GETSIG 11 /* for sockets. */
> #endif
>
> -#ifndef CONFIG_64BIT
> #ifndef F_GETLK64
> #define F_GETLK64 12 /* using 'struct flock64' */
> #define F_SETLK64 13
> #define F_SETLKW64 14
> #endif
> -#endif
>
> #ifndef F_SETOWN_EX
> #define F_SETOWN_EX15
> --
> 2.30.2
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
++ b/tools/include/uapi/asm-generic/fcntl.h
> @@ -202,7 +202,6 @@ struct flock {
> };
> #endif
>
> -#ifndef HAVE_ARCH_STRUCT_FLOCK64
> #ifndef __ARCH_FLOCK64_PAD
> #define __ARCH_FLOCK64_PAD
> #endif
> @@ -215,6 +214,5 @@ struct flock64 {
> __kernel_pid_t l_pid;
&
: Arnd Bergmann
>
> I think it would be best to merge this through the risc-v tree along
> with the coming compat support
> that depends on it.
Okay, I would include it in my next version series.
> Alternatively, I can put it into my asm-generic
> tree for 5.18.
>
> Arnd
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
On Mon, Jan 31, 2022 at 8:21 PM Christoph Hellwig wrote:
>
> On Sat, Jan 29, 2022 at 08:17:14PM +0800, guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > There are 7 64bit architectures that support Linux COMPAT mode to
> > run 32bit applications. A lo
most rv32 apps would meet different userspace
segment faults.
Current code would let the machine try the rv32 apps without detecting
whether hw support or not.
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
Acked-by: Guo Ren
On Mon, Jan 31, 2022 at 2:49 PM Christoph Hellwig wrote:
>
> The F_GETLK64/F_SETLK64/F_SETLKW64 fcntl opcodes are only implemented
> for the 32-bit syscall APIs, but are also needed for compat handling
> on 64-bit kernels.
>
> Consolidate them in unistd.h ins
ruct flock64 {
> @@ -212,7 +206,9 @@ struct flock64 {
> __kernel_loff_t l_start;
> __kernel_loff_t l_len;
> __kernel_pid_t l_pid;
> +#ifdef __ARCH_FLOCK64_PAD
> __ARCH_FLOCK64_PAD
> +#endif
> };
>
> #endif /* _ASM_GENERIC_FCNTL_H */
> --
> 2.30.2
>
Reviewed-by: Guo Ren
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
Reviewed-by: Guo Ren
On Mon, Jan 31, 2022 at 2:49 PM Christoph Hellwig wrote:
>
> Signed-off-by: Christoph Hellwig
> ---
> include/uapi/asm-generic/fcntl.h | 2 --
> tools/include/uapi/asm-generic/fcntl.h | 2 --
> 2 files changed, 4 deletions(-)
>
> diff
On Sun, Jan 30, 2022 at 7:32 PM Arnd Bergmann wrote:
>
> On Sun, Jan 30, 2022 at 6:54 AM Guo Ren wrote:
> > On Sun, Jan 30, 2022 at 6:41 AM Arnd Bergmann wrote:
> > >
> > > I would make these endian-specific, and reverse them on big-endian
> > >
On Sun, Jan 30, 2022 at 6:41 AM Arnd Bergmann wrote:
>
> > Implement compat sys_call_table and some system call functions:
> > truncate64, ftruncate64, fallocate, pread64, pwrite64,
> > sync_file_range, readahead, fadvise64_64 which need argument
> > translation.
>
he
> native (~0UL) definition.
Yes, native rv32 used ~0UL, although its task_size is only 2.4GB.
I would remove #define COMPAT_RLIM_INFINITY 0x7fff
>
> Arnd
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
On Thu, Jan 20, 2022 at 9:02 PM Arnd Bergmann wrote:
>
> On Thu, Jan 20, 2022 at 8:38 AM wrote:
> >
> > From: Guo Ren
> >
> > There are 7 64bit architectures that support Linux COMPAT mode to
> > run 32bit applications. A lot of definitions
On Fri, Jan 21, 2022 at 4:57 PM Arnd Bergmann wrote:
>
> On Fri, Jan 21, 2022 at 7:25 AM Guo Ren wrote:
> > On Thu, Jan 20, 2022 at 10:43 PM Arnd Bergmann wrote:
> > > On Thu, Jan 20, 2022 at 8:39 AM wrote:
>
> > > Are you sure these are the right calling conve
On Thu, Jan 20, 2022 at 6:31 PM Arnd Bergmann wrote:
>
> On Thu, Jan 20, 2022 at 8:39 AM wrote:
> >
> > From: Guo Ren
> >
> > Implement compat_setup_rt_frame for sigcontext save & restore. The
> > main process is the same with signal, but the rv32 pt_reg
remove those two lines. The rest looks good to
> me.
Yes, you are right. compat_mode_t should be unsigned int.
>
>Arnd
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
On Thu, Jan 20, 2022 at 6:32 PM Arnd Bergmann wrote:
>
> On Thu, Jan 20, 2022 at 8:39 AM wrote:
> >
> > From: Guo Ren
> >
> > Current riscv doesn't support the 32bit KVM/arm API. Let's make it
> > clear by not selecting KVM_COMPAT.
> >
> > Signe
t;
> The names clash with the custom versions defined for powerpc and sparc,
> but the duplicates look compatible if you can account for the padded
> argument and the lo/hi order of the pairs, so could just be removed here
> (all other architectures use custom function names instead).
I would try it later.
>
> Arnd
>
> [1] https://riscv.org/wp-content/uploads/2015/01/riscv-calling.pdf
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
that #ifdef, as the is_compat_task() definition is
> meant to drop the code at compile time, unless the SR_UXL_32
> definition is not visible here.
I almost put CONFIG_COMPAT in every compat related code, because I
hope the next arch that wants to support COMPAT could easily find
where to be
On Thu, Jan 20, 2022 at 9:33 PM Arnd Bergmann wrote:
>
> On Thu, Jan 20, 2022 at 8:39 AM wrote:
> > From: Guo Ren
> >
> > Implement necessary type and macro for compat elf. See the code
> > comment for detail.
> >
> > Signed-off-b
ther topic, let's give the initial compat
for 2GB support to riscv.
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1
> 1PT, UK
> Registration No: 1397386 (Wales)
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
s probably what we want here for compatibility reasons, but I think
> it should be explained in the changelog text, and I'd like Jeff or Bruce
> to comment on it as well: the alternative here would be to make the
> uapi definition depend on __BITS_PER_LONG==32, which is
__BITS_PER_LONG==32 || __KERNEL__ just for kernel use in compat.
> technically the right thing to do but more a of a change.
>
>Arnd
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
On Mon, Jan 10, 2022 at 9:35 PM Arnd Bergmann wrote:
>
> On Tue, Dec 28, 2021 at 3:39 PM wrote:
> >
> > From: Guo Ren
> >
> > Remove duplicate F_GETLK64,F_SETLK64,F_SETLKW64 definitions in
> > arch/*/include/asm/compat.h.
> >
> > Signed-off-by: G
On Mon, Jan 10, 2022 at 10:29 PM Arnd Bergmann wrote:
>
> On Tue, Dec 28, 2021 at 3:39 PM wrote:
> >
> > From: Guo Ren
> >
> > Implement necessary type and macro for compat elf. See the code
> > comment for detail.
> >
> > Signed-off-by: G
On Sun, Dec 26, 2021 at 12:26 AM Heiko Carstens wrote:
>
> On Sat, Dec 25, 2021 at 12:54:27PM +0800, guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > This macro isn't used in Linux sched, now. Delete in
> > include/linux/sched.h and arch's include/asm.
Got it. Thx
On Wed, Dec 22, 2021 at 3:27 PM Christophe Leroy
wrote:
>
>
>
> Le 22/12/2021 à 04:02, Guo Ren a écrit :
> > On Wed, Dec 22, 2021 at 2:43 AM Christophe Leroy
> > wrote:
> >>
> >>
> >>
> >> Le 21/12/2021 à 18:00, guo...@kern
On Wed, Dec 22, 2021 at 2:43 AM Christophe Leroy
wrote:
>
>
>
> Le 21/12/2021 à 18:00, guo...@kernel.org a écrit :
> > From: Guo Ren
> >
> > This macro isn't used in Linux sched, now. Delete in
> > include/linux/sched.h and arch's include/asm.
> >
>
Only for this patch, Acked-by: Guo Ren
On Thu, Oct 28, 2021 at 5:18 AM Dmitry Osipenko wrote:
>
> Kernel now supports chained power-off handlers. Use do_kernel_power_off()
> that invokes chained power-off handlers. It also invokes legacy
> pm_power_off() for now, which will be remo
On Mon, Apr 12, 2021 at 12:02 AM Guo Ren wrote:
>
> On Wed, Mar 31, 2021 at 10:32 PM wrote:
> >
> > From: Guo Ren
> >
> > This patch introduces a ticket lock implementation for riscv, along the
> > same lines as the implementation for arch/arm & a
On Wed, Mar 31, 2021 at 10:32 PM wrote:
>
> From: Guo Ren
>
> This patch introduces a ticket lock implementation for riscv, along the
> same lines as the implementation for arch/arm & arch/csky.
>
> We still use qspinlock as default.
>
> Signed-off-by: Guo Ren
&
On Wed, Mar 31, 2021 at 10:32 PM wrote:
>
> From: Guo Ren
>
> - Using smp_cond_load_acquire in arch_spin_lock by Peter's
>advice.
> - Using __smp_acquire_fence in arch_spin_trylock
> - Using smp_store_release in arch_spin_unlock
>
> All above are just coding c
On Wed, Mar 31, 2021 at 10:32 PM wrote:
>
> From: Guo Ren
>
> This patch introduces a ticket lock implementation for riscv, along the
> same lines as the implementation for arch/arm & arch/csky.
>
> We still use qspinlock as default.
>
> Signed-off-by: Guo Ren
&
On Sun, Mar 28, 2021 at 7:14 PM Christophe Leroy
wrote:
>
>
>
> Le 28/03/2021 à 08:30, guo...@kernel.org a écrit :
> > From: Guo Ren
> >
> > We don't have native hw xchg16 instruction, so let qspinlock
> > generic code to deal with it.
>
> We have lh
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/
On Sat, Mar 21, 2020 at 8:08 PM Thomas Gleixner wrote:
>
> Guo Ren writes:
>
> > Tested and Acked by me.
> >
> > Queued for next pull request, thx
>
> Can we please route that with the rcuwait changes to avoid breakage
> unless you ship it to Linus right away?
Ok, I won't queue it.
ruct percpu_rw_semaphore'
> | 1422 | struct percpu_rw_semaphore rw_sem[SB_FREEZE_LEVELS];
>
> once rcuwait.h includes linux/sched/signal.h.
>
> Remove the linux/mm.h include.
>
> Cc: Guo Ren
> Cc: linux-c...@vger.kernel.org
> Reported-by: kbuild test robot
> Signed-
csky:
Acked-by: Guo Ren
On Mon, Feb 17, 2020 at 1:04 PM Anshuman Khandual
wrote:
>
> Lets move vma_is_accessible() helper to include/linux/mm.h which makes it
> available for general use. While here, this replaces all remaining open
> encodings for VMA access check with vma_i
1 - 100 of 104 matches
Mail list logo