]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoAdd support for the Zeagle N2iTion3 Dive Computer to uplcom(4). This brings
gavin [Sun, 9 Jan 2011 17:40:04 +0000 (17:40 +0000)]
Add support for the Zeagle N2iTion3 Dive Computer to uplcom(4).  This brings
the list of supported devices in sync with kernel.org git revision
f36ecd5de93e4c85a9e3d25100c6e233155b12e5, and OpenBSD uplcom.c r1.54

13 years agoSync the list of devices supported by uslcom(4) with Linux, bringing in
gavin [Sun, 9 Jan 2011 17:10:06 +0000 (17:10 +0000)]
Sync the list of devices supported by uslcom(4) with Linux, bringing in
all new devices added between our r211022 and their git revision
93ad03d60b5b18897030038234aa2ebae8234748

Also correct a Foxconn entry.

MFC after: 1 week

13 years agoImprove style and wording of comments and sysctl descriptions [1].
bz [Sun, 9 Jan 2011 14:34:56 +0000 (14:34 +0000)]
Improve style and wording of comments and sysctl descriptions [1].

Move machdep.ct_debug to debug.clocktime as there was no reason to
actually put it under machdep in r216340.

Submitted by: bde [1]
MFC after: 3 days

13 years agoMove repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h.
kib [Sun, 9 Jan 2011 12:50:44 +0000 (12:50 +0000)]
Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h.
Update the outdated comments describing MAXSLP and the process
selection algorithm for swap out.

Comments wording and reviewed by: alc

13 years agoImplement the __pthread_map_stacks_exec() for libthr.
kib [Sun, 9 Jan 2011 12:38:40 +0000 (12:38 +0000)]
Implement the __pthread_map_stacks_exec() for libthr.

Stack creation code is changed to call _rtld_get_stack_prot() to get
the stack protection right. There is a race where thread is created
during dlopen() of dso that requires executable stacks. Then,
_rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread
is still not linked into the thread list. In this case, the callback
misses the thread stack, and rechecks the required protection
afterward.

Reviewed by: davidxu

13 years agoReplace nfs4 with newnfs in netfs_types. nfs4 was removed in r192578 and
jh [Sun, 9 Jan 2011 09:21:11 +0000 (09:21 +0000)]
Replace nfs4 with newnfs in netfs_types. nfs4 was removed in r192578 and
mount(8) has supported newnfs since r192930.

PR: conf/153655
Submitted by: Anonymous <swell.k@gmail.com>
MFC after: 3 weeks

13 years agoAdd missing ar91xx definition for the WMAC reset control.
adrian [Sun, 9 Jan 2011 06:17:46 +0000 (06:17 +0000)]
Add missing ar91xx definition for the WMAC reset control.

13 years agoFix the value for DECIMAL_DIG on UltraSparcs. The previous value of
das [Sun, 9 Jan 2011 06:05:48 +0000 (06:05 +0000)]
Fix the value for DECIMAL_DIG on UltraSparcs.  The previous value of
35 wasn't quite big enough to ensure correct rounding for very-close-
to-halfway cases.

13 years agoWe don't support any floating point types larger than double on
das [Sun, 9 Jan 2011 06:05:22 +0000 (06:05 +0000)]
We don't support any floating point types larger than double on
powerpc, so DECIMAL_DIG should be 17.

13 years agoThe highest-precision floating point type on ia64 has 64 bits of
das [Sun, 9 Jan 2011 06:05:02 +0000 (06:05 +0000)]
The highest-precision floating point type on ia64 has 64 bits of
precision, so DECIMAL_DIG should be 21, as on i386/amd64.

13 years agoEliminate a redundant alignment directive on the page locks array.
alc [Sun, 9 Jan 2011 04:34:02 +0000 (04:34 +0000)]
Eliminate a redundant alignment directive on the page locks array.

13 years agoModify readdirplus in the experimental NFS server in a
rmacklem [Sun, 9 Jan 2011 02:10:54 +0000 (02:10 +0000)]
Modify readdirplus in the experimental NFS server in a
manner analogous to r216633 for the regular server. This
change busies the file system so that VFS_VGET() is
guaranteed to be using the correct mount point even
during a forced dismount attempt. Since nfsd_fhtovp() is
not called immediately before readdirplus, the patch is
actually a clone of pjd@'s nfs_serv.c.4.patch instead of
the one committed in r216633.

Reviewed by: kib
MFC after: 10 days

