]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

14 years agoRemove the reference to DD mode, and replace with Expert mode. Also, make
brucec [Wed, 21 Apr 2010 19:03:34 +0000 (19:03 +0000)]
Remove the reference to DD mode, and replace with Expert mode. Also, make
sure the "Q = Finish" text is visible.
Reword the boot manager screen to try and avoid confusion, and make the
order of the menu items match that in sysinstall.

PR: bin/142916
Submitted by: Jeremy Chadwick <freebsd at jdc.parodius.com>
Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 week

14 years agoMake the "Q = Finish" text visible when running sysinstall as a normal
brucec [Wed, 21 Apr 2010 18:55:44 +0000 (18:55 +0000)]
Make the "Q = Finish" text visible when running sysinstall as a normal
application.  Reword the boot manager screen to try and avoid confusion.

Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 week

14 years agoUse correct bus_dma_tag_t for TX frames.
bschmidt [Wed, 21 Apr 2010 17:38:16 +0000 (17:38 +0000)]
Use correct bus_dma_tag_t for TX frames.

Reported by: Andreas Nilsson <andrnils at gmail.com>
Approved by: rpaulo (mentor)
MFC after: 3 days

14 years agoAdd standards section, improve wording, taking into account the handling
kib [Wed, 21 Apr 2010 16:41:02 +0000 (16:41 +0000)]
Add standards section, improve wording, taking into account the handling
of NULL and changed type in declaration.

Suggested by: bde
MFC after: 2 weeks

14 years agoMove realpath(3) prototype to a POSIX section.
kib [Wed, 21 Apr 2010 16:38:37 +0000 (16:38 +0000)]
Move realpath(3) prototype to a POSIX section.

Noted by: bde
MFC after: 2 weeks

14 years agoindent.pro example: actually install the sample file
avg [Wed, 21 Apr 2010 12:17:01 +0000 (12:17 +0000)]
indent.pro example: actually install the sample file

14 years agoFix bug introduced in r198317: Don't leak a file descriptor after scanning for networ...
randi [Wed, 21 Apr 2010 12:02:45 +0000 (12:02 +0000)]
Fix bug introduced in r198317: Don't leak a file descriptor after scanning for network devices.

Approved by: cperciva (mentor)
MFC after: 1 week (original commit + bugfix)

14 years agoApply threshold filter to root node in calltree view.
fabient [Wed, 21 Apr 2010 11:50:13 +0000 (11:50 +0000)]
Apply threshold filter to root node in calltree view.

MFC after: 3days

14 years agoComply with the new cyclic dtrace module variable name
rpaulo [Wed, 21 Apr 2010 11:28:13 +0000 (11:28 +0000)]
Comply with the new cyclic dtrace module variable name
(cyclic_clock_func).

14 years agoAs was done in r155238 for i386 and in r155239 for amd64, clear the carry
kib [Wed, 21 Apr 2010 11:17:16 +0000 (11:17 +0000)]
As was done in r155238 for i386 and in r155239 for amd64, clear the carry
flag for ia32 binary executed on amd64 host in get_mcontext().

PR: kern/92110 (one more time)
Reported by: stas
MFC after: 1 week

14 years agoAvoid memory access after free. Use the (shortend) copy for the
bz [Wed, 21 Apr 2010 10:21:34 +0000 (10:21 +0000)]
Avoid memory access after free.  Use the (shortend) copy for the
ipsec mtu lookup as well.

PR: kern/145736
Submitted by: Peter Molnar (peter molnar.cc)
MFC after: 3 days

14 years agoAdd myself to committers-src.dot.
randi [Wed, 21 Apr 2010 08:18:06 +0000 (08:18 +0000)]
Add myself to committers-src.dot.

Approved by: cperciva (mentor)

14 years agoWhen CPUTYPE is defined to any value, on amd64 platform "mmx" is
delphij [Wed, 21 Apr 2010 01:13:08 +0000 (01:13 +0000)]
When CPUTYPE is defined to any value, on amd64 platform "mmx" is
available through MACHINE_CPU, indicating the CPU supports that
feature, as done by revision 138685.

This changeset adds "mmx" into the default amd64 MACHINE_CPU list
when no CPUTYPE is specified to provide consistent behavior.

