]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoChange order in wpa_driver_bsd_ops to match upstream code. Add description
Bernhard Schmidt [Sat, 18 Dec 2010 20:25:25 +0000 (20:25 +0000)]
Change order in wpa_driver_bsd_ops to match upstream code. Add description
while here.

13 years agoAdd a comment explaining the undefs, while here remove one which is not
Bernhard Schmidt [Sat, 18 Dec 2010 20:23:28 +0000 (20:23 +0000)]
Add a comment explaining the undefs, while here remove one which is not
required.

13 years agoRename bsd_set_iface_flags to bsd_ctrl_iface and change arguments to match
Bernhard Schmidt [Sat, 18 Dec 2010 20:22:15 +0000 (20:22 +0000)]
Rename bsd_set_iface_flags to bsd_ctrl_iface and change arguments to match
upstream. For the same reason rewrite bsd_get_seqnum.

13 years agoImport bsd_configure_wpa() to sync with upstream code.
Bernhard Schmidt [Sat, 18 Dec 2010 20:17:10 +0000 (20:17 +0000)]
Import bsd_configure_wpa() to sync with upstream code.

13 years agoPrefer os_memset, os_strlcpy and os_free. While here adjust the return
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.

13 years agoRemove some unused variables and unnecessary casts.
Bernhard Schmidt [Sat, 18 Dec 2010 20:13:42 +0000 (20:13 +0000)]
Remove some unused variables and unnecessary casts.

13 years agoRemove debug messages which are no longer present in upstream code. While
Bernhard Schmidt [Sat, 18 Dec 2010 20:11:09 +0000 (20:11 +0000)]
Remove debug messages which are no longer present in upstream code. While
here remove some explicit line breaks.

13 years agoRename iface to ifname to match the upstream code.
Bernhard Schmidt [Sat, 18 Dec 2010 20:08:21 +0000 (20:08 +0000)]
Rename iface to ifname to match the upstream code.

13 years agoRename ioctl_sock to just sock to match the upstream code. While here
Bernhard Schmidt [Sat, 18 Dec 2010 20:04:47 +0000 (20:04 +0000)]
Rename ioctl_sock to just sock to match the upstream code. While here
remove the no longer used wext_sock and bsd_driver_ops variables.

13 years agoMove some functions around to match the upstream order.
Bernhard Schmidt [Sat, 18 Dec 2010 20:00:28 +0000 (20:00 +0000)]
Move some functions around to match the upstream order.

13 years agoAdd bsd_send_mlme_param to aggregate IEEE80211_IOC_MLME ioctls:
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

13 years agoChange bsd_del_key() to match upstream code:
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

13 years agoAggregate SIOCS80211 and SIOCG80211 ioctl request code. While here, bring
Bernhard Schmidt [Sat, 18 Dec 2010 19:55:19 +0000 (19:55 +0000)]
Aggregate SIOCS80211 and SIOCG80211 ioctl request code. While here, bring
the wpa_printf()/perror() messages in sync with upstream code.

13 years agoInform a compiler which asm statements in the x86 implementation of
Konstantin Belousov [Sat, 18 Dec 2010 16:41:11 +0000 (16:41 +0000)]
Inform a compiler which asm statements in the x86 implementation of
atomics change eflags.

Reviewed by: jhb
MFC after: 2 weeks

13 years agoAdd 2 missing bus_dmamap_sync() calls. Those fix random 'scan timeout',
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.

Obtained from: OpenBSD
MFC after: 3 days

13 years agoFix association on 5GHz channels. The device is initially configured using
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.

MFC after: 3 days

13 years agoFix a panic while disabling the RF kill button, caller of the
Bernhard Schmidt [Sat, 18 Dec 2010 15:25:21 +0000 (15:25 +0000)]
Fix a panic while disabling the RF kill button, caller of the
wpi_rfkill_resume() function will take care of the lock.

PR: kern/144898
MFC after: 3 days