13 years agosh: Make exit without parameters from EXIT trap POSIX-compliant.
jilles [Sat, 8 Jan 2011 23:08:13 +0000 (23:08 +0000)]
sh: Make exit without parameters from EXIT trap POSIX-compliant.

It should use the original exit status, just like falling off the
end of the trap handler.

Outside an EXIT trap, 'exit' is still equivalent to 'exit $?'.

13 years agoChange some variables from int to size_t. This is more accurate since
csjp [Sat, 8 Jan 2011 23:06:54 +0000 (23:06 +0000)]
Change some variables from int to size_t.  This is more accurate since
these variables represent sizes in one capacity or another.  There is
no reason to allow negative numbers.  Change userspace shared structure
elements that get used for the modified functions from int to uint32_t,
since it's not clear what userspace programs use these fields, and we
do not want to break binary compatibility.  This fixes a panic when
corrupt or bogus data is passed into the kernel.

Obtained from: NetBSD
MFC after: 3 weeks

13 years agoTake passwords out of debug log.
jpaetzel [Sat, 8 Jan 2011 23:03:24 +0000 (23:03 +0000)]
Take passwords out of debug log.
Fix path problem that was preventing disk info from being in the log.

PR: bin/151968
Submitted by: Kris Moore <kmoore@FreeBSD.org>
Approved by: imp

13 years agosh: Add simple test for 'exit' without parameters.
jilles [Sat, 8 Jan 2011 23:00:38 +0000 (23:00 +0000)]
sh: Add simple test for 'exit' without parameters.

13 years agoEliminate the counting of vm_page_pa_tryrelock calls. We really don't
alc [Sat, 8 Jan 2011 22:45:22 +0000 (22:45 +0000)]
Eliminate the counting of vm_page_pa_tryrelock calls.  We really don't
need it anymore.  Moreover, its implementation had a type mismatch, a
long is not necessarily an uint64_t.  (This mismatch was hidden by
casting.)  Move the remaining two counters up a level in the sysctl
hierarchy.  There is no reason for them to be under the vm.pmap node.

Reviewed by: kib

13 years agoPush some PC-BSD specific fixes upstream.
jpaetzel [Sat, 8 Jan 2011 22:42:56 +0000 (22:42 +0000)]
Push some PC-BSD specific fixes upstream.

PR: bin/152894
Submitted by: Kris Moore <kmoore@FreeBSD.org>
Approved by: imp

13 years agoMake sure to always do source address selection on
deischen [Sat, 8 Jan 2011 22:33:46 +0000 (22:33 +0000)]
Make sure to always do source address selection on
an unbound socket, regardless of any multicast options.
If an address is specified via a multicast option, then
let it override normal the source address selection.

This fixes a bug where source address selection was
not being performed when multicast options were present
but without an interface being specified.

Reviewed by: bz
MFC after: 1 day

13 years agoMore elegant way to detect MBR vs. GPT
jpaetzel [Sat, 8 Jan 2011 20:25:00 +0000 (20:25 +0000)]
More elegant way to detect MBR vs. GPT

Submitted by: nwhitehorn
Approved by: imp

13 years agoMake RB_CDROM work. This should probably check for a disc in cd1 and acd1
nwhitehorn [Sat, 8 Jan 2011 19:50:13 +0000 (19:50 +0000)]
Make RB_CDROM work. This should probably check for a disc in cd1 and acd1
as well.

13 years agoRevert r216805.
attilio [Sat, 8 Jan 2011 18:51:15 +0000 (18:51 +0000)]
Revert r216805.
That revision is introducing a bug which is more visible than problems
it is trying to fix.

As long as my time is very limited in this period I am going to
commit back this patch just once it is fully fixed.

Reported by: dim, Nicholas Esborn

13 years agoUse the same expression to report stack protection mode for AT_STACKEXEC
kib [Sat, 8 Jan 2011 18:41:19 +0000 (18:41 +0000)]
Use the same expression to report stack protection mode for AT_STACKEXEC
as the expression used by exec_new_vmspace().

13 years agoCopy powerpc/include/_inttypes.h to x86 and replace i386/amd64/pc98
tijl [Sat, 8 Jan 2011 18:09:48 +0000 (18:09 +0000)]
Copy powerpc/include/_inttypes.h to x86 and replace i386/amd64/pc98
headers with stubs.

Approved by: kib (mentor)

13 years agoWhite space changes to align comments. The mips and powerpc _inttypes.h
tijl [Sat, 8 Jan 2011 18:02:46 +0000 (18:02 +0000)]
White space changes to align comments. The mips and powerpc _inttypes.h
are now exactly the same.

