]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoMerge from current.
imp [Tue, 16 Feb 2010 23:59:48 +0000 (23:59 +0000)]
Merge from current.

14 years agoBump .Dd for r203977
gavin [Tue, 16 Feb 2010 22:55:38 +0000 (22:55 +0000)]
Bump .Dd for r203977

MFC after: 1 month

14 years agoImplement the rename query, for when a file with the same name as the one
gavin [Tue, 16 Feb 2010 22:53:18 +0000 (22:53 +0000)]
Implement the rename query, for when a file with the same name as the one
about to be extracted already exists.  The question, and interpretation
of the response is deliberately compatible with Info-Zip.

This change was originally obtained from NetBSD, but has three changes:
 - better compatibility with Info-Zip in the handling of ^D
 - Use getdelim() rather than getline()
 - bug fix: != changed to == in the "file rename" code

I suspect the latter is also a bug in NetBSD, but I can't easily confirm
this.

PR: bin/143307
Reviewed by: rdivacky (change to unzip.c only)
Obtained from: NetBSD src/usr.bin/unzip/unzip.c 1.8
MFC after: 1 month

14 years agoThe NetBSD Foundation has granted permission to remove clauses 3 and 4.
imp [Tue, 16 Feb 2010 21:59:17 +0000 (21:59 +0000)]
The NetBSD Foundation has granted permission to remove clauses 3 and 4.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clauses 3 and 4.
imp [Tue, 16 Feb 2010 21:49:36 +0000 (21:49 +0000)]
The NetBSD Foundation has granted permission to remove clauses 3 and 4.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has given permission to remove clause 3 and 4
imp [Tue, 16 Feb 2010 21:47:05 +0000 (21:47 +0000)]
The NetBSD Foundation has given permission to remove clause 3 and 4
from their liceense.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4
imp [Tue, 16 Feb 2010 21:43:57 +0000 (21:43 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4
from their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission for people to remove
imp [Tue, 16 Feb 2010 21:39:20 +0000 (21:39 +0000)]
The NetBSD Foundation has granted permission for people to remove
clause 3 and 4 from their software.

14 years agoDefine TLS_MODEL for PowerPC as well. Since PowerPC uses variant I,
marcel [Tue, 16 Feb 2010 20:46:22 +0000 (20:46 +0000)]
Define TLS_MODEL for PowerPC as well. Since PowerPC uses variant I,
like ia64, leave it empty (default model).

14 years agoFactor out the code shared between NFS client and server into its own
marius [Tue, 16 Feb 2010 20:00:21 +0000 (20:00 +0000)]
Factor out the code shared between NFS client and server into its own
module. With r203732 it became apparent that creating the sysctl nodes
twice causes at least a warning, however the whole code shouldn't be
present twice in the first place.

Discussed with: rmacklem

14 years agoXref mdmfs(8).
jh [Tue, 16 Feb 2010 20:00:20 +0000 (20:00 +0000)]
Xref mdmfs(8).

14 years agoImprove descriptions for tmpfs mount options. The descriptions have
jh [Tue, 16 Feb 2010 19:59:10 +0000 (19:59 +0000)]
Improve descriptions for tmpfs mount options. The descriptions have
been mostly obtained from NetBSD mount_tmpfs(8) manual page.

Obtained from: NetBSD
Discussed with: delphij

14 years agoRemove clause 3 from Berkeley copyrights. Add a few $FreeBSD$'s.
imp [Tue, 16 Feb 2010 19:46:46 +0000 (19:46 +0000)]
Remove clause 3 from Berkeley copyrights.  Add a few $FreeBSD$'s.

14 years agoRemove the Berkeley clause 3's.
imp [Tue, 16 Feb 2010 19:39:50 +0000 (19:39 +0000)]
Remove the Berkeley clause 3's.
Add a few $FreeBSD$

14 years agoRemove NetBSD Foundation clauses 3 & 4. They eliminated those clauses
imp [Tue, 16 Feb 2010 19:28:10 +0000 (19:28 +0000)]
Remove NetBSD Foundation clauses 3 & 4.  They eliminated those clauses
last year.

14 years agoCompile fbsd-threads.c. Threading & TLS support is working just fine.
marcel [Tue, 16 Feb 2010 16:38:57 +0000 (16:38 +0000)]
Compile fbsd-threads.c. Threading & TLS support is working just fine.

14 years agoFix Kite and Merlin version check.
rpaulo [Tue, 16 Feb 2010 12:43:55 +0000 (12:43 +0000)]
Fix Kite and Merlin version check.

14 years ago%U was macroized in mdoc(7), escape.
ru [Tue, 16 Feb 2010 12:29:02 +0000 (12:29 +0000)]
%U was macroized in mdoc(7), escape.

14 years agoDocument co-mentorship by ed.
uqs [Tue, 16 Feb 2010 09:10:48 +0000 (09:10 +0000)]
Document co-mentorship by ed.

Approved by: ed (co-mentor)

14 years agoAdd missing newline in last line of file.
uqs [Tue, 16 Feb 2010 09:10:21 +0000 (09:10 +0000)]
Add missing newline in last line of file.

Uncovered via: fromcvs vs. svn
Approved by: ed (co-mentor)

14 years agoRemove clause 3 from my license.
delphij [Tue, 16 Feb 2010 08:19:28 +0000 (08:19 +0000)]
Remove clause 3 from my license.

14 years agoUnbreak ia64: tls_model("initial-exec") is invalid, because it assumes
marcel [Tue, 16 Feb 2010 06:47:00 +0000 (06:47 +0000)]
Unbreak ia64: tls_model("initial-exec") is invalid, because it assumes
the static TLS model, which is fundamentally different from the dynamic
TLS model. The consequence was data corruption. Limit the attribute to
i386 and amd64.

14 years agoImprove TLS variant I:
marcel [Tue, 16 Feb 2010 02:48:11 +0000 (02:48 +0000)]
Improve TLS variant I:
o   Use obj->tlsinitsize to determine whether there's initialized data.
o   If obj->tlssize > obj->tlsinitsize, then bzero uninitialized data.
o   Don't exclude variant I from the work-around in free_tls_offset().

14 years agoThe static TLS size as given by tls_static_space includes TLS_TCB_SIZE
marcel [Tue, 16 Feb 2010 02:22:59 +0000 (02:22 +0000)]
The static TLS size as given by tls_static_space includes TLS_TCB_SIZE
bytes of TCB in variant I.

14 years agoadds bwn(4) driver for supporting Broadcom BCM43xx chipsets.
weongyo [Tue, 16 Feb 2010 01:44:14 +0000 (01:44 +0000)]
adds bwn(4) driver for supporting Broadcom BCM43xx chipsets.

  o uses v4 firmware instead of v3.  A port will be committed to create
    the bwn firmware module.
  o supports B/G and LP(low power) PHYs.
  o supports 32 / 64 bits DMA operations.
  o tested on big / little endian machines so should work on all
    architectures.

It'd not connected to the build until the firmware port is committed.

14 years agosupports SPROM rev8 informations properly which are used to support
weongyo [Tue, 16 Feb 2010 01:22:33 +0000 (01:22 +0000)]
supports SPROM rev8 informations properly which are used to support
low-power PHY of bwn(4) and LDO voltage adjustments.

14 years agoRemove COMPILATIONDATE from the default section. This string is no longer
jkim [Tue, 16 Feb 2010 01:07:06 +0000 (01:07 +0000)]
Remove COMPILATIONDATE from the default section.  This string is no longer
being substituted since r162063.

PR: bin/143976
MFC after: 1 month

14 years ago- Clean-up output of memory banks info
gonzo [Tue, 16 Feb 2010 00:08:42 +0000 (00:08 +0000)]
- Clean-up output of memory banks info

14 years agoAdjust style (following the already existing rules) for the newly
attilio [Mon, 15 Feb 2010 23:44:48 +0000 (23:44 +0000)]
Adjust style (following the already existing rules) for the newly
introduced option DEADLKRES.

Reported by: danfe, julian, avg

14 years agoRename some macros to clarify their intentions and fix style nits.
jkim [Mon, 15 Feb 2010 20:46:01 +0000 (20:46 +0000)]
Rename some macros to clarify their intentions and fix style nits.

14 years agoAdd support for `cycle' and `zero' events for LCD brightness control.
jkim [Mon, 15 Feb 2010 19:30:28 +0000 (19:30 +0000)]
Add support for `cycle' and `zero' events for LCD brightness control.

Submitted by: Daniel Walter (d dot walter at 0x90 dot at) (intial version)

14 years agoFix for the Intel WiFi Link 1000. The EEPROM image is in the OTPROM block
bschmidt [Mon, 15 Feb 2010 19:18:46 +0000 (19:18 +0000)]
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
MFC after: 3 weeks

14 years agoFix KITE version check.
rpaulo [Mon, 15 Feb 2010 18:47:42 +0000 (18:47 +0000)]
Fix KITE version check.

Obtained from: //depot/user/rpaulo/80211n/...

14 years agoRemove the third clause for the Berkeley parts of games, per the
imp [Mon, 15 Feb 2010 18:46:02 +0000 (18:46 +0000)]
Remove the third clause for the Berkeley parts of games, per the
letter in /COPYRIGHT.

14 years agoMake CD driver a bit more robust and predictable to unreported errors.
mav [Mon, 15 Feb 2010 18:14:51 +0000 (18:14 +0000)]
Make CD driver a bit more robust and predictable to unreported errors.

14 years agoBring back AR9285 support. This fixes most of the issues and should be
rpaulo [Mon, 15 Feb 2010 17:49:49 +0000 (17:49 +0000)]
Bring back AR9285 support. This fixes most of the issues and should be
pretty usable.

MFC after: 1 month

14 years agoSome rewording and language fixes.
trasz [Mon, 15 Feb 2010 17:41:59 +0000 (17:41 +0000)]
Some rewording and language fixes.

PR: docs/136918, docs/134074
Submitted by: Ben Kaduk <kaduk at mit dot edu>, Haven Hash <havenster at gmail dot com>

14 years agofortune(6) switch to 3-clause BSDL; style(9)
uqs [Mon, 15 Feb 2010 15:10:21 +0000 (15:10 +0000)]
fortune(6) switch to 3-clause BSDL; style(9)

This reduces the diff to other *BSD and makes it possible to actually
see the code differences.

Approved by: ed (Co-mentor)

14 years agoCall the proper linkup routine in PowerPC Book-E machdep.
raj [Mon, 15 Feb 2010 14:38:30 +0000 (14:38 +0000)]
Call the proper linkup routine in PowerPC Book-E machdep.

Submitted by: attilio
MFC after: 1 week

14 years agogames: make WARNS=6 the default, remove overrides
uqs [Mon, 15 Feb 2010 14:32:00 +0000 (14:32 +0000)]
games: make WARNS=6 the default, remove overrides

This also bumps factor, fortune, primes, and random to WARNS=6.

Approved by: ed (Co-mentor)

14 years agofortune(6) make WARNS=6 clean
uqs [Mon, 15 Feb 2010 14:31:30 +0000 (14:31 +0000)]
fortune(6) make WARNS=6 clean

Fixes taken mostly from DragonflyBSD.

Approved by: ed (Co-mentor)

14 years agomorse(6) make WARNS=6 clean
uqs [Mon, 15 Feb 2010 14:31:05 +0000 (14:31 +0000)]
morse(6) make WARNS=6 clean

Approved by: ed (Co-mentor)

14 years agogrdc(6) make WARNS=6 clean and bump accordingly
uqs [Mon, 15 Feb 2010 14:30:37 +0000 (14:30 +0000)]
grdc(6) make WARNS=6 clean and bump accordingly

Approved by: ed (Co-mentor)

14 years agoShow when an ARP entry expires.
ru [Mon, 15 Feb 2010 14:29:17 +0000 (14:29 +0000)]
Show when an ARP entry expires.

MFC after: 1 week

14 years agoThough these libraries are disconnected from the build and don't
ru [Mon, 15 Feb 2010 14:14:13 +0000 (14:14 +0000)]
Though these libraries are disconnected from the build and don't
currently build, they should be kept.  [1]

Unbreak their makefiles by removing the support for the long gone
DEFAULT_THREAD_LIB knob.  (Allows the tools/make_libdeps.sh script
to succeed.)

According to: davidxu and deischen [1]
MFC after: 3 days

14 years agosysctl(8): make WARNS=3 clean
uqs [Mon, 15 Feb 2010 14:08:06 +0000 (14:08 +0000)]
sysctl(8): make WARNS=3 clean

Fixes inspired by work done in DragonflyBSD.

PR: bin/140016
Approved by: ed (Co-mentor)

14 years agoBump WARNS where possible.
uqs [Mon, 15 Feb 2010 14:07:40 +0000 (14:07 +0000)]
Bump WARNS where possible.

Checked by: make universe
Approved by: ed (co-mentor)

14 years agoMark various sysctls also as tunables.
pjd [Mon, 15 Feb 2010 09:19:07 +0000 (09:19 +0000)]
Mark various sysctls also as tunables.

Reviewed by: rwatson
MFC after: 1 week

14 years agoSync to head at about 203911.
imp [Mon, 15 Feb 2010 07:41:16 +0000 (07:41 +0000)]
Sync to head at about 203911.

14 years agoAdd device ID for the FTDI 4232H.
thompsa [Sun, 14 Feb 2010 20:10:41 +0000 (20:10 +0000)]
Add device ID for the FTDI 4232H.

PR: usb/143832
Submitted by: UEMURA Tetsuya

14 years agoAdd support for the E1752 3G modem and the required eject command.
thompsa [Sun, 14 Feb 2010 20:05:12 +0000 (20:05 +0000)]
Add support for the E1752 3G modem and the required eject command.

Submitted by: Milan Obuch

14 years agoMake umodem more tolerant for devices which modem descriptors are misplaced.
thompsa [Sun, 14 Feb 2010 19:59:19 +0000 (19:59 +0000)]
Make umodem more tolerant for devices which modem descriptors are misplaced.

Reported by: Erick Wales
Submitted by: Hans Petter Selasky

14 years agoAdd UQ_KBD_BOOTPROTO quirk needed in r203896
thompsa [Sun, 14 Feb 2010 19:56:05 +0000 (19:56 +0000)]
Add UQ_KBD_BOOTPROTO quirk needed in r203896

14 years agoDetect when we are polling from kernel via cngetc() in the boot process and
thompsa [Sun, 14 Feb 2010 19:53:45 +0000 (19:53 +0000)]
Detect when we are polling from kernel via cngetc() in the boot process and
reserve the keypresses so they do not get passed to syscons.

Submitted by: Hans Petter Selasky

14 years agoDiff reduction with Adaptec's vendor driver.
emaste [Sun, 14 Feb 2010 17:14:11 +0000 (17:14 +0000)]
Diff reduction with Adaptec's vendor driver.

Driver version 2.1.9 chosen as that Adaptec version roughly corresponds
with the current feature set merged to the in-tree driver.

14 years agoSome code cleanups:
marcel [Sun, 14 Feb 2010 17:03:20 +0000 (17:03 +0000)]
Some code cleanups:
o   s/u_int32_t/uint32_t/g
o   Add multiple-inclusion protection.
o   Break long lines.

14 years agoSome code churn:
marcel [Sun, 14 Feb 2010 16:56:24 +0000 (16:56 +0000)]
Some code churn:
o   Eliminate IA64_PHYS_TO_RR6 and change all places where the macro is used
    by calling either bus_space_map() or pmap_mapdev().
o   Implement bus_space_map() in terms of pmap_mapdev() and implement
    bus_space_unmap() in terms of pmap_unmapdev().
o   Have ia64_pib hold the uncached virtual address of the processor interrupt
    block throughout the kernel's life and access the elements of the PIB
    through this structure pointer.

This is a non-functional change with the exception of using ia64_ld1() and
ia64_st8() to write to the PIB. We were still using assignments, for which
the compiler generates semaphore reads -- which cause undefined behaviour
for uncacheable memory. Note also that the memory barriers in ipi_send() are
critical for proper functioning.

With all the mapping of uncached memory done by pmap_mapdev(), we can keep
track of the translations and wire them in the CPU. This then eliminates
the need to reserve a whole region for uncached I/O and it eliminates
translation traps for device I/O accesses.

14 years agoRevert part of the 9285 support because it breaks the 9280 support. I'll
rpaulo [Sun, 14 Feb 2010 16:26:32 +0000 (16:26 +0000)]
Revert part of the 9285 support because it breaks the 9280 support. I'll
try to do the 9285 support without interfering with any other chipset
revisions support.

14 years agouse log instead of logverbose in three places so the build won't need
luigi [Sun, 14 Feb 2010 15:55:30 +0000 (15:55 +0000)]
use log instead of logverbose in three places so the build won't need
input to run to completion

MFC after: 3 days

14 years agoa minimal set of changes to adapt to the utmp->utmpx changes.
luigi [Sun, 14 Feb 2010 15:51:36 +0000 (15:51 +0000)]
a minimal set of changes to adapt to the utmp->utmpx changes.
lastlog still not implemented, i am hoping that Ed or someone
has some idea on how to fix this, but it is really not important.

14 years agoDo not leak process lock when current thread is not allowed to see target.
kib [Sun, 14 Feb 2010 13:59:01 +0000 (13:59 +0000)]
Do not leak process lock when current thread is not allowed to see target.

Bumped into by: ed
MFC after: 3 days

14 years agoRename fields to match better the msdosfs headers. This work is still
kib [Sun, 14 Feb 2010 12:31:28 +0000 (12:31 +0000)]
Rename fields to match better the msdosfs headers. This work is still
incomplete as some info doesn't really belong to the structs where it is
defined.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Reviewed by: bde
MFC after: 2 weeks

14 years agoMFp4:
mav [Sun, 14 Feb 2010 12:30:35 +0000 (12:30 +0000)]
MFp4:
With FBS enabled, we have no idea what command caused timeout.
Implement same logic as in siis(4) - wait for other commands
complete or timeout and then give some more time.

14 years agoBug fixes from NetBSD
kib [Sun, 14 Feb 2010 12:30:30 +0000 (12:30 +0000)]
Bug fixes from NetBSD
- fix sign-compare issues.
- ANSIfy a couple of functions.
- Remove more duplicate #includes.
- Memory leak found by Coverity on NetBSD.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Reviewed by: bde
MFC after: 2 weeks

14 years agoLicense changes from NetBSD.
kib [Sun, 14 Feb 2010 12:28:43 +0000 (12:28 +0000)]
License changes from NetBSD.
Move to 2 clause license, approved by Wolfgang Solfrank.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
MFC after: 2 weeks

14 years agoMFp4:
mav [Sun, 14 Feb 2010 12:27:49 +0000 (12:27 +0000)]
MFp4:
After last running command completed, give commands in timeout state
second time.

14 years agoRename variables to match msdosfs headers.
kib [Sun, 14 Feb 2010 12:25:39 +0000 (12:25 +0000)]
Rename variables to match msdosfs headers.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Reviewed by: bde
MFC after: 2 weeks

14 years agoSome cleanups from NetBSD:
kib [Sun, 14 Feb 2010 12:25:03 +0000 (12:25 +0000)]
Some cleanups from NetBSD:
- C99 initializers.
- Change the default volume label from "NO NAME" to "NO_NAME".
- Set OEM String to "BSD4.4 " following the unnamed spacing convention
  in that other OS that suggests "MSWIN4.1"
Also, David Naylor's changes for Clang, mostly changing the signess
of constants.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Clang fixes by: David Naylor <naylor.b.david gmail com>
Reviewed by: bde (with some disagreement about Clang issues)
MFC after: 2 weeks

14 years agoInvalid filesystem might cause the bp to be never read.
kib [Sun, 14 Feb 2010 12:10:49 +0000 (12:10 +0000)]
Invalid filesystem might cause the bp to be never read.

Noted by: Pedro F. Giffuni <giffunip tutopia com>
Obtanined from: NetBSD
MFC after: 1 week

14 years agoThe -newerXB option was being interpreted the same as the -newerXm option
gavin [Sun, 14 Feb 2010 12:08:44 +0000 (12:08 +0000)]
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>
MFC after: 1 month

14 years agoMake <sys/timeb.h> work without including <sys/types.h>.
ed [Sun, 14 Feb 2010 12:00:42 +0000 (12:00 +0000)]
Make <sys/timeb.h> work without including <sys/types.h>.

According to the last POSIX specification that contained <sys/timeb.h>,
this header should also typedef time_t properly. Also add a proper
comment to the final #endif.

14 years agoAlso build ah_eeprom_v4k.c when ar9280 is selected.
rpaulo [Sun, 14 Feb 2010 11:04:52 +0000 (11:04 +0000)]
Also build ah_eeprom_v4k.c when ar9280 is selected.

14 years agoCorrect cpu id for FA526.
kevlo [Sun, 14 Feb 2010 05:02:08 +0000 (05:02 +0000)]
Correct cpu id for FA526.
While I'm here, add cpu id for FA626TE.

14 years agomerge from head.
imp [Sun, 14 Feb 2010 00:30:24 +0000 (00:30 +0000)]
merge from head.

14 years agoChange the default value for vfs.newnfs.enable_locallocks to 0 for
rmacklem [Sun, 14 Feb 2010 00:18:32 +0000 (00:18 +0000)]
Change the default value for vfs.newnfs.enable_locallocks to 0 for
the experimental NFS server, since local locking is known to be
broken and the patch to fix it is still a work in progress.

MFC after: 5 days

14 years agoThis fixes the experimental NFS server so that it won't crash in the
rmacklem [Sat, 13 Feb 2010 23:56:19 +0000 (23:56 +0000)]
This fixes the experimental NFS server so that it won't crash in the
caching code for IPv6 by fixing a typo that used the incorrect variable.
It also fixes the indentation of the statement above it.

Reported by: simon AT comsys.ntu-kpi.kiev.ua
MFC after: 5 days

14 years agoAdd missing SCTP_PACKED. Spotted by Irene Ruengeler.
tuexen [Sat, 13 Feb 2010 21:38:15 +0000 (21:38 +0000)]
Add missing SCTP_PACKED. Spotted by Irene Ruengeler.

MFC after: 1 week

14 years agoPredict KASSERTs to be true.
marius [Sat, 13 Feb 2010 19:17:06 +0000 (19:17 +0000)]
Predict KASSERTs to be true.

14 years agoAdd ssm(4), which serves as a glue device allowing devices beneath the
marius [Sat, 13 Feb 2010 19:05:34 +0000 (19:05 +0000)]
Add ssm(4), which serves as a glue device allowing devices beneath the
scalable shared memory node, which is used in large UltraSPARC III based
machines to group snooping-coherency domains together, like schizo(4) to
be treated like nexus(4) children.

14 years ago- Add the 'cmp' and 'core' pseudo-busses which are used to group CPU cores
marius [Sat, 13 Feb 2010 18:51:49 +0000 (18:51 +0000)]
- Add the 'cmp' and 'core' pseudo-busses which are used to group CPU cores
  to the exclusion lists as the CPU nodes aren't handled as regular devices
  either. Also add the pseudo-devices found in Sun Fire V1280.
- Allow nexus_attach() and nexus_alloc_resource() to be used by drivers
  derived from nexus(4) for subordinate busses.
- Don't add the zero-sized memory resources of glue devices to the resource
  lists.

14 years agoResurrect nexusvar.h from r167307.
marius [Sat, 13 Feb 2010 18:18:45 +0000 (18:18 +0000)]
Resurrect nexusvar.h from r167307.

14 years agoStyle fixes
marius [Sat, 13 Feb 2010 17:05:57 +0000 (17:05 +0000)]
Style fixes

14 years ago- Search the whole OFW device tree instead of only the children of the
marius [Sat, 13 Feb 2010 16:52:33 +0000 (16:52 +0000)]
- Search the whole OFW device tree instead of only the children of the
  root nexus device for the CPUs as starting with UltraSPARC IV the 'cpu'
  nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
  or combinations thereof. Also in large UltraSPARC III based machines
  the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
  group snooping-coherency domains together instead of directly from the
  nexus.
  It would be great if we could use newbus to deal with the different ways
  the 'cpu' devices can hang off of pseudo ones but unfortunately both
  cpu_mp_setmaxid() and sparc64_init() have to work prior to regular device
  probing.
- Add support for UltraSPARC IV and IV+ CPUs. Due to the fact that these
  are multi-core each CPU has two Fireplane config registers and thus the
  module/target ID has to be determined differently so the one specific
  to a certain core is used. Similarly, starting with UltraSPARC IV the
  individual cores use a different property in the OFW device tree to
  indicate the CPU/core ID as it no longer is in coincidence with the
  shared slot/socket ID.
  This involves changing the MD KTR code to not directly read the UPA
  module ID either. We use the MID stored in the per-CPU data instead of
  calling cpu_get_mid() as a replacement in order prevent clobbering any
  registers as side-effect in the assembler version. This requires CATR()
  invocations from mp_startup() prior to mapping the per-CPU pages to be
  removed though.
  While at it additionally distinguish between CPUs with Fireplane and
  JBus interconnects as these also use slightly different sizes for the
  JBus/agent/module/target IDs.
- Make sparc64_shutdown_final() static as it's not used outside of
  machdep.c.

14 years agoWhen growing a UFS1 filesystem, we need to initialise all inodes in any new
gavin [Sat, 13 Feb 2010 16:22:08 +0000 (16:22 +0000)]
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 Eldredgei  nge cs.hmc.edu
Reviewed by: mjacob
MFC after: 1 month

14 years agoFix drbr and altq interaction:
mlaier [Sat, 13 Feb 2010 16:04:58 +0000 (16:04 +0000)]
Fix drbr and altq interaction:
 - introduce drbr_needs_enqueue that returns whether the interface/br needs
   an enqueue operation: returns true if altq is enabled or there are
   already packets in the ring (as we need to maintain packet order)
 - update all drbr consumers
 - fix drbr_flush
 - avoid using the driver queue (IFQ_DRV_*) in the altq case as the
   multiqueue consumer does not provide enough protection, serialize altq
   interaction with the main queue lock
 - make drbr_dequeue_cond work with altq

Discussed with: kmacy, yongari, jfv
MFC after: 4 weeks

14 years ago- At least the trap table of the Sun Fire V1280 firmware apparently has
marius [Sat, 13 Feb 2010 15:36:33 +0000 (15:36 +0000)]
- At least the trap table of the Sun Fire V1280 firmware apparently has
  no cleanwindows handler so just remove trying to trigger it from _start
  and the AP trampoline code as that leads to a crash there. This should
  be okay as leaking data from the OFW via the CPU registers on start of
  the kernel should be no real concern.
- Make the comments of _start and the AP trampoline code regarding the
  initializations they perform match each other and reality.
- Make the comments of the AP trampoline code regarding iTLB accesses
  refer to the right macro.

14 years agomerge from head.
imp [Sat, 13 Feb 2010 15:35:51 +0000 (15:35 +0000)]
merge from head.

14 years agoCorrect the panic strings introduced in r203830 to match their arguments.
marius [Sat, 13 Feb 2010 15:12:46 +0000 (15:12 +0000)]
Correct the panic strings introduced in r203830 to match their arguments.

14 years agoUse the SUNW,{d,i}tlb-load methods for entering locked TLB entries like
marius [Sat, 13 Feb 2010 14:40:42 +0000 (14:40 +0000)]
Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like
OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves.
Unlike direct access the firmware methods don't automatically use the
next free (?) TLB slot, instead the slot to be used has to be specified.
We allocate the TLB slots for the kernel top-down as OpenSolaris suggests
that the firmware will always allocate the ones for its own use bottom-up.
Besides being simpler, according to OpenBSD using the firmware methods is
required to allow booting on Sun Fire E10K with multi-systemboard domains.

14 years ago- Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware
marius [Sat, 13 Feb 2010 14:13:39 +0000 (14:13 +0000)]
- Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware
  of Sun Fire V1280 doesn't round up the size itself but instead lets
  claiming of non page-sized amounts of memory fail.
- Change parameters and variables related to the TLB slots to unsigned
  which is more appropriate.
- Search the whole OFW device tree instead of only the children of the
  root nexus device for the BSP as starting with UltraSPARC IV the 'cpu'
  nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
  or combinations thereof. Also in large UltraSPARC III based machines
  the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
  group snooping-coherency domains together instead of directly from the
  nexus.
- Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these
  are multi-core each CPU has two Fireplane config registers and thus the
  module/target ID has to be determined differently so the one specific
  to a certain core is used. Similarly, starting with UltraSPARC IV the
  individual cores use a different property in the OFW device tree to
  indicate the CPU/core ID as it no longer is in coincidence with the
  shared slot/socket ID.
  While at it additionally distinguish between CPUs with Fireplane and
  JBus interconnects as these also use slightly different sizes for the
  JBus/agent/module/target IDs.
- Check the return value of init_heap(). This requires moving it after
  cons_probe() so we can panic when appropriate. This should be fine as
  the PowerPC OFW loader uses that order for quite some time now.

14 years agoFix function name in the comment in the second location too.
kib [Sat, 13 Feb 2010 12:50:09 +0000 (12:50 +0000)]
Fix function name in the comment in the second location too.

Submitted by: ed
MFC after: 1 week

14 years ago- Add idempotency guards so the structures can be used in other utilities.
kib [Sat, 13 Feb 2010 12:41:07 +0000 (12:41 +0000)]
- Add idempotency guards so the structures can be used in other utilities.
- Update bpb structs with reserved fields.
- In direntry struct join deName with deExtension. Although a
  fix was attempted in the past, these fields were being overflowed,
  Now this is consistent with the spec, and we can now share the
  WinChksum code with NetBSD.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Mostly obtained from: NetBSD
Reviewed by: bde
MFC after: 2 weeks

14 years agoUse M_ZERO instead of calling bzero().
kib [Sat, 13 Feb 2010 12:11:03 +0000 (12:11 +0000)]
Use M_ZERO instead of calling bzero().
Fix function name in the comment.

MFC after: 1 week

14 years agoRemove list of locking primitives, which is kind of redundant, move
trasz [Sat, 13 Feb 2010 12:03:03 +0000 (12:03 +0000)]
Remove list of locking primitives, which is kind of redundant, move
information about witness(9) to the section about interactions, and
expand 'contexts' table.

14 years agoFix VBAD description.
trasz [Sat, 13 Feb 2010 11:54:01 +0000 (11:54 +0000)]
Fix VBAD description.

14 years agokgdb: initialize n_type field of nlist entry for kvm_nlist call
avg [Sat, 13 Feb 2010 11:47:04 +0000 (11:47 +0000)]
kgdb: initialize n_type field of nlist entry for kvm_nlist call

kvm_nlist skips lookup for entries that have n_type != N_UNDF.
N_UNDF happens to be zero, so n_type typically has a correct
value by accident, but not always.
Note: jhb has a patch that replaces kvm_nlist use with direct
gdb parsing.

MFC after: 5 days
X-MFC-Note: unless jhb commits kvm_nlist => kgdb_parse change

14 years agoRemove unused macros.
kib [Sat, 13 Feb 2010 11:34:25 +0000 (11:34 +0000)]
Remove unused macros.

MFC after: 1 week

14 years agoWhen ffs_realloccg() failed to allocate bigger fragment and, because
kib [Sat, 13 Feb 2010 10:34:50 +0000 (10:34 +0000)]
When ffs_realloccg() failed to allocate bigger fragment and, because
pending blocks are scheduled for removal, goes to retry the (re)allocation,
clear the bp pointer. It might happen that meantime free space is really
exhausted and we are entering nospace: label without bread()ing buffer,
causing stale bp value to be brelse()d again.

Tested by: pho
    (Producing a scenario to reliably reproduce the
     race appeared to be much harder then fixing the bug)
MFC after: 1 week

14 years agoDon't try to determine tape block size when the -P option is used.
jh [Sat, 13 Feb 2010 10:22:07 +0000 (10:22 +0000)]
Don't try to determine tape block size when the -P option is used.
This was missed in r203157.

PR: bin/121502

14 years agoResort includes to match style(9) a bit more. No functional change
wkoszek [Sat, 13 Feb 2010 09:45:50 +0000 (09:45 +0000)]
Resort includes to match style(9) a bit more. No functional change
is expected after this commit.

Tested by: make buildworld
Reviewed by: hps (patch without .h changes)