13 years agoReconnect arm to the universe build, and connect big-endian MIPS and ARM
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.

13 years agoNo need to zero the softc. It's allocated with M_ZERO.
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.

Reviewed by: jhb
Approved by: kib (mentor)

13 years agoUse convenience functions where possible instead of accessing the PCI
Tijl Coosemans [Sat, 18 Dec 2010 14:21:28 +0000 (14:21 +0000)]
Use convenience functions where possible instead of accessing the PCI
configuration registers directly.

Remove pci_enable_io calls where they are redundant. The PCI bus driver
will set the right bits when the corresponding bus resource is activated.

Remove redundant pci_* function calls from suspend/resume methods. The
bus driver already saves and restores the PCI configuration.

Reviewed by: jhb
Approved by: kib (mentor)

13 years agoIn pmap_extract(), unlock pmap lock earlier. The calculation does not need
Konstantin Belousov [Sat, 18 Dec 2010 11:31:32 +0000 (11:31 +0000)]
In pmap_extract(), unlock pmap lock earlier. The calculation does not need
the lock when operating on local variables.

Reviewed by: alc

13 years agoSort cross references by section.
Rebecca Cran [Sat, 18 Dec 2010 10:09:07 +0000 (10:09 +0000)]
Sort cross references by section.

Reported by: pluknet

13 years agoAdd Exar octal PCI UART.
Ed Maste [Sat, 18 Dec 2010 02:54:51 +0000 (02:54 +0000)]
Add Exar octal PCI UART.

Submitted by: Mark Johnston
Obtained from: Sandvine Incorporated

13 years agoBring in the relevant changes from NetBSD's 1.31:
Doug Barton [Sat, 18 Dec 2010 00:30:52 +0000 (00:30 +0000)]
Bring in the relevant changes from NetBSD's 1.31:

"Use strlcpy, not strncpy, when the desired semantics are strlcpy's
rather than strncpy's."

Note: NetBSD's 1.32 is their adoption of our r216206

Obtained from: dholland@NetBSD.org

13 years agoImplement and use a single optimized function for unholding a set of pages.
Alan Cox [Fri, 17 Dec 2010 22:41:22 +0000 (22:41 +0000)]
Implement and use a single optimized function for unholding a set of pages.

Reviewed by: kib@

13 years agoFix two vnode locking problems in nfsd_recalldelegation() in the
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

13 years agoSimply refer to all Xen drivers as para-virtualized, as this appears to
Robert Watson [Fri, 17 Dec 2010 22:09:55 +0000 (22:09 +0000)]
Simply refer to all Xen drivers as para-virtualized, as this appears to
be the preferred Xen parlance.

Discussed with: Steve Hand <steven.hand at cl.cam.ac.uk>
MFC after: 1 day

13 years agoUpdate shmget(2) with POSIX access permissions and remove non-standard SHM_R,
Rebecca Cran [Fri, 17 Dec 2010 21:10:08 +0000 (21:10 +0000)]
Update shmget(2) with POSIX access permissions and remove non-standard SHM_R,
SHM_W and machine/param.h.

13 years agocyclic xcall: use smp_no_rendevous_barrier as setup function parameter
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.

MFC after: 3 weeks

13 years agoAdd back a bounds check on valid idle priorities that was lost in an
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.

Reported by: swell.k @ gmail
MFC after: 3 days

13 years agosmall cleanup of acpi battery status setting and checking
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

PR: kern/124744
Submitted by: Yuri Skripachov <y.skripachov@gmail.com>
Tested by: Yuri Skripachov <y.skripachov@gmail.com>
MFC after: 2 weeks

13 years agoFix a flightsize bug related to the processing of PKTDRP reports.
Michael Tuexen [Fri, 17 Dec 2010 15:39:55 +0000 (15:39 +0000)]
Fix a flightsize bug related to the processing of PKTDRP reports.

MFC after: 3 days.

