]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoMFp4: tweaks
imp [Fri, 14 Jul 2006 22:40:24 +0000 (22:40 +0000)]
MFp4: tweaks

18 years agoLet native elf class be registered earlier.
jkim [Fri, 14 Jul 2006 22:39:18 +0000 (22:39 +0000)]
Let native elf class be registered earlier.

18 years agoMFp4: elevate quality of slow clock a little
imp [Fri, 14 Jul 2006 22:31:12 +0000 (22:31 +0000)]
MFp4: elevate quality of slow clock a little

18 years agoMFp4: paren police
imp [Fri, 14 Jul 2006 22:30:44 +0000 (22:30 +0000)]
MFp4: paren police

18 years agoMFp4:
imp [Fri, 14 Jul 2006 22:22:57 +0000 (22:22 +0000)]
MFp4:
Introduce framework to configure the multiplexed pins on boot.

Since the USART supprots RS-485 multidrop mode, it allows the
TX pins to float.  However, for RS-232 operations, we don't
want these pins to float.  Instead, they should be pulled up
to avoid mismatches.  Linux does something similar when it
configures the TX lines.  This implies that we also allow the
RX lines to float rather than be in the state they are left in
by the boot loader.  Since they are input pins, I think that
this is the right thing to do.

Plus minor for our board.

18 years agoMFp4:
imp [Fri, 14 Jul 2006 22:06:01 +0000 (22:06 +0000)]
MFp4:
Fix typo in RTC_CALR_MK.

18 years agoThe TSC board uses a 16MHz base clock for the AT91RM9200, while the Kwikbyte
imp [Fri, 14 Jul 2006 22:01:51 +0000 (22:01 +0000)]
The TSC board uses a 16MHz base clock for the AT91RM9200, while the Kwikbyte
board uses a 10MHz base clock.  Cope with this difference.

18 years agoFor the moment, make board configuration a compile time option. This
imp [Fri, 14 Jul 2006 21:59:54 +0000 (21:59 +0000)]
For the moment, make board configuration a compile time option.  This
saves space in the final kernel, but at the expense of flexibility to
boot the same kernel accross a family of boards.

18 years agoImplement the set_time function. Rather pointless with this RTC, as it
imp [Fri, 14 Jul 2006 21:37:19 +0000 (21:37 +0000)]
Implement the set_time function.  Rather pointless with this RTC, as it
resets when the core resets, but there may be some use for it...

18 years agoMF p4:
imp [Fri, 14 Jul 2006 21:35:59 +0000 (21:35 +0000)]
MF p4:

Adapt to forthcoming spi framework.  The ioctls for SPI commands and such
belong in the higher level driver.

18 years agoBe sure to flush the cache after a partial read on timeout. Expand
imp [Fri, 14 Jul 2006 21:33:04 +0000 (21:33 +0000)]
Be sure to flush the cache after a partial read on timeout.  Expand
comments about timeouts.  Fix a style nit.  Sometimes small messages
were getting corrupted.

18 years agoRemove duplicated #include.
pjd [Fri, 14 Jul 2006 17:55:36 +0000 (17:55 +0000)]
Remove duplicated #include.

18 years agoo compat_group() and files_group() are more complicated than I thought
maxim [Fri, 14 Jul 2006 17:45:33 +0000 (17:45 +0000)]
o compat_group() and files_group() are more complicated than I thought
in rev. 1.34.  Mainly I missed the fact that the buffer is used for two
purposes:

1) storing a group line from the group file;

2) __gr_parse_entry() parses the buffer and tries to put the group
members to the remaining part of the buffer and can fail if there
is no enough room for them.

Re-arrange the buffer size checks to account the latter case.

Submitted by: Kirk R Webb
MFC after: 2 weeks

18 years agoRegen.
jhb [Fri, 14 Jul 2006 15:42:47 +0000 (15:42 +0000)]
Regen.

18 years agoSomewhat surprisingly, ibcs2_ioctl() is MPSAFE as it is without needing any
jhb [Fri, 14 Jul 2006 15:42:21 +0000 (15:42 +0000)]
Somewhat surprisingly, ibcs2_ioctl() is MPSAFE as it is without needing any
further fixes.

