Commit Graph

92016 Commits

Author SHA1 Message Date
ad 96381cfdb1 4.99.49: struct vnode changed. 2008-01-09 16:16:27 +00:00
ad 0b52913dee Go back to freeing on disk inodes in the inactive routine. It would be
better not to do this, but it rules out potential side effects with softdep.
2008-01-09 16:15:22 +00:00
tsutsui be408dd2a7 Add options SYMTAB_SPACE for ksyms(4) and ddb(4). 2008-01-09 15:45:27 +00:00
xtraeme 9b1f3b007e Remove the unused mutex from softc. 2008-01-09 15:44:33 +00:00
xtraeme fce49684a2 Add GPIO_PIN_PULLDOWN, GPIO_PIN_INVIN and GPIO_PIN_INVOUT for gcscpcib(4),
from OpenBSD.
2008-01-09 15:11:30 +00:00
xtraeme 53fd152fd5 Remove useless returns at the end of void functions. 2008-01-09 14:52:52 +00:00
xtraeme e430816fa1 emo-style(9). 2008-01-09 14:49:48 +00:00
tsutsui 774fc1f9f9 Fix another botch on migration to MI mips3_clock.c for algor in 2006:
- in algor_p????_cal_timer() functions, initialize ci_divisor_delay
  and ci_cycles_per_hz values in curcpu() for MI mips3_clock.c:mips3_delay()
  rather than obsolete and homegrown delay_divisor
- remove old _delay() stuff from locore_machdep.S
- make MI mips3_delay() work even before frequency values in curcpu()
  are initialized

Now NetBSD/algor P5064 kernel works on gxemul.

While here, add a hack for emulators:
- ignore a measured CPU frequency if the value looks unlikely

Pullup request for netbsd-4 will be sent later.
2008-01-09 14:46:48 +00:00
xtraeme cbfd19ee15 + gcscpcib(4) 2008-01-09 14:44:51 +00:00
xtraeme f5d88c37cb Fix up some comments, from Yojiro UO in private email. 2008-01-09 14:32:36 +00:00
xtraeme 63cd4d7992 Add gcscpcib(4). 2008-01-09 14:28:54 +00:00
xtraeme 810aa8579e Add gcscpcib(4): a driver for the AMD CS5535 and CS5536 Companion Device
that acts as PCI-ISA bridge and supports a Timecounter, Watchdog Timer
and GPIO.

Adapted by Yojiro UO and minor tweaks by me from OpenBSD. Tested on
CS5535 and CS5536. This closes PR kern/37577.
2008-01-09 14:23:46 +00:00
tsutsui 81ce14a30e Fix botch on MI todr(9) migration of algor on September 2006:
- year0 should be 1980, not 80
- put a newline after MI mc146818_attach()
- call todr_attach(9)
2008-01-09 14:16:35 +00:00
he 7d83a06dfc Declare nbpg if we're building for sparc, and initialize to the
smallest sparc pagesize.  This should deal with the IOCPARM_MAX
build problem, which occurs on sparc because various models have
different page size, so it's run-time determined instead.

pooka says that rump doesn't use ioctl(), so the value is apparently
of no consequence.
2008-01-09 13:59:43 +00:00
ad e6599f15b0 Fix headers. 2008-01-09 13:52:33 +00:00
gson 28302167c1 Remove unused variables 2008-01-09 13:24:57 +00:00
simonb d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
yamt 1d97c261e0 remove now unused variable. 2008-01-09 11:13:16 +00:00
elad 4b3ae01c7d Refactor part of the sys_revoke() code so that it can be used in the
compat code. Allows for the removal of two redundant kauth(9) calls.

okay christos@.
2008-01-09 08:18:12 +00:00
elad 7e7e1a0aef Kill two KAUTH_GENERIC_ISSUSER requests and replace them with something
more meaningful.
2008-01-09 08:15:53 +00:00
mrg 58b3d9db6c extend the grossness that is pegasospci_indirect_attach_hook() a little
further and enable the vr(4) located at pci 0 dev 13 fn 0.