13 years agoCorrect some misundertandings on my part about PV vs HVM kernel
Robert Watson [Fri, 17 Dec 2010 11:25:37 +0000 (11:25 +0000)]
Correct some misundertandings on my part about PV vs HVM kernel
configuration options.

MFC after: 1 day

13 years agoFix spelling nits.
Robert Watson [Fri, 17 Dec 2010 10:05:21 +0000 (10:05 +0000)]
Fix spelling nits.

MFC after: 3 days
Submitted by: bcr

13 years agoAdd pf in quiet mode
Kevin Lo [Fri, 17 Dec 2010 09:38:55 +0000 (09:38 +0000)]
Add pf in quiet mode

13 years agoMinor cleanup for sys/conf/Makefile.mips. Use -e and replace two calls to
Jayachandran C. [Fri, 17 Dec 2010 09:14:25 +0000 (09:14 +0000)]
Minor cleanup for sys/conf/Makefile.mips. Use -e and replace two calls to
sed with one.

13 years agoClarifications of a number of points in xen.4, and some additional device
Robert Watson [Fri, 17 Dec 2010 01:30:56 +0000 (01:30 +0000)]
Clarifications of a number of points in xen.4, and some additional device
driver information from gibbs@.

MFC after: 3 days

13 years agosh: Fix corruption of command substitutions with special chars after newline
Jilles Tjoelker [Thu, 16 Dec 2010 23:28:20 +0000 (23:28 +0000)]
sh: Fix corruption of command substitutions with special chars after newline

The CTLESC byte to protect a special character was output before instead of
after a newline directly preceding the special character.

The special handling of newlines is because command substitutions discard
all trailing newlines.

13 years agoBugfix: Take also the nr-mapping array into account when detecting
Michael Tuexen [Thu, 16 Dec 2010 21:01:02 +0000 (21:01 +0000)]
Bugfix: Take also the nr-mapping array into account when detecting
        gaps.

Reviewed by: rrs@
MFC after: 3 days.

13 years agoThe 'ret' variable is of type ssize_t and we use proper format for it (%zd), so
Pawel Jakub Dawidek [Thu, 16 Dec 2010 19:48:03 +0000 (19:48 +0000)]
The 'ret' variable is of type ssize_t and we use proper format for it (%zd), so
no (bogus) cast is needed.

MFC after: 3 days

13 years agoRevert r216473.
David E. O'Brien [Thu, 16 Dec 2010 17:54:56 +0000 (17:54 +0000)]
Revert r216473.
WARNS=6 causes "warning: cast increases required alignment of target type"
on arm, ia64, mips, and sparc64.

13 years ago- If the atkbdc device is assigned an IRQ resource by ACPI or the PnPBIOS,
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.

13 years ago- When moving the IRQ resource from the psmcpnp device to the psm device,
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.

13 years agoSmall style fixes:
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.

13 years agoIf dlclose() is called recursively from a _fini() function, the inner
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().

PR: 133246, 149464
Reviewed by: kan, kib

13 years agoSpelling fix.
John Baldwin [Thu, 16 Dec 2010 16:55:22 +0000 (16:55 +0000)]
Spelling fix.

13 years agoPass JFLAG as JFLAG from tinderbox to universe. This gives the same
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).

MFC after: 1 month

13 years agoUse bus_alloc_resource_any() instead of bus_alloc_resource(). Besides being
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.

MFC after: 1 month

13 years agoPass proper -Wl,-export-dynamic to ld. Thus bsnmpd(1) compiled with clang
Shteryana Shopova [Thu, 16 Dec 2010 15:18:53 +0000 (15:18 +0000)]
Pass proper -Wl,-export-dynamic to ld. Thus bsnmpd(1) compiled with clang
properly exports its symbols to the modules.

Submitted by: dim

13 years agolibbsnmp was moved to usr/lib
Shteryana Shopova [Thu, 16 Dec 2010 11:58:50 +0000 (11:58 +0000)]
libbsnmp was moved to usr/lib

