]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUpdate to use DEVMETHOD_END.
marius [Tue, 22 Nov 2011 21:49:29 +0000 (21:49 +0000)]
Update to use DEVMETHOD_END.

12 years ago- There's no need to overwrite the default device method with the default
marius [Tue, 22 Nov 2011 21:28:20 +0000 (21:28 +0000)]
- There's no need to overwrite the default device method with the default
  one. Interestingly, these are actually the default for quite some time
  (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
  since r52045) but even recently added device drivers do this unnecessarily.
  Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
  Discussed with: jhb
- Also while at it, use __FBSDID.

12 years agoFor IP1001 PHY, do not set multi-port device(MASTER). Ideally this
yongari [Tue, 22 Nov 2011 21:22:06 +0000 (21:22 +0000)]
For IP1001 PHY, do not set multi-port device(MASTER).  Ideally this
bit should not affect link establishment process of auto-negotiation
if manual configuration is not used, which is true in auto-negotiation.
However it seems setting this bit interfere with IP1001 PHY's
down-shifting feature such that establishing a 10/100Mbps link failed
when 1000baseT link is not available during auto-negotiation process.

Tested by: Andrey Smagin <samspeed <> mail dot ru >

12 years agoRemove libpam from _prebuild_libs. This should unbreak the -jX build.
des [Tue, 22 Nov 2011 21:18:14 +0000 (21:18 +0000)]
Remove libpam from _prebuild_libs.  This should unbreak the -jX build.

MFC after: 3 weeks

12 years agoNo need in procfs(5).
trociny [Tue, 22 Nov 2011 21:14:46 +0000 (21:14 +0000)]
No need in procfs(5).

MFC after: 2 weeks

12 years agoNow kvm_getenvv() and kvm_getargv() don't need procfs(5).
trociny [Tue, 22 Nov 2011 21:12:28 +0000 (21:12 +0000)]
Now kvm_getenvv() and kvm_getargv() don't need procfs(5).

MFC after: 2 weeks

12 years agoAdd new options, -e and -x, to display process environment variables
trociny [Tue, 22 Nov 2011 20:59:52 +0000 (20:59 +0000)]
Add new options, -e and -x, to display process environment variables
and ELF auxiliary vectors.

MFC after: 2 weeks

12 years agoAnnounce flow control capability to underlying PHY driver.
yongari [Tue, 22 Nov 2011 20:57:06 +0000 (20:57 +0000)]
Announce flow control capability to underlying PHY driver.
Pause timer value is initialized to 0xFFFF. Controller allows just
4 different TX pause thresholds. The lowest possible threshold
value looks too aggressive so use next available threshold value.

12 years agoRetire linprocfs_doargv(). Instead use new functions, proc_getargv()
trociny [Tue, 22 Nov 2011 20:45:11 +0000 (20:45 +0000)]
Retire linprocfs_doargv(). Instead use new functions, proc_getargv()
and proc_getenvv(), which were implemented using linprocfs_doargv() as
a reference.

Suggested by: kib
Reviewed by: kib
Approved by: des (linprocfs maintainer)
MFC after: 2 weeks

12 years agoRework link establishment and link state detection logic.
yongari [Tue, 22 Nov 2011 20:45:09 +0000 (20:45 +0000)]
Rework link establishment and link state detection logic.
 - Remove MIIBUS statchg callback and program VGE_DIAGCTL before
   initiating link establishment.  Previously driver used to
   program VGE_DIAGCTL after getting a link in statchg callback.
   It seems the VGE_DIAGCTL register works like a kind of MII
   register such that it requires setting a 'to be' mode in advance
   rather than relying on resolved speed/duplex of established link.
   This means the statchg callback is not needed in driver.  In
   addition, if there was no link at the time of media change, this
   was not called at all.
 - Introduce vge_ifmedia_upd_locked() to change current media to
   configured one.  Actual media change is performed only after PHY
   reset and VGE_DIAGCTL setup.
 - In WOL configuration, make sure to clear forced mode such that
   controller can rely on auto-negotiation.
 - Unlike most other drivers that use miibus(4), vge(4) used
   controller's auto-polling feature for link state tracking via
   interrupt.  This came from controller's inefficient mechanism to
   access MII registers.  On link state change interrupt, vge(4)
   used to get current link state with series of MII register
   accesses.  Because vge(4) already enabled auto polling, read PHY
   status register to resolved speed/duplex/flow control parameters.

vge(4) still does not drive MII_TICK to reduce number of MII
register accesses which in turn means the driver does not know the
status of auto-negotiation.  This was a one of long standing
issue of vge(4).  Probably driver may be able to implement a timer
that keeps track of auto-negotiation state and restart
auto-negotiation when driver couldn't establish a link within a
specified period.  However the controller does not provide a
reliable way to detect auto-negotiation failure so I'm not sure
whether it's worth to implement it in driver.