Approved by: kib (mentor)

13 years agoRename PRIreg helper macro to PRIptr to better reflect its use. Registers
tijl [Sat, 8 Jan 2011 18:00:19 +0000 (18:00 +0000)]
Rename PRIreg helper macro to PRIptr to better reflect its use. Registers
and pointers don't always have the same size, e.g. the __mips_n32 ABI
(ILP32) has 64 bit registers but 32 bit pointers.

On mips introduce PRIptr to fix the format specifier for (u)intptr_t.

Prefix PRI64 and PRIptr with underscores because macro names starting with
PRI[a-zX] are reserved for future use.

Approved by: kib (mentor)

13 years agoImplement __pthread_map_stacks_exec() callback for libc, to change the
kib [Sat, 8 Jan 2011 17:13:43 +0000 (17:13 +0000)]
Implement __pthread_map_stacks_exec() callback for libc, to change the
stack protection to allow execution for single-threaded processes.

13 years agoIn rtld, read the initial stack access mode from AT_STACKPROT as set
kib [Sat, 8 Jan 2011 17:11:49 +0000 (17:11 +0000)]
In rtld, read the initial stack access mode from AT_STACKPROT as set
by kernel, and parse PT_GNU_STACK phdr from linked and loaded dsos.

If the loaded dso requires executable stack, as specified by PF_X bit
of p_flags of PT_GNU_STACK phdr, but current stack protection does not
permit execution, the __pthread_map_stacks_exec symbol is looked up
and called. It should be implemented in libc or threading library and
change the protection mode of all thread stacks to be executable.

Provide a private interface _rtld_get_stack_prot() to export the stack
access mode as calculated by rtld.

Reviewed by:    kan

13 years agoIn elf image activator, read and apply the stack protection mode from
kib [Sat, 8 Jan 2011 16:30:59 +0000 (16:30 +0000)]
In elf image activator, read and apply the stack protection mode from
PT_GNU_STACK program header, if present and enabled. Two new sysctls
are provided, kern.elf32.nxstack and kern.elf64.nxstack, that allow to
enable PT_GNU_STACK for ABIs of specified bitsize, if ABI decided to
support shared page.

Inform rtld about access mode of the stack initial mapping by
AT_STACKPROT aux vector.

At the moment, the default is disabled, waiting for the usermode
support bits.

13 years agoCreate shared (readonly) page. Each ABI may specify the use of page by
kib [Sat, 8 Jan 2011 16:13:44 +0000 (16:13 +0000)]
Create shared (readonly) page. Each ABI may specify the use of page by
setting SV_SHP flag and providing pointer to the vm object and mapping
address. Provide simple allocator to carve space in the page, tailored
to put the code with alignment restrictions.

Enable shared page use for amd64, both native and 32bit FreeBSD
binaries.  Page is private mapped at the top of the user address
space, moving a start of the stack one page down. Move signal
trampoline code from the top of the stack to the shared page.

Reviewed by:  alc

13 years agoCollect code to translate between vm_prot_t and p_flags into helper
kib [Sat, 8 Jan 2011 16:02:14 +0000 (16:02 +0000)]
Collect code to translate between vm_prot_t and p_flags into helper
functions.

MFC after: 1 week

13 years agoDocument rc.conf.d in rc.conf(5).
gjb [Sat, 8 Jan 2011 13:28:43 +0000 (13:28 +0000)]
Document rc.conf.d in rc.conf(5).

PR: 140495
Submitted by: Tom Judge (tom of tomjudge com)
Approved by: keramida (mentor)
MFC after: 2 weeks

13 years agoOn mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather than
tijl [Sat, 8 Jan 2011 12:43:05 +0000 (12:43 +0000)]
On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather than
architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and
corresponding macros) are different from 32 bit. [1]

Correct the type of INT64_MIN, INT64_MAX and UINT64_MAX.

Define (U)INTMAX_C as an alias for (U)INT64_C matching the type definition
for (u)intmax_t. Do this on all architectures for consistency.

Suggested by: bde [1]
Approved by: kib (mentor)

13 years agoOn 32 bit architectures define (u)int64_t as (unsigned) long long instead
tijl [Sat, 8 Jan 2011 11:47:55 +0000 (11:47 +0000)]
On 32 bit architectures define (u)int64_t as (unsigned) long long instead
of (unsigned) int __attribute__((__mode__(__DI__))). This aligns better
with macros such as (U)INT64_C, (U)INT64_MAX, etc. which assume (u)int64_t
has type (unsigned) long long.

