HomeFreeBSD

Workaround for Linux PowerPC GPL-only cpu_has_feature()

Description

Workaround for Linux PowerPC GPL-only cpu_has_feature()

Linux since 4.7 makes interface 'cpu_has_feature' to use jump labels on
powerpc if CONFIG_JUMP_LABEL_FEATURE_CHECKS is enabled, in this case
however the inline function references GPL-only symbol
'cpu_feature_keys'.

ZFS currently uses 'cpu_has_feature' either directly or indirectly from
several places; while it is unknown how this issue didn't break ZFS on
64-bit little-endian powerpc, it is known to break ZFS with many Linux
versions on both 32-bit and 64-bit big-endian powerpc.

Until this issue is fixed in Linux, we have to workaround it by
overriding affected inline functions without depending on
'cpu_feature_keys'.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: WHR <msl0000023508@gmail.com>
Closes #14590

Details

Provenance
Low-power <msl0000023508@gmail.com>Authored on Mar 10 2023, 5:35 PM
Tony Hutter <hutter2@llnl.gov>Committed on Jun 5 2023, 5:59 PM
Parents
rG3ad6c1692ff1: Linux: use filemap_range_has_page()
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG35d43ba8eada: Workaround for Linux PowerPC GPL-only cpu_has_feature() (authored by Low-power <msl0000023508@gmail.com>).Jun 5 2023, 5:59 PM