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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F7ADC43381 for ; Fri, 15 Feb 2019 05:18:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C42F921B1C for ; Fri, 15 Feb 2019 05:18:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C42F921B1C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4411kr67yWzDqkG for ; Fri, 15 Feb 2019 16:18:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=sbobroff@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4411cd2LPZzDqcx for ; Fri, 15 Feb 2019 16:13:21 +1100 (AEDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1F592Jv044677 for ; Fri, 15 Feb 2019 00:13:19 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qnmaxps01-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 15 Feb 2019 00:13:18 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Feb 2019 05:13:17 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 15 Feb 2019 05:13:15 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1F5DEad4784498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Feb 2019 05:13:14 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4FA1452050; Fri, 15 Feb 2019 05:13:14 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id F38765204E; Fri, 15 Feb 2019 05:13:13 +0000 (GMT) Received: from tungsten.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id F1EDCA016E; Fri, 15 Feb 2019 16:13:12 +1100 (AEDT) Date: Fri, 15 Feb 2019 16:13:11 +1100 From: Sam Bobroff To: "Oliver O'Halloran" Subject: Re: [PATCH v2 5/7] powerpc/pci: Add pci_find_controller_for_domain() References: <20190215004817.19961-1-oohall@gmail.com> <20190215004817.19961-5-oohall@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="a+b56+3nqLzpiR9O" Content-Disposition: inline In-Reply-To: <20190215004817.19961-5-oohall@gmail.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-TM-AS-GCONF: 00 x-cbid: 19021505-0020-0000-0000-000003170ADF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021505-0021-0000-0000-000021683CC9 Message-Id: <20190215051311.GE8338@tungsten.ozlabs.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-15_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902150037 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" --a+b56+3nqLzpiR9O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 15, 2019 at 11:48:15AM +1100, Oliver O'Halloran wrote: > Add a helper to find the pci_controller structure based on the domain > number / phb id. >=20 > Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff > --- > v2: Renamed pci_find_hose_for_domain() to > pci_find_controller_for_domain() > --- > arch/powerpc/include/asm/pci-bridge.h | 2 ++ > arch/powerpc/kernel/pci-common.c | 11 +++++++++++ > 2 files changed, 13 insertions(+) >=20 > diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include= /asm/pci-bridge.h > index aee4fcc24990..feea9534a015 100644 > --- a/arch/powerpc/include/asm/pci-bridge.h > +++ b/arch/powerpc/include/asm/pci-bridge.h > @@ -274,6 +274,8 @@ extern int pcibios_map_io_space(struct pci_bus *bus); > extern struct pci_controller *pci_find_hose_for_OF_device( > struct device_node* node); > =20 > +extern struct pci_controller *pci_find_controller_for_domain(int domain_= nr); > + > /* Fill up host controller resources from the OF node */ > extern void pci_process_bridge_OF_ranges(struct pci_controller *hose, > struct device_node *dev, int primary); > diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-c= ommon.c > index 88e4f69a09e5..21eeeabb3e0e 100644 > --- a/arch/powerpc/kernel/pci-common.c > +++ b/arch/powerpc/kernel/pci-common.c > @@ -357,6 +357,17 @@ struct pci_controller* pci_find_hose_for_OF_device(s= truct device_node* node) > return NULL; > } > =20 > +struct pci_controller *pci_find_controller_for_domain(int domain_nr) > +{ > + struct pci_controller *hose; > + > + list_for_each_entry(hose, &hose_list, list_node) > + if (hose->global_number =3D=3D domain_nr) > + return hose; > + > + return NULL; > +} > + > /* > * Reads the interrupt pin to determine if interrupt is use by card. > * If the interrupt is used, then gets the interrupt line from the > --=20 > 2.20.1 >=20 --a+b56+3nqLzpiR9O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEELWWF8pdtWK5YQRohMX8w6AQl/iIFAlxmSmcACgkQMX8w6AQl /iJo6Af/VxDLCCDhNZPtt2b12UbWMLbLtgQWRmrN+wYSei1VXwimC2M6AQxFqNjJ lG2m9srfH/gF+j5sLZsbd4QxksPg4vzAKCjUKIfM/n0QxkJDAcnhilz4RLSl8SNl 05jsKDLiaQkKOiOvkTQkMvPSoje1qFQLcPEeZZv2KKwWpfU2Fqp8YTpbkMJGDkNx 76w3mif3yQ+Mufp4sAl/lWbiLBh2HvUN0tK7eLQPS9/YCm4ZrNNGT0RsugAVlBbB niE7MbaS4qyv4S0YaeDmBC1fUI1DI9DWDAbIkJzvefEXRo8wibrh1G91RdfOwOTu xf3vXqK+54eKscHsbaf1HDCsy6iZAQ== =BA2Z -----END PGP SIGNATURE----- --a+b56+3nqLzpiR9O--