now my vr(4) works from disk boot.
2008-01-09 07:35:29 +00:00
simonb a191b55bff Bump uvmexp.intrs when we get a clock or statclock interrupt. 2008-01-09 06:50:36 +00:00
yamt d9a61c14e9 fix SPINLOCK_BACKOFF_HOOK. 2008-01-09 00:23:18 +00:00
yamt 343d0e5699 kill unused PMF_USER_RELOAD. 2008-01-08 22:24:09 +00:00
yamt b7ce913912 pmap_map_ptes: fix a access-after-free bug.
add a reference on ci->ci_pmap before acquiring locks, so that it won't
disappear while we are blocking on the locks.
2008-01-08 22:22:30 +00:00
elad 9798c4cd61 In svr4_32_sys_systeminfo(), remove two redundant kauth(9) calls for
SVR4_SI_SET_HOSTNAME and SVR4_SI_SET_SRPC_DOMAIN, as permission is already
checked by old_sysctl().

okay christos@.
2008-01-08 22:13:07 +00:00
elad 2395a8f2d2 In linux_sys_sysmips(), remove redundant kauth(9) call for LINUX_SETNAME
as the permission check is done by old_sysctl().

okay christos@.
2008-01-08 22:09:48 +00:00
elad 3d902dfb3e Make compat_43_sys_sethostid() use old_sysctl(), allowing for the removal
of a kauth(9) call.

okay christos@.
2008-01-08 22:08:45 +00:00
elad 145b26e5d2 In svr4_sys_sysarch(), remove redundant kauth(9) call. Permission is
checked by old_sysctl().

okay christos@.
2008-01-08 22:07:29 +00:00
martin 8e4891367e cpu_intr_p() for sparc, from Andrew Doran. 2008-01-08 21:32:10 +00:00
christos b2351ba0df pacify lint with casts. 2008-01-08 20:56:22 +00:00
joerg 34dc4c6501 Switch Xen to generic TODR. Tested by Manuel Bouyer. 2008-01-08 20:37:34 +00:00
bouyer 98b295d02d uobj->vmobjlock is a mutex these days. 2008-01-08 19:26:44 +00:00
bouyer 1ad062e684 Allocating up to 8k on stack isn't a good idea ... 2008-01-08 19:26:10 +00:00
dsl 7d4e4f0e9a The test for the 0xaa55 at the end of an extended partition pbr has always
been incorrect (and checked the end of the mbr - which always suceeds).
Rather than fixing the text, just delete it (saving 8 bytes from mbr_ext).
2008-01-08 18:31:56 +00:00
dyoung 50b7998db1 After rtw_attach() is called, the hardware has been powered down,
so don't fiddle with the Function Event Registers.
2008-01-08 18:26:09 +00:00
joerg 732cd3c8a0 Convert Atari to generic TODR and timecounter. 2008-01-08 18:04:15 +00:00
joerg 30cd7dc199 assym.h dependency. 2008-01-08 17:46:31 +00:00
tsutsui 03b0d74e1e Set proper mask values for ipl_sr_bits[] and
use C99 initializer to avoid confusion.
Tested on gxemul.
2008-01-08 16:15:04 +00:00
joerg 808b08ff6f Short-cut interrupt processing if device has been suspended.
uvm_fault reported by xtraeme.
2008-01-08 15:50:35 +00:00
joerg 58facc2685 Remove __HAVE_TIMECOUNTER conditionals. 2008-01-08 14:46:28 +00:00
simonb c4bf54683c Add timecounter support for sbmips machines and Broadcom SiByte CPUs.
Based on patch from joerg@, with tweaks by me to work with sbmips
non-use of the CP0 count/compare registers for clock interrupts.
2008-01-08 14:38:47 +00:00
dogcow 585198d4ab I'm not positive that the mips_ipl_si_to_sr assignments are correct - but
at least the thing compiles now.
2008-01-08 14:28:35 +00:00
dogcow da6c04f088 explicitly include <sys/device.h> 2008-01-08 14:26:58 +00:00
joerg a280711321 Mask is unsigned, add missing u. 2008-01-08 13:52:00 +00:00
joerg 18a5a8d13d Finish conversion of ppc and evbppc to timecounter.
Tested by simonb@ on WALNUT.
2008-01-08 13:47:49 +00:00
dogcow ca9c510ab2 explicitly include simplelock.h 2008-01-08 13:28:22 +00:00
dogcow b24bad5798 add include for incomplete struct blah blah blah 2008-01-08 13:26:26 +00:00
yamt 42f654a26b change the layout in u-area and reduce UPAGES. 2008-01-08 13:15:01 +00:00
yamt 74e0872eca simplify locking and remove vm_map_upgrade/downgrade.
this fixes a deadlock due to read-lock recursion of map->lock.
2008-01-08 13:09:55 +00:00
joerg 05379725b5 lock_stubs.S needs assym.h. 2008-01-08 12:17:32 +00:00
joerg 71990d8d21 ANSIfy. 2008-01-08 12:05:49 +00:00
simonb 99cad24ec6 GC this file - it should have been removed during the ppcoea-renovation
merge.
2008-01-08 11:54:47 +00:00
he 943b531346 Remove a no-longer-used local variable. 2008-01-08 07:59:23 +00:00
matt e1adc2881b Add IPL_SOFT* defined at IPL_NONE.
Change _ARM32_INTR_H to _ACORN32_INTR_H
2008-01-08 06:30:22 +00:00
matt 306d43c5bf Remove unused variable. 2008-01-08 06:29:39 +00:00
matt 6d2503c7a9 Don't do arithmetic on void pointers. 2008-01-08 06:28:29 +00:00
dyoung e0b21313b6 In device_foreach_child(), use a safe idiom for walking a list
whose elements we might be deleting.  This stops us from crashing
in config_detach_children().
2008-01-08 06:27:46 +00:00
matt 2414d5854f Make sys_swapctl match syscallargs.h 2008-01-08 06:25:55 +00:00
dyoung b202d18acd Use aprint_*_dev(), device_xname(), and device_t. Join a line. 2008-01-08 04:47:44 +00:00
dyoung f384d52f35 Delete an unnecessary cast. 2008-01-08 03:37:45 +00:00
matt 6bc0c58216 As of this commit, all arm32 kernel now build. 2008-01-08 02:07:50 +00:00
matt f4f1c6c970 More kernels SYMTAB_SPACE increased. 2008-01-08 02:06:43 +00:00
matt 04a4a202ed include "conf/std" 2008-01-08 02:05:30 +00:00
uwe 71fc6881ec In general_exception() in do_panic case print error message *before*
we drop into ddb.
2008-01-08 01:25:13 +00:00
gdt 1424adf410 Support FIONBIO.
Support non-blocking reads from USB printers.  With this, escputil can
query the printer model, and I can print a test page with gutenprint
5.1 and cups.   Add many comments explaining why the support is not
quite right.  (This change is quite a bit less invasive than a
"correct" fix, and thus more reasonable to pull up to netbsd-4.)