13 years agoSilence the compiler warnings in libbsnmp by removing several (now)
Shteryana Shopova [Thu, 16 Dec 2010 11:20:37 +0000 (11:20 +0000)]
Silence the compiler warnings in libbsnmp by removing several (now)
unsed parameters.

Sponsored by: The FreeBSD Foundation
Reviewed by: philip@

13 years agoAdd a missing cast. Reported by blade_ly at yahoo.com.cn.
Michael Tuexen [Thu, 16 Dec 2010 09:49:16 +0000 (09:49 +0000)]
Add a missing cast. Reported by blade_ly at yahoo.com.cn.

MFC after: 1 day.

13 years agoImprove problems logging.
Pawel Jakub Dawidek [Thu, 16 Dec 2010 07:30:47 +0000 (07:30 +0000)]
Improve problems logging.

MFC after: 3 days

13 years agoDon't ignore errors from remote requests.
Pawel Jakub Dawidek [Thu, 16 Dec 2010 07:29:58 +0000 (07:29 +0000)]
Don't ignore errors from remote requests.

MFC after: 3 days

13 years agoLog the fact of launching and include protocol version number.
Pawel Jakub Dawidek [Thu, 16 Dec 2010 07:28:40 +0000 (07:28 +0000)]
Log the fact of launching and include protocol version number.

MFC after: 3 days

13 years agoo) Add support for the Lanner MR-321X/MR-325, which is just a modified MR-320.
Juli Mallett [Thu, 16 Dec 2010 07:20:38 +0000 (07:20 +0000)]
o) Add support for the Lanner MR-321X/MR-325, which is just a modified MR-320.
o) On the Lanner MR-730, disable PCIe lane swap, per vendor.

13 years ago- include argument should be in quotes
Oleksandr Tymoshenko [Thu, 16 Dec 2010 05:13:41 +0000 (05:13 +0000)]
- include argument should be in quotes

13 years agoMake the ELF trampoline binary ELF executable (and do some cleanup).
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

Reviewed by: gonzo, imp

13 years agoBump WARNS to 6.
David E. O'Brien [Thu, 16 Dec 2010 00:36:10 +0000 (00:36 +0000)]
Bump WARNS to 6.

13 years agoGEOM virstor .so does not need libmd.
David E. O'Brien [Thu, 16 Dec 2010 00:00:28 +0000 (00:00 +0000)]
GEOM virstor .so does not need libmd.

13 years agoMerge ACPICA 20101209.
Jung-uk Kim [Wed, 15 Dec 2010 23:48:45 +0000 (23:48 +0000)]
Merge ACPICA 20101209.

13 years agoRename the generic "CLASS" to the more specific "GEOM_CLASS".
David E. O'Brien [Wed, 15 Dec 2010 23:45:12 +0000 (23:45 +0000)]
Rename the generic "CLASS" to the more specific "GEOM_CLASS".
While I'm here remove redundancy and inconsistencies.

Obtained from: Juniper Networks

13 years agoFix the overflowing livefs ISO by removing man pages from the HFS part of
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.

MFC after: 1 week

13 years agoRename the generic "CLASS" to the more specific "GEOM_CLASS".
David E. O'Brien [Wed, 15 Dec 2010 23:24:34 +0000 (23:24 +0000)]
Rename the generic "CLASS" to the more specific "GEOM_CLASS".
While I'm here remove redundancy and inconsistencies.

Obtained from: Juniper Networks

13 years agoBring back (most of) NATM to avoid further bitrot after r186119.
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.

Discussed with: rwatson
MFC after: 7 weeks

13 years agoOne of the compat32 functions was copying in a raw timespec, instead of
Matthew D Fleming [Wed, 15 Dec 2010 19:30:44 +0000 (19:30 +0000)]
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.

Code by:     Deepak Veliath <deepak dot veliath at isilon dot com>
MFC after:   1 week

