From patchwork Fri Jan 13 10:50:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 43163 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp201330wrt; Fri, 13 Jan 2023 02:55:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXt/l6LJAEPSt0DWM3pmGG0Ng32hGqg0e//+cEVP9aPhmRgUxFVArGwUiMHfR+EC8gAfL8cs X-Received: by 2002:a05:6a21:3a89:b0:b6:5687:17c3 with SMTP id zv9-20020a056a213a8900b000b6568717c3mr8641028pzb.49.1673607340781; Fri, 13 Jan 2023 02:55:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673607340; cv=none; d=google.com; s=arc-20160816; b=FtQ8Rgh7pdx+x52pGl3w6CgtZrzEc4hGsF/gEk9OZFwUsFSqrJhf1KELH8HCSzE0AX S24FsYOfTE6KCUz+3afGnkGxaWPOOI8l17VVmlHx4oN8A/xGtZyr4rk8TNFGlcIhY2Gq IT7pCFt37hW/6nzAmTgxCHJWrI6dU/IUkIpVYMEANqg0UgxFE0L73T0c/g+Fjqbanuy7 RFGxVeWmKitMUqL98914LKRpjigXahA+Me5mI8LuoKqcFGiPKQ9bu7e/Zc76C9DP8z+1 cFXSO3at8hQo7HMN96ZKU7KZ1x6bbj7Jo6CT+bHJYWg56PzZtusM5pdIB6BcnCFDmA1w PU2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IZS0Y6FGfl2PtqwaLtihE2WQpPjEE0gk1qynzbUfVoc=; b=A8sg2jA6Z0H3TiC6DPdiSPlMGQ3P9pN3WPIIE/tzecSos2zgPULpf3J6UmzAzCXUkZ VjbF6KN8q+aKPg6tMdW/DCKo9j0gCeem24PuVMXBDoS8RZurY234IwxosFtUGuQcmQFU uJ2qjWj+EwrK738kE2PDdzpIOeCQA87VRJmcZnS0z1zH1XzlvAj2NuUmm0G0w7BUatDk WnGpNZzG1088H0tfrszCzA2umDesUNV4Zc55Cz3LJFkOvLXuu/Na+MlcWqX4y0/nmdAB 1IrDR30YNjlsFuT4oPF25m8FBHW6pB9ZMRK7SWx9z8wpZmaPGJO3XttoH2maeaFK2a87 wlNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=lm1OI8Zm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a63ff42000000b0047776c01d71si20295542pgk.375.2023.01.13.02.55.26; Fri, 13 Jan 2023 02:55:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=lm1OI8Zm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbjAMKyu (ORCPT + 99 others); Fri, 13 Jan 2023 05:54:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbjAMKx1 (ORCPT ); Fri, 13 Jan 2023 05:53:27 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4A977AF4; Fri, 13 Jan 2023 02:51:51 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 578D44206F; Fri, 13 Jan 2023 10:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1673607110; bh=XN7W4wHaV4CYylxXNUod7fpaKbnCRKcr/LnEs1SZri8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lm1OI8ZmxoHebhJKLPlRDpInHCgUpIecT+3XN2nnu+fLs+th+5YQYk9IqXLrQdImt K0fOEhs0+OpDPLNaB0AjR/iMUL2GYphZ6BY5NQt8gWnza+U7iOaCA/QMufkefDwgkV CCjpMh8GUSJhKBWwpkD56lcslFmfDjyyeasxUEBpqfKnAin/8boa4Y5kPGdN5OTZJy 7bAmCAz4hO3eFWLZmAcvlp37pw65DlnDQcUcAh13Quc+Me2ojJhVKwW/acErloBMlS DrEuMagqhKOCtaOl1oc8+EWkUrjeSbyZhxcBPlh1zC6icxZSj+pAYlXtpffMV/lg0D H/9ywWdQHcTiA== From: Hector Martin To: Joerg Roedel , Will Deacon , Robin Murphy Cc: Sven Peter , Alyssa Rosenzweig , Janne Grunau , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, iommu@lists.linux.dev, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hector Martin Subject: [PATCH 5/7] iommu: dart: Fix DART_PARAMS1/2 bit define names Date: Fri, 13 Jan 2023 19:50:28 +0900 Message-Id: <20230113105029.26654-6-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230113105029.26654-1-marcan@marcan.st> References: <20230113105029.26654-1-marcan@marcan.st> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754904490998137615?= X-GMAIL-MSGID: =?utf-8?q?1754904490998137615?= They didn't have the PARAMS reg index in them, but they should. Reviewed-by: Sven Peter Signed-off-by: Hector Martin --- drivers/iommu/apple-dart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index 82b2581d909c..89be055a44be 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -40,10 +40,10 @@ #define DART_PARAMS1 0x00 -#define DART_PARAMS_PAGE_SHIFT GENMASK(27, 24) +#define DART_PARAMS1_PAGE_SHIFT GENMASK(27, 24) #define DART_PARAMS2 0x04 -#define DART_PARAMS_BYPASS_SUPPORT BIT(0) +#define DART_PARAMS2_BYPASS_SUPPORT BIT(0) #define DART_STREAM_COMMAND 0x20 #define DART_STREAM_COMMAND_BUSY BIT(2) @@ -893,8 +893,8 @@ static int apple_dart_probe(struct platform_device *pdev) dart_params[0] = readl(dart->regs + DART_PARAMS1); dart_params[1] = readl(dart->regs + DART_PARAMS2); - dart->pgsize = 1 << FIELD_GET(DART_PARAMS_PAGE_SHIFT, dart_params[0]); - dart->supports_bypass = dart_params[1] & DART_PARAMS_BYPASS_SUPPORT; + dart->pgsize = 1 << FIELD_GET(DART_PARAMS1_PAGE_SHIFT, dart_params[0]); + dart->supports_bypass = dart_params[1] & DART_PARAMS2_BYPASS_SUPPORT; dart->num_streams = dart->hw->max_sid_count;