]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoOn sparc64 obtain the initiator ID to be used for SPI HBAs from the
marius [Tue, 27 Apr 2010 18:41:16 +0000 (18:41 +0000)]
On sparc64 obtain the initiator ID to be used for SPI HBAs from the
Open Firmware device tree in order to match what the PROM built-in
driver uses. This is especially important when netbooting Fujitsu
Siemens PRIMEPOWER250 as in that case the built-in driver isn't used
and the port facts PortSCSIID defaults to 0, conflicting with the
disk at the same address.

14 years agoReplace a magic value with the appropriate macro.
marius [Tue, 27 Apr 2010 18:06:54 +0000 (18:06 +0000)]
Replace a magic value with the appropriate macro.

14 years ago- On sparc64 obtain the initiator ID from the Open Firmware device tree
marius [Tue, 27 Apr 2010 18:05:33 +0000 (18:05 +0000)]
- On sparc64 obtain the initiator ID from the Open Firmware device tree
  in order to match what the PROM built-in driver uses.
- Remove some no longer used includes.

14 years agoUse _exit(2) system call directly instead of using exit(3) in signal
delphij [Tue, 27 Apr 2010 17:57:04 +0000 (17:57 +0000)]
Use _exit(2) system call directly instead of using exit(3) in signal
handler, as the latter is not guaranteed to be signal safe, and we
do not really care about flushing the stream during SIGINT.

Suggested by: Maxim Konovalov <maxim.konovalov gmail com>
MFC after: 13 days

14 years agoLanguage improvements to make the BUGS section easier to read.
delphij [Tue, 27 Apr 2010 17:50:43 +0000 (17:50 +0000)]
Language improvements to make the BUGS section easier to read.

Reviewed by: Alexander Best <alexbestms wwu de>
MFC after: 13 days

14 years agoUpdate device identify data and serial number when device change detected.
mav [Tue, 27 Apr 2010 15:59:38 +0000 (15:59 +0000)]
Update device identify data and serial number when device change detected.
Reprobe immediately following this should have fresh data.

14 years agoTake advantage of OF_getscsinitid().
marius [Tue, 27 Apr 2010 15:50:25 +0000 (15:50 +0000)]
Take advantage of OF_getscsinitid().

14 years agoMFP4: @177254
bz [Tue, 27 Apr 2010 15:16:54 +0000 (15:16 +0000)]
MFP4: @177254

Add missing CURVNET_RESTORE() calls for multiple code paths, to stop
leaking the currently cached vnet into callers and to the process.

Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
MFC after: 4 days

14 years agoEnhance the historic behaviour of raw sockets and jails in a way
bz [Tue, 27 Apr 2010 15:07:08 +0000 (15:07 +0000)]
Enhance the historic behaviour of raw sockets and jails in a way
that we allow all possible jail IPs as source address rather than
forcing the "primary". While IPv6 naturally has source address
selection, for legacy IP we do not go through the pain in case
IP_HDRINCL was not set. People should bind(2) for that.

This will, for example, allow ping(|6) -S to work correctly for
non-primary addresses.

Reported by: (ten 211.ru)
Tested by: (ten 211.ru)
MFC after: 4 days

14 years agoMake sure IPv6 source address selection does not change interface
bz [Tue, 27 Apr 2010 15:05:03 +0000 (15:05 +0000)]
Make sure IPv6 source address selection does not change interface
addresses while walking the IPv6 address list if in the jail case
something is connecting to ::1.

Reported by: Pieter de Boer (pieter thedarkside.nl)
Tested by: Pieter de Boer (pieter thedarkside.nl)
MFC after: 4 days

14 years agoFix a regression where DVMRP diagnostic traffic, such as that used
bms [Tue, 27 Apr 2010 14:14:21 +0000 (14:14 +0000)]
Fix a regression where DVMRP diagnostic traffic, such as that used
by mrinfo and mtrace, was dropped by the IGMP TTL check. IGMP control
traffic must always have a TTL of 1.

Submitted by: Matthew Luckie
MFC after: 3 days

14 years agoStyle: use #define<TAB> instead of #define<SPACE>.
kib [Tue, 27 Apr 2010 09:48:43 +0000 (09:48 +0000)]
Style: use #define<TAB> instead of #define<SPACE>.

Noted by: bde, pluknet gmail com
MFC after: 11 days

14 years agoProvide 32bit compat for SIOCGDEFIFACE_IN6.
kib [Tue, 27 Apr 2010 09:47:14 +0000 (09:47 +0000)]
Provide 32bit compat for SIOCGDEFIFACE_IN6.

Based on submission by: pluknet gmail com
Reviewed by: emaste
MFC after: 2 weeks

