Commit Graph

87492 Commits

Author SHA1 Message Date
jmcneill
436a56bf9f Add AD1843 codec register defenitions, from OpenBSD. 2007-04-13 03:35:38 +00:00
gdt
a648308ef6 Rewrite coda_{get,put}pages. Now copying files from coda with mmap
does not trigger assertions in uvm_fault, and executing files from
coda works as well.

Code very lightly reviewed by wrstuden@; scrutiny by those who
understand vnode and especially {get,put}pages would be appreciated.
2007-04-12 23:34:50 +00:00
matt
89cbd8eca5 Remove the BUS_DMA_COHERENT check from bus_dma_mmap 2007-04-12 23:07:50 +00:00
matt
ec4c8bca53 If bus_space_mmap is asked for a COHERENT page, make the phys addr is from
KSEG1.
2007-04-12 22:48:38 +00:00
jmcneill
7abea6b501 Don't claim to be the console if we're supposed to be using a serial
console. While we're here, save a few MB of RAM by properly calculating
the framebuffer size based on the selected video mode.
2007-04-12 22:30:48 +00:00
dogcow
bfac324824 unb0rk config(1) of GENERIC and friends. 2007-04-12 22:28:05 +00:00
matt
a2a9594187 Make tc_knowndevs const. 2007-04-12 21:39:24 +00:00
matt
55fa5792a8 Make tc_knowndevs const. 2007-04-12 21:35:08 +00:00
garbled
fa0b399b5b regen 2007-04-12 18:00:17 +00:00
garbled
7917c11a42 Add the product defines for the cards I intend to write support for. It
seems like we should just add the product defines to all of them.
2007-04-12 18:00:05 +00:00
jmcneill
e88e747668 Replace pckbc with macekbc.
Enable crmfb
Enable wsfont, wsmux
2007-04-12 13:14:53 +00:00
jmcneill
eaf962445e Remove pckbc_mace, it has never worked and has been replaced by macekbc 2007-04-12 13:12:00 +00:00
jmcneill
5d51f0c963 Enable O2 onboard framebuffer driver. 2007-04-12 13:10:59 +00:00
jmcneill
d4c79dc9a5 Add crmfb, a framebuffer console driver for the onboard O2 video (SGI-CRM) 2007-04-12 13:10:20 +00:00
skrll
ee87345f90 Remove unused label. 2007-04-12 10:07:36 +00:00
dyoung
b7dea03346 Make the members of the descriptors volatile, because the NIC and
the host share them.

Before breaking out of the loop over descriptors in gem_rint(),
DMA-resynchronize the first Rx descriptor we found that does not
belong to the host.  We must avoid a cached descriptor "covering"
a descriptor in RAM, because the cached descriptor may say that
the descriptor still belongs to the NIC, when that is not true,
and the driver will hang.

XXX I believe this driver only works by luck on hosts that both
XXX have a cacheline size greater than the size of a descriptor
XXX (16 bytes) and lack DMA/cache coherency.  I need to add some
XXX trickery to make sure that we don't scribble over the NIC's
XXX changes to a descriptor when we flush a cached descriptor to
XXX RAM with bus_dmamap_sync(9).
2007-04-12 06:14:40 +00:00
dyoung
af26ee6d9c Use PRIx64 and PRIx32 format strings. Remark about lack of DMA
synchronization at some debug code that reads descriptors.
2007-04-12 05:56:01 +00:00
reinoud
1adc8479ba Some rogue implementations use random physical partion numbers just to
break other implementations so lookup the physical number instead of
indexing it. Choosing random numbers here is legal according to the specs,
but not a logical choice and most likely done as a wierd kind of copy
protection.

Rogue implementation found to use this
	*Microsoft CDIMAGE UDF
2007-04-12 01:56:36 +00:00
degroote
20341ba8ef Add sysctl tree to modify the fast_ipsec options related to ipv6. Similar
to the sysctl kame interface.
2007-04-11 22:21:41 +00:00
degroote
68c3173bb4 When we construct an answer for SADB_X_SPDGET, don't use an hardcoded 0 for seq but
the seq used by the request. It will improve consistency with the answer of SADB_GET
request and helps some applications which relies both on seq and pid.

Reported by  Karl Knutsson by pr/36119.
2007-04-11 21:33:40 +00:00
degroote
2a2cd74d79 In spddelete2, if we can't find the sp by this id, return after sending an error message,
don't process the following code with the NULL sp.

Spotted by Matthew Grooms on freebsd-net ML
2007-04-11 21:19:35 +00:00
pooka
664eefa775 update prototype of vfs_vptofh 2007-04-11 21:06:32 +00:00
pooka
f50d2a26f2 * support VFS_FHTOVP and VFS_VPTOFH
* support cookies in for VOP_READDIR

