Commit Graph

125 Commits

Author SHA1 Message Date
yamt
65c9a0b32e fix fallout from caddr_t changes. 2007-03-04 14:46:45 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt
bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
mhitch
2e8c0b59d2 Check for stale flags in the DMA map. This was causing crashes on an ES40
with more than 1GB of memory due to a bug in one of the drivers.  From
Jason Thorpe.
2005-07-30 17:25:51 +00:00
thorpej
fd526cad44 load_mbuf: Don't increase the segment index if we skipped a zero-length
mbuf.  From Michael Hitch.
2005-07-28 04:58:03 +00:00
drochner
8120b42b0e fix constification fallout 2005-06-01 16:13:04 +00:00
yamt
6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
thorpej
95cc3e3c00 - Add a alpha_shared_intr_reset_strays() function that resets the stray
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.  Idea taken from pci_kn300.c (which was changed to use the new
  alpha_shared_intr_reset_strays() function).
2005-03-29 04:06:20 +00:00
matt
a6db24a485 Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create).  dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
2005-03-09 19:04:43 +00:00
simonb
3792275475 Add an extra `i' to notifes/notifed. 2005-03-09 04:23:33 +00:00
thorpej
7a60e77293 bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
2004-11-28 17:34:45 +00:00
lukem
9d93561319 a .#included .c file needs __KERNEL_RCSID(1, ... 2003-07-15 02:13:13 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
thorpej
a10453bb40 Add support for using cached mbuf and cluster phys addrs. 2003-04-09 23:32:03 +00:00
thorpej
3faec1e02a Use PAGE_SIZE rather than NBPG. 2003-04-01 02:17:17 +00:00
nathanw
eeffadffd5 In _bus_dmamem_alloc_range(), respect the high end of the caller's range. 2002-10-09 21:35:33 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
drochner
d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00
thorpej
e2a2842013 Keep track of which DMA window was actually used to map the
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.

Fixes DMA resource leak on systems with 2G+ RAM.  Thanks to
Matt Thomas for help debugging this.
2002-04-26 04:15:18 +00:00
chris
0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
thorpej
0fb6b9a8f8 Rework the interrupt code, shaving some cycles off in the process.
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 (c.f. Jensen).

We can shave even more cycles off, here, and I will, but it requires
some changes to the alpha_shared_intr stuff.
2001-07-27 00:25:18 +00:00
thorpej
63bc6c1370 Since the SGMAP buffer load subroutine doesn't need to modify
the segment index, don't pass it by reference.
2001-07-19 18:20:20 +00:00
thorpej
77e1f86ad4 Implement dmamap_load_uio for SGMAPs. 2001-07-19 18:08:54 +00:00
thorpej
e60fffea3b Pay attention to BUS_DMA_READ; don't need to allocate a spill
page if it is set.
2001-07-19 17:08:44 +00:00
thorpej
b70733d358 Since DMA frobbing can be done at interrupt time by devies at
multiple levels, protect the extent map w/ splvm().
2001-07-19 14:26:54 +00:00
thorpej
18490eff62 Add support for mbufs to the Alpha SGMAP DMA maps. 2001-07-19 06:40:01 +00:00
thorpej
8617f2c7f5 Simplify the SGMAP code a bit, and move SGVA allocation out of a
common routine into the individual load routines, since each load
routine needs to muddle with the "internals" of this operation.

Add a `prefetch threshold' member to the bus_dma_tag_t, so that
eventually we can determine whether or not to allocate a spill
page on a per-mapping basis.
2001-07-19 04:27:37 +00:00
thorpej
97d7c635b0 bcopy -> memcpy 2001-07-12 23:35:42 +00:00
thorpej
294259060c bzero -> memset 2001-07-12 23:25:39 +00:00
chs
e44e9dec8a replace vm_page_t with struct vm_page *. 2001-05-26 21:27:02 +00:00
thorpej
1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
soren
912c115675 s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message. 2001-03-21 18:40:28 +00:00
thorpej
09ffed2ba0 ANSI'ify. 2001-01-03 21:40:25 +00:00
thorpej
dbe63d5a81 Some more slight cleanup. 2001-01-03 21:39:20 +00:00
thorpej
5602df2e07 Fix a couple of comments. 2001-01-03 21:27:07 +00:00
thorpej
c3d730df25 ANSI'ify. 2001-01-03 20:29:58 +00:00
thorpej
a2a696618e Restructure alpha_sgmap_dmamap_create() slightly. 2001-01-03 20:12:34 +00:00
thorpej
db36913c87 The code that creates/destroys SGMAP DMA maps is the same; put it
in a common place and share it.
2001-01-03 19:15:59 +00:00
thorpej
5edc9ef4a4 When computing the segment size, consider the maximum segment
size in the DMA map.
2000-07-17 04:47:56 +00:00
mrg
80bb8049ba remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 09:02:51 +00:00
mrg
2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
simonb
889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
thorpej
2668e3b213 Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.
2000-06-05 21:47:10 +00:00
thorpej
e8d65fec30 ANSI'ify function declarations. 2000-06-04 05:27:45 +00:00
simonb
9ff7681a33 Don't need to include <sys/conf.h> here. 2000-03-29 03:43:31 +00:00
thorpej
ac93a75106 Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.
2000-03-19 01:46:18 +00:00