Commit Graph

154707 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
224329fb6b Style fixes. 2010-04-18 12:36:53 +00:00
Pawel Jakub Dawidek
eb998be67d Add missing list and lock destruction. 2010-04-18 12:27:07 +00:00
Pawel Jakub Dawidek
ad3cb80827 Extend locks scope to match OpenSolaris. 2010-04-18 12:25:40 +00:00
Pawel Jakub Dawidek
57a81a8bbc Remove racy assertion.
Obtained from:	OpenSolaris
2010-04-18 12:21:52 +00:00
Pawel Jakub Dawidek
5195ca2307 Set ARC_L2_WRITING on L2ARC header creation.
Obtained from:	OpenSolaris
2010-04-18 12:20:33 +00:00
Jilles Tjoelker
5d66b54e27 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
2010-04-17 22:39:53 +00:00
Rui Paulo
9eb448a7e6 Use ubthidhci_enable="NO" to avoid the bootup warning.
Submitted by: 	Jilles Tjoelker <jilles@stack.nl>
MFC after:	3 days
2010-04-17 21:31:42 +00:00
Alan Cox
b11b56b55b 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
2010-04-17 21:14:37 +00:00
Doug Barton
1a58736816 In case a user wants to configure only an IPv6 link-local address
add an example that shows how to do it.
2010-04-17 18:48:18 +00:00
Alan Cox
aefea7f519 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
2010-04-17 18:35:07 +00:00
Bernhard Schmidt
82ff07c047 Remove IPW_LOCK_DECL and fix various LORs.
Approved by:	rpaulo (mentor)
2010-04-17 18:18:46 +00:00
Bernhard Schmidt
6e4c30c9cd Use iv_appie_wpa, with this commit WPA works again.
Approved by:	rpaulo (mentor)
2010-04-17 18:17:25 +00:00
Bernhard Schmidt
557c25b48f - 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)
2010-04-17 18:16:14 +00:00
Bernhard Schmidt
892d2e9d9b Pass correct RSSI to ieee80211_input*().
Approved by:	rpaulo (mentor)
2010-04-17 18:14:49 +00:00
Bernhard Schmidt
d02ae91a4c Fix comment about ipw_assoc and remove some whitespaces; no functional
changes.

Approved by:	rpaulo (mentor)
2010-04-17 18:13:52 +00:00
Alan Cox
0b6ace4743 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
2010-04-17 17:02:17 +00:00
Jilles Tjoelker
702f62fb48 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
2010-04-17 15:52:50 +00:00
Jilles Tjoelker
8eac1f9477 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).
2010-04-17 14:35:46 +00:00
Michael Tuexen
37f144eb5d Fix a bug where SACKs are not sent when they should.
Move some protection code to INVARIANTS.
Cleanups.

MFC after: 3 days.
2010-04-17 12:22:44 +00:00
Rui Paulo
25eb6a7d87 Add another ICH7M chipset that works.
MFC after:	1 week
2010-04-17 11:40:39 +00:00
Juli Mallett
a27e66e8f5 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.
2010-04-17 09:42:07 +00:00
Juli Mallett
2ab78e3ca5 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.)
2010-04-17 07:20:01 +00:00
Juli Mallett
b6777295a6 o) Add SMP support for Octeon using U-Boot to launch all the processors at the
same time.
o) Remove some unused trivial uart functions from octeon_machdep now that the
   uart part is fully working and they are unused.
o) Use __func__ instead of __FUNCTION__.
o) Use intr_*() instead of other routines that do the same thing.
o) Remove some duplicate printfs from the Octeon port, as well as duplicate
   setting of Maxmem.
o) Use the right frequency divider on Octeon.
o) Use PCPU_GET(cpuid) consistently to get the cpuid of the running core.
o) Remove some unused macros in the Octeon port.
o) Use mips_sync() around use of the global dpcpu, whose value may not be
   visible to APs at first.
o) When loading the first thread's stack, use macros to make the code correct
   for n64 as well.
o) Remove stub, do-nothing FAU init/enable/disable functions from the RGMX
   driver.
2010-04-17 03:08:13 +00:00
Juli Mallett
a97a1ee3d9 o) Back out my previous change to SWARM; some of it was to address an issue
that turned out to be unrelated, and the rest was, as pointed out by Neel,
   just wrong-headed.
o) Tweak mem.c to fix use of /dev/kmem for direct-mapped addresses.
2010-04-17 01:49:50 +00:00
Juli Mallett
b92f01b79c o) Use inline functions to access coprocessor 0 registers rather than external
ones implemented using assembly.
o) Use TRAPF_USERMODE() consistently rather than USERMODE().  Eliminate
   <machine/psl.h> as a result.
o) Use intr_*() rather than *intr(), consistently.
o) Use register_t instead of u_int in some trap code.
o) Merge some more endian-related macros to machine/asm.h from NetBSD.
o) Add PTR_LI macro, which loads an address with the correct sign-extension for
   a pointer.
o) Restore interrupts when bailing out due to an excessive IRQ in
   nexus_setup_intr().
o) Remove unused functions from psraccess.S.
o) Enter temporary virtual entries for large memory access into the page tables
   rather than simply hoping they stay resident in the TLB and we don't need to
   do a refill for them.
o) Abstract out large memory mapping setup/teardown using some macros.
o) Do mips_dcache_wbinv_range() when using temporary virtual addresses just
   like we do when we can use the direct map.
