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 EFD42FA3740 for ; Sun, 30 Oct 2022 08:38:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229833AbiJ3Iiq (ORCPT ); Sun, 30 Oct 2022 04:38:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiJ3Iio (ORCPT ); Sun, 30 Oct 2022 04:38:44 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE6DDA0; Sun, 30 Oct 2022 01:38:43 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id E56E968AFE; Sun, 30 Oct 2022 09:38:38 +0100 (CET) Date: Sun, 30 Oct 2022 09:38:38 +0100 From: Christoph Hellwig To: Bjorn Helgaas Cc: Jonathan Cameron , Dan Williams , Ira Weiny , Davidlohr Bueso , dave.jiang@intel.com, alison.schofield@intel.com, bwidawsk@kernel.org, vishal.l.verma@intel.com, a.manzanares@samsung.com, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH 1/2] cxl/pci: Add generic MSI-X/MSI irq support Message-ID: <20221030083838.GD4949@lst.de> References: <20221024133633.00000467@huawei.com> <20221025232535.GA579167@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221025232535.GA579167@bhelgaas> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 25, 2022 at 06:25:35PM -0500, Bjorn Helgaas wrote: > Is this cxl code allocating vectors for devices that might also be > claimed by portdrv? I assume not because that sounds like a problem. > > Ugh. I always feel like the portdrv design must be sub-optimal > because this seems so hard to do cleanly. Yes, portdrv is a mess. And I fear we really need to bite the bullet rather sooner than later to sort much of this out by lifting all the logic to the core and just keep the "drivers" around for sysfs pretence. And I think CXL is trying to run into a similar (but not quiete as bad) mess with it's overly modular approach. In either case the right thing would be to do anough early setup to find the requird number of interrupts and highest interrupt number and just request that once.