when prop_{array,dictionary}_copyout_ioctl() is called.
Introduce _PROP_RWLOCK_OWNED() which is a KASSERT(rw_lock_held(lock))
and use it in those two functions, also acquire the rwlock in other
places where it is required now.
This fixes a LOCKDEBUG panic "locking against myself", as reported by
Geoff C. Wing in current-users@.
- sys_sync: acquire a write lock on the mount since the operation modifies
the mount structure.
- sys_fchdir: use vfs_trybusy(). If an unmount is in progress, just fail it.
- vnode and cwd locks were being taken with proc_lock held, which is bad
because proc_lock can only be held for a short period of time.
- Processes could have continually forked and escaped notice, keeping
a reference to the old directory on top of which a new mount exists.
getvnode: Use vfs_trybusy, not vfs_busy. If unmount is in progress we
could deadlock, because vnode locks can be held during getnewvnode().
dounmount() locks in the reverse order (vfs_busy -> vnode).
puffs_getvnode() was inserting vnodes into mnt_vnodelist without taking
a reference to the mount for each. When vnodes are scrubbed, refs to the
vnodes mount structure are dropped => boom.
- change sc_rev numbers to match quirk numbers used in Realtek's driver
- tweak some register definitions
Taken from Realtek's FreeBSD driver.
Untested yet on 8168C, but no bad sideeffect on older chips.
subr_hash.c
revision 1.3
date: 2008/05/05 17:11:17; author: ad; state: Exp; lines: +26 -12
- Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.
will stop the countdown timer. The message now reads "Choose an option;
RETURN for default; SPACE to stop countdown." It no longer says what
the default choice actually is, because the message printed on the
following line will do that.
improved modularity and extensibility.
In the new architecture, a directed graph of argument-matching
objects (match objects) expresses the set of feasible ifconfig
statements. Match objects are labelled by subroutines that provide
the statement semantics.
Many IPv4, IPv6, 802.11, tunnel, and media configurations have been
tested.
AppleTalk, ISO, carp(4), agr(4), and vlan(4) configuration need
testing.
-falign-* that is too zealous for low-memory sh3 machines. I've been
using this for my hpcsh and landisk kernels for a very long time.
(besides, it's not 2001 anymore and pkgsrc/cross/sh is long since gone).
- Add drm_dmamem_alloc/drm_dmamem_free to drm_memory.c to nicely wrap up
the bus_dma API.
- Start using the above in drm_pci.c.
- Add DRM_NETBSD_DMA_ADDR/DRM_NETBSD_DMA_VADDR macros.
Locking:
- Use IPL_NONE for all locks except the IRQ lock, which runs at IPL_VM.
- Use IPL_VM instead of IPL_TTY with pci_intr_establish() for consistency's
sake. These two changes seem to eliminate the presistent lockups I was
having (NetBSD-current/amd64 r300).
- Start getting rid of DRM_SPININIT/DRM_SPINUNINIT and DRM_SPINLOCK/
DRM_SPINUNLOCK ... these annoy me to no end--not to mention that they
locks may or may not be spinlocks! It's a linux frob, really.
We're way beyond merging any useful bsd-core code on a large scale, which
was the only good reason to keep them around.
Memory allocation:
- Change drm_memory.c so that it contains generally useful, memory
allocation functions using kmem(9) (mostly used by the drivers
themselves). However, I expect to use this more in the future
in the "bsd core". These functions always use KM_NOSLEEP.
The new drm_dmamem_alloc function has a wait argument which
takes DRM_DMA_WAIT/DRM_DMA_NOWAIT (defined as their bus_dma
counterparts), and honors this hint in its calls to kmem(9)
and bus_dma(9) functions.
- Got rid of these functions' "area" argument--it's been deprecated for
ages. Provide macros in drmP.h to deal with the os-independent code.
- Declare these functions inline -- I believe they're used enough
by the i915 and radeon drivers to justify it. Please let me know
if I am mistaken.
NOTE: With these changes, a glxgears score which was previously
~3900fps is now ~4400fps (same setup as mentioned above). I realize
that using kmem(9) could cause problems, but I can't seem to run into
any with my test setup. If anyone smells regression, please let me
know.
of NULL to pci_activate()
Call the variable where we store the PCI Command & Status Register
'csr' instead of 'pmreg'.
In sipcom_intr(), get out if the device is inactive. Otherwise
sip(4) may inadvertently try to handle a shared interrupt before
the driver state is completely set up.
NetBSD finds them in: save and restore power management state
(D0..D3) and PCI Configuration Registers 0x0 through 0x40 during
device attachment and detachment, respectively. Among other things,
this will fix sip(4) detachment and re-attachment.
test module after the introduction of bsd.kmodule.mk. The files list was
inconsistent with the new module structure and the Makefile did not use the
correct variable to specify the installation of the module. Hi ad@!
Port identifycpu() to userspace. The kernel lies and reports on cpuN while
actually using the values from cpu0, but this attempts to bind itself to the
requested CPU if running as root. That doesn't work properly yet due to
kern/38588, but will do once that's fixed.