14 years agoRequire the option that's mapped be listed in the options file. This
imp [Tue, 27 Apr 2010 06:14:30 +0000 (06:14 +0000)]
Require the option that's mapped be listed in the options file.  This
will allow people with old config options to either have it just work
(if config is new enough), or get a version error (if their config is
about 7.0 or newer) rather than getting a cryptic error about
duplicated options in the options file, or getting an error about an
unknown option, at which point they'd update their config file only to
learn they need a new config, only to learn they didn't really need to
update their config file...  All this because our version checking was
in the wrong place for the past decade...

# hopefully this is the last change, and we'll be able to config with an
# 8.0 GENERIC file on stable/8 after I merge this change and add the
# compat options.

MFC after: 3 days

14 years agoRedo how we add compat options so as to be compatible with old
imp [Tue, 27 Apr 2010 05:38:26 +0000 (05:38 +0000)]
Redo how we add compat options so as to be compatible with old
versions of config.  Remove support for the syntax OLD = NEW form the
options file, and instead have a new file $S/conf/options-compat.
This file will be parsed as OLD NEW on each line.  Bump version of
config.  Since nothing in -current ever used this, there's no hazards
for current users, so I'm not bumping the version in the
Makefiles.$MACHINE.  No need, really, for this version bump in
-current, but this was introduced into -stable before I realized the
version check was ineffective there, so the verison bump doesn't hurt
here and keeps the two branches in sync, versionwise, after the MFC.

MFC after: 3 days

14 years agoMFi386 r207205
alc [Tue, 27 Apr 2010 05:35:35 +0000 (05:35 +0000)]
MFi386 r207205
  Clearing a page table entry's accessed bit (PG_A) and setting the
  page's PG_REFERENCED flag in pmap_protect() can't really be justified,
  so don't do it.

14 years agoMove checking the version up from Makefile generation to just after
imp [Tue, 27 Apr 2010 05:04:32 +0000 (05:04 +0000)]
Move checking the version up from Makefile generation to just after
we've parsed the config file.  Makefile generation is too late if
we've introduce changes to the syntax of the metafiles to warn about
version skew, since we have to try to parse them and we get an parse
error that's rather baffling to the user rather than a 'your config is
too old, upgrade' which we should get.

We have to defer doing it until after we've read the user's config
file because we define machinename there.  The version required to
compile the kernel is encoded in Makefile.machinename.  There's no
real reason for this to be the case, but changing it now would
introduce some logistical issues that I'd rather avoid for the moment.
I intend to revisit this if we're still using config in FreeBSD 10.

This also means that we cannot introduce any config metafile changes
that result in a syntax error or other error for the user until 9.0 is
released.  Otherwise, we break the upgrade path, or at least reduce
the usefulness of the error messages we generate.

# This implies that the config file option mapping will need to be redone.

MFC after: 3 days

14 years agoIt seems ale(4) controllers do not like to see TCP payload in the
yongari [Mon, 26 Apr 2010 21:08:15 +0000 (21:08 +0000)]
It seems ale(4) controllers do not like to see TCP payload in the
first descriptor in TSO case. Otherwise controller can generate bad
frames during TSO. To address it, make sure to pull up ethernet +
IP + TCP header with options in first buffer. Also ensure the
buffer length of the first descriptor for TSO covers entire ethernet
+ IP + TCP with options and setup additional Tx descriptor if the
first buffer includes TCP payload.

Tested by: Amar Takhar <verm <> darkbeer dot org >
MFC after: 1 week

14 years agoDon't bother enabling interrupts before we're ready to handle them. This
marius [Mon, 26 Apr 2010 20:19:49 +0000 (20:19 +0000)]
Don't bother enabling interrupts before we're ready to handle them. This
prevents the firmware of Fujitsu Siemens PRIMEPOWER250, which both causes
stray interrupts and erroneously enables interrupts at least when calling
SUNW,set-trap-table, in the foot.

14 years agoAdd a signal handler for SIGINT which removes output file when necessary.
delphij [Mon, 26 Apr 2010 20:05:48 +0000 (20:05 +0000)]
Add a signal handler for SIGINT which removes output file when necessary.

While I'm there, move unlink_input() slightly down to after closing the
output file, in uncompression path.

MFC after: 2 weeks

14 years agoAdd OF_getscsinitid(), a helper similar to OF_getetheraddr() but for
marius [Mon, 26 Apr 2010 19:13:10 +0000 (19:13 +0000)]
Add OF_getscsinitid(), a helper similar to OF_getetheraddr() but for
obtaining the initiator ID to be used for SPI controllers from the
Open Firmware device tree.

14 years agoFor the on-board interfaces found in Fujitsu SPARC64 machines obtain the
marius [Mon, 26 Apr 2010 18:56:06 +0000 (18:56 +0000)]
For the on-board interfaces found in Fujitsu SPARC64 machines obtain the
MAC address via OFW as well.

14 years ago- Add a missing const.
marius [Mon, 26 Apr 2010 18:49:06 +0000 (18:49 +0000)]
- Add a missing const.
- Map the NS16550 found in Fujitsu Siemens PRIMEPOWER250 to PNP0501 as well.