Alternatively driver can completely disable MII auto-polling and
let miibus(4) poll link state by driving MII_TICK.  This may reduce
unnecessary overhead of stopping/restarting MII auto-polling of
controller.  Unfortunately it was known that some variants of
controller does not work correctly if MII auto-polling is disabled.

12 years agoIn procfs_doproccmdline() if arguments are not cashed read them from
trociny [Tue, 22 Nov 2011 20:43:03 +0000 (20:43 +0000)]
In procfs_doproccmdline() if arguments are not cashed read them from
the process stack.

Suggested by: kib
Reviewed by: kib
Tested by: pho
MFC after: 2 weeks

12 years agoAdd new sysctls, KERN_PROC_ENV and KERN_PROC_AUXV, to return
trociny [Tue, 22 Nov 2011 20:40:18 +0000 (20:40 +0000)]
Add new sysctls, KERN_PROC_ENV and KERN_PROC_AUXV, to return
environment strings and ELF auxiliary vectors from a process stack.

Make sysctl_kern_proc_args to read not cached arguments from the
process stack.

Export proc_getargv() and proc_getenvv() so they can be reused by
procfs and linprocfs.

Suggested by: kib
Reviewed by: kib
Discussed with: kib, rwatson, jilles
Tested by: pho
MFC after: 2 weeks

12 years agoImprove logging:
glebius [Tue, 22 Nov 2011 19:42:17 +0000 (19:42 +0000)]
Improve logging:
- don't hardcode function name
- use LOG_DEBUG for such a debug message
- print error value

12 years agostyle(9) nit
glebius [Tue, 22 Nov 2011 19:39:27 +0000 (19:39 +0000)]
style(9) nit

12 years agoFix SIOCDIFADDR semantics: if no address is specified, then delete first one.
glebius [Tue, 22 Nov 2011 19:37:57 +0000 (19:37 +0000)]
Fix SIOCDIFADDR semantics: if no address is specified, then delete first one.

12 years ago- Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t'
marius [Tue, 22 Nov 2011 19:31:43 +0000 (19:31 +0000)]
- Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t'
  and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from
  device drivers.
- Update the example in driver.9 to use DEVMETHOD_END.

Submitted by: jhb
MFC after: 3 days

12 years agoAlways start MII auto polling before accessing any MII registers.
yongari [Tue, 22 Nov 2011 18:58:39 +0000 (18:58 +0000)]
Always start MII auto polling before accessing any MII registers.

12 years agoDefine __FreeBSD_kernel__ macro in sys/param.h.
rmh [Tue, 22 Nov 2011 18:53:54 +0000 (18:53 +0000)]
Define __FreeBSD_kernel__ macro in sys/param.h.

__FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
which by definition is always true on FreeBSD. This macro is also defined
on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD.

