From patchwork Mon Jan 23 10:10:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 13111921 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A3A0C25B50 for ; Mon, 23 Jan 2023 10:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231639AbjAWKUO (ORCPT ); Mon, 23 Jan 2023 05:20:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232004AbjAWKUN (ORCPT ); Mon, 23 Jan 2023 05:20:13 -0500 X-Greylist: delayed 355 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 23 Jan 2023 02:20:10 PST Received: from mailout2.hostsharing.net (mailout2.hostsharing.net [83.223.78.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 583DA113E2; Mon, 23 Jan 2023 02:20:10 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by mailout2.hostsharing.net (Postfix) with ESMTPS id 1BF4410189E10; Mon, 23 Jan 2023 11:14:13 +0100 (CET) Received: from localhost (unknown [89.246.108.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id EB416600D2E1; Mon, 23 Jan 2023 11:14:12 +0100 (CET) X-Mailbox-Line: From 4dba01ff87d630abdd5a09d52e954d3c212d2018 Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Mon, 23 Jan 2023 11:10:00 +0100 Subject: [PATCH v2 00/10] Collection of DOE material To: Bjorn Helgaas , linux-pci@vger.kernel.org Cc: Gregory Price , Ira Weiny , Jonathan Cameron , Dan Williams , Alison Schofield , Vishal Verma , Dave Jiang , "Li, Ming" , Hillf Danton , Ben Widawsky , linuxarm@huawei.com, linux-cxl@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org Collection of DOE material, v2: * Fix WARN splat reported by Gregory Price * Migrate to synchronous API * Create DOE mailboxes in PCI core instead of in drivers * No longer require request and response size to be multiple of 4 bytes This is in preparation for CMA device authentication (PCIe r6.0, sec 6.31), which performs DOE exchanges of irregular size and is going to be handled in the PCI core. The synchronous API reduces code size for DOE users. Link to CMA development branch: https://github.com/l1k/linux/commits/doe Changes v1 -> v2: * [PATCH v2 01/10] PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y * Add note in kernel-doc of pci_doe_submit_task() that pci_doe_task must be allocated on the stack (Jonathan) * [PATCH v2 05/10] PCI/DOE: Make asynchronous API private * Deduplicate note in kernel-doc of struct pci_doe_task that caller need not initialize certain fields (Jonathan) Link to v1: https://lore.kernel.org/linux-pci/cover.1669608950.git.lukas@wunner.de/ Lukas Wunner (10): PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y PCI/DOE: Provide synchronous API and use it internally cxl/pci: Use synchronous API for DOE PCI/DOE: Make asynchronous API private PCI/DOE: Allow mailbox creation without devres management PCI/DOE: Create mailboxes on device enumeration cxl/pci: Use CDAT DOE mailbox created by PCI core PCI/DOE: Make mailbox creation API private PCI/DOE: Relax restrictions on request and response size .clang-format | 1 - drivers/cxl/core/pci.c | 89 ++++-------- drivers/cxl/cxlmem.h | 3 - drivers/cxl/pci.c | 49 ------- drivers/pci/doe.c | 315 ++++++++++++++++++++++++++++++---------- drivers/pci/pci.h | 10 ++ drivers/pci/probe.c | 1 + drivers/pci/remove.c | 2 + include/linux/pci-doe.h | 62 +------- include/linux/pci.h | 3 + 10 files changed, 283 insertions(+), 252 deletions(-)