jh [Wed, 21 Nov 2012 16:56:47 +0000 (16:56 +0000)]
Disallow attaching preloaded memory disks via ioctl.
- The feature is dangerous because the kernel code didn't check
validity of the memory address provided from user space.
- It seems that mdconfig(8) never really supported attaching preloaded
memory disks.
- Preloaded memory disks are automatically attached during md(4)
initialization. Thus there shouldn't be much use for the feature.
adrian [Wed, 21 Nov 2012 08:04:21 +0000 (08:04 +0000)]
Setup BAT0 and BAT1 on the Wii.
This is the missing piece for FreeBSD/Wii, but there's still a lot of
work ahead. We have to reset the MMU in locore before continuing
the boot process because we don't know how the boot loaders might
have setup the BATs. We also disable the PCI BAT because there's no PCI
bus on the Wii.
Thanks to Nathan Whitehorn and Peter Grenhan for their help.
alc [Wed, 21 Nov 2012 06:26:18 +0000 (06:26 +0000)]
Correct an error in r230623. When both VM_ALLOC_NODUMP and VM_ALLOC_ZERO
were specified to vm_page_alloc(), PG_NODUMP wasn't being set on the
allocated page when it happened to be pre-zeroed.
kib [Tue, 20 Nov 2012 15:45:48 +0000 (15:45 +0000)]
Schedule garbage collection run for the in-flight rights passed over
the unix domain sockets to the next tick, coalescing the serial calls
until the collection fires. The thought is that more work for the
collector could arise in the near time, allowing to clean more and not
spend too much CPU on repeated collection when there is no garbage.
Currently the collection task is fired immediately upon unix domain
socket close if there are any rights in flight, which caused excessive
CPU usage and too long blocking of the threads waiting for
unp_list_lock and unp_link_rwlock in write mode.
Robert noted that it would be nice if we could find some heuristic by
which we decide whether to run GC a bit more quickly. E.g., if the
number of UNIX domain sockets is close to its resource limit, but not
quite.
Reported and tested by: Markus Gebert <markus.gebert@hostpoint.ch>
Reviewed by: rwatson
MFC after: 2 weeks
kib [Tue, 20 Nov 2012 15:33:48 +0000 (15:33 +0000)]
Add a special meaning to the negative ticks argument for
taskqueue_enqueue_timeout(). Do not rearm the callout if it is
already armed and the ticks is negative. Otherwise rearm it to fire
in abs(ticks) ticks in the future.
The intended use is to call taskqueue_enqueue_timeout() for the given
timeout_task with the same negative ticks argument. As result, the
task is scheduled to execute not further than abs(ticks) ticks in
future, and the consequent enqueues are coalesced until the already
scheduled task is finished.
kib [Tue, 20 Nov 2012 15:25:00 +0000 (15:25 +0000)]
Remove the check and panic for an impossible condition. The NULL
lowervp vnode v_vnlock would cause panic due to NULL pointer
dereference much earlier.
jh [Tue, 20 Nov 2012 12:32:18 +0000 (12:32 +0000)]
- Don't pass geom and provider names as format strings.
- Add __printflike() attributes.
- Remove an extra argument for the g_new_geomf() call in swapongeom_ev().
marcel [Tue, 20 Nov 2012 03:21:26 +0000 (03:21 +0000)]
Unbreak amd64 cross-build where amd64 is the target. While clang
may be installed as cc and we don't need to build gcc as a
cross-tools, we still build gcc and thus need cc_tools built
as a build tool. Not doing this results in building gengenrtl with
the target compiler while we need to run it on the build machine.
adrian [Mon, 19 Nov 2012 23:42:46 +0000 (23:42 +0000)]
Disable WEP hardware encryption on the AR5210, in order to allow other
encryption types.
The AR5210 only has four WEP key slots, in contrast to what the
later MACs have (ie, the keycache.) So there's no way to store a "clear"
key.
Even if the driver is taught to not allocate CLR key entries for
the AR5210, the hardware will actually attempt to decode the encrypted
frames with the (likely all 0!) WEP keys.
So for now, disable the hardware encryption entirely and just so it
all in software. That allows both WEP -and- WPA to actually work.
If someone wishes to try and make hardware WEP _but_ software WPA work,
they'll have to create a HAL capability to enable/disable hardware
encryption based on the current STA/Hostap mode. However, making
multi-vap work with one WEP and one WPA VAP will require hardware
encryption to be disabled anyway.
attilio [Mon, 19 Nov 2012 22:43:45 +0000 (22:43 +0000)]
r16312 is not any longer real since many years (likely since when VFS
received granular locking) but the comment present in UFS has been
copied all over other filesystems code incorrectly for several times.
attilio [Mon, 19 Nov 2012 20:43:19 +0000 (20:43 +0000)]
insmntque() is always called with the lock held in exclusive mode,
then:
- assume the lock is held in exclusive mode and remove a moot check
about the lock acquisition.
- in the destructor remove !MPSAFE specific chunk.
jmallett [Mon, 19 Nov 2012 08:35:58 +0000 (08:35 +0000)]
Return port numbers for ATCA-7220 SPI interfaces in a different place for
consistency reasons, and to ensure that CRC addition is disabled on output.
With this, transmit seems to be working properly on the ATCA-7220.
rpaulo [Mon, 19 Nov 2012 08:03:40 +0000 (08:03 +0000)]
Use the correct size when allocating the cmdbuf string.
cmdlengthdelta is the size of the header and we were using it to
allocate a buffer to store the command line. This would mean that
the cmdbuf could be too short. In practice this was never noticed unless
you usually run top -a. On a stock FreeBSD system you can see the
problem by running sendmail and then running top -a on a big terminal
window. In practice this doubles to size available to cmdbuf since the
header is around 65-68 bytes.
jmallett [Mon, 19 Nov 2012 05:24:33 +0000 (05:24 +0000)]
Fix packet receive on the ATCA-7220 by disabling FCS-related checks, since the
FCS is stripped by the underlying hardware before it reaches the Octeon.
jmallett [Mon, 19 Nov 2012 00:19:27 +0000 (00:19 +0000)]
o) Do boot descriptor parsing before console setup so that we can use a console
other than UART 0 from the outset.
o) Print board information from sysinfo after consoles have been initialized
rather than doing it during boot descriptor parsing.
o) Use cvmx_safe_printf and platform_reset rather than panic when doing very
early boot descriptor parsing before the console is set up.
o) Get rid of the global octeon_bootinfo.
hrs [Sun, 18 Nov 2012 15:48:02 +0000 (15:48 +0000)]
- Increase the number of retry for NET_RT_DUMP from 5 to 15.
- Use 2001:db8:: as an example instead of deprecated 3ffe:: address block.
- Add check for connected routes.
- Add support of RTM_IFANNOUNCE for dyanmically-added/removed interfaces.
- Add support of *, ?, and [ in the interface list.
- Add -P number to specify route flag which will never expire.
- Add -Q number to specify route flag which route6d will add to routes via RIP.
- Add -p pidfile to specify the process ID file.
hrs [Sun, 18 Nov 2012 15:37:27 +0000 (15:37 +0000)]
Overhaul of route6d(8):
- Use queue(3) for linked-list.
- Use a consistent naming scheme for struct members.
- Use ANSI C style function declaration.
- Add check of RTM_VERSION mismatch.
avg [Sun, 18 Nov 2012 11:47:25 +0000 (11:47 +0000)]
spa_import_rootpool: fall back to use configuration from zpool.cache...
if we fail to generate a proper root pool configuration based on disk
probing. Currently we can not properly generate the configuration for
multi-vdev pools. Make that explicit.
jmallett [Sat, 17 Nov 2012 23:53:12 +0000 (23:53 +0000)]
Remove one wholly-unused and buggy routine and some nearby alternative symbols.
While here, also correct a comment that seems to imply that this file is
NetBSD's all-singing, all-dancing locore.S, rather than our conservative set of
assembly support routines.
hrs [Sat, 17 Nov 2012 20:19:00 +0000 (20:19 +0000)]
Fill sin6_scope_id in sockaddr_in6 before passing it from the kernel to
userland via routing socket or sysctl. This eliminates the following
KAME-specific sin6_scope_id handling routine from each userland utility:
mav [Sat, 17 Nov 2012 06:33:13 +0000 (06:33 +0000)]
Summarize information about connected analog pins and EDID-like data received
from HDMI/DisplayPort devices in form of general connection status and
sound(4)-style channel matrix. Now that information is only reported in
readable form to verbose logs, but potentially could be used by sound(4)
to correctly choose default devices and configure vchans.
Fix rear and side channels swap on analog 7.1 outputs. As soon as there is
a huge mess in industry about naming and using of these channels, duplicate
rear channels of 4 and 5.1 streams to both read and side speakers.