The mode attribute was used because long long wasn't standardised until
C99. Nowadays compilers should support long long and use of the mode
attribute is discouraged according to GCC Internals documentation.

The type definition has to be marked with __extension__ to support
compilation with "-std=c89 -pedantic".

Discussed with: bde
Approved by: kib (mentor)

13 years agoFix types of some values in machine/_limits.h.
tijl [Sat, 8 Jan 2011 11:13:34 +0000 (11:13 +0000)]
Fix types of some values in machine/_limits.h.

On some architectures UCHAR_MAX and USHRT_MAX had type unsigned int.
However, lacking integer suffixes for types smaller than int, their type
should correspond to that of an object of type unsigned char (or short)
when used in an expression with objects of type int. In that case unsigned
char (short) are promoted to int (i.e. signed) so the type of UCHAR_MAX and
USHRT_MAX should also be int.

Where MIN/MAX constants implicitly have the correct type the suffix has
been removed.

While here, correct some comments.

Reviewed by: bde
Approved by: kib (mentor)

13 years agoFix some style(9) issues.
kib [Sat, 8 Jan 2011 11:04:30 +0000 (11:04 +0000)]
Fix some style(9) issues.
Do not use strlcpy() where simple assignment is enough.

Noted by: bde (long time ago)
MFC after: 1 week

13 years agoFix struct FILE * leak on error (in disabled by default hesiod support code).
kib [Sat, 8 Jan 2011 10:56:58 +0000 (10:56 +0000)]
Fix struct FILE * leak on error (in disabled by default hesiod support code).

Submitted by: henning petersen <henning.petersen t-online de>
PR: 153756
MFC after: 1 week

13 years agoUse ether_ntoa instead of home-grown version.
delphij [Sat, 8 Jan 2011 01:57:23 +0000 (01:57 +0000)]
Use ether_ntoa instead of home-grown version.

Noticed by: Boris Kochergin <spawk acm poly edu>

13 years agoClarify when we switch from keepidle to keepinvtl intervals if sending
bz [Sat, 8 Jan 2011 00:44:17 +0000 (00:44 +0000)]
Clarify when we switch from keepidle to keepinvtl intervals if sending
TCP keepalive probes is enabled.

Reviewed by: gnn
MFC After: 3 days

13 years agosed: Add test for r217133 (-i race).
jilles [Sat, 8 Jan 2011 00:06:22 +0000 (00:06 +0000)]
sed: Add test for r217133 (-i race).

PR: bin/153261
MFC after: 2 weeks

13 years agosed: Try hard links to make -i target available continually.
jilles [Sat, 8 Jan 2011 00:03:18 +0000 (00:03 +0000)]
sed: Try hard links to make -i target available continually.

When creating a backup file, sed renamed the original before renaming the
changed copy into place, leading to a short time when no file with the
original name was present (usually only visible on SMP systems). Try
creating the backup file using a hard link instead, avoiding this problem.
If creating the hard link fails for any reason, fall back to the old rename
method.

When not creating a backup file, sed already renamed the changed copy onto
the original. This remains unchanged.

I am not adding the suppression of redundant fchown/fchmod to this commit,
because FreeBSD appears to check this in the kernel (for msdosfs at least).

PR: bin/153261
Submitted by: Pedro F. Giffuni
Reviewed by: dds (older version)
Obtained from: Illumos
MFC after: 2 weeks

13 years agoCSUM flags need to be OS version sensitive in ixv code
jfv [Fri, 7 Jan 2011 23:39:41 +0000 (23:39 +0000)]
CSUM flags need to be OS version sensitive in ixv code

MFC in 3 days

13 years agokern/150247 - virtualization code also needs fix for 7.X to be buildable...
jfv [Fri, 7 Jan 2011 23:19:13 +0000 (23:19 +0000)]
kern/150247  - virtualization code also needs fix for 7.X to be buildable...

MFC in 3 days

13 years agoFix to kern/150247 - make ixgbe buildable for 7.x
jfv [Fri, 7 Jan 2011 22:58:12 +0000 (22:58 +0000)]
Fix to kern/150247 - make ixgbe buildable for 7.x

13 years agoRemove unused support for 64 bit long on 32 bit architectures.
tijl [Fri, 7 Jan 2011 22:57:31 +0000 (22:57 +0000)]
Remove unused support for 64 bit long on 32 bit architectures.

It was used mainly to discover and fix some 64-bit portability problems
before 64-bit arches were widely available.

Discussed with: bde
Approved by: kib (mentor)

