Commit Graph

161915 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
9201145d02 Use resolvconf(8) to update /etc/resolv.conf.
If you don't want to use resolvconf(8) to update /etc/resolv.conf,
you can put resolvconf_enable="NO" into /etc/dhclient-enter-hooks.
2011-03-18 12:23:20 +00:00
Hajimu UMEMOTO
b7f8411df2 Add resolvconf(8) which manages resolv.conf. 2011-03-18 12:18:52 +00:00
John Baldwin
8081bab70b Fix a few issues with HyperTransport devices and MSI interrupts:
- Always enable the HyperTransport MSI mapping window for HyperTransport
  to PCI bridges (these show up as HyperTransport slave devices).
  The mapping windows in PCI-PCI bridges are enabled by existing code
  in the PCI-PCI bridge driver as MSI requests propagate up the device
  tree, but Host-PCI bridges don't really show up in that tree.
- If the PCI device at domain 0 bus 0 slot 0 function 0 is not a
  HyperTransport device, then blacklist MSI on any other HT devices in
  the system.  Linux has a similar quirk.

PR:		kern/155442
Tested by:	Zack Dannar  zdannar of gmail
MFC after:	1 week
2011-03-18 12:13:04 +00:00
Hajimu UMEMOTO
587392a5a0 Import openresolv from vendor branch, actually.
Helped by:	jhb
2011-03-18 12:09:27 +00:00
Hajimu UMEMOTO
4db8409b61 Remove contrib/openresolv.
Helped by:	jhb
2011-03-18 12:07:53 +00:00
Hajimu UMEMOTO
8e56b8ee7b Import openresolv-3.4.1. 2011-03-18 10:35:54 +00:00
Sofian Brabez
f14368513d Add myself to calendar.freebsd.
Approved by:	miwi@ (mentor)
2011-03-18 09:06:06 +00:00
Sofian Brabez
b3a6a09643 Add an entry for myself to committers-ports.dot.
Approved by:	miwi@ (mentor)
2011-03-18 09:03:14 +00:00
Edward Tomasz Napierala
3fccbe4397 In vm_daemon(), when iterating over all processes in the system, skip those
which are not yet fully initialized (i.e. ones with p_state == PRS_NEW).
Without it, we could panic in _thread_lock_flags().

Note that there may be other instances of FOREACH_PROC_IN_SYSTEM() that
require similar fix.

Reported by:	pho, keramida
Discussed with:	kib
2011-03-18 06:47:23 +00:00
Glen Barber
224f83d2f8 Formatting fix.
Submitted by:	arundel (via doc@)
MFC after:	3 days
2011-03-17 22:17:56 +00:00
John Baldwin
b09e402ad0 Preserve errno in an error case.
Submitted by:	gcooper
2011-03-17 21:24:32 +00:00
Mikolaj Golub
8d7dcf14ff For secondary, set 2 * HAST_KEEPALIVE seconds timeout for incoming
connection so the worker will exit if it does not receive packets from
the primary during this interval.

Reported by:	Christian Vogt <Christian.Vogt@haw-hamburg.de>
Tested by:	Christian Vogt <Christian.Vogt@haw-hamburg.de>
Approved by:	pjd (mentor)
MFC after:	1 week
2011-03-17 21:02:14 +00:00
Andreas Tobler
1706df7cfa Remove duplicate definition of FIRSTARG.
Approved by:	nwhitehorn (mentor)
2011-03-17 19:44:00 +00:00
John Baldwin
100ec05ae5 Add more details to the 'show battery' command including more raw
capacity values, charge cycle count, temperature, and more detailed
status.

Reviewed by:	bz, emaste (older version)
MFC after:	1 week
2011-03-17 17:29:46 +00:00
Konstantin Belousov
a870bf2c31 Implement the usertime and systime keywords for ps, printing the
corresponding times reported by getrusage().

Submitted by:	Dan Nelson <dnelson allantgroup com>
MFC after:	1 week
2011-03-17 11:25:32 +00:00
Konstantin Belousov
ffda66c299 Remove the #if defined(FFS) || defined(IFS) braces around the calls to
ffs_snapgone(). ufs.ko module is not build with FFS define, causing
snapshot inode number slots in superblock never be freed, as well as a
reference on the snapshot vnode.

IFS was removed several years ago, and UFS/FFS separation was not
maintained for real.

Reported, analyzed and tested by:	Yamagi Burmeister <lists yamagi org>
MFC after:	3 days
2011-03-17 11:23:12 +00:00
Martin Matuska
19aad99109 Backport missing tunings for -march=core2:
- enable extra 80387 mathematical constants (ext_80387_constants) [1]
- enable compare and exchange 16 bytes (cmpxchg16b) [2]

Verified against llvm-gcc (and apple gcc)

