Commit graph

150839 commits

Author SHA1 Message Date
Jung-uk Kim e651ff978b MFC: r203943
Remove COMPILATIONDATE from the default section.  This string is no longer
being substituted since r162063.
2010-03-22 19:50:57 +00:00
Luigi Rizzo f2f7c1447a mfc r205179: print correctly addresses with an OR block 2010-03-22 16:40:10 +00:00
John Baldwin f5ccef8fd9 MFC 204950,205020:
Use thr_once() with once_t controls to initialize various thread_key_t
objects used to provide per-thread storage in the RPC code.  Almost all
of these used double-checking with a dedicated mutex (tsd_lock) to do this
before.  However, that is not always safe with more relaxed memory orders.
There were also other bugs, such as one in __rpc_createrr() that caused a
new key to be allocated each time __rpc_createrr() was invoked.
2010-03-22 15:52:26 +00:00
Andrew Gallatin accbb468d5 MFC 204212: Update mxge to support IFCAP_VLAN_HWTSO. 2010-03-22 14:50:08 +00:00
Andrew Gallatin c6c73f9880 MFC 205255: Fix 2 bugs in mxge_attach() 2010-03-22 11:18:51 +00:00
Gleb Smirnoff 948165be1c MFC r200183 by luigi:
restore setting of sin_len (was removed in 1.146 last february) as
  it seems that now it is necessary for 'forward' to work outside lo0.

Approved by:	luigi
2010-03-22 10:11:59 +00:00
Konstantin Belousov 1b90b87fba MFC r204879:
Teach procstat(1) to display some information about signal disposition
and pending/blocked status for signals.

MFC r204880:
Add file forgotten in r204879.
2010-03-22 09:29:56 +00:00
Nathan Whitehorn 9c4dbddb29 MFC r204211:
Support the extended PLT format used when objects have more than 8192
PLT relocations on PPC32.
2010-03-20 15:28:39 +00:00
Nathan Whitehorn fca060b9f9 MFC r204297:
Move the OEA64 scratchpage to the end of KVA from the beginning, and set
its PVO to map physical address 0 instead of kernelstart. This fixes a
situation in which a user process could attempt to return this address
via KVM, have it fault while being modified, and then panic the kernel
because (a) it is supposed to map a valid address and (b) it lies in the
no-fault region between VM_MIN_KERNEL_ADDRESS and virtual_avail.

While here, move msgbuf and dpcpu back into regular KVA space for
consistency with other implementations.
2010-03-20 15:27:01 +00:00
Nathan Whitehorn 1f70273a79 MFC r204296:
Provide an implementation of pmap_dev_direct_mapped() on OEA64. This is
required in order to be able to mmap the running kernel, which is turn
required to avoid fstat returning gibberish.
2010-03-20 15:23:06 +00:00
Nathan Whitehorn 59908d2f72 MFC r204269:
Use dcbz instead of word stores for page zeroing, providing a factor of
3-4 speedup.
2010-03-20 15:21:13 +00:00
Nathan Whitehorn aba7e013d6 MFC r204268:
Close a race involving the OEA64 scratchpage. When the scratch page's
physical address is changed, there is a brief window during which its PTE
is invalid. Since moea64_set_scratchpage_pa() does not and cannot hold
the page table lock, it was possible for another CPU to insert a new PTE
into the scratch page's PTEG slot during this interval, corrupting both
mappings.

Solve this by creating a new flag, LPTE_LOCKED, such that
moea64_pte_insert will avoid claiming locked PTEG slots even if they
are invalid. This change also incorporates some additional paranoia
added to solve things I thought might be this bug.

Reported by:	linimon
2010-03-20 15:19:57 +00:00
Nathan Whitehorn e868629641 MFC r204128:
Reduce KVA pressure on OEA64 systems running in bridge mode by mapping
UMA segments at their physical addresses instead of into KVA. This emulates
the direct mapping behavior of OEA32 in an ad-hoc way. To make this work
properly required sharing the entire kernel PMAP with Open Firmware, so
ofw_pmap is transformed into a stub on 64-bit CPUs.