18 years agoRegen.
jhb [Fri, 14 Jul 2006 15:31:01 +0000 (15:31 +0000)]
Regen.

18 years agoMark ibcs2_mount() (just returns EINVAL) and ibcs2_umount() (just calls
jhb [Fri, 14 Jul 2006 15:30:50 +0000 (15:30 +0000)]
Mark ibcs2_mount() (just returns EINVAL) and ibcs2_umount() (just calls
unmount(2)) MPSAFE.

18 years agoMove some of the common parameters into the std. files for this platform.
imp [Fri, 14 Jul 2006 15:20:31 +0000 (15:20 +0000)]
Move some of the common parameters into the std. files for this platform.
Also migrate from MD disk to NFS boot.

18 years agoRegen.
jhb [Fri, 14 Jul 2006 15:11:46 +0000 (15:11 +0000)]
Regen.

18 years agoibcs2_sigprocmask() is already marked MPSAFE in syscalls.xenix, so mark
jhb [Fri, 14 Jul 2006 15:11:20 +0000 (15:11 +0000)]
ibcs2_sigprocmask() is already marked MPSAFE in syscalls.xenix, so mark
it MPSAFE in syscalls.isc.

18 years agoDrop Giant before returning in error path, thus eliminates
delphij [Fri, 14 Jul 2006 13:58:32 +0000 (13:58 +0000)]
Drop Giant before returning in error path, thus eliminates
two mutex leaks.

Submitted by: Beyond Luo <fedora ercist iscas ac cn>
PR: kern/100046
Reviewed by: ken, scottl

18 years agoUnlock aac_io_lock before returning, thus eliminates a mutex
delphij [Fri, 14 Jul 2006 13:55:56 +0000 (13:55 +0000)]
Unlock aac_io_lock before returning, thus eliminates a mutex
leak.

Submitted by: Beyond Luo <fedora ercist iscas ac cn>
PR: kern/100046
Reviewed by: scottl

18 years agoRemove prototype for the undefined function counterhandler().
cognet [Fri, 14 Jul 2006 13:37:47 +0000 (13:37 +0000)]
Remove prototype for the undefined function counterhandler().

Submitted by: kevlo

18 years agoDefine prototype for pru_close, which in the future will notify the
rwatson [Fri, 14 Jul 2006 09:44:28 +0000 (09:44 +0000)]
Define prototype for pru_close, which in the future will notify the
protocol of a socket close event distinct from a detach event, which
will (in a future commit) become aligned with pru_abort, which will
also be a notification of close prior to detach.  Add prurequests event
for close, as well as patch up some existing missing ones.

18 years agoReduce the memory requirements for the tables by (1) using malloced strings
harti [Fri, 14 Jul 2006 09:07:56 +0000 (09:07 +0000)]
Reduce the memory requirements for the tables by (1) using malloced strings
instead of maximum sized arrays embedded in the table structures and (2)
using pointers to constant oids instead of copying the oid into each
table structure. This also fixes indexing in the case when a string used
for indexing is longer than the maximum size allowed in the MIB.

Submitted by: Victor Cruceru <soc-victor@>

18 years agoDon't attach 2422's yet. It just confuses everyone.
mjacob [Fri, 14 Jul 2006 05:16:00 +0000 (05:16 +0000)]
Don't attach 2422's yet. It just confuses everyone.

18 years agoAdd some missing braces.
mjacob [Fri, 14 Jul 2006 05:14:48 +0000 (05:14 +0000)]
Add some missing braces.

Add MEMORY_BARRIER for the few scratch dma ops that were missing
them plus add a couple of hi 32 bit dma ops (we could probably
allow 64 bit scratch and request/response queue dma now).

18 years agoFix a few cis entries that were separated with spaces, not with commas.
imp [Fri, 14 Jul 2006 04:39:29 +0000 (04:39 +0000)]
Fix a few cis entries that were separated with spaces, not with commas.
This caused drivers for the cards they matched to not probe.

18 years agono need to print unload anymore
imp [Fri, 14 Jul 2006 04:36:57 +0000 (04:36 +0000)]
no need to print unload anymore

18 years agono need to print unload anymore.
imp [Fri, 14 Jul 2006 04:35:59 +0000 (04:35 +0000)]
no need to print unload anymore.

18 years agosync with master.
davidxu [Fri, 14 Jul 2006 01:57:09 +0000 (01:57 +0000)]
sync with master.

18 years agoAdd remote GDB bits for arm.
cognet [Fri, 14 Jul 2006 00:50:51 +0000 (00:50 +0000)]
Add remote GDB bits for arm.

18 years agoCaching scheduling policy and priority in userland, a critical but baddly
davidxu [Thu, 13 Jul 2006 22:45:19 +0000 (22:45 +0000)]
Caching scheduling policy and priority in userland, a critical but baddly
written application is frequently changing thread priority for SCHED_OTHER
policy.

18 years agoAlways allow to specify components with /dev/ prefix.
pjd [Thu, 13 Jul 2006 20:37:59 +0000 (20:37 +0000)]
Always allow to specify components with /dev/ prefix.

MFC after: 3 days

18 years agoSync specialreg.h changes between amd64 and i386 with few fixes.
jkim [Thu, 13 Jul 2006 16:09:40 +0000 (16:09 +0000)]
Sync specialreg.h changes between amd64 and i386 with few fixes.

18 years agoCreate the diskless magic files in /etc during the install_etc() step
phk [Thu, 13 Jul 2006 14:06:09 +0000 (14:06 +0000)]
Create the diskless magic files in /etc during the install_etc() step
instead of setup_nanobsd(), because this gives customize tasks a chance
to fiddle the details.

Inspired & tested by: Jordan Coleman <jordan@JordanColeman.com>

18 years agoNow even more style(9)ish.
mr [Thu, 13 Jul 2006 11:47:36 +0000 (11:47 +0000)]
Now even more style(9)ish.

Submitted by: pjd

18 years agoUse the already stored VIA RNG probe information
mr [Thu, 13 Jul 2006 09:15:14 +0000 (09:15 +0000)]
Use the already stored VIA RNG probe information
instead of probing again.
Adjust style(9) somewhat in probe.c

Reviewed by: pjd
MFC after: 1 week

18 years agoBackout the feature which can change thread's scheduling option, I really
davidxu [Thu, 13 Jul 2006 06:41:26 +0000 (06:41 +0000)]
Backout the feature which can change thread's scheduling option, I really
don't want to mix process and thread scheduling options together in these
functions, now the thread scheduling option is implemented in new thr
syscalls.

18 years agoUse thr_setscheduler, thr_getscheduler and thr_setschedparam to implement
davidxu [Thu, 13 Jul 2006 06:35:43 +0000 (06:35 +0000)]
Use thr_setscheduler, thr_getscheduler and thr_setschedparam to implement
pthread functions.

18 years agoregenerate.
davidxu [Thu, 13 Jul 2006 06:32:55 +0000 (06:32 +0000)]
regenerate.

18 years agoAdd syscalls thr_setscheduler, thr_getscheduler, and thr_setschedparam,
davidxu [Thu, 13 Jul 2006 06:26:43 +0000 (06:26 +0000)]
Add syscalls thr_setscheduler, thr_getscheduler, and thr_setschedparam,
these syscalls are designed to set thread's scheduling parameters and
policy, because each syscall contains a size parameter, it is possible
to support future scheduling option, e.g SCHED_SPORADIC, this option
needs other fields in structure sched_param, current they are not
avaiblable.

18 years agoFix ifconfig up when the HW was down. If the driver isn't running
ambrisko [Wed, 12 Jul 2006 23:13:09 +0000 (23:13 +0000)]
Fix ifconfig up when the HW was down.  If the driver isn't running
then we need to call init otherwise just start the rx.

Interestingly dhclient seemed to work but ifconfig <IP> didn't
for me.

Reviewed by: jhb

18 years agoHonor db_pager_quit in 'show threadchain', 'show allchains', and
jhb [Wed, 12 Jul 2006 21:25:24 +0000 (21:25 +0000)]
Honor db_pager_quit in 'show threadchain', 'show allchains', and
'show lockchain'.  This is especially helpful for the first 2 as a
threadchain could get stuck in an infinite loop during a mutex deadlock.

18 years agoSimplify the pager support in DDB. Allowing different db commands to
jhb [Wed, 12 Jul 2006 21:22:44 +0000 (21:22 +0000)]
Simplify the pager support in DDB.  Allowing different db commands to
install custom pager functions didn't actually happen in practice (they
all just used the simple pager and passed in a local quit pointer).  So,
just hardcode the simple pager as the only pager and make it set a global
db_pager_quit flag that db commands can check when the user hits 'q' (or a
suitable variant) at the pager prompt.  Also, now that it's easy to do so,
enable paging by default for all ddb commands.  Any command that wishes to
honor the quit flag can do so by checking db_pager_quit.  Note that the
pager can also be effectively disabled by setting $lines to 0.