13 years agoDon't allow user created symbolic links to cover another entries marked
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.

Reviewed by: kib

13 years ago- Assert that dm_lock is exclusively held in devfs_rules_apply() and
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.

PR: kern/125034
Submitted by: Mateusz Guzik (original version)

13 years agoVOP_ISLOCKED() should not be used to determine if the vnode is locked.
Konstantin Belousov [Wed, 15 Dec 2010 12:46:53 +0000 (12:46 +0000)]
VOP_ISLOCKED() should not be used to determine if the vnode is locked.
Explicitely track the locked status of the vnode.

Reviewed by: pjd
Tested by: avg
MFC after: 1 week

13 years agoAdd the missed 'p' flag to getopt() optstring argument.
Konstantin Belousov [Wed, 15 Dec 2010 12:45:28 +0000 (12:45 +0000)]
Add the missed 'p' flag to getopt() optstring argument.

MFC after: 1 week

13 years agoFix a typo in a comment.
Justin T. Gibbs [Tue, 14 Dec 2010 20:57:40 +0000 (20:57 +0000)]
Fix a typo in a comment.

Noticed by: Attila Nagy <bra@fsn.hu>

13 years agoRevert r216423 per request from Jilles.
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.

13 years agoStop lying about supporting cpu_est_clockrate() when TSC is invariant. This
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.

13 years agoWhen printf is being used as a sh(1) builtin, it can not call
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@.

This is logically a revert of revision 216422.

13 years agoRemove unecessary and clearly wrong usage of atomic(9).
Pyun YongHyeon [Tue, 14 Dec 2010 17:39:10 +0000 (17:39 +0000)]
Remove unecessary and clearly wrong usage of atomic(9).

Reported by:  avg

13 years agoRemove spurious printf left over from debugging our XenStore support.
Justin T. Gibbs [Tue, 14 Dec 2010 17:23:49 +0000 (17:23 +0000)]
Remove spurious printf left over from debugging our XenStore support.

13 years agoFix a memory leak on the error condition
Kevin Lo [Tue, 14 Dec 2010 15:14:08 +0000 (15:14 +0000)]
Fix a memory leak on the error condition

Reviewed by: rpaulo

13 years agoCheck the return value of malloc().
Kevin Lo [Tue, 14 Dec 2010 15:11:49 +0000 (15:11 +0000)]
Check the return value of malloc().

Reviewed by: hselasky
MFC after: 3 days

13 years agoSlightly different formatting for options list.
Robert Watson [Tue, 14 Dec 2010 10:06:28 +0000 (10:06 +0000)]
Slightly different formatting for options list.

MFC after: 3 days

13 years agoFurther refinements to the xen.4 man page: fix typos, add material on
Robert Watson [Tue, 14 Dec 2010 09:32:37 +0000 (09:32 +0000)]
Further refinements to the xen.4 man page: fix typos, add material on
para-virtualized drivers, clarify how to configure XENHVM on amd64.

MFC after: 3 days

13 years agoJust pass M_ZERO to malloc(9) instead of clearing allocated memory separately.
Pawel Jakub Dawidek [Tue, 14 Dec 2010 06:19:13 +0000 (06:19 +0000)]
Just pass M_ZERO to malloc(9) instead of clearing allocated memory separately.

13 years agoMove sysctl invocation to using a variable that's fully pathed.
Gordon Tetlow [Tue, 14 Dec 2010 06:07:18 +0000 (06:07 +0000)]
Move sysctl invocation to using a variable that's fully pathed.
This prevents errors for users that don't have /sbin in their PATH.

Submitted by: Max Boyarov
Approved by: mentor (wes@ implicit)

13 years agoChange memguard_fudge() so that it can handle km_max being zero. Not
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.

Reviewed by: mdf
Tested by: marius

13 years agoWe work on ctype's and not only on numbers so set LC_ALL instead of
Xin LI [Tue, 14 Dec 2010 01:28:33 +0000 (01:28 +0000)]
We work on ctype's and not only on numbers so set LC_ALL instead of
LC_NUMERIC.