14 years agoSkip the pseudo-devices found in Fujitsu Siemens PRIMEPOWER250.
marius [Mon, 26 Apr 2010 18:44:30 +0000 (18:44 +0000)]
Skip the pseudo-devices found in Fujitsu Siemens PRIMEPOWER250.

14 years agoBetter handling of ipv6_default_interface using
ume [Mon, 26 Apr 2010 15:31:58 +0000 (15:31 +0000)]
Better handling of ipv6_default_interface using
net.inet6.ip6.use_defaultzone=1.  Now, it works IPv6 link-local
unicast addresses as well as IPv6 link-local multicast addresses.

MFC after: 1 week

14 years ago- Rework the underlying ALQ storage to be a circular buffer, which amongst other
lstewart [Mon, 26 Apr 2010 13:48:22 +0000 (13:48 +0000)]
- Rework the underlying ALQ storage to be a circular buffer, which amongst other
  things allows variable length messages to be easily supported.

- Extend KPI with alq_writen() and alq_getn() to support variable length
  messages, which is enabled at ALQ creation time depending on the
  arguments passed to alq_open(). Also add variants of alq_open() and
  alq_post() that accept a flags argument. The KPI is still fully
  backwards compatible and shouldn't require any change in ALQ consumers
  unless they wish to utilise the new features.

- Introduce the ALQ_NOACTIVATE and ALQ_ORDERED flags to allow ALQ consumers
  to have more control over IO scheduling and resource acquisition
  respectively.

- Strengthen invariants checking.

- Document ALQ changes in ALQ(9) man page.

Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jeff, rpaulo, rwatson
MFC after: 1 month

14 years agoMFp4:
mav [Mon, 26 Apr 2010 12:03:55 +0000 (12:03 +0000)]
MFp4:
Move PI_TAG_ABLE check from ada driver to ATA XPT.

14 years agoMark ATA channel as idle on timeout in non-ATA_CAM mode.
mav [Mon, 26 Apr 2010 11:58:15 +0000 (11:58 +0000)]
Mark ATA channel as idle on timeout in non-ATA_CAM mode.
This should fix possible duplicate request completion.

Submitted by: mjacob

14 years agomissed pv access before pmap lock
kmacy [Sun, 25 Apr 2010 23:51:05 +0000 (23:51 +0000)]
missed pv access before pmap lock

14 years agoIncremental reduction of delta with head_page_lock_2 branch
kmacy [Sun, 25 Apr 2010 23:18:02 +0000 (23:18 +0000)]
Incremental reduction of delta with head_page_lock_2 branch

- replace modification of pmap resident_count with pmap_resident_count_{inc,dec}
- the pv list is protected by the pmap lock, but in several cases we are relying
  on the vm page queue mutex, move pv_va read under the pmap lock

14 years agoSet USB_DEBUG like the other platforms, I had turned it off to test the build
thompsa [Sun, 25 Apr 2010 22:01:32 +0000 (22:01 +0000)]
Set USB_DEBUG like the other platforms, I had turned it off to test the build
before committing r207077.

Spotted by: marius

14 years agosh: Use stalloc for arith variable names.
jilles [Sun, 25 Apr 2010 20:43:19 +0000 (20:43 +0000)]
sh: Use stalloc for arith variable names.

This is simpler than the custom memory tracker I added earlier, and is also
needed by the dash arith code I plan to import.

14 years agoClearing a page table entry's accessed bit (PG_A) and setting the
alc [Sun, 25 Apr 2010 20:40:45 +0000 (20:40 +0000)]
Clearing a page table entry's accessed bit (PG_A) and setting the
page's PG_REFERENCED flag in pmap_protect() can't really be justified.
In contrast to pmap_remove() or pmap_remove_all(), the mapping is not
being destroyed, so the notion that the page was accessed is not lost.
Moreover, clearing the page table entry's accessed bit and setting the
page's PG_REFERENCED flag can throw off the page daemon's activity
count calculation.  Finally, in my tests, I found that 15% of the
atomic memory operations being performed by pmap_protect() were only
to clear PG_A, and not change protection.  This could, by itself, be
fixed, but I don't see the point given the above argument.

Remove a comment from pmap_protect_pde() that is no longer meaningful
after the above change.

14 years agoSending a FWDTSN chunk should not affect the retran count.
tuexen [Sun, 25 Apr 2010 19:00:37 +0000 (19:00 +0000)]
Sending a FWDTSN chunk should not affect the retran count.

MFC after: 3 days.

14 years agoMake hash, type and ulimit available via execve().
jilles [Sun, 25 Apr 2010 17:38:53 +0000 (17:38 +0000)]
Make hash, type and ulimit available via execve().

These are specified by POSIX but are not special builtins, and therefore
need to be available via execve() and utilities like time, nohup, xargs.
(Note that hash was moved from the XSI option to the base in the 2008
standard.)

Like most of the POSIX "regular builtin commands", these need to be executed
in a shell environment for full functionality, although they may still be of
some use outside one.

