Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbeADRZz (ORCPT + 1 other); Thu, 4 Jan 2018 12:25:55 -0500 Received: from mail-by2nam03on0089.outbound.protection.outlook.com ([104.47.42.89]:43200 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750990AbeADRZw (ORCPT ); Thu, 4 Jan 2018 12:25:52 -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> <46ccdb85-1c23-c9eb-994c-9a66e6fce7cc@amd.com> <9014a9e1-9545-4f3c-08c2-8e8eb4762101@codeaurora.org> From: Gary R Hook Message-ID: Date: Thu, 4 Jan 2018 11:25:46 -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: <9014a9e1-9545-4f3c-08c2-8e8eb4762101@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: SN4PR0501CA0102.namprd05.prod.outlook.com (10.167.128.19) To BN6PR12MB1202.namprd12.prod.outlook.com (10.168.227.12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ee0758c9-57ea-4123-a686-08d553983306 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:BN6PR12MB1202; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1202;3:6gD8XlcA24kYPGo6uHrKFoxPItGHmcT+/+qfFlnXOE0cAjxXHlxqNb9NtoHcEO15mrs7JFBOLtjQJt2pwwYy+vDR/YxSJaJSrVUsUdI4vgHucOeDURbdA42/J4N6ejZ6H+kjTxSYEcovDLyE1fWrA0yxNxtqHML5us/kZeJxhqxLI5GWVgRidbckhDTsu42rtRUNbFC5jY28epPu9RU2VI91n4d1wPpuECZZrJ111fTyhRpwBg3I6x8Rk+EfDGZ4;25:Ck1tWLn1AQjbB4r9p53hwyJaEcEZMQT15XOrGQjFbaqX/Ph7Jaex9t/ZDB6gww52lbDq9/ylnZx42pXHYo7+W4qOBmCWfAkEvcHOGN5t2c7xs+UDWb27k9UCmABDqvq2sZiuWM2u2aE5BMqYSKtd8RxwIOmmLAo0+8hqfyUENH+0FXh6IzzblVvWR2k3ko7no/82trpo91hssUVK1bA0DXcUycXO77epB8Bv3afmD0cA2AKqpmJ7Pg/Iqik3XKrUQ9OXvLncHDPOY+TC9CDLWOHiAb7Yh3u3izP7lG/LGn6+F1NCYGFOfs63jBp8xhiS13z8Qh2ypQLUHq2GGNidNA==;31:/X3NVc7r70ijAjimbZ9SWl257EW1q/Zfh8zKzxLP5cfk7vOzHHKlfFnU8Zvi1LOt52QcM3LDOHkoN5sABf+z5tW4hcMt2VDU5p8bzxxPEwB/ijFj2gUr+l4XDFAljAigkauFZv1aKbrNbHORkwz4kOsdnMTNjxtaFeNmFnqWkjjX4S2QfBkzAIiKgvDEQzTMM2Qv76py1xo0rOIWN959+bdswPLW3FRP+lRkYE6ynHw= X-MS-TrafficTypeDiagnostic: BN6PR12MB1202: X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1202;20:S9WTGL5XlDkqU9yzYgaPzO/lRwOzTirt8A2+JaXSRkLOYjJu7hnPJvFtTzWBde0E6GEv+wkcBSf/Jpywv8dAAGE8rs0KhcpRVQL2TGsjAZEKvFdwKkR0jqXPlYb6cSspc9TlGXOKRxQsuJv3dXKy9eZ4FSSUWmnIB6C8p3t8XRQSWg2sv6LwfxPb21uvblBOeSdj082SxcgL7MWluYHJzRuqKFqttVKZLrUslhyHd7e63AMFbeVk25T5Ba//VoZUs+Ev6enYjKLx64NuwFhSFAZjuKI9/HyuYk4rfWOPWNt9iyqP8Gy8eZAiDjWjHVLfUnHrbdrnmmbF1ZB67h99yurxu9IHbo8kJeAc+p7nxunrgDjzcJrgWelxBi84365GC3l6uZiX8GPlNSJtd1Hma5ybp4kpdPHwqCXVHm3htvXqwinuyW03nYlv8KRGsBwwCiU3EcgTX3/ndmWq8X8cjba9+Z0r5fFr6FimOqYi9WFNu70V6cHDI7dyZE7cu27x;4:aySCh30L5h8MseyA6GQgwuY4kFYNf4VnW9F4YvCDDvgq/30OTbYWWUodo/tRF+xyG7HSzsrHpwrYhYb/1uccIRUg+DLcI6c79OwgY9eVuQv7uLHx91lJEhrt06rQ6rXDeRPbAN0qz81Af/CL7m/9y6kdoIvVFUYms9xa7AGwXf8imyRAr9vglcxtQVkTVnoWik6d77NObi5Ano3F0tKlT/gtRgUK9PBpi/pKARua/JDQ3OUTIYOA6kFNZqCzlfgaVq/ncMpi/DfNAenFiviihw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231023)(944501075)(93006095)(93001095)(6055026)(6041268)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:BN6PR12MB1202;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:BN6PR12MB1202; X-Forefront-PRVS: 054231DC40 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(396003)(39380400002)(376002)(39860400002)(366004)(346002)(189003)(199004)(24454002)(76176011)(2950100002)(81156014)(23676004)(36756003)(5660300001)(305945005)(52116002)(67846002)(386003)(7736002)(2486003)(6666003)(52146003)(58126008)(53546011)(31696002)(16576012)(966005)(6306002)(2906002)(65826007)(25786009)(54906003)(50466002)(53936002)(316002)(72206003)(4326008)(31686004)(47776003)(65806001)(16526018)(65956001)(66066001)(97736004)(230700001)(6486002)(77096006)(229853002)(93886005)(106356001)(83506002)(105586002)(64126003)(6246003)(86362001)(81166006)(3846002)(68736007)(6116002)(8676002)(345774005)(478600001)(8936002)(90366009);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1202;H:[10.236.109.62];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMjAyOzIzOkZ4NHFWdUdHSTNLT0NuWXdDcVhoSlZ5OGUz?= =?utf-8?B?ZGwzRGV4V0tqT1VBSy9NUEI0SThnUFJiYi9UMldQdS85UEdCdUc1aWRob1ND?= =?utf-8?B?Mng0bVFzYng1Y2VwaVcwNjFzblJWUGhNaVYvaDVRdW16ZjFPc1lxLzVNc052?= =?utf-8?B?cDFrUEFLc3JMeFFDMHRVS1hJSVBJeFV2Szk0eUdIZW1wVnZ4OHpCMmh0Y0tD?= =?utf-8?B?ZUdvV0VGZjYrSVZBaFB6N0hQcXJJSFVCSEMyT29CNE5qSDhhMElheVplWDVQ?= =?utf-8?B?SmdpSWl3OThvTVFIZDBNTUhqRUk1L2RhVlcwM2c4SWduTjN4NjJ6V1dBYWFN?= =?utf-8?B?VXJOZjF0QlBCT0xoaEljNzIweVY2U0RUMG5NRmJ4R2FqTEhmRk9sckpwd2pp?= =?utf-8?B?RzgzWUpoVnVEdEk1OGxZbW9SSFo5ZVZRZU9JWEUrdm9oenBkbjdoc3VGYUha?= =?utf-8?B?SWhJRXQ3Y3dwZjNOZXVBd1R6T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vYXLpU5z/xQuY7qMPbFjZ/ghuqvYeO/5wr4ztsTTXF68yHTnY4OfxL9sAtp559diajr6KGq0OY4Cyj/p+phEpdX5K8yvUqeOyKEiyjYYmVISJZ5yyE=;5:F6vOtbk4k7AeXosNVU9DVIdHFWdt9mqShhd6kfYTXyEjkP20kV+VWrWZLkhVu93cm5JgK5UGQyxOx+6elK3+cWK7fHO7kmc1J3fiTSbBhzpc/3+f4FCr7I72cXX8sbC6CUrJItLBnXLFr9mdXstaEPmfVFzLclzHG3S/KKvI08s=;24:h4OS7VWodc7vQDspL3W6MKV/V2fmRl0KQw2WFsDeRSYv2RJFymtvtQBUGUZa4v+ab7Pw9jMHNDHfOGjlz+ePucI4NNfESQuMMIXRVZnrrjo=;7:uslzrvmnWxZ4xDTztwppK8fSy+tKvQtOYn8kDqggPm7Qfc+n4/TS4Pn59b4G4ublrG0j8v7eeaTtxTgFHIvc7chAwIVaGA6nAh8fTYib6Fpd1PhhyJee+Th03j6BojVocJKllelHKKjBuDc6h3nvGypZ+A947KEsMqvl3nowrDVauNXFPHD3Px0TivRpJCRKiPcYbM1VDz6FOPP6lsxYWzgrre0qvd2VA0lDtfzi3agAPgaBUAmEip4CEVHHr7uK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1202;20:Am3yVkBylwyWLeaJveXopfypbAow2a0LOa3UWSRcppG1A7HgRvbuTiAiMA2OoCmpmo3NgSw1Ko/fj9i43uh01YN0u8dabxPxvRGjuhdHQcQTW9DhLOtdhOgDBnBiYmtN3eVZdAIPniqL8PMobouNaWcaW63Aqxl316Ic4oOWJwGuyREDaAoEHePeGVJkedXAMAyZlq2iq4rgzYcsj96C40NXR+dkI4jAR55XYx8WLXRFyl9BS0b9+3PIARuJTYUR X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2018 17:25:49.4387 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee0758c9-57ea-4123-a686-08d553983306 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1202 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/04/2018 10:32 AM, Sinan Kaya wrote: > On 1/4/2018 11:28 AM, Gary R Hook wrote: >> 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. >> >> > > The benefit of the change was discussed here: > > https://lkml.org/lkml/2017/12/19/349 > > I hope it helps. > > Thank you for pointing out that thread directly. I read through it and thought further about this change. I am not the maintainer, but as an AMD developer, this is fine change. I can't ACK but I can agree. Gary