From patchwork Wed Feb 15 16:13:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 13141845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1778C636D7 for ; Wed, 15 Feb 2023 16:14:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 938776B0075; Wed, 15 Feb 2023 11:14:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C10C6B0078; Wed, 15 Feb 2023 11:14:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73A716B007B; Wed, 15 Feb 2023 11:14:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 667F16B0075 for ; Wed, 15 Feb 2023 11:14:48 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2D1D21C66A0 for ; Wed, 15 Feb 2023 16:14:48 +0000 (UTC) X-FDA: 80470024656.09.C9E09F6 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf09.hostedemail.com (Postfix) with ESMTP id D7B80140022 for ; Wed, 15 Feb 2023 16:14:45 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=hVkn+cau; spf=none (imf09.hostedemail.com: domain of thomas.hellstrom@linux.intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=thomas.hellstrom@linux.intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676477686; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fQppA1Zyj+QPHiRbe/GBxjzk8FY1TG4f2UWX2XAIoZQ=; b=XRwrTdfnrUNpf4A5SNalead/mg5OSSdjhuquE32zVUJheQ3FLBzKuHXKfRAY0//me11z+6 HYR8vKrZuQUmyZDEd3BpkjqfypzE1fXnGNzR6QoByPNjuu7kdEeOI+QvTmaWcJHuTLShbp NxsyBPPeiMQOt2g1gbyIDYJRPpkWY+o= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=hVkn+cau; spf=none (imf09.hostedemail.com: domain of thomas.hellstrom@linux.intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=thomas.hellstrom@linux.intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676477686; a=rsa-sha256; cv=none; b=OQFJ1x55BGN/tAuSBKBQ6eVz4SbwuIur6O9n1bITsqSQYuhX9Xu0qTyhmRj+vos3Gp79El QeXsXlIMxUg4QWdvY6vLYRt4lH3VIYyENt27b+NxFLj6YTXMbg4N9bXR/cS/Kyfcsi7M4J iVaBKADcnQHdKhSf+KLyFIKPxTQrCjo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676477686; x=1708013686; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=McHyT4De9u46Zn7/STJhV0OybtGzOXa9c4egudSyqSQ=; b=hVkn+cau/WZP0feKisfbw+hsVQMDO/snk4OaZyRh5VqnVlPz13LsoI/9 +ZCUqEDNF3YH34O/wGCfKcIRLV1KtvqvFtabqIf8G+b3M/cLKc7VnQxqm RFj8Y/cyXHpq13NbSilLnxhReEziOgyv0oLi/z2ULlE+MwYONqReFNSm5 uW2ELJqGmrRY7pphzl0zBtoOjFfQ+fsOS5lH8fk4p+C8ohdHYOmvFCw5S W+8hf5YNd9xQmmE6IbjBJKVfIwBiErVxNsUP4JWTUFAurUfFf2gvQyGx+ y65/sulqHoGXyt85ahvRcYawWihMiJY7RNSN/ZDCy9J5rTeC/uXdcA5tR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="393870737" X-IronPort-AV: E=Sophos;i="5.97,300,1669104000"; d="scan'208";a="393870737" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 08:14:45 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="758472167" X-IronPort-AV: E=Sophos;i="5.97,300,1669104000"; d="scan'208";a="758472167" Received: from auliel-mobl1.ger.corp.intel.com (HELO thellstr-mobl1.intel.com) ([10.249.254.14]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 08:14:40 -0800 From: =?utf-8?q?Thomas_Hellstr=C3=B6m?= To: dri-devel@lists.freedesktop.org Cc: =?utf-8?q?Thomas_Hellstr=C3=B6m?= , Andrew Morton , "Matthew Wilcox (Oracle)" , Miaohe Lin , David Hildenbrand , Johannes Weiner , Peter Xu , NeilBrown , Daniel Vetter , Christian Koenig , Dave Airlie , Dave Hansen , Matthew Auld , linux-graphics-maintainer@vmware.com, linux-mm@kvack.org, intel-gfx@lists.freedesktop.org Subject: [RFC PATCH 03/16] drm/ttm: Use the BIT macro for the TTM_TT_FLAGs Date: Wed, 15 Feb 2023 17:13:52 +0100 Message-Id: <20230215161405.187368-4-thomas.hellstrom@linux.intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215161405.187368-1-thomas.hellstrom@linux.intel.com> References: <20230215161405.187368-1-thomas.hellstrom@linux.intel.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D7B80140022 X-Stat-Signature: 78ezgkrn7embqonzs14ffhkhxt4sty95 X-HE-Tag: 1676477685-969589 X-HE-Meta: U2FsdGVkX18xgtyXHyGD6NHHeLpQGOxDz+MFtiX66eLjs24a6/CTgzRK6gumGK9LeMG3lVW6fC84EM4x4fr+whzWV1RBAff8dMH474ZWAZQ5653o/NiTxECkDwh9ADnl93GAKiYhwT3urE+AWot3qmg5E4Z/kk84otf297zxSciesqd7MwqLR7gKDPV4nBZADqt/KgIPmfGFIIV7hA3GGwFF4NGDiFK0M+kbTYtmUkkYp8lxzg6Zj/MK8sMs5DQdEw0O1SquVx0nFgedXeqf5+pl3Qwj0o5Lj7ssBeJXsOkcOkPnGn1vjnR/qYYITuCLODZGVMOZmH0ltAOPAS5cm6/7NWEPp+qLlzkHC3FpoNWcGNalD3YozMDU4O8dZklqiYycWU+/tWIScHYtYX1KvtaDVJH2mBuDHbtFCHybl8oass527IJstGCPzi7TUEbETUW0vJaTlEufhzDj+nLtotx5B/JgdO0x7y471TbiJMcl12QnwhHeSNTMJJFTInCp+X12oobH9TmVy/2+I6J2eg7uV4oLTimJzSWAVffiq++xXLBsOyBEvc4HQHkMpY22ptZmje20WusaN5kjqYSNnf03YbZFQxp/ZyzYaE4Ixf1YmQ28/yGgOLAfsRIKCWcI+z95u1F0s5h9yLWNK9u4WmjTjBkJZx8rigN74fsbrU+cEVMmwKlQKjBYIyHxsEigFNR8x24rX0VtOd4oPvksWhoIpSl00vJrLMXGVp5qwjr8uyBnGVCmcmrQIa1xPfs8YIA71O7sYG9ci3aVvbMS0L1EBbt/UQUkIlBu1UTKR5embEpMnr+1sujYH8x9rib5l0VVFtz+9aJilBU2rIm1TJDZL5MSJyRRsJXFjcj3KD2Ews7ETMkF5geaY3ZLYIRjf6rbefbhTdtqt2JImTEJOS9RBeP8QuWCJeuwxe/EPDZ8M76Qccm7/WQLVNBV+Cf5ujWmbUFUzlknpI04/Ef w55CRvbR 9vVaCl/6IqI2mjXQpHYDx0VZOlOQCH+zFfqrK6ZN14aoUXu0nXi4DuKj4G1mH0sR7/SJC6FGw4DiBa6dsmVDHGppWwBzMy9arotJz5AxeF1gOIqVRXDGit/DxxZJapSnMuc1lOL8snbLAHJR3Lzwih32vCFaqEZ2uZqGKjPEHUgQXbb6HjRcv+yH5QQ+rcpy9JVyl1fkDzbvQDXJlNG9GWCS+gJbtdWOX9aMk/xf3pzv1EjU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: New code is recommended to use the BIT macro instead of the explicit shifts. Change the older defines so that we can keep the style consistent with upcoming changes. Signed-off-by: Thomas Hellström --- include/drm/ttm/ttm_tt.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index b7d3f3843f1e..cc54be1912e1 100644 --- a/include/drm/ttm/ttm_tt.h +++ b/include/drm/ttm/ttm_tt.h @@ -83,12 +83,12 @@ struct ttm_tt { * set by TTM after ttm_tt_populate() has successfully returned, and is * then unset when TTM calls ttm_tt_unpopulate(). */ -#define TTM_TT_FLAG_SWAPPED (1 << 0) -#define TTM_TT_FLAG_ZERO_ALLOC (1 << 1) -#define TTM_TT_FLAG_EXTERNAL (1 << 2) -#define TTM_TT_FLAG_EXTERNAL_MAPPABLE (1 << 3) +#define TTM_TT_FLAG_SWAPPED BIT(0) +#define TTM_TT_FLAG_ZERO_ALLOC BIT(1) +#define TTM_TT_FLAG_EXTERNAL BIT(2) +#define TTM_TT_FLAG_EXTERNAL_MAPPABLE BIT(3) -#define TTM_TT_FLAG_PRIV_POPULATED (1U << 31) +#define TTM_TT_FLAG_PRIV_POPULATED BIT(31) uint32_t page_flags; /** @num_pages: Number of pages in the page array. */ uint32_t num_pages;