]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoFix brokenness introduced by my last commit.
adrian [Wed, 20 Jul 2011 00:36:47 +0000 (00:36 +0000)]
Fix brokenness introduced by my last commit.

Approved by: re (implicit)

13 years agoRemove explicit MAXCPU usage from sys/pcpu.h avoiding a namespace
attilio [Tue, 19 Jul 2011 16:50:55 +0000 (16:50 +0000)]
Remove explicit MAXCPU usage from sys/pcpu.h avoiding a namespace
pollution.  That is a step further in the direction of building correct
policies for userland and modules on how to deal with the number of
maxcpus at runtime.

Reported by: jhb
Reviewed and tested by: pluknet
Approved by: re (kib)

13 years agoThis sets the BSS channel for each VAP for the given interface.
adrian [Tue, 19 Jul 2011 15:24:44 +0000 (15:24 +0000)]
This sets the BSS channel for each VAP for the given interface.
It's only relevant in STA mode.

The CSA forces a channel switch for the interface, but doesn't update
the VAP channel.

Approved by: re (bz)

13 years agoThis patch enables listing DFS related flags when 'ifconfig -v wlanX
adrian [Tue, 19 Jul 2011 15:22:35 +0000 (15:22 +0000)]
This patch enables listing DFS related flags when 'ifconfig -v wlanX
list channel' is run. The following new options are introduced:

* D: channel requires DFS
* R: channel has a radar event
* I: channel has detected inteference
* C: the CAC period has completed on a channel that requires it (ie,
  DFS + PASSIVE.)

It's relevant for developing, debugging and using the DFS and
interference options.

Approved by: re (bz)

13 years agoRemove pc_name member of struct pcpu.
attilio [Tue, 19 Jul 2011 14:57:59 +0000 (14:57 +0000)]
Remove pc_name member of struct pcpu.
pc_name is only included when KTR option is and it does introduce a
subdle KBI breakage that totally breaks vmstat when world and kernel are
not in sync.
Besides, it is not used somewhere.

In collabouration with: pluknet
Reviewed by: jhb
Approved by: re (kib)

13 years agoBump MAXCPU for amd64, ia64 and XLP mips appropriately.
attilio [Tue, 19 Jul 2011 13:00:30 +0000 (13:00 +0000)]
Bump MAXCPU for amd64, ia64 and XLP mips appropriately.
From now on, default values for FreeBSD will be 64 maxiumum supported
CPUs on amd64 and ia64 and 128 for XLP. All the other architectures
seem already capped appropriately (with the exception of sparc64 which
needs further support on jalapeno flavour).

Bump __FreeBSD_version in order to reflect KBI/KPI brekage introduced
during the infrastructure cleanup for supporting MAXCPU > 32. This
covers cpumask_t retiral too.

The switch is considered completed at the present time, so for whatever
bug you may experience that is reconducible to that area, please report
immediately.

Requested by: marcel, jchandra
Tested by: pluknet, sbruno
Approved by: re (kib)

13 years agoOn 64 bit architectures size_t is 8 bytes, thus it should use an 8 bytes
attilio [Tue, 19 Jul 2011 12:41:57 +0000 (12:41 +0000)]
On 64 bit architectures size_t is 8 bytes, thus it should use an 8 bytes
storage.
Fix the sintrcnt/sintrnames specification.

No MFC is previewed for this patch.

Reported, reviewed and tested by: marcel
Approved by: re (kib)

13 years agoAdd the possibility to specify from kernel configs MAXCPU value.
attilio [Tue, 19 Jul 2011 00:37:24 +0000 (00:37 +0000)]
Add the possibility to specify from kernel configs MAXCPU value.
This patch is going to help in cases like mips flavours where you
want a more granular support on MAXCPU.

No MFC is previewed for this patch.

Tested by: pluknet
Approved by: re (kib)

13 years agoRework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'
jhb [Mon, 18 Jul 2011 21:15:47 +0000 (21:15 +0000)]
Rework the dynamic per-CPU stats code a bit.  Always set 'statics->ncpus'
to the maximum number of CPUs to ensure that lcpustates[] array is always
allocated to the maximum size.  Previously, if top was started without
per-CPU stats it would allocate a smaller lcpustates[] array.  When
per-CPU stats were then enabled, it would overflow the array and trash
the cpustates_columns[] array causing the CPU stats to be printed in the
wrong locations.

Approved by: re (kib)
MFC after: 1 week

13 years agoTweak the interactive description of CPU vs WCPU.
jhb [Mon, 18 Jul 2011 21:08:14 +0000 (21:08 +0000)]
Tweak the interactive description of CPU vs WCPU.

PR: bin/158819
Submitted by: arundel
Approved by: re (kib)

13 years agoConstantly print the command name and if set include the thread
bz [Mon, 18 Jul 2011 20:57:43 +0000 (20:57 +0000)]
Constantly print the command name and if set include the thread
name in per-thread mode.

Discussed with: jhb
Obtained from: Ed Maste at Sandvine Incorporated
Sponsored by: Sandvine Incorporated
MFC after: 1 week
Approved by: re (kib)