It is tempting to use this macro in userland code when we want to enable
kernel-specific routines, and in fact it's fine to do this in code that
is part of FreeBSD itself.  However, be aware that as presence of this
macro is still not widespread (e.g. older FreeBSD versions, 3rd party
compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in
external applications without also checking for __FreeBSD__ as an
alternative.

Approved by: kib (mentor)
MFC after: 2 weeks

12 years agoAppend unit number to the WMI status device name to allow attaching
jh [Tue, 22 Nov 2011 16:44:50 +0000 (16:44 +0000)]
Append unit number to the WMI status device name to allow attaching
multiple acpi_wmi(4) instances.

PR: kern/162491
Reviewed by: avg

12 years agoAvoid panics from recursive rename operations. Not a perfect patch but
ivoras [Tue, 22 Nov 2011 16:18:12 +0000 (16:18 +0000)]
Avoid panics from recursive rename operations. Not a perfect patch but
good enough for now.

PR: kern/159418
Submitted by: Gleb Kurtsou
Reviewed by: kib
MFC after: 1 month

12 years agoFix a crash when trying to duplicate a locale that contains some implicit C locale...
theraven [Tue, 22 Nov 2011 14:11:42 +0000 (14:11 +0000)]
Fix a crash when trying to duplicate a locale that contains some implicit C locale components.

Reported by: Michael Butler
Approved by: dim (mentor)

12 years agoPut all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.
kib [Tue, 22 Nov 2011 13:30:36 +0000 (13:30 +0000)]
Put all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.
They are confusing to user, and not informative for general consumption.

MFC after: 1 week

12 years agoRemove the wrong comment about ufs not being loadable.
kib [Tue, 22 Nov 2011 13:27:53 +0000 (13:27 +0000)]
Remove the wrong comment about ufs not being loadable.
Note that only root filesystem module needs to be available
before root is mounted.

MFC after: 1 week

12 years ago- Use ppb_assert_locked() rather than using explicit mtx_assert call
attilio [Tue, 22 Nov 2011 11:35:24 +0000 (11:35 +0000)]
- Use ppb_assert_locked() rather than using explicit mtx_assert call
- Make ppbus code agnostic in regard of INVARIANTS option

MFC after: 2 weeks

12 years ago- fix some style(9) nits with my last commit
eadler [Tue, 22 Nov 2011 02:50:24 +0000 (02:50 +0000)]
- fix some style(9) nits with my last commit
- add a comment explaining why I used '|' instead of '||'

Submitted by: danfe@
Approved by: emaste@

12 years agoThis patch enables the new/default NFS server's use of shared
rmacklem [Tue, 22 Nov 2011 00:35:30 +0000 (00:35 +0000)]
This patch enables the new/default NFS server's use of shared
vnode locking for read, readdir, readlink, getattr and access.
It is hoped that this will improve server performance for these
operations, since they will no longer be serialized for a given
file/vnode.

12 years ago- add check for pointer equality prior to performing the O(n) pass
eadler [Tue, 22 Nov 2011 00:07:53 +0000 (00:07 +0000)]
- add check for pointer equality prior to performing the O(n) pass
- while here change 's' to 's1' in strcoll

Submitted by: eadler@
Reviewed by: theraven@
Approved by: brooks@
MFC after: 2 weeks

12 years ago(Hopefully) Fix the build with clang by removing a typedef that's no longer needed.
theraven [Mon, 21 Nov 2011 23:32:14 +0000 (23:32 +0000)]
(Hopefully) Fix the build with clang by removing a typedef that's no longer needed.

Approved by: brooks (mentor)

12 years agoUse the correct lock when calling msleep().
adrian [Mon, 21 Nov 2011 22:57:28 +0000 (22:57 +0000)]
Use the correct lock when calling msleep().

This fixes panics that users have been seeing when operating in station mode,
where the interface undergoes a lot more resets then in hostap mode (ie whilst
doing channel scanning.)

Reported by: arundel, wblock@wonkity.com
Sponsored by: Hobnob, Inc.

12 years agoThe DC calibration result obtained during initialization can't be
bschmidt [Mon, 21 Nov 2011 22:19:12 +0000 (22:19 +0000)]
The DC calibration result obtained during initialization can't be
passed over to the runtime firmware on 6050 devices. Instead let
the runtime firmware do the calibration itself. This fixes support
for the 6050 series devices.

Obtained from: OpenBSD
Submitted by: kevlo
Tested by: lx, Tz-Huan Huang(earlier version)

12 years agoFix some whitespace pollution.
adrian [Mon, 21 Nov 2011 21:59:01 +0000 (21:59 +0000)]
Fix some whitespace pollution.

12 years agoRevert back to revision 227649 because of license uncertainity.
mm [Mon, 21 Nov 2011 20:33:18 +0000 (20:33 +0000)]
Revert back to revision 227649 because of license uncertainity.

Manual pages from OpenSolaris svn_134 are still properly CDDL licensed
but I have been informed that the parts from s11ex are uncertain even
if they contain a CDDL header.

12 years agoImprove the way to calculate available pages in tmpfs:
delphij [Mon, 21 Nov 2011 20:26:22 +0000 (20:26 +0000)]
Improve the way to calculate available pages in tmpfs:

 - Don't deduct wired pages from total usable counts because it does not
   make any sense.  To make things worse, on systems where swap size is
   smaller than physical memory and use a lot of wired pages (e.g. ZFS),
   tmpfs can suddenly have free space of 0 because of this;
 - Count cached pages as available; [1]
 - Don't count inactive pages as available, technically we could but that
   might be too aggressive; [1]

[1] Suggested by kib@

MFC after: 1 week

12 years agoThis check isn't needed now, sanity checking done in the beginning.
glebius [Mon, 21 Nov 2011 20:07:12 +0000 (20:07 +0000)]
This check isn't needed now, sanity checking done in the beginning.
Missed it in last commit.

12 years agoCorrect and expand BSD partitioning scheme description.
wblock [Mon, 21 Nov 2011 18:04:37 +0000 (18:04 +0000)]
Correct and expand BSD partitioning scheme description.
Correct GUID to GPT in RECOVERING section.

Reviewed by: ae
Approved by: gjb (mentor)
MFC after: 1 week

12 years agoDo dcache flush on CPU core before enabling threads.
jchandra [Mon, 21 Nov 2011 16:43:24 +0000 (16:43 +0000)]
Do dcache flush on CPU core before enabling threads.

The dcache flush has to be done using the core control registers before
splitting the L1D cache by enabling the hardware threads.

Also replace .word calls for mfcr/mtcr with a C macro.

In collaboration with: prabhath at netlogicmicro com

12 years agoSimplify the libpam build by removing the shared modules' dependency
des [Mon, 21 Nov 2011 16:40:39 +0000 (16:40 +0000)]
Simplify the libpam build by removing the shared modules' dependency
on the shared library.  The modules are loaded by the library, so we
know it'll be there when we need it.

MFC after: 3 weeks

12 years agoAs threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow a
des [Mon, 21 Nov 2011 16:35:57 +0000 (16:35 +0000)]
As threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow a
Makefile to specify different CFLAGS for shared and static libraries.

MFC after: 3 weeks

12 years agoClean up some cruft in the NFSv4 client left over from the
rmacklem [Mon, 21 Nov 2011 16:06:23 +0000 (16:06 +0000)]
Clean up some cruft in the NFSv4 client left over from the
OpenBSD port, so that it is more readable. No logic change
is made by this commit.

MFC after: 2 weeks

12 years agoFix mismerge in copyright of zpool(8).
mm [Mon, 21 Nov 2011 15:33:37 +0000 (15:33 +0000)]
Fix mismerge in copyright of zpool(8).

MFC after: 4 days

12 years agoUpdate zfs(8) and zpool(8) manpages from CDDL-licensed sources [1].
mm [Mon, 21 Nov 2011 15:26:20 +0000 (15:26 +0000)]
Update zfs(8) and zpool(8) manpages from CDDL-licensed sources [1].
Improved alignment for a maximum width of 80 characters.
Mark unsupported parts as such.

Reported to vendor: Illumos issue #1801

References:
https://www.illumos.org/issues/1801

Obtained from: OpenSolaris CDDL manual pages (snv_134, s11express) [1]
MFC after: 4 days

12 years agoFor now, remove MANFILTER from ZFS manpages (bad effect on html output).
mm [Mon, 21 Nov 2011 14:50:17 +0000 (14:50 +0000)]
For now, remove MANFILTER from ZFS manpages (bad effect on html output).

MFC after: 4 days

12 years agoAdd history for setsockopt(2).
pluknet [Mon, 21 Nov 2011 14:36:19 +0000 (14:36 +0000)]
Add history for setsockopt(2).

PR: docs/162719
Submitted by: Niclas Zeising <niclas at zeising gmail>
MFC after: 1 week

12 years agoHistorically in_control() did not check sockaddrs supplied with
glebius [Mon, 21 Nov 2011 14:10:13 +0000 (14:10 +0000)]
Historically in_control() did not check sockaddrs supplied with
structs ifreq/in_aliasreq and there've been several panics due
to that problem. All these panics were fixed just a couple of
lines above the panicing code.

Take a more general approach: sanity check sockaddrs supplied
with SIOCAIFADDR and SIOCSIF*ADDR at the beggining of the
function and drop all checks below.

One check is now disabled due to strange code in ifconfig(8)
that I've removed recently. I'm going to enable it with next
__FreeBSD_version bump.

Historically in_ifinit() was able to recover from an error
and restore old address. Nowadays this feature isn't working
for all error cases, but for some of them. I suppose no software
relies on this behavior, so I'd like to remove it, since this
simplifies code a lot.

Also, move if_scrub() earlier in the in_ifinit(). It is more
correct to wipe routes before removing address from local
address list, and interface address list.

Silence from: bz, brooks, andre, rwatson, 3 weeks

12 years agoBe more informative for "unknown hardware address format" message.
glebius [Mon, 21 Nov 2011 13:40:35 +0000 (13:40 +0000)]
Be more informative for "unknown hardware address format" message.

Submitted by: Andrzej Tobola <ato iem.pw.edu.pl>

12 years ago- Add Pulse-Per-Second timestamping using raw ffcounter and corresponding
lstewart [Mon, 21 Nov 2011 13:34:29 +0000 (13:34 +0000)]
- Add Pulse-Per-Second timestamping using raw ffcounter and corresponding
  ffclock time in seconds.

- Add IOCTL to retrieve ffclock timestamps from userland.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoIntroduce the same mutex-wise fix in r227758 for sx locks.
attilio [Mon, 21 Nov 2011 12:59:52 +0000 (12:59 +0000)]
Introduce the same mutex-wise fix in r227758 for sx locks.

The functions that offer file and line specifications are:
- sx_assert_
- sx_downgrade_
- sx_slock_
- sx_slock_sig_
- sx_sunlock_
- sx_try_slock_
- sx_try_xlock_
- sx_try_upgrade_
- sx_unlock_
- sx_xlock_
- sx_xlock_sig_
- sx_xunlock_

Now vm_map locking is fully converted and can avoid to know specifics
about locking procedures.
Reviewed by: kib
MFC after: 1 month

12 years agoBetter use pkill(1) in last commit.
glebius [Mon, 21 Nov 2011 12:23:22 +0000 (12:23 +0000)]
Better use pkill(1) in last commit.

Submitted by: pjd

12 years agoRemove no more relevant XXXRW comments since accessing the vmspace is now
pluknet [Mon, 21 Nov 2011 12:21:00 +0000 (12:21 +0000)]
Remove no more relevant XXXRW comments since accessing the vmspace is now
properly done with the acquired vmspace reference.

Pointed out by: kib

12 years ago- Reduce severity for all ARP events, that can be triggered from remote
glebius [Mon, 21 Nov 2011 12:07:18 +0000 (12:07 +0000)]
- Reduce severity for all ARP events, that can be triggered from remote
  machine to LOG_NOTICE. Exception left to "using my IP address".
- Fix multicast ARP warning: add newline and also log the bad MAC address.

Tested by: Alexander Wittig <wittigal msu.edu>

12 years agoUse the acquired reference to the vmspace instead of direct dereferencing
pluknet [Mon, 21 Nov 2011 10:36:57 +0000 (10:36 +0000)]
Use the acquired reference to the vmspace instead of direct dereferencing
of p->p_vmspace like it is done in sysctl_kern_proc_vmmap().

12 years agoMerge XLP 3XX updates and related rework.
jchandra [Mon, 21 Nov 2011 08:12:36 +0000 (08:12 +0000)]
Merge XLP 3XX updates and related rework.

* Update message station (CMS) code, read queue ids from PCI header.
* Use interrupts to wakeup message handling threads on 3XX
* Update PIC code, read interrupt information from PCI header instead
  of using fixed values.
* Update PCI interrupt handling for the PIC change.
* Update code for getting chip frequency, new code support XLP 3XX
* Misc style(9) fixes

In collaboration with: prabhath at netlogicmicro com (CMS/PIC)
                       venkatesh at netlogicmicro.com (PCI)

12 years agoXLP processors have the release 2 pagegrain register
jchandra [Mon, 21 Nov 2011 07:55:37 +0000 (07:55 +0000)]
XLP processors have the release 2 pagegrain register

Add accessors to cpufunc.h

Obtained from: prabhath at netlogicmicro com

12 years agoAdd new USB IDs to RUN driver.
hselasky [Mon, 21 Nov 2011 07:50:29 +0000 (07:50 +0000)]
Add new USB IDs to RUN driver.

PR: usb/162712
MFC after: 1 week

12 years agoAlways leave the -current kernel debugging options on.
adrian [Mon, 21 Nov 2011 06:45:12 +0000 (06:45 +0000)]
Always leave the -current kernel debugging options on.

12 years agoThe PPC IRQ layer assumes that the IPI IRQ is the last IRQ on the PIC.
nwhitehorn [Mon, 21 Nov 2011 04:35:23 +0000 (04:35 +0000)]
The PPC IRQ layer assumes that the IPI IRQ is the last IRQ on the PIC.
This assumption is invalid and the code should be fixed, but humor it for
now and set the "IPI" for PS3s in the non-SMP case to a large number. This
fixes boot with a non-SMP kernel.

Submitted by: geoffrey dot levand at mail dot ru
MFC after: 1 week

12 years ago- When feed-forward clock support is compiled in, change the BPF header to
lstewart [Mon, 21 Nov 2011 04:17:24 +0000 (04:17 +0000)]
- When feed-forward clock support is compiled in, change the BPF header to
  contain both a regular timestamp obtained from the system clock and the
  current feed-forward ffcounter value. This enables new possibilities including
  comparison of timekeeping performance and timestamp correction during post
  processing.

- Add the net.bpf.ffclock_tstamp sysctl to provide a choice between timestamping
  packets using the feedback or feed-forward system clock.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoFix date.
wblock [Mon, 21 Nov 2011 02:03:18 +0000 (02:03 +0000)]
Fix date.

Approved by: gjb (mentor)
MFC after: 1 week

12 years ago- Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate()
lstewart [Mon, 21 Nov 2011 01:26:10 +0000 (01:26 +0000)]
- Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate()
  system calls to provide feed-forward clock management capabilities to
  userspace processes. ffclock_getcounter() returns the current value of the
  kernel's feed-forward clock counter. ffclock_getestimate() returns the current
  feed-forward clock parameter estimates and ffclock_setestimate() updates the
  feed-forward clock parameter estimates.

- Document the syscalls in the ffclock.2 man page.

- Regenerate the script-derived syscall related files.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoConnect LLVM/clang to the build on powerpc64. After the binutils 2.17.50
nwhitehorn [Mon, 21 Nov 2011 00:49:46 +0000 (00:49 +0000)]
Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50
import, it works without issue.

12 years agoAdd a section that explicitly describes partitioning schemes. Modify
wblock [Mon, 21 Nov 2011 00:02:49 +0000 (00:02 +0000)]
Add a section that explicitly describes partitioning schemes.  Modify
existing sections to refer to the new one.  Rearrange partitioning scheme
list so MBR and EBR types are together.  Also add several corrections for
grammar, clarity, and consistency.

Approved by: gjb (mentor)
MFC after: 1 week

12 years agosh: Allow unsetting OPTIND.
jilles [Sun, 20 Nov 2011 21:48:50 +0000 (21:48 +0000)]
sh: Allow unsetting OPTIND.

Note that only assigning the decimal value 1 resets getopts, as before.

12 years agoReplace 'chflags' with 'file flags' in a comment, since 'chflags'
gjb [Sun, 20 Nov 2011 20:05:47 +0000 (20:05 +0000)]
Replace 'chflags' with 'file flags' in a comment, since 'chflags'
is a command, not a flag itself.

While here, wrap a line for readability.

Submitted by: arundel
MFC after: 3 days
X-MFC-With: 227769, 227770

12 years agoFix the note in r227769 to be less specific to the immutable flag.
gjb [Sun, 20 Nov 2011 19:27:52 +0000 (19:27 +0000)]
Fix the note in r227769 to be less specific to the immutable flag.

Submitted by: arundel
MFC after: 3 days
X-MFC-With: r227769

12 years agoAdd a note to src/Makefile that explains that 'rm' runs twice because the
gjb [Sun, 20 Nov 2011 19:05:32 +0000 (19:05 +0000)]
Add a note to src/Makefile that explains that 'rm' runs twice because the
second invocation only needs to operate on files with the immutable flag
set.

Submitted by: arundel (via private email) (original version)
Discussed on: -toolchain@
MFC after: 3 days

12 years agoAdd two arguments to the nfsrpc_rellockown() function in the NFSv4
rmacklem [Sun, 20 Nov 2011 16:46:50 +0000 (16:46 +0000)]
Add two arguments to the nfsrpc_rellockown() function in the NFSv4
client. This does not change the client's behaviour, but prepares
the code so that nfsrpc_rellockown() can be called elsewhere in a
future commit.

MFC after: 2 weeks

12 years agoRevert part of the r227758 which crept in.
attilio [Sun, 20 Nov 2011 16:36:02 +0000 (16:36 +0000)]
Revert part of the r227758 which crept in.

Pointy hat: attilio
X-MFC: r227758

12 years agoIntroduce macro stubs in the mutex implementation that will be always
attilio [Sun, 20 Nov 2011 16:33:09 +0000 (16:33 +0000)]
Introduce macro stubs in the mutex implementation that will be always
defined and will allow consumers, willing to provide options, file and
line to locking requests, to not worry about options redefining the
interfaces.
This is typically useful when there is the need to build another
locking interface on top of the mutex one.

The introduced functions that consumers can use are:
- mtx_lock_flags_
- mtx_unlock_flags_
- mtx_lock_spin_flags_
- mtx_unlock_spin_flags_
- mtx_assert_
- thread_lock_flags_

Spare notes:
- Likely we can get rid of all the 'INVARIANTS' specification in the
  ppbus code by using the same macro as done in this patch (but this is
  left to the ppbus maintainer)
- all the other locking interfaces may require a similar cleanup, where
  the most notable case is sx which will allow a further cleanup of
  vm_map locking facilities
- The patch should be fully compatible with older branches, thus a MFC
  is previewed (infact it uses all the underlying mechanisms already
  present).

Comments review by: eadler, Ben Kaduk
Discussed with: kib, jhb
MFC after: 1 month

12 years agokey_load_private() ignores the passphrase argument if the private key
des [Sun, 20 Nov 2011 15:18:49 +0000 (15:18 +0000)]
key_load_private() ignores the passphrase argument if the private key
is unencrypted.  This defeats the nullok check, because it means a
non-null passphrase will successfully unlock the key.

To address this, try at first to load the key without a passphrase.
If this succeeds and the user provided a non-empty passphrase *or*
nullok is false, reject the key.

MFC after: 1 week
Noticed by: Guy Helmer <guy.helmer@palisadesystems.com>

12 years agoAdd support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
tuexen [Sun, 20 Nov 2011 15:00:45 +0000 (15:00 +0000)]
Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

MFC after: 3 months.

12 years agoImplement xlocale APIs from Darwin, mainly for use by libc++. This adds a
theraven [Sun, 20 Nov 2011 14:45:42 +0000 (14:45 +0000)]
Implement xlocale APIs from Darwin, mainly for use by libc++.  This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)

