lkml.org 
[lkml]   [2022]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] iommu/arm-smmu-v3: fixed check process for disable_bypass module parameter
From
On 2022-08-03 00:42, Shuuichirou Ishii wrote:
> The current process does not enable the bypass setting regardless of
> the value of the disable_bypass module parameter when ACPI is enabled,
> so the value of the disable_bypass module parameter has been corrected
> so that it is handled correctly.
>
> Signed-off-by: Shuuichirou Ishii <ishii.shuuichir@fujitsu.com>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 88817a3376ef..256d7b2a83a7 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> @@ -3396,7 +3396,7 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu, bool bypass)
> enables &= ~(CR0_EVTQEN | CR0_PRIQEN);
>
> /* Enable the SMMU interface, or ensure bypass */
> - if (!bypass || disable_bypass) {
> + if (!bypass && disable_bypass) {

This change looks obviously wrong - if bypass is false here then we
definitely want to enable the SMMU, so disable_bypass is irrelevant. It
shouldn't even be possible to get here with bypass==true under ACPI,
since arm_smmu_device_acpi_probe() cannot fail :/

Robin.

> enables |= CR0_SMMUEN;
> } else {
> ret = arm_smmu_update_gbpa(smmu, 0, GBPA_ABORT);

\
 
 \ /
  Last update: 2022-08-03 11:26    [W:0.067 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site