Rototill debugging, so that all DPRINTFN have a level, and so that the
message is printed if the debug level is >= the number in the source
code.  Document debug level plan.

Fix bug where only one status change would be printed (by inspection,
not tested).

Document scheme for reading/discarding data when ulpt(4) is opened for
write only.

Delete dead code.

Plan and patch posted on tech-kern without objections.
2008-01-08 00:58:09 +00:00
ad c0187a5323 pmap_destroy: cast return of atomic_dec_uint_nv to (int) to avoid leaking
pmaps. The refcount can be zero due to pmap_remove_all. Problem found by
tnn@.
2008-01-08 00:45:23 +00:00
pooka 72b3924d8b Set stacksize to minimum acceptable (two pages, one for cc, one
for actual stack) to mimic kernel stack size better.
2008-01-08 00:23:15 +00:00
elad 964f16c2b9 Make fork use kauth.
Been running in my tree for over a month at least.

Reviewed and okay yamt@, and special thanks to him as well as rittera@
for making this possible through fixing NDIS to not call fork1() with
l1 != curlwp.
2008-01-07 23:51:06 +00:00
dsl 0b5d0f6802 Actually copy the ras list onto the child process during fork() - hi ad.
Might fix the 'ras' part of kern/37650.
For some reason the itimers aren't inherited either.
2008-01-07 20:56:32 +00:00
ad 574389c2a0 Fix build if !MODULAR. Reported by elad@. 2008-01-07 20:42:48 +00:00
rittera c22be27a3d Added elad's changes to ndis_kthread_create. Setting the stack size in fork1 apparently has no effect in the kernel. Note: needs testing 2008-01-07 19:10:58 +00:00
ad b7dafc15be Don't both about module name / ksyms until the name is known for sure. 2008-01-07 18:25:56 +00:00
joerg e47a5502a7 Use gettimeofday as timecounter. 2008-01-07 17:27:12 +00:00
joerg 0a53bb0b5b x86 always has timecounter support. 2008-01-07 16:58:09 +00:00
ad 52603a7d6d Fix 'panic: softdep_update_inodeblock: update failed'. 2008-01-07 16:56:27 +00:00
joerg ebd253a526 Garbage collect !__HAVE_TIMECOUNTER code. 2008-01-07 16:55:15 +00:00
christos 2937b71b26 Add PaX ASLR for testing 2008-01-07 16:46:59 +00:00
joerg 7e82e3084b Timecounter support for VAX. Basic testing in simh done on a backported
version to netbsd-4.
2008-01-07 16:40:16 +00:00
ad 72506c7508 Regen. 2008-01-07 16:16:38 +00:00
ad fe8aceeb5e More MPSAFE syscalls. 2008-01-07 16:15:36 +00:00
ad 8b52263cd1 Hold kernel_lock across IFNET_FOREACH(). 2008-01-07 16:13:49 +00:00
ad 77e0b2120f Patch up sysctl locking:
- Lock processes, credentials, filehead etc correctly.
- Acquire a read hold on sysctl_treelock if only doing a query.
- Don't wire down the output buffer. It doesn't work correctly and the code
  regularly does long term sleeps with it held - it's not worth it.
