Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1572101rdb; Mon, 8 Jan 2024 03:49:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4/jTfmLGVejQV8ptry58PBEjK1J/+Eu8H4H1uSkxvDgxthlS9mjR+BiGUclgad/WKgpFh X-Received: by 2002:ac2:59d9:0:b0:50e:8e94:bcfe with SMTP id x25-20020ac259d9000000b0050e8e94bcfemr838612lfn.64.1704714566817; Mon, 08 Jan 2024 03:49:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704714566; cv=pass; d=google.com; s=arc-20160816; b=n/mIe0Ip1+7SKokf54cBrR2LiVm4ZqUEh9/U2rsJ/X5f1AbnQn0m6FLusrYmkiwi+R VyT2vthbgHepLnQRIWMDrj+GMCJ3rQiLKIuyHn162O7i3YffHAPKUqj0vzaPgKl1ksY4 /Yrugyji3rJDWubZJ3uoFOKdljfD+iv0A2n2bACS/LdzC98jLokE9GsWrsOhGP7vktfZ o6bwqxuQf+hkZGfa4LkBqytXn/ot4/9/Za+jqgBPCDrvuMZLWjdPJBWBZHUSMz7fZsRQ Y7DVTQ3PmgxfFt7UZY17ETmqZ63ZohUhNriiiePD/JsI7LSlQcVeKlfyRJrTAKA7KAmJ a9Ww== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=E42vZcZ2BbEHi75k9DFeMkkatq2SZZjHE5MFSQWyd5g=; fh=6jtHWQbqzCBtEabNWxeGTtfkFFAUO2sG8WDJGv6QH4E=; b=G+74J5vVxy+6fsAPwEaW2m8E/p6ne1oDgebfOp5xUygguG1vdJXHbKoFfgiyC0nM5u mcwMC8MkpgaI8wgQpv1wps93GghimafuwAgFGmbz2r4oks9CGbwY+aNtv7GtlJZcawbd I14o9G+eQ6PX9GggIannE55vaClLvtwkJlc51+lC+g7iNqs510ttJRxMWkrl7sQSD0Dt xWQziZvNdaJkWZpNLYq7DTbxuxHETFFhf62u9+si+jzthmM0mc5D3t+Dl7TbexpBMEdk q1zWdCPAHcrnhnjMaoDx/NcfIO5IRDgzRjWtYL4cY49PC0D5ykNg/QVTrrAUf7oceY9n oOzQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=moOlMLas; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-19455-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id da27-20020a056402177b00b005532b0414b0si3018365edb.384.2024.01.08.03.49.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 03:49:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19455-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=moOlMLas; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-19455-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19455-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 574351F22898 for ; Mon, 8 Jan 2024 11:49:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E13E21A06; Mon, 8 Jan 2024 11:49:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="moOlMLas" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2066.outbound.protection.outlook.com [40.107.101.66]) (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 F2E5729415; Mon, 8 Jan 2024 11:49:14 +0000 (UTC) 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=ITFhNkFfcfk35Aw2jg2K/nT8FC2d8mTidnw2G7NAhlRR6I4buI+4WnTDR23jyjtTJNCUppJ0B9l+EfoI/bLdQeQ+cSGgeX4ytK6yahfWvSUhA7ZtHtBDna6hz31vL1tVtb8BzM/e3u+5ONdqfIIMhqDl8kw0S9RY3LU0npa524vW5Ht0OvAQRDc1FPaCNDqHjHsFkIfryRhdSuy0Xu8GiPhONpmMw1E6G6u5PQ5P3gmp2ZGxNihek8BRZM2naUGfcSuD69yb668B+6Lcxi9GnKc1hmsG8B3lHk+M0RQG+Z0VK2tssh+E35E3nJjF6y7hLlwdwoCk5ow2bpkJRsGtQw== 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=E42vZcZ2BbEHi75k9DFeMkkatq2SZZjHE5MFSQWyd5g=; b=RCBxzn38RwPSl99UVjrDijtP64pWZnEYA+0TPO7ixJkWqBPd/muo3s3u1F2YOxK80DalxwxgnIxM0YVz9Wur98On/vjZ9poDA4xr/xF3EM/TJNov77mQSqiBBEJT5zM/qYluPTynJmB2X1elzM9/+96K12eZKJrV081rE+AWi9vkCEpw/g/yiIOG3FnCnERGRahc0+zBKpKOBz1SrRYFrtOEWr47raY8BxCoXvUskp2XexNNfYJQhpQICKLYnJ30Ay0CcZe/uMYtO9PMIJ9DTmxrqwdbLA4H9RxPSfCe0GwWldz4xhE8yB2AauhNFwigySeUbChM+lDjNR0+Xt8Kfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=E42vZcZ2BbEHi75k9DFeMkkatq2SZZjHE5MFSQWyd5g=; b=moOlMLasLi/VZ+ST/9//WvckUcxZVLRHXJQ6MUCaVGRESGMpsFSVOSov8PoeevNhvs+BZPTeIxfCKXI0X4k9QWbTKEaImATxk7q9xubIVKVubVHl9BuR9A6ec21qMXp+HFnEfjeliVuGLtfq+gzWCdafqqVLJk67RCo9DCbzRp8= Received: from PH8PR15CA0022.namprd15.prod.outlook.com (2603:10b6:510:2d2::19) by DS7PR12MB6023.namprd12.prod.outlook.com (2603:10b6:8:85::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Mon, 8 Jan 2024 11:49:11 +0000 Received: from SA2PEPF000015CD.namprd03.prod.outlook.com (2603:10b6:510:2d2:cafe::4b) by PH8PR15CA0022.outlook.office365.com (2603:10b6:510:2d2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21 via Frontend Transport; Mon, 8 Jan 2024 11:49:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF000015CD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7181.13 via Frontend Transport; Mon, 8 Jan 2024 11:49:10 +0000 Received: from rric.localdomain (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 8 Jan 2024 05:49:07 -0600 From: Robert Richter To: Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Jonathan Cameron , Dave Jiang , Davidlohr Bueso CC: , , "Rafael J. Wysocki" , Len Brown , Robert Richter Subject: [PATCH v2 0/3] CDAT updates and fixes Date: Mon, 8 Jan 2024 12:48:30 +0100 Message-ID: <20240108114833.241710-1-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CD:EE_|DS7PR12MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: 4963e9ea-aa66-4595-4368-08dc103fd406 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bHuw+X8CBxC1M8Cb+gh+YAY6g8Pk/l2SUlrRlXYbCFRgrIslqZFTHc+PccIwbmlwWq74XUVWaHDw4KxMoIMcV37POCmjAodF1VndIwyuW9YYkpXhrAVK6CivzUJEumqSWxqsQYARkL1KnOJMovd16euwpl0pExReQzA2AneSj3cY2ga/Lb/RpDNjFdJcj2mlzDVih8zmWdDs+Q2pVTToDqzcD0aUObvjr3wCB1EUWmS6lQzVLa9EAhqAmWcXKYi0yosQgKVkkjWG3bslNLzM8UWeC67tl99655hyIErLE0IlpyJi01ERUsB64gt4tEvp5rr4R/Eh3d8rwuLaxQsyrTZQ5Fx1Y+0WSCNdORIKDBb11PzSjBO5VWE74IcoIxYhfhVaw++iqym3LpZHjgoHySgg2Ikdi5cRUqSdPLlKh3C3vwJn7QSts/Sulh2eNpgGscCudkVDkpp7rl2Zyi6PRXl44/3DYB9tdLbH8JALHTqcBmaXzj0F/+4+v1k9sbkmb1UpxnKKaqRS5iuJTwSD4/aqIGMn8mq8DNrq3DRE8Zenot1o1qlfhLWVe1DmAZZ4cQeQjlbTSFtMYs5h+MgD2LIn+r+Lt9E4jCk8tnfdmeHgXO7y0rgE8Zxq76mqRNMCK1eg9OH4FQM0xophy6iXzyeG2z60YBxNmmKx2Lhs5plbBvoxyaUqbCLHmbxFh/crWsG/2qrQt16eChtE/lmU96OATErWwvikeM5lSlkbeNmxLvK167Vn2nDwcMwU1hpRrvVCxuYowKvhjz02EdM2gQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(136003)(396003)(376002)(39860400002)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(82310400011)(36840700001)(46966006)(40470700004)(40460700003)(40480700001)(26005)(2616005)(1076003)(426003)(336012)(6666004)(478600001)(966005)(82740400003)(36860700001)(36756003)(356005)(81166007)(2906002)(15650500001)(5660300002)(7416002)(41300700001)(47076005)(83380400001)(16526019)(110136005)(70206006)(54906003)(316002)(70586007)(4326008)(8936002)(8676002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2024 11:49:10.5150 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4963e9ea-aa66-4595-4368-08dc103fd406 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015CD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6023 Some CDAT related updates and fixes. Patch #3 does not depend on the previous patches and could be applied separately. See [1] for v1. There is some rework going on [2] which might require a v3 for patches #1 and #2. References: [1] https://patchwork.kernel.org/project/cxl/patch/ZVfJ6Fxidvw_gz7r@rric.localdomain/ [2] https://patchwork.kernel.org/project/cxl/patch/170261791914.1714654.6447680285357545638.stgit@dwillia2-xfh.jf.intel.com/ Changelog: v2: * rebased onto cxl/next (e16bf7e015d7) * renamed struct cdat_doe to struct cdat_doe_rsp and also local pointers accordingly to buf/rsp. * added comment that the CDAT table has space for a DOE header at the beginning * use DECLARE_FLEX_ARRAY() macro in struct cdat_doe_rsp * moved the rename to doe_mb variable into separate patch * added Reviewed-by tag * added patch: lib/firmware_table: Provide buffer length argument to cdat_table_parse() Robert Richter (3): cxl/pci: Rename DOE mailbox handle to doe_mb cxl/pci: Get rid of pointer arithmetic reading CDAT table lib/firmware_table: Provide buffer length argument to cdat_table_parse() drivers/acpi/tables.c | 2 +- drivers/cxl/core/cdat.c | 6 +-- drivers/cxl/core/pci.c | 83 ++++++++++++++++++++-------------------- drivers/cxl/cxlpci.h | 19 +++++++++ include/linux/fw_table.h | 4 +- lib/fw_table.c | 15 +++++--- 6 files changed, 78 insertions(+), 51 deletions(-) base-commit: e16bf7e015d75fdd805528bedaf285fcb71dad2a -- 2.39.2