From patchwork Fri Dec 13 09:02:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13906688 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11DDFE7717D for ; Fri, 13 Dec 2024 09:03:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 90E4810EF69; Fri, 13 Dec 2024 09:03:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="c+pw5LVi"; dkim-atps=neutral Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id 218D210EF69 for ; Fri, 13 Dec 2024 09:03:06 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E045FA42772; Fri, 13 Dec 2024 09:01:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4BDBC4CED0; Fri, 13 Dec 2024 09:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734080584; bh=6M2BE/YkDncPuZAYofQG/dj3wcltiY44hkQ3DVP8cO4=; h=From:To:Cc:Subject:Date:From; b=c+pw5LVioue94aMM7KXv6oRGsk2Knm+Ag1MIpSZkmOu+1jQ0Zz92gEMdYkAJGmhse Zm5BTKiT9Q6qNeUcPFkv84NXignDv5NzzSe7aQpbtyiZHq1M6fSvQ//DOGusZL/gpa qG3m4djUjYFMRmY7Q8TeIPGJ7EabpfAZ+LF1Vx+XiU34GXIg6EysJVJGvfz/eoxJ9z HjA6j7kk4c1AIUDI/UuKe2hqK5LdobSatMwjfJmze12LoKtNT6nI3tZNFc2z1H0U8c uQiKSvhYEEkR9aOKL4AA9WX6K4dYDaK3dvN/54bZmI32HYxQKiPHb88b5OYOA3J3Zb nbG8O52CgWQbg== From: Arnd Bergmann To: Min Ma , Lizhi Hou , Oded Gabbay Cc: Arnd Bergmann , Jeffrey Hugo , Narendra Gutta , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] accel/amdxdna: use modern PM helpers Date: Fri, 13 Dec 2024 10:02:54 +0100 Message-Id: <20241213090259.68492-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause a build warning when CONFIG_PM is disabled: drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error: 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function] 343 | static int amdxdna_pmops_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~ drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error: 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function] 328 | static int amdxdna_pmops_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~ Change these to the modern replacements. Signed-off-by: Arnd Bergmann Reviewed-by: Lizhi Hou Tested-by: Lizhi Hou --- drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c index 02533732d4ca..b2342abdddc6 100644 --- a/drivers/accel/amdxdna/amdxdna_pci_drv.c +++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c @@ -390,8 +390,8 @@ static int amdxdna_rpmops_resume(struct device *dev) } static const struct dev_pm_ops amdxdna_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(amdxdna_pmops_suspend, amdxdna_pmops_resume) - SET_RUNTIME_PM_OPS(amdxdna_rpmops_suspend, amdxdna_rpmops_resume, NULL) + SYSTEM_SLEEP_PM_OPS(amdxdna_pmops_suspend, amdxdna_pmops_resume) + RUNTIME_PM_OPS(amdxdna_rpmops_suspend, amdxdna_rpmops_resume, NULL) }; static struct pci_driver amdxdna_pci_driver = { From patchwork Fri Dec 13 09:02:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13906689 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 673CFE77180 for ; Fri, 13 Dec 2024 09:03:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7CAC10EF6C; Fri, 13 Dec 2024 09:03:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="kxRpzPIZ"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAB3310EF6C for ; Fri, 13 Dec 2024 09:03:16 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6902B5C68E3; Fri, 13 Dec 2024 09:02:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87B13C4CED0; Fri, 13 Dec 2024 09:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734080595; bh=NizxC6ffABBIqBlStRdWBBxHvkeP+72l2DX9fzyIYCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kxRpzPIZnnnDBm/XykoqLZyTN+GsGvqQvgPCw1HSgyhujXWEKZPqdlBRDdvtGVtUk CG3+gWKfxHtFW7b/oQnIFLIHUjPCx8Vafi6IL1hUpdwtpo6EpceVegW8VGXjXxB1ej D9Z0n5GduLYhGzbbeGnYWNOOxtl3I5DE6Oz7bAQWlm2AC7WGJapuaqLTk9CBYhql2V adtOMV+DrPMMfVseR6EpzwtUSP1pNp60diN+yJ1xsmnut6JObdpNauEB2kpeWumXlp apt1M3ub6suN3nqA9FDiH0mvWfqPVEd1hjSEs8OBL5CSDiAld+U0qPsbyKAyogBxKG X2wocE0dxAA3g== From: Arnd Bergmann To: Min Ma , Lizhi Hou , Oded Gabbay , Jeffrey Hugo Cc: Arnd Bergmann , George Yang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] accel/amdxdna: add missing includes Date: Fri, 13 Dec 2024 10:02:55 +0100 Message-Id: <20241213090259.68492-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241213090259.68492-1-arnd@kernel.org> References: <20241213090259.68492-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann This driver fails to build in random configurations: drivers/accel/amdxdna/amdxdna_mailbox.c:357:8: error: unknown type name 'irqreturn_t' 357 | static irqreturn_t mailbox_irq_handler(int irq, void *p) | ^~~~~~~~~~~ drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_irq_handler': drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: error: 'IRQ_HANDLED' undeclared (first use in this function) 367 | return IRQ_HANDLED; | ^~~~~~~~~~~ drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: note: each undeclared identifier is reported only once for each function it appears in drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_rx_worker': drivers/accel/amdxdna/amdxdna_mailbox.c:395:25: error: implicit declaration of function 'disable_irq'; did you mean 'disable_work'? [-Wimplicit-function-declaration] 395 | disable_irq(mb_chann->msix_irq); | ^~~~~~~~~~~ drivers/accel/amdxdna/aie2_solver.c: In function 'remove_partition_node': drivers/accel/amdxdna/aie2_solver.c:121:9: error: implicit declaration of function 'kfree' [-Wimplicit-function-declaration] 121 | kfree(pt_node); | ^~~~~ drivers/accel/amdxdna/aie2_solver.c: In function 'get_free_partition': drivers/accel/amdxdna/aie2_solver.c:153:19: error: implicit declaration of function 'kzalloc' [-Wimplicit-function-declaration] 153 | pt_node = kzalloc(sizeof(*pt_node), GFP_KERNEL); Include the headers that have the necessary declarations. Fixes: c88d3325ae69 ("accel/amdxdna: Add hardware resource solver") Signed-off-by: Arnd Bergmann amdxdna: includ linux/interrupt.h Signed-off-by: Arnd Bergmann Reviewed-by: Jeffrey Hugo --- drivers/accel/amdxdna/aie2_solver.c | 1 + drivers/accel/amdxdna/amdxdna_mailbox.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/accel/amdxdna/aie2_solver.c b/drivers/accel/amdxdna/aie2_solver.c index a537c66589a4..0bbf91cad334 100644 --- a/drivers/accel/amdxdna/aie2_solver.c +++ b/drivers/accel/amdxdna/aie2_solver.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "aie2_solver.h" diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c index 415d99abaaa3..41bbc5796e11 100644 --- a/drivers/accel/amdxdna/amdxdna_mailbox.c +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c @@ -7,6 +7,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS #include