Commit Graph

92016 Commits

Author SHA1 Message Date
tnn 303f9ebb5b Make the ACPI_MADT_DEBUG code compile again. 2008-01-07 06:04:07 +00:00
tnn 51f964a289 softdep_freefile: don't acquire ufsmount lock twice. 2008-01-07 05:20:25 +00:00
uwe e97e9077cc Note landisk import date. 2008-01-07 05:02:38 +00:00
uwe f38b1e35de Now that sh3 has didicated interrupt stack we can check for cpu_intr_p
with simple sp comparison, so we can drop ci_idepth.
2008-01-07 05:00:12 +00:00
uwe b786c078f9 Add endif comment for __HAVE_FAST_SOFTINTS. 2008-01-07 04:43:54 +00:00
uwe 1e0e088d60 cpu_intr_p - we can simply check if we are running on the interrupt stack. 2008-01-07 04:41:40 +00:00
ad d534bbfa2e Really, remove last vestiges of simplelock debugging. 2008-01-07 01:55:15 +00:00
ad 907a6a54db Fix dodgy assertions. From Anders Hjalmarsson. 2008-01-07 00:43:27 +00:00
ad b439191858 Remove vestiges of simplelock debugging. 2008-01-07 00:27:35 +00:00
ad de5c0b29ed Build kobj_machdep.c if MODULAR. 2008-01-07 00:26:32 +00:00
bjs 521d96c676 The stamp mutex is not unsafe, so remove this comment so people don't get the wrong idea. ok ad@ 2008-01-07 00:25:19 +00:00
ad 9202b67eca Overzealous; pull in machine/lock.h again. 2008-01-07 00:20:18 +00:00
uwe d8f0d4be74 Catch up with new option to dev/pckbport/wskbdmap_mfii.c 2008-01-07 00:19:08 +00:00
ad 80f35bef49 #include <sys/mutex.h> 2008-01-06 20:53:06 +00:00
christos d879c8360a defflag one moe variable. 2008-01-06 19:42:33 +00:00
christos d1b79165fa clamp min/max values properly. 2008-01-06 19:42:03 +00:00
mhitch c04c9a55d0 Add timecounter support and borrow counter-based delay from i386.
From joerg;  testing and final tweaks by me.
2008-01-06 18:50:29 +00:00
martin 890508dbe9 argh, I did not intend to remove all declarations of physmem. 2008-01-06 18:35:24 +00:00
martin ae4518d415 Remove superflouse extern decls. 2008-01-06 18:24:06 +00:00
martin fb8f17133f Move the mutex_init of pmap_lock even later into pmap_init().
This makes LOCKDEBUG kernels work again.
2008-01-06 18:07:16 +00:00
ad 0805a9416a Add MODULAR option. Include kernel linker stuff if MODULAR. 2008-01-06 18:03:58 +00:00
martin 9a2bbccfc7 Load the next cpu_info pointer with LDPTR instead of ld. 2008-01-06 17:22:15 +00:00
jmcneill bf49138bfc Fix off-by-one in kobj_read range checking for case KT_MEMORY 2008-01-06 15:13:07 +00:00
ad b9e6d93835 - Allow loading ELF objects from memory. Based on a patch from jmcneill.
- Allow for changing object name later, once known.
- Split open/load of the objects.
2008-01-06 14:47:26 +00:00
ad dff5d8444c Only do the xcall if !cold. 2008-01-06 14:33:27 +00:00
dsieger 55cdd729c2 Fix a typo: s/Kgdb_dev/kgdb_dev/ 2008-01-06 13:54:01 +00:00
martin 2a8b08575b We can not mutex_init() before setting up the per-CPU mappings needed
by curcpu() - a LOCKDEBUG kernel will die otherwise.
2008-01-06 13:41:28 +00:00
kent 9602a50eb5 recognized the names of Sigmatel STAC9227-9230 2008-01-06 13:33:21 +00:00
ad 67cc6c4e0d Update curcpu()->ci_idepth, not the (left over) local. 2008-01-06 13:28:17 +00:00
dsl b6e6554ace include sys/simplelock.h 2008-01-06 13:25:22 +00:00
dsl f3df4c2289 include sys/simplock.h 2008-01-06 13:18:19 +00:00
kent 86e51d72d1 fix a bug of S/PDIF audio format selection
PR/36493 by Arcady Antipin
2008-01-06 12:56:20 +00:00
bouyer 4507f75dd0 Fix fallout from vmlocking2: in xbdback_co_io_loop(), return the right object. 2008-01-06 12:43:42 +00:00
chris 941409f5f4 curcpu()->ci_depth is now updated in irq_dispatch.S, remove duplication
from footbridge.
2008-01-06 12:17:13 +00:00
he eb14906cb2 Include <sys/device.h> explicitly to pull in needed definitions. 2008-01-06 10:33:24 +00:00
matt d9322458cc Truly kill current_intr_depth once and for all. 2008-01-06 03:45:26 +00:00
matt 940cdbb355 current_intr_depth is dead. Make sure we don't use it anymore. 2008-01-06 03:11:42 +00:00
matt ace1262f40 current_intr_depth is dead. kill it off for good. 2008-01-06 03:01:59 +00:00
martin 258a4b78cf With the new IPL world, things are easier for us: if we can get the
nell hardware interrupt handler run at IPL_VM, we can call the socket
drivers interrupt handler directly.
This is always possible on sparc64, but on sparc we might have to fall
back to the old softint bounce. Since this uses arbitrary IPLs, we
can not use the new softint_* for this - we'll have to use the old
sparc_softintr_* functions.
2008-01-06 02:29:58 +00:00
matt 0c0de8072e Cleanup softint lossage. 2008-01-06 01:37:53 +00:00
matt 3ef8cd67cc Increase SYMTAB_SPACE because of more kernel bloat. 2008-01-06 01:35:34 +00:00
matt e7574fcb84 Make sure interrupt handler is updating curcpu()->ci_depth 2008-01-06 01:19:42 +00:00
ad 503fb6483e A quick hack to make cpu_intr_p() work on shark. Needs to be fixed
properly by someone who does arm assembly.
2008-01-06 00:56:18 +00:00
ad e5942a85c1 Missing lock acquire. 2008-01-05 23:54:24 +00:00
ad 58dc3540b0 Add fgetdummy/fputdummy: allocate and free dummy 'struct file' entries
to be used when traversing filehead.
2008-01-05 23:53:21 +00:00
martin 798130646c Add missing include 2008-01-05 22:50:12 +00:00
yamt bb81964965 allocate dedicated stacks for NMI. PR/37662. 2008-01-05 22:48:31 +00:00
martin d5681ba54e Add missing include. 2008-01-05 22:45:22 +00:00
yamt 55ac8a439e remove a stale comment. 2008-01-05 21:59:33 +00:00
yamt f98ad43750 remove no longer necessary cpu_maxproc. 2008-01-05 21:52:01 +00:00
yamt 35f1be57b4 - make amd64 use per-cpu tss.
- fix iopl syscall for amd64+xen.
2008-01-05 21:47:18 +00:00
yamt f44110bb2a move IOMAP_INVALOFF from cpu.h to tss.h 2008-01-05 21:45:00 +00:00
yamt e9a50f2e86 g/c unused members 2008-01-05 21:40:57 +00:00
yamt a0958af97a g/c ci_idle_pcb_paddr 2008-01-05 21:37:25 +00:00
jdc f42ce09a9c Add bmtphy* (for gem*). 2008-01-05 20:38:31 +00:00
jdc bb4a0543ee Updates from OpenBSD:
-- r1.15
  Add some DSP init code for BCM5221's.

  Values derived from Apple's GMAC driver, same init
  code also exists in Linux's sungem_phy driver.

  tested by miod@ pedro@ and otto@ on a few systems.
    -- r1.16
  Always explicitly set IFM_HDX for half-duplex.

  From brad@
    --