- Don't hold locks other than sysctl_lock while doing copyout().
- Drop sysctl_lock while doing copyout / allocating memory in a few places.
- Don't take kernel_lock for sysctl.
- Fix a number of bugs spotted along the way
2008-01-07 16:12:52 +00:00
ad eb4920235a Don't drop vnode refs until we are done with the mount. 2008-01-07 16:08:46 +00:00
tsutsui 2b341ae01b Add timecounter(9) support for mvme68k.
Based on a patch from Garrett D'Amore and several tweaks by me.
Compile tested only, but reviewed by joerg@ and
no objection from scw@ on port-mvme68k.
2008-01-07 14:39:28 +00:00
joerg 7f4f83c80c Shared clock.c with amiga, so it supports generic time counter. 2008-01-07 13:55:36 +00:00
ad a32939fca4 bwrite, bdwrite: bufcache_lock must be held for reassignbuf. 2008-01-07 12:50:38 +00:00
ad 297c776822 Make VFS_SYNC() and friends functions, and have them acquire kernel_lock
if the FS is not marked MPSAFE.
2008-01-07 12:34:12 +00:00
njoly e5e170b198 Regen. 2008-01-07 12:12:12 +00:00
njoly 0dbd478087 Remove wrong linux32_sys_mmap2_args define. 2008-01-07 12:11:52 +00:00
yamt 2e8a5bee68 lwp_ctl_alloc: fix error handling. 2008-01-07 11:41:29 +00:00
simonb cfde7482cd Actually return the computed uptime in microuptime(). Fixes many
wierd timing issues on non-timecounter ports (tested on sbmips, and
omap ARM by Marty Fouts).

Also move the microtime() inside the splclock() block in the same
function - it may be possible for the "time" variable to be updated
after the call to microtime() but before we use it to calculate the
offset from mono_time.
2008-01-07 10:28:07 +00:00
martti 7e40665ceb Fixed indentation, it should be
option<space><tab>
makeoption<space><tab>
2008-01-07 08:39:03 +00:00
martti a678f921c8 Fixed option indentation, it should be
option<space><tab>
makeoption<space><tab>
2008-01-07 08:30:03 +00:00
dyoung 73b30d3cfe Define some "special" values of register MMCR_WPVMAP. 2008-01-07 08:01:45 +00:00
dyoung 40fec83596 Delete unused mips_ipl_si_to_sr[]. 2008-01-07 07:28:14 +00:00
dyoung cb1ed32e14 Update AR5312 interrupt masks along the same lines as the AR5315. 2008-01-07 07:14:37 +00:00
dyoung b82c6f8442 Cosmetic: re-number the comments on elements of ipl_sr_bits[]. 2008-01-07 07:12:06 +00:00
dyoung 189256ad32 Make this compile again by making changes similar to the changes
that ad@ made to arch/mips/alchemy/au_icu.c.  Compiles and runs,
but this probably deserves a looksie by someone with more MIPS
clue.
2008-01-07 06:55:32 +00:00
dyoung b82e361f77 Use pmf(9). Use device_t and device_private(). 2008-01-07 06:53:08 +00:00
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