Received: by 10.213.65.68 with SMTP id h4csp1159949imn; Wed, 14 Mar 2018 11:20:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELt5BWdPKXIfHk3jii6tTeaPxXlFvDo6xdT6ZLIgSvil5K0M8CjfarqUbdjKonHSQWMEWcHT X-Received: by 10.99.117.68 with SMTP id f4mr2804462pgn.437.1521051606065; Wed, 14 Mar 2018 11:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521051606; cv=none; d=google.com; s=arc-20160816; b=DliLAaohph9LOrTp3CVS4S0Fh+Ick3dhXxg+JVXONYbK1p6gttAYgltD1xsvFn/JdN hNY5tDdiE7uBiOePbY//2mm45OtR2jgXXZkwAOqLTPcxjFGk+3f49V8QoQPBpGqS14c4 wk/OZ/7MCO/5Rv+CBKlwmT7DJXTet4mlUbx+kAehgnckp/+xPQA5lxNSYR4EVf4HemPT PdSxxep6waeVBV8PCiKGEm5M3oxMvgQOwLZB7ZK1Jx+7r9xRdouqSJktrtlqLP4hcFfP qpdl5kzEZXxMf3cdsnG9br0LXBPhBUx/3arzevHkt0mr0fo5DUr6LVykFeFnGka61xZl 9T6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=FqWnujs8Arjirgb8MzfXh5gjean7GGwn/AX6e0+yhdI=; b=UHPMfTd7Y9/sheeuMiwD1XzsraNB1Jb25x9/n9wkcHG0FMVFpqgisHyoHC5ZqmPxf6 G1Qmx38Jb0cWoDg+o8vxlIUjEhgTnYfQk9js6r2GF5THW58NdQRKfdjo/SoCI5s0tP6C DBjnWE1/s0+D8ZV3z9vFURb7DT+WJUFiE7g4JZtHl6Rl2JIqxcFB2IjA+zcEpsd9WNT4 uNphwTjPzT46nH9q62V2NsUQtsBcvgB1ZkwMsr3SepG8hPTqO6eD+QhtqY8hg0aG7uhJ X9pTTjc3nr4pSJws9SgeqI3SjC9iIB0l1Dje2TdX5azZyut8ZRz0BMWdk+lIz62NCPzm rqqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TmrmMfgF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si2492281pfg.96.2018.03.14.11.19.51; Wed, 14 Mar 2018 11:20:06 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TmrmMfgF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752540AbeCNSSZ (ORCPT + 99 others); Wed, 14 Mar 2018 14:18:25 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:46430 "EHLO mail-qk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbeCNSRJ (ORCPT ); Wed, 14 Mar 2018 14:17:09 -0400 Received: by mail-qk0-f180.google.com with SMTP id o184so4473112qkd.13; Wed, 14 Mar 2018 11:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FqWnujs8Arjirgb8MzfXh5gjean7GGwn/AX6e0+yhdI=; b=TmrmMfgFi8ks1cFKMy8LSprTjm5wPYZz18ZVnzOpdjgsI03vIZok7+KDW9HfOx2M12 hLHFpDNecHJe4KBOiwm+C4Kneb0iI6sKuO47n4P8p8ZN++eaOxlnF3JgT8NXiEDJp0VN reYX2qw1BOxY/rrwik6Q1CXYWXnaC+11hyaKq7TD2IODbLlYlr8yTC7Vj1ruTz53chJ0 cRC6kxCKoRwQN8H2gIFsYz5lf7ywj1VQFIp0me43/KU7ZMTa4NjzFvScDvUt7ZkfbZh/ cNHahIWb/rQoQhfJGLQhxJaDTGwzQdYPkJs1lbUaLc/hqTGFBJhRF7VJv8hWGrf/jcj5 FqMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FqWnujs8Arjirgb8MzfXh5gjean7GGwn/AX6e0+yhdI=; b=umIQ+ee03gdYi5aDBVwIqTl6K6yOnKoIYww0TFEADKJbm1bfExpzyACaGKqRnZIJba 70UKYlyP1QTujby38ySLqsO+/ArxvHEB6StuwtUQfGNEDgBR+yuKAOZOs5LxYZjSpOO/ 4bkjE1q7/Suesp8UaeF6AJMO4wk5o2WuZOjPhjsVQ23x9Kx8hoJfHgRIB5aPMArJkGZ3 M9sDy+1nkL4KWDsj8VI27f1+RW7t2Ni0jNnajlhFI5nMZmc68Pu0FMPgKMuX+Kae9xcw Shyrogk1QJCjtUX/+5p+lEkoQNeaA5HeABWY8aLkzcdY2AD2/FRoilaN3y7a1NpydX62 SneA== X-Gm-Message-State: AElRT7HMe9HfgT/O/lHS72hIK8fBlhaV6cKcnT1rIkbOYdFcHtfL36xM 2VoczpBHyru95IccAFzbKzA/FWPaVtlTjQigO8PocIYm X-Received: by 10.55.0.203 with SMTP id t72mr8406176qkg.110.1521051428265; Wed, 14 Mar 2018 11:17:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.195.80 with HTTP; Wed, 14 Mar 2018 11:17:07 -0700 (PDT) In-Reply-To: <20180314174946.GB179719@bhelgaas-glaptop.roam.corp.google.com> References: <152097754955.241946.9551793957889760940.stgit@bhelgaas-glaptop.roam.corp.google.com> <20180314174946.GB179719@bhelgaas-glaptop.roam.corp.google.com> From: Andy Shevchenko Date: Wed, 14 Mar 2018 20:17:07 +0200 Message-ID: Subject: Re: [PATCH] PCI/MSI: Don't set up INTx if MSI or MSI-X is enabled To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Mikael Starvik , Jesper Nilsson , Tony Luck , Fenghua Yu , David Howells , "Rafael J. Wysocki" , Cris , Linux Kernel Mailing List , linux-ia64@vger.kernel.org, linux-am33-list@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 14, 2018 at 7:49 PM, Bjorn Helgaas wrote: > On Wed, Mar 14, 2018 at 06:31:38PM +0200, Andy Shevchenko wrote: >> On Tue, Mar 13, 2018 at 11:45 PM, Bjorn Helgaas wrote: >> > If a device already has MSI or MSI-X enabled, there's no need to set up its >> > legacy INTx interrupt. >> >> Just point to the actual behaviour of this. > > By "point to the actual behaviour", do you mean adding something to > the changelog along the lines of the following? > > If MSI or MSI-X is enabled, the device uses that. It uses INTx only > if both MSI and MSI-X are disabled (see PCIe r4.0, sec 7.7.1.2). > > I did add that because I think that spec reference is useful. If you > have something else in mind, maybe an example would help me > understand. I meant that the behaviour now is changed from check MSI only case to check MSI _or MSI-x_ case Not all code paths may survive that. >> In some cases code in question has to distinguish between MSI and >> MSI-x. So, this or similar changes has to be done with keeping >> above in mind. >> >> (Existing example is Thunderbolt driver) > > Sorry, I didn't get your point here. Certainly some code needs to > distinguish between MSI and MSI-X, but I don't think that's the case > here. I'm not proposing to change Thunderbolt; I do see that it uses > dev->msix_enabled (but not dev->msi_enabled), and it doesn't look like > using pci_dev_msi_enabled() there would be appropriate. Exactly, that's why I pointed on above. -- With Best Regards, Andy Shevchenko