Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754181AbdCaGyM (ORCPT ); Fri, 31 Mar 2017 02:54:12 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5279 "EHLO dggrg01-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752100AbdCaGyJ (ORCPT ); Fri, 31 Mar 2017 02:54:09 -0400 Subject: Re: [PATCH V8 5/6] ACPI: Support the probing on the devices which apply indirect-IO To: "Rafael J. Wysocki" References: <1490887619-61732-1-git-send-email-yuanzhichang@hisilicon.com> <1490887619-61732-6-git-send-email-yuanzhichang@hisilicon.com> <1908501.jAQQKvjW4f@aspire.rjw.lan> CC: , , , , , , , , , , , , , , , , , , , , , , , , From: "zhichang.yuan" Message-ID: <58DDFCBE.1030705@hisilicon.com> Date: Fri, 31 Mar 2017 14:52:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1908501.jAQQKvjW4f@aspire.rjw.lan> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.79.81] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.58DDFCCE.0040,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 353e98578d89e3614b9dcd6dfd8e3a5e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1575 Lines: 39 Hi, Rafael, Thanks for reviewing this! On 2017/3/31 4:31, Rafael J. Wysocki wrote: > On Thursday, March 30, 2017 11:26:58 PM zhichang.yuan wrote: >> On some platforms(such as Hip06/Hip07), the legacy ISA/LPC devices access I/O >> with some special host-local I/O ports known on x86. To access the I/O >> peripherals, an indirect-IO mechanism is introduced to mapped the host-local >> I/O to system logical/fake PIO similar the PCI MMIO on architectures where no >> separate I/O space exists. Just as PCI MMIO, the host I/O range should be >> registered before probing the downstream devices and set up the I/O mapping. >> But current ACPI bus probing doesn't support these indirect-IO hosts/devices. >> >> This patch introdueces a new ACPI handler for this device category. Through the >> handler attach callback, the indirect-IO hosts I/O registration is done and >> all peripherals' I/O resources are translated into logic/fake PIO before >> starting the enumeration. > > Can you explain to me briefly what exactly this code is expected to be doing? As you know currently for ARM architecture IO space is memory mapped and is only used by pci devices. The port number is dynamically allocated converting the device IO address into a PIO token: i.e. http://lxr.free-electrons.com/source/drivers/acpi/pci_root.c#L745 This patch is meant to support a new class of IO host controller that are not PCI based and that still require to have the IO addresses be translated in the same PIO token space as the PCI controller Thanks, Zhichang > > Thanks, > Rafael > > > . >