PR: amd64/145593
Submitted by: mm
MFC after: 2 weeks

14 years agoMerge @176820, @176822, @177156 to tcpp from P4 to HEAD:
rwatson [Wed, 21 Apr 2010 00:52:55 +0000 (00:52 +0000)]
Merge @176820, @176822, @177156 to tcpp from P4 to HEAD:

  Improve accuracy of connection data transfer math.

  Disable Nagle's algorithm to avoid delaying transfers of data --
  will want to refine this to combine payload with header transfer,
  however.

  Now that we're running w/o Nagle, try to send the initial data
  burst with the header in a single TCP segment.

  Prefer %zu to %ju for size_t.

MFC after: 1 week
Sponsored by: Juniper, Inc.

14 years agoadd new committer rstone to committers-src.dot
rstone [Tue, 20 Apr 2010 22:43:53 +0000 (22:43 +0000)]
add new committer rstone to committers-src.dot

14 years agoMFV: zlib 1.2.5.
delphij [Tue, 20 Apr 2010 21:14:30 +0000 (21:14 +0000)]
MFV: zlib 1.2.5.

14 years agoFix another instance of lapic_cyclic_clock_func.
rpaulo [Tue, 20 Apr 2010 21:04:57 +0000 (21:04 +0000)]
Fix another instance of lapic_cyclic_clock_func.

14 years agoMake sure that we free the passed in data message if we don't actually
imp [Tue, 20 Apr 2010 20:39:42 +0000 (20:39 +0000)]
Make sure that we free the passed in data message if we don't actually
insert it onto the queue.  Also, fix a mtx leak if someone turns off
devctl while we're processing a messages.

MFC after: 5 days

14 years agoBump minor version of config to reflect the new option remapping
imp [Tue, 20 Apr 2010 20:36:38 +0000 (20:36 +0000)]
Bump minor version of config to reflect the new option remapping
feature.  The kernel makefiles have specifically not been bumped
because nothing uses this new feature and doing so forces everybody to
recompile for no good reason.  This chnage will be MFC'd where the
kernel version numbers for amd64 and ia64 will be bumped, since those
are the only two that have use the option remapping feature.  Once
merged, this will give a better error message to folks that are using
buildkernel without buildworld or kernel-toolchain to update their
kernels.

MFC after: 3 days

14 years agoIt's not necessary to reset the chip every time an input overflow event
brucec [Tue, 20 Apr 2010 19:30:12 +0000 (19:30 +0000)]
It's not necessary to reset the chip every time an input overflow event
occurs. In addition, the delay when programming the short cable fix
should be 100us, not 100ms.

PR: kern/64556
Submitted by: Thomas Hurst <tom at hur.st>
Approved by: rrs (mentor)
MFC after: 1 week

14 years agoAdd myself and list bz@ as my mentor.
anchie [Tue, 20 Apr 2010 18:16:56 +0000 (18:16 +0000)]
Add myself and list bz@ as my mentor.

Approved by: bz (mentor)

14 years agoMake this file more C++ friendly.
imp [Tue, 20 Apr 2010 17:57:43 +0000 (17:57 +0000)]
Make this file more C++ friendly.

14 years agoAdd the necessary hooks for dtrace cyclic module.
rpaulo [Tue, 20 Apr 2010 17:22:20 +0000 (17:22 +0000)]
Add the necessary hooks for dtrace cyclic module.

14 years agoRename the cyclic global variable lapic_cyclic_clock_func to just
rpaulo [Tue, 20 Apr 2010 17:03:30 +0000 (17:03 +0000)]
Rename the cyclic global variable lapic_cyclic_clock_func to just
cyclic_clock_func. This will make more sense when we start developing non
x86 cyclic version.

14 years agoThe amd64 version of the cyclic dtrace module is a verbatim copy of the
rpaulo [Tue, 20 Apr 2010 16:30:17 +0000 (16:30 +0000)]
The amd64 version of the cyclic dtrace module is a verbatim copy of the
i386 version, so instead having a copy of the same file, use Makefile
foo to include the i386 version on amd64.