12 years agoUpdate and desolarization of zdb(8) and zstreamdump(1) manual pages:
mm [Sun, 20 Nov 2011 13:11:29 +0000 (13:11 +0000)]
Update and desolarization of zdb(8) and zstreamdump(1) manual pages:
- synchronized to match new vendor code [1]
- removed ATTRIBUTES sections
- updated SEE ALSO sections
- properly updated copyright information (required by CDDL)
- remove empty lines via MANFILTER

Obtained from: Illumos [1]
MFC after: 5 days

12 years ago- Add support for Add LOGITECH Webcam C100
miwi [Sun, 20 Nov 2011 12:26:20 +0000 (12:26 +0000)]
- Add support for Add LOGITECH Webcam C100
- While here whitespace fixes

PR: usb/161559
Submitted by: Sergey Zaykov <mail_of_sergey@mail.ru>
Reviewed by: hselasky
Approved by: hselasky, rwatson (mentor)

12 years ago- Add missing usb and ucom devices
miwi [Sun, 20 Nov 2011 12:18:21 +0000 (12:18 +0000)]
- Add missing usb and ucom devices

PR: usb/160301
Submitted by: Garrett Cooper <gcooper@ixsystems.com>
Reviewed by: hselasky
Approved by: hselasky, rwatson (mentor)
MFC after: 3 Days

