freebsd-dev/sys/modules
Adrian Chadd f4a3eb0297 [bhnd] Implement pass-through resource management for ChipCommon.
This patchset adds support to bhnd_chipc for sharing SYS_RES_MEMORY
resources with its children, allowing us to hang devices off of
bhnd_chipc that rely on access to a subset of the device register space
that bhnd_chipc itself must also allocate.

We could avoid most of this heavy lifting if RF_SHAREABLE+SYS_RES_MEMORY
wasn't limited to use with allocations at the same size/offset.

As a work-around, I implemented something similar to vga_pci.c, which
implements similar reference counting of of PCI BAR resources for its
children.

With these changes, chipc will use reference counting of SYS_RES_MEMORY
allocation/activation requests, to decide when to allocate/activate/
deactivate/release resources from the parent bhnd(4) bus.

The requesting child device is allocated a new resource from chipc's
rman, pointing to (possibly a subregion of) the refcounted bhnd resources
allocated by chipc.

Other resource types are just passed directly to the parent bhnd bus;
RF_SHAREABLE works just fine with IRQs.

I also lifted the SPROM device code out into a common driver, since this
now allows me to hang simple subclasses off of a common driver off of both
bhndb_pci and bhnd_chipc.

Tested:

* (landonf) Tested against BCM4331 and BCM4312, confirmed that SPROM still
  attaches and can be queried.