14 years agoFree() is not allowed to modify errno, remove safety brackets around it [1].
kib [Tue, 20 Apr 2010 14:22:29 +0000 (14:22 +0000)]
Free() is not allowed to modify errno, remove safety brackets around it [1].
Add small optimization, do not copy a string to the buffer that is
to be freed immediately after.

Noted by: jh [1]
Reviewed by: jh
MFC after: 2 weeks

14 years agoFix compilation in the !SMP case.
attilio [Tue, 20 Apr 2010 12:22:06 +0000 (12:22 +0000)]
Fix compilation in the !SMP case.
Keep the interrupts disabled in order to avoid preemption problems.

Reported by: tinderbox, b.f. <bf1783 at googlemail dot com>
MFC: 2 weeks
X-MFC: r206878

14 years agoRemove svn:executable prop.
rpaulo [Tue, 20 Apr 2010 10:42:08 +0000 (10:42 +0000)]
Remove svn:executable prop.

14 years agoThe cache_enter(9) function shall not be called for doomed dvp.
kib [Tue, 20 Apr 2010 10:19:27 +0000 (10:19 +0000)]
The cache_enter(9) function shall not be called for doomed dvp.
Assert this.

In the reported panic, vdestroy() fired the assertion "vp has namecache
for ..", because pseudofs may end up doing cache_enter() with reclaimed
dvp, after dotdot lookup temporary unlocked dvp.
Similar problem exists in ufs_lookup() for "." lookup, when vnode
lock needs to be upgraded.

Verify that dvp is not reclaimed before calling cache_enter().

Reported and tested by: pho
Reviewed by: kan
MFC after: 2 weeks

14 years agoSlightly modernize realpath(3).
kib [Tue, 20 Apr 2010 10:16:44 +0000 (10:16 +0000)]
Slightly modernize realpath(3).

SUSv4 requires that implementation returns EINVAL if supplied path is NULL,
and ENOENT if path is empty string [1].
Bring prototype in conformance with SUSv4, adding restrict keywords.
Allow the resolved path buffer pointer be NULL, in which case realpath(3)
allocates storage with malloc().

PR: kern/121897 [1]
MFC after: 2 weeks

14 years agoUpdate highest_tsn variables when sliding mapping arrays.
tuexen [Tue, 20 Apr 2010 08:51:21 +0000 (08:51 +0000)]
Update highest_tsn variables when sliding mapping arrays.

14 years agoReally print the nr_mapping array when it should be printed.`
tuexen [Tue, 20 Apr 2010 08:50:19 +0000 (08:50 +0000)]
Really print the nr_mapping array when it should be printed.`

MFC after: 3 days.

14 years agoo Add do-not-fragment option support to ping6(8).
maxim [Tue, 20 Apr 2010 06:10:05 +0000 (06:10 +0000)]
o Add do-not-fragment option support to ping6(8).

PR: bin/145759
Submitted by: pluknet
MFC after: 1 month

14 years agoEliminate an unnecessary call to pmap_remove_all(). If a page belongs to
alc [Tue, 20 Apr 2010 04:16:39 +0000 (04:16 +0000)]
Eliminate an unnecessary call to pmap_remove_all().  If a page belongs to
an object whose reference count is zero, then that page cannot possibly
be mapped.

14 years agoAdd gpart and glabel to the release CD mfsroot. Even if sysinstall
nwhitehorn [Tue, 20 Apr 2010 01:12:23 +0000 (01:12 +0000)]
Add gpart and glabel to the release CD mfsroot. Even if sysinstall
cannot partition disks on powerpc, this will allow the user to.

PR: powerpc/93203
Obtained from: ia64
MFC after: 1 week

14 years agoFor the experimental NFS client doing an NFSv4 mount,
rmacklem [Tue, 20 Apr 2010 01:02:39 +0000 (01:02 +0000)]
For the experimental NFS client doing an NFSv4 mount,
set the NFSCLFLAGS_RECVRINPROG while doing recovery from an expired
lease in a manner similar to r206818 for server reboot recovery.
This will prevent the function that acquires stateids for I/O
operations from acquiring out of date stateids during recovery.
Also, fix up mutex locking on the nfsc_flags field.

