Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp368077pxa; Wed, 26 Aug 2020 12:51:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIF3lvpVPSbZ5QlJ1TNbHeDg1oY/qt/kDCxesBNghEwEOYVu02WhuTrTETXXm0vH7SUWn5 X-Received: by 2002:a50:d71c:: with SMTP id t28mr5916264edi.148.1598471510951; Wed, 26 Aug 2020 12:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598471510; cv=none; d=google.com; s=arc-20160816; b=fXxuRuTDorujG97PNGMd5Q9mJUwPolbNcAW+L7vZy4/L+oGiJTPMaK6BkHaEFFQ/gs 4NB4g3HXJFsyn/M/b8HRjdY8qVU9YGcjmH5veiwBql6SUtc0SFPuLu9SPCJSxdcIqZvW 3Y60Y0X35zzp1dxs0R7VO0nKPQRYJBoyRTXR/Pa2kh7NwQJbRNPYRrgPjcCJlDEB63JR ddne1JuqltHGBMi9fyGReNxx8eowfV9MUtpDwdvaYuu1h9ZTc0UIgxLkwgP99QzvjDiz MYgvSj5mrKG4bc3Xz7+DmwARXWh+GEw+EjHiY7U0JLg6Cp2fRFUABKURsQ1O7uByxzHg KogA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Lyh+OM9Dem9Z/kcK7+gNQJTzyczEFOEY6bG0/Arpun0=; b=pOmaI99JejsVPH1AmQSePQOl6iTNjIotPuplNJwYPoV92UHBpTKT5YTvFnVEgC180y mffRlz6WSK+nCFgNFaglkH1mBc2/wpLVeWBpK/WIfBATAad91R3cbu+XnuFAl3tDG5U2 iG3SRgM2LZt4FtzzegSJBD4GZleldwPV42rKRGv3vgcUecl/cbCiIgi+X4APQylRv5Pp GiQPu4+lFziWz6eIEmXyBNbgsgPHt0eXhVKiznN7OpFMAQHg/hZui8tkZHDB/DXHDfdf rNIPR2rTbD0WyBsbrMkwmmtfTAs4MsWS0ibqoqqmGAAJ8H1088zrLLxCQ2wOA0PQsQj5 XCXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EfWyyyYv; dkim=neutral (no key) header.i=@linutronix.de header.b=lwTtm5+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si2182255ejz.613.2020.08.26.12.51.24; Wed, 26 Aug 2020 12:51:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EfWyyyYv; dkim=neutral (no key) header.i=@linutronix.de header.b=lwTtm5+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727024AbgHZTro (ORCPT + 99 others); Wed, 26 Aug 2020 15:47:44 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:32946 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726783AbgHZTrl (ORCPT ); Wed, 26 Aug 2020 15:47:41 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598471258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Lyh+OM9Dem9Z/kcK7+gNQJTzyczEFOEY6bG0/Arpun0=; b=EfWyyyYv7YWdGg6ZlsB2Gvul0V5au5smJUJLpNMYZSeBiiHKLri6m/Tv5rd3ih560hoGVx nzH0lvvST7eWiS1oI2n1KsOHqXKtzHTxLZKpI9SJMhuG+jI5LovFGtPMOPIS2OeEiw7isO tmHV0B3teBdD8CSsdyyCabr4Y3t9FTxtENq7B0e0cMS6jhcUUVWnX0K+s+ywdP/VhxrhzZ AvJFcEhdDRbeNtKQ1LbQq2JWDBLeMZ2p9QqkeojW3Ekaz6euFWW9jBElfBZUz5/VBdDbaW wxAj9R70KvXLkL4n184+rXcNFpLiSbh7hiA6EXnDFal4H8EYpyU37gQ+3u6LTQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598471258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Lyh+OM9Dem9Z/kcK7+gNQJTzyczEFOEY6bG0/Arpun0=; b=lwTtm5+nHxlSQCA2aszVTEr9Qr/quwfcz0JOyWbmJI+tlH+mPCSRq5hNRIajB+9Hp6kRhm 8ERxa7qPC4M270AA== To: Marc Zyngier Cc: LKML , x86@kernel.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, Haiyang Zhang , Jon Derrick , Lu Baolu , Wei Liu , "K. Y. Srinivasan" , Stephen Hemminger , Steve Wahl , Dimitri Sivanich , Russ Anderson , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Greg Kroah-Hartman , "Rafael J. Wysocki" , Megha Dey , Jason Gunthorpe , Dave Jiang , Alex Williamson , Jacob Pan , Baolu Lu , Kevin Tian , Dan Williams Subject: Re: [patch V2 29/46] irqdomain/msi: Allow to override msi_domain_alloc/free_irqs() In-Reply-To: <87blix2pna.wl-maz@kernel.org> References: <20200826111628.794979401@linutronix.de> <20200826112333.526797548@linutronix.de> <87blix2pna.wl-maz@kernel.org> Date: Wed, 26 Aug 2020 21:47:38 +0200 Message-ID: <87zh6htcit.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26 2020 at 20:06, Marc Zyngier wrote: > On Wed, 26 Aug 2020 12:16:57 +0100, > Thomas Gleixner wrote: >> /** >> - * msi_domain_free_irqs - Free interrupts from a MSI interrupt @domain associated tp @dev >> - * @domain: The domain to managing the interrupts >> + * msi_domain_alloc_irqs - Allocate interrupts from a MSI interrupt domain >> + * @domain: The domain to allocate from >> * @dev: Pointer to device struct of the device for which the interrupts >> - * are free >> + * are allocated >> + * @nvec: The number of interrupts to allocate >> + * >> + * Returns 0 on success or an error code. >> */ >> -void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev) >> +int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, >> + int nvec) >> +{ >> + struct msi_domain_info *info = domain->host_data; >> + struct msi_domain_ops *ops = info->ops; > > Rework leftovers, I imagine. Hmm, no. How would it call ops->domain_alloc_irqs() without getting the ops. I know, that the diff is horrible, but don't blame me for it. diff sucks at times. >> + >> + return ops->domain_alloc_irqs(domain, dev, nvec); >> +} >> + >> +void __msi_domain_free_irqs(struct irq_domain *domain, struct device *dev) >> { >> struct msi_desc *desc; >> >> @@ -513,6 +525,20 @@ void msi_domain_free_irqs(struct irq_dom >> } >> >> /** >> + * __msi_domain_free_irqs - Free interrupts from a MSI interrupt @domain associated tp @dev > > Spurious __. Yup. Thanks, tglx