lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H6p44E8KuQZz31jX+Yd0qgvqGRaR2vfwdTZLBxg6bKeFQ@mail.gmail.com>
Date:   Sun, 4 Sep 2022 20:12:01 +0800
From:   Huacai Chen <chenhuacai@...nel.org>
To:     Yupeng Li <liyupeng@...los.com>
Cc:     WANG Xuerui <kernel@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        loongarch@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>,
        Caicai <caizp2008@....com>
Subject: Re: [PATCH 1/1] LoongArch: Fixed arch_remove_memory undefined build error.

Applied to loongarch-fixes, thanks.

Huacai

On Wed, Aug 31, 2022 at 1:49 PM Yupeng Li <liyupeng@...los.com> wrote:
>
> The kernel build error when unslected CONFIG_MEMORY_HOTREMOVE, the
> arch_remove_memory in mm/memory_hotplug.c was undefined.
> Removed CONFIG_MEMORY_HOTREMOVE requirement refer to the definitions
> of other platform architectures.Some build error messages like:
>
>  LD      vmlinux.o
>  MODPOST vmlinux.symvers
>  MODINFO modules.builtin.modinfo
>  GEN     modules.builtin
>  LD      .tmp_vmlinux.kallsyms1
> loongarch64-linux-gnu-ld: mm/memory_hotplug.o: in function `.L242':
> memory_hotplug.c:(.ref.text+0x930): undefined reference to `arch_remove_memory'
> make: *** [Makefile:1169:vmlinux] 错误 1
>
> Signed-off-by: Yupeng Li <liyupeng@...los.com>
> Signed-off-by: Caicai <caizp2008@....com>
> ---
>  arch/loongarch/mm/init.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
> index 7094a68c9b83..191ed8e47895 100644
> --- a/arch/loongarch/mm/init.c
> +++ b/arch/loongarch/mm/init.c
> @@ -142,7 +142,6 @@ int memory_add_physaddr_to_nid(u64 start)
>  EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
>  #endif
>
> -#ifdef CONFIG_MEMORY_HOTREMOVE
>  void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
>  {
>         unsigned long start_pfn = start >> PAGE_SHIFT;
> @@ -155,7 +154,6 @@ void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
>         __remove_pages(start_pfn, nr_pages, altmap);
>  }
>  #endif
> -#endif
>
>  /*
>   * Align swapper_pg_dir in to 64K, allows its address to be loaded
> --
> 2.34.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