Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1117144lqt; Fri, 7 Jun 2024 08:25:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4bx3twWEVw9t5MoTIo2BE+uHaF1Te/40fRzFsqFB0HnNrrZ7X3JkN+nBXEqmD7o2uFqot2FMutWweicLN3lE8ZFwTNhMNJ9YLmLTgEg== X-Google-Smtp-Source: AGHT+IGv2RO6DBr/mN2f5ojwKNg3l/IAOotOnYxaNACia6O2mzKmXFlYvCAWDuzQDaNW8lximiUV X-Received: by 2002:a17:90a:3485:b0:2bd:6f2e:8c1a with SMTP id 98e67ed59e1d1-2c2bc9ba5c6mr2754556a91.2.1717773957279; Fri, 07 Jun 2024 08:25:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717773957; cv=pass; d=google.com; s=arc-20160816; b=eIw68Ki7tyX/WuEPUsIRcKjgqNQcEQFW0qObLtxCs9UHn+j3+GVSZK7c/o+OuIcdi1 zN3JnBMBsXzmANfntQJawZwStKyve3SJHJK8AR++98yb6zLr3rchYfNinvU1qHuF3C4u pD1Xc82VQ8+0qLWeTmjq+megSrbII0WNyliUd6K2etgMPQSSGtZaDOeBnh5vZttJjI1e 1rqzQKIV2LgIVJGM7znqFju5VbNjBrgTthzQtnuPL2VnpuI/SxFSoGGJlGxXIjJoLKH6 D7GXnkKwYjRRSjWgArY+c2sUXdG88P1Fa8q/7A0TS5MnLuQzDHIi7oi+hDHVVgsnnh3P sWWg== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=MEuaLvCzP+6Xos5THsGD+s1WocXbcl0DwOewvcCyXlQ=; fh=j/Ku3gqPO+EuNPxArNqUXcTC/SnzqZz1Tt8PBMOHNZM=; b=du0N/8MuyXiFiV/WkbJtNI2okNPN2RpBzgF8zqsH00ie3UGvhFEgbsVavY5xVTXE4J yo8Dd5BM9+uOnixXRY3zxVz6Igm87dayAZupNMYzrRae/NK+yL5bC81IjKIbaEfYBkpc JUxiIxMBsvCBlbBSRom1lncn/UvyR4xU5N7Qih/jGaMUme6sD1y1lzGWQDwHluwZSIWm GGN4UAZHzJDmGiTmKnreSpX0zwzRKzVyaOG35OZWiUQWUhidAXhb+pHy0jDGfvSDyFOc ohfNM0a5JbRXz0Zm08Te/CqYR9NujAxLAPXl+KcTBW5RdAitlFnc4zpInZhN0n1Z76x1 lz2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-206360-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2806bd777si1003565a91.95.2024.06.07.08.25.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 08:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206360-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-206360-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4F748B230C9 for ; Fri, 7 Jun 2024 15:13:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8148A195389; Fri, 7 Jun 2024 15:13:29 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 01A9A18732D; Fri, 7 Jun 2024 15:13:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717773209; cv=none; b=Bixbs/h4iq+fkbPiD7Xmh1vOv19W+clbYRPHofMyT30nzP0C9wM/kH+yKDmrKhsN124mcEq2sXKTGaQppBxyt0qoCOQWDTi4eqnTR4qES6JmG+p4XI9ybsw1C61tVskgalIjUQRPV670yHKA5u8JtAt/KwgC67iWBfOYoq85+2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717773209; c=relaxed/simple; bh=Qz/aA87n1W3Jvbb2hp8KC483bwpvzJetmsqSha04DoE=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hcxVzshJQAAEnN/dXszFg4msjCIVux3vy5lDvCxv++qIRVMP+VAD9yRHxbuLeBKSM4j5/yreAaqPgniLG9jAWKPcUvHPk9cu+oBt+PHaobOs4pJlVrucQKaffPUtL+w98ZEVzcwH/bqWABpyfb/h7bcm3tjXQhkT7tZjiMsBkfo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Vwl2c2yJLz6GBnb; Fri, 7 Jun 2024 23:08:40 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 20137140C98; Fri, 7 Jun 2024 23:13:23 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 7 Jun 2024 16:13:22 +0100 Date: Fri, 7 Jun 2024 16:13:21 +0100 From: Jonathan Cameron To: "Fabio M. De Francesco" CC: avidlohr Bueso , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , , Subject: Re: [PATCH v7] cxl/events: Use a common struct for DRAM and General Media events Message-ID: <20240607161321.0000420b@Huawei.com> In-Reply-To: <20240607144423.48681-1-fabio.m.de.francesco@linux.intel.com> References: <20240607144423.48681-1-fabio.m.de.francesco@linux.intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100006.china.huawei.com (7.191.160.224) To lhrpeml500005.china.huawei.com (7.191.163.240) On Fri, 7 Jun 2024 16:43:58 +0200 "Fabio M. De Francesco" wrote: > cxl_event_common was an unfortunate naming choice and caused confusion with > the existing Common Event Record. Furthermore, its fields didn't map all > the common information between DRAM and General Media Events. > > Remove cxl_event_common and introduce cxl_event_media_hdr to record common > information between DRAM and General Media events. > > cxl_event_media_hdr, which is embedded in both cxl_event_gen_media and > cxl_event_dram, leverages the commonalities between the two events to > simplify their respective handling. > > Suggested-by: Dan Williams > Reviewed-by: Alison Schofield > Reviewed-by: Dan Williams > Reviewed-by: Ira Weiny > Signed-off-by: Fabio M. De Francesco With the fix for my mistake in v6 review. Reviewed-by: Jonathan Cameron > > +struct cxl_event_media_hdr { > + struct cxl_event_record_hdr hdr; > + __le64 phys_addr; > + u8 descriptor; > + u8 type; > + u8 transaction_type; > + /* > + * The meaning of Validity Flags after bit 2 is oops. I got this wrong. Sorry! "from bit 2" after would not include bit 2 which is "nibble" for dram and "device" for media. Maybe if Dave is happy with this one otherwise he can tidy that up whilst applying? > + * different across DRAM and General Media records > + */ > + u8 validity_flags[2]; > + u8 channel; > + u8 rank; > +} __packed; > +