nfs exporting puffs file systems works now
2007-04-11 21:03:05 +00:00
garbled
4256fea0fa add the define of MCA_MAX_SLOTS here 2007-04-11 18:33:52 +00:00
garbled
d3f6afef69 Remove the define of MCA_MAX_SLOTS from mcareg.h, and include
mca_machdep.h, because the maximum number of slots is inherently MD.
2007-04-11 18:32:19 +00:00
garbled
29fbd02006 Regen 2007-04-11 18:11:34 +00:00
garbled
6256d37223 Add a bunch of adapters from my rs6000 to this file 2007-04-11 18:11:15 +00:00
macallan
e1dc09af02 clean up tadpole_request() API
from mrg
2007-04-11 16:30:26 +00:00
njoly
bc7c2c3b94 Regen (statfs support). 2007-04-11 11:51:19 +00:00
njoly
f771d34a84 - Add compat amd64 linux32 statfs support, adapted from PR/35956.
- Move bsd_to_linux_statfs() function to its own file to be shared
  between both linux compats.

ok by manu.
2007-04-11 11:45:55 +00:00
pooka
c634885e0f make overspammy debug printf less overspammy 2007-04-11 09:43:19 +00:00
macallan
7c906f3f93 return 100 in match() so we beat genfb 2007-04-11 05:01:39 +00:00
macallan
df0a99cbb2 fix a typo 2007-04-11 04:48:31 +00:00
macallan
70eab97a3a add WSDISPLAYIO_LINEBYTES support so we can run XFree86 with wsfb 2007-04-11 04:47:09 +00:00
macallan
32376f5c18 pull in rasops1 and rasops32 2007-04-11 04:46:33 +00:00
macallan
9b5f7f0162 add an sbus frontend fro genfb
in theory this should work on any SBus framebuffer
tested on various cgsix and p9100, needs to be tested on more hardware
2007-04-11 04:45:45 +00:00
macallan
02be3c78f3 add WSDISPLAY_TYPE_GENFB 2007-04-11 04:09:10 +00:00
matt
4e8374bdef Workaround a gcc 4.1 issue. don't use s.m = s2.m = s3.m = ...
assign them individually.
2007-04-11 02:22:36 +00:00
jmcneill
ab47cb33cd Add SGI MACE ps2 keyboard/aux controller driver. ok rumble@
XXX can someone confirm that we can remove pckbc_mace?
2007-04-10 23:44:10 +00:00
dsl
74df11d186 Save a byte from the mbr code (by using lret not ljmp). 2007-04-10 16:54:34 +00:00
dsl
e38a76cc13 Change the default 'oemname' from NetBSD20 to NetBSD40 2007-04-10 16:50:25 +00:00
ad
c7f468e608 turnstile_wakeup: when restoring inherited priority, only lock curlwp
if its lock is sched_mutex. We can arrive here while on a sleep queue
(from eg cv_wait) and so curlwp will already be locked.
2007-04-10 13:11:08 +00:00
bouyer
1fde203078 Fix build on 32bit ports; should fix GENERIC_DIAGNOSTIC build problem reported
by Hisashi T Fujinaka on current-users.
2007-04-10 12:18:26 +00:00
bouyer
3b515a1a65 Fix previous: don't AcpiOsFree() twice if the device is valid. 2007-04-10 12:15:27 +00:00
macallan
43b2c2b989 include files.wsfb 2007-04-10 02:50:32 +00:00
macallan
2644a249ac include files.wsfb 2007-04-10 02:40:16 +00:00
macallan
cd8fb15721 include files.wsfb 2007-04-10 02:29:42 +00:00
macallan
d4ddadbf9d include files.wsfb 2007-04-10 02:19:03 +00:00
macallan
13daabb045 move genfb's PCI frontend to dev/pci 2007-04-10 02:16:47 +00:00
macallan
66d86be89a - move all memory mapping into the bus frontend
- get rid of macppc-isms like *_mmap() returning physical addresses
2007-04-10 00:14:42 +00:00
macallan
4ab018673b turn the other 'void region' message into aprint_debug() as well 2007-04-10 00:11:21 +00:00
macallan
2a048288e1 demote 'pci_io_find: void region' to aprint_debug() 2007-04-10 00:05:16 +00:00
gdt
3bcadc1a8e revert putpages part of last change. Thanks to pooka@ for pointing
out that the v_interlock in the previous code and v_uobj.vmobjlock are
really the same thing.
2007-04-09 21:38:18 +00:00
pooka
f3fbb884a5 If mount(MNT_UPDATE) is called for a non-VROOT directory, don't vput()
the "mountpoint" vnode twice due to an error branch.

thanks go to Gert Doering for reporting the problem and testing the fix
and to Juergen Hannken-Illjes for much of the analysis work leading to
the discovery of the problem cause
2007-04-09 21:11:03 +00:00
degroote
0c3809d098 Fix a memleak in key_spdget.
Problem was reported by Karl Knutsson by pr/36119.
2007-04-09 21:07:03 +00:00
bouyer
0c0eb2bdf5 RX buffers are malloced memory of 9216 bytes. This can require from 1 to
4 DMA memory segments, depending on how the buffer is in memory.
When receiving a packet, we allocate a new one to remplace the one we've
used. It can need more segments than the one it remplace, leading to
corrution of the RX descriptors, and a panic in bus_dmamap_sync() (DIAGNOSTIC
kernels) or possibly memory corruption.

Fix:
- bnx_get_buf() allocates as many buffer as possible, checking the number
  of free RX descriptors. Because one receive buffer is not guaranteed to
  be remplaced on receive, call bnx_get_buf() from bnx_tick() too.
  This also improve error handling from bnx_get_buf().
