Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp126082rdb; Fri, 26 Jan 2024 23:06:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZq77Td5ots2vGj0VFPnebk/2C6mYHJPbPNNTXdO5y1KotOe91N8hCyYqkDDGB4apQieQx X-Received: by 2002:a05:6402:376:b0:55e:c2d9:374e with SMTP id s22-20020a056402037600b0055ec2d9374emr30419edw.26.1706339179163; Fri, 26 Jan 2024 23:06:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706339179; cv=pass; d=google.com; s=arc-20160816; b=Ybf/49lT1i2bBDLQgNsXEuBPu1urMKj4uIzksu/FjoGawxFT13Ev6BDWGBFdv1X0PU PRZITbfr0JNytXXtsAJid4RJuMX1DiNsx+0iK57hg0JQs81OTiayqiYERJiDKKtQx4z7 T4NL5g3xeqSq9cwyNBJB2jlXYsNiDNxpYSDUeX1pWGi/HsBja4nE7ELtFI6OdLfifgUF ReQe2KVaU0EY2hEU+DO0R5GQBjz07yBSrQNU3Lm6fbG3iNzm78EfIyXrobaQar12qbPs 4FSxd6s8NBgsC6eEq9HB2LgTlk/S1BgItW2nCvWMle4W66A5AyH4MZeKqhP/PdMIoF56 OTMw== 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=LNfHOxJ+OYezMU9TIz7SuV7yDWyyV4slu/JPQlFST1c=; fh=EHxjn8iMtmEJ1Nwp2Nv05+TVlxb0pe4eSZ5ytBRUMYc=; b=Yl88ORib2esXKDZqthiRI9nF0fcJLzbQ92YoLEAA0eQGV2x3NLXiM+QiREK8gI9bAb O4H6WR71bLmEHLfo8/fBt1No53r9CnYkaNrIHXfs7zATZ8BrRlBEfr+zHLOZi/7h1Bug VbV7k4vS/7Yjj5bwQeEG1AbFlHwzzPGyAO1ogIz+NI4KNdFIBGuy06bYwm6D7zHZOvx0 Kow4vaIqJ90/igFb3lmVihevN1Rt67tzhMrcanqu1REBiWIrEnlfg+6j0vbU5PozFgYk JrY3aOiLjgelhSr3a4J5Mj3BIw0zECZ4JNTXKI1EtD0eFv+ywzua4J81EXxsAcOuv+WQ Nb+w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f6vqIDvl; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-40855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dd14-20020a056402312e00b0055c03280341si1419136edb.377.2024.01.26.23.06.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 23:06:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f6vqIDvl; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-40855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40855-linux.lists.archive=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 656B61F26639 for ; Fri, 26 Jan 2024 23:38:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 975B55B5C2; Fri, 26 Jan 2024 23:37:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="f6vqIDvl" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 140E95915C; Fri, 26 Jan 2024 23:37:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706312245; cv=none; b=Z0NHwntXMf30RBTtZr6Pa6g1WQUazRIGJK4g+gWohPkCvGOz/Kwn8JWhL4BOwg10sJ2a+RV35NmOFlukLmD21px+SUZ8dYg4ofht81qngAKrbdaTAxzTsrJbncGd7Yl2jPOK3aL3SFwNbSkYh3YZvgzOpER16AMFSkXw606uLno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706312245; c=relaxed/simple; bh=/Fp/FdRCU1EQNKKT7uYQEIyHFwY63ZnDL0vny89H1Xg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VCCXGY4XdQ6iYFhyWeXy4/OGW5ni34LixwDSaJC0OlUGQmq0ejEWK985SNOA3aUkg/+32YkgVk/x2aoJf9L2tBvKQDoodgsyHgtbWL1zks0s/8ShQokFhuUEwfESTsb+Gj8cJ1YGfFz0dRrnnOBG0UhAhuzAyUekPs7laqudVeA= 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=f6vqIDvl; arc=none smtp.client-ip=192.198.163.10 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=1706312244; x=1737848244; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/Fp/FdRCU1EQNKKT7uYQEIyHFwY63ZnDL0vny89H1Xg=; b=f6vqIDvl2sr1zLH9K5cYsB1cIBYqZajZXAv3W08rC/KjVF0kVaKZaGDL huYWEgCT6eVOrP2fEi6sqXhDsdR9f9tABDK6vzA8N1Z28IZQkNDwNU/+H cHcG8BfftYZ64lWCbpupNiC9l3GlB52Zz3n/L/JqMFYO7bkfVcvrx+1Oj A7p0xLcu+mVyFFOU5epSChTk4Df0cusWFzJlGHC5wEldBEihiiPxCGsvJ CmZlFuAUmLOWjW6EQQhfx6Lh0m/Y27aS+ixUetizLJ86asLYfzynwQSPv 7AbcgeWH9UL+pPTeHNK0e/7MTVT75jSo/lW1qrPoq67v1kxKkOwVYG3WT g==; X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="9990656" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="9990656" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2024 15:37:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="821290714" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="821290714" Received: from srinivas-otcpl-7600.jf.intel.com (HELO jacob-builder.jf.intel.com) ([10.54.39.116]) by orsmga001.jf.intel.com with ESMTP; 26 Jan 2024 15:37:20 -0800 From: Jacob Pan To: LKML , X86 Kernel , Peter Zijlstra , iommu@lists.linux.dev, Thomas Gleixner , "Lu Baolu" , kvm@vger.kernel.org, Dave Hansen , Joerg Roedel , "H. Peter Anvin" , "Borislav Petkov" , "Ingo Molnar" Cc: Paul Luse , Dan Williams , Jens Axboe , Raj Ashok , "Tian, Kevin" , maz@kernel.org, seanjc@google.com, "Robin Murphy" , Jacob Pan Subject: [PATCH 03/15] x86/irq: Use bitfields exclusively in posted interrupt descriptor Date: Fri, 26 Jan 2024 15:42:25 -0800 Message-Id: <20240126234237.547278-4-jacob.jun.pan@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240126234237.547278-1-jacob.jun.pan@linux.intel.com> References: <20240126234237.547278-1-jacob.jun.pan@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Thomas Gleixner Mixture of bitfields and types is weird and really not intuitive, remove types and use bitfields exclusively. Signed-off-by: Thomas Gleixner Signed-off-by: Jacob Pan --- arch/x86/include/asm/posted_intr.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/posted_intr.h b/arch/x86/include/asm/posted_intr.h index acf237b2882e..896b3462f3dd 100644 --- a/arch/x86/include/asm/posted_intr.h +++ b/arch/x86/include/asm/posted_intr.h @@ -16,17 +16,17 @@ struct pi_desc { union { struct { /* bit 256 - Outstanding Notification */ - u16 on : 1, + u64 on : 1, /* bit 257 - Suppress Notification */ - sn : 1, + sn : 1, /* bit 271:258 - Reserved */ - rsvd_1 : 14; + : 14, /* bit 279:272 - Notification Vector */ - u8 nv; + nv : 8, /* bit 287:280 - Reserved */ - u8 rsvd_2; + : 8, /* bit 319:288 - Notification Destination */ - u32 ndst; + ndst : 32; }; u64 control; }; -- 2.25.1