Unlike the POSIX special and regular builtin commands, POSIX does not
require these to be found before a PATH search, although that could be an
oversight.

Like some of the utilities already provided by usr.bin/alias, these may lead
to confusing results when invoked from csh(1).

14 years agoProvide compat32 shims for bpf(4), except zero-copy facilities.
kib [Sun, 25 Apr 2010 16:43:41 +0000 (16:43 +0000)]
Provide compat32 shims for bpf(4), except zero-copy facilities.

bd_compat32 field of struct bpf_d is kept unconditionally to not
impose the requirement of including "opt_compat.h" on all numerous
users of bpfdesc.h.

Submitted by: jhb (version for 6.x)
Reviewed and tested by: emaste
MFC after: 2 weeks

14 years agoProvide 32bit compat shims for sysctl net.route NET_RT_IFLIST.
kib [Sun, 25 Apr 2010 16:42:47 +0000 (16:42 +0000)]
Provide 32bit compat shims for sysctl net.route NET_RT_IFLIST.
This allows getifaddrs(3) to work for compat32 binaries.

Submitted by: jhb (6.x version)
Reviewed by: emaste
Tested by: emaste and <pluknet gmail com>
MFC after: 2 weeks

14 years agoUndo my lastest fix since that wasn't one at all.
tuexen [Sun, 25 Apr 2010 15:04:57 +0000 (15:04 +0000)]
Undo my lastest fix since that wasn't one at all.

MFC after: 3 days.

14 years agounlinkat(2): unlinkat(AT_REMOVEDIR) fails with ENOTEMPTY like rmdir()
jilles [Sun, 25 Apr 2010 13:55:52 +0000 (13:55 +0000)]
unlinkat(2): unlinkat(AT_REMOVEDIR) fails with ENOTEMPTY like rmdir()
for non-empty directories.

POSIX permits both ENOTEMPTY and EEXIST, but we use the clearer ENOTEMPTY,
following BSD tradition.

MFC after: 1 week

14 years agosymlink(7): Add lpathconf(2) and *at system calls.
jilles [Sun, 25 Apr 2010 13:29:59 +0000 (13:29 +0000)]
symlink(7): Add lpathconf(2) and *at system calls.

MFC after: 1 week

14 years agosymlink(7): The ownership of symlinks is used by the system,
jilles [Sun, 25 Apr 2010 13:13:23 +0000 (13:13 +0000)]
symlink(7): The ownership of symlinks is used by the system,
in at least three ways, so do not say it is ignored:
* who may delete/rename a symlink in a sticky directory
* who may do lchflags(2)/lchown(2)/lchmod(2)
* whose inode quota is charged

MFC after: 1 week

14 years agokvm(3): Mention that some of the functions use sysctl(3) instead of kmem.
jilles [Sun, 25 Apr 2010 12:50:30 +0000 (12:50 +0000)]
kvm(3): Mention that some of the functions use sysctl(3) instead of kmem.

Additionally, because of sysctl(3) use (which is generally good), behaviour
for crash dumps differs slightly from behaviour for live kernels and this
will probably never be fixed entirely, so weaken that claim.

MFC after: 1 week

14 years agosysctl(3): Update description of various kern.* variables.
jilles [Sun, 25 Apr 2010 12:35:39 +0000 (12:35 +0000)]
sysctl(3): Update description of various kern.* variables.
Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3)
(which is a more convenient way to access some of the variables).

PR: 116480
MFC after: 1 week

14 years agoRe-calculate a geometry when reprobing as well.
marcel [Sun, 25 Apr 2010 01:56:39 +0000 (01:56 +0000)]
Re-calculate a geometry when reprobing as well.

PR: kern/145452
Reported by: "Andrey V. Elsukov" <bu7cher@yandex.ru>

14 years agoFix undo for schemes that have internal partitions. Internal partitions
marcel [Sun, 25 Apr 2010 00:54:11 +0000 (00:54 +0000)]
Fix undo for schemes that have internal partitions. Internal partitions
do not constitute user-visible or active partitions and as such should
not prevent undoing pending operations.

While here, initialize the last usable sector for the placeholder geom
based on the null scheme, created to allow undoing the destruction of
a scheme. This gives consistent output with "gpart show".

Based on a patch from: "Andrey V. Elsukov" <bu7cher@yandex.ru>

14 years agoifp->if_ipackets++ when RX packet interrupts are occurred.
weongyo [Sat, 24 Apr 2010 23:32:24 +0000 (23:32 +0000)]
ifp->if_ipackets++ when RX packet interrupts are occurred.

MFC after: 3 days