2008-01-05 20:33:29 +00:00
jdc 6055efa604 Add support for Sun PCI X1141A (SX fibre) cards.
Add support for GEM cards on non-OFW machines.
2008-01-05 20:30:22 +00:00
jdc 196789ac55 Add support for Sun PCI X1141A (SX fibre) cards, based on the GEM
documentation, experimentation and a previous patch from John Heasley.

Add improvements to the driver based on the GEM documentation and
from FreeBSD if_gem.c (rev 1.45).
2008-01-05 20:27:44 +00:00
christos adf68778f6 Add PaX stuff for testing. 2008-01-05 20:14:01 +00:00
bouyer f8a26c5d3c Wrap test for debug_port in __predict_false() 2008-01-05 19:29:26 +00:00
apb 4ee202cfe2 If a menu line in boot.cfg has an empty description, then re-use the
command as the description.  For example,

	menu=:boot netbsd -s

now works like

	menu=boot netbsd -s:boot netbsd -s
2008-01-05 19:29:16 +00:00
bouyer 81873269e4 Make sure debug_port isn't used before initialized by setting it to -1. 2008-01-05 19:16:07 +00:00
dsl 95a195791a Use FILE_LOCK() and FILE_UNLOCK().
Attempt to fix all the code paths so that the 'fp' returned by fd_getfile()
isn't left locked, and is always unlocked (and ref-counted) before
doing anything that might sleep.
2008-01-05 19:14:07 +00:00
dsl 902612f1f5 Use the new names (_REG_RFLAGS and _REG_RSP) for the indexes of __gregs[]
which match the names of in the trapframe and .S code.
2008-01-05 19:11:53 +00:00
dsl 8a62c0f2a5 Use FILE_LOCK() and FILE_UNLOCK() 2008-01-05 19:08:48 +00:00
dsl 482bdf6cb9 Add FILE_LOCK() and FILE_UNLOCK() defines.
Change a comment to make it clear that if code doesn't call FILE_USE()
it should call FILE_UNLOCK() instead.
2008-01-05 18:52:16 +00:00
christos d4fda54fa5 PR/37696: Paul Ripke: add large read / readahead support (Introduce run-length
detection to msdosfs_bmap(), from FreeBSD)
2008-01-05 18:42:14 +00:00
ad 21946bba05 Make acct_lock a rwlock. 2008-01-05 18:23:30 +00:00
ad 63baaccb6d Serialize calls to tc_windup(). 2008-01-05 18:00:37 +00:00
ad a5edcb2c82 Missing arg to cv_timedwait(). 2008-01-05 17:38:50 +00:00
dsl 8d35d4af30 Remove #define DISK_DEBUG left in by mistake 2008-01-05 15:28:43 +00:00
ad 4eefe3e642 Export log_lock. 2008-01-05 14:07:26 +00:00
martin b432cf5a27 Include lock.h, as we are using memory barrier macros defined there. 2008-01-05 13:27:27 +00:00
dsl b8bcdbe9e6 Don't pass 'curlwp' into trace_enter() and trace_exit(). 2008-01-05 12:53:52 +00:00
ad 31ef469fe7 Work around com hangs with pcmcia. PR kern/37462. 2008-01-05 12:44:13 +00:00
dsl 463af8509e Don't pass curlwp into process_stoptrace() 2008-01-05 12:41:43 +00:00
ad fbed3be26c Make compile. 2008-01-05 12:40:34 +00:00
ad 212c50dd1b Need sys/lock.h for SPINLOCK_SPIN_HOOK. 2008-01-05 12:39:27 +00:00
ad ac85866313 simple_lock_only_held() is gone. 2008-01-05 12:31:39 +00:00
dsl c9848793d9 Don't pass l (== curlwp) into the system call trace code.
Delete inclusion of opt_syscall_debug.h into systm.h, every kernel object
file doesn't need to depend on opt_syscall_debug.h!
2008-01-05 12:30:47 +00:00
dsl ba7a604397 Reorder the amd64 trapframe (swap rcx/r10 and add 4 spare slots after r9).
This allows the syscall code to pass the syscall args directly from the
trapframe instead of copying them to a separate structure.
It is still possible that some lurking code still assumes that
'struct trapframe', 'struct mcontext' and 'struct reg' all have the
registers in the same order, but I've fixed enough of them to get gdb working.
2008-01-05 12:08:50 +00:00
dsl 77fe68004d Do not assume that 'struct reg' and 'struct trapframe' have the same
layout.  Instead copy the fields individually.
2008-01-05 12:01:34 +00:00
he 30542539fe Now that compat/hpux is gone, this has no chance of building, so
remove it as well.
2008-01-05 10:24:11 +00:00
dan 6b2d0ee56c use more includes, take them from the right place
xtraemok
2008-01-05 04:50:05 +00:00
riz f28eb587da Add #include <sys/simplelock.h> 2008-01-05 04:03:01 +00:00
matt acb0b175a3 Add #include <sys/simplelock.h> 2008-01-05 02:47:03 +00:00
ad c29520cb1a Fix includes. 2008-01-05 00:31:50 +00:00
ad 0c8143169b Fix includes 2008-01-05 00:22:34 +00:00
ad fee5b86dc3 Don't need sys/lock.h 2008-01-05 00:19:46 +00:00
dyoung 1c6cf449e1 Constify. 2008-01-04 23:35:00 +00:00
dsl c18b957cb0 Repeat after me, don't edit files (even to update comments) between test
build and committing.
2008-01-04 23:29:54 +00:00
dyoung f9c1ba02ee Constify a bit. 2008-01-04 23:28:07 +00:00
dyoung a4455600d4 Replace rtcache_down() with rtcache_validate() and update rtcache_down()
uses.
2008-01-04 23:26:44 +00:00
dsl abceae9908 Change the way that the trap/intr/syscall frames and the __gregset_t[]
indexes are defined so that only a single list of the registers is used.
The code no longer relies on the two structures matching.
There should be no binary change.
2008-01-04 23:04:53 +00:00
ad 87a9501131 Fix includes. 2008-01-04 22:54:46 +00:00
joerg 700e393dca time.tv_sec -> time_second 2008-01-04 22:43:45 +00:00
dyoung 46aba2a3d0 Remove superfluous #if (NPCPPI > 0). 2008-01-04 22:28:20 +00:00
ad 8c68ad876e Fix headers. 2008-01-04 22:17:04 +00:00
ad 0fbfbb4408 Correct headers. 2008-01-04 22:15:58 +00:00
ad c9e4f09710 Pull in the right headers. 2008-01-04 22:15:08 +00:00
ad fb1e16b417 Need sys/device.h 2008-01-04 22:13:55 +00:00
dyoung 482c583bd7 Move #endif to the place where it belongs. Thanks, Chavdar Ivanov,
for noticing this.
2008-01-04 22:10:34 +00:00
joerg e36a3212f8 Catch up with rename of buf's b_un.b_addr -> b_data. 2008-01-04 22:04:59 +00:00
ad 225df3f88d Don't pull in unrelated gunk. 2008-01-04 22:03:25 +00:00
joerg 547d94f35c Add missing sys/device.h. 2008-01-04 21:58:51 +00:00
ad e6ab480d6d Header cleanup. 2008-01-04 21:58:03 +00:00
joerg 84487ad85b Needs sys/simplelock.h. 2008-01-04 21:56:36 +00:00
ad 8a9b6ca32a Need sys/lock.h for kernel_lock. 2008-01-04 21:54:49 +00:00
ad 0269f24d50 Don't pull in unrelated headers. 2008-01-04 21:54:05 +00:00
ad 0becf21618 Include sys/device explicitly. 2008-01-04 21:53:51 +00:00
ad 910c8a56ab Use new style memory barriers. 2008-01-04 21:53:00 +00:00
ad 070e98eb7b Pull in sys/atomic.h for memory barriers. 2008-01-04 21:52:48 +00:00
ad f142225fa0 B_BAD has done nothing for a long time. 2008-01-04 21:48:05 +00:00
ad edcd8e4c68 More header file cleanup. 2008-01-04 21:47:16 +00:00
joerg a547a2785a Use time_second instead of time.tv_sec. 2008-01-04 21:43:58 +00:00
xtraeme 0f546319ca sys/simplelock.h is required now. 2008-01-04 21:33:17 +00:00
xtraeme 9bb6b94d89 sys/lock.h is required now. ok ad 2008-01-04 21:31:06 +00:00
xtraeme e9b20f72c4 sys/simplelock.h is required now. 2008-01-04 21:24:22 +00:00
ad 0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
ad 46a018d0e2 More linker stuff 2008-01-04 21:06:37 +00:00
xtraeme 29f483410f machine/cpufunc.h is required now. 2008-01-04 20:42:25 +00:00
christos 5fa6e7c2d4 add missing includes 2008-01-04 20:38:01 +00:00
uwe d02168ab21 There's no need to pull in machine/intr.h here. 2008-01-04 20:10:12 +00:00
dsl e3c05d1c5d Allow the boot code to use the disklabel 'faked up' from the mbr.
Should allow bootxx_fat16 (and bootxx_msdos etc) to boot from drives that
don't contain a netbsd disklabel.
2008-01-04 20:05:46 +00:00
joerg 7a170eb0b2 Add missing mutex for cv_timedwait. 2008-01-04 19:45:54 +00:00
ad c86e36f12b Don't pull in sys/simplelock.h, it's not needed. 2008-01-04 18:40:04 +00:00
ad 48160965f3 sys/lock.h isn't needed here. 2008-01-04 18:38:31 +00:00
ad b31bcb4d13 don't need sys/lock.h 2008-01-04 18:25:42 +00:00
ad f479e1b23b - Always include kprintf_slock.
- sys/lock.h -> sys/simplelock.h
2008-01-04 18:21:06 +00:00
ad 35dd6c193a sys/lock.h -> sys/simplelock.h 2008-01-04 18:18:31 +00:00
uwe bf6001ba0f G/c bogus includes that do nothing but add circular dependency between
intr.h and mutex.h
2008-01-04 18:03:01 +00:00
ad c0da486b16 Linker stuff for powerpc. 2008-01-04 18:00:16 +00:00
kent e93ecba847 shorten mixer-input names by mixer-name automatic generation
PR/37273
2008-01-04 17:00:05 +00:00
yamt 1c6ebd43e5 fix a bug in the previous. (per-cpu tss change)
keep iopl in pcb so that it won't lost.
2008-01-04 16:38:46 +00:00
ad b8e6bdeab5 Linker bits for sparc64.
XXX Does not handle 32-bit kernels.
2008-01-04 16:34:41 +00:00
ad 694c00b8fe Linker bits for arm. 2008-01-04 16:23:39 +00:00
ad 914b753523 Linker bits for alpha. 2008-01-04 16:19:25 +00:00
ad 6f7f8905b7 Adjust ci_idepth for cpu_intr_p(). 2008-01-04 16:09:54 +00:00
yamt 35d91ae479 i386:
- make tss per-cpu.  this considerably speeds up context switch for,
	  at least, pentium4, where ltr instruction seems very slow.
