From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932235AbcCWKS7 (ORCPT ); Wed, 23 Mar 2016 06:18:59 -0400 Received: from foss.arm.com ([217.140.101.70]:45298 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754621AbcCWKSq (ORCPT ); Wed, 23 Mar 2016 06:18:46 -0400 Date: Wed, 23 Mar 2016 10:18:40 +0000 From: Catalin Marinas To: Kefeng Wang Cc: linux-pci@vger.kernel.org, linux-arm-kernel , Lorenzo.Pieralisi@arm.com, Gabriele Paoloni , Arnd Bergmann , Linuxarm , linux-kernel@vger.kernel.org, Zhou Wang Subject: Re: Question about PCI I/O space in ARM64 Message-ID: <20160323101840.GA21390@e104818-lin.cambridge.arm.com> References: <56F209A9.4040304@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56F209A9.4040304@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 23, 2016 at 11:12:41AM +0800, Kefeng Wang wrote: > If no pci, the PCI I/O space(16M) is mapped into an irrelevant mem space(right ?), No. It is not mapped at all. > not a right IO space, > that is, no one call pci_remap_iospace() to remap the memory mapped I/O space, once driver > like f71805f loaded, write value to IO space(see f71805f_init->f71805f_find->superio_enter->outb), > we met following oops, > ------------------------ > Unable to handle kernel paging request at virtual address ffffffbffee0002e > pgd = ffffffc1d68d4000 > [ffffffbffee0002e] *pgd=0000000000000000, *pud=0000000000000000 > Internal error: Oops: 94000046 [#1] PREEMPT SMP > Modules linked in: f71805f(+) hwmon > CPU: 3 PID: 1659 Comm: insmod Not tainted 4.5.0+ #88 > Hardware name: linux,dummy-virt (DT) > task: ffffffc1f6665400 ti: ffffffc1d6418000 task.ti: ffffffc1d6418000 > PC is at f71805f_find+0x6c/0x358 [f71805f] > ------------------------ That's caused by not having a mapped PCI I/O space. > I am not clear about PCI I/O, but if this is indeed a bug, how to solve this issue, > any advice will be appreciated. You need a PCI host controller driver (e.g. drivers/pci/host/pci-host-generic.c) and corresponding bindings in DT or ACPI. -- Catalin