[PATCH -next v21 20/27] riscv: hwcap: change ELF_HWCAP to a function

Rémi Denis-Courmont remi at remlab.net
Mon Jun 12 07:36:32 PDT 2023


Le maanantaina 5. kesäkuuta 2023, 19.24.53 EEST Conor Dooley a écrit :
> On Mon, Jun 05, 2023 at 11:07:17AM +0000, Andy Chiu wrote:
> > Using a function is flexible to represent ELF_HWCAP. So the kernel may
> > encode hwcap reflecting supported hardware features just at the moment of
> > the start of each program.
> > 
> > This will be helpful when we introduce prctl/sysctl interface to control
> > per-process availability of Vector extension in following patches.
> > Programs started with V disabled should see V masked off in theirs
> > ELF_HWCAP.
> 
> For the uninformed, like myself, this needs to be a function, rather
> than open coding the masking of the V bit at the one user of ELF_HWCAP
> this series adds, because the binfmt stuff needs to get the value in
> create_elf_fdpic_tables() & co?

No, this is to deal with existing userspace that expects vectors to "just 
work" when the V bit is set (e.g. FFmpeg 6.0).

-- 
レミ・デニ-クールモン
http://www.remlab.net/






More information about the linux-riscv mailing list