Also implement some more tweaks to get more mileage out of our limited
amount of KVA, principally by extending KVA into segment 16 until the
beginning of the first OFW mapping.

Reported by:	linimon
2010-03-20 15:15:54 +00:00
Nathan Whitehorn 6f88556c52 Fix a bug where pages being removed from memory entirely no longer have
PVOs, and so the modified state of the page can no longer be communicated
to the VM layer, causing pages not to be flushed to swap when needed, in
turn causing memory corruption. Also make several correctness adjustments
to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs.

Obtained from:	projects/ppc64
Discussed with:	grehan
2010-03-20 15:05:44 +00:00
Nathan Whitehorn 006e2f2ce5 MFC r204903:
Place interrupt handling in a critical section and remove double
counting in incrementing the interrupt nesting level. This fixes a number
of bugs in which the interrupt thread could be preempted by an IPI,
indefinitely delaying acknowledgement of the interrupt to the PIC, causing
interrupt starvation and hangs.

Reported by:	linimon
Reviewed by:	marcel, jhb
2010-03-20 14:55:22 +00:00
Nathan Whitehorn 81484b9174 MFC r204082,204179,204180,204218,204241,204247,204270,204692:
Provide thermal management and monitoring features in smu(4). This allows
fan control and thermal monitoring on SMU-based Apple G5 machines, as well
as an led(4) interface to control the sleep LED.
2010-03-20 14:49:44 +00:00
Konstantin Belousov 2219384ff7 MFC r205225:
Add missing headers. While there, arrange headers alphabetically.
2010-03-19 10:33:45 +00:00
Konstantin Belousov b2eaa3b2c2 MFC r205224:
Add missing headers.
2010-03-19 10:28:49 +00:00
Konstantin Belousov 5a9ca220b2 MFC r204755:
Update the list of the process flags. Note that the lists of pending
signals for process and its threads are distinct.
2010-03-19 10:25:59 +00:00
Pyun YongHyeon 4f7bf104f0 MFC r202717:
- Added a workaround for NC-SI management firmware that would allow
    frames to be accepted while the driver is resetting the hardware.
    This failure is generally observed when broadcast frames are received
    during driver load and will generate "Unable to write CTX memory"
    errors.
  - Small changes to driver flags display.

PR:	kern/135836, kern/140684
2010-03-19 00:26:45 +00:00
Pyun YongHyeon be3410a939 MFC r204150:
Add TSO support on VLAN in fconfig(8).
2010-03-18 19:10:03 +00:00
Pyun YongHyeon d5eda01f75 MFC r204149:
Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO
  from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to
  TSO over VLAN without VLAN hardware tagging.
  Driver changes and userland support will follow.
2010-03-18 19:04:04 +00:00
Pyun YongHyeon 12c4b5ef43 MFC r202826-202827,204146
r202826:
  s/Mhz/MHz/g

  Submitted by:	N.J. Mann <njm <> njm dot me dot uk >

r202827:
  Yukon Ultra2 has 125MHz clock.

r204146:
  Correct inversed programming of ethernet hardware address on
  big-endian architecture.

  Submitted by:	C. Jayachandran <c.jayachandran at gmail dot com> (initial version)
2010-03-18 18:58:24 +00:00
Pyun YongHyeon 0debac0d3a MFC r203358,203716:
r203358:
  PCI express device status register has W1C feature. Writing 0 has
  no effect. Make sure to clear error bits by writing 1. [1]
  While I'm here use predefined value instead of hardcodig magic
  vlaue.

  Submitted by:	msaitoh at NetBSD [1]

r203716:
  Move device specific flag configuration to attach routine.
  The softc obtained in device probe wouldn't be the same one used in
  device attach. Drivers should not assume any values stored in softc
  structure in probe routine will be available for its attach routine.
2010-03-18 18:50:20 +00:00
Pyun YongHyeon bb8c5f9792 MFC r203355:
Add more bit definitions to PCI express device control and device
  status register.
