Commit Graph

100755 Commits

Author SHA1 Message Date
pooka
4d79e8c53d Apply const where necessary (XXX: where is bf_locl.org?) 2009-06-30 13:14:40 +00:00
yamt
6d375e715d update a comment 2009-06-29 23:39:00 +00:00
mbalmer
23ada40b4b Fix integer constant RB_FREQUENC, 25MHz/4 is 6250000L, not 625000L
This fixes PR 39931

PR and fix from Miod Vallat <miod@online.fr>, many thanks!
2009-06-29 20:49:25 +00:00
dyoung
c53d86bdf2 Fix a typo in last (coda/ exclusion). 2009-06-29 18:03:37 +00:00
tsutsui
54604067b9 Since pmap.c rev 1.163, page attributes of PV_MODIFIED and PV_REFERENCED
have beem moved from pv_flags in struct pv_entry to pvh_attrs in
struct vm_page_md, so no need to copy pv_flags to keep these flags
in pv header in pmap_remove_pv(). Pointed out by uebayasi@ on port-mips.
Also rename those page attribute flags from PV_FOO to PGA_FOO like alpha.
While here, make pv_flags unsigned.

Briefly tested on sgimips O2.
2009-06-29 13:22:51 +00:00
pgoyette
144af482b2 Adapt to new features available in sysmon_envsys:
1) expose the built-in limits to user-land (via envstat(8)), and
2) allow user-specified limits to override the built-in limits.

No comments received from current-users@ over 2-week period.
2009-06-29 12:30:09 +00:00
hubertf
9bb62260eb Use PCI IDs from pcidevs, instead of storing them in here.
Compile tested and OK'd by NONAKA Kimihiro.
2009-06-29 11:05:12 +00:00
hubertf
ea499356a8 regen 2009-06-29 11:04:05 +00:00
hubertf
51bb588c5a add a few sdhc(4) devices 2009-06-29 11:02:43 +00:00
mbalmer
38e0566d82 Have the boot countdown on i386 display "starting in N seconds." instead
of "starting in N" and eliminate a use of sprintf.  Note that on
some rare machines it can be that the BIOS does not provide the delay
function.  On such machines the countdown will almost immediately count down
to zero display "starting in 0 seconds."; apparently the net4801 is such a
machine.
Feedback, ideas, and inspiration from tron, ok tron/tonnerre
2009-06-29 09:23:16 +00:00
dholland
9b5247fa1c Another namei_simple like the previous ones; was added after I did the
initial sweep and I guess I missed it while merging.
2009-06-29 07:11:06 +00:00
dholland
79cf3422da Time for 5.99.15: newly compiled fs modules won't work with an older kernel. 2009-06-29 05:47:35 +00:00
dholland
effcf1af5c Convert 67 namei call sites to use namei_simple, in these functions:
check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
2009-06-29 05:08:15 +00:00
dholland
69b592eb0c regen 2009-06-29 05:03:12 +00:00
dholland
acfecf55d7 Add namei_simple_kernel and namei_simple_user. These provide the common
case functionality of namei in a simple package with only a couple flags.

A substantial majority of the namei call sites in the kernel can use
this interface; this will isolate those areas from the changes arising
as the internals of namei are fumigated.
2009-06-29 05:00:14 +00:00
haad
a1f246d056 Remove unneeded targets from build. Should fix brekage of ALL kernel build
found by cegger@.
2009-06-28 22:05:07 +00:00
rmind
fe55ad324c panic: use MI cpu_index(), instead of cpu_number(), which could be sparse. 2009-06-28 15:30:30 +00:00
rmind
5c68e5d0ee Ephemeral mapping (emap) implementation. Concept is based on the idea that
activity of other threads will perform the TLB flush for the processes using
emap as a side effect.  To track that, global and per-CPU generation numbers
are used.  This idea was suggested by Andrew Doran; various improvements to
it by me.  Notes:

- For now, zero-copy on pipe is not yet enabled.
- TCP socket code would likely need more work.
- Additional UVM loaning improvements are needed.

