Re: [PATCH 02/13] csky: move setup_initrd() to setup.c

2025-03-09 Thread Guo Ren
Move setup_initrd from mem_init into memblock_init, that LGTM. Acked by: Guo Ren (csky) On Fri, Mar 7, 2025 at 2:52 AM Mike Rapoport wrote: > > From: "Mike Rapoport (Microsoft)" > > Memory used by initrd should be reserved as soon as possible before > there any memblo

Re: [PATCH 3/4] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-02-26 Thread Guo Ren
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 > @@

Re: [PATCH 4/5] kbuild: unify vdso_install rules

2023-10-11 Thread Guo Ren
On Wed, Oct 11, 2023 at 8:53 PM Masahiro Yamada wrote: > > On Wed, Oct 11, 2023 at 11:24 AM Guo Ren wrote: > > > > On Mon, Oct 9, 2023 at 8:42 PM Masahiro Yamada wrote: > > > > --- a/arch/riscv/Makefile > > > +++ b/arch/riscv/Makefile > > > @@ -13

Re: [PATCH 4/5] kbuild: unify vdso_install rules

2023-10-10 Thread Guo Ren
; -endef > - > -vdso_img_insttargets := $(vdso_img_sodbg:%.dbg=install_%) > - > -$(MODLIB)/vdso: FORCE > - @mkdir -p $(MODLIB)/vdso > - > -$(vdso_img_insttargets): install_%: $(obj)/%.dbg $(MODLIB)/vdso > - $(call cmd,vdso_install) > - > -PHONY += vdso_install $(vdso_img_insttargets) > -vdso_install: $(vdso_img_insttargets) > - > clean-files := vdso32.so vdso32.so.dbg vdso64* vdso-image-*.c vdsox32.so* > diff --git a/scripts/Makefile.vdsoinst b/scripts/Makefile.vdsoinst > new file mode 100644 > index ..1022d9fdd976 > --- /dev/null > +++ b/scripts/Makefile.vdsoinst > @@ -0,0 +1,45 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +# == > +# Install unstripped copies of vDSO > +# == > + > +PHONY := __default > +__default: > + @: > + > +include $(srctree)/scripts/Kbuild.include > + > +install-dir := $(MODLIB)/vdso > + > +define gen_install_rules > + > +src := $$(firstword $$(subst :,$(space),$(1))) > +dest := $(install-dir)/$$(or $$(word 2,$$(subst > :,$(space),$(1))),$$(patsubst %.dbg,%,$$(notdir $(1 > + > +__default: $$(dest) > +$$(dest): $$(src) FORCE > + $$(call cmd,install) > + > +# Some architectures create .build-id symlinks > +ifneq ($(filter arm sparc x86, $(SRCARCH)),) > +link := $(install-dir)/.build-id/$$(shell $(READELF) -n $$(src) | sed -n > 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p') > + > +__default: $$(link) > +$$(link): $$(dest) FORCE > + $$(call cmd,symlink) > +endif > + > +endef > + > +$(foreach x, $(sort $(INSTALL_FILES)), $(eval $(call > gen_install_rules,$(x > + > +quiet_cmd_install = INSTALL $@ > + cmd_install = mkdir -p $(dir $@); cp $< $@ > + > +quiet_cmd_symlink = SYMLINK $@ > + cmd_symlink = mkdir -p $(dir $@); ln -sf --relative $< $@ > + > +PHONY += FORCE > +FORCE: > + > +.PHONY: $(PHONY) > -- > 2.39.2 > -- Best Regards Guo Ren ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 1/5] csky: remove unused cmd_vdso_install

2023-10-09 Thread Guo Ren
On Mon, Oct 9, 2023 at 8:42 PM Masahiro Yamada wrote: > > You cannot run this code because arch/csky/Makefile does not define the > vdso_install target. > > It appears that this code was blindly copied from another architecture. Yes, I do that. Thx for pointing it out. Ac

Re: [PATCH v3 22/34] csky: Convert __pte_free_tlb() to use ptdescs

2023-05-31 Thread Guo Ren
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 ++--

Re: [PATCH 3/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-26 Thread 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:

Re: [PATCH] mm: remove kern_addr_valid() completely

2022-10-18 Thread Guo Ren
_addr_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 ar

Re: [PATCH v2 07/44] cpuidle,psci: Push RCU-idle into driver

2022-10-07 Thread Guo Ren
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/

Re: [PATCH v2 21/44] arch/idle: Change arch_cpu_idle() IRQ behaviour

2022-09-20 Thread Guo Ren
id noinstr arch_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_STO

Re: [PATCH] kernel: exit: cleanup release_thread()

2022-08-18 Thread Guo Ren
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

Re: [PATCH V4 17/26] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-24 Thread Guo Ren
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

Re: [PATCH v3] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-26 Thread Guo Ren
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 shared file-backed page faults, we're very > likely to retry one more time for the 1st write fault upon no page. It's > because we'll need to rele