MFC after: 1 week

14 years agogetblk lockmgr is mostly used as a msleep() and may lead too easilly to
attilio [Mon, 19 Apr 2010 23:40:46 +0000 (23:40 +0000)]
getblk lockmgr is mostly used as a msleep() and may lead too easilly to
false positives.
Whitelist it.

Reported by: Erik Cederstrand <erik at cederstrand dot dk>

14 years agoFix a deadlock in the shutdown code:
attilio [Mon, 19 Apr 2010 23:27:54 +0000 (23:27 +0000)]
Fix a deadlock in the shutdown code:
When performing a smp_rendezvous() or more likely, on amd64 and i386,
a smp_tlb_shootdown() the caller will end up with the smp_ipi_mtx
spinlock held, busy-waiting for other CPUs to acknowledge the operation.
As long as CPUs are suspended (via cpu_reset()) between the active mask
read and IPI sending there can be a deadlock where the caller will wait
forever for a dead CPU to acknowledge the operation.
Please note that on CPU0 that is going to be someway heavier because of
the spinlocks being disabled earlier than quitting the machine.

Fix this bug by calling cpu_reset() with the smp_ipi_mtx held.
Note that it is very likely that a saner offline/online CPUs mechanism
will help heavilly in fixing similar cases as it is likely more bugs
of this type may arise in the future.

Reported by: rwatson
Discussed with: jhb
Tested by: rnoland, Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>
MFC: 2 weeks

Special deciation to: anyone who made possible to have 16-ways machines
in Netperf

14 years agoWith r206844, CSUM_TCP is also set for CSUM_TSO case. Modify
yongari [Mon, 19 Apr 2010 22:10:40 +0000 (22:10 +0000)]
With r206844, CSUM_TCP is also set for CSUM_TSO case. Modify
drivers to take into account for the change. Basically CSUM_TSO
should be checked before checking CSUM_TCP.

14 years agoMFV of tzdata2010i, r206865
edwin [Mon, 19 Apr 2010 20:59:39 +0000 (20:59 +0000)]
MFV of tzdata2010i, r206865

- Marocco does have DST this year between May and August.
- Historical data for Taiwan
- Argentina / San Luis does not do DST this year.

14 years agoFix ddb(4) "show geom addr" command when INVARIANTS is enabled. Don't
jh [Mon, 19 Apr 2010 20:07:35 +0000 (20:07 +0000)]
Fix ddb(4) "show geom addr" command when INVARIANTS is enabled. Don't
assert that the topology lock is held when g_valid_obj() is called from
debugger.

MFC after: 1 week

14 years agoDump the AR_PHY_TURBO register on the AR5416. This register holds 11n
rpaulo [Mon, 19 Apr 2010 17:16:23 +0000 (17:16 +0000)]
Dump the AR_PHY_TURBO register on the AR5416. This register holds 11n
configurations.

Sponsored by: iXsystems, inc.

14 years agofix 64-bit build
luigi [Mon, 19 Apr 2010 16:35:47 +0000 (16:35 +0000)]
fix 64-bit build

Reported by: Robert Noland

