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 608E7C433F5 for ; Thu, 6 Jan 2022 15:49:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240679AbiAFPtV (ORCPT ); Thu, 6 Jan 2022 10:49:21 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:53588 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbiAFPtS (ORCPT ); Thu, 6 Jan 2022 10:49:18 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3A32A61B08 for ; Thu, 6 Jan 2022 15:49:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B991C36AE3; Thu, 6 Jan 2022 15:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641484157; bh=klQiBMSapQfM8vUCVTudBLqokTRfQL5g48tm5AURL0E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bgtN6KaGr7AYli1FkGfkJhdk/t0AeZMRxbPcZM6IySqbw/e/piZjcF/KYvvlbRSYp lToPwDHcrPtZa8JiNlVX29mivqLbRVrBNb7FBpnvnbMIWgKSs26eZ14AJsK+4+STXD RjupsMeNyBXqWPZKrAhuQ0yzIahRVPuafLqL+jeUUYuSyO3XlATjobda/5ZSC34byQ kW05SCf7y1Oe3K/naa9c98jazXvRAM6nrOFbkgErCyE4VtgGwAJefMNZlEJX+O11Nb 2M4Io2Ypehs3PvFo0FwMJ4ROm25cXTBCM5NqlsVXmGqWyN741dsC789Q+8HTn4swF0 KkxgiplxB9/pQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n5V0t-00GNgV-TO; Thu, 06 Jan 2022 15:49:16 +0000 Date: Thu, 06 Jan 2022 15:49:15 +0000 Message-ID: <87a6g8vp8k.wl-maz@kernel.org> From: Marc Zyngier To: John Garry Cc: Thomas Gleixner , chenxiang , Shameer Kolothum , "linux-kernel@vger.kernel.org" , "liuqi (BA)" Subject: Re: PCI MSI issue for maxcpus=1 In-Reply-To: <78615d08-1764-c895-f3b7-bfddfbcbdfb9@huawei.com> References: <78615d08-1764-c895-f3b7-bfddfbcbdfb9@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: john.garry@huawei.com, tglx@linutronix.de, chenxiang66@hisilicon.com, shameerali.kolothum.thodi@huawei.com, linux-kernel@vger.kernel.org, liuqi115@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On Wed, 05 Jan 2022 11:23:47 +0000, John Garry wrote: > > Hi Marc, > > Just a heads up, I noticed that commit 4c457e8cb75e ("genirq/msi: > Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set") is > causing an issue on our arm64 D06 board where the SAS driver probe > fails for maxcpus=1. > > This seems different to issue [0]. > > So it's the driver call to pci_alloc_irq_vectors_affinity() which > errors [1]: > > [ 9.619070] hisi_sas_v3_hw: probe of 0000:74:02.0 failed with error -2 Can you log what error is returned from pci_alloc_irq_vectors_affinity()? > Some details: > - device supports 32 MSI > - min and max msi for that function is 17 and 32, respect. This 17 is a bit odd, owing to the fact that MultiMSI can only deal with powers of 2. You will always allocate 32 in this case. Not sure why that'd cause an issue though. Unless... > - affd pre and post are 16 and 0, respect. > > I haven't checked to see what the issue is yet and I think that the > pci_alloc_irq_vectors_affinity() usage is ok... ... we really end-up with desc->nvec_used == 32 and try to activate past vector 17 (which is likely to fail). Could you please check this? Thanks, M. -- Without deviation from the norm, progress is not possible.