- use MCLGET() instead of MEXTMALLOC() if we're running with the standard
  ethernet MTU. This gives us more receive buffers and waste less memory.
2007-04-09 19:34:50 +00:00
garbled
770da6e167 Fix the other instance of SR601_PA_MATCH_P in this file (the unmap case) too. 2007-04-09 17:43:40 +00:00
matt
e3a731cab5 Enable builtin_ffs for vax 2007-04-09 17:39:37 +00:00
garbled
23ec4fc854 When testing if something from the iosrtable is valid, don't call
SR601_PA_MATCH_P(), because that macro assumes the io region you are
mapping lies within the 32-bit address space addressable by the CPU,
which might not allways be the case.
2007-04-09 17:39:31 +00:00
garbled
22e3ca58a3 Make the SR601_VALID_P check less draconic wrt valid io segregs. There
are perfectly valid iosegregs for which the old test would fail.
2007-04-09 17:35:14 +00:00
chris
61799e8a82 In pmap_activate restore interrupts to their previous state rather than
always enabling them.

It's not clear if this actually caused any problems, but it seems safer
to restore to the previous state in case pmap_activate is ever called
with interrupts disabled.
2007-04-09 16:05:41 +00:00
gdt
c2f4bcfa32 regen
(changes in RCS Ids only)
2007-04-09 15:00:42 +00:00
gdt
bf25020786 vop_link: reorder commented arguments to match actual calling order
(dvp, vp).

ok wrstuden@
2007-04-09 14:58:28 +00:00
bouyer
a17f6ef0b7 Protect bnx_tick() with splnet.
Bring in fixes and improvements from OpenBSD:
revision 1.25
- Simplify the arguments to bnx_tx_encap.
- Don't copy the bd_chain head pointers into temporary objects, they are
available globally.

From scottl@FreeBSD

revision 1.26
Overhaul the transmit path:
- Eliminate the bnx_dmamap_arg structure.
- Refactor the loop that fills the buffer descriptor so that it can be done
with a single set of logic in a single loop instead of two sets of logic.
- Eliminate the need to cache and pass descriptor indexes between the start
loop and the encap function.
- Change the start loop to always check the ifnet sendq for more work.

From scottl@FreeBSD

revision 1.27
make the exit label naming scheme match the current function names, removes
a FreeBSD-ism from the original driver.

revision 1.28 -> 1.30
- Ensure that at least 16 TX descriptors are kept unused in the ring.
- Use more complete error handling for TX load problems.

From scottl@FreeBSD

revision 1.31
replace a few more instances of hand rolled code with the LIST_FOREACH macro.

revision 1.33
In bnx_start, check the used_tx_bd count rather than the descriptors
mbuf pointer to see if the transmit ring is full.  The mbuf pointer
is set only in the last descriptor of a multi-descriptor packet.
By relying on the mbuf pointers of the earlier descriptors, the
driver would sometimes overwrite a descriptor belonging to a
packet that wasn't completed yet.  Also, tx_chain_prod wasn't
updated inside the loop, causing the wrong descriptor to be checked
after the first iteration.  The upshot of all this was the loss of
some transmitted packets at medium to high packet rates.

In bnx_tx_encap, remove a couple of old statements that shuffled
around the tx_mbuf_map pointers.  These now correspond 1-to-1 with
the transmit descriptors, and they are not supposed to be changed.

Correct a couple of inaccurate comments.

From jdp@FreeBSD

revision 1.43
Allow the bnx(4) driver to make use of all of the available hardware
multicast hash slots. The bnx(4) hardware supports 8 slots instead of
4 like the bge(4) hardware.

From Mike Karels via FreeBSD

Tested by Brad, biorn@ and Johan M:son Lindman
2007-04-09 14:23:03 +00:00
pooka
bc8224a1b3 fix comment: struct fid is in fstypes.h now 2007-04-09 12:21:24 +00:00
bouyer
5673f3baf8 Properly skip inactive devices; avoids a panic in pci_make_tag() later.
Thanks to cube@ for the idea.
An ACPI kernel can now boot on a poweredge 2950.
2007-04-08 21:35:21 +00:00
gdt
5fa91a46b1 Remove cruft. Update to current reality. 2007-04-08 13:50:51 +00:00
hannken
fc6776f366 Remove now obsolete vn_start_write() and vn_finished_write() and
corresponding flags.

Revert softdep_trackbufs() to its state before vn_start_write() was added.

Remove from struct mount now unneeded flags IMNT_SUSPEND* and
members mnt_writeopcountupper, mnt_writeopcountlower and mnt_leaf.

Welcome to 4.99.17
2007-04-08 11:20:42 +00:00
scw
5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
dyoung
c81bbe837f Include opt_ata.h for ATADEBUG definition instead of #defining it
unconditionally.

Make this compile when ATADEBUG is not #defined.
2007-04-08 06:59:43 +00:00
dyoung
d424839018 Include opt_ata.h for ATADEBUG definition instead of #defining it
unconditionally.
2007-04-08 06:58:47 +00:00
matt
cf078da5bb Use the ffs builtin in gcc4.1 2007-04-08 03:11:31 +00:00
gdt
8f39b4fdf8 Further cleanups on coda vnode handling.
Re-enable mmap.  The problem is how uvm_fault handles page faults from
coda vnodes via container files, and executing a program caused the
same problem so disabling mmap only helped cp(1).