Obtained from:	gcc-4.3 (ref. svn revs. 119260 [1], 121140 [2]; GPLv2)
MFC after:	2 weeks
2011-03-17 09:44:33 +00:00
Marcel Moolenaar
3166a207c5 When building libc with the syscall compatibility, don't also generate the
syscall assembly files. This results in conflicting dependencies and can
cause unexpected results for parallel builds. This is because the .c file
and the .S file both generate the same .o file.

Submitted by:	Simon Gerraty <sjg@juniper.net>
Sponsored by:	Juniper Networks
2011-03-17 04:40:37 +00:00
Marcel Moolenaar
a8d044f390 Don't add sigwait.c to MISRCS here when sigwait.c lives under ../sys and
it's already added to SRCS there.
2011-03-17 04:30:43 +00:00
Ed Maste
ea9827d3be Remove uptime validity check that hasn't been necessary since r151417
switched to clock_gettime.  vmstat will now not exit with an error
if run on a system with 10 years of uptime.
2011-03-17 01:05:54 +00:00
Jung-uk Kim
dcbce41eb0 Merge ACPICA 20110316. 2011-03-17 00:29:53 +00:00
Juli Mallett
e22b8a5a3b o) Set MAC addresses starting at the MAC base for all management ports, not
just the MR-730.
o) Start MAC addresses for the non-management ports after the management ports.

Submitted by:	Bhanu Prakash (with modifications)
2011-03-16 22:51:34 +00:00
Jung-uk Kim
4d8fe534b7 Import ACPICA 20110316. 2011-03-16 20:53:41 +00:00
Andrey V. Elsukov
b00a71345c The size of zfsboot2 grown up to 64 Kbytes in r219089.
Increase NSECT up to 128 sectors too.

Reviewed by:	jhb, pjd
2011-03-16 20:19:48 +00:00
Andrey V. Elsukov
fa3c0ecda2 Set control flags in putc(). This should fix zfsboot hangs in drvread().
PR:		kern/153552
Reviewed by:	jhb
MFC after:	1 week
2011-03-16 20:04:56 +00:00
Pyun YongHyeon
848a02fc41 Remove too expensive bus_dmamap_sync(9) call in dc_rx_resync().
With this change, driver may not notice updated descriptor status
change when bounce buffers are active. However, rxeof() in next run
will handle the synchronization.

Change dc_rxeof() a bit to return the number of processed frames in
RX descriptor ring. Previously it returned the number of frames
that were successfully passed to upper stack which in turn means it
ignored frames that were discarded due to errors. The number of
processed frames in RX descriptor ring is used to detect whether
driver is out of sync with controller's current descriptor pointer.
Returning number of processed frames reduces unnecessary (probably
wrong) re-synchronization.

Reviewed by:	marius
2011-03-16 17:09:51 +00:00
Jung-uk Kim
7ebbcb21ba Revert r219676.
Requested by:	jhb, bde
2011-03-16 16:44:08 +00:00
Ivan Voras
630db7f99b The hardware has caught up; improvements are now observed even at 128,
but stay conservative and bump read_max to "only" 64 (it will probably be
a good idea to increase this to 128 after the next major release).
2011-03-16 16:22:59 +00:00
Jung-uk Kim
2ffa4044e9 Rework r219679. Always check CPU class at run-time to make it predictable.
Unfortunately, it pulls in <machine/cputypes.h> but it is small enough and
namespace pollution is minimal, I hope.

Pointed out by:	bde
Pointy hat:	jkim
2011-03-16 16:09:08 +00:00
Martin Matuska
e98198cdbb Fix -march/-mtune=native autodetection for Intel Core 2 CPUs
Obtained from:	gcc 4.3 (partial rev. 119454; GPLv2)
MFC after:	2 weeks
2011-03-16 12:40:58 +00:00
Pawel Jakub Dawidek
681ff708cf From fts.c comment:
The "FTS_NOSTAT" option can avoid a lot of calls to stat(2) if it knows that a
directory could not possibly have subdirectories. This is decided by looking at
the link count: a subdirectory would increment its parent's link count by
virtue of its own ".." entry.  This assumption only holds for UFS-like
filesystems that implement links and directories this way, so we must punt for
others.

It looks like ZFS is a UFS-like file system, as the above also holds for ZFS.
Add ZFS to the list of file systems that allow for such optimization.

MFC after:	1 month
2011-03-16 08:58:09 +00:00
Juli Mallett
26de5f20cc o) Tear down receive interrupt on detach.
Submitted by:	Bhanu Prakash
2011-03-16 08:56:22 +00:00
Juli Mallett
64974004ec o) Clean up FPA pools on module unload.
o) Allocate output buffer pool based on available output queues.

Submitted by:	Bhanu Prakash (with modifications)
2011-03-16 08:51:36 +00:00
Juli Mallett
dea2d4206e o) Properly size caches and TLB on Octeon.
o) Make COP0_SYNC do nothing on Octeon, which is fully interlocked.

Submitted by:	Bhanu Prakash (with modifications)
2011-03-16 08:22:29 +00:00
Marcel Moolenaar
18d9407a9f MFaltix:
Add support for Pre-Boot Virtual Memory (PBVM) to the loader.