Other fixes:
- 'show idt' on i386 and pc98 now actually checks the quit flag and
  terminates early.
- 'show intr' now actually checks the quit flag and terminates early.

18 years agoUse the already stored VIA RNG probe information
mr [Wed, 12 Jul 2006 20:29:11 +0000 (20:29 +0000)]
Use the already stored VIA RNG probe information
instead of probing again.

MFC after: 1 week

18 years agoAdd vnode interlocking to devfs.
ups [Wed, 12 Jul 2006 20:25:35 +0000 (20:25 +0000)]
Add vnode interlocking to devfs.
This prevents race conditions that can cause pagefaults or devfs
to use arbitrary vnodes.

MFC after: 1 week

18 years agoInitialise (if necessary) the VIA C3/C7 features.
mr [Wed, 12 Jul 2006 19:46:08 +0000 (19:46 +0000)]
Initialise (if necessary) the VIA C3/C7 features.
Store the capabilities for further use by random(4), padlock(4), ...

Obtained from: mostly OpenBSD
MFC after: 1 week

18 years agoo Sort sx(9) MLINKS.
maxim [Wed, 12 Jul 2006 19:12:16 +0000 (19:12 +0000)]
o Sort sx(9) MLINKS.

18 years agoWhen securelevel is >= 1, /dev/io may not be opened at all (not just for
keramida [Wed, 12 Jul 2006 18:12:11 +0000 (18:12 +0000)]
When securelevel is >= 1, /dev/io may not be opened at all (not just for
write).  Update the securelevel description to match this.

Reported by: Alexandros Kosiaris <akosiaris@gmail.com>
MFC after: 3 days

18 years agofix typo in identcpu.c and add one define to specialreg.h.
mr [Wed, 12 Jul 2006 16:52:56 +0000 (16:52 +0000)]
fix typo in identcpu.c and add one define to specialreg.h.

MFC after: 1 week

18 years agoTeach mount(8) about a 'late' keyword, which means the file system should
des [Wed, 12 Jul 2006 16:05:51 +0000 (16:05 +0000)]
Teach mount(8) about a 'late' keyword, which means the file system should
not be mounted unless the -l flag was specified.

Add an rc script, mountlate, which basically runs 'mount -a -l'.  It runs
after DAEMON but before LOGIN.

This is useful for things like loopback mounts, because mountcritremote
runs before mountd  / nfsd (since /usr might be a remote file system), so
an attempt to mount a loopback network file system in mountcritremote will
fail.

Also add a progress message to mountcritlocal, for the sake of symmetry
with similar messages in mountcritremote and mountlate.

Reviewed by: freebsd-rc
MFC after: 3 weeks

18 years agoCorrect path to the firmware ports.
brueffer [Wed, 12 Jul 2006 15:55:48 +0000 (15:55 +0000)]
Correct path to the firmware ports.

18 years agoOnly check if we're freeing a valid object if we hold the topology lock.
pjd [Wed, 12 Jul 2006 15:44:00 +0000 (15:44 +0000)]
Only check if we're freeing a valid object if we hold the topology lock.
This prevents panic under heavy load with DIAGNOSTIC compiled in.

18 years agoDocument sx_xlocked(9).
pjd [Wed, 12 Jul 2006 15:40:35 +0000 (15:40 +0000)]
Document sx_xlocked(9).

Submitted by: ssouhlal

18 years agoforgot to add MFC, since its used on -stable and compile-tested on -current.
mr [Wed, 12 Jul 2006 14:59:07 +0000 (14:59 +0000)]
forgot to add MFC, since its used on -stable and compile-tested on -current.

MFC after: 1 week

18 years agoFirst step to identify and initialize the newer VIA C7 CPU
mr [Wed, 12 Jul 2006 14:52:32 +0000 (14:52 +0000)]
First step to identify and initialize the newer VIA C7 CPU
as found in a VIA EPIA EN-15000 board.

Obtained from: large parts from OpenBSD

18 years agoo Add missed comma, xref kld(4).
maxim [Wed, 12 Jul 2006 14:33:52 +0000 (14:33 +0000)]
o Add missed comma, xref kld(4).

18 years agoo Fix some printf(3) format nits in my patch I submitted to kib@.
maxim [Wed, 12 Jul 2006 13:36:08 +0000 (13:36 +0000)]
o Fix some printf(3) format nits in my patch I submitted to kib@.

Submitted by: ru

18 years agoRemove slipped in spaces.
kib [Wed, 12 Jul 2006 12:42:47 +0000 (12:42 +0000)]
Remove slipped in spaces.

Pointed out by: maxim
Approved by: pjd (mentor)

18 years agoCheck that the signal number is in range.
kib [Wed, 12 Jul 2006 12:41:56 +0000 (12:41 +0000)]
Check that the signal number is in range.

Submitted by: maxim
MFC after: 1 week
Approved by: pjd (mentor)

18 years agoUse proper format specifier for pointers in debug printfs (turned off
kib [Wed, 12 Jul 2006 11:41:53 +0000 (11:41 +0000)]
Use proper format specifier for pointers in debug printfs (turned off
by default).

Approved by: pjd (mentor)
MFC after: 2 weeks

18 years agoAlways supply curthread as argument to nfs_asyncio and nfs_doio
kib [Wed, 12 Jul 2006 09:16:35 +0000 (09:16 +0000)]
Always supply curthread as argument to nfs_asyncio and nfs_doio
in nfs_strategy. Otherwise, for some buffers, signals would be ignored
at the intr mounts.

Reviewed by: mohan, cel
MFC after: 1 month
Approved by: pjd (mentor)

18 years agoCheck that the signal number is in range.
kib [Wed, 12 Jul 2006 09:13:33 +0000 (09:13 +0000)]
Check that the signal number is in range.

Submitted by: Michiel Boland <michiel boland org>
MFC after: 1 week
Approved by: pjd (mentor)

18 years agoFix config page writes to not strip out the attributes when you
mjacob [Wed, 12 Jul 2006 07:48:50 +0000 (07:48 +0000)]
Fix config page writes to not strip out the attributes when you
actually go write the config page. This fixes the long standing
problem about updating NVRAM on Fibre Channel cards and seems
so far to not break SPI config page writes.

Put back role setting into mpt. That is, you can set a desired role
for mpt as a hint. On the next reboot, it'll pick that up and redo
the NVRAM settings appropriately and warn you that this won't take
effect until the next reboot. This saves people the step of having
to find a BIOS utilities disk to set target and/or initiator role
for the MPT cards.

18 years agoUse newkg to check if SCHED_OTHER is already inherited.
davidxu [Wed, 12 Jul 2006 07:02:28 +0000 (07:02 +0000)]
Use newkg to check if SCHED_OTHER is already inherited.

18 years agoMove debug printfs under the proper macro.
njl [Wed, 12 Jul 2006 06:29:59 +0000 (06:29 +0000)]
Move debug printfs under the proper macro.

18 years agoUse kernel facilities to support real-time scheduling.
davidxu [Wed, 12 Jul 2006 06:13:18 +0000 (06:13 +0000)]
Use kernel facilities to support real-time scheduling.

18 years agoAdd two new CPUID bits for AMD CPUs, i. e., SVM and extended APIC register.
jkim [Wed, 12 Jul 2006 06:04:12 +0000 (06:04 +0000)]
Add two new CPUID bits for AMD CPUs, i. e., SVM and extended APIC register.

18 years agoReturn priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE for
davidxu [Wed, 12 Jul 2006 05:54:17 +0000 (05:54 +0000)]
Return priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE for
SCHED_OTHER, the same range as rtprio() is using. In old code,
it returns nice range -20 .. 20, nice should be treated as process
weight, it is really managed by getpriority() and setpriority()
syscalls, they are different.

18 years ago__error could be called too early before libthr is initialized, test
davidxu [Wed, 12 Jul 2006 03:44:05 +0000 (03:44 +0000)]
__error could be called too early before libthr is initialized, test
this case and return global varible errno instead.

18 years agoAssume floppy disk is not inserted when we have exhausted retries. This
jkim [Wed, 12 Jul 2006 00:49:46 +0000 (00:49 +0000)]
Assume floppy disk is not inserted when we have exhausted retries.  This
significantly reduces booting time when there is broken floppy disk drive,
controller, cable, BIOS, etc.
When the floppy controller interface is correctly implemented, disk change
signal (DSKCHG) is reflected in the Digital Input Register (DIR) at 0x3f7.
However, there are many cases that the signal is unusable.  Moreover, some
BIOS does not reserve the port at all.  In those cases, the register may not
function.

18 years agoComment out the mapping of the OHCI controller registers va == pa. This
cognet [Wed, 12 Jul 2006 00:48:50 +0000 (00:48 +0000)]
Comment out the mapping of the OHCI controller registers va == pa. This
address is in the userland address space. The proper thing is either to choose
a virtual address in the kernel address space beyond the KVA, or to use
pmap_mapdev().

18 years agoSeveral protocol switch functions (pru_abort, pru_detach, pru_sosetlabel)
rwatson [Tue, 11 Jul 2006 23:18:28 +0000 (23:18 +0000)]
Several protocol switch functions (pru_abort, pru_detach, pru_sosetlabel)
return void, so don't implement no-op versions of these functions.
Instead, consistently check if those switch pointers are NULL before
invoking them.

18 years agoWhen pru_attach() fails, call sodealloc() on the socket rather than
rwatson [Tue, 11 Jul 2006 21:56:58 +0000 (21:56 +0000)]
When pru_attach() fails, call sodealloc() on the socket rather than
using sorele() and the full tear-down path.  Since protocol state
allocation failed, this is not required (and is arguably undesirable).
This matches the behavior of sonewconn() under the same circumstances.

18 years agoReduce periods of simultaneous acquisition of various socket buffer
rwatson [Tue, 11 Jul 2006 21:49:54 +0000 (21:49 +0000)]
Reduce periods of simultaneous acquisition of various socket buffer
locks and the unplock during uipc_rcvd() and uipc_send() by caching
certain values from one structure while its locks are held, and
applying them to a second structure while its locks are held.  If
done carefully, this should be correct, and will reduce the amount
of work done with the global unp lock held.

Tested by: kris (earlier version)

18 years agoRegen.
jhb [Tue, 11 Jul 2006 20:55:23 +0000 (20:55 +0000)]
Regen.

18 years ago- Add conditional VFS Giant locking to getdents_common() (linux ABIs),
jhb [Tue, 11 Jul 2006 20:52:08 +0000 (20:52 +0000)]
- Add conditional VFS Giant locking to getdents_common() (linux ABIs),
  ibcs2_getdents(), ibcs2_read(), ogetdirentries(), svr4_sys_getdents(),
  and svr4_sys_getdents64() similar to that in getdirentries().
- Mark ibcs2_getdents(), ibcs2_read(), linux_getdents(), linux_getdents64(),
  linux_readdir(), ogetdirentries(), svr4_sys_getdents(), and
  svr4_sys_getdents64() MPSAFE.

18 years agoThe ufs_lookup.c has a critical bug around the whiteout
daichi [Tue, 11 Jul 2006 17:27:04 +0000 (17:27 +0000)]
The ufs_lookup.c has a critical bug around the whiteout
process. UFS must check a whiteout name when it uses the
whiteout, but the current implementation does not check
the whileout name, so sometimes UFS writes over a wrong
whtieout. UFS *MUST* check the whiteout name to use a
corrent whiteout. This bug leads unionfs. panic.
This commit fixes this trouble.

Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer)
Reviewed by: tegge & rodrigc (mentor)
Approved by: rodrigc (mentor)
MFC after: 2 weeks

18 years agoGah. Replace another instance of "Developer's Handbook" with
joel [Tue, 11 Jul 2006 16:26:40 +0000 (16:26 +0000)]
Gah.  Replace another instance of "Developer's Handbook" with
"Architecture Handbook".

18 years agoAdd a new flag to pmap_enter_locked() to say if it's OK to wait. If it is, and
cognet [Tue, 11 Jul 2006 11:22:06 +0000 (11:22 +0000)]
Add a new flag to pmap_enter_locked() to say if it's OK to wait. If it is, and
we're unable to allocate the memory for a PTE, we'll wait until we can. If not,
we'll just return.
Use M_NOWAIT|M_USE_RESERVE to allocate PTEs, it is less aggressive than
M_NOWAIT alone.

Suggested by:   alc

18 years agoDon't forget to check invalid policy!
davidxu [Tue, 11 Jul 2006 08:19:57 +0000 (08:19 +0000)]
Don't forget to check invalid policy!

18 years agoOops, remove debugger line.
davidxu [Tue, 11 Jul 2006 06:15:46 +0000 (06:15 +0000)]
Oops, remove debugger line.

18 years agoExtended the POSIX scheduler APIs to accept lwpid as well, we've already
davidxu [Tue, 11 Jul 2006 06:11:34 +0000 (06:11 +0000)]
Extended the POSIX scheduler APIs to accept lwpid as well, we've already
done this in ptrace syscall, when a pid is large than PID_MAX, the syscall
will search a thread in current process. It permits 1:1 thread library to
get and set a thread's scheduler attributes.

18 years agoRemove pre-commit review on mpt.
mjacob [Tue, 11 Jul 2006 06:09:54 +0000 (06:09 +0000)]
Remove pre-commit review on mpt.

18 years agoFor SCHED_OTHER, we always inherit current thread's interactive priority
davidxu [Tue, 11 Jul 2006 06:01:14 +0000 (06:01 +0000)]
For SCHED_OTHER, we always inherit current thread's interactive priority
unless current thread is realtime thread, in such case, we set a new zero
priority for it, notice we don't have per-thread nice, the priority
passed by userland is ignored here.

18 years agoAdd POSIX scheduler parameters support to thr_new syscall, this permits
davidxu [Tue, 11 Jul 2006 05:34:35 +0000 (05:34 +0000)]
Add POSIX scheduler parameters support to thr_new syscall, this permits
privileged process to create realtime thread.

18 years agoCreate thread in separated ksegrp, so they always get correct user level
davidxu [Mon, 10 Jul 2006 23:14:07 +0000 (23:14 +0000)]
Create thread in separated ksegrp, so they always get correct user level
priority.

18 years agoPut in some missing target mode for 2KLOGIN f/w spots.
mjacob [Mon, 10 Jul 2006 22:40:21 +0000 (22:40 +0000)]
Put in some missing target mode for 2KLOGIN f/w spots.

MFC after: 1 month

18 years agoClean up the ioctl to not process nonsense on SCSI isp cards.
mjacob [Mon, 10 Jul 2006 22:39:32 +0000 (22:39 +0000)]
Clean up the ioctl to not process nonsense on SCSI isp cards.

MFC after: 1 month

18 years ago- Split out kern_accept(), kern_getpeername(), and kern_getsockname() for
jhb [Mon, 10 Jul 2006 21:38:17 +0000 (21:38 +0000)]
- Split out kern_accept(), kern_getpeername(), and kern_getsockname() for
  use by ABI emulators.
- Alter the interface of kern_recvit() somewhat.  Specifically, go ahead
  and hard code UIO_USERSPACE in the uio as that's what all the callers
  specify.  In place, add a new uioseg to indicate what type of pointer
  is in mp->msg_name.  Previously it was always a userland address, but
  ABI emulators may pass in kernel-side sockaddrs.  Also, remove the
  namelenp field and instead require the two places that used it to
  explicitly copy mp->msg_namelen out to userland.
- Use the patched kern_recvit() to replace svr4_recvit() and the stock
  kern_sendit() to replace svr4_sendit().
- Use kern_bind() instead of stackgap use in ti_bind().
- Use kern_getpeername() and kern_getsockname() instead of stackgap in
  svr4_stream_ti_ioctl().
- Use kern_connect() instead of stackgap in svr4_do_putmsg().
- Use kern_getpeername() and kern_accept() instead of stackgap in
  svr4_do_getmsg().
- Retire the stackgap from SVR4 compat as it is no longer used.

18 years agoUse proper defines instead of magic values.
pjd [Mon, 10 Jul 2006 21:18:00 +0000 (21:18 +0000)]
Use proper defines instead of magic values.

MFC after: 1 week

18 years agoThe TrustedBSD MAC Framework is documented in the Architecture handbook,
joel [Mon, 10 Jul 2006 20:51:30 +0000 (20:51 +0000)]
The TrustedBSD MAC Framework is documented in the Architecture handbook,
not in the Developers handbook.

Submitted by: Samy Al Bahra

18 years agoUnexpand PTRIN() in several places and fix one instance where 0 was being
jhb [Mon, 10 Jul 2006 19:37:43 +0000 (19:37 +0000)]
Unexpand PTRIN() in several places and fix one instance where 0 was being
used instead of NULL.

18 years agoExplicitly use STAILQ_REMOVE_HEAD() when we know we are removing the head
jhb [Mon, 10 Jul 2006 19:28:57 +0000 (19:28 +0000)]
Explicitly use STAILQ_REMOVE_HEAD() when we know we are removing the head
element to avoid confusing Coverity.  It's now also easier for humans to
parse as well.

Found by: Coverity Prevent(tm)
CID: 1201

18 years agoFix two more instances of using a linker_file_t object in TAILQ() macros
jhb [Mon, 10 Jul 2006 19:13:45 +0000 (19:13 +0000)]
Fix two more instances of using a linker_file_t object in TAILQ() macros
after free'ing it.

Found by: Coverity Prevent(tm)
CID: 1435

18 years agoImplement mpo_associate_nfsd_label entry point for the BIBA security policy,
csjp [Mon, 10 Jul 2006 19:13:32 +0000 (19:13 +0000)]
Implement mpo_associate_nfsd_label entry point for the BIBA security policy,
we will initialize the label to biba/low for files that have been created
through an NFS RPC. This is a safe default given the default nature of our
NFS implementation, there is not a whole lot of data integrity there by
default. This also fixes kernel panics associated with file creation over NFS
while creating files on filesystems which have multilabel enabled with BIBA
enabled.

MFC after: 2 weeks
Discussed with: rwatson

18 years agoDon't try to reuse the linker_file structure after we've freed it when
jhb [Mon, 10 Jul 2006 19:06:01 +0000 (19:06 +0000)]
Don't try to reuse the linker_file structure after we've freed it when
throwing out the kld's loaded by the loader that didn't successfully link.

Found by: Coverity Prevent(tm)
CID: 1435

18 years agoRetire the stackgap macros from ibcs2 as they are no longer used. Push
jhb [Mon, 10 Jul 2006 17:59:26 +0000 (17:59 +0000)]
Retire the stackgap macros from ibcs2 as they are no longer used.  Push
the includes of <sys/exec.h> and <sys/sysent.h> down into the only files
that now need them.

18 years agoAnd now without typo.
phk [Mon, 10 Jul 2006 16:53:32 +0000 (16:53 +0000)]
And now without typo.