i386, xen:
	- kill cpu_maxproc.
kvm86:
	- adapt to per-cpu tss.
	- cleanup and simplify.
	- move kvm86_mp_lock to more meaningful place.
	- disable preemption during a call.
2008-01-04 15:55:28 +00:00
yamt b860f867c0 use device_xname. 2008-01-04 15:44:58 +00:00
pooka 933a1a1af1 Politely refuse to mount a file system which says its FAT size is
zero - our implementation can't handle it (how sensible handling
a case like that would be is a whole other debate).

fixes panic reported by Jukka Salmi on current-users
2008-01-04 14:58:16 +00:00
ad 4c5e4edd5c Add a kobj_stat() to get basic info about the object, and some other
minor changes.
2008-01-04 14:53:32 +00:00
ad 75209c4d35 Fix it. 2008-01-04 14:51:17 +00:00
ad 1dd75d2865 Add a simple in-kernel linker, derived from FreeBSD's link_elf_obj.c. Needs
more work but is enough to load simple LKMs. amd64 is untested.

Locking is caller provided. This is decoupled from the LKM framework because
kernel modules need not be loaded from the file system - they could be built
into the kernel and referenced via link set.
2008-01-04 12:26:20 +00:00
kent 16504b27b0 simplify conversion rule between device volume values and userland
volume values.  Some mixer values never be 255 by this change.