2010-04-17 01:17:31 +00:00
Juli Mallett
e586cf9a28 o) Remove code related to VM_ALLOC_WIRED_TLB_PG_POOL, VM_KERNEL_ALLOC_OFFSET
and floating pages.  They are unused and unsupported.
2010-04-17 00:05:22 +00:00
Juli Mallett
2ae5ecf8a2 Adjust limits and formats for ABIs with 64-bit longs. 2010-04-16 23:54:56 +00:00
Juli Mallett
11484eb34f o) Use the direct map where possible for uiomove_fromphys, based on code from
sparc64.
o) Use uiomove_fromphys rather than the broken fpage mechanism for /dev/mem.
o) Update sf_buf allocator to not share buffers and to do a pmap_qremove when
   done with an sf_buf so as to better track valid mappings.
2010-04-16 23:48:28 +00:00
Juli Mallett
d0985cfb41 o) Fix the intr_* functions to not spam the whole status register, just the IE
bit.
o) Remove some unused inlines.
o) Generate CP0 access functions for 64-bit TLB registers when building for
   n64.
o) Add an inline function version of the COP0_SYNC macro.
2010-04-16 23:46:30 +00:00
Juli Mallett
4e859425ae Set KERNLOADADDR and TARGET_BIG_ENDIAN for SWARM. 2010-04-16 23:42:19 +00:00
Jilles Tjoelker
139ac6b239 fnmatch: Fix bad FNM_PERIOD disabling if an asterisk has been seen.
Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD)

PR:		116074
MFC after:	1 week
2010-04-16 22:29:24 +00:00
Jilles Tjoelker
bfbe51816a Add some tests for fnmatch(3).
MFC after:	1 week
2010-04-16 22:15:26 +00:00
Xin LI
0c5aed59ee Expose a few symbols as public interface rather than private.
Note: the *64 interfaces are no longer exposed via zlib.h but were keep
as public interfaces;

Note 2: this commit would break applications that uses the moved symbols
directly.
2010-04-16 20:07:24 +00:00
Xin LI
d413c90f0d MFV: libz 1.2.4.3. 2010-04-16 20:04:45 +00:00
Rui Paulo
7a246d0b14 Add ubthidhci.
MFC after:	2 days
2010-04-16 16:49:42 +00:00
Jack F Vogel
c99cdece4e Remove the tx queue selection based on the cpu whe
no flowid is present, this was causing some bad
reordering, now just use 0.

Also, add a few watchdog bits, and tx handler bits
that were corrected in igb.
2010-04-16 16:33:05 +00:00
Jaakko Heinonen
17f820725e Revert r206560. The change doesn't work correctly in all cases with
multiple devfs mounts.
2010-04-16 07:02:28 +00:00
Pawel Jakub Dawidek
20ec52dc4b Fix log size calculation which caused message truncation.
Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
2010-04-16 06:49:12 +00:00
Pawel Jakub Dawidek
09398e9bd4 Fix control socket leak when worker process exits.
Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
2010-04-16 06:47:29 +00:00
Juli Mallett
4076170459 Remove some unused header files. 2010-04-16 02:56:24 +00:00
Rick Macklem
0ac68bd339 Add mutex lock calls to 2 cases in the experimental NFS client's
renew thread where they were missing.

MFC after:	1 week
2010-04-15 23:56:05 +00:00
Xin LI
6856a5e345 Utilize IP_BINDANY which provided the same semantics of OpenBSD's
SO_BINDANY.
2010-04-15 23:21:24 +00:00
Rick Macklem
55909abf07 The experimental NFS client was not filling in recovery credentials
for opens done locally in the client when a delegation for the file
was held. This could cause the client to crash in crsetgroups() when
recovering from a server crash/reboot. This patch fills in the
recovery credentials for this case, in order to avoid the client crash.
Also, add KASSERT()s to the credential copy functions, to catch any
other cases where the credentials aren't filled in correctly.

MFC after:	1 week
2010-04-15 22:57:30 +00:00
Andriy Gapon
c27b391b3f indent(1): don't treat bare '_t' as a type name when -ta is used
It seems that identifier "_t" is sometimes used as a variable name,
even in our tree.  Not that I endorse that, but still it's better
to require at least one character before _t suffix to consider
an identifier to be a type name.

Reported by:	Alex Vasylenko <lxv@omut.org>
MFC after:	1 week
2010-04-15 21:41:07 +00:00
Doug Barton
d52bba9301 If a service is running, make 'stop' work even if ${name}_enable
is not set.

PR:		conf/130414
Submitted by:	Dominic Fandrey <kamikaze@bsdforen.de>
Reviewed by:	freebsd-rc@
2010-04-15 21:18:24 +00:00
Fabien Thomas
5d0848e9c6 - Fix a typo OFFCORE_REQUESTS.ANY.RFO is B0H10H and not 80H10H.
- Enable missing PARTIAL_ADDRESS_ALIAS for Core i7.

MFC after: 3 days
2010-04-15 19:45:03 +00:00
Xin LI
55e999851d Diff reduction with OpenBSD:
- Remove unused locally added variable;
 - Deprecate -o: it's the default behavior on OpenBSD.

X-MFC:	along with nc 4.7.
2010-04-15 19:15:05 +00:00
Pyun YongHyeon
c6491946d8 Fix include path. 2010-04-15 17:24:21 +00:00
Konstantin Belousov
3e22320c43 Fix typo.
MFC after:	3 days
2010-04-15 17:17:02 +00:00
Pawel Jakub Dawidek
20b77db949 Increase ggate queue size to maximum value.
HAST was not able to stand heavy random load.

Reported by:	Hiroyuki Yamagami
MFC after:	3 days
2010-04-15 17:04:08 +00:00