13 years agokern/153772 fix variable names.
jfv [Fri, 7 Jan 2011 22:34:56 +0000 (22:34 +0000)]
kern/153772   fix variable names.

Thank you Andrew Boyer for catching these

MFC in 3 days

13 years agoTrim extra spaces before tabs.
jhb [Fri, 7 Jan 2011 21:40:34 +0000 (21:40 +0000)]
Trim extra spaces before tabs.

13 years agomake targets
imp [Fri, 7 Jan 2011 20:36:27 +0000 (20:36 +0000)]
make targets

This produces a list of currently supported targets.  Here "supported"
means "built in make universe" on the theory that those targets are
more supported than any that might work in 'make buildworld TARGET=x
TARGET_ARCH=y' since the latter are less tested.

Suggested by: rwatson

13 years agoRetire TARGET_ABI.
imp [Fri, 7 Jan 2011 20:26:33 +0000 (20:26 +0000)]
Retire TARGET_ABI.

Implement MACHINE_ARCH=mips64e[lb] to build N64 images.  This replaces
MACHINE_ARCH=mipse[lb] TARGET_ABI=n64.

MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires
WITHOUT_CDDL due to atomic issues in libzfs.  I've not investigated
this much, but implemented this to preserve as much of the TARGET_ABI
functionality that I could.  Since its presence doesn't affect the
working cases, I've kept it in for now.

Added mips64e[lb] to make universe, so more kernels build.

And I think this (finally) closes the curtain on the tbemd tree.

13 years agoFix a memory leak in ARP queues.
gnn [Fri, 7 Jan 2011 20:02:05 +0000 (20:02 +0000)]
Fix a memory leak in ARP queues.

Pointed out by: jhb@
MFC after: 2 weeks

13 years ago- Save some space relying on the fact that all ioctl commands
stas [Fri, 7 Jan 2011 18:52:08 +0000 (18:52 +0000)]
- Save some space relying on the fact that all ioctl commands
  prefixes are the same.

Suggested by: "Carlos A. M. dos Santos" <unixmania@gmail.com>

13 years agoDon't try to free an unassigned pointer.
bschmidt [Fri, 7 Jan 2011 18:41:59 +0000 (18:41 +0000)]
Don't try to free an unassigned pointer.

Submitted by: Paul B Mahol <onemda at gmail.com>
MFC after: 1 week

13 years agoAdjust ARP hold queue locking.
gnn [Fri, 7 Jan 2011 18:14:58 +0000 (18:14 +0000)]
Adjust ARP hold queue locking.

Submitted by: Rozhuk Ivan, jhb
MFC after: 2 weeks

13 years agoUse a regular taskqueue for dummynet rather than a "fast" taskqueue.
jhb [Fri, 7 Jan 2011 16:47:20 +0000 (16:47 +0000)]
Use a regular taskqueue for dummynet rather than a "fast" taskqueue.

Reviewed by: luigi

13 years agoFix a memory overflow where the input length to g_gpt_utf8_to_utf16()
mdf [Fri, 7 Jan 2011 16:46:20 +0000 (16:46 +0000)]
Fix a memory overflow where the input length to g_gpt_utf8_to_utf16()
was specified incorrectly, causing the bzero to run past the end of a
malloc(9)'d object.

Submitted by: Eric Youngblut < eyoungblut AT isilon DOT com >
MFC after: 3 days

13 years agoAdd section .note.GNU-stack for assembly files used by 386 and amd64.
kib [Fri, 7 Jan 2011 16:13:12 +0000 (16:13 +0000)]
Add section .note.GNU-stack for assembly files used by 386 and amd64.

13 years agoAdd section .note.GNU-stack for assembly files used by 386 and amd64.
kib [Fri, 7 Jan 2011 16:09:33 +0000 (16:09 +0000)]
Add section .note.GNU-stack for assembly files used by 386 and amd64.

13 years agoAdd section .note.GNU-stack for assembly files used by 386 and amd64.
kib [Fri, 7 Jan 2011 16:08:40 +0000 (16:08 +0000)]
Add section .note.GNU-stack for assembly files used by 386 and amd64.

13 years agoAdd section .note.GNU-stack for assembly files used by 386 and amd64.
kib [Fri, 7 Jan 2011 16:07:51 +0000 (16:07 +0000)]
Add section .note.GNU-stack for assembly files used by 386 and amd64.

13 years agoUse a regular taskqueue rather than a fast taskqueue for mxge(4).
jhb [Fri, 7 Jan 2011 16:07:29 +0000 (16:07 +0000)]
Use a regular taskqueue rather than a fast taskqueue for mxge(4).

