From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752550AbeACMoA (ORCPT + 1 other); Wed, 3 Jan 2018 07:44:00 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42814 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbeACMnz (ORCPT ); Wed, 3 Jan 2018 07:43:55 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7C0356032D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH V4 01/26] alpha/PCI: deprecate pci_get_bus_and_slot() To: linux-pci@vger.kernel.org, timur@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Bjorn Helgaas , Thomas Gleixner , Greg Kroah-Hartman , Lorenzo Pieralisi , Masahiro Yamada , Philippe Ombredanne , Kate Stewart , "open list:ALPHA PORT" , open list References: <1513661883-28662-1-git-send-email-okaya@codeaurora.org> <1513661883-28662-2-git-send-email-okaya@codeaurora.org> From: Sinan Kaya Message-ID: <73b8a0b3-eb69-f56a-bcde-08a5460859a6@codeaurora.org> Date: Wed, 3 Jan 2018 07:43:51 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1513661883-28662-2-git-send-email-okaya@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 12/19/2017 12:37 AM, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > where a PCI device is present. This restricts the device drivers to be > reused for other domain numbers. > > Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't > extract the domain number. Other places, use the actual domain number from > the device. > > Signed-off-by: Sinan Kaya > --- > arch/alpha/kernel/pci.c | 2 +- > arch/alpha/kernel/sys_nautilus.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c > index 87da005..2e86ebb 100644 > --- a/arch/alpha/kernel/pci.c > +++ b/arch/alpha/kernel/pci.c > @@ -425,7 +425,7 @@ struct resource * __init > if (bus == 0 && dfn == 0) { > hose = pci_isa_hose; > } else { > - dev = pci_get_bus_and_slot(bus, dfn); > + dev = pci_get_domain_bus_and_slot(0, bus, dfn); > if (!dev) > return -ENODEV; > hose = dev->sysdata; > diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c > index 239dc0e..ff4f54b 100644 > --- a/arch/alpha/kernel/sys_nautilus.c > +++ b/arch/alpha/kernel/sys_nautilus.c > @@ -237,7 +237,7 @@ > bus = hose->bus = bridge->bus; > pcibios_claim_one_bus(bus); > > - irongate = pci_get_bus_and_slot(0, 0); > + irongate = pci_get_domain_bus_and_slot(pci_domain_nr(bus), 0, 0); > bus->self = irongate; > bus->resource[0] = &irongate_io; > bus->resource[1] = &irongate_mem; > Any feedback here? most of the remaining patches have the ACK except these. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.