On Mon, Sep 07, 2015 at 06:14:59PM +0900, Masanobu SAITOH wrote: > Hi, all. > > nonaka@ wrote code to access PCI extended configuration area. > Currently, the diff supoorts only on x86. > > > http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/tmp/nbsd-pci-extconf-support.diff > > Is it OK to commit?
No. There are multiple issues. - abuse of the pcitag_t (I have patches that fix this.) - pci_conf_size() is unnecessary - too much ACPI dependence, there's nothing that says you have to use ACPI MCFG to get this information - possibility of too much KVA usage on 32-bit kernels - on-demand bus mapping may happen in inappropriate (interrupt) context - x86 bus_space_read/write functions do not use the %eax/ax/al register, as required by the AMD documentation for Family 10h's (and others) extended configuration space access. Jonathan Kollasch