PBVM allows us to link the kernel at a fixed virtual address without
having to make any assumptions about the physical memory layout. On
the SGI Altix 350 for example, there's no usuable physical memory
below 192GB. Also, the PBVM allows us to control better where we're
going to physically load the kernel and its modules so that we can
make sure we load the kernel in memory that's close to the BSP.

The PBVM is managed by a simple page table. The minimum size of the
page table is 4KB (EFI page size) and the maximum is currently set
to 1MB. A page in the PBVM is 64KB, as that's the maximum alignment
one can specify in a linker script. The bottom line is that PBVM is
between 64KB and 8GB in size.

The loader maps the PBVM page table at a fixed virtual address and
using a single translations. The PBVM itself is also mapped using a
single translation for a maximum of 32MB.

While here, increase the heap in the EFI loader from 512KB to 2MB
and set the stage for supporting relocatable modules.
2011-03-16 03:53:18 +00:00
Edwin Groothuis
b6ef626a6c MFV of r219685, tzdata2011d
- Pacific/Apia will have DST on 2 April instead of 3 April in 2011.
- Turkye will go to DST on 28 April instead of 27 April in 2011.
- Cuba will go to DST on 20 April in 2011.

Obtained from:  ftp://elsie.nci.nih.gov/pub/
2011-03-16 03:28:42 +00:00
Edwin Groothuis
53e3683ae1 Vendor import of tzdata2011d:
- Pacific/Apia will have DST on 2 April instead of 3 April in 2011.
- Turkye will go to DST on 28 April instead of 27 April in 2011.
- Cuba will go to DST on 20 April in 2011.

Obtained from:	ftp://elsie.nci.nih.gov/pub/
2011-03-16 03:07:08 +00:00
Marcel Moolenaar
e4623c22fe Fix mv_gpio_in() for pin numbers that occupy bits 8-31 in GPIO registers.
The compiler will truncate the 32-bit return value of mv_gpio_value_get()
to match the 8-bit return value of mv_gpio_in(). A conditional expression
is used to have mv_gpio_in() always return 0 or 1 instead.
2011-03-16 00:42:15 +00:00
Marcel Moolenaar
e681e3cd56 Revert previous commit: EFI_STATUS is a 64-bit integral on ia64. Fix the
compile warning on i386 (where EFI_STATUS is a 32-bit integral) by casting
the status argument to u_long instead.

Pointy hat: brucec
MFC after: 3 days
2011-03-16 00:08:10 +00:00
Jilles Tjoelker
dd888c677b rfork(2): Discourage rfork_thread-like approaches.
Calling rfork_thread(3) does not interoperate with pthreads and global state
is not properly protected.

Remove the BUGS section suggesting LinuxThreads entirely. With the current
pthread library libthr, all threads are kernel-level entities so there seems
little reason to use LinuxThreads.
2011-03-15 23:51:47 +00:00
Marcel Moolenaar
155438b4bd Merge svn+ssh://svn.freebsd.org/base/head@219680 2011-03-15 23:28:15 +00:00
Jilles Tjoelker
0cf90cd1d3 bin: Prefer strrchr() to rindex().
This removes the last index/rindex usage from /bin.
2011-03-15 22:22:11 +00:00
Jung-uk Kim
1f5cdd5a99 Partially revert r219672. After r198295, kernel need to seed randomness as
soon as possible for stack protector.  However, dummy timecounter does not
have enough entropy and we don't need to sacrifice Pentium class and later.

Pointed out by:	Maxim Dounin (mdounin at mdounin dot ru)
2011-03-15 21:45:10 +00:00
Jung-uk Kim
a8f8643e3a Do not let machdep.tsc_freq modify tsc_freq itself. It is bad for i386 as
it does not operate atomically.  Actually, it serves no purpose.

Noticed by:	bde
2011-03-15 19:47:20 +00:00
Jung-uk Kim
b2b9331c44 Remove tsc_present from this file, really. 2011-03-15 18:09:29 +00:00
Jung-uk Kim
c26c38740d Fix a typo in the previous commit. AMD64 and Intel 64 are two brand names. 2011-03-15 17:59:30 +00:00
Jung-uk Kim
38b8542ca9 Deprecate tsc_present as the last of its real consumers finally disappeared. 2011-03-15 17:19:52 +00:00
Jung-uk Kim
d8ea2a492e Unconditionally use binuptime(9) for get_cyclecount(9) on i386. Since this
function is almost exclusively used for random harvesting, there is no need
for micro-optimization.  Adjust the manual page accordingly.
2011-03-15 17:14:26 +00:00
Marcel Moolenaar
23ca55ccf8 Reserve 24KB for the static kernel stack. We use this stack to call into
the firmware for physical mode calls and the Altix doesn't work when it's
16KB.
2011-03-15 16:50:17 +00:00
Pawel Jakub Dawidek
35daccccce Remove #include needed for debugging.
MFC after:	1 week
2011-03-15 13:53:39 +00:00