coda_open:
  rename variables to match vnode_if.src
  better comments about lock/reference state of vnodes
  keep lock on container file until after VOP_OPEN, which requires locked vp
  remove #if 0'd code to PNBUF_PUT

coda_link:
  rename variables to match vnode_if.src
  error out early if vp == dvp
  check return value on vn_lock, and add comment questoining the lock
  clarify lock handling, but unchanged logic
  remove #if 0'd code to PNBUF_PUT

coda_rmdir:
  error out early if vp == dvp
  remove #if 0'd code to PNBUF_PUT

coda_grab_vnode:
  add comments, and in particular question undocumented VFS_VGET semantics

coda_getpages:
  question calling VOP_OPEN, which requires a locked vnode, with the
  vnode we got (vop_getpages does not guarantee a locked vnode)

coda_putpages:
  remove inexplicable simple_unlock(&vp->v_interlock);
  add printf so we notice if this is ever called

  add comment explaining that the implementation will lead to trouble,
  because vnode_if.src says putpages is called with v_uobj.vmobjlock
  held and is supposed to unlock it

With these changes and an uncommitted change to uvm_fault not to panic
if uvm objects are not equal, coda seems stable again.
2007-04-08 00:21:59 +00:00
hannken
e956461048 Remove calls to now obsolete vn_start_write() and vn_finished_write(). 2007-04-07 15:06:53 +00:00
hannken
11601689e7 Remove calls to now obsolete vn_start_write() and vn_finished_write(). 2007-04-07 14:21:52 +00:00
skrll
5790e46e8b Correct a comment. 2007-04-07 09:02:50 +00:00
skrll
406c4f0d55 de-__P()
s/lwp/l/ for argument name in pmap_deactivate.
2007-04-07 09:02:07 +00:00
skrll
693a79edd7 Add ldcw as a store instruction. From OpenBSD. 2007-04-07 08:38:28 +00:00
skrll
6e5bbbab10 de-__P() 2007-04-07 08:37:49 +00:00
skrll
d8db1d193c de-__P() and whitespace. 2007-04-07 08:36:49 +00:00
skrll
fe255bdc71 Whitespace. 2007-04-07 08:35:52 +00:00
skrll
101cbda361 Typo. From OpenBSD. 2007-04-07 08:35:13 +00:00
skrll
3581d4c55c Improve EXIT and add a BSS macro. From OpenBSD.
Implement WARN_REFERENCES.
2007-04-07 08:34:17 +00:00
macallan
4cf8aa1d7f add genfb, a generic framebuffer console driver that's configured via
device properties - all it needs is width and height in pixels, stride in
bytes, depth in bits and the framebuffer address.
Features:
- unaccelerated fb console with colours and virtual consoles
- split into console handling and bus frontend
- so far there is only a PCI bus frontend which allows to mmap BARs belonging
  to the graphics controller, others should be easy to add.

TODO:
- find an opaque way to change the palette ( probably pass a function
  pointer as property ) since this would need to call some firmware interface
  which is pretty much always MD
- find a clean way to mmap the framebuffer, just returning the physical
  address works on macppc but not on other architectures. Problem is, that
  we cannot rely on the address being a bus address - on macppc it is,
  but for instance on sparc64 it's not.
2007-04-07 03:41:26 +00:00
gdt
8830bbca9f Disable mmap for coda. When copying a file from coda to normal ffs, I
got a panic in uvm_fault from ffs_write.  I believe this is because cp
used mmap, the container file page was not in core, and uvm_fault
objected to the container file vnode and the coda vnode not matching.
I have long been plagued by crashes on cp from coda, and this was the
first time I got and understood a backtrace.

Clean up old comments that are no longer accurate.

Document refcounting better.

Note some questionable behaviors with XXX.

Clean up PNBUF_PUT and SAVESTART.  Only do this where vnodeops(9) says
we should, and do it on error also.

In symlink, vput parent and free namebuf even in error cases.
2007-04-06 22:28:12 +00:00
rumble
e0d3b63ac3 If we fail to attach, use the size determined by pci_mapreg_map() rather
than a constant, since this will be incorrect on some chips (MPI350) and
lead to a panic.
2007-04-06 18:16:29 +00:00
pooka
43c6ec1a06 support flushing pagecache 2007-04-06 17:48:44 +00:00
matt
d0ef60fca0 Fix boolean inversion and missing definition. 2007-04-06 17:48:06 +00:00
matt
802469c2c9 Change tstl/beql/clrl to bbcc in softintr_dispatch 2007-04-06 17:45:41 +00:00
plunky
844c714a45 rework ordering of error conditions for setopt, prefer to return EINVAL
rather than EBUSY.
2007-04-06 17:09:00 +00:00
pooka
13fa815486 actually, we don't need a separate op for flushing the whole page cache
of a node, just use the range op with endoff = 0
2007-04-06 17:05:34 +00:00
pooka
bd8d0a2ae0 * enable PUFFS_INVAL_PAGECACHE_NODE_RANGE
* add input parameter validation
2007-04-06 16:37:02 +00:00
plunky
f517728680 add const attribute to the CRC table 2007-04-06 16:27:52 +00:00
hannken
29ddf6065f Remove calls to now obsolete vn_start_write() and vn_finished_write(). 2007-04-06 14:28:28 +00:00
plunky
f03422c7ce use structure initializers for protocol switch table
(while here, delete unused entries)
2007-04-06 11:49:24 +00:00
xtraeme
613ec69fb1 k8_powernow_destroy: free k8pnow_current_state rather than cstate,
and remove the global cstate struct.
2007-04-05 21:23:43 +00:00
plunky
b1afbe8d68 remove default setting of bluetooth_debug, since 'options BLUETOOTH_DEBUG'
causes it to fail
2007-04-05 19:22:18 +00:00
reed
dc2a382c22 Fix typo.
Fix some spaces to tabs.
Reorder a few items.