PR#37274
2008-01-04 12:18:00 +00:00
ad c0cd2b871b Ignore symbols marked undefined. 2008-01-04 11:28:13 +00:00
smb 0cb6d977ab Add calls to pmf_deregister on detach. 2008-01-04 03:56:47 +00:00
martin f0fe5d20cf lk_interlock is a kmutex_t now 2008-01-04 01:11:30 +00:00
simonb 0bab12ba30 Make this compile with DEBUG enabled (fix a printf format, convert to
timecounters).
2008-01-04 01:00:43 +00:00
pooka 9b30791f86 Print "panic: " before panicstr when panicking. 2008-01-04 00:38:24 +00:00
joerg e6f452fd65 Allow saving of up to 4 PCI registers in the IDE code. 2008-01-04 00:27:27 +00:00
dyoung 17b65ff15d Disable pci_disable_retry() and cardbus_disable_retry(), with a
long comment on pci_disable_retry() (cross-referenced at
cardbus_disable_retry()) that explains why.
2008-01-03 23:15:43 +00:00
joerg 28b31e738f Timecounter and generic todr support for pmax. From Garret D'Amore. 2008-01-03 23:02:24 +00:00
joerg 26ecc8b33a Add missing include of dev/clock_subr.h. 2008-01-03 22:35:27 +00:00
jdc 829d5d12dc Print the "banner-name" property (up to the first '(' character), if
it is present, as well as the "name" property.
2008-01-03 21:34:58 +00:00
he 46a379e692 Declare sysbeepdetach(), and protect a small additional section
with #if (NPCPPI > 0).
2008-01-03 21:30:16 +00:00
xtraeme 98d660f7bb Fix indentation. 2008-01-03 21:28:11 +00:00
joerg 02af50dd40 Add assym.h dependency. 2008-01-03 21:17:44 +00:00
joerg c087080661 Missing assym.h dependency. 2008-01-03 20:58:06 +00:00
joerg a8affe0a2c Missing assym.h dependency. 2008-01-03 20:02:22 +00:00
ad 5f56d09078 Bump NKL2_KIMG_ENTRIES to allow for 20MB of kernel.
Well past time for an in-kernel linker...
2008-01-03 19:30:10 +00:00
ad e01dd1a1f8 Use pool_cache. 2008-01-03 19:28:48 +00:00
tron 4ee524a917 Fix perfomance problems for old revisions of the Symbios 53c1030.
Patch supplied by Patrick Welche in PR kern/30531.
2008-01-03 18:16:20 +00:00
pooka 89943d2ace fix vmlocking2 fallout: fstrans_mount/unmount 2008-01-03 18:09:35 +00:00
kent f8415b4922 code cleanup
- use __arraycount
- remove unnecessary M_ZERO flags
2008-01-03 18:00:43 +00:00
elad 86f224903e Replace malloc/free usage with kmem_alloc/kmem_zalloc/kmem_free.
okay yamt@.
2008-01-03 17:51:05 +00:00
kent c89324c85e - add initialization for ATI HDMI audio
- add custom mixer table for AD1986A by scw@
PR: kern/36140
2008-01-03 17:39:03 +00:00
he 75fc209bcf Fix a cv_timedwait() usage after the vmlocking2 merge, and remove
a now-no-longer-used local variable.
2008-01-03 16:06:24 +00:00
yamt 5661ec0901 - malloc -> kmem_alloc
- kill M_EXEC.
2008-01-03 14:36:57 +00:00
yamt 6184f2ada8 malloc -> kmem_alloc 2008-01-03 14:29:31 +00:00
yamt 97436a1e88 fix malloc type mismatches. 2008-01-03 14:25:49 +00:00
ad 202aa39736 - Remove simple_lock calls.
- Use mutex_enter/exit where needed.
2008-01-03 13:18:55 +00:00
kiyohara bd1410f189 Remove white-space. 2008-01-03 07:21:21 +00:00
mrg 9c1261344f support FS_RAID partitions, and increase the offset by
RF_PROTECTED_SECTORS (64) if so.
2008-01-03 06:40:02 +00:00
dyoung 8d9f58ea97 Support detachment of geodegcb(4) and its children, geodecntr(4)
and geodewdog(4).  Support detachment of gscpcib0 and its child,
gpio0.
2008-01-03 04:52:54 +00:00
dyoung 69d7a3e831 Support detachment of pchb(4) and sysbeep(4). 2008-01-03 04:50:19 +00:00
dyoung a72fb242fe Add tc_detach() for detaching a timecounter. It is good enough to
detach the AMD Geode SC1100 27 MHz clock, geodecntr(4), but there
may be synchronization problems on MP machines.
2008-01-03 04:42:13 +00:00
jnemeth 87a13edaae regen -- Symbios Logic 0x0030 is used for both 53c1020/53c1030 from Dave Huang 2008-01-03 03:40:24 +00:00
jnemeth 28cdc331fe Symbios Logic 0x0030 is used for both 53c1020/53c1030 from Dave Huang 2008-01-03 03:38:32 +00:00
pooka deeebf9713 Theoretically this is supposed to be interchangeable with real
kernel code.  Use kmem_alloc/free instead of some wily homerolled
rump interfaces for memory allocation.
2008-01-03 02:48:02 +00:00
pooka 2c7914f588 use UVM_OBJ_INIT/DESTROY() 2008-01-03 02:44:05 +00:00
pooka daaf5e53c9 initialize error value 2008-01-03 02:38:23 +00:00
christos 79fa20a533 - remove casts
- sprinkle static
- move decls inside ifdef
2008-01-03 02:30:08 +00:00
pooka 8e7631e799 make the UFS_EXTATTR case build 2008-01-03 02:23:27 +00:00
pooka 34fa5dc385 struct vop_foo_args comment police: a_l has ceased to be 2008-01-03 02:18:20 +00:00
pooka d53e261066 valloc -> vnalloc, vfree -> vnfree
Avoids collision with userland valloc(3).

