]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoRegen.
jhb [Thu, 29 Dec 2011 15:35:47 +0000 (15:35 +0000)]
Regen.

12 years agoImplement linux_fadvise64() and linux_fadvise64_64() using
jhb [Thu, 29 Dec 2011 15:34:59 +0000 (15:34 +0000)]
Implement linux_fadvise64() and linux_fadvise64_64() using
kern_posix_fadvise().

Reviewed by: silence on emulation@
MFC after: 2 weeks

12 years agoFix typo in comment.
rwatson [Thu, 29 Dec 2011 15:34:59 +0000 (15:34 +0000)]
Fix typo in comment.

MFC after: 3 days

12 years agoDon't define static_assert for C++.
ed [Thu, 29 Dec 2011 14:41:17 +0000 (14:41 +0000)]
Don't define static_assert for C++.

Even though _Static_assert() is pretty robust for C code, it cannot work
correctly with C++ code.  This is due to the fact that C++ template
parameters may contain commas that are not enclosed in parentheses. For
example:

static_assert(foo<int, int>::bar == baz, "...");

This causes _Static_assert to be called with an excessive number of
parameters.  If you want to use static_assert in C++, just use a C++11
compiler.

Reported on: current@, ports@

12 years agoReencode files from latin1 to UTF-8.
uqs [Thu, 29 Dec 2011 12:33:27 +0000 (12:33 +0000)]
Reencode files from latin1 to UTF-8.

12 years agoUpdate LOCKLEAF comment: it should say "vnode".
pluknet [Thu, 29 Dec 2011 12:28:05 +0000 (12:28 +0000)]
Update LOCKLEAF comment: it should say "vnode".
Inspired by PR docs/11596.

12 years agoAdd PCI Id for the Intel AMT serial interface as found on my DQ67OW.
kib [Thu, 29 Dec 2011 08:27:37 +0000 (08:27 +0000)]
Add PCI Id for the Intel AMT serial interface as found on my DQ67OW.

MFC after: 1 week

12 years agoI'm not yet an alumni, add myself in the right section
bapt [Thu, 29 Dec 2011 08:13:11 +0000 (08:13 +0000)]
I'm not yet an alumni, add myself in the right section

Approved by: des (mentor)

12 years agoFlesh out the RSPRO GPIO config, including the RF LED.
adrian [Thu, 29 Dec 2011 06:07:24 +0000 (06:07 +0000)]
Flesh out the RSPRO GPIO config, including the RF LED.

12 years agoBreak out the AR71XX config file into _BASE and board specific
adrian [Thu, 29 Dec 2011 05:51:48 +0000 (05:51 +0000)]
Break out the AR71XX config file into _BASE and board specific
bits.

The ROUERSTATION and RSPRO variants contain:

* the board specific bits (eg the RTC for RSPRO, later on it'll
  include the GPIO/LED definitions);
* the boot specific bits (eg, on-board flash, usb flash, etc).

For now the AR71XX_BASE file contains the common board config,
drivers and net80211/ath wireless drivers.

I'll follow this up with config files for the other boards I
have (eg the Ubiquiti LSSR71, as well as some Mikrotik boards
that use the AR71XX and atheros reference boards) which will
be quite easy to do now.

12 years agosh: Allow quoting ^ and ] in bracket expressions.
jilles [Wed, 28 Dec 2011 23:51:17 +0000 (23:51 +0000)]
sh: Allow quoting ^ and ] in bracket expressions.

12 years agosh: Use dirent.d_type in pathname generation.
jilles [Wed, 28 Dec 2011 23:40:46 +0000 (23:40 +0000)]
sh: Use dirent.d_type in pathname generation.

This improves performance for globs where a slash or another component
follows a component with metacharacters by eliminating unnecessary attempts
to open directories that are not.

12 years agosh: Cache de->d_namlen in a local variable.
jilles [Wed, 28 Dec 2011 23:30:17 +0000 (23:30 +0000)]
sh: Cache de->d_namlen in a local variable.

12 years agoImport the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card
delphij [Wed, 28 Dec 2011 23:26:58 +0000 (23:26 +0000)]
Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card
driver.  This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after: 2 weeks

12 years agoSet maximum I/O size for mps(4) to MAXPHYS. Looking into the code, I see
mav [Wed, 28 Dec 2011 22:49:28 +0000 (22:49 +0000)]
Set maximum I/O size for mps(4) to MAXPHYS. Looking into the code, I see
no reason why it should be limited to 64K of DFLTPHYS. DMA data tag is any
way set to allow MAXPHYS, S/G lists (chain elements) are sufficient and
overflows are also handled. On my tests even 1MB I/Os are working fine.

