]> www.infradead.org Git - users/dwmw2/linux.git/commit
powerpc/iommu: Limit number of TCEs to 512 for H_STUFF_TCE hcall
authorGaurav Batra <gbatra@linux.vnet.ibm.com>
Thu, 25 May 2023 14:34:54 +0000 (09:34 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:48:18 +0000 (10:48 +0200)
commiteecd757d1931337f3e9e048e27fef7b45bb4967d
treeb3be72b0249be8bfe3f69bd9d6d90103aa3385cb
parentea42f1800b0773b04ab0b04433dd0f38aa6f4135
powerpc/iommu: Limit number of TCEs to 512 for H_STUFF_TCE hcall

commit 9d2ccf00bddc268045e3d65a8108d61ada0e4b4e upstream.

Currently in tce_freemulti_pSeriesLP() there is no limit on how many
TCEs are passed to the H_STUFF_TCE hcall. This has not caused an issue
until now, but newer firmware releases have started enforcing a limit of
512 TCEs per call.

The limit is correct per the specification (PAPR v2.12 ยง 14.5.4.2.3).

The code has been in it's current form since it was initially merged.

Cc: stable@vger.kernel.org
Signed-off-by: Gaurav Batra <gbatra@linux.vnet.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
[mpe: Tweak change log wording & add PAPR reference]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230525143454.56878-1-gbatra@linux.vnet.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/pseries/iommu.c