Open Firmware mandates that certain cross-references, in particular those
in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles,
since FDT has no concept of ihandles. Have the OF FDT CI module interpret
queries about ihandles as cross-reference phandles.
Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use
the right type.
Rearchitect platform memory map parsing to make it less
Open Firmware-centric:
- Keep the static list of regions in platform.c instead of ofw_machdep.c
- Move various merging and sorting operations to platform.c as well
- Move apple_hacks code out of ofw_machdep.c and into platform_powermac.c,
  where it belongs
- Move CHRP-specific dynamic-reconfiguration memory parsing into
  platform_chrp.c instead of pretending it is shared code
No actual hardware supported by FreeBSD requires this SPRG save/restore
paranoia, so kill it. In particular, changes to SPRG0 are dangerous, since
that is where the PCPU pointer is kept.
Deleted one line too many.
Revert last few revisions; apologies for the noise. There are very rare,
broken systems that require SPRG state to be preserved.
Remove unused variable.
libiberty: upstream updates.

There is a new ChangeLog.gcc43 file but most notable:

* floatformat.c (get_field): Fix segfault with little-endian word
  order on 64-bit hosts.
  (put_field): Likewise.
  (min): Move definition.

gcc/cp/ChangeLog
2007-05-04  Geoffrey Keating  <geoffk@apple.com>

  PR 31775
  * mangle.c (write_mangled_name): Mangle static variable names.
  (write_unqualified_name): Use local-source-name for
  namespace-scope static variables.
(Completes FreeBSD's r258017 )

Obtained from:	gcc 4.3 (rev. 118552, 120097, 20698, 120702,
			 121364, 122972, 126588; GPLv2)
MFC after:	2 weeks
Add new sysctl, kern.supported_abis, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by:	imp
MFC after:	3 days
Add definitions for the additional PIO pins found on recent AT91 SoCs.
In a situation where:
	- The remote host sends a FIN
	- in an ACK for a sequence number for which an ACK has already
	  been received
	- There is still unacked data on route to the remote host
	- The packet does not contain a window update

The packet may be dropped without processing the FIN flag.

PR:		kern/99188
Submitted by:	Staffan Ulfberg <staffan@ulfberg.se>
Discussed with:	andre
MFC after:	never
Partial revert of r258779 and r258780:
	The directory sys/dev/drm2/i915 is apperently contributed code.
	Revert to the broken version of this file to make future imports easier.

Requested by:	kib
Add some code to double-check whether we're correctly populating the
TX ring according to what the firmware requires.

The firmware requires A-MPDU sub-frames to be at a very specific ring
offset - that is, the ring slot offset should be (seqno % 256.)

This holds for every NIC I've tested thus far except the 4965,
which starts erroring out here shortly before the firmware panics.
Which is good, it's doing what it's supposed to (read: capture that
we've screwed up somewhere.)

The specifics about getting this stuff right:

* the initial seqno allocation should match up with the ringid.
* .. yes, this means we can start at a ring offset that isn't zero.
* .. because we program the start seqno in the firmware message
  to setup the AC.
* The initial seqno allocation may be non-zero _and_ frames may be
  being transmitted during a-mpdu negotiation.  I faced similar
  issues on ath(4) and had to software queue frames to that node+TID
  during A-MPDU negotiation.
* seqno allocation should be in lockstep with ring increments.
* If we fail to transmit some segment, no, we shouldn't reuse that
  ring slot.  We should just transmit a BAR (which we aren't yet
  doing, sigh) and move onto the next seqno.
* In theory there shouldn't be any holes in the seqno space when
  we are transmitting frames.

Tested:

* 4965 (throws problems, so yes we have to fix this);
* 5100 (seems ok);
* 6200 (seems ok);
* 2200 (seems ok);
* 2230 (seems ok).
Add some sanity checks to the TLV fetch.

Obtained from:	Linux iwlwifi
Oops - fix bad indent. Sorry!
libcpp: Merge fixes from upstream

GCC preprocessor/29966:
* macro.c (lex_expansion_token): Save and restore cpp_reader's
cur_token.
(_cpp_create_definition): Don't restore cur_token here.
* lex.c (_cpp_lex_token): Added assertion.

GCC preprocessor/28709:
* macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.

GCC c/31924
* expr.c (interpret_float_suffix): Check for invalid suffix.

GCC preprocessor/14331
* lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.

Fixup whitespacing

Obtained from:	gcc per-4.3 (rev. 121340, 124356, 124358, 124730,
				  125212, 125255 ; GPLv2)
MFC after:	3 weeks
Log the rx ring offset as part of the debug message.
Add a nand flash controller driver for Atmel at91 family.  Tested only
on at91rm9200 so far.

The files.at91 has listed a nand driver for ages, but it never existed.
Overhaul the iwn(4) scan infrastructure to be slightly more "correct"
for these chipsets.

* Correctly set the active/passive flag in the scan request - this is
  NOT a "is the channel active|passive"; it's to do with whether we
  have an SSID to actively scan for or not.  The firmware takes care
  of the active/passive setup of the channel.

* Calculate the active/passive dwell time based on the beacon interval
  and the channel mode, rather than using a hard coded value.

* For now, hardcode the scan service_time.  It's defined as:

  31:22 - number of beacon intervals to come back onto the home channel
          for;
  0:21  - time (microseconds) to come back onto the home channel for.

  When doing an active scan when the NIC is active (whether we're associated
  or not - it only matters if we've setup the NIC to a destination or not)
  this determines how much time to stay on the home channel for when
  scanning.  We can tune this based on the amount of active traffic.

  For now it's 4 beacon intervals and 100 microseconds.

* Fix the "good crc threshold" setting.  It differs based on the NIC
  firmware.  Some older firmware required a workaround; the later
  firmware instead treats the field as a flag.

* Enforce that we are not sending a scan command if one is already
  pending.  Any time this is done is a bug and it absolutely needs
  to be fixed - so be very loud.

* Add the SCAN flag to a few debug messages that are scan related but
  only occuring under STATE.

Now, this does get noisy when you're scanning in an actively busy 2GHz
network as the firmware (for reason I don't quite yet understand) seems
hell bent on staying on some passive channels longer than it should.
However, it should eventually recover and complete the scan.

This is a work in progress; please let me know if things get stuck or
if things improve!

Tested:

* intel centrino 2200
* intel centrino 2230
* intel 6200
* intel 5100
* intel 4965 (gets upset, but that's a known issue)

Obtained from:	linux iwlwifi
Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787.
Submitted by:	jhb
PR:	184304