Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp425819ybi; Mon, 15 Jul 2019 23:24:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2GCs8NshTDMam2d3ZV9CAH5w9i0SjsQETRMEW9MqSXK4DMn8jeJl6iIrWQbdFIHcy8bcU X-Received: by 2002:a17:90a:ba93:: with SMTP id t19mr33538885pjr.139.1563258279202; Mon, 15 Jul 2019 23:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563258279; cv=none; d=google.com; s=arc-20160816; b=kpwkkbwRwFCO+vyPxo5toDCyt8E+9vujnlnPcnoeB1a4+zTttu/T7orqwBJeXKojdv OQLmkZvph/4+aq3Qv/Y6b+Qf8FIYtQ6DWEfDet5bDtKqs50+AXz6DLA9lsIJgqomStFL 3uk+4eT5ZMvMtijqcYLeQj41a6xmapwoMTRDz5dHv0gmg09ZZRDjmKT338jAW4fYsZ05 6nuMpcBYlQaYiicQWdTFcnym8xCqQneDrdwZUmG4VpBu5HFb8cZ8kuWKoelyivtn731B ZEuGV1SbX6fAUhlhYU0PXZglackQxfAyNHj4z7L9cLqkHyZN/QBbYyngvZwGvA6BjHxB sL3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=s58KioszTgMclIAIcg4h39P+f5Nu2TvkpeIw53ls7JI=; b=hAv1cNTtzArU+D+VRsfbJmKgE2I81HEzvvCMkI1Rbc2pG15ggKWj/4sZSFGA/XO5aU NsjZlylpcoPShCjzH9vdFYwtU+iMVFKJ2D/ny4pqo2bgRWixLbk1tgVRMtFVsTdbTIsJ jUpJxB5O5/HjnhtBwzd0YqYLPxA0c+Sl3egGaa5aaFYJthdc4hrZiG5fYp4sXtGnKA3I nGzfGiUyy+tLn78OfBQpMei0h7cCt3qj9Ne5ZyovRqr8Yhjs53unsvX4cFrBpWTTD7t5 pM3SRJwgGwAk5XM/Wg+2Q01//ruRx2jFnL5ve3625fPy5i1DTfDon/qFZVQ2NBfnesH1 ZJWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z23si5988168pgi.116.2019.07.15.23.24.23; Mon, 15 Jul 2019 23:24:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731750AbfGPGXO (ORCPT + 99 others); Tue, 16 Jul 2019 02:23:14 -0400 Received: from gate.crashing.org ([63.228.1.57]:60179 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729533AbfGPGXN (ORCPT ); Tue, 16 Jul 2019 02:23:13 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x6G6Mxw6010843; Tue, 16 Jul 2019 01:23:00 -0500 Message-ID: <00c4f41415c94e18dce0e8a3ff60991edc3aba9d.camel@kernel.crashing.org> Subject: Re: [PATCH 3/3] nvme: Add support for Apple 2018+ models From: Benjamin Herrenschmidt To: Christoph Hellwig Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Jens Axboe , Keith Busch , Paul Pawlowski Date: Tue, 16 Jul 2019 16:22:59 +1000 In-Reply-To: <20190716060623.GC29414@lst.de> References: <20190716004649.17799-1-benh@kernel.crashing.org> <20190716004649.17799-3-benh@kernel.crashing.org> <20190716060623.GC29414@lst.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-07-16 at 08:06 +0200, Christoph Hellwig wrote: > > > /* > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > > index 54b35ea4af88..ab2358137419 100644 > > --- a/drivers/nvme/host/pci.c > > +++ b/drivers/nvme/host/pci.c > > @@ -2080,6 +2080,9 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues) > > dev->io_queues[HCTX_TYPE_DEFAULT] = 1; > > dev->io_queues[HCTX_TYPE_READ] = 0; > > > > + if (dev->ctrl.quirks & NVME_QUIRK_SINGLE_VECTOR) > > + irq_queues = 1; > > + > > return pci_alloc_irq_vectors_affinity(pdev, 1, irq_queues, > > PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY, &affd); > > Callin pci_alloc_irq_vectors_affinity in this case seems a bit > pointless, but if this works for you I'd rather keep it as-is for now > if this works for you. It seems to work and it's simpler that way. The original patch was grabbing all the interrupts then hacking the queues to all use vector 0 (well there's only one IO queue). The above is a bit cleaner imho. Cheers, Ben.