No real configuration changes -- just making this easier to diff with GENERIC.
2007-04-05 19:19:49 +00:00
reed
3230f51cb9 Add some tabs. Move one entry.
No real changes, just making it easier to diff with GENERIC_LAPTOP.
2007-04-05 19:17:41 +00:00
liamjfoy
72a3be8fc7 use size_t for indexes
ok christos@
2007-04-05 18:12:49 +00:00
liamjfoy
39b3c7f047 use size_t for indexes
just pass a *ip to ipflow_hash instead of members

ok christos@
2007-04-05 18:11:47 +00:00
perseant
b196644e3b correct comment for lfs_putpages 2007-04-05 17:44:18 +00:00
njoly
a926b97a8e Enable stat/stat64 nsec time support, for amd64 compat linux/linux32. 2007-04-05 16:39:11 +00:00
tnn
b19e17d66f protectoin -> protection 2007-04-05 13:17:11 +00:00
gdt
23959b33e1 Improve conformance to vnode locking rules in coda_lookup, by doing
the unlock parent, lock child, lock parent in the ISDOTDOT case.

Clean up and rewrite comments to match more closely current reality.

Sprinkle XXX where I'm not sure the current rules are being followed.

Reviewed by wrstuden@, who agreed that this is an improvement over the
current code, with concerns about LK_RETRY and whether the ISDOTDOT
locking is done soon enough.
2007-04-05 12:48:51 +00:00
dsl
007d96a7bb Get emul_find() to update SCARG(uap, path) instead of assuming that the
updated path parameter is ever valid - especially when emul_find() fails.
Use the modified path for the access() calls.
Found when compiling with emul_find() hacked to always fail.
2007-04-05 07:37:14 +00:00
rmind
1e2aad36da Revert the latest changes back to 1.25 rev. 2007-04-05 01:33:31 +00:00
pooka
3651f3e73b Fix one more bug from today's commit: don't remove the op for which
getops runs out of file server buffer space from the request queue.
Otherwise that operation silently vanishes and things go, well, quite
wrong.
2007-04-04 21:02:30 +00:00
pooka
a0d5166093 fix two loop mutex botches in previous 2007-04-04 20:22:47 +00:00
drochner
bac28a1dbc catch up with recent constification in struct ifnet 2007-04-04 16:31:05 +00:00
pooka
fa71b0706d Make it possible to interrupt waiters for fs operation completion
again.  This is useful until locking is further developed and basically
any deadlocks can be solved by killing appropriate processes.