Reviewed by: gallatin

13 years agoAdd section .note.GNU-stack for assembly files used by 386 and amd64.
kib [Fri, 7 Jan 2011 16:07:05 +0000 (16:07 +0000)]
Add section .note.GNU-stack for assembly files used by 386 and amd64.

13 years agoFix braino in r217101. -Wa is used to supply assembler flag to cc driver.
kib [Fri, 7 Jan 2011 15:59:23 +0000 (15:59 +0000)]
Fix braino in r217101. -Wa is used to supply assembler flag to cc driver.

Noted by: Anonymous <swell.k gmail com>

13 years agoOn amd64 and i386, force assembler to mark objects compiled from the
kib [Fri, 7 Jan 2011 14:35:45 +0000 (14:35 +0000)]
On amd64 and i386, force assembler to mark objects compiled from the
assembler source for libcompiler_rt as not needed executable stack. This
is done with a hammer instead of properly marking each assembly file
with section .note.GNU-stack to avoid modifying contributed source.

Discussed with: ed

13 years agoIntroduce make variable ACFLAGS used to supply additional flags to
kib [Fri, 7 Jan 2011 14:32:29 +0000 (14:32 +0000)]
Introduce make variable ACFLAGS used to supply additional flags to
cc driver when compiling assembler source file that is preprocessed.

13 years agoEmit .note.GNU-stack for the syscall stubs generated by libc.
kib [Fri, 7 Jan 2011 14:28:54 +0000 (14:28 +0000)]
Emit .note.GNU-stack for the syscall stubs generated by libc.

13 years agoMake gcc emit the .note.GNU-stack section into the assembler files.
kib [Fri, 7 Jan 2011 14:24:24 +0000 (14:24 +0000)]
Make gcc emit the .note.GNU-stack section into the assembler files.

Reviewed by: kan

13 years agoAdd AT_STACKPROT elf aux vector. Will be used to inform rtld about the
kib [Fri, 7 Jan 2011 14:22:34 +0000 (14:22 +0000)]
Add AT_STACKPROT elf aux vector. Will be used to inform rtld about the
initial stack protection set by the kernel image activator.

13 years agoWarn if rules could not be read from a ruleset file. Now at least
jh [Fri, 7 Jan 2011 10:59:22 +0000 (10:59 +0000)]
Warn if rules could not be read from a ruleset file. Now at least
something gets logged if the file has syntax errors.

PR: conf/91342
Silence on: freebsd-rc

13 years agoRestore comment describing /* NOTREACHED */, updated to match reality.
trasz [Fri, 7 Jan 2011 08:34:12 +0000 (08:34 +0000)]
Restore comment describing /* NOTREACHED */, updated to match reality.

13 years ago- Properly initialize the base priority (td_base_pri) of thread0 to PVM
jhb [Thu, 6 Jan 2011 22:26:00 +0000 (22:26 +0000)]
- Properly initialize the base priority (td_base_pri) of thread0 to PVM
  to match the desired priority in td_priority.  Otherwise the first time
  thread0 used a borrowed priority it would drop down to PUSER instead of
  PVM.
- Explicitly initialize the starting priority of new kprocs to PVM to
  avoid inheriting some random priority from thread0.

MFC after: 2 weeks

13 years ago- Move sched_fork() later in fork() after the various sections of the new
jhb [Thu, 6 Jan 2011 22:24:00 +0000 (22:24 +0000)]
- Move sched_fork() later in fork() after the various sections of the new
  thread and proc have been copied and zeroed from the old thread and
  proc.  Otherwise attempts to modify thread or process data in sched_fork()
  could be undone.
- Don't copy td_{base,}_user_pri from the old thread to the new thread in
  sched_fork_thread() in ULE.  This is already done courtesy the bcopy()
  of the thread copy region.
- Always initialize the real priority (td_priority) of new threads to the
  new thread's base priority (td_base_pri) to avoid bogusly inheriting a
  borrowed priority from the parent thread.

MFC after: 2 weeks

13 years agoOnly change the priority of timeshare threads to PRI_MAX_TIMESHARE
jhb [Thu, 6 Jan 2011 22:19:15 +0000 (22:19 +0000)]
Only change the priority of timeshare threads to PRI_MAX_TIMESHARE
when yield() is called.  Specifically, leave the priority of real time
and idle threads unchanged.

MFC after: 2 weeks

