From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED8C2C2BBD0 for ; Sat, 5 Sep 2020 20:05:06 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 947B02074D for ; Sat, 5 Sep 2020 20:05:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T5hzkFVJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 947B02074D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 212DE87630; Sat, 5 Sep 2020 20:05:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8z4fCc111wK3; Sat, 5 Sep 2020 20:05:02 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 8876E875F0; Sat, 5 Sep 2020 20:05:02 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7E932C07FF; Sat, 5 Sep 2020 20:05:02 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05D6EC0051 for ; Sat, 5 Sep 2020 20:05:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AA7A9258A5 for ; Sat, 5 Sep 2020 20:05:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZxpGwkEjYVQs for ; Sat, 5 Sep 2020 20:04:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by silver.osuosl.org (Postfix) with ESMTPS id E8774214E6 for ; Sat, 5 Sep 2020 20:04:55 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id m15so1567315pls.8 for ; Sat, 05 Sep 2020 13:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ExFb876Zpeyb1xoghNKq/lathY4dq7rmwE6M/oL73CQ=; b=T5hzkFVJ906JGMEGcKzWOIyfp4RZO093Wgyzbv3F8qEos8PoXpghOhJPYdnPqHOE9d tRckNjK7Lb9T4PX3poifyFY6PsJfV9V1wpOQU0QuU7QGgYtqx5ngy8bIyDV8kqeyFDPN tuPUvhIR5/DeC3c8Bf/y+BaLGA2Xdp7cxc882CDBXvGwbSAuogBqIWywBd1rO4/yt430 Orlwi/mIssTh3pd4sEgnH7r38fD35d9BJWnPaVrqMhRn0yhya+Ik+EZ57jsuQNkJgcX5 6pxJmO6E4AXXPMhS5xSij0iEciaP4yNv32wCwgnJsvmAWG7+wFC9u6/gAYEAMSGNJ7pN /t/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ExFb876Zpeyb1xoghNKq/lathY4dq7rmwE6M/oL73CQ=; b=fGWxDrjMfMtRQPzhamr97aw02X3+F4O/TO1kOknREFyS//GJii+Z/wgycVhvrcm2kD OxkwaxzY0tYBiKE+mxKQsdfJGsrOC0Wycqmwer+k+Q1AA875UuyAwn2/64ETNUBAzGo5 Q/vnFwO/1X/0tlFaeJtRpWd6+Yjdb7z5hTv1W8Z/6avusu5QxwsIKcyM1NYPfnCFyBAe 62LIZU2zFt0u5TMnHfvUUe5NtbtU7Kyln4LaGXDH1bQ/57R7QKh0qrIB2G/rxkoYK/Ni SJFyNVCc9lsjYamBaHQkNCaKCNLpKsKwJQzvkmK9r/9USvID1L74gYqCtm9zjG/MgBJS nXTA== X-Gm-Message-State: AOAM533uIOeLBxj8YWR2jFdYhCO3gMn8THebi1GKXsHFiaqYV5S+/VNV oc2HWjrsfjYcjk9KFyBV3+IjSNGCUtky2oNY X-Google-Smtp-Source: ABdhPJwrvjF9LVJOg5UrKaixKkZOaQCEUmOTh1VsmLMJvfbpixbh1oqxeYJIfz/zv4DDASl+uqUl8g== X-Received: by 2002:a17:902:8d82:: with SMTP id v2mr14095552plo.180.1599336295014; Sat, 05 Sep 2020 13:04:55 -0700 (PDT) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id y195sm10492742pfc.137.2020.09.05.13.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 13:04:53 -0700 (PDT) From: Rob Clark To: iommu@lists.linux-foundation.org, dri-devel@lists.freedesktop.org, Will Deacon , Robin Murphy , Joerg Roedel Subject: [PATCH v17 15/20] iommu/arm-smmu: Constify some helpers Date: Sat, 5 Sep 2020 13:04:21 -0700 Message-Id: <20200905200454.240929-16-robdclark@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200905200454.240929-1-robdclark@gmail.com> References: <20200905200454.240929-1-robdclark@gmail.com> MIME-Version: 1.0 Cc: Rob Clark , open list , linux-arm-msm@vger.kernel.org, Akhil P Oommen , Stephen Boyd , Sibi Sankar , Vivek Gautam , freedreno@lists.freedesktop.org, "moderated list:ARM SMMU DRIVERS" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" From: Rob Clark Sprinkle a few `const`s where helpers don't need write access. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm-smmu.h index 9aaacc906597..1a746476927c 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu.h +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h @@ -377,7 +377,7 @@ struct arm_smmu_master_cfg { s16 smendx[]; }; -static inline u32 arm_smmu_lpae_tcr(struct io_pgtable_cfg *cfg) +static inline u32 arm_smmu_lpae_tcr(const struct io_pgtable_cfg *cfg) { u32 tcr = FIELD_PREP(ARM_SMMU_TCR_TG0, cfg->arm_lpae_s1_cfg.tcr.tg) | FIELD_PREP(ARM_SMMU_TCR_SH0, cfg->arm_lpae_s1_cfg.tcr.sh) | @@ -398,13 +398,13 @@ static inline u32 arm_smmu_lpae_tcr(struct io_pgtable_cfg *cfg) return tcr; } -static inline u32 arm_smmu_lpae_tcr2(struct io_pgtable_cfg *cfg) +static inline u32 arm_smmu_lpae_tcr2(const struct io_pgtable_cfg *cfg) { return FIELD_PREP(ARM_SMMU_TCR2_PASIZE, cfg->arm_lpae_s1_cfg.tcr.ips) | FIELD_PREP(ARM_SMMU_TCR2_SEP, ARM_SMMU_TCR2_SEP_UPSTREAM); } -static inline u32 arm_smmu_lpae_vtcr(struct io_pgtable_cfg *cfg) +static inline u32 arm_smmu_lpae_vtcr(const struct io_pgtable_cfg *cfg) { return ARM_SMMU_VTCR_RES1 | FIELD_PREP(ARM_SMMU_VTCR_PS, cfg->arm_lpae_s2_cfg.vtcr.ps) | -- 2.26.2 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu