Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp634147lqo; Thu, 16 May 2024 17:43:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWC4WeL9AslA5YnHmEa4dVa3N9n5l12HbILWWVGZPn5l0iBjyWQrNqh7C+gChk6l/8gQqj7T4b2N+9u47NCow/ZZt1x3V/RVjF96Y09Jw== X-Google-Smtp-Source: AGHT+IFwyAqhFY+Kqw8noF9emT2PIfKXFVF7uDSZs7amUMcW90s2awlBCxQfOUBIVYaMPF38g3pp X-Received: by 2002:a17:906:daca:b0:a59:bae0:b12f with SMTP id a640c23a62f3a-a5a2d6656c5mr1678294966b.57.1715906637089; Thu, 16 May 2024 17:43:57 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be63a1si905662566b.709.2024.05.16.17.43.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 17:43:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181660-linux.lists.archive=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=X0kDPl62; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-181660-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181660-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 A3E491F228CD for ; Fri, 17 May 2024 00:43:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30677A32; Fri, 17 May 2024 00:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="X0kDPl62" 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 D4B5F7FD; Fri, 17 May 2024 00:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.10 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715906626; cv=fail; b=s+s8bFsLY/j9s/YLKPVxXW72nFXtiM1+5RFggYckGyPAyeT+0FfBFRLoFgXWmXBrsuNXxMJcEzs0TIwo8J9c+rl97UVAVlH8z8kuuCQLU5NB5vqKktC0m3setyfPg9flwffkIUX8NW05cVWakyKlfb8ZW9U0p/wl2jGxN09Zt+Q= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715906626; c=relaxed/simple; bh=6VpDeEoAiFBAnJ2sRb2hIWpj6IVrKB0hcIaR5wrIeb4=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=KbF71CqHAWEq+IA6ghq2c9y2VqBumB+6T+1fYBkOAojUw30kY95gI48n/qNYZlglfGmGAHBIum3kkzCd3YVNW8gVuarYKdrNpRiE4w36dF33CloF9jBr6hHDRfxMsI/H2PNi8Q8gLko0Xg+0rIDLOkxkwASR4//hA5lOWZuX+jI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=X0kDPl62; arc=fail smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715906624; x=1747442624; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=6VpDeEoAiFBAnJ2sRb2hIWpj6IVrKB0hcIaR5wrIeb4=; b=X0kDPl62P9xf8CfFl7WpdId1+pyxt/TI6SPbB1zrDwRgd7t6KoiILOr3 zlzAPXFx4Z8hxOFA5loX447H528oiIYrzVt8mkoh9XdZ5Z/jRqu/wpLSJ NNdtNQzTT/olI7ZsM6u3vgkKrHeuSiiYGrPcT8td1em+xDNIQKh5t6/xs NvlOn+EYe47JC1YOz2xWtt5M+XHM4V3dQNp3Ehhuv/UfNQvvIWJxxtyPn 93UF1E+ew+MS01UkNdmqcHEFdxQeoOPPRqyKOg1MT7SvYu8nEBl54HQeA KhSBiCc/hrt6sWQGUP+Y8Z1j6Gvqn2LGAP+GzqkeFSyuY+mAkd80GJyfF A==; X-CSE-ConnectionGUID: Ylh3V7CvTpOqUp9BWFaNtA== X-CSE-MsgGUID: uaZu3BmFQymlk/BnqsyZIA== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="23472013" X-IronPort-AV: E=Sophos;i="6.08,166,1712646000"; d="scan'208";a="23472013" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 17:43:43 -0700 X-CSE-ConnectionGUID: tVPz2a8ySPGvaeD2NGii2Q== X-CSE-MsgGUID: FoFeP9FVRV+OnQ+d9/ozDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,166,1712646000"; d="scan'208";a="31636667" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 16 May 2024 17:43:43 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 16 May 2024 17:43:43 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 16 May 2024 17:43:43 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 16 May 2024 17:43:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Saxj2aEE4o8qslX3NWSs+JWwAxT2bZ8Po+D8qulP7kYV1YqDIp6Y7vecQLvU3XuzVdgZ1WjF7r5VFdTIv1LlUEasaFHb+xido8NShFBRrMbgBxMvHgGNhfDLYL9mPopJ1jOZql5T7SOEDXcX3y5RIiXNz/WxNeLJjQh1+bSRptlQsCpakum/n9lGUCDnhTrAxxIUCtZTJ+d1ehFngZYqdBaiOoYMn0I6Jy29dbH0vQkAtOGNX4K4wl7ItFxlO7yf1IY/uq7Z2oIdjz1nLFGPK3rRZXwzKsHnLlTRuQ3eJEtuoRGaUwUnhoJo0MOHrr9FQz7eMrG3TdXXXPdj1gSCPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tdvBcSSqtz/bYbH7U7TiVlRMLO68p5DeR5ezV/fkSIo=; b=jjHJ4UOiYKjnCqN2tPzRN0BRJbVTHiPwMedEQTCsp4Ncq5Wwo2XrLoIkuhmp6j5+acds4dP0R23az24tRNoY4zYwsSl4kO5ZU6j0yXhGNW2q55/Ue0MIQFbi3ayb1sM4Xm95JvFxEf/1TQKHDzXxd1zC2UUjGTbDVfBhcV9NRPZ9dK5qX5mxK6JmIonkcx73T8l9tEg1vI9rcPBkCytB6ZSJ5t66RxpMWI7AxC9lhPFSZmajCqV/nGz5uCdFb0NNE875g7Xy958EakEUzufuuFO35sSRuZupa9T7RDCdbBcixcKR5ENusQ8iDKiK9V3oqZp99LwE4tmaj30SM8f+lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) by SJ0PR11MB6694.namprd11.prod.outlook.com (2603:10b6:a03:44d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.26; Fri, 17 May 2024 00:43:36 +0000 Received: from PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6b05:74cf:a304:ecd8]) by PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6b05:74cf:a304:ecd8%6]) with mapi id 15.20.7587.028; Fri, 17 May 2024 00:43:36 +0000 Date: Thu, 16 May 2024 17:43:33 -0700 From: Dan Williams To: "Fabio M. De Francesco" , "Davidlohr Bueso" , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , "Ira Weiny" , Dan Williams , , CC: "Fabio M. De Francesco" Subject: RE: [PATCH v2] cxl/events: Use a common struct for DRAM and General Media events Message-ID: <6646a835ac144_2c26294da@dwillia2-xfh.jf.intel.com.notmuch> References: <20240516102116.3512377-1-fabio.m.de.francesco@linux.intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240516102116.3512377-1-fabio.m.de.francesco@linux.intel.com> X-ClientProxiedBy: MW3PR05CA0016.namprd05.prod.outlook.com (2603:10b6:303:2b::21) To PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB8107:EE_|SJ0PR11MB6694:EE_ X-MS-Office365-Filtering-Correlation-Id: b2f1142b-ecd5-4500-f93b-08dc760a62f6 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005|921011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?pNf6+PdjKz1hq4Tyf4SAbsZHqxIFkhbELjnIB/eWfdAwJjmV2SbNfvVF8nuy?= =?us-ascii?Q?vAvbA9qns9WptSy/PDL/eDrmzCBVCcoSug3HJOZBMJBzUj0qaFekDxX7bgJQ?= =?us-ascii?Q?fV7SGrdZ6OoKr1SrV1omrdAGMXwmLP/mFgTiy5cYJURZmMSYK+vLp1f/MWIC?= =?us-ascii?Q?bYj+cNUXoqiK1etgUzqHZM1PQ23ZNq3sOCKn5b/H+41XoiW9Zru09dxEE3VW?= =?us-ascii?Q?gD0DSWrRVSMWOT8m/ujuyf/D0c87wkjmmvaKJTB/3h3ELJPmGRuQz7F4o2iX?= =?us-ascii?Q?WGb1qn9O21abLBz91VqYAa8Ns9NKog1+2X0omGgRniyAD4QELqYGO+ES+QQ3?= =?us-ascii?Q?/dtu+iM9d3bx1r6XKEEMIw2pDjcyrEtQ4AZMwwL7WZW8pLP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3S/nlNrcJgcuT7yHHOPkcWue4nw/sKtYArovO?= =?us-ascii?Q?L16viFlYOwIOPYQLmepE34LN?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB8107.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ivMPDXyPqlr4MiPyzK9ZT2BBh5lqR+elnPEXgfOPIMtZtreWexx4oYGMg/sm?= =?us-ascii?Q?zbv0MYakSZJWmZX24y7u5RBDR225nO2GgQzwu0o2sMi9+K5M3ixyHnUFoZVb?= =?us-ascii?Q?ITT+MDqLhVh8sgiaPMRbf1F12tENWopMtTBZmvTIslBIH0sEp66bOB9KcfiN?= =?us-ascii?Q?2fqIXMEjfphI01xJ3UAU0vVz37sPhf1WMXqBF/K2Hzc0O0gKvBYvYLoybWTo?= =?us-ascii?Q?al/eNOx6BlIP2ydLiJyVIGS3sA1Aoo6wdXv5VzY9xhQ/YTRFP70CCS8whVIm?= =?us-ascii?Q?FWuwrp0xdpx9tcLASeqAZeFsQMk+3KJLmP50hXPidn77LY6YCOs/kE+z7ppn?= =?us-ascii?Q?SQwzMArJqfdP4bg8nb/6d3Zth4Pl38I9AWRWdu21GXwIDmnt+m4sFLXI0YsS?= =?us-ascii?Q?dugTyqUDkSfhAB+wH5ihfvI8ZOB86Kyu7Y32l3EM5ETSbUbgatxR+oKgJOGx?= =?us-ascii?Q?8HTBq5h6kTUGGpFwvO9uuESspc2I3nSQfDGBqGXSrzSRwnT9DoD76O6ytYL7?= =?us-ascii?Q?7PvhxZOlcO+8K9jqTBvoilchR2FO7y9SOf/akn3GrF3HHoCWmXf4i842Rc19?= =?us-ascii?Q?dNcZzIAagka4Vgp+V6TsDMq2tkbqX+2jXOm8hItai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WqegBaKdr/yM3Hm7QW3NFhN3jouxEq6CzRjcTXIyWQKdhrvC?= =?us-ascii?Q?KwpdynO4oMtKaP1gIZCk3Jvfz+1kpdl+qPcSd777p50+NqFqizpiuT4pYqbw?= =?us-ascii?Q?Tw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b2f1142b-ecd5-4500-f93b-08dc760a62f6 X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB8107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 00:43:36.2942 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Olmm1ZDSJpRSy0n2Joob/psRBCB0BFxweHT7/RiuK0DKniqvCnuGXwg09I136NJ9hXy51EJxHDfSsCrbyUz83Vvpmuh2Mp2mmCVOSkcucKI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB6694 X-OriginatorOrg: intel.com Fabio M. De Francesco wrote: > cxl_event_common was a poor naming choice and caused confusion with the > existing Common Event Record. I would say "unfortunate" rather than "poor". > Use cxl_event_media as a common structure to record information about DRAM > and General Media events because it simplifies handling the two events. > > Suggested-by: Dan Williams > Fixes: 6aec00139d3a ("cxl/core: Add region info to cxl_general_media and cxl_dram events") What is the fix? There is no user visible behavior changes that results from this cleanup, right? > Signed-off-by: Fabio M. De Francesco > --- > > Changes for v2: > - Extend the commit message (Alison); > - Add a "Fixes" tag (Alison, thanks). > > drivers/cxl/core/mbox.c | 6 ++-- > drivers/cxl/core/trace.h | 4 +-- > include/linux/cxl-event.h | 70 +++++++++++++++--------------------- > tools/testing/cxl/test/mem.c | 4 +-- > 4 files changed, 36 insertions(+), 48 deletions(-) Oh, nice, net reduction in code I was not expecting. > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index 2626f3fff201..ad4d7b0f7f4d 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -875,16 +875,16 @@ void cxl_event_trace_record(const struct cxl_memdev *cxlmd, > guard(rwsem_read)(&cxl_region_rwsem); > guard(rwsem_read)(&cxl_dpa_rwsem); > > - dpa = le64_to_cpu(evt->common.phys_addr) & CXL_DPA_MASK; > + dpa = le64_to_cpu(evt->media_common.phys_addr) & CXL_DPA_MASK; I was hoping at the end of this to get rid of the word "common" to avoid any more "common event record confusion". > cxlr = cxl_dpa_to_region(cxlmd, dpa); > if (cxlr) > hpa = cxl_trace_hpa(cxlr, cxlmd, dpa); > > if (event_type == CXL_CPER_EVENT_GEN_MEDIA) > trace_cxl_general_media(cxlmd, type, cxlr, hpa, > - &evt->gen_media); > + &evt->media_general); > else if (event_type == CXL_CPER_EVENT_DRAM) > - trace_cxl_dram(cxlmd, type, cxlr, hpa, &evt->dram); > + trace_cxl_dram(cxlmd, type, cxlr, hpa, &evt->media_dram); > } > } > EXPORT_SYMBOL_NS_GPL(cxl_event_trace_record, CXL); > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h > index 07a0394b1d99..2c7293761bb2 100644 > --- a/drivers/cxl/core/trace.h > +++ b/drivers/cxl/core/trace.h > @@ -316,7 +316,7 @@ TRACE_EVENT(cxl_generic_event, > TRACE_EVENT(cxl_general_media, > > TP_PROTO(const struct cxl_memdev *cxlmd, enum cxl_event_log_type log, > - struct cxl_region *cxlr, u64 hpa, struct cxl_event_gen_media *rec), > + struct cxl_region *cxlr, u64 hpa, struct cxl_event_media *rec), > > TP_ARGS(cxlmd, log, cxlr, hpa, rec), > > @@ -413,7 +413,7 @@ TRACE_EVENT(cxl_general_media, > TRACE_EVENT(cxl_dram, > > TP_PROTO(const struct cxl_memdev *cxlmd, enum cxl_event_log_type log, > - struct cxl_region *cxlr, u64 hpa, struct cxl_event_dram *rec), > + struct cxl_region *cxlr, u64 hpa, struct cxl_event_media *rec), > > TP_ARGS(cxlmd, log, cxlr, hpa, rec), > > diff --git a/include/linux/cxl-event.h b/include/linux/cxl-event.h > index 60b25020281f..e417556cc120 100644 > --- a/include/linux/cxl-event.h > +++ b/include/linux/cxl-event.h > @@ -32,41 +32,38 @@ struct cxl_event_generic { > * CXL rev 3.0 Section 8.2.9.2.1.1; Table 8-43 > */ > #define CXL_EVENT_GEN_MED_COMP_ID_SIZE 0x10 > -struct cxl_event_gen_media { > - struct cxl_event_record_hdr hdr; > - __le64 phys_addr; > - u8 descriptor; > - u8 type; > - u8 transaction_type; > - u8 validity_flags[2]; > - u8 channel; > - u8 rank; > - u8 device[3]; > - u8 component_id[CXL_EVENT_GEN_MED_COMP_ID_SIZE]; > - u8 reserved[46]; > -} __packed; > - > /* > * DRAM Event Record - DER > * CXL rev 3.0 section 8.2.9.2.1.2; Table 3-44 > */ > #define CXL_EVENT_DER_CORRECTION_MASK_SIZE 0x20 > -struct cxl_event_dram { > +struct cxl_event_media { > struct cxl_event_record_hdr hdr; > - __le64 phys_addr; > - u8 descriptor; > - u8 type; > - u8 transaction_type; > - u8 validity_flags[2]; > - u8 channel; > - u8 rank; > - u8 nibble_mask[3]; > - u8 bank_group; > - u8 bank; > - u8 row[3]; > - u8 column[2]; > - u8 correction_mask[CXL_EVENT_DER_CORRECTION_MASK_SIZE]; > - u8 reserved[0x17]; > + struct_group_tagged(cxl_event_media_hdr, media_hdr, > + __le64 phys_addr; > + u8 descriptor; > + u8 type; > + u8 transaction_type; > + u8 validity_flags[2]; > + u8 channel; > + u8 rank; > + ); Oh nice you went for the full 'struct_group_tagged' proposal. However, given that Jonathan is already asking questions about "__packed", lets do the simpler change, something like this, what do you think? This also preserves type-safety. diff --git a/include/linux/cxl-event.h b/include/linux/cxl-event.h index 60b25020281f..f48b59943977 100644 --- a/include/linux/cxl-event.h +++ b/include/linux/cxl-event.h @@ -33,14 +33,16 @@ struct cxl_event_generic { */ #define CXL_EVENT_GEN_MED_COMP_ID_SIZE 0x10 struct cxl_event_gen_media { - struct cxl_event_record_hdr hdr; - __le64 phys_addr; - u8 descriptor; - u8 type; - u8 transaction_type; - u8 validity_flags[2]; - u8 channel; - u8 rank; + struct cxl_event_media_hdr { + struct cxl_event_record_hdr hdr; + __le64 phys_addr; + u8 descriptor; + u8 type; + u8 transaction_type; + u8 validity_flags[2]; + u8 channel; + u8 rank; + } hdr; u8 device[3]; u8 component_id[CXL_EVENT_GEN_MED_COMP_ID_SIZE]; u8 reserved[46]; @@ -52,14 +54,7 @@ struct cxl_event_gen_media { */ #define CXL_EVENT_DER_CORRECTION_MASK_SIZE 0x20 struct cxl_event_dram { - struct cxl_event_record_hdr hdr; - __le64 phys_addr; - u8 descriptor; - u8 type; - u8 transaction_type; - u8 validity_flags[2]; - u8 channel; - u8 rank; + struct cxl_event_media_hdr hdr; u8 nibble_mask[3]; u8 bank_group; u8 bank; @@ -109,7 +104,7 @@ union cxl_event { struct cxl_event_gen_media gen_media; struct cxl_event_dram dram; struct cxl_event_mem_module mem_module; - struct cxl_event_common common; + struct cxl_event_media_hdr media_hdr; } __packed; /*