| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
From miod@
|
| |
|
|
| |
OK mpi@
|
| |
|
|
|
|
|
| |
Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.
ok deraadt@, kettenis@, visa@
|
| | |
|
| |
|
|
|
|
|
| |
sure clock interrupts do not attempt to acquire it.
This will also eventually allow for IPL_MPSAFE interrupts on alpha.
Tested by dlg@ and I.
|
| |
|
|
| |
ok tedu@ deraadt@
|
| |
|
|
|
|
|
| |
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
|
| |
|
|
|
|
|
|
| |
CIRCLEQ_* is deprecated and not called in the tree. The other queue types
have *_END macros which were added for symmetry with CIRCLEQ_END. They are
defined as NULL. There's no reason to keep the other *_END macro calls.
ok millert@
|
| |
|
|
| |
after discussions with beck deraadt kettenis.
|
| |
|
|
|
|
|
|
|
|
|
| |
this let it wanter off writing segment descriptors off in memory
it didnt own, which led to some pretty awesome memory corruption.
if you had a network card with a small number of tx descriptors per
packet, a lot of memory, and a heavily fragmented packet (ie, ssh)
you were basically guaranteed a confusing panic.
ok miod@
|
| |
|
|
|
|
|
| |
not sleep if the allocator cannot obtain a lock when BUS_DMA_NOWAIT is
specified.
idea and inputs from kettenis@, ok miod@
|
| |
|
|
|
|
| |
back to sgmap if the direct mapping fails.
ok miod@
|
| |
|
|
|
|
|
|
| |
This should make bus_dmamap_load(9) and bus_dmamap_unload(9) "mpsafe".
As a bonus this gets rid of a potential memory allocation in the IO path.
ok miod@
|
| |
|
|
|
|
|
| |
As discussed on icb: remove the comment,
remove pmap_remove (uvm_km_free does that for us).
ok oga@, deraadt@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(interrupt was not for me), 1 (positive interrupt was for me), or -1
(i am not sure...). We have continued with this practice in as many
drivers as possible, throughout the tree.
This makes some of the architectures use that information in their
interrupt handler calling code -- if 1 is returned (and we know
this specific machine does not have edge-shared interrupts), we
finish servicing other possible handlers on the same pin. If the
interrupt pin remains asserted (from a different device), we will
end up back in the interrupt servicing code of course... but this is
cheaper than calling all the chained interrupts on a pin.
This does of course count on shared level interrupts being properly
sorted by IPL.
There have been some concerns about starvation of drivers which
incorrectly return 1. Those drivers should be hunted down so that
they return -1.
(other architectures will follow)
ok kettenis drahn dlg miod
|
| |
|
|
|
|
|
| |
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument].
This allows MI drivers to implement mmap() routines without having to know
about the pmap_phys_address() implementation and #ifdef obfuscation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernel, currently limited to low-hanging fruit: these variables were used
by bus_dma to specify the range in which to allocate memory, back when
uvm_pglistalloc() was stupid and would not walk the vm_physseg[].
Nowadays, except on some platforms for early initialization, these variables
are not used, or do not need to be global variables. Therefore:
- remove `extern' declarations of avail_start and avail_end (or close cousins,
such as arm physical_start and physical_end) from files which no longer need
to use them.
- make them local variables whenever possible.
- remove them when they are assigned to but no longer used.
|
| |
|
|
|
|
|
| |
hierarchy. Everything attached to a single root node anyway, so at
best we had a bush.
"i think it is good" deraadt@
|
| |
|
|
|
|
|
| |
doing if (p != NULL) pmap_extract() else vtophys() in a loop, just do
pmap_extract unconditionally.
ok miod@ (he found a typo, all hail miod!)
|
| |
|
|
|
|
| |
whitespace tweaks on i386 so that it matches).
ok kettenis@
|
| | |
|
| |
|
|
|
| |
Saves every damned driver calling bzero(), and continues the M_ZERO,
PR_ZERO symmetry.
|
| |
|
|
|
|
|
|
|
| |
For the possibility of sleeping, the first two flags are UVM_PLA_WAITOK
and UVM_PLA_NOWAIT. It is an error not to show intention, so assert that
one of the two is provided. Switch over every caller in the tree to
using the appropriate flag.
ok art@, ariane@
|
| |
|
|
|
| |
try to be smart for the address range, uvm_pglistalloc() is smart enough
nowadays.
|
| |
|
|
|
|
|
|
|
| |
Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.
OK deraadt@
|
| |
|
|
|
|
|
|
|
|
| |
- if ((mapstore = malloc(mapsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
+ if ((mapstore = malloc(mapsize, M_DEVBUF, (flags & BUS_DMA_NOWAIT) ?
+ (M_NOWAIT | M_ZERO) : (M_WAITOK | M_ZERO))) == NULL)
return (ENOMEM);
- bzero(mapstore, mapsize);
|
| |
|
|
|
|
|
|
|
|
|
| |
Rather than an "iointr" routine that decomposes a vector into an
IRQ, we maintain a vector table directly, hooking up each "iointr"
routine at the correct vector. This also allows us to hook device
interrupts up to specific vectors.
From thorpej NetBSD
Tested by myself and a number of end-users.
|
| |
|
|
| |
From thorpej NetBSD
|
| |
|
|
|
|
|
| |
- fix _bus_dmamap_load_(uio/mbuf)_direct panic messages.
- s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message.
From NetBSD
|
| |
|
|
| |
From NetBSD
|
| |
|
|
|
|
| |
page if it is set.
From NetBSD
|
| |
|
|
| |
From NetBSD
|
| |
|
|
|
|
|
|
|
|
| |
request (not always the passed in DMA tag if we try direct-map
and then fall back to sgmap-mapped). Use the actual window
when performing dmamap_sync and dmamap_unload operations.
From NetBSD
ok martin@
|
| |
|
|
|
|
| |
From NetBSD
ok martin@ miod@
|
| |
|
|
| |
ok martin@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Don't increase the segment index if we skipped a zero-length mbuf.
rev 1.22
Since the SGMAP buffer load subroutine doesn't need to modify
the segment index, don't pass it by reference.
From NetBSD
ok miod@
|
| |
|
|
|
|
| |
ok miod@, additional testing jsg@
from NetBSD
|
| |
|
|
|
|
| |
Makes isadma much happier.
From NetBSD
|
| | |
|
| |
|
|
|
|
|
|
|
| |
interrupt counter for a given shared interrupt descriptor.
When an interrupt is successfully handled, reset the strays counter,
thus preventing a "slow leak" from eventually shutting off the interrupt
vector.
from NetBSD via KUDO Takashi
|
| | |
|
| |
|
|
| |
no functional change.
|
| |
|
|
|
|
| |
may disturb the dma as seen in ipw(4). Emtpy mbufs are at the beginning of the
mbuf chain and are as example a "side-effect" of a previous m_adj() call.
OK miod@ mickey@ jason@ markus@
|
| |
|
|
| |
edits by Theo. deraadt@ ok
|
| | |
|
| | |
|
| |
|
|
|
| |
pages into the queue already containing allocated pages.
breaks i386:setup_buffers() because of this.
|
| | |
|
| |
|
|
| |
squashed already.
|
| |
|
|
|
|
|
| |
nate@ ok.
Should fix a bunch of random memory corruption problems on many machines.
How we could live so long without it is beyond me. Now my traktor is happy.
|