Proposed on <tech-kern>, silence there.
Quickly reviewed by <ad>.
2009-06-28 15:18:50 +00:00
rmind
7b7c187a92 Amend previous. 2009-06-28 14:34:48 +00:00
rmind
39b52425ff - Convert some #ifdefs to KASSERT()s.
- KNF, style, no parameters in function declarations.
- No functional changes.
2009-06-28 14:22:11 +00:00
yamt
85542b11cd wrap a long line. 2009-06-28 11:42:07 +00:00
hubertf
d0ffc7ee11 Remove trailing whitespace,
from KIYOHARA Takashi on current-users@
2009-06-28 11:17:39 +00:00
mbalmer
5c2d18cdea regen. 2009-06-28 10:46:37 +00:00
mbalmer
81170a7797 Add some vendor/product IDs for radio clocks. 2009-06-28 10:45:24 +00:00
tsutsui
296279ad74 pad -> PAD, to follow src/sys/kern/makesyscalls.sh rev 1.87. 2009-06-28 09:50:57 +00:00
ad
fe924bec61 +/*
+ * NOTE: COORDINATE ON-DISK FORMAT CHANGES WITH THE FREEBSD PROJECT.
+ */
2009-06-28 09:26:18 +00:00
ad
5b4feac126 idle_loop: explicitly go to spl0() to sidestep potential MD bugs. 2009-06-28 09:25:05 +00:00
ad
6cdc8b7df8 Define __HAVE_ATOMIC64_OPS only in kernel, since it doesn't work in
userspace on the i486.
2009-06-28 09:24:09 +00:00
jakllsch
185aeef2dc Correct various siisata bugs, some old, some new.
- Move clearing of interrupts to before atastart() is called in the
   xfer interrupt handler.  Should fix kern/41579.
 - Using cv_timedwait(9) is not possible in code that can be called from
   interrupt context, fall back to DELAY(9).
 - Correctly poll Port Slot Status register for soft reset PRBs.
 - Only use the Recive Transfer Count register on reads, when it is valid.
 - Activate PRBs in a way that takes the whole physical address into account,
   even when the PRB is beyond 4GiB.
 - consistently use DELAY(9)
 - Use DELAY() constants in completion polling loops that are consistent with
   the loop count limit. (i.e. timeout in 10 rather than 100 seconds)
2009-06-27 21:04:47 +00:00
jakllsch
f6c1b3e09a Some fixes for dm(4).
- Limit accesses to the size of the volume.
   This fixes a KASSERT in physio_biodone().
 - Change dm_table_size() to return the size of the volume in
   DEV_BSIZE units.  It was reporting it in DEV_BSIZE^2 units.
 - Remove a bit of trailing whitespace.

ok haad
2009-06-27 16:10:25 +00:00
reinoud
7e99247bdd Fix corner-case in truncing files. It could forget to free the last block.
This would result in a free-space map with one block orphaned.
2009-06-27 13:42:06 +00:00
dyoung
aeb6a78d82 During a normal shutdown, gracefully tear down arbitrary stacks of
filesystems and (pseudo-)devices, according to the algorithm at A3
and A4, below.

Proposed and discussed at
<http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004864.html>.  No
objections.

During an emergency shutdown (e.g., shutdown -n, or after a panic),
shutdown is simple as always: filesystems are not sync'd or unmounted,
and devices are not detached.

It was necessary to change the order of operations during shutdown,
but the new order is more sensible: if a core dump is desired, then
cpu_reboot(9) dumps it first.  cpu_reboot(9) does not call legacy
shutdown hooks any longer: they can interfere with device detachment
and PMF shutdown, and very few legacy hooks remain.

Here is the old order of operations:

B1 sync filesystems and TOD clock
B2 unmount filesystems
B3 dump core
B4 detach devices
B5 run legacy shutdown hooks
B6 run PMF shutdown hooks
B7 suspend interrupts
B8 MD reboot/shutdown/powerdown

And here is the new order:

A1 dump core
A2 sync filesystems and TOD clock
A3 unmount one or more filesystems OR
   detach one or more devices OR
   forcefully unmount one filesystem OR
   skip to 5
A4 repeat at 3
A5 run PMF shutdown hooks
A6 suspend interrupts
A7 MD reboot/shutdown/powerdown

Tested on Dell Dimension 3000, Dell PowerEdge 1950, Sun Fire V120,
Soekris net4521 and net4801.

VS: ----------------------------------------------------------------------
2009-06-26 23:40:27 +00:00
dyoung
b4f24be356 sys/coda/ rudely re-#defines some kernel constants and such, so
leave it out of the tags for now.
2009-06-26 22:59:25 +00:00
dyoung
9d9978e5a5 Switch to kmem(9).
(void *)pew is one way to get a struct work *, but let's
write&pew->pew_work, instead.  It is more defensive and persuasive.

Make miscellaneous changes in support of tearing down arbitrary
stacks of filesystems and devices during shutdown:

1 Move struct shutdown_state, shutdown_first(), and shutdown_next(),
  from kern_pmf.c to subr_autoconf.c.  Rename detach_all() to
  config_detach_all(), and move it from kern_pmf.c to subr_autoconf.c.
  Export all of those routines.