PR: bin/152934
Submitted by: Pedro F. Giffuni <giffunip tutopia.com>
Obtained from: Illumos

13 years agoIEEE Std 1003.1-2008, Section 1.4, Utility Description Defaults says
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.

13 years agoMake use of EX_USAGE for usage().
Xin LI [Tue, 14 Dec 2010 00:21:34 +0000 (00:21 +0000)]
Make use of EX_USAGE for usage().

13 years agoTighten up some of the comments describing turnstiles and sleepqueues.
Kirk McKusick [Mon, 13 Dec 2010 23:53:55 +0000 (23:53 +0000)]
Tighten up some of the comments describing turnstiles and sleepqueues.
No code changes.

Reviewed by: John Baldwin

13 years agoAdd a rudimentary Xen man page summarising the state of Xen on amd64 and
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.

MFC after:      3 days
Sponsored by:   DARPA, AFRL

13 years agoAdd a rudimentary Xen man page summarising the state of Xen on amd64 and
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.

MFC after: 3 days
Sponsored by: DARPA, AFRL

13 years agoThe only caller of mknum() provides a char instead of an int, so make it
Xin LI [Mon, 13 Dec 2010 19:54:42 +0000 (19:54 +0000)]
The only caller of mknum() provides a char instead of an int, so make it
match the definition.

PR: bin/152934
Submitted by: Pedro F. Giffuni <giffunip tutopia.com>
Obtained from: Illumos

13 years agoMove locale.h include to the beginning header section as pointed out by
Xin LI [Mon, 13 Dec 2010 19:50:12 +0000 (19:50 +0000)]
Move locale.h include to the beginning header section as pointed out by
style(9)

Submitted by: Pedro F. Giffuni <giffunip tutopia.com>

13 years agoBump manual page date.
Edward Tomasz Napierala [Mon, 13 Dec 2010 19:03:10 +0000 (19:03 +0000)]
Bump manual page date.

13 years agoAfter PSARC/2010/029, "canonical six" no longer exists.
Edward Tomasz Napierala [Mon, 13 Dec 2010 19:01:23 +0000 (19:01 +0000)]
After PSARC/2010/029, "canonical six" no longer exists.

13 years agoRecognize NFSv4 ACL semantics and run proper regression test.
Edward Tomasz Napierala [Mon, 13 Dec 2010 18:59:55 +0000 (18:59 +0000)]
Recognize NFSv4 ACL semantics and run proper regression test.

13 years agoAdapt filesystem-independent NFSv4 ACL code (used by UFS, but not by ZFS)
Edward Tomasz Napierala [Mon, 13 Dec 2010 18:56:04 +0000 (18:56 +0000)]
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.

13 years agoUpdates for I2C devices on XLR engg boards.
Jayachandran C. [Mon, 13 Dec 2010 17:53:38 +0000 (17:53 +0000)]
Updates for I2C devices on XLR engg boards.

- ds1374u : use multi-byte write.
- at24co2n, max6657: remove mutex, iicbus has the necessary locking.

Submitted by: Sreekanth M. S. (kanthms at netlogicmicro com)

13 years agoFreeBSD committer Dan Moschuk has passed away. Here is his death notice:
Warner Losh [Mon, 13 Dec 2010 16:23:02 +0000 (16:23 +0000)]
FreeBSD committer Dan Moschuk has passed away.  Here is his death notice:
http://www.lifenews.ca/thespec/profile/98251--moschuk-daniel

PR: 147479

13 years agofix mips build breakage introduced in r216375: atomic_store_int doesn't exists
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

13 years agoUSB probing often takes a long time and finishes finding devices after init
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.

MFC after: 3 days

13 years agoAdd options NO_ADAPTIVE_SX to the XENHVM kernel configuration, matching
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.

MFC after: 3 days
Discussed with: attilio