13 years ago- Restore dropping the priority of syncer down to PPAUSE when it is idle.
jhb [Thu, 6 Jan 2011 22:17:07 +0000 (22:17 +0000)]
- Restore dropping the priority of syncer down to PPAUSE when it is idle.
  This was lost when it was converted to using a condition variable instead
  of lbolt.
- Drop the priority of flowtable down to PPAUSE when it is idle as well
  since it is a similar background task.

MFC after: 2 weeks

13 years agoRetire PCONFIG and leave the priority of thread0 alone when waiting for
jhb [Thu, 6 Jan 2011 22:09:37 +0000 (22:09 +0000)]
Retire PCONFIG and leave the priority of thread0 alone when waiting for
interrupt config hooks to execute.

13 years agoRetire the INTR_FAST flag as it was obsoleted by the introduction of the
jhb [Thu, 6 Jan 2011 21:14:34 +0000 (21:14 +0000)]
Retire the INTR_FAST flag as it was obsoleted by the introduction of the
filter argument to bus_setup_intr().

13 years agoDon't require /usr/lib/aout to be on the system. Test for its
imp [Thu, 6 Jan 2011 21:09:22 +0000 (21:09 +0000)]
Don't require /usr/lib/aout to be on the system.  Test for its
existance since we don't generally need it.

MFC after: 1 week

13 years agoRemove bogus usage of INTR_FAST. "Fast" interrupts are now indicated by
jhb [Thu, 6 Jan 2011 21:08:06 +0000 (21:08 +0000)]
Remove bogus usage of INTR_FAST.  "Fast" interrupts are now indicated by
registering a filter handler rather than a threaded handler.  Also remove
a bogus use of INTR_MPSAFE for a filter.

13 years agoMake this work on big endian MIPS, while not breaking it for small
imp [Thu, 6 Jan 2011 21:07:51 +0000 (21:07 +0000)]
Make this work on big endian MIPS, while not breaking it for small
endian mips.  This will also make it work automatically on all future
big endian platforms.

13 years agoNo need to genreate these here
imp [Thu, 6 Jan 2011 21:04:00 +0000 (21:04 +0000)]
No need to genreate these here

13 years ago- Add a proper return value to mv_gpio_intr().
jhb [Thu, 6 Jan 2011 21:03:55 +0000 (21:03 +0000)]
- Add a proper return value to mv_gpio_intr().
- Remove an obsolete use of INTR_FAST.

13 years agoRemove an unnecessary INTR_MPSAFE and a comment suggesting it was
jhb [Thu, 6 Jan 2011 21:02:14 +0000 (21:02 +0000)]
Remove an unnecessary INTR_MPSAFE and a comment suggesting it was
unnecessary.

13 years agoHelp static analysis by initializing variables that we know cannot be
marcel [Thu, 6 Jan 2011 20:50:16 +0000 (20:50 +0000)]
Help static analysis by initializing variables that we know cannot be
used uninitialized, but which cannot be inferred from the code itself.

13 years agoDelete the NFS_STARTWRITE() and NFS_ENDWRITE() macros that
rmacklem [Thu, 6 Jan 2011 20:31:33 +0000 (20:31 +0000)]
Delete the NFS_STARTWRITE() and NFS_ENDWRITE() macros that
obscured vn_start_write() and vn_finished_write() for the
old OpenBSD port, since most uses have been replaced by the
correct calls.

MFC after: 12 days