no functional change
ad ok
2008-01-03 01:26:28 +00:00
dyoung 09fd56f9ec Detach attimer at acpi, attimer at isa. 2008-01-03 01:21:44 +00:00
yamt 2129f3c054 malloc: fix freelist corruption. 2008-01-03 01:21:08 +00:00
joerg c8ad2035a8 Simplify delay based on x86 version. 2008-01-03 01:02:04 +00:00
joerg 62fcc14f1c ANSIfy. 2008-01-03 00:31:28 +00:00
xtraeme 68d02b93e3 New functionality for arcmsr(4) native management via bioctl(8):
Added support to create/remove hot-spare, pass-through disks.
Added support to create/remove volume sets.
Added support to show information about physical disks, even if they
are marked unused, hot-spares or pass-through.

sd(4) devices are attached/detached automagically when a pass-through
disk or volume set is created/removed... thanks scsipi(9) and cube@
for hints.
2008-01-02 23:48:05 +00:00
xtraeme 59a09b45c9 Improve the bio(4) API for incoming changes to arcmsr(4) (and perhaps
other drivers in the future):

- Added BIOC_SVCHECKING to the BIOCVOL ioctl, to know if a volume is
  running a consistency check.
- Added three more volume levels for the BIOCVOL ioctl.
- Added BIOC_SDPASSTHRU to the BIOCDISK ioctl, to know if a disk is
  in pass-through mode.
