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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CB8BC433EF for ; Fri, 7 Jan 2022 17:16:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240527AbiAGRQq (ORCPT ); Fri, 7 Jan 2022 12:16:46 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:4373 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348501AbiAGRQp (ORCPT ); Fri, 7 Jan 2022 12:16:45 -0500 Received: from fraeml740-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4JVqWg6H9Pz67ZhV; Sat, 8 Jan 2022 01:11:43 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml740-chm.china.huawei.com (10.206.15.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 7 Jan 2022 18:16:40 +0100 Received: from [10.47.89.210] (10.47.89.210) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 7 Jan 2022 17:16:37 +0000 Subject: Re: [RFC 01/32] Kconfig: introduce and depend on LEGACY_PCI To: Bjorn Helgaas CC: Niklas Schnelle , Mauro Carvalho Chehab , Arnd Bergmann , Hans Verkuil , Ettore Chimenti , "Greg Kroah-Hartman" , Arnd Bergmann , Bjorn Helgaas , Nick Hu , Greentime Hu , Vincent Chen , "Paul Walmsley" , Palmer Dabbelt , Albert Ou , Guo Ren , "Damien Le Moal" , Ian Abbott , "H Hartley Sweeten" , Linus Walleij , Bartosz Golaszewski , Jean Delvare , Guenter Roeck , Dmitry Torokhov , Karsten Keil , "Sathya Prakash" , Sreekanth Reddy , Suganath Prabu Subramani , Michael Grzeschik , "David S. Miller" , "Jakub Kicinski" , Jesse Brandeburg , Tony Nguyen , Kalle Valo , Jouni Malinen , "James E.J. Bottomley" , "Martin K. Petersen" , Hannes Reinecke , Kashyap Desai , Sumit Saxena , Shivasharan S , Nilesh Javali , , Mark Brown , Sudip Mukherjee , "Teddy Wang" , Forest Bond , Jiri Slaby , "Wim Van Sebroeck" , Jaroslav Kysela , "Takashi Iwai" , , , , , , , , , , , , , , , , , , , , , , References: <20220106181409.GA297735@bhelgaas> From: John Garry Message-ID: Date: Fri, 7 Jan 2022 17:16:23 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20220106181409.GA297735@bhelgaas> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.89.210] X-ClientProxiedBy: lhreml745-chm.china.huawei.com (10.201.108.195) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On 06/01/2022 18:14, Bjorn Helgaas wrote: >> That driver would prob not be used on systems which does not support PIO, >> and so could have a HAS_IOPORT dependency. But it is not strictly necessary. > I don't want the path of "this driver isn't needed because the device > is unlikely to be used on this arch." Sure, that was just a one off example. As I mentioned before, I think that Arnd already did most of the ifdeffery work, but it was not included in this series. > > Maybe it's not_always_ possible, but if the device can be plugged > into the platform, I think we should be able to build the driver for > it. > > If the device requires I/O port space and the platform doesn't support > it, the PCI core or the driver should detect that and give a useful > diagnostic. > I'm not sure what the driver can say apart from -ENODEV. Or IO port management in resource.c could warn for requesting IO port region when it's unsupported. Anyway, this same conversion was had with Linus before I got involved. If you think it is worth discussing again then I suppose the authors here need to gain consensus. Thanks, John