RE: ERROR: modpost: "__pt_no_sw_bit" [drivers/iommu/generic_pt/fmt/iommu_amdv1.ko] undefined!

From: Tian, Kevin

Date: Tue Jan 06 2026 - 03:36:52 EST


> From: lkp <lkp@xxxxxxxxx>
> Sent: Tuesday, December 23, 2025 7:25 AM
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
> head: b927546677c876e26eba308550207c2ddf812a43
> commit: efa03dab7ce4ed786b131f412440e2fd45fba11f iommupt: Flush the
> CPU cache after any writes to the page table
> date: 7 weeks ago
> config: powerpc64-randconfig-r051-20251223
> (https://download.01.org/0day-
> ci/archive/20251223/202512230720.9y9DtWIo-lkp@xxxxxxxxx/config)
> compiler: powerpc64-linux-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-
> ci/archive/20251223/202512230720.9y9DtWIo-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202512230720.9y9DtWIo-
> lkp@xxxxxxxxx/
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> >> ERROR: modpost: "__pt_no_sw_bit"
> [drivers/iommu/generic_pt/fmt/iommu_amdv1.ko] undefined!
>

Jason, are you deliberately leaving it undefined to catch config which shouldn't
compile generic_pt in, or is it indeed a bug?

seems on x86 pt_feature() is inline built so all the reference to __pt_no_sw_bit
is removed statically due to:

if (!PT_SUPPORTED_FEATURE(feature_nr))
return false;

but ppc64 builds pt_feature() as an external symbol then hitting trouble on
undefined __pt_no_sw_bit...

Thanks
Kevin