- Added BIOCDISK_NOVOL; it's used with the same reason than BIOCDISK,
  but it's used only to get information about the physical disks connected
  in a controller (regardless if they are in a volume set or not).
- Added BIOC_SSDELHOTSPARE, BIOC_SSPASTHRU, BIOC_SSDELPASSTHRU,
  BIOC_SSCHECKSTART_VOL and BIOC_SSCHECKSTOPVOL; to remove a hot-spare,
  add and remove a pass-through disk and to start/stop a consistency
  check in a volume.
- Added the BIOC_VOLOPS ioctl; to create/remove a volume set.
- Removed the BIOCCREATERAID ioctl, it was too limited for my needs.
- Added compatibility ioctls for BIOCDISK and BIOCVOL, enabled via COMPAT_30.
2008-01-02 23:45:03 +00:00
dyoung e9596bf19e Introduce a struct cardbus_chipset_tag, and make cardbus_chipset_tag_t
a pointer to that struct, so that we cannot assign pointers of
arbitrary type to cardbus_chipset_tag_t.  Tweak cbb(4) to accomodate
this change.

Make Cardbus_conf_read() and Carbus_conf_write() pass the right
arguments to cardbus_functions->cardbus_conf_{read,write}() for a
change.

Let's hope this stops the crash in cardbus_function_enable() that
macallan@ reported to me.
2008-01-02 23:11:34 +00:00
dyoung 4f422f7b22 Don't assign a cardbus function tag to a cardbus chipset tag.
Michael Lorenz, macallan@, actually found this bug.

