Message ID | 20240219111601.96405-11-baolu.lu@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-71195-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1337940dyc; Mon, 19 Feb 2024 07:02:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVxJwTodEDYyC3zYllSRxeWrj0tzP208u1eIybGroNVb80MLpi3kPD1aFqaPzdVAaK3eTyzHNV9kYa8Op4gxWu/NzNEQg== X-Google-Smtp-Source: AGHT+IEkOTSSLa1Ab1vBBdQfjzU+aeHKeuxIIEfel+5GyT+BmQOFv/Y3lI44ypheKv+YwhEtxSTc X-Received: by 2002:a17:906:abc9:b0:a3c:a770:748 with SMTP id kq9-20020a170906abc900b00a3ca7700748mr9690984ejb.58.1708354923851; Mon, 19 Feb 2024 07:02:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708354923; cv=pass; d=google.com; s=arc-20160816; b=rOrhGFyR46Nca9X8vp2pOMhXYvgzdwaGIFRHeAF2tUFxvzu18Gq/5XaIAQ+TA1M6QN 8Mkr9CM+A4kqRz5nQqtEWbBqRGARbI7eFE0z9RPLymC4pjq7KIpYFVnlpF1tj2Pie83Y I6rKaK/KaqHbeGYEH59OJamxjoPju1g1iMIgu4it3OiLuyDGIdY4F4m2ceBaQ5txc/Zg UZgE6RhW644LQu3cyJWqtd+OTF0Da1yexXTZ50s1CwsphJ0TEHBuPYherEPe0uLCCNPI bQoymlMdlMWomf83xayBpe12U2ouENduNJ9IF/eGOkXjdM758tKanfwm2ZoPB0nOSX3H jzxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=w8M34L7wyti/wp5kMtwa9WC/3cabRsJvt4mcFv4VoiA=; fh=xIXrYyuim0+qQ0OPX7PXG3ceqpJb0Om6wEk3bRGARVs=; b=SF4VIZDmbLVVZd6ILL9U2PR+1kH+mh2rrc9BojM4ck9rY2T/Lw7ctj5nbNysnXwvrk 4gkSn48PHlR2ZIvTHgSJltaUqPvwSUWUyE0HBxXdsicPb/1YEyES8Ttocse796KPJXdk MHAvA7/m//n+Z0AF/g4FxzNTcEOm6oCaKiGOg0buDJMSdh6KdSjMTJyWCeYvi7xDR4YF NPpYAuz/he7sRprZGTzQd6gpb67rhBdHToUd3LapzUquoml7cCxNJw5gFj0v3cCHEIWP MONMyzXZHHJ5r6iKAgEhlxmrw7xvQ0jmjixxRMnA+SVx2NjLc2R+g4c7GUGDaSQ1vGmR pdtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q9rUbu3l; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71195-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71195-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hr12-20020a1709073f8c00b00a3e9fec0241si836359ejc.848.2024.02.19.07.02.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 07:02:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71195-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q9rUbu3l; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71195-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71195-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3CB591F23FAB for <ouuuleilei@gmail.com>; Mon, 19 Feb 2024 11:24:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6661633CC7; Mon, 19 Feb 2024 11:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Q9rUbu3l" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BEFB3306B for <linux-kernel@vger.kernel.org>; Mon, 19 Feb 2024 11:22:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708341736; cv=none; b=qtVIT0LTQB9WHd0k2e5S7LUGluQK/DmKr7X3XzfGFfuhoe9OyBmbrYhU8uBJeUr5Y+TnO9C0zyaohq0DcAryKOlYsu3xWS9Hzkv4TJslVKJ/1Cjrj+CNa0G3+ytcQOBTSfV1HQz1Nh1VX4aoOdpRyXDJ9CA4qT+9CjhsWH/QZzA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708341736; c=relaxed/simple; bh=fCI8ry2QwMgfpyT/VHftog8+K3+UurzhRMpjSws+ROQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oAgKo7yPd9pmWqs8kPY/V5/hm2AyB3x9hN/2zqpqb+tgrGwYA38fkzaZyvp+5GPnmOtBRVmqnzB+oMKmFeH0jJ7GNjbTxDaltp2pV3PVf53cp7pU7m3x4jyL7cV9cqb+VqmLt5kCMR7MWN9DcB4deqnpIJUAGln6FPzu5kemoZQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Q9rUbu3l; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708341736; x=1739877736; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fCI8ry2QwMgfpyT/VHftog8+K3+UurzhRMpjSws+ROQ=; b=Q9rUbu3lKPUu0eElfh1wn1CmDlNipsWIkyeJe8yH204Y6lcOZbcR8Bn9 wS3SbaZ5/JkuZEeyUkaBHiRtUzStRuEEhoZw90O2+/T1WtBY8oISp9Y3F Ky68iGUfEUaJnPCAmVnTi3v0Xi81xC4PS7N0q0s7Joef+0FndxVFAEcf/ Y/OqJJCDTuoNuHskNHkN7JAmODSffOqNLB8c6O8mxCaj8u5OQrOYOTT2I Ac/rAulWhgNIo4pM4u2Z7mMdwjQv2csDPbxBpj6g4OSbRD//r8/7EvA8o f01UnuzGSlXimKTI+nfpi7y3nbiIxbFofERcF2M1KjEEMhksuQdWnp8J9 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="13823413" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="13823413" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 03:22:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="4826892" Received: from allen-box.sh.intel.com ([10.239.159.127]) by orviesa006.jf.intel.com with ESMTP; 19 Feb 2024 03:22:13 -0800 From: Lu Baolu <baolu.lu@linux.intel.com> To: Joerg Roedel <joro@8bytes.org> Cc: Yi Liu <yi.l.liu@intel.com>, Arnd Bergmann <arnd@arndb.de>, Kevin Tian <kevin.tian@intel.com>, Joao Martins <joao.m.martins@oracle.com>, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 10/10] iommu/vt-d: Fix constant-out-of-range warning Date: Mon, 19 Feb 2024 19:16:01 +0800 Message-Id: <20240219111601.96405-11-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240219111601.96405-1-baolu.lu@linux.intel.com> References: <20240219111601.96405-1-baolu.lu@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791339972391832148 X-GMAIL-MSGID: 1791339972391832148 |
Series |
iommu/vt-d: Fixes for v6.8-rc5
|
|
Commit Message
Baolu Lu
Feb. 19, 2024, 11:16 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> On 32-bit builds, the vt-d driver causes a warning with clang: drivers/iommu/intel/nested.c:112:13: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always false [-Werror,-Wtautological-constant-out-of-range-compare] 112 | if (npages == U64_MAX) | ~~~~~~ ^ ~~~~~~~ Make the variable a 64-bit type, which matches both the caller and the use anyway. Fixes: f6f3721244a8 ("iommu/vt-d: Add iotlb flush for nested domain") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20240213095832.455245-1-arnd@kernel.org Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> --- drivers/iommu/intel/nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/nested.c b/drivers/iommu/intel/nested.c index d5af5925a31c..a7d68f3d518a 100644 --- a/drivers/iommu/intel/nested.c +++ b/drivers/iommu/intel/nested.c @@ -103,7 +103,7 @@ static void nested_flush_dev_iotlb(struct dmar_domain *domain, u64 addr, } static void intel_nested_flush_cache(struct dmar_domain *domain, u64 addr, - unsigned long npages, bool ih) + u64 npages, bool ih) { struct iommu_domain_info *info; unsigned int mask;