12 years agoGiven that the typical usage of pause() is pause("zzz", hz / N), where N can
hselasky [Sun, 20 Nov 2011 08:36:18 +0000 (08:36 +0000)]
Given that the typical usage of pause() is pause("zzz", hz / N), where N can
be greater than hz in some cases, simply ignore a timeout value of zero.

Suggested by: Bruce Evans
MFC after: 1 week

12 years agoMinor style change:
hselasky [Sun, 20 Nov 2011 08:29:23 +0000 (08:29 +0000)]
Minor style change:
Simplify the description of pause() and shorten the KASSERT message in pause.
Also add a clamp for the timo argument in the non-KASSERT case.

Suggested by: Bruce Evans
MFC after: 1 week

12 years ago- Provide a sysctl interface to change the active system clock at runtime.
lstewart [Sun, 20 Nov 2011 05:32:12 +0000 (05:32 +0000)]
- Provide a sysctl interface to change the active system clock at runtime.

- Wrap [get]{bin,nano,micro}[up]time() functions of sys/time.h to allow
  requesting time from either the feedback or the feed-forward clock. If a
  feedback (e.g. ntpd) and feed-forward (e.g. radclock) daemon are both running
  on the system, both kernel clocks are updated but only one serves time.

- Add similar wrappers for the feed-forward difference clock.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoFix a whitespace nit.
lstewart [Sun, 20 Nov 2011 01:48:22 +0000 (01:48 +0000)]
Fix a whitespace nit.

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoProvide high-level functions to access the feed-forward absolute and difference
lstewart [Sun, 20 Nov 2011 01:20:50 +0000 (01:20 +0000)]
Provide high-level functions to access the feed-forward absolute and difference
clocks. Each routine can output an upper bound on the absolute time or time
interval requested. Different flavours of absolute time can be requested, for
example with or without leap seconds, monotonic or not, etc.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoSince the nfscl_cleanup() function isn't used by the FreeBSD NFSv4 client,
rmacklem [Sun, 20 Nov 2011 01:18:47 +0000 (01:18 +0000)]
Since the nfscl_cleanup() function isn't used by the FreeBSD NFSv4 client,
delete the code and fix up the related comments. This should not have
any functional effect on the client.

