Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1323647rwb; Tue, 27 Sep 2022 11:19:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6U3W7GCQ4ZrUOErGItccX0h6E0u2MYhiS/AnJ1x6UD9yesxQ3wdRLkid5DFhxUP5+v48FQ X-Received: by 2002:a17:90b:1b0a:b0:203:3947:1a73 with SMTP id nu10-20020a17090b1b0a00b0020339471a73mr5935242pjb.43.1664302791164; Tue, 27 Sep 2022 11:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664302791; cv=none; d=google.com; s=arc-20160816; b=i735rWZ2u+xns2xd96UrnVR0Nx8Pb26wiOEBh3WtJrkEL+zfUkuOSmhudPtIHah+o4 sRhAvmd0arfGIrKBY2l+WL02dcT0gVfEiptFATfWtQot0Ib/wNHskfz8YwQSpxoR2+Vs hXX4yHkuymRq1gkL/Y9DX0LfjqhRR7HmCs2/jf/jACtcPkMBr8w1n74OAp/KAzxlsDz9 mZL79YS7Az3HwYT5qKUTIunDlsPUgKDt64YvgEkhoKTSsKy4kPKZVFn5nHmRPZ2jBlgK cE68c1INBqdPPbaHsDbh/KWBp1zmCbDP72rdcqXEgRLVCLHhhN5bCsowlXA24fvS5u9r 2VwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=WeSYI6+HndOX7LQA3BGE3n6foH9E/oZjKih8sf0gJcY=; b=AqBh30WKpS0wuczKk1OMNX/QX4/6sYII1Lg9djba7gwapvXyPrTfouGvKFNhX4tTJR E7VuIv884+6wTF8UvxFQFMS9zhcXhx08bLwXjjcjmiZVg9A/XGjjDV2ww53VASXkbnLB dbxfcbT1w+AV/4RuircwQd4HXy2VDr/j7UikYSpFGu2AOInC/rjLnznvLzV5VZhXEZ4h SU3etA/RHT0Bc6vWdYl55xTsvsX0yNlFNkMNcFyVop8Pa6kS50Br/MHzCq0p0HIjMZ/f Lkr3UiwbMGG1RY2E9JTN3bd64xOOJ4gNsO+3WaigtA84f2Mebo3nwQJ9lAFS8pFYliap dUJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a17090a9bca00b001fbc6ba91besi15154040pjw.96.2022.09.27.11.19.39; Tue, 27 Sep 2022 11:19:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233257AbiI0Qrv (ORCPT + 99 others); Tue, 27 Sep 2022 12:47:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233216AbiI0Qr0 (ORCPT ); Tue, 27 Sep 2022 12:47:26 -0400 Received: from mx.gpxsee.org (mx.gpxsee.org [37.205.14.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9EF3EB6570; Tue, 27 Sep 2022 09:46:12 -0700 (PDT) Received: from [192.168.4.25] (unknown [62.77.71.229]) by mx.gpxsee.org (Postfix) with ESMTPSA id 28C3A46FC; Tue, 27 Sep 2022 18:46:10 +0200 (CEST) Message-ID: Date: Tue, 27 Sep 2022 18:46:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH V4 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support Content-Language: en-US To: Lizhi Hou , vkoul@kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, trix@redhat.com Cc: max.zhen@amd.com, sonal.santan@amd.com, larry.liu@amd.com, brian.xu@amd.com References: <1663871905-60498-1-git-send-email-lizhi.hou@amd.com> <1663871905-60498-3-git-send-email-lizhi.hou@amd.com> <64388266-1707-ee20-c3ab-edb67ada68dc@amd.com> From: =?UTF-8?Q?Martin_T=c5=afma?= In-Reply-To: <64388266-1707-ee20-c3ab-edb67ada68dc@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27. 09. 22 18:28, Lizhi Hou wrote: > Okay, I got the point. How about changing request/remove APIs to > enable/disable APIs as below > >      xdma_enable_user_irq(struct platform_device *pdev, u32 > user_irq_index, u32 *irq) > >             user_irq_index: user logic interrupt wire index. (XDMA > driver determines how system IRQs are mapped to DMA channels and user > logic wires) > >             irq: IRQ number returned for registering interrupt handler > (request_irq()) or passing to existing platform driver. > >     xdma_disable_user_irq(struct platform_device *pdev, u32 > user_irq_index) > > Does this make sense to you? > I think even the "irq" parameter in the enable function is surplus as the parent driver (the driver of the actual PCIe card) knows* what PCI irq he has to allocate without XDMA providing the number. xdma_enable_user_irq(struct platform_device *pdev, u32 user_irq_index); xdma_disable_user_irq(struct platform_device *pdev, u32 user_irq_index); should be all that is needed. M. * something like: pci_irq_vector((pdev), PCI_BAR_ID) + NUM_C2H_CHANNELS + NUM_H2C_CHANNELS can be used from the PCIe driver