Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2020356rdb; Wed, 31 Jan 2024 17:18:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHryFhyuBksTWAyWW9jtxSluWWIs5xCwv07xfgVmMsp3yB9MjnstGYX1pOsVnAWn34M+O/1 X-Received: by 2002:aa7:c394:0:b0:55e:f9c4:352b with SMTP id k20-20020aa7c394000000b0055ef9c4352bmr570783edq.1.1706750289624; Wed, 31 Jan 2024 17:18:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706750289; cv=pass; d=google.com; s=arc-20160816; b=okjtY1G0afBaZIPqHUPaa1x6FPT4M5KLljelKzhU1Jt/lsPHoznrOe5dx5Kzj8PYF0 aExCqrQp0uo5CAVe5jlN53ANfHI5FmZBQEB0sfUOqT0WB1vgaSWVs0Ar4rHvFfAyfVG5 KYxB01IVscpynvEpxip7e5GBVIfWMDUEFeERz5VyeQKYli6U7WZCOw9WdS+pGtYbnTIx XW1tawzdYLC4923gRE3xEOt5mnD1hpY6IR5vUFddPQ/EB7DG3du+F3fLhcCd0EHlb4si K106f6/1mXN4k/VTMMJIW3kqAcLfaCnGFRaFAyxMW2hmvxGGz4EyQXPvS8y7nKysmBPi lcCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VxWF2jU2cskWw+3A/iLckNmpa2Iyv/alfL50NUGa4RE=; fh=4jEX8TOcf7zp6XNBi6TvjPHh7jdJtEf2hcZn7xNmFOs=; b=aakR7ubBuKzEnH3v20Nv9bSR4ObyBjtbYDCC6HPbrjXnbzBgMW1+C9eDeXTNfYkSwH r4GYzFcN/jMnLYAoYKcyDQxd2aglacEejKjfRtO0tN9C++INPECLRH/BxcUJ6jTvZW6C gWG0wUo3a5NSGj2PqLOrfGMLIzDzvZ7hxWFikkfCdnKNAEDoFrk7vBtUPVI/bEfim6dc 58Bsm1DxMxGGTJssF3Tq20NKLQHxjdbV6fiCHDBMswrZAx+1BtiHMwaLlpvIcyNLPsGH Sp6LSzrBmydDx00zWt7FALcH2Jwytn1eV2wiytXMHvCR4yXw5i6zc114csuaoOl1PBlF jUIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iDvIvZnE; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-47492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47492-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCVl1AGZHlTpmenFMFPwjlvDLa5hjW7lvgrVxjVBL+FYWqFWlP7Nzp3Aj9g8mVC2nCN58N+hihY1yzwhq4MvvH/dG2LW9mrRECIu0OCA9w== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c17-20020aa7d611000000b0055f48b49d0esi2056950edr.427.2024.01.31.17.18.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 17:18:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47492-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=iDvIvZnE; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-47492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47492-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 5F8101F239F7 for ; Thu, 1 Feb 2024 01:18:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 009A14A2A; Thu, 1 Feb 2024 01:18:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iDvIvZnE" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 758C93FE0; Thu, 1 Feb 2024 01:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706750280; cv=none; b=EX7k+jmj04XbHygzgyaw1mp48MwLAmDbRObsCYtbsPfq6of5RX4H0OPU3xWR5Fg5s/7wneTUUf0s8qLT2AYgNSD2I2uxHm0MWPu4GMkaRgyjcV/Kdbpd9A/SiZA3xuAULgfI5pylxo+cprLtBLQ2eNk9nGHIRvtvpNItbknQaVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706750280; c=relaxed/simple; bh=rafLIQNRvh6FE4ao1mLQpcBjXiqTD1MtuIE/eGlZ40E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pUUdBV6kUHZh/f5bTUJGBUBZUQdpfb0XJUU6t8IwXqJZtq1V/JxFxiymbp9ML1Ln16ur3N5/3F360dVZVkmtWnoZUb5BedN/V9CE/FqsweF6CVDsUG3IPA4TOyk/FI9zE7oLUnVQcWOpZ/DQv9RD2cZcpKTkBip8fkskbZJzoqc= ARC-Authentication-Results:i=1; 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=iDvIvZnE; arc=none smtp.client-ip=192.198.163.9 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=1706750279; x=1738286279; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=rafLIQNRvh6FE4ao1mLQpcBjXiqTD1MtuIE/eGlZ40E=; b=iDvIvZnEgGwiVQbvIZMRBthC7pD5SvYWrlx4r1oJP17gEGtEKh63TGiN qFPy5De6tXE1qnL5DtZDwsLjf0641+0MtDcQ1584Up3mI6qUV5ECtoHMM /8LHL74zh+dt8tZrscpLVxBhVtO4o7bZnbuZVQHPN91f5XjvqiRAkFpkn ACGuK3X2AaR7oMUxvTyoeZ/Cyi+fS20QyfYWDMQK+qi706Ze5LuBnSnu9 ah4JVPG+dXjihN6Vg3UyfKB0HCGRDbh0hMmOQ1GAMA60X93xD3r8w8S58 NinmgZgCn+uL0rAXIfPM3ws4s85GPmU0KqMak97NZfLlK4wC1icadMKnG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="10534906" X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="10534906" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 17:17:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="4233163" Received: from aschofie-mobl2.amr.corp.intel.com (HELO aschofie-mobl2) ([10.209.39.51]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 17:17:57 -0800 Date: Wed, 31 Jan 2024 17:17:55 -0800 From: Alison Schofield To: Ira Weiny Cc: Dan Williams , Jonathan Cameron , Davidlohr Bueso , Dave Jiang , Vishal Verma , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, linux-cxl@vger.kernel.org Subject: Re: [PATCH 2/2] cxl/trace: Remove unnecessary memcpy's Message-ID: References: <20240131-cxl-cper-fixups-v1-0-335c85b1d77b@intel.com> <20240131-cxl-cper-fixups-v1-2-335c85b1d77b@intel.com> 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-Disposition: inline In-Reply-To: <20240131-cxl-cper-fixups-v1-2-335c85b1d77b@intel.com> On Wed, Jan 31, 2024 at 03:55:39PM -0800, Ira Weiny wrote: > CPER events don't have UUIDs. Therefore UUIDs were removed from the > records passed to trace events and replaced with hard coded values. > > As pointed out by Jonathan, the new defines for the UUIDs present a more > efficient way to assign UUID in trace records.[1] > > Replace memcpy's with the use of static data. Reviewed-by: Alison Schofield > > [1] https://lore.kernel.org/all/20240108132325.00000e9c@Huawei.com/ > > Suggested-by: Jonathan Cameron > Signed-off-by: Ira Weiny > --- > drivers/cxl/core/trace.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h > index 89445435303a..bdf117a33744 100644 > --- a/drivers/cxl/core/trace.h > +++ b/drivers/cxl/core/trace.h > @@ -338,7 +338,7 @@ TRACE_EVENT(cxl_general_media, > > TP_fast_assign( > CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); > - memcpy(&__entry->hdr_uuid, &CXL_EVENT_GEN_MEDIA_UUID, sizeof(uuid_t)); > + __entry->hdr_uuid = CXL_EVENT_GEN_MEDIA_UUID; > > /* General Media */ > __entry->dpa = le64_to_cpu(rec->phys_addr); > @@ -425,7 +425,7 @@ TRACE_EVENT(cxl_dram, > > TP_fast_assign( > CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); > - memcpy(&__entry->hdr_uuid, &CXL_EVENT_DRAM_UUID, sizeof(uuid_t)); > + __entry->hdr_uuid = CXL_EVENT_DRAM_UUID; > > /* DRAM */ > __entry->dpa = le64_to_cpu(rec->phys_addr); > @@ -573,7 +573,7 @@ TRACE_EVENT(cxl_memory_module, > > TP_fast_assign( > CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); > - memcpy(&__entry->hdr_uuid, &CXL_EVENT_MEM_MODULE_UUID, sizeof(uuid_t)); > + __entry->hdr_uuid = CXL_EVENT_MEM_MODULE_UUID; > > /* Memory Module Event */ > __entry->event_type = rec->event_type; > > -- > 2.43.0 >