14 years agowhitespace fixes (trailing whitespace, bad indentation
luigi [Mon, 19 Apr 2010 16:17:30 +0000 (16:17 +0000)]
whitespace fixes (trailing whitespace, bad indentation
after a merge, etc.)

14 years agoDon't clear other flags (e.g. CSUM_TCP) when setting CSUM_TSO. This was
ken [Mon, 19 Apr 2010 15:15:36 +0000 (15:15 +0000)]
Don't clear other flags (e.g. CSUM_TCP) when setting CSUM_TSO.  This was
causing TSO to break for the Xen netfront driver.

Reviewed by: gibbs, rwatson
MFC after: 7 days

14 years agoSlightly different handling of printf/snprintf for unaligned uint64_t,
luigi [Mon, 19 Apr 2010 15:11:45 +0000 (15:11 +0000)]
Slightly different handling of printf/snprintf for unaligned uint64_t,
which should improve readability, and also to ease the port to
platforms that do not support %llu

MFC after: 3 days

14 years agoFix brokenness in top on big-endian 32-bit systems introduced when
nwhitehorn [Mon, 19 Apr 2010 14:34:44 +0000 (14:34 +0000)]
Fix brokenness in top on big-endian 32-bit systems introduced when
changing format_k2 to take a long long. Because itoa is defined as a K&R
C function, without prototyping its arguments, format_k2 passed a 64-bit
value, but itoa() received only the first word, showing '0' in all memory
fields.

14 years agoGet delayed SACK working again.
tuexen [Mon, 19 Apr 2010 14:15:58 +0000 (14:15 +0000)]
Get delayed SACK working again.

MFC after: 3 days.

14 years agoRevert r206755. It causes some laptops to stop booting.
rpaulo [Mon, 19 Apr 2010 14:07:33 +0000 (14:07 +0000)]
Revert r206755. It causes some laptops to stop booting.

14 years agoPartially MFp4 #176265 by pjd@:
delphij [Mon, 19 Apr 2010 09:03:36 +0000 (09:03 +0000)]
Partially MFp4 #176265 by pjd@:

 - Properly initialize and destroy system_taskq.
 - Add a dummy implementation of taskq_create_proc().

Note: We do not currently use system_taskq in ZFS so this is mostly a
no-op at this time.  Proper system_taskq initialization is required
by newer ZFS code.

Ok'ed by: pjd
MFC after: 2 weeks

14 years agoFix MALTA64 build.
jmallett [Mon, 19 Apr 2010 09:03:34 +0000 (09:03 +0000)]
Fix MALTA64 build.

14 years agoRemove unused file.
jmallett [Mon, 19 Apr 2010 07:51:57 +0000 (07:51 +0000)]
Remove unused file.

14 years agoo) Eliminate the "stand" frame and its use. Use CALLFRAME_* everywhere.
jmallett [Mon, 19 Apr 2010 07:34:26 +0000 (07:34 +0000)]
o) Eliminate the "stand" frame and its use.  Use CALLFRAME_* everywhere.
o) Use <machine/asm.h> macros for register-width, etc., rather than doing it
   by hand in a few more assembly files.
o) Reduce diffs between various bits of TLB refill code in exception.S and
   between interrupt processing code.
o) Use PTR_* to operate on registers that are pointers (e.g. sp).
o) Add and use a macro, CLEAR_PTE_SWBITS rather than using the
   mysteriously-named WIRED_SHIFT to select bits to truncate when loading PTEs.
o) Don't doubly disable interrupts by moving zero to the status register,
   especially since that has the nasty side-effect of taking us out of 64-bit
   mode.
o) Use CLEAR_STATUS to disable interrupts the first time.
o) Keep SR_PX set as well as SR_[KSU]X when doing exception processing.  This
   is the bit that determines whether 64-bit operations are allowed.
o) Don't enable interrupts until configure_final(), like most other ports.

14 years agoo) Fix XKPHYS physical address extraction. Also define cache coherency
jmallett [Mon, 19 Apr 2010 06:01:58 +0000 (06:01 +0000)]
o) Fix XKPHYS physical address extraction.  Also define cache coherency
   attributes for XKPHYS.
o) Make coprocessor 0 accessor function macros for register+selector registers
   take the full name so that e.g. (as done in this commit), prid selector 1
   can be written through mips_wr_ebase() rather than mips_wr_prid1().
o) Allow for sign extension of 32-bit segment addresses.
o) Remove an unused MIPS-I register number.

14 years agovm_thread_swapout() can safely dirty the page before rather than after
alc [Mon, 19 Apr 2010 00:18:14 +0000 (00:18 +0000)]
vm_thread_swapout() can safely dirty the page before rather than after
acquiring the page queues lock.

14 years agoo) Add a VM find-space option, VMFS_TLB_ALIGNED_SPACE, which searches the
jmallett [Sun, 18 Apr 2010 22:32:07 +0000 (22:32 +0000)]
o) Add a VM find-space option, VMFS_TLB_ALIGNED_SPACE, which searches the
   address space for an address as aligned by the new pmap_align_tlb()
   function, which is for constraints imposed by the TLB. [1]
o) Add a kmem_alloc_nofault_space() function, which acts like
   kmem_alloc_nofault() but allows the caller to specify which find-space
   option to use. [1]
