Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753503AbeADQ3E (ORCPT + 1 other); Thu, 4 Jan 2018 11:29:04 -0500 Received: from mail-sn1nam02on0042.outbound.protection.outlook.com ([104.47.36.42]:48064 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752463AbeADQ27 (ORCPT ); Thu, 4 Jan 2018 11:28:59 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Subject: Re: [PATCH V4 11/26] iommu/amd: deprecate pci_get_bus_and_slot() To: Sinan Kaya , linux-pci@vger.kernel.org, timur@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, "open list:AMD IOMMU (AMD-VI)" , linux-arm-kernel@lists.infradead.org, open list References: <1513661883-28662-1-git-send-email-okaya@codeaurora.org> <1513661883-28662-12-git-send-email-okaya@codeaurora.org> <8a5dad82-2886-2a51-28bc-b84ab253c361@codeaurora.org> From: Gary R Hook Message-ID: <46ccdb85-1c23-c9eb-994c-9a66e6fce7cc@amd.com> Date: Thu, 4 Jan 2018 10:28:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <8a5dad82-2886-2a51-28bc-b84ab253c361@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR10CA0067.namprd10.prod.outlook.com (10.169.238.29) To BN6PR12MB1201.namprd12.prod.outlook.com (10.168.227.11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 65663db2-7624-454b-8e22-08d55390400b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:BN6PR12MB1201; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1201;3:zwesIGRLWsENFo4kHsLVzj60t/sDoUwmIyOPWKNiHT9aJtfJnhS1g80dKeIoOeZrbu+rkaw9NOYFRt4o5cq7JVVHUJPafUE1JBS8iebXz9QiMbBQyTkvG9QzcqYkPZNv4+nedhV+zHh3u0pzVck7AECW3h1eNAwAalf+KRhe1xCKqGCBWhqFly42AyoN8NXlzTobacxcFWjrtwjImSeTzqM2C+/3waZc/wbtho9Ge+1Bmpw/5269xIPJDeK3gqCT;25:dvV13xQzhClKDYsPD5NcAePJ1w2JHAN2y0t8PREOFLx7sab1oH5NnKx+KMeZlpV4ncGEFQUHtgbymoaPsLHKEeNraT19d/CVNzH41M8ScAwUdus8WoDajfxzasJoNcVPzlXtkD3AvQRsU6y1P5GBvkpwBRIle3xVypGgHvZmtVjQDTWqgCmWbH96aaBjQ1h2k040+7semXMLFbcUOVmtGnQHTLvLWxYJyKubi5HysxOx4u/M1JYVflv6g1HpY/9JrAA79N+uHpb2NhZELsLr+z3Yl0EAYcpJ1QOJDdBjD/7cmttSuyP9J4WGdvcAZ+eLfEtcJ4O8rNmUCsc0OZ6PbA==;31:4L9FvUd5wJ5e+Xu480fP7eKHOFBcxfoJkGkeERsCPpLQILg0XlZof2q4rj1KpfMJLW3+1ZbOAg7uIhtgmrWh0U0mcHg+XSDS/qnExXhDjqQ6p1dsuhYt8MJs0NksP2WYy6VY1huHysuNDBx7OjbtYdw1thHPVWW79tE7kZlzR1RquSY/nhQzXapskF9+LvxNP3eiGsE9Hzt2xkdJ6BAmF4AScoTmdwQIOLpgx1Yoj6U= X-MS-TrafficTypeDiagnostic: BN6PR12MB1201: X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1201;20:1rGj5LpUxWhDkGXY5x9vJBAU/Pm+8cjL/Z77W2TNsd4996hIzWxPuaj+UEM0gnOssTJdrdqv7JxbaRAC9BPB3bKuSsw7gQo3Fmc3+G72AD1vifM0ttyWJIFZZtl+SXab0iXWMg/ZxzLZfJBDBq5qpnJBncQfQDJWggmdX7Cnt4qzPulvzcBXHF8h0YM6u0Sxnadd8LgrlgxFRnMpCIFVKkv9qq2IxGO9NVPbMvFUKBZJPXICceGkzAJdeNSNkt/4gatJe6ARK5grgQbrQUMaoJg2QXGf9uQ5WHa98cpZIeHBmNdI1TncqJ70CqSGPVG9B73YmSrI11pXyBbGICNHI9gAsWnJWRKqCNN7X1uFU+ImQSW8giSy9wxtnBTQlpEi39BLAEAv1HJXRvPLxbNIDEmcavobBs3QtyfILQcDp4iglBIjRkJkUxix/OEEEIeEZ8/tUhXCkQ/2AGCaKGt6SzBcZSaB1UkJpi/apJcgnSSbg11acfZkqimwHm4QnWIw;4:1Pi+QSCsZfLBPX/4nzlO/gcPKZ672vybUewgy/ENkmAdZleZjlF0TX3M8cHItff2PZ/rnZHzVLAzSdw03QhrLUwvUvc59VYhh8vVtSlqTyZRmZ3y1kvoiv8lnHawqZdiNoTJB/9X4y61420vHxvmKkfVevUYqX7mseetE6vAqaS1AYr8cO9Hx0WCbV0b/ng7kXlCRmSnqiH/q5w9OWPBfpl1Inw2lkagEvzcU8KKYxDNURvCxz9D4a2etRzWfplv569gYus8bZfOjAF3Eu88FQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231023)(944501075)(3002001)(10201501046)(6055026)(6041268)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:BN6PR12MB1201;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:BN6PR12MB1201; X-Forefront-PRVS: 054231DC40 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(979002)(6049001)(376002)(346002)(366004)(396003)(39860400002)(39380400002)(24454002)(199004)(189003)(58126008)(305945005)(54906003)(6246003)(7736002)(72206003)(16526018)(83506002)(77096006)(36756003)(67846002)(6486002)(90366009)(316002)(68736007)(52146003)(23676004)(478600001)(4326008)(8936002)(2486003)(50466002)(31696002)(16576012)(65806001)(2950100002)(97736004)(106356001)(81166006)(86362001)(8676002)(105586002)(6666003)(52116002)(2906002)(386003)(81156014)(3846002)(53546011)(6116002)(47776003)(31686004)(66066001)(53936002)(65956001)(229853002)(5660300001)(230700001)(25786009)(64126003)(65826007)(76176011)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1201;H:[10.236.109.62];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMjAxOzIzOkZtQWh2d2hpakFEb1hZd0daLys4bjAvSDRx?= =?utf-8?B?YWRtOGRlaHZocVY1N3VWL2E1eGN1US95VzU1Yk9PTWVLNy9tOXRlZmY5Rndq?= =?utf-8?B?Z1A3YkxNN2hGL2xFK202WkVFRzJhU1Rld0NvZXVFVTVhZjgzbDZmaFdzazkv?= =?utf-8?B?cXQyb2tzRzBmRmJ3eDVsL1pGNW9QaXgrSFFiUUhBVXZlYkdXUW1iZDNOTW5H?= =?utf-8?B?TTN3akMzaVhjd1pkQWZFUUp0T2UxRUJUd0pDaU9ZZXJ5TjlvWEFJd3p3N3Nk?= =?utf-8?B?c2RyU1o5OXB0TEF5SU5aT2VBUGRSMWRFb3czMHJLR1VGUFhPemJROFQ1dHBN?= =?utf-8?B?dzVUaDFnTytLb2dGWkcyVjlaOFBiTEZ5Z2JLN3ZFeThEOWpsSzM4bFhpcElh?= =?utf-8?B?T2kxT055VCtUTndVeThyVjZiRWZoZ1hRTGJvQ1dQZG1sUE9tS3IrKzV1d0FX?= =?utf-8?B?S2FiTy9mNVpFMTR3TU93RFFaWkdBdFZheElxTmxCNk5BWGJ5RGtaRXdFUkdZ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XduJcmIW9smQRHhAinD/Obv/cvBE1Dh6KZkHzjUNa+lQ4OFYOPOXIa7i25piPw9rdqhzbfqj5jv9WkWWDUYvGY=;5:v0XpaRp8MGYcd2gxwTkC2UWHHGfQPoVnXMF4+pc3RuANcLnPxP3AT99+lkIuoqlxF9n5nqkfjEcS2YPaRELgzTy8je62r33ZIPsyYu7gh9D4k77+No5ERB1OyW3JjAcmxwlmqSVcLmZmsGT0Fzud8mEmIHSFsqE/gtBtybCeQog=;24:EwWjniBKua5K4gAGoAXgrTTVJk1VFmPPnqAAsvloKHwhc5igKu5uprvJtnRpHi3yTz1ztSUxrSWD/Twy36XcTHTc6TsPzvy5QlufFlRamSw=;7:pCrH3saSZ3SF3JHxF/WZd5sGI3mov+tKL1/sePfQaexd2FaBElaEQgahdXi5FNM0vbBvXTdJ09RWeGmm06uH4Mk6em2P4qC9f91HdTrD87OAeXLgxvLzFQcy/sUm55MdMJa5q1x1mxotBHRcpGMlbQlf6shd2wJfm7758OWCCtAGdGasgRptDcM9KJ1x/alsg9aXZLt/RDGD9Thv0f+bYlGrQ9fG9HT4NqYrEW62MN4LdDyEkCjbU63O7Y9UcR9V SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1201;20:P5lcMWOfCMXIZRisSmlSP4fulCcbGdFttlvnbRvzTPEzAZjxTWJBa2ATS8WHDqnXN8GPNttQ+jx2RqTxr00oWJRhI21/Pc7FKEAzGei/1druoSelg5rkT/H7f75u4IvsA/s2PFpFu6lktizzMAV1c9CDGbLNZ0yMSz2hDpN1h1gKVm2r7NdDXvv7mLvV+1moju0qHKOn24A0EGbX6ICYfk5wg3KbLnrzUBW46cdThBWOSNlszQ3vLGdRBBlj38t9 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2018 16:28:54.4563 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65663db2-7624-454b-8e22-08d55390400b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1201 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/04/2018 06:25 AM, Sinan Kaya wrote: > 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. >> >> Getting ready to remove pci_get_bus_and_slot() function in favor of >> pci_get_domain_bus_and_slot(). >> >> Hard-code the domain number as 0 for the AMD IOMMU driver. > > Any comments from the IOMMU people? > pci_get_bus_and_slot() appears to (now) be a convenience function that wraps pci_get_domain_bus_and_slot() while using a 0 for the domain value. Exactly what you are doing here, albeit in a more overt way. How is this patch advantageous? Seems to me that if other domains need to be enabled, that driver could be changed if and when that requirement arises. But perhaps I'm missing a nuance here.