Submitted by:	Landon Fuller <landonf@landonf.org>
Reviewed by:	mizkha@gmail.com
Differential Revision:	https://reviews.freebsd.org/D6471
2016-05-24 01:12:19 +00:00
..
3dfx
3dfx_linux
aac
aacraid
accf_data
accf_dns
accf_http
acl_nfs4
acl_posix1e
acpi Sort SUBDIR. 2016-04-27 19:38:24 +00:00
ae
aesni
age
agp
aha
ahb
ahci ahci_generic.c needs ofw_bus_if.h, add it to the module. 2015-12-08 20:05:27 +00:00
aic
aic7xxx
alc
ale
alq
am335x_dmtpps
amdsbwd
amdtemp
amr
an
aout
apm
ar71xx
arcmsr
arcnet
asmc
ata
ath Add initial ar9300 HAL support for the spectral scan mode. 2015-12-02 05:36:45 +00:00
ath_ahb
ath_pci
autofs
auxio
bce
bfe
bge
bhnd [bhnd] Implement pass-through resource management for ChipCommon. 2016-05-24 01:12:19 +00:00
bios
bktr
bm
bridgestp
bwi
bwn [bwn] add in bwn n-phy linking. 2016-05-17 07:15:25 +00:00
bwn_pci [bhnd] Initial bhnd(4) SPROM/NVRAM support. 2016-05-08 19:14:05 +00:00
bxe 1. Removed -Wno-shift-negative-value from Makefile 2016-04-25 18:55:01 +00:00
cam opt_kdtrace.h is not needed for SDT probes as of r258541. 2016-05-15 20:04:43 +00:00
canbepm
canbus
cardbus
carp
cas
cbb
cc
cd9660
cd9660_iconv
ce
cfi
ciss
cloudabi
cloudabi64 Refactoring: move out generic bits from cloudabi64_sysvec.c. 2015-10-22 09:07:53 +00:00
cm
cmx
coff
coretemp
cp
cpsw
cpuctl
cpufreq
crypto Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c 2015-12-27 17:33:59 +00:00
cryptodev Remove unneeded includes of opt_kdtrace.h. 2015-11-22 02:01:01 +00:00
cs
ct
ctau
ctl
cuse
cx
cxgb Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
cxgbe cxgbe(4): Update T5 and T4 firmwares to 1.15.37.0. 2016-05-13 17:38:59 +00:00
dc
dcons
dcons_crom
de
digi
dpms
dpt
drm
drm2 drm/i915: Update to match Linux 3.8.13 2016-03-08 20:33:02 +00:00
dtb Add DTS files for the Allwinner A83T SoC and the Sinovoip BananaPi BPI-M3 2016-05-14 18:47:36 +00:00
dtrace Rename remaining linux32 symbols such as linux_sysent[] and 2015-10-22 21:28:20 +00:00
dummynet
ed
elink
em
en
ep
epic
esp
et
ex
exca
ext2fs ext2fs: Bring back the htree dir_index implementation. 2016-01-21 14:50:28 +00:00
fatm
fdc
fdescfs
fe
filemon DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
firewire
firmware
fuse
fxp
gem
geom Obsolete mkulzma(8) and geom_uncompress(4), their functionality 2016-02-24 00:39:36 +00:00
glxiic
glxsb
gpio Revert r299739. That did not make it better. 2016-05-14 09:39:21 +00:00
hatm
hifn
hme
hpt27xx
hptiop
hptmv
hptnr
hptrr
hwpmc Add aarch64 files to the hwpmc(4) module build 2015-10-23 21:09:28 +00:00
hyperv hyperv: Add helpers for busdma(9) operation 2016-05-23 06:35:11 +00:00
i2c MIPS also needs ofw_bus_if.h in some cases. 2016-01-20 21:54:43 +00:00
ibcore Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
ibcs2
ichwd
ida
ie
if_bridge
if_disc
if_edsc
if_enc Overhaul if_enc(4) and make it loadable in run-time. 2015-11-25 07:31:59 +00:00
if_epair
if_gif
if_gre
if_lagg
if_me
if_ndis
if_stf
if_tap
if_tun
if_vlan
if_vxlan
igb Misc. build: minor spelling fixes. 2016-05-03 22:01:48 +00:00
iir
imgact_binmisc
io
ioat
ip6_mroute_mod
ip_mroute_mod
ipdivert
ipfilter
ipfw Add External Actions KPI to ipfw(9). 2016-04-14 22:51:23 +00:00
ipfw_nat
ipmi
ipoib Don't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h 2015-11-22 23:07:07 +00:00
ips
ipw
ipwfw
isci
iscsi Rename icl_proxy.c to icl_soft_proxy.c, to make it clear it's a part 2016-05-17 15:21:17 +00:00
iscsi_initiator
isp
ispfw Rip off target mode support for parallel SCSI QLogic adapters. 2015-11-23 10:06:19 +00:00
iwi
iwifw
iwm
iwmfw
iwn
iwnfw
ix Add some missing dependencies on pci_iov_if.h. 2016-01-20 16:45:39 +00:00
ixgb
ixl
ixlv Add some missing dependencies on pci_iov_if.h. 2016-01-20 16:45:39 +00:00
ixv Add some missing dependencies on pci_iov_if.h. 2016-01-20 16:45:39 +00:00
jme
joy
kbdmux Add option to specify built-in keymap for kbdmux 2016-04-07 20:12:45 +00:00
kgssapi
kgssapi_krb5
khelp
krpc
ksyms
le
lge
libalias
libiconv
libmbpool
libmchain
linprocfs
linsysfs
linux pass -fPIC to the assembler, not linker 2016-02-25 19:26:14 +00:00
linux64 pass -fPIC to the assembler, not linker 2016-02-25 19:26:14 +00:00
linux_common
linuxkpi Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
lmc
lpt
mac_biba
mac_bsdextended
mac_ifoff
mac_lomac
mac_mls
mac_none
mac_partition
mac_portacl
mac_seeotheruids
mac_stub
mac_test
malo
mcd
md For the MD_ROOT option don't inject /dev/md0 as root dev when ROOTDEVNAME 2016-03-09 19:36:25 +00:00
mdio [mdio] migrate mdiobus out of etherswitch and into a top-level device of its own. 2015-12-26 02:31:39 +00:00
mem
mfi
mii
mlx
mlx4 Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
mlx4ib Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
mlx5 Update the mlx5 shared driver code to the latest version, which 2015-12-07 13:16:48 +00:00
mlx5en Add full support for Receive Side Scaling, RSS, to the mlx5en 2015-12-07 12:38:51 +00:00
mlxen Convert the mlxen driver to use the BUSDMA(9) APIs instead of 2015-12-03 14:56:17 +00:00
mly
mmc
mmcsd
mpr
mps
mpt
mqueue
mrsas
msdosfs
msdosfs_iconv
mse
msk
mthca Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
mvs
mwl
mwlfw
mxge
my
nand
nandfs
nandsim
ncr
nctgpio Add support for the Nuvoton NCT5104D. 2016-03-31 04:57:38 +00:00
ncv
ndis
netfpga10g
netgraph Build all of sys/modules with SUBDIR_PARALLEL. 2015-11-10 17:15:36 +00:00
netmap
nfe
nfscl
nfscommon
nfsd
nfslock
nfslockd
nfssvc
nge
nmdm
nsp
ntb
nullfs
nvd
nvme
nvram
nxge
oce
opensolaris
otus
otusfw
ow
padlock
padlock_rng
patm
pccard
pcfclock
pcn
pf
pflog Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00
pfsync Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00
plip
pmc
pms
powermac_nvram
ppbus
ppc
ppi
pps
procfs
proto
pseudofs
pst
pty
puc
qlxgb
qlxgbe
qlxge
ral
ralfw
random_fortuna
random_other
random_yarrow
rc
rc4
rccgpio
rdma Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
rdrand_rng
re
rl
rndtest
rp
rtwn [rtwn] add rtwn module directory. 2015-12-31 23:48:07 +00:00
rtwnfw [rtwn] Add rtwn firmware and driver module. 2015-12-31 22:33:32 +00:00
s3
safe
sbni
scc
scd
scsi_low
sdhci
sdhci_pci
sem
send
sf
sfxge sfxge(4): move ef10_vpd_* to ef10_vpd.c 2016-05-13 07:10:07 +00:00
sge
si
siba_bwn
siftr
siis
sio
sis
sk
smbfs
sn
snc
snp
sound
speaker
splash
sppp
ste
stg
stge
streams Fix streams and svr4 module dependency. Both modules are complaining about 2016-04-23 20:29:55 +00:00
svr4 Fix streams and svr4 module dependency. Both modules are complaining about 2016-04-23 20:29:55 +00:00
sym
syscons 17 years and change after I wrote warp_saver, here's a simple plasma effect 2016-01-01 04:04:40 +00:00
sysvipc
tcp/fastpath opt_kdtrace.h is not needed for SDT probes as of r258541. 2016-05-15 20:04:43 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
ti
tl
tmpfs
toecore
tpm
trm
tsec
twa
twe
tws
tx
txp
uart Fix make depend 2015-11-29 12:23:08 +00:00
ubsec
ubser
uchcom
ucycom
udf
udf_iconv
ufs
unionfs
urtwn Use proper kern.opts.mk rather than src.opts.mk from r297058. 2016-03-29 15:26:53 +00:00
urtwnfw [urtwn] migrate urtwn out into sys/dev/urtwn/ . 2016-03-20 03:54:57 +00:00
usb [urtwn] migrate urtwn out into sys/dev/urtwn/ . 2016-03-20 03:54:57 +00:00
utopia
vesa
vge
viawd
videomode
virtio
vkbd
vmm
vmware
vnic Allow building VNIC as a module 2016-05-20 11:00:06 +00:00
vpo
vr
vte
vx
vxge
wb
wbwd
wds
wi
wl
wlan
wlan_acl
wlan_amrr
wlan_ccmp
wlan_rssadapt
wlan_tkip
wlan_wep
wlan_xauth
wpi
wpifw
wtap Remove the old depend (mkdep) code and make FAST_DEPEND the one true way. 2016-03-30 23:50:23 +00:00
x86bios
xe
xl
zfs Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c 2015-12-27 17:33:59 +00:00
zlib
Makefile Kill off ReiserFS as it is no longer supported, for obvious reasons. 2016-05-17 15:36:40 +00:00
Makefile.inc Build all of sys/modules with SUBDIR_PARALLEL. 2015-11-10 17:15:36 +00:00