Thanks especially to Tommi Kyntola and Antti Louko for sitting down
with me and discussing resource ownership and locking strategies
in implementing this.
2007-04-04 16:13:51 +00:00
pooka
ad018126a3 s/ppark/park/ to make all the variable names consistent - park is
always a pointer now.  no functional change
2007-04-04 15:50:56 +00:00
mishka
2f5bd28732 Revert previous commit until further investigation because it is
known as problematic.  Some problems obscured are dead Del key (I
can reproduce this with wscons scroll support) and panic (seen by
<elad> only).
2007-04-04 14:50:21 +00:00
tnn
02ade499f6 pci_find_ino(): Use interrupt pin from pci_attach_args when mapping interrupts.
Use *ihp as a pure output. Fix case where interrupt pin #D was incorrectly
mapped. Some cosmetic changes while here. Ok'd by martin.
2007-04-04 11:04:33 +00:00
rmind
330166a2eb Fix tbl, which was misstyped as tlb. 2007-04-04 11:01:10 +00:00
rmind
0a747ea89c Unfortunately, missed procfs_proc_unlock() in previous.
Pointed out by pooka@
2007-04-04 10:50:42 +00:00
rmind
f49599932b k8_powernow_init_main: Initialize k8pnow_current_state. 2007-04-04 02:56:25 +00:00
rmind
9464b9ab22 Initialize k7pnow_current_state in k7_powernow_init(). Free the memory
in LKM's case. Found via CID: 4149
2007-04-04 02:50:02 +00:00
wrstuden
db2a757990 Add a KASSERT to address CID: 4335.
Make sure that if we pull a buffer off of the read queue that it really
is a read request. Lower in this routine we base which queue we
dequeue the request from on its read/write state. Thus if a write
op ever ended up on the read queue, we'd explode (dereference NULL).
2007-04-04 02:30:43 +00:00
jmcneill
f972216e48 Simplify sw volume control, attach to AOAK2 as well, make mono work as
well as stereo, and print a friendlier message when we don't find a
hardware mixer.
2007-04-04 02:14:57 +00:00
rmind
523c1fc3e1 filecore_mountfs: Remove the dead code - fcmp cannot be non-zero here.
CID: 714
2007-04-04 02:00:58 +00:00
rmind
0dbab2d2b2 clockmod_sysctl_helper: For the sake of clarity - avoid magic number.
No functional change.
2007-04-04 01:50:15 +00:00
rmind
4e3ec8a076 vald_acpi_libright_get_bus: Plug a possible memory leak.
CID: 4358
2007-04-04 01:34:44 +00:00
rmind
199691e947 procfs_readlink: Handle a possible fail of fd_getfile(), also, we
do not need to check for error again.
CID: 4436
2007-04-04 01:27:32 +00:00
rmind
084180cb58 drm_do_addbufs_pci: Fix the mess of malloc()s and free()s, which
do not accept NULL arguments.
Found via CID: 4439
2007-04-04 00:30:58 +00:00
dyoung
5770bb4c31 Add extio, gpio. Remove admflash. Makes the compile again. 2007-04-03 23:53:34 +00:00
rmind
1db98c3723 socreate: l cannot be NULL.
CID: 4314
2007-04-03 23:44:53 +00:00
rmind
497adf4cc1 drvctlioctl: Plug a possible memory leak.
CID: 4363
2007-04-03 23:02:39 +00:00
rmind
5174ef0ece fileassoc_file_delete: Handle an error case of fileassoc_table_lookup().
CID: 4431
2007-04-03 22:29:23 +00:00
dyoung
eabf98a2cc Add extio and gpio so that this compiles again. 2007-04-03 21:54:01 +00:00
dyoung
aa13eb6f2f Add extio and gpio at mainbus so that this builds. 2007-04-03 18:06:31 +00:00
dyoung
29bf5964b4 Auto-detect RAM size. 2007-04-03 18:05:57 +00:00
hannken
0adf7298aa Remove calls to now obsolete vn_start_write() and vn_finished_write(). 2007-04-03 16:11:31 +00:00
pooka
9cc76110cd In sync, skip vnodes which have a null v_data pointer. This is a
workaround for the problem analyzed more deeply in kern/30831.  In
short, the problem is keeping the vnode on the mount point vnode
list during reclaim.  If reclaim happens to sleep (as is a possibility
with smbfs due to calling vrele() and therefore possibly VOP_INACTIVE),
code going through the entire mountpoint vnode list will hit
half-reclaimed vnodes.
2007-04-03 14:18:19 +00:00
jmcneill
71195759ef In the AOAKeylargo case, there is no hardware volume control. Instead,
implement volume control in software via audio filter framework.

XXX: audio filter framework doesn't let me pass parameters from the hw
     softc to the filter, so the volume variables are globals for now.
2007-04-03 13:11:21 +00:00
yamt
ef47d5b67e - don't use veriexec_mountspecific_key uninitialized.
- fix weird "Veriexec: IDS mode, allowing unmount" messages.
2007-04-03 09:17:31 +00:00
xtraeme
02e5ad5584 Initialize msr_read explicitly to avoid a hang, from FUKUMUTO Atsushi. 2007-04-03 07:56:08 +00:00
macallan
f5a25c2db5 regen 2007-04-03 03:33:54 +00:00
macallan
8ec5fb10e2 add 1680x1050 @ 60.00Hz 2007-04-03 03:33:41 +00:00
jmcneill
c38a78ca65 Match AOAKeylargo, and don't make finding deq a requirement. Sound now
comes out of my last gen G4 Mac Mini, minus mixer controls. ok macallan@
2007-04-03 03:26:52 +00:00
macallan
d0ebad929a adapt to pmu changes 2007-04-03 03:15:17 +00:00
macallan
06802d0b24 cleanup a bit, fix some stupid pasto
thanks to jmcneill for finding the problem
2007-04-03 03:09:25 +00:00
christos
7074d009d5 Don't panic if we don't find a symbol or string table. Perhaps the kernel
has been stripped?
2007-04-02 16:44:44 +00:00
njoly
5c37954c94 Fix select() behaviour with NULL timeout, to blocks indefinitely
instead of returning immediately.
Reported by Edgar Fuß on port-amd64@.
2007-04-02 16:29:55 +00:00
mishka
933b97ecac Implement locking switcher for alternative layots (many languages
are based on completely different alphabet, and typesetting with
one of modifiers pressed all the time is just a PITA). See
http://mail-index.netbsd.org/tech-kern/2007/03/29/0002.html for
usage details.

