From patchwork Wed Jan 4 11:00:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 38867 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5082788wrt; Wed, 4 Jan 2023 03:04:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXtSM6s3GZnkpOw/VS0qySsefO4qtAvbf0QtJeA08RRnmTfS1UXoDCvR9Cj5rq/Qjr98RpaT X-Received: by 2002:a17:906:1c4e:b0:7c1:1c6:faea with SMTP id l14-20020a1709061c4e00b007c101c6faeamr54102568ejg.75.1672830264723; Wed, 04 Jan 2023 03:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672830264; cv=none; d=google.com; s=arc-20160816; b=wOntKqML3pRBBVe5XYZnjFEqRBeKRxEZIABbd4TISGUHIPDK8jw7888mfTA91+sYrm jyCtM9PI1spe/iHnRRS9Bnncrtu4RyhY33dak1YbIoCnmakeHChqtZSAV1/NVWt4fQ0R YhjyLRt6LSkwIi1F49pZRjPIOkTRXHkXglOZNZowPPy9inYWpnTzuO7KIPnWjW6F4Vhr WOO/UYswLG/BgPNEvD2/+mzR9egHVq2zjdC991jQG1CcreogjtbatCkxsj2b5Id1IvpP eg8EBvlHfz5eT7HyxIJJK34M92Bt7hemdY4u0tDne5BnEa1nyiZpgox43NiexJj4cePG YPDA== 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=uAIRgFCmIR/swVPviAjpTh/7hapbiAxyGUHWFrdu/wo=; b=du++FapG6D9VC4RAKLMsGn8Z73RjVMwmHz3bwNv169tma+5xKrtPIKCRlgPebIxCGf hRnkDKe5fhMkdsZe7jVdaIfW0iwnYl0n0j93Fhd0Ccbi2nJjQWFXA/9ImIru6+8cxbzR arWbS0D266JuTk2LNuRZASRxT6+aJM+hHFAGSuggVK4nVN+w6MYBZQ74f4iIHAuuOaQK jZj5LrprOuRvXxS4BoMpvUptvq31AXlIgbHTWuXgdFnZZ3Um+yJ7TDj9fWGxjU2eZUPT b+jQ1FTogQOPHcw28tTiGP+KTmF5nTYM85F40QWAuKJwUb/dwulHHicO8tnQ8r2hpdvp dRBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b="xbUI3R/q"; 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 xe11-20020a170907318b00b007c122a58805si29910229ejb.727.2023.01.04.03.04.01; Wed, 04 Jan 2023 03:04:24 -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="xbUI3R/q"; 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 S234676AbjADLC6 (ORCPT + 99 others); Wed, 4 Jan 2023 06:02:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239115AbjADLCV (ORCPT ); Wed, 4 Jan 2023 06:02:21 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00E2B18E36; Wed, 4 Jan 2023 03:02:04 -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 DC01341DF4; Wed, 4 Jan 2023 11:01:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1672830123; bh=6O6u/DiwF8q7P6Yv/PpHELUbZYJkapFUTj1HP8/Sg6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=xbUI3R/qFHwBvDCZsyCio7NVckEz+1/4EhgmDZkgYjeU6h2mgnP/V9akZ7+uJxjBA BS0694famCGv6qB8Yy5449gpx8Ij5lnifJVPJmJlHJARuXbw3oAw6myUiQ+lvCJDgZ MsE3dj4wzOJolPr18opaUPXj6cyXVIiYbrGQs+Whl7MP7abQhqvkuVlHgqdGxZCf5L o5eZb8rTSzoqRz6S2rSp5oZ09I6ex3Pxcc/DL9eyh/gLvm5jKXNj2qZw8FMW6diWrK KPxjtLx519xsTQ8mOTfcE2dzfwXrFKGEdKS1P+m39DJCRlJxuknw4bWlTdpA/tRsOX sClceEQUxXmrA== 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: Wed, 4 Jan 2023 20:00:11 +0900 Message-Id: <20230104110013.24738-6-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230104110013.24738-1-marcan@marcan.st> References: <20230104110013.24738-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?1754089667463139693?= X-GMAIL-MSGID: =?utf-8?q?1754089667463139693?= They didn't have the PARAMS reg index in them, but they should. Signed-off-by: Hector Martin Reviewed-by: Sven Peter --- 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 189487c1d978..03a3cb5638ba 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;