Bernhard Schmidt [Sat, 18 Dec 2010 20:15:47 +0000 (20:15 +0000)]
Prefer os_memset, os_strlcpy and os_free. While here adjust the return
value checks for 2 ioctl calls and rewrite error handling in bsd_init
to better integrate with upstream code.
Bernhard Schmidt [Sat, 18 Dec 2010 19:58:23 +0000 (19:58 +0000)]
Add bsd_send_mlme_param to aggregate IEEE80211_IOC_MLME ioctls:
- merge bsd_set_sta_authorized and bsd_sta_set_flags
- change bsd_set_sta_authorized, bsd_sta_deauth and bsd_sta_disassoc
to use bsd_send_mlme_param
Bernhard Schmidt [Sat, 18 Dec 2010 19:56:45 +0000 (19:56 +0000)]
Change bsd_del_key() to match upstream code:
- change order of if/else
- move wpa_printf() into the condition
- change unsigned char* to u8*
- prefer os_memset/os_memcpy
Bernhard Schmidt [Sat, 18 Dec 2010 15:45:10 +0000 (15:45 +0000)]
Add 2 missing bus_dmamap_sync() calls. Those fix random 'scan timeout',
'could not set power mode', 'device config failed' and other errors due
reading invalid memory.
Bernhard Schmidt [Sat, 18 Dec 2010 15:35:10 +0000 (15:35 +0000)]
Fix association on 5GHz channels. The device is initially configured using
a 2GHz channel with appropriate flags set to sc->config. Due to not zeroing
sc->config for auth/assoc those flags are still set while trying to connect
on a 5GHz channel.
Nathan Whitehorn [Sat, 18 Dec 2010 14:34:05 +0000 (14:34 +0000)]
Reconnect arm to the universe build, and connect big-endian MIPS and ARM
and powerpc64 to universe for the first time. In general, provide
(slightly hacky) knowledge of multi-architecture TARGETs to universe as
well as the ability to distinguish the correct toolchain for a given
kernel using config -m.
Tijl Coosemans [Sat, 18 Dec 2010 14:24:24 +0000 (14:24 +0000)]
No need to zero the softc. It's allocated with M_ZERO.
Use pci_enable_busmaster instead of setting PCIM_CMD_BUSMASTEREN
directly. There's no need to set PCIM_CMD_MEMEN. The bit is set when a
SYS_RES_MEMORY resource is activated.
Remove redundant pci_* function calls from suspend/resume methods. The
bus driver already saves and restores the PCI configuration.
Write 1 byte instead of 4 when setting the HIFN_TRDY_TIMEOUT register.
It is only 1 byte according to the specification.
Rick Macklem [Fri, 17 Dec 2010 22:18:09 +0000 (22:18 +0000)]
Fix two vnode locking problems in nfsd_recalldelegation() in the
experimental NFSv4 server. The first was a bogus use of VOP_ISLOCKED()
in a KASSERT() and the second was the need to lock the vnode for the
nfsrv_checkremove() call. Also, delete a "__unused" that was bogus,
since the argument is used.
Reviewed by: zack.kirsch at isilon.com
MFC after: 2 weeks
Andriy Gapon [Fri, 17 Dec 2010 18:22:50 +0000 (18:22 +0000)]
cyclic xcall: use smp_no_rendevous_barrier as setup function parameter
In this case we call target function only on a single CPU and do not
need any synchronization at the setup stage.
It's a bit non-obvious but setup function of NULL means that
smp_rendezvous_cpus waits for all CPUs to arrive at the rendezvous
point, but without doing any actual setup. While using
smp_no_rendevous_barrier means that each CPU proceeds on its own
schedule without any synchronization whatsoever.
John Baldwin [Fri, 17 Dec 2010 16:29:06 +0000 (16:29 +0000)]
Add back a bounds check on valid idle priorities that was lost in an
earlier commit. While here, move the thread lock down in rtp_to_pri().
It is not needed for all of the priority value checks and the computation
of newpri.
Andriy Gapon [Fri, 17 Dec 2010 16:21:30 +0000 (16:21 +0000)]
small cleanup of acpi battery status setting and checking
This is based on the patch submitted by Yuri Skripachov.
Overview of the changes:
- clarify double-use of some ACPI_BATT_STAT_* definitions
- clean up undefined/extended status bits returned by _BST
- warn about charging+discharging bits being set at the same time
John Baldwin [Thu, 16 Dec 2010 17:14:37 +0000 (17:14 +0000)]
- If the atkbdc device is assigned an IRQ resource by ACPI or the PnPBIOS,
allow the child atkbd device to reuse that IRQ resource instead of
reallocating the same IRQ from the parent bus inside the atkbd driver.
- Don't allocate a shared IRQ for the atkbd driver. For AT keyboard
devices on an ISA bus the IRQ is not shareable. Instead, the bus driver
should mark the IRQ shareable if the bus supports shared IRQs.
- Don't identify child devices until after the atkbdc device itself has
attached.
John Baldwin [Thu, 16 Dec 2010 17:08:43 +0000 (17:08 +0000)]
- When moving the IRQ resource from the psmcpnp device to the psm device,
delete the IRQ resource from the psmcpnp device completely.
- Don't allocate the IRQ resource shared. It is not a shareable interrupt
on ISA. The bus driver can set RF_SHAREABLE if the IRQ is actually
shareable on a non-ISA bus.
John Baldwin [Thu, 16 Dec 2010 17:05:28 +0000 (17:05 +0000)]
Small style fixes:
- Avoid side-effect assignments in if statements when possible.
- Don't use ! to check for NULL pointers, explicitly check against NULL.
- Explicitly check error return values against 0.
- Don't use INTR_MPSAFE for interrupt handlers with only filters as it is
meaningless.
- Remove unneeded function casts.
Jaakko Heinonen [Thu, 16 Dec 2010 16:56:44 +0000 (16:56 +0000)]
If dlclose() is called recursively from a _fini() function, the inner
dlclose() call may unload the object of the outer call prematurely
because objects are unreferenced before _fini() calls.
Fix this by unreferencing objects after calling objlist_call_fini() in
dlclose(). Therefore objlist_call_fini() now calls the fini function if
the reference count of an object is 1. In addition we must restart the
list_fini traversal after every _fini() call because another dlclose()
call might have modified the reference counts.
Add an XXX comment to objlist_call_fini() about possible race with
dlopen().
John Baldwin [Thu, 16 Dec 2010 15:27:13 +0000 (15:27 +0000)]
Pass JFLAG as JFLAG from tinderbox to universe. This gives the same
semantics for JFLAG with tinderbox as for universe. Previously doing
'make JFLAG=-j4 tinderbox' was equivalent to 'make -j4 universe'
(i.e. 4 worlds in parallel) rather than 'make JFLAG=-j4 universe'
(i.e. worlds in sequence, each built with -j4).
John Baldwin [Thu, 16 Dec 2010 15:19:32 +0000 (15:19 +0000)]
Use bus_alloc_resource_any() instead of bus_alloc_resource(). Besides being
cleaner, this fixes problems where the code was using ~0 instead of ~0ul
for the upper bound on "any" resources.
Jayachandran C. [Thu, 16 Dec 2010 04:56:03 +0000 (04:56 +0000)]
Make the ELF trampoline binary ELF executable (and do some cleanup).
- Remove the -shared flag for the trampoline binary, generate an
ELF executable instead of a shared object.
- No need to generate tmphack.S, move the code to sys/mips/mips/inckern.S
- No need generate opt_kernname.h, KERNNAME can be passed with -D
Nathan Whitehorn [Wed, 15 Dec 2010 23:43:25 +0000 (23:43 +0000)]
Fix the overflowing livefs ISO by removing man pages from the HFS part of
the hybrid disk. This is a stopgap until a better solution can be found,
but lets the powerpc release build complete for the time being.
Bjoern A. Zeeb [Wed, 15 Dec 2010 22:58:45 +0000 (22:58 +0000)]
Bring back (most of) NATM to avoid further bitrot after r186119.
Keep three lines disabled which I am unsure if they had been used at all.
This will allow us to seek testers and possibly bring it all back.
One of the compat32 functions was copying in a raw timespec, instead of
a 32-bit one. This can cause weird timeout issues, as the copying reads
garbage from the user.
Jaakko Heinonen [Wed, 15 Dec 2010 16:49:47 +0000 (16:49 +0000)]
Don't allow user created symbolic links to cover another entries marked
with DE_USER. If a devfs rule hid such entry, it was possible to create
infinite number of symbolic links with the same name.
Jaakko Heinonen [Wed, 15 Dec 2010 16:42:44 +0000 (16:42 +0000)]
- Assert that dm_lock is exclusively held in devfs_rules_apply() and
in devfs_vmkdir() while adding the entry to de_list of the parent.
- Apply devfs rules to newly created directories and symbolic links.
Xin LI [Tue, 14 Dec 2010 20:35:08 +0000 (20:35 +0000)]
Revert r216423 per request from Jilles.
The new behavior prevents us from being able to bail out explicitly
on unknown options that we have not implemented. BASH for instance
have introduced a '-v' for printf(1) builtin and it seems to be bad
to pretend that we supported it and have a script break silently.
Jung-uk Kim [Tue, 14 Dec 2010 20:07:51 +0000 (20:07 +0000)]
Stop lying about supporting cpu_est_clockrate() when TSC is invariant. This
function always returned the nominal frequency instead of current frequency
because we use RDTSC instruction to calculate difference in CPU ticks, which
is supposedly constant for the case. Now we support cpu_get_nominal_mhz()
for the case, instead. Note it should be just enough for most usage cases
because cpu_est_clockrate() is often times abused to find maximum frequency
of the processor.
Xin LI [Tue, 14 Dec 2010 18:23:15 +0000 (18:23 +0000)]
When printf is being used as a sh(1) builtin, it can not call
exit(3) as pointed out by jilles@ so revert to using return(),
also change the return value back to 1 as requested by bde@.
Alan Cox [Tue, 14 Dec 2010 05:47:35 +0000 (05:47 +0000)]
Change memguard_fudge() so that it can handle km_max being zero. Not
every platform defines VM_KMEM_SIZE_MAX, and on those platforms km_max
will be zero.
Xin LI [Tue, 14 Dec 2010 01:16:56 +0000 (01:16 +0000)]
IEEE Std 1003.1-2008, Section 1.4, Utility Description Defaults says
that when the options section is listed as "None", utility shall
recognize "--" as a first argument to be discarded.
This implementation is largely based on OpenBSD implementation but
we do slightly differently:
a) We skip argv[0] as the first step;
b) We test whether the next argument is "--" and ignore it.
With this change one will get:
%printf
usage: printf format [arguments ...]
%printf -v
-v%printf -- -v
-v%
%printf --
usage: printf format [arguments ...]
Which matches the behavior observed on a Debian system but different
from the Illumos change.
Robert Watson [Mon, 13 Dec 2010 23:30:56 +0000 (23:30 +0000)]
Add a rudimentary Xen man page summarising the state of Xen on amd64 and
i386, how to configure the kernel, and some known issues. Further
refinement almost certainly required. This is not a Xen installation
manual.
Robert Watson [Mon, 13 Dec 2010 23:26:31 +0000 (23:26 +0000)]
Add a rudimentary Xen man page summarising the state of Xen on amd64 and
i386, how to configure the kernel, and some known issues. Further
refinement almost certainly required. This is not a Xen installation
manual.
Adapt filesystem-independent NFSv4 ACL code (used by UFS, but not by ZFS)
to PSARC/2010/029. In short, the semantics is simplified - "weird stuff"
no longer happens after chmod, entries don't get duplicated during
inheritance, and trivial ACLs no longer contain three "DENY" entries,
which is also more friendly to MS Windows.
By default, UFS keeps using old semantics. To change it, set sysctl
vfs.acl_nfs4_old_semantics to 0. I'll flip the switch when ZFSv28
hits the tree, to keep these two in sync - ZFS v28 uses PSARC semantics,
and ZFS v15 uses the old one.
Andriy Gapon [Mon, 13 Dec 2010 14:30:35 +0000 (14:30 +0000)]
fix mips build breakage introduced in r216375: atomic_store_int doesn't exists
1) 32-bit assignment are expected to always be atomic.
2) Release/acquire memory barrier semantics doesn't seem to be needed here.
So a simple assignment can be used.
Remove unused port_set_counter() while here, it also used to mis-use
atomic_set_int().
Reported by: jhb
Pointyhat to: avg
MFC after: 3 weeks
Rebecca Cran [Mon, 13 Dec 2010 13:52:03 +0000 (13:52 +0000)]
USB probing often takes a long time and finishes finding devices after init
has started. In the case of sysinstall, this means that it has already built
its list of devices before probing finishes. Add a hint for users who have
booted from a USB stick only to find that sysinstall can't find it.
Robert Watson [Mon, 13 Dec 2010 12:15:46 +0000 (12:15 +0000)]
Add options NO_ADAPTIVE_SX to the XENHVM kernel configuration, matching
its similar disabling of adaptive mutexes and rwlocks. The existing
comment on why this is the case also applies to sx locks.