o) Use kmem_alloc_nofault_space() with VMFS_TLB_ALIGNED_SPACE to allocate the
   kernel stack address on MIPS. [1]
o) Make pmap_align_tlb() on MIPS align addresses so that they do not start on
   an odd boundary within the TLB, so that they are suitable for insertion as
   wired entries and do not have to share a TLB entry with another mapping,
   assuming they are appropriately-sized.
o) Eliminate md_realstack now that the kstack will be appropriately-aligned on
   MIPS.
o) Increase the number of guard pages to 2 so that we retain the proper
   alignment of the kstack address.

Reviewed by: [1] alc
X-MFC-after: Making sure alc has not come up with a better interface.

14 years agoAvoid extraneous recovery cycles in the experimental NFS client
rmacklem [Sun, 18 Apr 2010 22:21:23 +0000 (22:21 +0000)]
Avoid extraneous recovery cycles in the experimental NFS client
when an NFSv4 server reboots, by doing two things.
1 - Make the function that acquires a stateid for I/O operations
    block until recovery is complete, so that it doesn't acquire
    out of date stateids.
2 - Only allow a recovery once every 1/2 of a lease duration, since
    the NFSv4 server must provide a recovery grace period of at
    least a lease duration. This should avoid recoveries caused
    by an out of date stateid that was acquired for an I/O op.
    just before a recovery cycle started.

MFC after: 1 week

14 years agosh: Add testcases for double-quotes within quoted ${var+-...} (non-POSIX).
jilles [Sun, 18 Apr 2010 22:13:45 +0000 (22:13 +0000)]
sh: Add testcases for double-quotes within quoted ${var+-...} (non-POSIX).

POSIX leaves things like "${var+"word"}" undefined.
We follow traditional ash behaviour here.
Hence, these testcases also work on stable/8.

14 years agoRemove a nonsensical test from vm_pageout_clean(). A page can't be in the
alc [Sun, 18 Apr 2010 21:29:28 +0000 (21:29 +0000)]
Remove a nonsensical test from vm_pageout_clean().  A page can't be in the
inactive queue and have a non-zero wire count.

Reviewed by: kib
MFC after: 3 weeks

14 years agoDelete svn:executable prop.
rpaulo [Sun, 18 Apr 2010 18:43:36 +0000 (18:43 +0000)]
Delete svn:executable prop.

14 years agoRevert r206649.
kib [Sun, 18 Apr 2010 18:23:11 +0000 (18:23 +0000)]
Revert r206649.

Simplify the presented declaration of struct sigaction, noting the
caveat in the text. Real layout of the structure and exposed
implementation namespace only obfuscates the usage.

Submitted by: bde
MFC after: 3 days

14 years agoThere is no justification for vm_object_split() setting PG_REFERENCED on a
alc [Sun, 18 Apr 2010 17:50:09 +0000 (17:50 +0000)]
There is no justification for vm_object_split() setting PG_REFERENCED on a
page that it is going to sleep on.  Eliminate it.

MFC after: 3 weeks

14 years agoRestore previous order.
pjd [Sun, 18 Apr 2010 12:43:33 +0000 (12:43 +0000)]
Restore previous order.

14 years agoStyle fixes.
pjd [Sun, 18 Apr 2010 12:36:53 +0000 (12:36 +0000)]
Style fixes.

14 years agoAdd missing list and lock destruction.
pjd [Sun, 18 Apr 2010 12:27:07 +0000 (12:27 +0000)]
Add missing list and lock destruction.

14 years agoExtend locks scope to match OpenSolaris.
pjd [Sun, 18 Apr 2010 12:25:40 +0000 (12:25 +0000)]
Extend locks scope to match OpenSolaris.

14 years agoRemove racy assertion.
pjd [Sun, 18 Apr 2010 12:21:52 +0000 (12:21 +0000)]
Remove racy assertion.

Obtained from: OpenSolaris

14 years agoSet ARC_L2_WRITING on L2ARC header creation.
pjd [Sun, 18 Apr 2010 12:20:33 +0000 (12:20 +0000)]
Set ARC_L2_WRITING on L2ARC header creation.