2010-03-18 18:44:08 +00:00
Pyun YongHyeon 194bfbdd24 MFC r202821-202822.
r202821:
  Fix a long standing ASF heartbeat sending bug. The initial
  implementation of heartbeat interval was 2 but there was typo which
  caused the heartbeat is sent approximately every 5 seconds. This
  caused unintended controller reset by firmware because firmware
  thought OS was crashed.

  Submitted by:	Floris Bos < info <> je-eigen-domein dot nl >
  Tested by:	Andrzej Tobola < ato <> iem dot pw dot edu dot pl >

r202822:
  Use new handshake command for BCM5750 or new controllers.
2010-03-18 18:35:28 +00:00
Max Laier 29f2c008fd MFC r203834 and r205197: Make ALTQ work for drbr consumers. 2010-03-18 17:00:44 +00:00
Rafal Jaworowski 7088545a40 MFC r205027
Let detailed info about CPU features print on Marvell Sheeva CPU as well.

Provide missing entry in the cpu_classes[].

Reported by:	Maks Verver
2010-03-18 11:53:32 +00:00
Gavin Atkinson 0761ef3362 Merge r203622 from head:
Add support for a few more Sony-specific ACPI features (default display
  brightness, wired LAN power and bass gain), and update the description of
  one previously unknown feature (display contrast).  While here, expand on
  a comment and remove two defines left over from an old version of the code.

  Also update man page to document the above changes, and correct grammar.

PR:		kern/127581
2010-03-17 20:39:21 +00:00
Gavin Atkinson 40df979212 Merge r203835 from head:
When growing a UFS1 filesystem, we need to initialise all inodes in any new
  cylinder groups that are created.  When the filesystem is first created,
  newfs always initialises the first two blocks of inodes, and then in the
  UFS1 case will also initialise the remaining inode blocks.  The changes in
  growfs.c 1.23 broke the initialisation of all inodes, seemingly based on
  this implementation detail in newfs(8).  The result was that instead of
  initialising all inodes, we would actually end up initialising all but the
  first two blocks of inodes.  If the filesystem was grown into empty
  (all-zeros) space then the resulting filesystem was fine, however when
  grown onto non-zeroed space the filesystem produced would appear to have
  massive corruption on the first fsck after growing.
  A test case for this problem can be found in the PR audit trail.

  Fix this by once again initialising all inodes in the UFS1 case.

PR:		bin/115174
Submitted by:	"Nate Eldredge"  <nge cs.hmc.edu>
Reviewed by:	mjacob
2010-03-17 20:27:35 +00:00
Gavin Atkinson 27dfb536f2 Merge r203865 from head:
The -newerXB option was being interpreted the same as the -newerXm option
  as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
2010-03-17 20:16:28 +00:00
Konstantin Belousov 84d7d98fa1 MFC r205148:
Make it compile on LP64 arches.
2010-03-17 09:52:26 +00:00
Doug Barton 6b5b49ce7f MFC r205145:
Make it more clear in the docs that -a is not compatible with -iFU,
and enforce this in the code. Apparently a lot of users mistakenly
combine -a with these flags and are then mystified that no changes
were made.

While I'm here, fix a trailing space in mergemaster.8
2010-03-17 07:26:00 +00:00
Joerg Wunsch 01bd5afb0f r205170: then -> than 2010-03-16 05:13:20 +00:00
Rafal Jaworowski 9f36044770 MFC r205028
Fix ARM cache handling yet more.

 1) vm_machdep.c: remove the dangling allocations so they do not
    un-necessarily turn off the cache upon consecutive access.

 2) busdma_machdep.c: remove the same amount than shadow mapped.

Reported by:	Maks Verver
Submitted by:	Mark Tinguely
Reviewed by:	Grzegorz Bernacki
2010-03-15 19:59:16 +00:00
Rafal Jaworowski 7bfaecdca3 MFC r204764
Provide correct TCLK value for Kirkwood A1 silicon revision.

While there improve SOC ID output accordingly.

Obtained from:	Semihalf
2010-03-15 19:51:24 +00:00
Marius Strobl 8bf5ec1047 MFC: r204222
According to the Linux sungem driver, in case of Apple (K2) GMACs
GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered
down the chip so the internal transceiver has to be hardcoded. This
is also in line with the AppleGMACEthernet driver, which just doesn't
distinguish between internal/external transceiver and MDIO/MDI1
respectively in the first place. Tested by: Andreas Tobler
2010-03-15 19:13:36 +00:00
Marius Strobl a130bd42f5 MFC: r204144
Add support for BCM54K2 found in combination with Apple K2 GMAC.