14 years agoAn NFSv4 server will reply NFSERR_GRACE for non-recovery RPCs
rmacklem [Sat, 24 Apr 2010 22:52:14 +0000 (22:52 +0000)]
An NFSv4 server will reply NFSERR_GRACE for non-recovery RPCs
during the grace period after startup. This grace period must
be at least the lease duration, which is typically 1-2 minutes.
It seems prudent for the experimental NFS client to wait a few
seconds before retrying such an RPC, so that the server isn't
flooded with non-recovery RPCs during recovery. This patch adds
an argument to nfs_catnap() to implement a 5 second delay
for this case.

MFC after: 1 week

14 years agobuiltin(1): Add missing escaping for !, . and : in the table.
jilles [Sat, 24 Apr 2010 22:24:26 +0000 (22:24 +0000)]
builtin(1): Add missing escaping for !, . and : in the table.

This caused these commands to look differently (not bold) from the other
commands in the table (bold).

MFC after: 1 week

14 years agobuiltin(1): Mention [ sh builtin.
jilles [Sat, 24 Apr 2010 22:16:01 +0000 (22:16 +0000)]
builtin(1): Mention [ sh builtin.

MFC after: 1 week

14 years ago- fix style issues on i386 as well
kmacy [Sat, 24 Apr 2010 21:36:52 +0000 (21:36 +0000)]
- fix style issues on i386 as well

requested by: alc@

14 years agoapply style(9) changes applied to head_page_lock_2
kmacy [Sat, 24 Apr 2010 21:17:07 +0000 (21:17 +0000)]
apply style(9) changes applied to head_page_lock_2

requested by: kib@

14 years agoremove vm obect tracker that slipped in from prior work.
rnoland [Sat, 24 Apr 2010 18:13:12 +0000 (18:13 +0000)]
remove vm obect tracker that slipped in from prior work.

MFC after: 2 weeks

14 years agoResurrect pmap_is_referenced() and use it in mincore(). Essentially,
alc [Sat, 24 Apr 2010 17:32:52 +0000 (17:32 +0000)]
Resurrect pmap_is_referenced() and use it in mincore().  Essentially,
pmap_ts_referenced() is not always appropriate for checking whether or
not pages have been referenced because it clears any reference bits
that it encounters.  For example, in mincore(), clearing the reference
bits has two negative consequences.  First, it throws off the activity
count calculations performed by the page daemon.  Specifically, a page
on which mincore() has called pmap_ts_referenced() looks less active
to the page daemon than it should.  Consequently, the page could be
deactivated prematurely by the page daemon.  Arguably, this problem
could be fixed by having mincore() duplicate the activity count
calculation on the page.  However, there is a second problem for which
that is not a solution.  In order to clear a reference on a 4KB page,
it may be necessary to demote a 2/4MB page mapping.  Thus, a mincore()
by one process can have the side effect of demoting a superpage
mapping within another process!

14 years agoFix some sorting and whitespace nits.
marius [Sat, 24 Apr 2010 16:27:43 +0000 (16:27 +0000)]
Fix some sorting and whitespace nits.

14 years agostat: Allow -f %Sf to display the file flags symbolically.
jilles [Sat, 24 Apr 2010 13:53:12 +0000 (13:53 +0000)]
stat: Allow -f %Sf to display the file flags symbolically.

I have changed the patch slightly to show '-' if there are no flags just
like ls -ldo does.

PR: 124349
Submitted by: Ighighi
MFC after: 1 week

14 years agoMove the constants specifying the size of struct kinfo_proc into
kib [Sat, 24 Apr 2010 12:49:52 +0000 (12:49 +0000)]
Move the constants specifying the size of struct kinfo_proc into
machine-specific header files. Add KINFO_PROC32_SIZE for struct
kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add
CTASSERT for the size of struct kinfo_proc32.

Submitted by: pluknet
Reviewed by: imp, jhb, nwhitehorn
MFC after: 2 weeks

14 years agoAdd a TestFloat based test suite for floating-point implementations
marius [Sat, 24 Apr 2010 12:11:41 +0000 (12:11 +0000)]
Add a TestFloat based test suite for floating-point implementations
currently supporting sparc64. After a `make depend all` there are
three programs; testsoftfloat for testing against the SoftFloat in
src/lib/libc/softfloat for reference purposes, testemufloat for
testing the emulator source in src/lib/libc/sparc64/fpu and testfloat
for testing with the installed libc. Support for other architectures
can be added as needed.

PR: 144900
Submitted by: Peter Jeremy

14 years ago - Temporarily lower WARNS until I fix alignment warnings on sparc64.
jeff [Sat, 24 Apr 2010 07:59:45 +0000 (07:59 +0000)]
 - Temporarily lower WARNS until I fix alignment warnings on sparc64.

Reported by: Florian Smeets

14 years agosuj.c seems to contain two versions of the code.
pjd [Sat, 24 Apr 2010 07:58:59 +0000 (07:58 +0000)]
suj.c seems to contain two versions of the code.
Remove the one that doesn't compile.

14 years agoProtect fsck.h from being included twice.
pjd [Sat, 24 Apr 2010 07:54:49 +0000 (07:54 +0000)]
Protect fsck.h from being included twice.

14 years agoFix build for UFS without SOFTUPDATES.
pjd [Sat, 24 Apr 2010 07:36:33 +0000 (07:36 +0000)]
Fix build for UFS without SOFTUPDATES.

14 years ago - Merge soft-updates journaling from projects/suj/head into head. This
jeff [Sat, 24 Apr 2010 07:05:35 +0000 (07:05 +0000)]
 - Merge soft-updates journaling from projects/suj/head into head.  This
   brings in support for an optional intent log which eliminates the need
   for background fsck on unclean shutdown.

Sponsored by:   iXsystems, Yahoo!, and Juniper.
With help from: McKusick and Peter Holm

14 years agoMost MIPS systems have a comparatively-sparse physical memory layout. Switch
jmallett [Sat, 24 Apr 2010 03:11:35 +0000 (03:11 +0000)]
Most MIPS systems have a comparatively-sparse physical memory layout.  Switch
to using the sparse physseg layout in the VM system.

14 years agoAdjust a test case and make it more jump optimization neutral for JIT case.
jkim [Fri, 23 Apr 2010 22:42:49 +0000 (22:42 +0000)]
Adjust a test case and make it more jump optimization neutral for JIT case.

14 years agoBuild some nops into CLEAR_STATUS here to make sure that the following
jmallett [Fri, 23 Apr 2010 19:48:31 +0000 (19:48 +0000)]
Build some nops into CLEAR_STATUS here to make sure that the following
instructions can't be interrupted.

14 years agoo) Remove default MAXMEM on SWARM; pmap can readily use lmem for >512M
jmallett [Fri, 23 Apr 2010 19:20:56 +0000 (19:20 +0000)]
o) Remove default MAXMEM on SWARM; pmap can readily use lmem for >512M
   physical addresses.