13 years agoFix building of 32-bit compat libraries on amd64 with clang, and using
dim [Mon, 18 Jul 2011 20:07:29 +0000 (20:07 +0000)]
Fix building of 32-bit compat libraries on amd64 with clang, and using
-g, by reverting r219139.  The LLVM PR referenced in that revision was
fixed in the mean time, and we imported a clang snapshot soon
afterwards, so the temporary workaround of disabling clang's integrated
assembler is no longer needed.

In this particular case, using e.g. DEBUG_FLAGS=-g causes clang to
output certain directives into assembly that our version of GNU as
chokes on.

Reported by: dougb
Approved by: re (kib)

13 years agoRename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
bz [Mon, 18 Jul 2011 20:06:15 +0000 (20:06 +0000)]
Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
Provide backward compatibility defines under BURN_BRIDGES.

Suggested by: jhb
Reviewed by: emaste
Sponsored by: Sandvine Incorporated
Approved by: re (kib)

13 years agosintrcnt/sintrnames is the address of the size, not the actual size.
pluknet [Mon, 18 Jul 2011 19:42:18 +0000 (19:42 +0000)]
sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size.
That fixes vmstat -i with kvm backend.

Submitted by: peter
Approved by: re (kib)

13 years agoDisable gvmat64.S, the assembler version of longest_match for now.
delphij [Mon, 18 Jul 2011 19:23:50 +0000 (19:23 +0000)]
Disable gvmat64.S, the assembler version of longest_match for now.

PR: kern/154073
MFC after: 3 days
Approved by: re (kib)

13 years ago- Export each thread's individual resource usage in in struct kinfo_proc's
jhb [Mon, 18 Jul 2011 17:33:08 +0000 (17:33 +0000)]
- Export each thread's individual resource usage in in struct kinfo_proc's
  ki_rusage member when KERN_PROC_INC_THREAD is passed to one of the
  process sysctls.
- Correctly account for the current thread's cputime in the thread when
  doing the runtime fixup in calcru().
- Use TIDs as the key to lookup the previous thread to compute IO stat
  deltas in IO mode in top when thread display is enabled.

Reviewed by: kib
Approved by: re (kib)

13 years ago- Remove the eintrcnt/eintrnames usage and introduce the concept of
attilio [Mon, 18 Jul 2011 15:19:40 +0000 (15:19 +0000)]
- Remove the eintrcnt/eintrnames usage and introduce the concept of
  sintrcnt/sintrnames which are symbols containing the size of the 2
  tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
  This area can be widely improved by applying the same to other
  architectures and likely finding an unified approach among them and
  move the whole code to be MI. More work in this area is expected to
  happen fairly soon.

No MFC is previewed for this patch.

Tested by: pluknet
Reviewed by: jhb
Approved by: re (kib)

13 years agoEnable NEW_PCIB by default on ia64.
jhb [Mon, 18 Jul 2011 14:05:14 +0000 (14:05 +0000)]
Enable NEW_PCIB by default on ia64.

Approved by: re (kib), marcel

13 years agoImplement bus_adjust_resource() for the ia64 nexus driver.
jhb [Mon, 18 Jul 2011 14:04:37 +0000 (14:04 +0000)]
Implement bus_adjust_resource() for the ia64 nexus driver.

Reviewed by: marcel
Approved by: re (kib)

13 years agoProvide ability to audit cap_rights_t arguments.
jonathan [Mon, 18 Jul 2011 12:58:18 +0000 (12:58 +0000)]
Provide ability to audit cap_rights_t arguments.

We wish to be able to audit capability rights arguments; this code
provides the necessary infrastructure.

This commit does not, of itself, turn on such auditing for any
system call; that should follow shortly.

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc

13 years agoOnly the USB root HUB thread is allowed to attach and detach drivers
hselasky [Mon, 18 Jul 2011 12:03:58 +0000 (12:03 +0000)]
Only the USB root HUB thread is allowed to attach and detach drivers
to and from USB devices. Remove related DEVMETHOD() lines from USB
drivers.

Reported by: YongHyeon PYUN
MFC after: 3 days

13 years agoIf compiling RESCUE always ignore feature_present(3) calls so that
bz [Mon, 18 Jul 2011 10:29:16 +0000 (10:29 +0000)]
If compiling RESCUE always ignore feature_present(3) calls so that
a /rescue/ifconfig more modern than the kernel could still configure
IPv4 or IPv6 addresses.

Reported by: Andrzej Tobola (ato iem.pw.edu.pl)
Reported by: gcooper
MFC after: 1 day
X-MFC: will not MFC any time soon, just reminder for r222527

13 years agoZFS tries to allocate blocks evenly across all devices. This means when
mm [Mon, 18 Jul 2011 08:29:49 +0000 (08:29 +0000)]
ZFS tries to allocate blocks evenly across all devices. This means when
devices are imbalanced zfs will lots of CPU searching for space on devices
which tend to be pretty full. It should instead fail quickly on the full
devices and move onto devices which have more availability.

New loader tunable: vfs.zfs.mg_alloc_failures (min = 8)