While here, perform the following small cleanups:
- KS_Cmd_Scroll* execution should be explicitly interrupted with 'break'.
- Some 'human' cleanups in ksym extraction algorithm (no func. changes).
- Add a note: implemented ksym translation isn't sufficient for l10n.
2007-04-02 10:01:31 +00:00
hannken
13daf5bc6e Remove calls to now obsolete vn_start_write() and vn_finished_write(). 2007-04-01 10:15:01 +00:00
christos
a7761fd2c5 Instead of reading and writing little by little, allocate memory and
write the whole map in one shot so that we don't have to deal with the
map changing under us. Fixes the linux emulated jdk-1.6 where it was
losing the last map entry and could not find the stack on startup.
2007-04-01 03:18:57 +00:00
christos
6a4825167b return a page less than the actual top of stack so that linux-java works. 2007-04-01 03:16:44 +00:00
uwe
17dd2bf13d Mark __sh4_itlb_invalidate_all we call while running on P2 with
__attribute__((always_inline)) or gcc might decide not to inline it,
resulting in P2->P1 call.
2007-03-31 22:49:49 +00:00
plunky
fb76dbd4fc change declaration for protosw.h const symbolic strings to static, so that
they can be used by more than one source file without causing duplicate
definitions.
2007-03-31 18:17:13 +00:00
hannken
3b5501efa7 Cleanup last by using a "n"umeric address space identifier.
Ok: Martin Husemann <martin@netbsd.org>
2007-03-31 13:04:21 +00:00
martin
de3603e82a caddr_t fallout (only visible with options PPPOE_SERVER) 2007-03-31 11:00:23 +00:00
matt
a484b6a3f3 Add -fno-pic to CFLAGS and AFLAGS 2007-03-31 06:03:13 +00:00
matt
ea4611db47 s/volatile/__volatile 2007-03-31 06:02:08 +00:00
matt
2538fd4e27 Don't use an uninitialized lastaddr (initialize it to 0). 2007-03-31 06:01:33 +00:00
matt
db9db0872e Don't exceed array bounds (found by gcc 4.3).
XXX not sure if the fix is correct.
2007-03-31 06:00:38 +00:00
matt
2a142509e8 Build kernels with -fno-pic. 2007-03-31 05:59:45 +00:00
martin
a63279589c When invalidating a context, make sure to flush user windows upfront.
Do not set the DMMU secondary context to 0 (that would be kernel), and
add a few required membars after switching the secondary dmmu context.

This avoids SIRs caused by double kernel_data_faults, caused by spills
of obsolete user windows after the context for that user pmap is gone.
2007-03-30 21:14:13 +00:00
plunky
f21bb76883 be more explicit and consistent in use of KASSERT with pointers,
test against NULL
2007-03-30 20:47:02 +00:00
rumble
9b1a76ecf8 The wd33c93 chip appears to be clocked at 20MHz for all systems with a HPC. 2007-03-30 19:04:40 +00:00
pooka
de976b706d g/c some commented ltsleep calls accidentally left from newlock2 adaptation 2007-03-30 18:25:02 +00:00
pooka
115fa924ee * abstract ASYNCBIOREAD and let callers freely issue a callback called
from putop.  even though there's only one user currently, makes code
  more readable
* move "delta" to a standard parameter in vntouser and get rid of the
  specialcase vntouser_delta