Submitted by:   Andreas Tobler
Obtained from:  OpenBSD
2010-03-15 19:04:44 +00:00
Marius Strobl 2181f8f5be MFC: r204974, r205002
- The OPSZ macro actually only does the right thing for int32 and int64
  operands but not for double and extended double ones. Instead of trying
  to fix the macro just nuke it and unroll the loops in the correct way
  though as extended double operands turn out to be the only special case.
- For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded
  after setting type accordingly as it's generally decoded using the low
  2 bits as the type, which are 0 for these three instructions.
- Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be
  re-decoded using not only the operand mask appropriate for int64 but
  also the correct register number encoding.
- Use const where appropriate.
- Wrap long lines.

Submitted by:	Peter Jeremy (partly)
2010-03-15 18:32:57 +00:00
Jung-uk Kim 256794862e MFC: r204235
Fix FBIO_ADPINFO ioctl on amd64.
2010-03-15 18:22:19 +00:00
Luigi Rizzo 2ad0f3f258 and wrong place too! 2010-03-15 17:54:01 +00:00
Luigi Rizzo 2faf8829c4 wrong name for this file... 2010-03-15 17:52:55 +00:00
Jaakko Heinonen 77d503efb1 MFC r204872: Pass the correct size to memset().
PR:		bin/128094
2010-03-15 16:39:52 +00:00
Bruno Ducrot 2173958d3e MFC r204519:
Deliver siginfo when signal is generated by thr_kill(2) (SI_USER with properly
filled si_uid and si_pid).

PR:		141956
2010-03-15 15:33:32 +00:00
Jilles Tjoelker 873d27446a MFC r204410: Include terminated threads in ps's process cpu time field.
When a kinfo_proc is filled, first fill_kinfo_proc_only() fills in
ki_runtime using p->p_rux.rux_runtime (all cpu time used by the process
including terminated threads). If information for a specific thread is
requested, fill_kinfo_thread() then overwrites this with the thread's
td->td_runtime (good). If not, fill_kinfo_aggregate() overwrote it with
the sum of all threads' td->td_runtime which does not include terminated
threads.

This affects ps(1)'s TIME field, not its %CPU field nor anything in
top(1).
2010-03-14 13:07:40 +00:00
Bernd Walter 6c96d2f595 MFC 204462,204463,204476: fix multicast hashes 2010-03-13 16:37:17 +00:00
Jaakko Heinonen 324846ecfa MFC r204447:
In _gettemp(), check that the length of the path doesn't exceed
MAXPATHLEN. Otherwise the path name (or part of it) may not fit to
carrybuf causing a buffer overflow.

PR:		bin/140228
2010-03-12 06:56:51 +00:00
Joerg Wunsch cf4bd5e4d9 (r205011) The "number" argument is everything but optional. 2010-03-12 05:16:24 +00:00
Xin LI ea2c000633 MFC r203760: Improve time precision for grdc(6):
Traditionally, grdc would obtain time through time(3) which in turn gets
only the second part of clock (CLOCK_SECOND), and sleep for 1 second after
each screen refresh.

This approach would have two problems.  First, we are not guaranteed to
be waken up at the beginning of a whole second, which will typically
exhibit as a "lag" on second number.  Second, because we sleep for whole
second, and the refresh process would take some time, the error would
accumulate from time to time, making the lag variable.

Make grdc(6) to use time(3) to get time only at the beginning, and sample
time in CLOCK_REALTIME_FAST granularity after refreshing, and use the
nanosecond part to caculate how much time we want to sleep.

PR:		bin/120813
2010-03-12 00:51:13 +00:00
Bernhard Schmidt 36026f82d6 MFC r203934:
Fix for the Intel WiFi Link 1000.  The EEPROM image is in the OTPROM block
before the last block, not in the last block itself.

Approved by:	rpaulo (mentor)
Obtained from:	OpenBSD
2010-03-11 17:15:40 +00:00