Reviewed by: ken@

12 years ago1. Correct capitalization of the nobility particle for
dougb [Wed, 28 Dec 2011 22:18:53 +0000 (22:18 +0000)]
1. Correct capitalization of the nobility particle for
   Francois de La Rochefoucauld introduced in r228909 [1],[2]

2. Change c-cedilla introduced in the same commit to ASCII c since
   non-UTF-8 terminals will choke on the non-ASCII text. [2],[3]

Pointed out by: bf [1]
Reviewed by: French-speakers on #bsdcode [2]
Requested by: uqs [3]

12 years agosh: Do not force special builtins non-special in optimized command subst.
jilles [Wed, 28 Dec 2011 22:10:12 +0000 (22:10 +0000)]
sh: Do not force special builtins non-special in optimized command subst.

This is not necessary: errors are already caught in evalbackcmd() and
forcelocal handles changes to variables.

Note that this depends on r223024.

MFC after: 4 weeks

12 years agoOptimize vm_object_split()'s handling of reservations.
alc [Wed, 28 Dec 2011 20:27:18 +0000 (20:27 +0000)]
Optimize vm_object_split()'s handling of reservations.

12 years agoFix a bug in the Xen pmap's implementation of pmap_extract_and_hold():
alc [Wed, 28 Dec 2011 19:59:54 +0000 (19:59 +0000)]
Fix a bug in the Xen pmap's implementation of pmap_extract_and_hold():
If the page lock acquisition is retried, then the underlying thread is
not unpinned.

Wrap nearby lines that exceed 80 columns.

12 years agoPrefer ASCII apostrophes over Unicode ones like the rest of the file.
uqs [Wed, 28 Dec 2011 19:37:03 +0000 (19:37 +0000)]
Prefer ASCII apostrophes over Unicode ones like the rest of the file.

12 years agoAdd myself as a src committer
bapt [Wed, 28 Dec 2011 17:45:26 +0000 (17:45 +0000)]
Add myself as a src committer

Approved by: des (mentor)

12 years agoOops, if we want to check from 0 to nsock, the test condition should be
cognet [Wed, 28 Dec 2011 13:01:12 +0000 (13:01 +0000)]
Oops, if we want to check from 0 to nsock, the test condition should be
< nsock, not >.

Pointy hat to: cognet
Submitted by: Olivier Cochard-Labbe <olivier AT cochard doT me>

12 years agoFix incorrect uses of sizeof().
kevlo [Wed, 28 Dec 2011 05:58:31 +0000 (05:58 +0000)]
Fix incorrect uses of sizeof().

The details of the fix can be found in the tcpdump git repository:
commit 684955d58611ee94eccdc34e82b32e676337188c

12 years ago- Add generic GPIO driver for Cavium Octeon. At the moment pin definition is
gonzo [Wed, 28 Dec 2011 05:57:03 +0000 (05:57 +0000)]
- Add generic GPIO driver for Cavium Octeon. At the moment pin definition is
    hardcoded but will be changed later with more flexible way to define them.

12 years agoIn POSIX.1-2008:
delphij [Wed, 28 Dec 2011 05:35:33 +0000 (05:35 +0000)]
In POSIX.1-2008:

P_tmpdir [OB XSI]  Default directory prefix for tempnam().

This macro is used in a lot of places in legacy applications,
and is why we see a lot of programs written for e.g. Linux
store volatile temporary files in /var/tmp and not /tmp.

MFC after: 2 months

12 years agoEliminate many of the unnecessary differences between the native and
alc [Tue, 27 Dec 2011 23:53:00 +0000 (23:53 +0000)]
Eliminate many of the unnecessary differences between the native and
paravirtualized pmap implementations for i386.  This includes some
style fixes to the native pmap and several bug fixes that were not
previously applied to the paravirtualized pmap.

Tested by: sbruno
MFC after: 3 weeks

12 years agolibc: Eliminate some relative relocations in getusershell().
jilles [Tue, 27 Dec 2011 23:35:10 +0000 (23:35 +0000)]
libc: Eliminate some relative relocations in getusershell().

12 years agolibc: Eliminate some relative relocations in setlocale().
jilles [Tue, 27 Dec 2011 23:28:01 +0000 (23:28 +0000)]
libc: Eliminate some relative relocations in setlocale().