2007-03-30 17:48:57 +00:00
christos
e6e1d4eb1a PR/36102: Yojiro UO: Restore revision 1.142's way of reading the descriptor
because uplcom hangs otherwise. Also reported by Anon Ymous.
2007-03-30 16:52:12 +00:00
he
b1bfbbc629 Drop `const' from a couple of declarations to comply with the latest
update of _def_time.c, ref. PR#10877.
2007-03-30 15:55:38 +00:00
ad
0ac3a31ea3 Cosmetic changes. 2007-03-30 11:06:58 +00:00
ad
3d5b66ed02 Always include kernel_lock so that LOCKDEBUG checks can find the symbol. 2007-03-30 11:05:59 +00:00
uwe
58951c715e In sh_clock_init just make sure that rtc oscillator is running, but
don't start rtc, so that rtc(4) can report wall time as invalid if
clock was not running on attach.
2007-03-30 00:37:51 +00:00
uwe
3ce2a9cb4d On attach check if clock is running, mark it invalid if not. Return
error from gettime method if clock is not valid.  Mark clock as valid
on settime.

Report more debugging info.
2007-03-30 00:32:58 +00:00
uwe
a4d20321d9 Re-enable interrupts in tlb_exception too. 2007-03-30 00:12:54 +00:00
uwe
86d3d1e448 Include #include <sh3/devreg.h> like other *reg.h do. 2007-03-29 23:09:41 +00:00
pooka
78762a532d in userdead assign waiter return value only if there is a waiter for
a particular request
2007-03-29 22:11:43 +00:00
ad
5714ab2718 Make cv_has_waiters() return type bool. 2007-03-29 17:39:34 +00:00
ad
79da439b94 - cv_wakeup, cv_broadcast -> cv_signal where appropriate
- Update some comments.
2007-03-29 17:37:13 +00:00
ad
4911263df8 cv_wakeup -> cv_signal 2007-03-29 17:35:17 +00:00
ad
6cf46baa77 - cv_wakeup: remove this. There are ~zero situations where it's useful.
- cv_wait and friends: after resuming execution, check to see if we have
  been restarted as a result of cv_signal. If we have, but cannot take
  the wakeup (because of eg a pending Unix signal or timeout) then try to
  ensure that another LWP sees it. This is necessary because there may
  be multiple waiters, and at least one should take the wakeup if possible.
  Prompted by a discussion with pooka@.
- typedef struct lwp lwp_t;
- int -> bool, struct lwp -> lwp_t in a few places.
2007-03-29 17:34:39 +00:00
ad
9982390dd6 lwp::l_acflag is no longer used. 2007-03-29 16:51:21 +00:00
pooka
6ce49d93c1 convert to MALLOC_JUSTDEFINE 2007-03-29 16:30:07 +00:00
pooka
9e407afead Introduce MALLOC_JUSTDEFINE{,_LIMIT} which act like their JUSTless
counterparts apart from not adding the new type to the link set and
hence not registering automatically at boot time.  This can be used
to avoid a separate #ifdef _LKM path in some cases.
2007-03-29 16:29:08 +00:00
pooka
78693816f2 Convert spinlocks & sleep/wakeup to newlock2 locking stuff. Fix a
bunch of bugs.

* park structures are now always allocated from a pool instead of a
  mixed stack/malloc allocation
* get rid of the whole adjbuf concept, always just alloc the maximal
  amount of memory to satisfy a request
* little regression: don't allow interrupting wait from file system
  to userspace; this had problems already before, but now the problems
  really started to shine through.  I'll try to make this work again
  some day.
* fix bmap to return a sensible value in runp
2007-03-29 16:04:26 +00:00
dillo
6c83a28313 Now that all DRM drivers build (thanks jmcneill), readd them. 2007-03-29 13:11:14 +00:00
dillo
46009d7e0f Fix include paths. Now all drm drivers build. 2007-03-29 13:09:48 +00:00
jmcneill
e741359891 Fix include paths, mgadrm compiles now. 2007-03-29 11:42:39 +00:00
jmcneill
4ce279101e In drm_remove_magic, free the magic entry when it is found instead of
attempting to free a NULL reference in the error case. From Yorick Hardy.
2007-03-29 11:31:06 +00:00
dillo
d571ffa806 Revert previous, mgadrm does not compile. 2007-03-29 08:44:23 +00:00
dillo
c618a0d039 Add DRI drivers. 2007-03-29 08:27:01 +00:00
adrianp
b02eb0fb91 A number of functions do not validate the length of arguments passed.
As a result of this a user could supply a bad 'sockaddr' structure to
clnp_route() via connect(2).
Issue found by Christer Oberg and patch from christos@ (NetBSD-SA2007-004)
2007-03-29 08:19:20 +00:00
uwe
39792f9d55 Mark inline functions we call while running on P2 with
__attribute__((always_inline)) or gcc might decide not to inline them,
resulting in P2->P1 call while we mess with the cache, and kernel
would just hang immediately on boot.
2007-03-29 01:51:49 +00:00
uwe
5f9be1916f G/c ancient workaround that has been commented out for ages. 2007-03-28 23:59:00 +00:00
jmcneill
11827f045a Introduce options DRM_NO_AGP and DRM_NO_MTRR, so I can run this on
platforms that don't provide these services.

In drm_mmap, don't wrap the return value with atop() if we're on macppc.

While we're here, fix:
	pci_intr_establish(&dev->pa.pa_pc, ...);
to:
	pci_intr_establish(dev->pa.pa_pc, ...);

The former doesn't even compile on macppc, and I'm amazed that it works at
all anywhere else.
2007-03-28 11:29:36 +00:00
simonb
63c0e43159 Whitespace nit. 2007-03-28 03:55:19 +00:00
jmcneill
f99eecc8b2 Make this compatible with tdfxdrm. 2007-03-27 22:44:42 +00:00
jmcneill
1cd076928b Instead of having a lookup table of devices that support AGP V3, use the
capabilities register to determine the chipset's supported AGP mode. We
still fallback to V2 compatibility mode when necessary.
2007-03-27 20:57:46 +00:00
salo
1eaca7c5df fix typos in last, Eratta->Errata 2007-03-27 13:13:49 +00:00
pooka
92f2958999 regen 2007-03-27 12:42:31 +00:00
pooka
4823cfcfaf add GeForce Go 7600 2007-03-27 12:41:39 +00:00
jnemeth
45ed5307a6 fix a couple of syntax issues in sparc code from Tobias Nygren 2007-03-27 10:17:48 +00:00
jnemeth
618e615736 move definition of FTC_FLIP to auxioreg.h to mirror sparc 2007-03-27 10:13:12 +00:00
msaitoh
f727e5ef27 Workaround for 82541 Eratta 29 and 82547 Eratta 28.
These devices have to reset the PHY before reset the MAC.

Reported and tested by salo.
2007-03-27 01:56:41 +00:00
jmcneill
68557987f6 Add AGPv3 support to VIA AGP driver from FreeBSD.
I can now use DRI w/ AGP enabled on my r300.
2007-03-27 00:34:16 +00:00
garbled
47dfabcdf7 Add support for VIA V-TECH ata raid. Tested on 4.0 with RAID0, RAID1 and
SPAN over a pair of sata drives on a VT8237A SATA Controller.
2007-03-27 00:10:20 +00:00