All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Kees Cook <keescook@chromium.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Szabolcs Nagy <szabolcs.nagy@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/4] arm64/cpufeature: Store elf_hwcaps as an array rather than unsigned long
Date: Tue, 28 Jun 2022 16:06:34 +0100	[thread overview]
Message-ID: <YrsY+t/TIeBIDonh@sirena.org.uk> (raw)
In-Reply-To: <20220628142124.GB24116@willie-the-truck>


[-- Attachment #1.1: Type: text/plain, Size: 1392 bytes --]

On Tue, Jun 28, 2022 at 03:21:25PM +0100, Will Deacon wrote:
> On Mon, Jun 20, 2022 at 01:54:48PM +0100, Mark Brown wrote:

> I would like to see an Ack on this series from the libc side (i.e.
> Szabolcs) before we extend the ABI. Have any other architectures used

Me too.

> HWCAP3?

No, hence needing to add it.

> > +/* Note that bits 62 and 63 of each AT_HWCAP are reserved */

> Can you expand a bit on this comment, please? It's not clear who has
> reserved those bits (e.g. kernel or userspace) and why having two bit
> reserved means we are limited to 32 instead of 62 bits.

It's also not clear to me why they're reserved, I didn't manage to dig
far enough into the history to figure that out - I believe it's a glibc
thing, or at least something glibc now expects.  Indeed I can't
immediately dig up the specific reference now.  Szabolcs?  

> >  /* Kernel representation of AT_HWCAP and AT_HWCAP2 */
> > -static unsigned long elf_hwcap __read_mostly;
> > +static unsigned long elf_hwcap[MAX_CPU_FEATURES / CPU_FEATURES_PER_HWCAP] __read_mostly;

> I can't help but think this would be neater as an explicit bitmap
> (i.e. DECLARE_BITMAP).

IIRC my thinking there was that the need to chop the bitmap up into
chunks that aren't word sized that made me not use that - the code to
read and write is a lot simpler if hwcapN is a single array element.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-28 15:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 12:54 [PATCH v2 0/4] arm64: Add AT_HWCAP3 Mark Brown
2022-06-20 12:54 ` [PATCH v2 1/4] arm64/cpufeature: Store elf_hwcaps as an array rather than unsigned long Mark Brown
2022-06-28 14:21   ` Will Deacon
2022-06-28 15:06     ` Mark Brown [this message]
2022-06-29 10:01       ` Szabolcs Nagy
2022-06-29 11:44         ` Mark Brown
2022-06-29 12:06           ` Szabolcs Nagy
2022-06-29 13:55         ` Catalin Marinas
2022-06-29 15:07           ` Mark Brown
2022-06-20 12:54 ` [PATCH v2 2/4] elf: Allow architectures to provide AT_HWCAP3 Mark Brown
2022-06-20 12:54 ` [PATCH v2 3/4] arm64/cpufeature: Support AT_HWCAP3 Mark Brown
2022-06-20 12:54 ` [PATCH v2 4/4] arm64/hwcap: Support FEAT_EBF16 Mark Brown
2022-07-05 17:53 ` [PATCH v2 0/4] arm64: Add AT_HWCAP3 Mark Brown
2022-07-06  9:02   ` Szabolcs Nagy
2022-07-06 10:08   ` Marc Zyngier
2022-07-06 13:48     ` Mark Brown

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=YrsY+t/TIeBIDonh@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=suzuki.poulose@arm.com \
    --cc=szabolcs.nagy@arm.com \
    --cc=will@kernel.org \
    /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.