Obtained from: OpenSolaris

14 years agoln: Refuse deleting a directory entry by hardlinking it to itself.
jilles [Sat, 17 Apr 2010 22:39:53 +0000 (22:39 +0000)]
ln: Refuse deleting a directory entry by hardlinking it to itself.

Two pathnames refer to the same directory entry iff the directories match
and the final components' names match.

Example: (assuming file1 is an existing file)
  ln -f file1 file1
This now fails while leaving file1 intact. It used to delete file1 and then
complain it cannot be linked because it is gone.

With -i, this error is detected before the question is asked.

MFC after: 2 weeks

14 years agoUse ubthidhci_enable="NO" to avoid the bootup warning.
rpaulo [Sat, 17 Apr 2010 21:31:42 +0000 (21:31 +0000)]
Use ubthidhci_enable="NO" to avoid the bootup warning.

Submitted by:  Jilles Tjoelker <jilles@stack.nl>
MFC after: 3 days

14 years agoIn vm_object_madvise() setting PG_REFERENCED on a page before sleeping on
alc [Sat, 17 Apr 2010 21:14:37 +0000 (21:14 +0000)]
In vm_object_madvise() setting PG_REFERENCED on a page before sleeping on
that page only makes sense if the advice is MADV_WILLNEED.  In that case,
the intention is to activate the page, so discouraging the page daemon
from reclaiming the page makes sense.  In contrast, in the other cases,
MADV_DONTNEED and MADV_FREE, it makes no sense whatsoever to discourage
the page daemon from reclaiming the page by setting PG_REFERENCED.

Wrap a nearby line.

Discussed with: kib
MFC after: 3 weeks

14 years agoIn case a user wants to configure only an IPv6 link-local address
dougb [Sat, 17 Apr 2010 18:48:18 +0000 (18:48 +0000)]
In case a user wants to configure only an IPv6 link-local address
add an example that shows how to do it.

14 years agoIn vm_object_backing_scan(), setting PG_REFERENCED on a page before
alc [Sat, 17 Apr 2010 18:35:07 +0000 (18:35 +0000)]
In vm_object_backing_scan(), setting PG_REFERENCED on a page before
sleeping on that page is nonsensical.  Doing so reduces the likelihood
that the page daemon will reclaim the page before the thread waiting in
vm_object_backing_scan() is reawakened.  However, it does not guarantee
that the page is not reclaimed, so vm_object_backing_scan() restarts
after reawakening.  More importantly, this muddles the meaning of
PG_REFERENCED.  There is no reason to believe that the caller of
vm_object_backing_scan() is going to use (i.e., access) the contents of
the page.  There is especially no reason to believe that an access is
more likely because vm_object_backing_scan() had to sleep on the page.

Discussed with: kib
MFC after: 3 weeks

14 years agoRemove IPW_LOCK_DECL and fix various LORs.
bschmidt [Sat, 17 Apr 2010 18:18:46 +0000 (18:18 +0000)]
Remove IPW_LOCK_DECL and fix various LORs.

Approved by: rpaulo (mentor)

14 years agoUse iv_appie_wpa, with this commit WPA works again.
bschmidt [Sat, 17 Apr 2010 18:17:25 +0000 (18:17 +0000)]
Use iv_appie_wpa, with this commit WPA works again.

Approved by: rpaulo (mentor)

14 years ago- Make ipw usable again by moving directly into ASSOC state.
bschmidt [Sat, 17 Apr 2010 18:16:14 +0000 (18:16 +0000)]
- Make ipw usable again by moving directly into ASSOC state.
- No need to manually switch to RUN state, assoc response takes care
  of that.

Approved by: rpaulo (mentor)

14 years agoPass correct RSSI to ieee80211_input*().
bschmidt [Sat, 17 Apr 2010 18:14:49 +0000 (18:14 +0000)]
Pass correct RSSI to ieee80211_input*().

Approved by: rpaulo (mentor)

14 years agoFix comment about ipw_assoc and remove some whitespaces; no functional
bschmidt [Sat, 17 Apr 2010 18:13:52 +0000 (18:13 +0000)]
Fix comment about ipw_assoc and remove some whitespaces; no functional
changes.