2 In pmf_system_shutdown(), do not suspend user process scheduling, and
  do not detach all devices: I am going to do that in cpu_reboot(),
  instead.  (Soon I will do it in an MI cpu_reboot() routine.)  Do still
  call PMF shutdown hooks.

3 In config_detach(), add a DIAGNOSTIC assertion: if we're exiting
  config_detach() at the bottom, alldevs_nwrite had better not be 0,
  because config_detach() is a writer of the device list.

4 In deviter_release(), check to see if we're iterating the device list
  for reading, *first*, and if so, decrease the number of readers.  Used
  to be that if we happened to be reading during shutdown, we ran the
  shutdown branch.  Thus the number of writers reached 0, the number
  of readers remained > 0, and no writer could iterate again.  Under
  certain circumstances that would cause a hang during shutdown.
2009-06-26 19:30:45 +00:00
dyoung
57a3ffeae7 Cosmetic: remove #if 1 / #endif. 2009-06-26 18:58:14 +00:00
dyoung
0b429bf76a Keep a generation number, mountgen, that increases every time a
filesystem is mounted.  Synchronize access to the number with a
mutex.  When a struct mount, mp, is allocated, assign the current
generation number to mp->mnt_gen.  Introduce vfs_unmount_forceone()
that forcefully unmounts the most recently mounted filesystem.

Refactor: extract vfs_shutdown1() from vfs_shutdown().  Extract
vfs_sync_all() from vfs_shutdown1().

Print more progress indications while we're unmounting all of the
filesystems during shutdown.

We increase the reference count on mp before calling dounmount(mp),
but we do not decrease it if dounmount(mp) fails, and neither does
dounmount(mp).  So decrease the reference count if dounmount(mp)
fails.

Change the loop terminating condition in vfs_unmountall1() to (mp
!= (void *)&mountlist) from !CIRCLEQ_EMPTY(&mountlist), because we
may not ever empty the list, especially if we're not forcing the
filesystems to unmount.
2009-06-26 18:53:07 +00:00
dyoung
0d8ed264a1 For use in subsequent commits, add a 64-bit generation number to
struct mount, and add prototypes for vfs_sync_all() and for
vfs_unmount_forceone().
2009-06-26 16:55:46 +00:00
christos
2ee7096547 magic symlink cleanup:
- use size_t for len
- don't call strlen multiple times in macro
- add gid
- off by one in bounds calculation
2009-06-26 15:49:03 +00:00
dyoung
7145e9fc73 A lot of good it does, but let this build with 'no options INET'. 2009-06-26 00:24:18 +00:00
dyoung
72ca52eed5 Use &zn->ni instead of (struct ieee80211_node *)zn because it is
concise and safe.
2009-06-26 00:15:23 +00:00
dyoung
c3a668892b Compilable, untested fix to zyd(4) lossage reported by Matthias-Christian
Ott: every ioctl but SIOCSIFFLAGS fails with ENXIO (Device not
configured).  Let ioctls complete even if initialization is not
complete (!sc->attached).  Do exit immediately from zyd_newstate
with ENXIO if !sc->attached, however:  zyd_newstate tries to call
some USB routines for which it is probably not ready.
2009-06-26 00:14:09 +00:00
dyoung
ed0e4d4d36 Expand more macros from usb_port.h. 2009-06-26 00:06:27 +00:00
dyoung
c97ab81b59 Expand several definitions from usb_port.h. 2009-06-26 00:01:25 +00:00
mjacob
ad7d727f78 Update ISP driver to latest and greatest. Includes support for the 8Gb part. 2009-06-25 23:44:01 +00:00
mjacob
e9c28376ea Update 2400 firmware to latest (to match 2500 firmware) 2009-06-25 23:42:40 +00:00
christos
1e42098381 Only print debugging messages about policy on error. 2009-06-25 17:39:51 +00:00
reinoud
5e29d1224f Rewrite of udf_on_rootpath(), and vop_rename() code that calls it, after the
UFS way. The tree walking is now done the same and the code hasn't locked up
on examples that made it lockup before.
2009-06-25 17:16:33 +00:00
mrg
4c99008150 don't include pcidevs_data.h. 2009-06-24 19:47:15 +00:00
reinoud
706de0e547 Commit first stage of free-space accounting. It is estimating the underlimit
of free blocks on the device and when free blocks are getting tight it tries
to readjust/recalculate that value by syncing the FS.

Second stage will be resizing the data/metadata partitions.
2009-06-24 17:09:13 +00:00
mrg
c33a588610 convert a DRM_ERROR() to DRM_DEBUG(). its failure is not fatal
and it tends to trigger on almost all cards.
2009-06-24 08:09:26 +00:00