12 years agoDocument restriction on 32-bits and 64-bits datatypes.
ed [Tue, 27 Dec 2011 22:14:35 +0000 (22:14 +0000)]
Document restriction on 32-bits and 64-bits datatypes.

12 years agoAdd locally implemented atomic intrinsics to libcompiler_rt.
ed [Tue, 27 Dec 2011 22:13:51 +0000 (22:13 +0000)]
Add locally implemented atomic intrinsics to libcompiler_rt.

The built-in atomic operations are not implemented in our version of GCC
4.2 for the ARM and MIPS architectures. Instead of emitting locked
instructions, they generate calls to functions that can be implemented
in the C runtime.

Only implement the atomic operations that are used by <stdatomic.h> for
datatype sizes that are supported by atomic(9). This means that on these
architectures, we can only use atomic operations on 32-bits and 64-bits
variables, which is typically sufficient.

This makes <stdatomic.h> work on all architectures except MIPS, since
MIPS and SPARC64 still use libgcc. Converting these architectures to
libcompiler_rt is on my todo list.

12 years agoDefine NULL to nullptr in C++11 mode (not strictly required, but it makes
theraven [Tue, 27 Dec 2011 21:36:31 +0000 (21:36 +0000)]
Define NULL to nullptr in C++11 mode (not strictly required, but it makes
migrating code to C++11 easier).

Approved by: dim (mentor)

12 years ago - Fail when the utility is not invoked as rtprio nor idprio.
delphij [Tue, 27 Dec 2011 20:03:57 +0000 (20:03 +0000)]
 - Fail when the utility is not invoked as rtprio nor idprio.
 - use warnx() to tell the user whether a process is running in normal,
   idle or realtime priority. with the old code it would have been possible
   for another process to send data to stdout between
printf("%s: ", p);
   and
printf("* priority\n");
   and thus break the formatting.
 - 'rtprio 10 -0' triggeres non-intuitive behavior.  It would first set the
   priority of itself to 10 *and* would then try to execute '-0'. Of course,
   setting the priority of [id|rt]prio itself doesn't make a lot of sense,
   but it is intuitive compared to the previous behavior.
 - 'rtprio -t --1' will actually pass over the '-1' to rtprio().  Now
   invoking rtprio like this will catch the wrong usage before passing
   over the invalid argument to rtprio().
 - Garrett Cooper suggested to add further diagnostics where the failure
   occures, if execvp fails.

PR: bin/154042
Submitted by: arundel
MFC after: 1 month

12 years agoClean up from the 4.x era.
pluknet [Tue, 27 Dec 2011 15:59:51 +0000 (15:59 +0000)]
Clean up from the 4.x era.

In an example of boot command:
- rename wd(4) IDE disk drives name to ad(4) for the time being.
- update the used kernel path "/kernel" to the current default.
[It still worked occasionally by looking into the /boot/kernel directory,
so the resulting path was "/boot//kernel/kernel", with two slashes.]

Bump .Dd for this and previous changes.

MFC after: 1 week

12 years agoFix target mode compilation issues that arose after a change
mjacob [Tue, 27 Dec 2011 14:59:24 +0000 (14:59 +0000)]
Fix target mode compilation issues that arose after a change
in the sense data structures.

MFC after: 1 week

12 years agoAdd missing \.
ed [Tue, 27 Dec 2011 13:01:10 +0000 (13:01 +0000)]
Add missing \.

While sorting the MLINKS by name, I forgot to re-add it.

12 years agoAdd manual page for atomic operations.
ed [Tue, 27 Dec 2011 12:58:54 +0000 (12:58 +0000)]
Add manual page for atomic operations.

12 years agoUpdate to vendor revision 4016.
mm [Tue, 27 Dec 2011 10:36:56 +0000 (10:36 +0000)]
Update to vendor revision 4016.

Vendor has integrated most of our local changes in revisions 3976-3979 so
future updates are going to be easier.
Thanks to Tim Kientzle <kientzle@FreeBSD.org>.

MFC after: 8 days

12 years agoUpdate rtprio(2) manual page to reflect the latest changes in -CURRENT as
delphij [Tue, 27 Dec 2011 10:34:00 +0000 (10:34 +0000)]
Update rtprio(2) manual page to reflect the latest changes in -CURRENT as
well as provide documentation for rtprio_thread(2) system call.

MFC after: 1 month
X-MFC-after: r228470

12 years ago1. Remove a bunch of duplicates. Usually this means removing them from
dougb [Tue, 27 Dec 2011 10:21:57 +0000 (10:21 +0000)]
1. Remove a bunch of duplicates. Usually this means removing them from
   fortunes, but occasionally remove them from the other 2 files when
   they are not offensive, or not murphy'ish enough.

   Where the version in fortunes had better attribution and/or formatting,
   copy it over.

2. Fix a few typos

3. Use the full name of François De La Rochefoucauld, fix one of his
   quotes, and remove the duplicate of it.

12 years agoUpdate to vendor revision 4016
mm [Tue, 27 Dec 2011 10:21:29 +0000 (10:21 +0000)]
Update to vendor revision 4016

Obtained from: http://libarchive.googlecode.com/svn/release/2.8

12 years agoAddress issues found by clang. While there, fix also some style
tuexen [Tue, 27 Dec 2011 10:16:24 +0000 (10:16 +0000)]
Address issues found by clang. While there, fix also some style
issues.

MFC after: 3 months.

12 years agoFix some bugs in <stdatomic.h>.
ed [Mon, 26 Dec 2011 23:33:41 +0000 (23:33 +0000)]
Fix some bugs in <stdatomic.h>.

- Make atomic_init() work for GCC, as assigning to structs doesn't work.
- Fix misplaced parenthesis in atomic_is_lock_free() for GCC.
- Make atomic_compare_exchange_strong() for GCC return the proper
  boolean value, whether object == expected.
- Fix argument passing in atomic_exchange_explicit() for GCC.

12 years agoUpdate to vendor revision 3982
mm [Mon, 26 Dec 2011 22:25:58 +0000 (22:25 +0000)]
Update to vendor revision 3982

Obtained from: http://libarchive.googlecode.com/svn/release/2.8

12 years agoAdd libstdthreads.
ed [Mon, 26 Dec 2011 21:51:53 +0000 (21:51 +0000)]
Add libstdthreads.

This library implements the C11 threads interface on top of the pthreads
library.  As discussed on the lists, the preferred way to implement
this, is as a separate library.

It is unlikely that these functions will be used a lot in the future. It
would have been easier if the C11 working group standardized (a subset
of) pthreads and clock_nanosleep(). Having it as a separate library
allows the embedded people to omit it from their system.

Discussed on: arch@, threads@

12 years agoOops, my bad. Fix a broken thing I introduced earlier.
adrian [Mon, 26 Dec 2011 19:41:46 +0000 (19:41 +0000)]
Oops, my bad.  Fix a broken thing I introduced earlier.

12 years agoAs per C11, add static_assert() to <assert.h>.
ed [Mon, 26 Dec 2011 18:57:59 +0000 (18:57 +0000)]
As per C11, add static_assert() to <assert.h>.

12 years agoImprove C11 bits in <stdlib.h>:
ed [Mon, 26 Dec 2011 18:55:37 +0000 (18:55 +0000)]
Improve C11 bits in <stdlib.h>:

- Add missing semicolon to quick_exit(),
- Remove `func' parameter name from at_quick_exit(),
- Fix indentation.
- Compare against 2011 value.

12 years agoAdd cdefs-magic to add optional C11 bits to headers.
ed [Mon, 26 Dec 2011 18:49:56 +0000 (18:49 +0000)]
Add cdefs-magic to add optional C11 bits to headers.

12 years agoAdd missing -l flag to usage().
brueffer [Mon, 26 Dec 2011 16:47:45 +0000 (16:47 +0000)]
Add missing -l flag to usage().

PR: 163629
Submitted by: olgeni
MFC after: 1 week

12 years agoThe standard is now called C11 -- C12.
ed [Mon, 26 Dec 2011 10:58:21 +0000 (10:58 +0000)]
The standard is now called C11 -- C12.

While there, compare against the proper __STDC_VERSION value.

12 years agoMerge from OpenBSD 5.0 (this is a dummy change, the vendor change does not
delphij [Mon, 26 Dec 2011 09:07:08 +0000 (09:07 +0000)]
Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not
apply to us).

12 years agoAR5416 has 14 GPIO pins, from 0->13.
adrian [Mon, 26 Dec 2011 08:21:29 +0000 (08:21 +0000)]
AR5416 has 14 GPIO pins, from 0->13.

12 years agoSince the only thing with a mux is the AR5416 and later, and we're now
adrian [Mon, 26 Dec 2011 07:48:29 +0000 (07:48 +0000)]
Since the only thing with a mux is the AR5416 and later, and we're now
doing split software/hardware LED configuration, we can now simply
treat "softled" as an "output" mux type.

This works fine on this DWA-552. Previous generation (pre-11n NICs) don't
have a GPIO mux - only input/output configuration - so they ignore this
field.

12 years agoFlesh out configurable hardware based LED blinking.
adrian [Mon, 26 Dec 2011 07:47:05 +0000 (07:47 +0000)]
Flesh out configurable hardware based LED blinking.

The hardware (MAC) LED blinking involves a few things:

* Selecting which GPIO pins map to the MAC "power" and "network" lines;
* Configuring the MAC LED state (associated, scanning, idle);
* Configuring the MAC LED blinking type and speed.

The AR5416 HAL configures the normal blinking setup - ie, blink rate based
on TX/RX throughput.  The default AR5212 HAL doesn't program in any
specific blinking type, but the default of 0 is the same.

This code introduces a few things:

* The hardware led override is configured via sysctl 'hardled';
* The MAC network and power LED GPIO lines can be set, or left at -1
  if needed.  This is intended to allow only one of the hardware MUX
  entries to be configured (eg for PCIe cards which only have one LED
  exposed.)

TODO:

* For AR2417, the software LED blinking involves software blinking the
  Network LED.  For the AR5416 and later, this can just be configured
  as a GPIO output line.  I'll chase that up with a subsequent commit.

* Add another software LED blink for "Link", separate from "activity",
  which blinks based on the association state.  This would make my
  D-Link DWA-552 have consistent and useful LED behaviour (as they're
  marked "Link" and "Activity."

* Don't expose the hardware LED override unless it's an AR5416 or later,
  as the previous generation hardware doesn't have this multiplexing
  setup.

12 years agoSetup the initial LED state on attach and resume.
adrian [Mon, 26 Dec 2011 06:25:12 +0000 (06:25 +0000)]
Setup the initial LED state on attach and resume.

Some of the NICs I have here power up with the LEDs blinking, which is
incorrect. The blinking should only occur when the NIC is attempting
to associate.

* On powerup, set the state to HAL_LED_INIT, which turns on the "Power" MAC
  LED but leaves the "Network" MAC LED the way it is.

* On resume, also init it to HAL_LED_INIT unless in station mode, where
  it's forced to HAL_LED_RUN. Hopefully the net80211 state machine will
  call newstate() at some point, which will refiddle the LEDs.

I've tested this on a handful of 11n and pre-11n NICs. The blinking
behaviour is slightly more sensible now.

12 years agoUpdate the hardware LED blinking code to do something useful rather than
adrian [Mon, 26 Dec 2011 06:07:21 +0000 (06:07 +0000)]
Update the hardware LED blinking code to do something useful rather than
relying on what the register defaults are.

This forces the blink mode to be proportional to the TX and RX frames
which match the RX filter.

This (along with a few tweaks to if_ath_led.c to configure the correct
GPIO pins) allows my DWA-552 AR5416 NIC to blink the LEDs in a useful
fashion, however those LEDs are marked "Link" and "Act(ivity)", which
don't really map well to the "power" / "network" LED interface which
the MAC provides. Some further tinkering is needed to see what other
useful operating modes are possible.

12 years agoRefactor out the software LED config code into a common function, called
adrian [Mon, 26 Dec 2011 05:46:22 +0000 (05:46 +0000)]
Refactor out the software LED config code into a common function, called
ath_led_config().

The eventual aim is to have both software and hardware based LED
configuration done here.

12 years agoFirst pass of LED related code changes.
adrian [Mon, 26 Dec 2011 05:37:09 +0000 (05:37 +0000)]
First pass of LED related code changes.

Migrate the LED code out of if_ath.c and into if_ath_led.c.
These routines are _all_ software based LED blinking.

12 years agoDo a quick style(9) pass of some of the code introduced with 802.11n
adrian [Mon, 26 Dec 2011 05:26:35 +0000 (05:26 +0000)]
Do a quick style(9) pass of some of the code introduced with 802.11n
support.

12 years agoAdd missing opening and closing brackets in getopt_long.3 and getsubopt.3
gjb [Mon, 26 Dec 2011 03:14:37 +0000 (03:14 +0000)]
Add missing opening and closing brackets in getopt_long.3 and getsubopt.3
to make the examples reflect reality more closely.

MFC after: 1 week
X-MFC-After: 9.0-RELEASE

12 years agoAdd the C11 standard to groff. This allows us to refer to C11 as -isoC-11.
ed [Sun, 25 Dec 2011 22:05:33 +0000 (22:05 +0000)]
Add the C11 standard to groff.  This allows us to refer to C11 as -isoC-11.

MFC after: 2 months

12 years agoMake white space in this file a bit more consistent.
ed [Sun, 25 Dec 2011 21:05:35 +0000 (21:05 +0000)]
Make white space in this file a bit more consistent.

Remove trailing whitespace and place all macro definitions at the same
column.

12 years agoremove a variable definition which shadows the correct one.
luigi [Sun, 25 Dec 2011 21:00:56 +0000 (21:00 +0000)]
remove a variable definition which shadows the correct one.

Submitted by: Eitan Adler

12 years agoFix field name.
ed [Sun, 25 Dec 2011 20:59:39 +0000 (20:59 +0000)]
Fix field name.

The value field in the atomic structure is called __val; not value.

12 years agoAdd <stdalign.h> and <stdnoreturn.h>.
ed [Sun, 25 Dec 2011 20:51:40 +0000 (20:51 +0000)]
Add <stdalign.h> and <stdnoreturn.h>.

Even though these header files make little sense to me, they are part of
the standard. By including these header files, you can simply use
`alignas', `alignof' and `noreturn' instead of the underscore-prefixed
versions.

12 years agoRemove unneeded guard.
ed [Sun, 25 Dec 2011 20:15:41 +0000 (20:15 +0000)]
Remove unneeded guard.

There is no reason why <stdbool.h> needs an include guard. It is already
protected by __bool_true_false_are_defined.

12 years ago- Add some information about sh(1) changes.
eadler [Sun, 25 Dec 2011 18:15:31 +0000 (18:15 +0000)]
- Add some information about sh(1) changes.

Requested by: jilles (content)
Reviewed by: gjb (doc)
Approved by: jilles

12 years ago- The -h option was removed shortly after it was added
eadler [Sun, 25 Dec 2011 18:15:24 +0000 (18:15 +0000)]
- The -h option was removed shortly after it was added
- ZFS is now up to version 28
- sysinstall(8) is not supported in -CURRENT

Reviewed by: pgj
Approved by: jilles

12 years agoRestore __is_threaded in C++ mode. Some Google stuff needs it apparently.
theraven [Sun, 25 Dec 2011 16:03:54 +0000 (16:03 +0000)]
Restore __is_threaded in C++ mode.  Some Google stuff needs it apparently.

Reported by: swills
Approved by: dim (mentor)

12 years agoQuite the tinderbox for the holidays. Remove the assert[1].
bz [Sun, 25 Dec 2011 14:29:36 +0000 (14:29 +0000)]
Quite the tinderbox for the holidays.  Remove the assert[1].

Suggested by: jhibbits [1]
MFC after: 3 days

12 years agosh: Add some testcases for pasting $*/$@ directly to a literal.
jilles [Sun, 25 Dec 2011 13:24:48 +0000 (13:24 +0000)]
sh: Add some testcases for pasting $*/$@ directly to a literal.

This also passes on stable/8.

12 years ago- Initialize compact_flash_attribute_base_addr from bootinfo structure
gonzo [Sat, 24 Dec 2011 23:15:25 +0000 (23:15 +0000)]
- Initialize compact_flash_attribute_base_addr from bootinfo structure

12 years ago- Add fallthrough comment
eadler [Sat, 24 Dec 2011 22:37:27 +0000 (22:37 +0000)]
- Add fallthrough comment

Approved by: pluknet
Found with: Coverity Prevent(tm)
CID: 10125

12 years agoImplement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x).
jhibbits [Sat, 24 Dec 2011 19:34:52 +0000 (19:34 +0000)]
Implement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x).
Sampling is in progress.

Approved by: nwhitehorn (mentor)
MFC after: 9.0-RELEASE

12 years agoWhen building the kernel for amd64 with clang, don't attempt to use the
dim [Sat, 24 Dec 2011 19:01:31 +0000 (19:01 +0000)]
When building the kernel for amd64 with clang, don't attempt to use the
-frename-registers option, as it is not supported.  No change for builds
with gcc.

MFC after: 1 week

12 years agoMake another clang warning, -Wparentheses-equality, non-fatal during
dim [Sat, 24 Dec 2011 18:57:42 +0000 (18:57 +0000)]
Make another clang warning, -Wparentheses-equality, non-fatal during
kernel builds.  All the instances of this warning in our tree are
completely harmless, and many people seem to like adding extra
parentheses to make precedence clearer.

MFC after: 1 week

12 years agoFix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the
jhb [Sat, 24 Dec 2011 18:11:54 +0000 (18:11 +0000)]
Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the
proper lock.

Reviewed by: bz
MFC after: 1 week

12 years agoAmend r228781 by also disabling -Warray-bounds warnings for the asr
dim [Sat, 24 Dec 2011 17:54:58 +0000 (17:54 +0000)]
Amend r228781 by also disabling -Warray-bounds warnings for the asr
module.

MFC after: 1 week

12 years agoDiscard local array based on return values.
kevlo [Sat, 24 Dec 2011 15:49:52 +0000 (15:49 +0000)]
Discard local array based on return values.

Pointed out by: uqs
Found with: Coverity Prevent(tm)
CID: 10089

12 years ago...and actually install it.
theraven [Sat, 24 Dec 2011 15:31:06 +0000 (15:31 +0000)]
...and actually install it.

Approved by: dim (mentor)

12 years agoInitial implementation of stdatomic.h. Works (at least in the parts that were
theraven [Sat, 24 Dec 2011 15:17:01 +0000 (15:17 +0000)]
Initial implementation of stdatomic.h.  Works (at least in the parts that were
tested) with clang and gcc, and more efficiently with clang+a big out-of-tree
diff that I need to commit soon (once it's been tidied and reviewed a bit).

Large portions by: ed
Reviewed by: ed
Approved by: dim (mentor)

12 years agoSet WERROR= for the nve(4) module. This driver gives several warnings
dim [Sat, 24 Dec 2011 13:36:28 +0000 (13:36 +0000)]
Set WERROR= for the nve(4) module.  This driver gives several warnings
with clang, which will probably never be fixed, as it is unmaintained,
and superseded by nfe(4).

MFC after: 1 week

12 years agoMake another clang warning, -Wempty-body, non-fatal during kernel
dim [Sat, 24 Dec 2011 13:30:15 +0000 (13:30 +0000)]
Make another clang warning, -Wempty-body, non-fatal during kernel
builds.  All the instances of this warning in our tree are completely
harmless.  (Most of the empty bodies look to be used simply as reminder
for the developer to add something later.)

While here, assign to CWARNEXTRA with ?=, so it can be overridden
easily, if needed.

MFC after: 1 week

12 years agoSome GCC-compatibility definitions. Define clang's feature test pseudomacros
theraven [Sat, 24 Dec 2011 13:28:49 +0000 (13:28 +0000)]
Some GCC-compatibility definitions.  Define clang's feature test pseudomacros
to always evaluate to 0 if we are using a compiler that doesn't implement them.
This lets us use the macros easily in standard headers (e.g. stdatomic.h, which
should be the subject of my next commit).

Approved by: dim (mentor)

12 years agoUpdate a comment to reflect reality and explain why we're using the
marius [Sat, 24 Dec 2011 12:28:23 +0000 (12:28 +0000)]
Update a comment to reflect reality and explain why we're using the
medany code model.

12 years agoOn FreeBSD just use the MD5 implementation of libmd rather than that of
marius [Sat, 24 Dec 2011 12:16:38 +0000 (12:16 +0000)]
On FreeBSD just use the MD5 implementation of libmd rather than that of
libcrypto so we don't need to relinquish csup when world is built without
OpenSSL.

12 years agoIntroduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The
lstewart [Sat, 24 Dec 2011 01:32:01 +0000 (01:32 +0000)]
Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The
sysclock_getsnapshot() function allows the caller to obtain a snapshot of all
the system clock and timecounter state required to create time stamps at a later
point. The sysclock_snap2bintime() function converts a previously obtained
snapshot into a bintime time stamp according to the specified flags e.g. which
system clock, uptime vs absolute time, etc.

These KPIs enable useful functionality, including direct comparison of the
feedback and feed-forward system clocks and generation of multiple time stamps
with different formats from a single timecounter read.

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/

In collaboration with: Julien Ridoux (jridoux at unimelb edu au)

12 years agoFix LINT-VIMAGE build after r228814: use virtualized pf_pool_limits.
pluknet [Sat, 24 Dec 2011 00:23:27 +0000 (00:23 +0000)]
Fix LINT-VIMAGE build after r228814: use virtualized pf_pool_limits.

12 years ago- Enable usbus on octusb
gonzo [Sat, 24 Dec 2011 00:22:21 +0000 (00:22 +0000)]
- Enable usbus on octusb

12 years ago- Set CF physical address base in sysinfo structure
gonzo [Fri, 23 Dec 2011 22:10:55 +0000 (22:10 +0000)]
- Set CF physical address base in sysinfo structure

12 years agoReport stripeoffset as zero not stripesize if physical block is zero
mav [Fri, 23 Dec 2011 20:59:13 +0000 (20:59 +0000)]
Report stripeoffset as zero not stripesize if physical block is zero
aligned, same as it is done for ATA.

12 years agoAdd post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use
jhb [Fri, 23 Dec 2011 20:11:37 +0000 (20:11 +0000)]
Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use
these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended
attributes of a vnode are changed.

Note that OS X already implements this behavior.

Reviewed by: rwatson
MFC after: 2 weeks

12 years agoAddition to r228808:
mav [Fri, 23 Dec 2011 19:53:28 +0000 (19:53 +0000)]
Addition to r228808:
READ CD is a 12 byte command. So fill additional bytes and update CDB length
when patching READ(10).

MFC after: 1 month

12 years agoUse READ CAPACITY(16) to get information about device physical sectors.
mav [Fri, 23 Dec 2011 19:12:02 +0000 (19:12 +0000)]
Use READ CAPACITY(16) to get information about device physical sectors.
As soon as not all devices support READ CAPACITY(16), automatically fall
back to READ CAPACITY(10) if CAM_REQ_INVALID or SSD_KEY_ILLEGAL_REQUEST
status returned.

It also provides first bits of information about Logical Block Provisioning
(aka UNMAP/TRIM) support by the device.

12 years ago1. don't use if_pspare directly, but through a macro WMA()
luigi [Fri, 23 Dec 2011 16:03:57 +0000 (16:03 +0000)]
1. don't use if_pspare directly, but through a macro WMA()

2. move a variable declaration at the beginning of a block

12 years agowhitespace fixes (one missing newline, one extra tab)
luigi [Fri, 23 Dec 2011 16:02:14 +0000 (16:02 +0000)]
whitespace fixes (one missing newline, one extra tab)

12 years agoFix a problem whereby a corrupt DNS record can cause named to crash. [11:06]
cperciva [Fri, 23 Dec 2011 15:00:37 +0000 (15:00 +0000)]
Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]

Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by:    so (cperciva)
Approved by:    re (bz)
Security:       FreeBSD-SA-11:06.bind
Security:       FreeBSD-SA-11:07.chroot
Security:       FreeBSD-SA-11:08.telnetd
Security:       FreeBSD-SA-11:09.pam_ssh
Security:       FreeBSD-SA-11:10.pam

12 years agoAmend r228822 by not directly adding to CWARNFLAGS, but to an optional
dim [Fri, 23 Dec 2011 13:50:33 +0000 (13:50 +0000)]
Amend r228822 by not directly adding to CWARNFLAGS, but to an optional
CWARNEXTRA variable, which gets included into the initial CWARNFLAGS
setting.  This makes it easier to override CWARNFLAGS with completely
custom settings (including enabling any disabled warnings).

Reminded by: arundel
MFC after: 1 week

12 years agoOptimize the common case of msyncing the whole file mapping with
kib [Fri, 23 Dec 2011 09:09:42 +0000 (09:09 +0000)]
Optimize the common case of msyncing the whole file mapping with
MS_SYNC flag. The system must guarantee that all writes are finished
before syscalls returned. Schedule the writes in async mode, which is
much faster and allows the clustering to occur. Wait for writes using
VOP_FSYNC(), since we are syncing the whole file mapping.

Potentially, the restriction to only apply the optimization can be
relaxed by not requiring that the mapping cover whole file, as it is
done by other OSes.

Reported and tested by:  az
Reviewed by: alc
MFC after:   2 weeks

12 years agoDisable the code which hard-sets the LEDs on. This prevents the LED
adrian [Fri, 23 Dec 2011 09:09:10 +0000 (09:09 +0000)]
Disable the code which hard-sets the LEDs on.  This prevents the LED
state from correctly updating things.

The reference driver directly enables/disables the LED state as required,
rather than nailing it up like it currently is.  That'll have to come
later by adding some further HAL methods.

Obtained from: Atheros