(I will change cardbus_chipset_tag_t to a struct * from void *, so
that the compiler will detect similar typos in the future.)
2008-01-02 23:04:25 +00:00
pooka 4f32bae2c1 More type-punning workarounds. Curiously the kernel compilation
flags cause gcc to not complain.
2008-01-02 22:37:19 +00:00
pooka b8121d8a80 silence gcc about break type-punning 2008-01-02 22:33:10 +00:00
dyoung 91345ba277 Do not read past the CIS region. Stops an MCHK exception on macppc
(reported by macallan@).

I originally detected this bug by activating 'PCI master target
abort' interrupts on the AMD Elan SC520 processor.  Lo and behold,
several interrupts occurred before the system had finished booting!
NetBSD should probably activate PCI exception reporting whenever
it is available.
2008-01-02 22:29:00 +00:00
yamt 5da7542a9d - elf_load_file: return ENOEXEC instead of 0 in the case of
e_phnum > MAXPHNUM.
- exec_elf_makecmds: return an interesting error rather than
 always using ENOEXEC.
- reject e_phnum==0.
2008-01-02 22:04:56 +00:00
pooka f8ff426bbb fix build for OBJDIR case. noticed by plenty 2008-01-02 22:01:41 +00:00
ad 95ffd8cee1 Another driver that should use getiobuf(). 2008-01-02 21:59:45 +00:00
dyoung 03f1738ff9 Use device_t, device_private(). Join some lines. 2008-01-02 21:05:51 +00:00
he 1b2f5d4f55 Remove the #endif corresponding to the #ifdef _KERNEL removed in previous. 2008-01-02 21:00:34 +00:00
dyoung 95bf02050e Use device_t, device_private(). 2008-01-02 20:47:28 +00:00
jmmv 14780346b4 Remove this; objections from joerg@ and ad@, and I agree with them that
additional kernel configs are not the way to go because they are not
flexible at all.  Plus ad@ is working on a real solution (bootprop).
2008-01-02 20:40:43 +00:00
yamt 22d570119a use kmem_alloc instead of malloc. 2008-01-02 19:44:36 +00:00
yamt 677860cb8a use kmem_alloc instead of malloc. 2008-01-02 19:26:45 +00:00
yamt c68e4b1c69 remove PIPE_WANTW, PIPE_WANTR and PIPE_WANTCLOSE. cv_waiters is enough.
this fixes a deadlock between pipe_direct_write and pipeclose.

XXX this code should be simplified.
it's mostly pointless to have two struct pipes linked together,
esp. when we don't support bi-directional pipes.
2008-01-02 19:16:00 +00:00
pooka 4f69d01d2f Add the ability to run puffs in userspace. This means that puffs
can now be developed in userspace using puffs for development
(I hate emulators, they are annoyingly clumsy).

To e.g. mount psshfs using puffs-on-puffs, run fs/bin/syspuffs/syspuffs
with the regular mount_psshfs command line as an argument:

    golem> ./syspuffs /usr/sbin/mount_psshfs ftp.netbsd.org:/pub /puffs

This will make the mount appear as usual, with the exception that the
requests will be passed through puffs both in the kernel and userspace:

    ftp.netbsd.org:/pub on /puffs type puffs|p2k|puffs|psshfs
2008-01-02 18:15:12 +00:00
ad 77ab895b0c LKMs don't care about the MULTIPROCESSOR option any more. 2008-01-02 17:52:02 +00:00
yamt 03539d901d pmap_extract_ma:
- TRUE/FALSE -> true/false
	- (P == FALSE) -> (!P)
2008-01-02 17:33:08 +00:00
christos ad809afe5c PR/37663: Guy Harris: bpf_validate rejects valid programs that use the multiply instruction 2008-01-02 15:58:01 +00:00
pooka 3c068d8021 fix vmlocking2 fallout:
* I heard a wild rumor that vp_interlock is a mutex these days (hi ad!)
* init new locks (hi ad)
* observe that with simple_locks only deadlocks would be caught while
  releasing unlocked locks would go unnoticed.  make locking work (hi pooka)
2008-01-02 15:44:03 +00:00
ad ae47be00a8 Provide valloc(), fix vfree(). 2008-01-02 13:42:47 +00:00
ad 896ac1329e Build intr.c. 2008-01-02 12:49:53 +00:00
joerg 9f9b7d3adb Better description, this is not GENERIC after all. 2008-01-02 12:49:30 +00:00
joerg 956f82654b Add some missing dependencies on assym.h. 2008-01-02 12:46:23 +00:00
ad 888ef28a4d Fix merge error. 2008-01-02 12:46:07 +00:00
yamt 41f847fb03 make pmap_pv_cache static. 2008-01-02 12:31:32 +00:00
yamt d450c78d16 g/c pv_page stuffs. 2008-01-02 12:30:30 +00:00
xtraeme b88ea32e70 - Initialize the callout with CALLOUT_MPSAFE, like it was done before
in sysmon_envsys_events.c.
- Separate sme_event_check_low_power() into sme_battery_check(),
  sme_acadapter_check() and sme_battery_critical() (no functional changes).
