Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10213879rwr; Fri, 12 May 2023 05:31:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hEa9+j24iduihhMffSgk5NlzhEU/3NPKDBvSLD010xUIYsMZc6ffABg3/h50sO8oA+BG/ X-Received: by 2002:a17:902:e74f:b0:1a9:b902:84b9 with SMTP id p15-20020a170902e74f00b001a9b90284b9mr31277059plf.24.1683894679814; Fri, 12 May 2023 05:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683894679; cv=none; d=google.com; s=arc-20160816; b=INlE8t2kOrd6KOGEEHmDexPTz+DS7rK/TZOm2bcIPdNVLpebH5IHriEi7oNBeRLDN4 nRA1wdJBAw/aY/8adP2yrvYukWhwFP8h6i/xW5xlQ/QiEOF91/f4UHxyBeaCnaAZIqZU 2po153q451JwZEX6mVUmT1nUYlqMCaEyNXiFh1Zhem6jlBuowmUtKu1Dd5eiO7B9H98D 5cqe4NOo2pYAvhArIN99BqZAaXjm3ynHAlHLfNZOOlZgA9IvgISXRqRRqcwtLWbXpGip 9/uqbZlKQLhWal4nB6Fy5zJvqRjLljEj+2+TY+KIILgSiiil97wl4UV0vu53+WJoOc0T xNMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=u4mpu4jokLb71XdVcEoZWutAA5AVk0U2ztkQY1usLzg=; b=T+4v3OHiFdrvPuJ6BnBy0lO+6ANCto7+SH+Yk1vPTGRkO1A9GeRJnT4Ww189Tf5PbH JFIK3QT0g2fKo2YsC7/XJeDN5bnoCbY5uTnSYXFBq0cDkf0ZiCuV+lKeT70aHYxARAaf 957Q6gHpgi+4RcXPamsbLfgmLHLEwrmRTvQEejj88RSQo/tD6MjddBPbIKA7pzrHhrOD bOHdTykB7EfFCXnTWlr3t8Y5kVJCWkTZbgMsKDbhAQKXPtj/aitQxwKxh2SKah7IHh7x 1/Jg6Hp+dsruxMf3JO4end+a33ESdWJ7lglqFEcgb99xXjy4t25vinb3CRtBltJHbbo5 oGMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="EdnND/N7"; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a170902eccd00b0019c33978781si9659912plh.283.2023.05.12.05.31.05; Fri, 12 May 2023 05:31:19 -0700 (PDT) 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=@intel.com header.s=Intel header.b="EdnND/N7"; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241087AbjELLph (ORCPT + 99 others); Fri, 12 May 2023 07:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240743AbjELLp2 (ORCPT ); Fri, 12 May 2023 07:45:28 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57C5B40F8 for ; Fri, 12 May 2023 04:45:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683891927; x=1715427927; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=dYYNFnS0C9MVpLeh+UPAsMuKqp0z8z6OdbK4OMSu5kk=; b=EdnND/N7ijpTnS7wcQOrO3Hopzc9DnT6qWemtdexKOdOhLenLH51kFZY 6UFV42DkL9ajafo8M+p5F07mgO0243cv9J6BlE76Hw/+fcHfa+eG5x+Er bkctydcfRbRo8/qhJOGczIBpJ2uSj0/H1xxu4y8jVVHvncrYCwh6/qFhO v2KdtpAFlQOTSq1BkNJjO5lib30Y7hxZRGs3ZDrE99ZOwymvnEHy2FSWA Spsd++dGNfMP87nPSOVO0X24IRiNuVorswczfHlYMizwoIb3+nhY1zSJr I1+jgUoHrt3hQM6DVtgpivHKYQ1ogEqR0JZw7F4zQthXT+UoKkQzBVXMj Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="340084833" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="340084833" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 04:45:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="733017118" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="733017118" Received: from tsavina-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.63.51]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 04:45:22 -0700 From: Jani Nikula To: Andy Shevchenko Cc: Lucas De Marchi , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Gleixner , linux-kernel@vger.kernel.org, Masahiro Yamada , Andrew Morton , Kevin Brodsky , Alex Deucher , Christian =?utf-8?Q?K=C3=B6nig?= Subject: Re: [PATCH 2/3] linux/bits.h: Add fixed-width GENMASK and BIT macros In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230509051403.2748545-1-lucas.demarchi@intel.com> <20230509051403.2748545-3-lucas.demarchi@intel.com> <87pm75kd0h.fsf@intel.com> Date: Fri, 12 May 2023 14:45:19 +0300 Message-ID: <87mt29kc34.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Fri, 12 May 2023, Andy Shevchenko wrote: > On Fri, May 12, 2023 at 02:25:18PM +0300, Jani Nikula wrote: >> On Fri, 12 May 2023, Andy Shevchenko wrote: >> > On Mon, May 08, 2023 at 10:14:02PM -0700, Lucas De Marchi wrote: >> >> Add GENMASK_U32(), GENMASK_U16() and GENMASK_U8() macros to create >> >> masks for fixed-width types and also the corresponding BIT_U32(), >> >> BIT_U16() and BIT_U8(). >> > >> > Why? >> >> The main reason is that GENMASK() and BIT() size varies for 32/64 bit >> builds. > > When needed GENMASK_ULL() can be used (with respective castings perhaps) > and BIT_ULL(), no? How does that help with making them the same 32-bit size on both 32 and 64 bit builds? BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center