13 years agoRemove unused variables. Spotted by a cppcheck
andreast [Thu, 6 Jan 2011 20:19:01 +0000 (20:19 +0000)]
Remove unused variables. Spotted by a cppcheck
(devel/cppcheck, http://sourceforge.net/projects/cppcheck) run.

Approved by: nwhitehorn (mentor)

13 years agotests: sort & fix includes, remove -include from CFLAGS of acct tests
keramida [Thu, 6 Jan 2011 20:05:24 +0000 (20:05 +0000)]
tests: sort & fix includes, remove -include from CFLAGS of acct tests

- Sort the includes of pack.c, moving sys/*.h files near the top.
- Add a couple of missing #include lines, and remove the need for
  custom -include options in the CFLAGS of the test Makefile.
- Remove the ad-hoc 'all' target, but keep its 'regress' bits for
  testing.
- Convert the ad-hoc 'clean' target to proper CLEANFILES stuff,
  so that the normal bsd.prog.mk machinery can clean up.
- Use `make -V .OBJDIR' to detect the place where 'pack' lives,
  so that regress.t works both with and without 'make obj'.

Reviewed by: uqs
MFC after: 1 week

13 years agoSince the VFS_LOCK_GIANT() code in the experimental NFS
rmacklem [Thu, 6 Jan 2011 19:50:11 +0000 (19:50 +0000)]
Since the VFS_LOCK_GIANT() code in the experimental NFS
server is broken and the major file systems are now all
mpsafe, modify the server so that it will only export
mpsafe file systems. This was discussed on freebsd-fs@
and removes a fair bit of crufty code.

MFC after: 12 days

13 years ago- Use macbstart_locked() directly instead of deferring it to a task.
jhb [Thu, 6 Jan 2011 19:32:00 +0000 (19:32 +0000)]
- Use macbstart_locked() directly instead of deferring it to a task.
- Expand locking scope in interrupt handler.
- Flesh out the detach routine.

Reviewed by: cognet

13 years agoSupport the Uniform Industrial Corp (UIC) MSR206 Magnetic Card Reader.
gavin [Thu, 6 Jan 2011 19:17:29 +0000 (19:17 +0000)]
Support the Uniform Industrial Corp (UIC) MSR206 Magnetic Card Reader.

MFC after: 1 week

13 years agoRemove an unused variable accidentally added in r216803.
marius [Thu, 6 Jan 2011 17:28:31 +0000 (17:28 +0000)]
Remove an unused variable accidentally added in r216803.

13 years agoUnbreak the LINT build. PS3 kernels can only be built 64-bit, and LINT is
nwhitehorn [Thu, 6 Jan 2011 14:12:24 +0000 (14:12 +0000)]
Unbreak the LINT build. PS3 kernels can only be built 64-bit, and LINT is
built for both architectures. We need a better solution here.

13 years agoGet rid of bad advice regarding /* NOTREACHED */. Compilers don't
trasz [Thu, 6 Jan 2011 08:33:48 +0000 (08:33 +0000)]
Get rid of bad advice regarding /* NOTREACHED */.  Compilers don't
really need it (one can use __dead2 instead), and style(9) was not
even consistent with itself in this regard.

13 years agoReturn 0 instead of garbage value.
davidxu [Thu, 6 Jan 2011 08:13:30 +0000 (08:13 +0000)]
Return 0 instead of garbage value.

Found by: clang static analyzer

13 years ago- Show textual representation of ioctl command in warning message
stas [Thu, 6 Jan 2011 07:13:23 +0000 (07:13 +0000)]
- Show textual representation of ioctl command in warning message
  if ioctl(4) is failed besides the command number.

Suggested by: delphij
MFC after: 2 weeks

13 years agoImport support for the Sony Playstation 3 using the OtherOS feature
nwhitehorn [Thu, 6 Jan 2011 04:12:29 +0000 (04:12 +0000)]
Import support for the Sony Playstation 3 using the OtherOS feature
available on firmwares 3.15 and earlier.

Caveats: Support for the internal SATA controller is currently missing,
as is support for framebuffer resolutions other than 720x480. These
deficiencies will be remedied soon.

Special thanks to Peter Grehan for providing the hardware that made this
port possible, and thanks to Geoff Levand of Sony Computer Entertainment
for advice on the LV1 hypervisor.

13 years agoFix a whitespace nit.
lstewart [Thu, 6 Jan 2011 04:05:25 +0000 (04:05 +0000)]
Fix a whitespace nit.

MFC after: 1 week
X-MFC with: r216995

13 years agoAdd an entry to the gpart XML to determine if the geom has pending changes
nwhitehorn [Thu, 6 Jan 2011 03:36:04 +0000 (03:36 +0000)]
Add an entry to the gpart XML to determine if the geom has pending changes
that need to be committed (or undone).

MFC after: 2 weeks

13 years agoRemove leftover for r214093.
davidxu [Thu, 6 Jan 2011 03:30:16 +0000 (03:30 +0000)]
Remove leftover for r214093.

13 years agoRemove support for SKYEYE simulator
imp [Wed, 5 Jan 2011 23:45:07 +0000 (23:45 +0000)]
Remove support for SKYEYE simulator

13 years agosh: Do not call exitshell() from evalcommand() unless evalcommand() forked
jilles [Wed, 5 Jan 2011 23:17:29 +0000 (23:17 +0000)]
sh: Do not call exitshell() from evalcommand() unless evalcommand() forked
itself.

This ensures that certain traps caused by builtins are executed.

13 years agoUpdate firmware to more recent versions.
mjacob [Wed, 5 Jan 2011 23:15:22 +0000 (23:15 +0000)]
Update firmware to more recent versions.

MFC after: 3 months