o) Set a local maxmem in sb_machdep.c to avoid trying to use pages over 2^64
   under 32-bit ABIs.  Our pmap needs corrected to use vm_paddr_t consistently,
   then we can make vm_paddr_t 64-bit under 32-bit ABIs and add code in pmap
   to limit phys_avail by the maximum PFN that a 32-bit PTE can hold.

14 years agoLarge memory mappings are always CPU local and always done with interrupts
jmallett [Fri, 23 Apr 2010 18:53:17 +0000 (18:53 +0000)]
Large memory mappings are always CPU local and always done with interrupts
disabled.  Be doubly-sure that we don't try to do a TLB shootdown on SMP
systems for those mappings.

Submitted by: C. Jayachandran

14 years agosh: Add some more tests for ${v#...} and ${v%...}.
jilles [Fri, 23 Apr 2010 17:26:49 +0000 (17:26 +0000)]
sh: Add some more tests for ${v#...} and ${v%...}.

These pass on stable/8 as well.

14 years agoAddress some WITNESS panics that occur when using the via driver.
rnoland [Fri, 23 Apr 2010 14:48:30 +0000 (14:48 +0000)]
Address some WITNESS panics that occur when using the via driver.

Some of these cases should be safe in a non-atomic fashion, however
since all of the driver ioctls are locked, a lot of work is required to
fix it correctly.  Just don't sleep now.

MFC after: 2 weeks

14 years agoRemove one zero from the double-0.
bz [Fri, 23 Apr 2010 14:32:58 +0000 (14:32 +0000)]
Remove one zero from the double-0.
This code doesn't have a license to kill.

MFC after: 3 days

14 years ago- Take libinstall.a out of pkg_install and make it a proper shared library.
flz [Fri, 23 Apr 2010 11:07:43 +0000 (11:07 +0000)]
- Take libinstall.a out of pkg_install and make it a proper shared library.
- Rework the wrapper support to check libpkg version as well as pkg_install
version.
- Add libfetch to _prebuild_libs.
- There are no new features introduced.

Notes: the API is not stable, so basically, do not use libpkg in your
projects for now. Also there's no manpage for libpkg yet, because the API
will change drastically. I repeat, do not use libpkg for now.

14 years ago* Fix compilation when using SCTP_AUDITING_ENABLED.
tuexen [Fri, 23 Apr 2010 08:19:47 +0000 (08:19 +0000)]
* Fix compilation when using SCTP_AUDITING_ENABLED.
* Fix delaying of SACK by taking out old optimization code
  which does not optimize anymore.
* Fix fast retransmission of chunks abandoned by the
  "number of retransmissions" policy.

MFC after: 3 days.

14 years agoAdd and describe GEOM_PART_EBR.
marcel [Fri, 23 Apr 2010 03:37:39 +0000 (03:37 +0000)]
Add and describe GEOM_PART_EBR.

14 years agoImplement the resize command for resizing partitions. Without new
marcel [Fri, 23 Apr 2010 03:14:04 +0000 (03:14 +0000)]
Implement the resize command for resizing partitions. Without new
size, the partition in question is resized to fill all available
space. Quality work by Andrey!

Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru>

14 years agoImplement the resize verb and add support for resizing partitions
marcel [Fri, 23 Apr 2010 03:11:39 +0000 (03:11 +0000)]
Implement the resize verb and add support for resizing partitions
for all schemes but EBR. Quality work by Andrey!

Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru>

14 years agoFix compilation error.
neel [Fri, 23 Apr 2010 01:34:01 +0000 (01:34 +0000)]
Fix compilation error.

tick.c:298:5: error: "KDTRACE_HOOKS" is not defined

14 years agoWhen the experimental NFS client is handling an NFSv4 server reboot
rmacklem [Thu, 22 Apr 2010 23:51:01 +0000 (23:51 +0000)]
When the experimental NFS client is handling an NFSv4 server reboot
with delegations enabled, the recovery could fail if the renew
thread is trying to return a delegation, since it will not do the
recovery. This patch fixes the above by having nfscl_recalldeleg()
fail with the I/O operations returning EIO, so that they will be
attempted later. Most of the patch consists of adding an argument
to various functions to indicate the delegation recall case where
this needs to be done.

MFC after: 1 week

14 years agoIf a conditional jump instruction has the same jt and jf, do not perform
jkim [Thu, 22 Apr 2010 23:47:19 +0000 (23:47 +0000)]
If a conditional jump instruction has the same jt and jf, do not perform
the test and jump unconditionally.

14 years agoUse a more obvious prefix for the USB control (endpoint 0) transfers rather
thompsa [Thu, 22 Apr 2010 22:15:08 +0000 (22:15 +0000)]
Use a more obvious prefix for the USB control (endpoint 0) transfers rather
than default_*.

14 years agoProperly name the sxlocks, mutexes and condvars.
thompsa [Thu, 22 Apr 2010 22:00:16 +0000 (22:00 +0000)]
Properly name the sxlocks, mutexes and condvars.

14 years agoUse SX_DUPOK rather than making the string unique.
thompsa [Thu, 22 Apr 2010 21:41:50 +0000 (21:41 +0000)]
Use SX_DUPOK rather than making the string unique.

14 years agoChange USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
thompsa [Thu, 22 Apr 2010 21:31:34 +0000 (21:31 +0000)]
Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
the illusion of a tunable setting but was always turned on regardless.

MFC after: 1 week

14 years agoDocument the new USB notification types.
thompsa [Thu, 22 Apr 2010 20:46:39 +0000 (20:46 +0000)]
Document the new USB notification types.

14 years agoIntialize interrupt moderation control register. The magic value
yongari [Thu, 22 Apr 2010 20:25:07 +0000 (20:25 +0000)]
Intialize interrupt moderation control register. The magic value
was chosen by lots of trial and errors. The chosen value shows
good interrupt moderation without additional latency.
Without this change, controller can generate more than 140k
interrupts per second under high network load.

Submitted by: xclin <xclin <> cs dot nctu dot edu dot tw >

14 years agoFix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.
pjd [Thu, 22 Apr 2010 19:18:10 +0000 (19:18 +0000)]
Fix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.

Reported by: Andrei V. Lavreniyuk <andy.lavr@reactor-xg.kiev.ua>
MFC after: 3 days

14 years agoNow that we properly set write-combining on the pages that back the GART,
rnoland [Thu, 22 Apr 2010 18:47:30 +0000 (18:47 +0000)]
Now that we properly set write-combining on the pages that back the GART,
disable snooping on radeons.

MFC after: 2 weeks

14 years agoAllow to modify directory's content even if the ZFS_NOUNLINK (SF_NOUNLINK,
pjd [Thu, 22 Apr 2010 18:47:23 +0000 (18:47 +0000)]
Allow to modify directory's content even if the ZFS_NOUNLINK (SF_NOUNLINK,
sunlnk) flag is set. We only deny dirctory's removal or rename.

PR: kern/143343
Reported by: marck
MFC after: 3 days

14 years agore-write scatter gather memory allocation yet again...
rnoland [Thu, 22 Apr 2010 18:44:23 +0000 (18:44 +0000)]
re-write scatter gather memory allocation yet again...

This time, abandon the use of busdma and start interacting with the VM
system directly.  Make use of the new kmem_alloc_attr() which allows us
to easily allocate non-contiguous pages to back the GART table.  This
should help a lot when starting or restarting X after the system has
been running for a while and memory has become fragmented.

MFC after: 2 weeks

14 years agoRework how drm maps are handled.
rnoland [Thu, 22 Apr 2010 18:21:25 +0000 (18:21 +0000)]
Rework how drm maps are handled.

 * On 32 bit platforms we steal the upper 4 bits of the map handle
   to store a unique map id.
 * On 64 bit platforms we steal the upper 24 bits.

Resolves issues where the offsets that are handed to mmap may overlap the VRAM on some cards.

Tested on: radeon, intel, mga, and via.

This will break nouveau.  I will spin new patches shortly.

14 years agoRemove explicit setting of NO_CTF in WMAKEENV and in the make call for
netchild [Thu, 22 Apr 2010 09:30:02 +0000 (09:30 +0000)]
Remove explicit setting of NO_CTF in WMAKEENV and in the make call for
the buildkernel. This way makeoptions WITH_CTF=yes not only works when
compiling the tradtitional way, but also when using buildkernel. This
does not enable the CTF part of the world, it still defaults to without
CTF info.

The cross/build-tools/bootstrap targets are not affected by this, they
still have and should keep the explicit NO_CTF.

Notified by: np

14 years agoDo the ctfmerge (= all symbols, not only symbols from one object file) for
netchild [Thu, 22 Apr 2010 09:24:01 +0000 (09:24 +0000)]
Do the ctfmerge (= all symbols, not only symbols from one object file) for
KLDs too.

Noticed by: np

14 years agoRevert r206179 (by imp) and do something similar which is more consistent
netchild [Thu, 22 Apr 2010 09:20:17 +0000 (09:20 +0000)]
Revert r206179 (by imp) and do something similar which is more consistent
with all other corresponding CTF places by changing the corresponding
code which is generated by config(8). Or in short, move the '@' from
the variable definition to the use of the variable. [1]

While I'm here break up a long line. [2]

Discussed with: imp [1,2], bde [2]

14 years agoAlso add the usb mode to the devd string as the usb controller can work in both
thompsa [Wed, 21 Apr 2010 23:03:26 +0000 (23:03 +0000)]
Also add the usb mode to the devd string as the usb controller can work in both
host or device (gadget) modes.

Suggested by: HPS

14 years agoln: Allow a trailing slash when creating a link to a directory.
jilles [Wed, 21 Apr 2010 21:57:03 +0000 (21:57 +0000)]
ln: Allow a trailing slash when creating a link to a directory.

In the 'ln source... directory' synopsis, the basename of each source
determines the name of the created link. Determine this using basename(3)
instead of strrchr(..., '/') which is incorrect if the pathname ends in a
slash.

The patch is somewhat changed to allow for basename(3) implementations that
change the passed pathname, and to fix the -w option's checking also.
The code to compare directory entries only applies to hard links, which
cannot be created to directories using ln.

Example:
  ln -s /etc/defaults/ /tmp
This should create a symlink named defaults.

PR: 121568
Submitted by: Ighighi
MFC after: 1 week

14 years agoChange usb devd events from fake attach to a notify. The ugen device is not a
thompsa [Wed, 21 Apr 2010 21:51:14 +0000 (21:51 +0000)]
Change usb devd events from fake attach to a notify. The ugen device is not a
proper device_t so it faked the devctl event to appear like one, this is now a
notify which allows more information to be passed.

We notify for both the device attach/detach and for each usb interface. A devd
rule can now match on the interface properties, including composite devices
which may have a uvideo interface and also usound and possibly uhid too.

An example to match a umass device with a scsi subclass and BBB protocol would be

notify 100 {
match "system"          "USB";
match "subsystem"       "INTERFACE";
match "type"            "ATTACH";
match "intclass"        "0x08";
match "intsubclass"     "0x06";
match "intprotocol"     "0x50";
action ...
};

The old attach devctl event has been retained for the moment to make merging to
8.1 easier. This was never compatible with 7.x or earlier due to the ugen regex
change needed.

Reviewed by: warner
MFC after: 1 week

14 years agoFix of r206904, \nanchie is needed instead of \anchie.
anchie [Wed, 21 Apr 2010 20:05:49 +0000 (20:05 +0000)]
Fix of r206904, \nanchie is needed instead of \anchie.

Approved by: bz (mentor)
Reported by: danfe, zec

14 years agoFix typo.
kib [Wed, 21 Apr 2010 20:04:42 +0000 (20:04 +0000)]
Fix typo.

Submitted by: emaste
Pointy hat to: kib (who needs much bigger wardrobe)
MFC after: 1 week

14 years agoC language does not has references, it provides pointers.
kib [Wed, 21 Apr 2010 19:35:56 +0000 (19:35 +0000)]
C language does not has references, it provides pointers.

Suggested by: bde
MFC after: 2 weeks

14 years agoProvide compat32 shims for kinfo_proc sysctl. This allows 32bit ps(1) to
kib [Wed, 21 Apr 2010 19:32:00 +0000 (19:32 +0000)]
Provide compat32 shims for kinfo_proc sysctl. This allows 32bit ps(1) to
mostly work on 64bit host.

The work is based on an original patch submitted by emaste, obtained
from Sandvine's source tree.

Reviewed by: jhb
MFC after: 1 week

14 years agoExtract the code to copy-out struct rusage32 from struct rusage
kib [Wed, 21 Apr 2010 19:28:01 +0000 (19:28 +0000)]
Extract the code to copy-out struct rusage32 from struct rusage
into the new function.

Reviewed by: jhb
MFC after: 1 week