All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: James Morse <james.morse@arm.com>
Cc: linux-arch@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
	Will Deacon <will.deacon@arm.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] asm-generic/pgtable-nop?d.h: define folded with a value for use in C
Date: Thu, 4 Oct 2018 10:45:00 +0100	[thread overview]
Message-ID: <20181004094500.GA108096@arrakis.emea.arm.com> (raw)
In-Reply-To: <20181003175052.31917-1-james.morse@arm.com>

On Wed, Oct 03, 2018 at 06:50:52PM +0100, James Morse wrote:
> It turns out "if (__is_defined(__PAGETABLE_PMD_FOLDED))" isn't equivalent
> to "#ifdef __PAGETABLE_PMD_FOLDED". (who knew!)
> 
> kconfig.h's __is_defined() expects a define of the form
> "#define CONFIG_BOOGER 1". But these nop?d headers just have
> "#define __PAGETABLE_PMD_FOLDED".

I wonder why we're using __is_defined() at all on arm64. It looks like
some internal kconfig.h helper for IS_ENABLED() etc. Even if it looks
nicer, I'd rather go for an #ifdef in the arm64 set_pmd() code.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: James Morse <james.morse@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH] asm-generic/pgtable-nop?d.h: define folded with a value for use in C
Date: Thu, 4 Oct 2018 10:45:00 +0100	[thread overview]
Message-ID: <20181004094500.GA108096@arrakis.emea.arm.com> (raw)
Message-ID: <20181004094500.IOH9_AGbVfXiwCeJdhoqbcqSNUuYYRsa_WnkfPbEFyw@z> (raw)
In-Reply-To: <20181003175052.31917-1-james.morse@arm.com>

On Wed, Oct 03, 2018 at 06:50:52PM +0100, James Morse wrote:
> It turns out "if (__is_defined(__PAGETABLE_PMD_FOLDED))" isn't equivalent
> to "#ifdef __PAGETABLE_PMD_FOLDED". (who knew!)
> 
> kconfig.h's __is_defined() expects a define of the form
> "#define CONFIG_BOOGER 1". But these nop?d headers just have
> "#define __PAGETABLE_PMD_FOLDED".

I wonder why we're using __is_defined() at all on arm64. It looks like
some internal kconfig.h helper for IS_ENABLED() etc. Even if it looks
nicer, I'd rather go for an #ifdef in the arm64 set_pmd() code.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] asm-generic/pgtable-nop?d.h: define folded with a value for use in C
Date: Thu, 4 Oct 2018 10:45:00 +0100	[thread overview]
Message-ID: <20181004094500.GA108096@arrakis.emea.arm.com> (raw)
In-Reply-To: <20181003175052.31917-1-james.morse@arm.com>

On Wed, Oct 03, 2018 at 06:50:52PM +0100, James Morse wrote:
> It turns out "if (__is_defined(__PAGETABLE_PMD_FOLDED))" isn't equivalent
> to "#ifdef __PAGETABLE_PMD_FOLDED". (who knew!)
> 
> kconfig.h's __is_defined() expects a define of the form
> "#define CONFIG_BOOGER 1". But these nop?d headers just have
> "#define __PAGETABLE_PMD_FOLDED".

I wonder why we're using __is_defined() at all on arm64. It looks like
some internal kconfig.h helper for IS_ENABLED() etc. Even if it looks
nicer, I'd rather go for an #ifdef in the arm64 set_pmd() code.

-- 
Catalin

  reply	other threads:[~2018-10-04  9:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 17:50 [PATCH] asm-generic/pgtable-nop?d.h: define folded with a value for use in C James Morse
2018-10-03 17:50 ` James Morse
2018-10-03 17:50 ` James Morse
2018-10-04  9:45 ` Catalin Marinas [this message]
2018-10-04  9:45   ` Catalin Marinas
2018-10-04  9:45   ` Catalin Marinas
2018-10-05 11:02   ` Mark Rutland
2018-10-05 11:02     ` Mark Rutland
2018-10-05 11:02     ` Mark Rutland

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=20181004094500.GA108096@arrakis.emea.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=arnd@arndb.de \
    --cc=james.morse@arm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.