public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Zhang Jianhua <chris.zjh@huawei.com>
Cc: will@kernel.org, ardb@kernel.org, mark.rutland@arm.com,
	ryan.roberts@arm.com, anshuman.khandual@arm.com,
	joey.gouly@arm.com, thunder.leizhen@huawei.com, bhe@redhat.com,
	kristina.martsenko@arm.com, yajun.deng@linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next v4] arm64: fix build warning for ARM64_MEMSTART_SHIFT
Date: Fri, 4 Aug 2023 13:48:19 +0100	[thread overview]
Message-ID: <ZMzzkyc0M9y29yWw@arm.com> (raw)
In-Reply-To: <20230804075615.3334756-1-chris.zjh@huawei.com>

On Fri, Aug 04, 2023 at 03:56:15PM +0800, Zhang Jianhua wrote:
> When building with W=1, the following warning occurs.
> 
> arch/arm64/include/asm/kernel-pgtable.h:129:41: error: "PUD_SHIFT" is not defined, evaluates to 0 [-Werror=undef]
>   129 | #define ARM64_MEMSTART_SHIFT            PUD_SHIFT
>       |                                         ^~~~~~~~~
> arch/arm64/include/asm/kernel-pgtable.h:142:5: note: in expansion of macro ‘ARM64_MEMSTART_SHIFT’
>   142 | #if ARM64_MEMSTART_SHIFT < SECTION_SIZE_BITS
>       |     ^~~~~~~~~~~~~~~~~~~~
> 
> The generic PUD_SHIFT was defined in include/asm-generic/pgtable-nopud.h,
> however the #ifndef __ASSEMBLY__ guard in this header file makes it unavailable
> for assembly files. While someone .S file include the <asm/kernel-pgtable.h>,
> the build warning would occur. Now move the macro ARM64_MEMSTART_SHIFT and
> ARM64_MEMSTART_ALIGN to arch/arm64/mm/init.c where it is used only, to avoid
> this issue.
> 
> Signed-off-by: Zhang Jianhua <chris.zjh@huawei.com>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

  reply	other threads:[~2023-08-04 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  7:56 [PATCH -next v4] arm64: fix build warning for ARM64_MEMSTART_SHIFT Zhang Jianhua
2023-08-04 12:48 ` Catalin Marinas [this message]
2023-08-04 18:10 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZMzzkyc0M9y29yWw@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=bhe@redhat.com \
    --cc=chris.zjh@huawei.com \
    --cc=joey.gouly@arm.com \
    --cc=kristina.martsenko@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ryan.roberts@arm.com \
    --cc=thunder.leizhen@huawei.com \
    --cc=will@kernel.org \
    --cc=yajun.deng@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox