From mboxrd@z Thu Jan 1 00:00:00 1970 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 DB12FC32793 for ; Wed, 18 Jan 2023 15:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbjARP3L (ORCPT ); Wed, 18 Jan 2023 10:29:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbjARP2q (ORCPT ); Wed, 18 Jan 2023 10:28:46 -0500 Received: from mx.gpxsee.org (mx.gpxsee.org [37.205.14.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2081346141; Wed, 18 Jan 2023 07:28:14 -0800 (PST) Received: from [192.168.4.25] (unknown [62.77.71.229]) by mx.gpxsee.org (Postfix) with ESMTPSA id A15943758A; Wed, 18 Jan 2023 16:28:13 +0100 (CET) Message-ID: <85d1e660-1df4-6e84-a329-751197ef7eec@gpxsee.org> Date: Wed, 18 Jan 2023 16:28:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [RESEND PATCH V11 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support Content-Language: en-US To: Vinod Koul , Lizhi Hou Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, max.zhen@amd.com, sonal.santan@amd.com, larry.liu@amd.com, brian.xu@amd.com References: <1673988842-43631-1-git-send-email-lizhi.hou@amd.com> <1673988842-43631-3-git-send-email-lizhi.hou@amd.com> From: =?UTF-8?Q?Martin_T=c5=afma?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> +++ b/include/linux/dma/amd_xdma.h >> @@ -0,0 +1,16 @@ >> +/* SPDX-License-Identifier: GPL-2.0-or-later */ >> +/* >> + * Copyright (C) 2022, Advanced Micro Devices, Inc. >> + */ >> + >> +#ifndef _DMAENGINE_AMD_XDMA_H >> +#define _DMAENGINE_AMD_XDMA_H >> + >> +#include >> +#include >> + >> +int xdma_enable_user_irq(struct platform_device *pdev, u32 irq_num); >> +void xdma_disable_user_irq(struct platform_device *pdev, u32 irq_num); >> +int xdma_get_user_irq(struct platform_device *pdev, u32 user_irq_index); > > who is the user of these APIs? It is not clear to me how this is to be > used... > The APIs are used by the PCIe card devices/drivers that use XDMA. Without them the "user IRQs" provided by the XDMA HW can not be used by the PCIe card drivers. If you look at the XDMA HW overview: https://docs.xilinx.com/r/en-US/pg195-pcie-dma/Overview?tocId=O_EMX26J5IsdubL4i3XJ_w those APIs control the "IRQ module" block. For a linux driver using them see the mgb4 v4l2 driver: https://patchwork.kernel.org/project/linux-media/patch/20230113172636.2590-2-tumic@gpxsee.org/ M.