MFC after: 2 weeks

12 years agoPost r223774 the NFSv4 client never uses the linked list with the
rmacklem [Sun, 20 Nov 2011 00:39:15 +0000 (00:39 +0000)]
Post r223774 the NFSv4 client never uses the linked list with the
head nfsc_defunctlockowner. This patch simply removes the code that
loops through this always empty list, since the code no longer does
anything useful. It should not have any effect on the client's
behaviour.

MFC after: 2 weeks

12 years agoAdd 2010 and 2011 copyrights.
brueffer [Sat, 19 Nov 2011 22:14:08 +0000 (22:14 +0000)]
Add 2010 and 2011 copyrights.

12 years agoAdd some (totally untested!) code to correctly set the RF half/quarter
adrian [Sat, 19 Nov 2011 21:12:35 +0000 (21:12 +0000)]
Add some (totally untested!) code to correctly set the RF half/quarter
mode configuration registers. This is apparently required for correct
behaviour, but also requires the chip to actually officially support it.

Sponsored by: Hobnob, Inc.

12 years agoBegin breaking apart the receive setup/stop path in preparation for more
adrian [Sat, 19 Nov 2011 21:05:31 +0000 (21:05 +0000)]
Begin breaking apart the receive setup/stop path in preparation for more
"correct" handling of frames in the RX pending queue during interface
transitions.