Approved by: rpaulo (mentor)

14 years agoSetting PG_REFERENCED on the requested page in swap_pager_getpages() is
alc [Sat, 17 Apr 2010 17:02:17 +0000 (17:02 +0000)]
Setting PG_REFERENCED on the requested page in swap_pager_getpages() is
either redundant or harmful, depending on the caller.  For example, when
called by vm_fault(), it is redundant.  However, when called by
vm_thread_swapin(), it is harmful.  Specifically, if the thread is later
swapped out, having PG_REFERENCED set on its stack pages leads the page
daemon to reactivate these stack pages and delay their reclamation.

Reviewed by: kib
MFC after: 3 weeks

14 years agogetcwd(3): Clarify that EACCES may or may not be checked.
jilles [Sat, 17 Apr 2010 15:52:50 +0000 (15:52 +0000)]
getcwd(3): Clarify that EACCES may or may not be checked.

POSIX permits but does not require checking access on the current and parent
directories.

Because various programs do not like it if getcwd(3) fails, it seems best
to avoid checking access as much as possible. There are various reports in
GNATS about this (search for getcwd).

Our getcwd(3) implementation first queries the kernel for the pathname
directly, which does not check any permissions but sometimes fails, and then
falls back to reading all parent directories for the names.

PR: standards/44425
MFC after: 2 weeks

14 years agosh: On startup of the shell, use PWD from the environment if it is valid.
jilles [Sat, 17 Apr 2010 14:35:46 +0000 (14:35 +0000)]
sh: On startup of the shell, use PWD from the environment if it is valid.
Unset PWD if it is incorrect and no value for it can be determined.
This preserves the logical current directory across shell invocations.

Example (assuming /home is a symlink):
$ cd
$ pwd
/home/foo
$ sh
$ pwd
/home/foo

Formerly the second pwd would show the physical path (symlinks resolved).

14 years agoFix a bug where SACKs are not sent when they should.
tuexen [Sat, 17 Apr 2010 12:22:44 +0000 (12:22 +0000)]
Fix a bug where SACKs are not sent when they should.
Move some protection code to INVARIANTS.
Cleanups.

MFC after: 3 days.

14 years agoAdd another ICH7M chipset that works.
rpaulo [Sat, 17 Apr 2010 11:40:39 +0000 (11:40 +0000)]
Add another ICH7M chipset that works.

MFC after: 1 week

14 years agoo) Make pcb_onfault a pointer rather than an obscure integer value.
jmallett [Sat, 17 Apr 2010 09:42:07 +0000 (09:42 +0000)]
o) Make pcb_onfault a pointer rather than an obscure integer value.
o) Mask off PAGE_MASK bits in pmap_update_page, etc., rather than modifying the
   badvaddr in trapframe.  Some nearby interfaces already did this.
o) Make PTEs "unsigned int" for now, not "unsigned long" -- we are only ready
   for them to be 32-bit on 64-bit platforms.
o) Rather than using pmap_segmap and calculating the offset into the page table
   by hand in trap.c, use pmap_pte().
o) Remove unused quad_syscall variable in trap.c.
o) Log things for illegal instructions like we do for bad page faults.
o) Various cast cleanups related to how to print registers.
o) When logging page faults, show the page table information not just for the
   program counter, but for the fault address.
o) Modify support.S to use ABI-neutral macros for operating on pointers.
o) Consistently use CALLFRAME_SIZ rather than STAND_FRAME_SIZE, etc.
o) Remove unused insque/remque functions.
o) Remove some coprocessor 0 accessor functions implemented in assembly that
   are unused and have inline assembly counterparts.

14 years agoo) Add NPDEPG, like NPTEPG but for PDEs.
jmallett [Sat, 17 Apr 2010 07:20:01 +0000 (07:20 +0000)]
o) Add NPDEPG, like NPTEPG but for PDEs.
o) Remove NBPG, PGOFSET and PGSHIFT.  Use the standard names.
o) Remove some unused macros and move things from param.h to vmparam.h that
   belong in the latter.  (Actually, all of the kernel segment values, virtual
   addresses, etc., belong in one place, but this is a step in the right
   direction.)