Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp44681lqm; Mon, 10 Jun 2024 12:08:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyT4cmM4fHTWQI8HJ5j8A9RwvRsaz6/B2gb5aTW05SI4MVuVIn9vVD1KL6d0T+90E9r8HFe/A8bAgcIRJ2GoJCJWWvL06TKU2MyvYuOA== X-Google-Smtp-Source: AGHT+IFvqu9RSZD1HbSBJLMl5Vsyx8X2mJbUISidamLYmeaIUhSHf0IkJY94FEHDlFV0WVakctdv X-Received: by 2002:a50:f60d:0:b0:57c:57af:6e88 with SMTP id 4fb4d7f45d1cf-57c90d29503mr380530a12.9.1718046494015; Mon, 10 Jun 2024 12:08:14 -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 4fb4d7f45d1cf-57c61200c74si3226408a12.288.2024.06.10.12.08.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 12:08:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208773-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=@amd.com header.s=selector1 header.b=uQoZkpWe; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-208773-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208773-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 9AD381F22D9F for ; Mon, 10 Jun 2024 19:08:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB22D14C5BE; Mon, 10 Jun 2024 19:07:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="uQoZkpWe" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2045.outbound.protection.outlook.com [40.107.220.45]) (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 1871C85285; Mon, 10 Jun 2024 19:07:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.45 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718046474; cv=fail; b=J8sv378JWKtrGCFgeu71S6Zvo766+7nUEPvdZBfEuW6UP1eTwgQOlj/elk1gZ7cZ8bmi+jvpyiLwz8NCbujvRPX4idZVzLAwBYnhPanE89+F+yM/koY7Z89nvc1eHV3UphtsjZA1ilQ8EFVL6pmd6d50EjQHqZrFM5drtkYCws0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718046474; c=relaxed/simple; bh=3jFigltHPS2kgoXe8GTXcKqYEieww0ib0744r1i6yss=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To: Content-Type:MIME-Version; b=lAz8Ks9XqplLefyHQJWyxsLUE7vMTLv2Q5877NI9FcIS5vd1vx5PoCKIcy6e5vSGsTo7RDPmQKZzIDN+l3TGrMSAIeefrjJQmh3S4mZ7zt83BD9jicjDnquOs1BvjZ9hsG9QStegfuwhWvff4kcGvOFhzRoFrEwcided+Fzt7aA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=uQoZkpWe; arc=fail smtp.client-ip=40.107.220.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lrFpiaXQiQyTlhFiJkYEpyD+6MfhYrwgVsDKL7Ce6FfcePfBKHJozXtw1e6OtFIoDjWskjCWn8Asm+DOlZ3eWuvXBj26v/g0j/neeRXmCrnIqVd+pLZ9ROABV4XH3lZX/2nezyteLMM6oBYOSk4jOldGmVqdDr/UJLOPBGGgBG/qLc0XiQiu3DS8wBBkbhtOkiDS8GSTy6F/DSH2z3s5lEOgvBfaNM+d+O4to/Uwc4Zw003ymmRNWHLLF0YhVIDtBT3dzUY5u53zeG4c14LCu/lQBJEwNxPMwfWVBqwS0irdiDB1SStnw2hbMpaE24zdkSJb0NdX9UGA96vuNVY5DA== 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=V6Bvh10FB5Xl8XvNWEkEzpdOU5MervGmJltn4QfnkuU=; b=FNI+Ub9WH8kCHwYxCk039K2uA8zHLNFer2OFcI9nshGLS+KpAmG6wSadjSmAyKfqtJ7/KGDx0jN9cul687+iVoM2xfuRwNoX2cYhA8sP/4ZDsuxspuqojT0axmtaeUZVwHH+uYT4eyODSqZoCrB/h03DJjBJ0j1yJr/bkDm+L0mJvmMebzn2KrZGxkXsMEcBQZ5z/dxqo6tL0vK6JeDBs4DvGpx81aqhG6D8bUKwI2dRBYIKKkhg2YHnG+eMX5sYbXgwDzLKsfndL9JZYieCQrvNk+3XY6DvkO496TWthq244SJTeSCEfH8TGaVXvTef55ZVtvgQAXQDarX95eYK6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V6Bvh10FB5Xl8XvNWEkEzpdOU5MervGmJltn4QfnkuU=; b=uQoZkpWeeGuJJ8CDiiBUDb+6qMZMDQ3ASmgbq7YRNEle8+Nc2MgM/eIrc3KKY+5XThlVq0BIUXA+bwYYGOSiyGbJ+CVsfigY6AMxXB+iWHkzRJUZOXI+OFfU7t2eNrNxmsytFfM6CKc1gWik/B5W0dZZWpzMn50pfr2YZGOp934= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BYAPR12MB2869.namprd12.prod.outlook.com (2603:10b6:a03:132::30) by DM3PR12MB9391.namprd12.prod.outlook.com (2603:10b6:0:3d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Mon, 10 Jun 2024 19:07:50 +0000 Received: from BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::56a2:cd83:43e4:fad0]) by BYAPR12MB2869.namprd12.prod.outlook.com ([fe80::56a2:cd83:43e4:fad0%5]) with mapi id 15.20.7633.036; Mon, 10 Jun 2024 19:07:49 +0000 Subject: Re: [PATCH 2/4] acpi/ghes, efi/cper: Recognize and process CXL Protocol Errors. To: Jonathan Cameron Cc: Alison Schofield , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, Ard Biesheuvel , Vishal Verma , Ira Weiny , Dan Williams , Yazen Ghannam , Bowman Terry References: <20240522150839.27578-1-Smita.KoralahalliChannabasappa@amd.com> <20240522150839.27578-3-Smita.KoralahalliChannabasappa@amd.com> <09e0d961-e19f-30d6-5306-1b35609b7d79@amd.com> <20240607162622.00000819@Huawei.com> From: Smita Koralahalli Message-ID: <7fe041ed-9ee3-7cbe-ddce-fb727fba12c7@amd.com> Date: Mon, 10 Jun 2024 12:07:48 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 In-Reply-To: <20240607162622.00000819@Huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR03CA0265.namprd03.prod.outlook.com (2603:10b6:a03:3a0::30) To BYAPR12MB2869.namprd12.prod.outlook.com (2603:10b6:a03:132::30) 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: BYAPR12MB2869:EE_|DM3PR12MB9391:EE_ X-MS-Office365-Filtering-Correlation-Id: bd280052-4ebc-4ed7-b5fa-08dc89809f1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?K29KMlZJMk1uTEpVcWY4ZEFZVFJSa0FwSkZBY3FxWnZ3OGZmOE1TZEZTbkVL?= =?utf-8?B?Wmd3MEF1aEM1NzMycXpCUWlpczZyRmVwajIzVTZYVEZOeittRXdDNWhqWkxG?= =?utf-8?B?Z2grUXNGaEZ5Tng2ZWJzWGQraXdTblBLcHJFZHNGckJlM2l1Q2svUWtFZmo3?= =?utf-8?B?YllabVBmdDAwd0dvVDJKaEMwTGRNcThJeVhMT2pJclRBT2RlRk42MkJVN21M?= =?utf-8?B?cGUwcU5FenZjaUVkL3dNaXRsV29vT3BPaTljd0NSMnVmck9FdHJJMlNBWXp4?= =?utf-8?B?ZklIWkJCL3ZPR0RhdFROY1BvSlZU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FMFRJT01iQVdlQzBQSkUrSkxqMUFidjFDU1h2ajZvMDd5ZWc3Rk5V?= =?utf-8?B?SkhqY0dWWThIc01qRmhhbDJMQkpUWDQwSXN6M05kODJiUHJvWGJ1ZzBBS2FN?= =?utf-8?B?TFE4bFJ0S3B6dG0weUVHRUNjaE1YeGt1YzNVNUErNWFsNjk2ZXBFVU85eWwz?= =?utf-8?B?TG80LzgwNndCRUJteFI4c3J0c1diaVYxVHZEYWhnbU5TNERrdHQwSUN0WHFJ?= =?utf-8?B?c0xRRU9wR1N4MWdkMllFOEp0elRibGpKTGtXcmhYODAraTVCL2VuVjE0QVNi?= =?utf-8?B?K09BclRGRGUrVGUyQWZDbjFFS25neHlpUktzNndRcFNXNVh3ZDh2MXVTMkRX?= =?utf-8?B?V1dhYjBPYUt5UXdzb1BTR0ZMQ0xteWkvNzVGa0VVbklJcDNORzUwcDRqbUVn?= =?utf-8?B?RnNpbmlmZWNNSDAvTHNiYUNnekNmREZKRy91OStxc3l1Nk1ZemlRVzJ6Z0pv?= =?utf-8?B?WnpNcHc1YVNrRVlZS1RUTnJRU1FHdVFBcGdoOGRtbUNpd2JLQTZoZW5Od2l6?= =?utf-8?Q?PPNlDx7IMqSI9N0TqRNhHvAsHJPoCqa8eGJM5na?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB2869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aUtUYXRYbkw1ZEI1bVB3TGVFTGZtTzNQZ09idnNkSmRiTUE0bGhnTStCcWRD?= =?utf-8?B?MDVkcUFtVHd4WllwZWlYNEFjN3FsbFFOdGdSNFVFNXRidnpIa2tLVEhUZHZR?= =?utf-8?B?UTBoWmN3YmVMZDVLYnRxd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M2ZEcxVFJr?= =?utf-8?B?a3QwaDd5SkdrOUx2WnR5dk1kVzBlSDBsZWVIQkhWczd0SWRsUlA3QjdxZWNo?= =?utf-8?B?TTNHT21OTjdZdStrWXFrWGw4d0ZDYTk4eFowZllVYTdsdTNXWGZKMG01OVE4?= =?utf-8?B?NTRYc3JyWDI4aUErKzhsYlE2MS9UWGVNS3hDemttQkNQVmc2NmIreG51L2gx?= =?utf-8?Q?Bbzbx1yDBfsE2Rx4UpVQ/qk+b?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd280052-4ebc-4ed7-b5fa-08dc89809f1a X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2024 19:07:49.9099 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gp0KZHHsMl4Gkg0yCTKDQW3hSWEgY2SWnL/534JOStseKg5QWdl7+dJsxvQVuw8y6ucO6agwqctRWSGFy2XdTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9391 On 6/7/2024 8:26 AM, Jonathan Cameron wrote: > On Thu, 23 May 2024 14:21:40 -0700 > Smita Koralahalli wrote: > >> Hi Alison, >> >> On 5/22/2024 5:03 PM, Alison Schofield wrote: >>> On Wed, May 22, 2024 at 03:08:37PM +0000, Smita Koralahalli wrote: >>>> UEFI v2.10 section N.2.13 defines a CPER record for CXL Protocol errors. >>>> >>>> Add GHES support to detect CXL CPER Protocol Error Record and Cache Error >>>> Severity, Device ID, Device Serial number and CXL RAS capability struct in >>>> struct cxl_cper_prot_err. Include this struct as a member of struct >>>> cxl_cper_work_data. >>>> >>>> Signed-off-by: Smita Koralahalli [snip] >>>> + * The device ID or agent address is required for CXL RCD, CXL >>>> + * SLD, CXL LD, CXL Fabric Manager Managed LD, CXL Root Port, >>>> + * CXL Downstream Switch Port and CXL Upstream Switch Port. >>>> + */ >>>> + if (prot_err->agent_type <= 0x7 && prot_err->agent_type != RCH_DP) { >>> >>> For this check against agent_type, and the similar one below, would a boolean >>> array indexed by the agent type work? That would avoid the <= 0x7 and > 0x4 >>> below. It seems one array would suffice for this case, but naming it isn't obvious >>> to me. Maybe it'll be to you. >>> >>> Something similar to what is done for prot_err_agent_type_strs[] >>> >>> static const bool agent_requires_id_address_serial[] = { >>> true, /* RDC */ >>> false, /* RCH_DP */ > [RCD] = false, > > etc rather than comments would be neater. > Given two similar things already. Maybe time for a little structure. > > //with better name than this > struct agent_reqs { > bool sn; > bool sbdf; > }; > > static const agent_reqs agent_reqs[] = { > [RCD] = { .sn = false, .sbdf = true, }, > }; > > etc. > > Maybe just bring the the string in as well > > struct agent_info { > const char *string; > bool req_sn; > bool req_sbdf; > }; > > static const agent_info agent_info[] = { > [RD] = { > .string = "Restricted CXL Device", > .req_sn = false, > .req_sbdf = true, > }, > }; > > Values made up, but hopefully conveys that moving to having > all the data in one place makes it harder to forget stuff > for new entries etc. > Okay. I was considering 2D array without naming before. Something like: static const bool agent_requires_id_address[][] = { /* Device_ID, Serial_num */ {true, true}, /* RCD */ {false, false}, /* RCH_DP */ Let me change to array of structures if naming helps. Thanks, Smita [snip]