2008-01-02 12:20:26 +00:00
ad a108410386 Regen. 2008-01-02 11:57:29 +00:00
ad b4284a686b Merge vmlocking2 to head. 2008-01-02 11:57:13 +00:00
ad b2f788f2ae 4.99.48 - vmlocking2 merged 2008-01-02 11:51:59 +00:00
ad e871738d3d Regen. 2008-01-02 11:51:15 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
mrg a386f0e8b3 build an INSTALL kernel. it's just GENERIC with md(4) root space. 2008-01-02 11:32:15 +00:00
sborrill 37c7a4d0f3 Configuration file is boot.cfg, not boot.cnf, so fix comments 2008-01-02 10:39:39 +00:00
dyoung 80c0fcd21b Improve device detach routine. Now I can detach nsclpcsio0 and
its children.

Fix an off-by-one bug in the sensor initialization which stopped
it from completing.

Extract sensor initialization into a new subroutine.  If there is
an error while initializing sensors, do not let sc_sme dangle.
2008-01-02 10:21:08 +00:00
dyoung 09767a906c In sysmon_envsys_create(), initialize the callout structure. Stops
panics with a DIAGNOSTIC kernel.

In sysmon_envsys_find_40(), wait until an envsys is not busy before
settings its busy flag, in the pattern of sysmon_envsys_find().
2008-01-02 10:15:53 +00:00
dogcow fad5ee1397 const char casting, to make gcc happy. (not that sun2 compiles these days
without other patches.)
2008-01-02 06:53:09 +00:00
pooka b0e1200d26 unstaticate putterdebug 2008-01-02 05:27:21 +00:00
dyoung 5493a07f14 Use LIST_FOREACH(). 2008-01-02 03:06:02 +00:00
mrg 3259c65b6e add COMPAT_40, raid and RAID_AUTOCONFIG options. 2008-01-02 02:32:25 +00:00
dyoung 5b4182ee05 Use TAILQ_FOREACH(). 2008-01-02 02:29:14 +00:00
dyoung 66938db654 Cosmetic: fix indentation. 2008-01-02 02:25:27 +00:00
dyoung a142fc9c6b Add a debug message with aprint_debug_dev(). Use the right bus
tag.
2008-01-02 02:05:19 +00:00
dyoung 60e2cd65a0 Fix XEN2_DOMU (and amd64?) builds: move ether_mediastatus(),
ether_mediachange() to their own module that we compile only if
the kernel configuration demands support for both MII buses and
ethernet.  Thanks to Tom Spindler for suggesting that these routines
move to dev/mii/.
2008-01-02 00:41:07 +00:00
pooka ffd37c1db1 pass mmap to file systems 2008-01-01 22:31:42 +00:00
pooka d89e3e05a2 emulate a couple more locking interfaces 2008-01-01 22:03:24 +00:00
yamt 48a1e4c2c1 a simple performance monitor based profiler, inspired from linux oprofile. 2008-01-01 21:28:37 +00:00
yamt 13d9847b0a add swapgs. 2008-01-01 21:24:17 +00:00
yamt cfb66876d1 try to detect processor resource sharing topologies. ie. package/core/smt IDs. 2008-01-01 20:32:10 +00:00
yamt 7aa31c1c3b make the nmi handler safer.
XXX should use IST.
2008-01-01 19:49:05 +00:00
njoly dfd4477d85 s/i386/__i386__/. 2008-01-01 17:40:22 +00:00
chris 736004cf1c Add property to aceride to allow the forcing of compat mode.
This allows cats to override the BIOS (aka ABLE) settings, which enable
native mode, but doesn't route the interrupts correctly.

Discussed last year on tech-kern and port-cats.
2008-01-01 14:57:05 +00:00
chris c93dd30159 Add support for kcore headers to arm32 kernel core dumps.
The kcore code is based on i386's kcore header handling.

Having an asm stub for dumpsys, to dump the registers onto the stack, and
then call the C code to do the memory dump is based on amd64's core dump
code.

This allows a successful core dump on cats.

Part of fixing PR cats/18026.
2008-01-01 14:06:42 +00:00
yamt e01ad62b66 always consider T_NMI as !T_USER regardless of trapframe. 2008-01-01 13:40:20 +00:00
jmmv e92603e152 Revert previous by removing the apm entry. Even though the driver seems
to work, we do not build any userland support for it; see 1.183's commit
message.  Per jmcneill@'s request.
2008-01-01 13:35:36 +00:00
yamt e550a539ee add x86_cpuid2, which can specify ecx register. 2008-01-01 12:51:08 +00:00
yamt aa3e923c59 add some dependencies on assym.h. 2008-01-01 11:35:33 +00:00