Illumos-gate changeset: 13379:4df42cc92254

Obtained from: Illumos (Bug #1051)
MFC after: 2 weeks

13 years agoThe named.reload script is no longer useful in the age of rc.d
dougb [Mon, 18 Jul 2011 08:10:49 +0000 (08:10 +0000)]
The named.reload script is no longer useful in the age of rc.d

13 years agoResurrect the ZFS "aclmode" property
mm [Mon, 18 Jul 2011 07:16:44 +0000 (07:16 +0000)]
Resurrect the ZFS "aclmode" property
Change default of "aclmode" to "discard".

Illumos-gate changeset: 13370:8c04143bd318

Obtained from: Illumos (Feature #742)
MFC after: 2 weeks

13 years agocddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
gibbs [Mon, 18 Jul 2011 03:18:06 +0000 (03:18 +0000)]
cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
cddl/contrib/opensolaris/cmd/zpool/zpool.8:
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c:
Add the "zpool labelclear" command.  This command can be
used to wipe the label data from a drive that is not
active in a pool.  The optional "-f" argument can be
used to treat an exported or foreign vdev as "inactive"
thus allowing its label information to be cleared.

13 years agoCorrect reporting of missing leaf vdevs so that the GUID required to
gibbs [Mon, 18 Jul 2011 03:00:59 +0000 (03:00 +0000)]
Correct reporting of missing leaf vdevs so that the GUID required to
perform pool actions is always displayed.

cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:
The "zpool status" command reports the "last seen at"
device node path when the vdev name is being reported
by GUID.  Augment this code to assume a GUID is reported
when a device goes missing after initial boot in addition
to the previous behavior of doing this for devices that
aren't seen at boot.

cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c:
In zpool_vdev_name(), report recently missing devices
by GUID.  There is no guarantee they will return at
their previous location.

13 years agocddl/contrib/opensolaris/lib/libzfs/common/libzfs.h:
gibbs [Mon, 18 Jul 2011 02:13:21 +0000 (02:13 +0000)]
cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h:
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c:
o Add zpool_pool_state_to_name() API to libzfs which converts a
  pool_state_t into a user consumable string.
o While here, correct constness of make zpool_state_to_name()
  and zpool_label_disk().

MFD after: 1 week

13 years agoDefine two new sysctl node flags: CTLFLAG_CAPRD and CTLFLAG_CAPRW, which
rwatson [Sun, 17 Jul 2011 23:05:24 +0000 (23:05 +0000)]
Define two new sysctl node flags: CTLFLAG_CAPRD and CTLFLAG_CAPRW, which
may be jointly referenced via the mask CTLFLAG_CAPRW.  Sysctls with these
flags are available in Capsicum's capability mode; other sysctl nodes are
not.

Flag several useful sysctls as available in capability mode, such as memory
layout sysctls required by the run-time linker and malloc(3).  Also expose
access to randomness and available kernel features.

A few sysctls are enabled to support name->MIB conversion; these may leak
information to capability mode by virtue of providing resolution on names
not flagged for access in capability mode.  This is, generally, not a huge
problem, but might be something to resolve in the future.  Flag these cases
with XXX comments.

Submitted by: jonathan
Sponsored by: Google, Inc.

13 years agoFix accidential commit part:
mm [Sun, 17 Jul 2011 21:57:10 +0000 (21:57 +0000)]
Fix accidential commit part:
Include "bsdtar_platform.h" instead of "lafe_platform.h"

MFC after: 2 weeks

13 years agoRevert r222135 by allowing controller reinitialization. Due to
yongari [Sun, 17 Jul 2011 21:54:51 +0000 (21:54 +0000)]
Revert r222135 by allowing controller reinitialization.  Due to
unknown reason Apple UniNorth2 gem(4) device required manual
interface down/up operation after r222135.  Even though this is not
correct thing and I don't like to revert it but it would be better
than breaking gem(4) on PPC.  This should be revisited.

PR: kern/157405

13 years agoFix a LOR between hwpmc and the kernel linker. When a system-wide
rstone [Sun, 17 Jul 2011 21:53:42 +0000 (21:53 +0000)]
Fix a LOR between hwpmc and the kernel linker.  When a system-wide
sampling mode PMC is allocated, hwpmc calls linker_hwpmc_list_objects()
while already holding an exclusive lock on pmc-sx lock.  list_objects()
tries to acquire an exclusive lock on the kld_sx lock.  When a KLD module
is loaded or unloaded successfully, kern_kld(un)load calls into the pmc
hook while already holding an exclusive lock on the kld_sx lock.  Calling
the pmc hook requires acquiring a shared lock on the pmc-sx lock.

Fix this by only acquiring a shared lock on the kld_sx lock in
linker_hwpmc_list_objects(), and also downgrading to a shared lock on the
kld_sx lock in kern_kld(un)load before calling into the pmc hook.  In
kern_kldload this required moving some modifications of the linker_file_t
to happen before calling into the pmc hook.

This fixes the deadlock by ensuring that the hwpmc -> list_objects() case
is always able to proceed.  Without this patch, I was able to deadlock a
multicore system within minutes by constantly loading and unloading an KLD
module while I simultaneously started a sampling mode PMC in a loop.

MFC after: 1 month

13 years agoAppend to CPIO_SRCS instead of using TAR_SRCS,
mm [Sun, 17 Jul 2011 21:52:55 +0000 (21:52 +0000)]
Append to CPIO_SRCS instead of using TAR_SRCS,
the variable name is misleading

MFC after: 2 weeks

13 years agoUpdate bsdcpio to 2.8.4
mm [Sun, 17 Jul 2011 21:42:22 +0000 (21:42 +0000)]
Update bsdcpio to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by: kientzle
MFC after: 2 weeks

13 years agoUpdate bsdtar to 2.8.4
mm [Sun, 17 Jul 2011 21:33:15 +0000 (21:33 +0000)]
Update bsdtar to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by: kientzle
MFC after: 2 weeks

13 years ago- Update libarchive to 2.8.4
mm [Sun, 17 Jul 2011 21:27:38 +0000 (21:27 +0000)]
- Update libarchive to 2.8.4
- Add support for extracting xar and rpm archives
- Add libarchive_fe subdir (common code for tar and cpio)

Approved by: kientzle
MFC after: 2 weeks

13 years agoAdd spares to the network stack for FreeBSD-9:
bz [Sun, 17 Jul 2011 21:15:20 +0000 (21:15 +0000)]
Add spares to the network stack for FreeBSD-9:
- TCP keep* timers
- TCP UTO (adjust from what was there already)
- netmap
- route caching
- user cookie (temporary to allow for the real fix)

Slightly re-shuffle struct ifnet moving fields out of the middle
of spares and to better align.

Discussed with: rwatson (slightly earlier version)

13 years agoThe MBR uses a 32-bit unsigned integer to store the size of a slice, but
rstone [Sun, 17 Jul 2011 21:08:16 +0000 (21:08 +0000)]
The MBR uses a 32-bit unsigned integer to store the size of a slice, but
fdisk(1) internally uses a signed int.  Should a user attempt to specify
a slice containing more than 2^31 - 1 sectors, an error will be reported
on systems with sizeof(long) == 4 and the slice size will be silently
truncated on systems with sizeof(long) > 4.

Instead use an unsigned long to store the slice size in fdisk(1).  This
allows the user to specify a slice size up to the maximum permitted by
the MBR on-disk format and does not have any problems with silent
truncation should the use specify an slice size larger than 2^32 on systems
with sizeof(long) > 4.

Submitted by: Mark Johnston (markjdb AT gmail DOT com)
MFC after: 2 weeks

13 years agoAdd a closing '.El' tag.
gjb [Sun, 17 Jul 2011 20:47:34 +0000 (20:47 +0000)]
Add a closing '.El' tag.

Found by: manlint

13 years agoAdd some spare fields to the g_class and g_geom structures needed to implement
pjd [Sun, 17 Jul 2011 20:35:30 +0000 (20:35 +0000)]
Add some spare fields to the g_class and g_geom structures needed to implement
direct I/O handling and provider's property changes handling.

13 years agoUpgrade our copy of llvm/clang to r135360, from upstream's trunk.
dim [Sun, 17 Jul 2011 19:51:40 +0000 (19:51 +0000)]
Upgrade our copy of llvm/clang to r135360, from upstream's trunk.

13 years ago- Improve interface list handling. The rtadvd(8) now supports dynamically-
hrs [Sun, 17 Jul 2011 19:24:54 +0000 (19:24 +0000)]
- Improve interface list handling.  The rtadvd(8) now supports dynamically-
  added/removed interfaces in a more consistent manner and reloading the
  configuration file.

- Implement burst unsolicited RA sending into the internal RA timer framework
  when AdvSendAdvertisements and/or configuration entries are changed as
  described in RFC 4861 6.2.4.  This fixes issues that make termination of the
  rtadvd(8) daemon take very long time.

  An interface now has three internal states, UNCONFIGURED, TRANSITIVE, or
  CONFIGURED, and the burst unsolicited sending happens in TRANSITIVE.
  See rtadvd.h for the details.

- rtadvd(8) now accepts non-existent interfaces as well in the command line.

- Add control socket support and rtadvctl(8) utility to show the RA information
  in rtadvd(8).  Dumping by SIGUSR1 has been removed in favor of it.

13 years agoComment out KDB/DDB related options for N32 kernel.
jchandra [Sun, 17 Jul 2011 18:51:51 +0000 (18:51 +0000)]
Comment out KDB/DDB related options for N32 kernel.

DDB files have warnings in this ABI which will break the kernel build
unless Werror is ignored

Reported by: bz

13 years agoCorrect the description of struct pfioc_state_kill.
bz [Sun, 17 Jul 2011 17:33:39 +0000 (17:33 +0000)]
Correct the description of struct pfioc_state_kill.

PR: kern/158997
Submitted by: ohauer

13 years agoCorrect small typo in a do{}while(0) define
marck [Sun, 17 Jul 2011 17:12:17 +0000 (17:12 +0000)]
Correct small typo in a do{}while(0) define

Approved by: kib
MFC after: 2 weeks

13 years agoFix compilation of mips kernels adding apropriate #ifdefs after r224115.
bz [Sun, 17 Jul 2011 16:50:12 +0000 (16:50 +0000)]
Fix compilation of mips kernels adding apropriate #ifdefs after r224115.

Pointed out by: Luiz Otavio O Souza (lists.br gmail.com)

13 years agoVendor import of clang trunk r135360:
dim [Sun, 17 Jul 2011 15:40:56 +0000 (15:40 +0000)]
Vendor import of clang trunk r135360:
http://llvm.org/svn/llvm-project/cfe/trunk@135360

13 years agoVendor import of llvm trunk r135360:
dim [Sun, 17 Jul 2011 15:36:56 +0000 (15:36 +0000)]
Vendor import of llvm trunk r135360:
http://llvm.org/svn/llvm-project/llvm/trunk@135360

13 years agorc.d/routing: Fix ugly output with additional routing options.
jilles [Sun, 17 Jul 2011 14:52:55 +0000 (14:52 +0000)]
rc.d/routing: Fix ugly output with additional routing options.

Print a separate "Additional routing options" line for each address family
which has additional options, so that it does not get mixed up with the
output from adding routes.

This also reverts r224048 which added newlines to two arbitrary routing
options.

13 years agoWhen building some of the boot loaders with clang, and DEBUG_FLAGS or
dim [Sun, 17 Jul 2011 13:50:21 +0000 (13:50 +0000)]
When building some of the boot loaders with clang, and DEBUG_FLAGS or
CFLAGS having '-g' in it, clang outputs several assembly directives that
are too new for our version of binutils.

Therefore, assemble the resulting .s files with clang instead.  A more
general solution can be implemented when a GNU as-compatible driver for
clang's integrated assembler appears.

Reported by: dougb

13 years agoDon't ignore negatively decoded address ranges.
jhb [Sun, 17 Jul 2011 12:42:51 +0000 (12:42 +0000)]
Don't ignore negatively decoded address ranges.

Reported by: scottl

13 years agoFixes to make the WITH_BIND_LIBS option functional with BIND 9.8.x
dougb [Sun, 17 Jul 2011 12:07:22 +0000 (12:07 +0000)]
Fixes to make the WITH_BIND_LIBS option functional with BIND 9.8.x

13 years agoRestore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.
ed [Sun, 17 Jul 2011 08:19:19 +0000 (08:19 +0000)]
Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.

Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls
to support wide characters. I created a patch to add ABI compatibility
for the old calls, but I didn't get any feedback to that.

It seems now people are upgrading from 8 to 9 they experience this
issue, so add it anyway.

13 years agoCommemorate the release of RFC 6303 by updating the comments regarding
dougb [Sun, 17 Jul 2011 06:20:47 +0000 (06:20 +0000)]
Commemorate the release of RFC 6303 by updating the comments regarding
our default empty zones.  No functional changes.

13 years agoPick up the 2011-06-08 update to this file, the addition of an IPv6
dougb [Sun, 17 Jul 2011 06:05:44 +0000 (06:05 +0000)]
Pick up the 2011-06-08 update to this file, the addition of an IPv6
address for D.

13 years agoRemove the 'either' from the comment as it'll be less obvious that we
bz [Sun, 17 Jul 2011 05:33:22 +0000 (05:33 +0000)]
Remove the 'either' from the comment as it'll be less obvious that we
removed semmap in a bit of time from now.   Re-wrap.

Suggested by: jhb

13 years agoFix the location of the default pid file in named.8
dougb [Sun, 17 Jul 2011 04:10:00 +0000 (04:10 +0000)]
Fix the location of the default pid file in named.8

Problem pointed out in the PR

PR: conf/155006
Submitted by: Helmut Schneider <jumper99@gmx.de>

13 years agoRevert revision 224079 as Rick pointed out that I would be calling VOP_PATHCONF
zack [Sun, 17 Jul 2011 03:44:05 +0000 (03:44 +0000)]
Revert revision 224079 as Rick pointed out that I would be calling VOP_PATHCONF
without the vnode lock held.

Implicitly approved by: zml (mentor)

13 years agoDon't include mptable_pci.c in Xen kernels. It is only meant for systems
jhb [Sun, 17 Jul 2011 01:23:50 +0000 (01:23 +0000)]
Don't include mptable_pci.c in Xen kernels.  It is only meant for systems
that truly have an MPTable.  The MPTable code in Xen is really a Xen
specific CPU enumerator and probably shouldn't be using the mptable name
at all.

13 years agoThe new NFSv4 client handled NFSERR_GRACE as a fatal error
rmacklem [Sat, 16 Jul 2011 20:53:27 +0000 (20:53 +0000)]
The new NFSv4 client handled NFSERR_GRACE as a fatal error
for the remove and rename operations. Some NFSv4 servers will
report NFSERR_GRACE for these operations. This patch changes
the behaviour of the client so that it handles NFSERR_GRACE
like NFSERR_DELAY for non-state related operations like
remove and rename. It also exempts the delegreturn operation
from handling within newnfs_request() for NFSERR_DELAY/NFSERR_GRACE
so that it can handle NFSERR_GRACE in the same manner as before.
This problem was resolved thanks to discussion with bfields at fieldses.org.
The problem was identified at the recent NFSv4 ineroperability
bakeathon.

MFC after: 2 weeks

13 years agoDon't assume pmap_mapdev() gets called only for memory mapped I/O
marcel [Sat, 16 Jul 2011 20:34:02 +0000 (20:34 +0000)]
Don't assume pmap_mapdev() gets called only for memory mapped I/O
addresses (i.e. uncacheable). ACPI in particular uses pmap_mapdev()
rather excessively (number of calls) just to get a valid KVA. To
that end, have pmap_mapdev():
1.  cache the last result so that we don't waste time for multiple
    consecutive invocations with the same PA/SZ.
2.  find the memory descriptor that covers the PA and return NULL
    if none was found or when the PA is for a common DRAM address.
3.  Use either a region 6 or region 7 KVA, in accordance with the
    memory attribute.

13 years agoMIPS changes for Netlogic XLP support.
jchandra [Sat, 16 Jul 2011 20:31:29 +0000 (20:31 +0000)]
MIPS changes for Netlogic XLP support.

This patch adds support for the Netlogic XLP mips64 processors in
the common MIPS code. The changes are :

- Add CPU_NLM processor type
- Add cases for CPU_NLM, mostly were CPU_RMI is used.
- Update cache flush changes for CPU_NLM
- Add kernel build configuration files for xLP.

In collaboration with: Prabhath Raman <prabhathpr at netlogicmicro com>

Approved by: bz(re), jmallett, imp(mips)

13 years agoDon't send EOI to the CPU before we handled the interrupt. This could
marcel [Sat, 16 Jul 2011 20:16:49 +0000 (20:16 +0000)]
Don't send EOI to the CPU before we handled the interrupt.  This could
potentially trigger multiple pending interrupts for level-sensitive
interrupts.  However, the event timer interrupt does need EOI before
being handled to avoid missing clock events.

These conflicting requirements are handled by having the XIV handler
inform the dispatch code whether or not it send EOI to the CPU. If not,
the dispatch code will do it. This allows handlers to send EOI before
doing potentially long-running activities, while still have a sensible
default behaviour.

13 years agoAdd a few more helper functions for working with memory descriptors:
marcel [Sat, 16 Jul 2011 19:56:07 +0000 (19:56 +0000)]
Add a few more helper functions for working with memory descriptors:
o   efi_md_find() - returns the md that covers the given address
o   efi_md_last() - returns the last md in the list
o   efi_md_prev() - returns the md that preceeds the given md.

13 years agoAdd MIPS platform files for Netlogic XLP SoC.
jchandra [Sat, 16 Jul 2011 19:35:44 +0000 (19:35 +0000)]
Add MIPS platform files for Netlogic XLP SoC.

Processor, UART, PIC and Messaging Network code. Also add
sys/mips/nlm/hal for on-chip device registers.

In collaboration with: Prabhath Raman <prabhathpr at netlogicmicro com>

Approved by: bz(re), jmallett, imp(mips)

13 years agoAdd PS3 partitioning (and framework for future pseries support) to the
nwhitehorn [Sat, 16 Jul 2011 19:25:47 +0000 (19:25 +0000)]
Add PS3 partitioning (and framework for future pseries support) to the
installer.

13 years agoClear pending ifnet events, in an attempt at preventing
zec [Sat, 16 Jul 2011 19:11:45 +0000 (19:11 +0000)]
Clear pending ifnet events, in an attempt at preventing
ng_ether_link_state() from being dispatched after we have
cleared our IFP2NG(ifp).

MFC after: 3 days

13 years agoAdd support for booting PS3s from disk. This is still a little hackish until
nwhitehorn [Sat, 16 Jul 2011 19:01:09 +0000 (19:01 +0000)]
Add support for booting PS3s from disk. This is still a little hackish until
we can find a way to get the information from petitboot or to guess it, so
the current algorithm is:

1. See if ps3disk3p1 (first GPT slice on OtherOS partition) exists, and if
   so try to boot it.
2. Otherwise, netboot.

Submitted by: glevand <geoffrey.levand at mail dot ru >

13 years agoSupport compiling MIPS elf trampoline with a different ABI.
jchandra [Sat, 16 Jul 2011 17:22:01 +0000 (17:22 +0000)]
Support compiling MIPS elf trampoline with a different ABI.

Allow changing the trampoline ABI with makeoptions, this will allow
us to have a trampoline with a different ABI from the kernel.
Useful in cases where we have to boot a 64 bit kernel from a
bootloader which supports only 32 bit or vice versa.

Approved by: bz(re), jmallett, imp

13 years agosh: Add a test for a fairly obscure case with aliases.
jilles [Sat, 16 Jul 2011 16:14:14 +0000 (16:14 +0000)]
sh: Add a test for a fairly obscure case with aliases.

This also passes on stable/8.

13 years agoGarbage-collect the tools for maintaining the previous PCI vendors list. The
philip [Sat, 16 Jul 2011 15:43:14 +0000 (15:43 +0000)]
Garbage-collect the tools for maintaining the previous PCI vendors list.  The
sources this tool collates are no longer available and the format of the
current database is directly usable by pciconf(8) without needing any special
processing.

13 years agoMFV pciids-20110716, r224099
philip [Sat, 16 Jul 2011 15:40:26 +0000 (15:40 +0000)]
MFV pciids-20110716, r224099

Update to use the latest version of the PCI IDs Repository.
As discussed on -current@ in May, this brings in a new source of the database,
which is also used by other operating systems.  Our previous sources no longer
exist and this database is actively maintained and more complete in general.

13 years agoEnable the new PCI-PCI bridge driver on pc98 by default. I missed this
jhb [Sat, 16 Jul 2011 14:07:44 +0000 (14:07 +0000)]
Enable the new PCI-PCI bridge driver on pc98 by default.  I missed this
in 221394 when I had meant to enable it on all i386 systems by default.

13 years agoFix build with NEW_PCIB defined.
jhb [Sat, 16 Jul 2011 14:06:02 +0000 (14:06 +0000)]
Fix build with NEW_PCIB defined.

13 years agoFix build when NEW_PCIB is not defined.
jhb [Sat, 16 Jul 2011 14:05:34 +0000 (14:05 +0000)]
Fix build when NEW_PCIB is not defined.

Submitted by: gcooper (partially)
Pointy hat to: jhb

13 years agoFix for VirtualBox 4.x and other virtual machines that fail
hselasky [Sat, 16 Jul 2011 12:50:30 +0000 (12:50 +0000)]
Fix for VirtualBox 4.x and other virtual machines that fail
to generate a port reset change event.

MFC after: 1 weeks

13 years agobmake and other updates necessary for the BIND 9.8.x upgrade.
dougb [Sat, 16 Jul 2011 11:20:54 +0000 (11:20 +0000)]
bmake and other updates necessary for the BIND 9.8.x upgrade.

This includes a structural change regarding atomic ops. Previously they
were enabled on all platforms unless we had knowledge that they did not
work. However both work performed by marius@ on sparc64 and the fact that
the 9.8.x branch is fussier in this area has demonstrated that this is
not a safe approach. So I've modified a patch provided by marius to
enable them for i386, amd64, and ia64 only.

13 years agoUpgrade to version 9.8.0-P4
dougb [Sat, 16 Jul 2011 11:12:09 +0000 (11:12 +0000)]
Upgrade to version 9.8.0-P4

This version has many new features, see /usr/share/doc/bind9/README
for details.

13 years agoVendor import of BIND 9.8.0-P4
dougb [Sat, 16 Jul 2011 10:49:33 +0000 (10:49 +0000)]
Vendor import of BIND 9.8.0-P4

13 years agoUpdate for BIND 9.8.x
dougb [Sat, 16 Jul 2011 10:41:09 +0000 (10:41 +0000)]
Update for BIND 9.8.x

13 years agoAdd DEXITCODE plumbing to NFS.
zack [Sat, 16 Jul 2011 08:51:09 +0000 (08:51 +0000)]
Add DEXITCODE plumbing to NFS.

Isilon has the concept of an in-memory exit-code ring that saves the last exit
code of a function and allows for stack tracing. This is very helpful when
debugging tough issues.

This patch is essentially a no-op for BSD at this point, until we upstream
the dexitcode logic itself. The patch adds DEXITCODE calls to every NFS
function that returns an errno error code. A number of code paths were also
reorganized to have single exit paths, to reduce code duplication.

Submitted by:   David Kwan <dkwan@isilon.com>
Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years ago- Add two missing functions to the LibUSB v0.1 API.
hselasky [Sat, 16 Jul 2011 08:29:12 +0000 (08:29 +0000)]
- Add two missing functions to the LibUSB v0.1 API.
- Clamp the string length to 255 bytes when getting
  the interface description.
- Clamp data request length to 65535 bytes when doing
  control requests.

MFC after: 3 days

13 years agoAdd a small comment about unloading the kgsappi module.
zack [Sat, 16 Jul 2011 08:05:49 +0000 (08:05 +0000)]
Add a small comment about unloading the kgsappi module.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoSimple find/replace of VOP_ISLOCKED -> NFSVOPISLOCKED. This is done so that NFSVOPISL...
zack [Sat, 16 Jul 2011 08:05:41 +0000 (08:05 +0000)]
Simple find/replace of VOP_ISLOCKED -> NFSVOPISLOCKED. This is done so that NFSVOPISLOCKED can be modified later to add enhanced logging and assertions.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoSimple find/replace of VOP_UNLOCK -> NFSVOPUNLOCK. This is done so that NFSVOPUNLOCK...
zack [Sat, 16 Jul 2011 08:05:36 +0000 (08:05 +0000)]
Simple find/replace of VOP_UNLOCK -> NFSVOPUNLOCK. This is done so that NFSVOPUNLOCK can be modified later to add enhanced logging and assertions.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoSimple find/replace of vn_lock -> NFSVOPLOCK. This is done so that NFSVOPLOCK can...
zack [Sat, 16 Jul 2011 08:05:31 +0000 (08:05 +0000)]
Simple find/replace of vn_lock -> NFSVOPLOCK. This is done so that NFSVOPLOCK can be modified later to add enhanced logging and assertions.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoRemove unnecessary thread pointer from VOPLOCK macros and current users.
zack [Sat, 16 Jul 2011 08:05:26 +0000 (08:05 +0000)]
Remove unnecessary thread pointer from VOPLOCK macros and current users.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoChange loadattr and fillattr to ask the file system for the pathconf variable.
zack [Sat, 16 Jul 2011 08:05:21 +0000 (08:05 +0000)]
Change loadattr and fillattr to ask the file system for the pathconf variable.

Small modification where VOP_PATHCONF was being called directly.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoMove nfsvno_pathconf to be accessible to sys/fs/nfs; no functionality change.
zack [Sat, 16 Jul 2011 08:05:17 +0000 (08:05 +0000)]
Move nfsvno_pathconf to be accessible to sys/fs/nfs; no functionality change.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoSmall acl patch to return the aclerror that comes back from nfsrv_dissectacl(). This...
zack [Sat, 16 Jul 2011 08:04:57 +0000 (08:04 +0000)]
Small acl patch to return the aclerror that comes back from nfsrv_dissectacl(). This fixes a problem where ATTRNOTSUPP was being returned instead of BADOWNER.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks

13 years agoHandle the MK_BIND_XML option more intelligently
dougb [Sat, 16 Jul 2011 07:12:02 +0000 (07:12 +0000)]
Handle the MK_BIND_XML option more intelligently

13 years agoMinor typo fix, s/config.in/configure.in/
dougb [Sat, 16 Jul 2011 01:49:38 +0000 (01:49 +0000)]
Minor typo fix, s/config.in/configure.in/

13 years agoThe i8259 controller is initialized incorrectly on MALTA. It writes
adrian [Sat, 16 Jul 2011 00:30:23 +0000 (00:30 +0000)]
The i8259 controller is initialized incorrectly on MALTA.  It writes
mask bits to control register and control bits to mask register.

The former causes ICW1_RESET|ICW1_LTIM combination to be written to
control register, which on QEMU results in "level sensitive irq not
supported" error.

Submitted by: Robert Millan <rmh@debian.org>

13 years agoAdd myself to committers-ports.dot
zi [Fri, 15 Jul 2011 21:37:13 +0000 (21:37 +0000)]
Add myself to committers-ports.dot

Approved by: wxs@ (mentor)

13 years agoRespect the BIOS/firmware's notion of acceptable address ranges for PCI
jhb [Fri, 15 Jul 2011 21:08:58 +0000 (21:08 +0000)]
Respect the BIOS/firmware's notion of acceptable address ranges for PCI
resource allocation on x86 platforms:
- Add a new helper API that Host-PCI bridge drivers can use to restrict
  resource allocation requests to a set of address ranges for different
  resource types.
- For the ACPI Host-PCI bridge driver, use Producer address range resources
  in _CRS to enumerate valid address ranges for a given Host-PCI bridge.
  This can be disabled by including "hostres" in the debug.acpi.disabled
  tunable.
- For the MPTable Host-PCI bridge driver, use entries in the extended
  MPTable to determine the valid address ranges for a given Host-PCI
  bridge.  This required adding code to parse extended table entries.

Similar to the new PCI-PCI bridge driver, these changes are only enabled
if the NEW_PCIB kernel option is enabled (which is enabled by default on
amd64 and i386).

Approved by: re (kib)

13 years agoSort snd_* entries alphabetically.
joel [Fri, 15 Jul 2011 19:02:44 +0000 (19:02 +0000)]
Sort snd_* entries alphabetically.

13 years agoAuto-generated system call code with cap_new(), cap_getrights().
jonathan [Fri, 15 Jul 2011 18:33:12 +0000 (18:33 +0000)]
Auto-generated system call code with cap_new(), cap_getrights().

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc

13 years agoAdd cap_new() and cap_getrights() system calls.
jonathan [Fri, 15 Jul 2011 18:26:19 +0000 (18:26 +0000)]
Add cap_new() and cap_getrights() system calls.

Implement two previously-reserved Capsicum system calls:
- cap_new() creates a capability to wrap an existing file descriptor
- cap_getrights() queries the rights mask of a capability.

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc

13 years agoDelete duplicate tags entry I introduced in -r223901.
mckusick [Fri, 15 Jul 2011 17:27:26 +0000 (17:27 +0000)]
Delete duplicate tags entry I introduced in -r223901.

Submitted-by: John Baldwin

13 years agoRevert 130163 and let top use KERN_PROC_PROC when individual threads are
jhb [Fri, 15 Jul 2011 17:23:45 +0000 (17:23 +0000)]
Revert 130163 and let top use KERN_PROC_PROC when individual threads are
not displayed.  The KERN_PROC_PROC sysctl was fixed in 188764.