* ath_stoprecv() doesn't blank out the descriptor list - that's what
  ath_startrecv() does. So, change a comment to reflect that.

* ath_stoprecv() does include a large (3ms) delay to let pending DMA
  complete. However, I'm under the impression that the stopdma hal
  method does check for a bit in the PCU to indicate DMA has stopped.
  So, to help with fast abort and restart, modify ath_stoprecv() to take
  a flag which indicates whether this is needed.

* Modify the uses of ath_stoprecv() to pass in a flag to support the
  existing behaviour (ie, do the delay.)

* Remove some duplicate PCU teardown code (which wasn't shutting down DMA,
  so it wasn't entirely correct..) and replace it with a call to
  ath_stoprecv(sc, 0) - which disables the DELAY call.

The upshoot of this is now channel change doesn't simply drop completed
frames on the floor, but instead it cleanly handles those frames.
It still discards pending TX frames in the software and hardware queues
as there's no (current) logic which forcibly recalculates the rate control
information (or whether they're appropriate to be on the TX queue after
a channel change), that'll come later.

This still doesn't stop all the sources of queue stalls but it does
tidy up some of the code duplication.

To be complete, queue stalls now occur during normal behaviour -
they only occur after some kind of broken behaviour causes an interface
or node flush, upsetting the TX/RX BAW. Subsequent commits will
incrementally fix these and other related issues.

Sponsored by: Hobnob, Inc.

12 years agoRename the linker emulation name for powerpc and powerc64. This is needed that
andreast [Sat, 19 Nov 2011 19:25:57 +0000 (19:25 +0000)]
Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.

12 years agoFor unknown reason, since rev 1.1 of ifconfig.c, sin_family isn't
glebius [Sat, 19 Nov 2011 19:06:08 +0000 (19:06 +0000)]
For unknown reason, since rev 1.1 of ifconfig.c, sin_family isn't
set properly for the mask argument.

Since I'd like to improve argument sanity checking in kernel
side, in in_control(), fix this.

12 years agoPull in r144505 from upstream clang trunk:
dim [Sat, 19 Nov 2011 18:01:14 +0000 (18:01 +0000)]
Pull in r144505 from upstream clang trunk:

Fix the signature of the getcontext builtin, eliminating incorrect
warnings about its prototype.

This also adds a -W(no-)builtin-requires-header option, which can be
used to enable or disable warnings of this kind.

MFC after: 1 week

12 years agoPull in r144237 from upstream clang trunk:
dim [Sat, 19 Nov 2011 17:15:20 +0000 (17:15 +0000)]
Pull in r144237 from upstream clang trunk:

Fix the signature of __sigsetjmp and sigsetjmp.  This eliminates
incorrect warnings about the prototypes of these functions.

MFC after: 1 week

12 years agoPull in r144110 from upstream clang trunk:
dim [Sat, 19 Nov 2011 17:09:36 +0000 (17:09 +0000)]
Pull in r144110 from upstream clang trunk:

Mark the overloaded atomic builtins as having custom type checking,
which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes llvm/clang PR11320.

MFC after: 1 week

12 years ago- Add myself
scheidell [Sat, 19 Nov 2011 16:47:26 +0000 (16:47 +0000)]
- Add myself

Approved by: gabor(mentor)

12 years agoInitial version of cesa(4) driver for Marvell crypto engine and security
raj [Sat, 19 Nov 2011 16:30:06 +0000 (16:30 +0000)]
Initial version of cesa(4) driver for Marvell crypto engine and security
accelerator.

The following algorithms and schemes are supported:
 - 3DES, AES, DES
 - MD5, SHA1

Obtained from: Semihalf
Written by: Piotr Ziecik

12 years agoRemove unused variable ubase.
jchandra [Sat, 19 Nov 2011 15:08:49 +0000 (15:08 +0000)]
Remove unused variable ubase.

This vaiable is initialized but not used.

12 years agoRemvoe unused file
jchandra [Sat, 19 Nov 2011 15:01:09 +0000 (15:01 +0000)]
Remvoe unused file

mips/nlm/uart_cpu_xlp.c has replaced uart_bus_xlp_iodi.c

12 years ago- Add new loader_logo orbbw to default.conf
miwi [Sat, 19 Nov 2011 14:44:29 +0000 (14:44 +0000)]
- Add new loader_logo orbbw to default.conf

PR: 162608
Submitted by: manolis
Approved by: rwatson (mentor)
MFC after: 3 Days

12 years ago- Whitespaces fixed only
miwi [Sat, 19 Nov 2011 14:42:06 +0000 (14:42 +0000)]
- Whitespaces fixed only

Approved by: rwatson (mentor)

12 years agoFix USB compilation, and add USB options to XLP conf
jchandra [Sat, 19 Nov 2011 14:33:14 +0000 (14:33 +0000)]
Fix USB compilation, and add USB options to XLP conf

Remove obsolete header file included in usb_init.c

12 years agoFixup cache flush definitions for XLP
jchandra [Sat, 19 Nov 2011 14:14:35 +0000 (14:14 +0000)]
Fixup cache flush definitions for XLP

mco_icache_sync_range was earlier set to mipsNN_icache_sync_range_index_32
which is not necessary, revert this.
Also, the data cache is coherent so write back is not really needed. This
change is experimental.

12 years agoCore structure and functions to support a feed-forward clock within the kernel.
lstewart [Sat, 19 Nov 2011 14:10:16 +0000 (14:10 +0000)]
Core structure and functions to support a feed-forward clock within the kernel.
Implement ffcounter, a monotonically increasing cumulative counter on top of the
active timecounter. Provide low-level functions to read the ffcounter and
convert it to absolute time or a time interval in seconds using the current
ffclock estimates, which track the drift of the oscillator. Add a ring of
fftimehands to track passing of time on each kernel tick and pick up updates of
ffclock estimates.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

Submitted by: Julien Ridoux (jridoux at unimelb edu au)

12 years agoWhitespace fixes in XLP HAL files.
jchandra [Sat, 19 Nov 2011 14:06:15 +0000 (14:06 +0000)]
Whitespace fixes in XLP HAL files.

Also fixup a macro in iomap.h

12 years agoSimplify the usb_pause_mtx() function by factoring out the generic parts
hselasky [Sat, 19 Nov 2011 11:17:27 +0000 (11:17 +0000)]
Simplify the usb_pause_mtx() function by factoring out the generic parts
to the kernel's pause() function. The pause() function can now be used
when cold != 0. Also assert that the timeout in system ticks must be
positive.

Suggested by: Bruce Evans
MFC after: 1 week