]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoBecause POSIX does not allow EINTR to be returned from sigwait(),
davidxu [Fri, 10 Sep 2010 01:47:37 +0000 (01:47 +0000)]
Because POSIX does not allow EINTR to be returned from sigwait(),
add a wrapper for it in libc and rework the code in libthr, the
system call still can return EINTR, we keep this feature.

Discussed on: thread
Reviewed by:  jilles

13 years agoWhen using pf routing options, properly handle IP fragmentation
bz [Fri, 10 Sep 2010 00:00:06 +0000 (00:00 +0000)]
When using pf routing options, properly handle IP fragmentation
for interfaces with TSO enabled, otherwise one would see an extra
ICMP unreach, frag needed pre matching packet on lo0.
This syncs pf code to ip_output.c r162084.

PR: kern/144311
Submitted by: yongari via mlaier
Reviewed by: eri
Tested by: kib
MFC after: 8 days

13 years agoexpr(1): Add sh(1) versions of examples, remove an incorrect example.
jilles [Thu, 9 Sep 2010 21:59:53 +0000 (21:59 +0000)]
expr(1): Add sh(1) versions of examples, remove an incorrect example.

The three examples are better done using sh(1) itself these days.

The example
  expr -- "$a" : ".*"
is incorrect in the general case, as "$a" may be an operator.

MFC after: 2 weeks

13 years agoXref aesni(4).
brueffer [Thu, 9 Sep 2010 21:39:06 +0000 (21:39 +0000)]
Xref aesni(4).

13 years agoSome more grammar, wording and mdoc fixes.
brueffer [Thu, 9 Sep 2010 21:37:05 +0000 (21:37 +0000)]
Some more grammar, wording and mdoc fixes.

13 years agoRemove empty lines committed by accident.
pjd [Thu, 9 Sep 2010 21:32:09 +0000 (21:32 +0000)]
Remove empty lines committed by accident.

MFC after: 2 weeks

13 years agoOn FreeBSD we can log from pool that have multiple top-level vdevs or log
pjd [Thu, 9 Sep 2010 21:20:18 +0000 (21:20 +0000)]
On FreeBSD we can log from pool that have multiple top-level vdevs or log
vdevs, so don't deny adding new vdevs if bootfs property is set.

MFC after: 2 weeks

13 years agoIgnore log vdevs.
pjd [Thu, 9 Sep 2010 21:19:09 +0000 (21:19 +0000)]
Ignore log vdevs.

MFC after: 2 weeks

13 years agoAllow to boot from a pool within which replacing is in progress.
pjd [Thu, 9 Sep 2010 21:18:00 +0000 (21:18 +0000)]
Allow to boot from a pool within which replacing is in progress.
Before the change it wasn't possible and the following error was printed:

ZFS: can only boot from disk, mirror or raidz vdevs

Now if the original vdev (the one we are replacing) is still present we will
read from it, but if it is not present we won't read from the new vdev, as it
might not have enough valid data yet.

MFC after: 2 weeks

13 years agoRemove duplicated code.
pjd [Thu, 9 Sep 2010 21:15:16 +0000 (21:15 +0000)]
Remove duplicated code.

MFC after: 2 weeks

13 years agoBump __FreeBSD_version for sbuf ABI change.
mdf [Thu, 9 Sep 2010 21:01:41 +0000 (21:01 +0000)]
Bump __FreeBSD_version for sbuf ABI change.

13 years ago* Remove code which has no effect.
tuexen [Thu, 9 Sep 2010 20:51:23 +0000 (20:51 +0000)]
* Remove code which has no effect.
* Clean up the handling in sctp_lower_sosend().

MFC after: 3 weeks.

13 years agoArrgh, tested wrong source tree _again_. Fix previous commit. Also,
trasz [Thu, 9 Sep 2010 20:37:19 +0000 (20:37 +0000)]
Arrgh, tested wrong source tree _again_.  Fix previous commit.  Also,
this and previous one are MFC candidate.

MFC after: 1 month

13 years agoCatch up to rename of the constant for the Master Data Parity Error bit in
jhb [Thu, 9 Sep 2010 20:26:30 +0000 (20:26 +0000)]
Catch up to rename of the constant for the Master Data Parity Error bit in
the PCI status register.

Pointed out by: mdf
Pointy hat to: jhb

13 years agoAdd minor optimization. It's less strict than its kernel counterpart
trasz [Thu, 9 Sep 2010 20:07:40 +0000 (20:07 +0000)]
Add minor optimization.  It's less strict than its kernel counterpart
due to upcoming ACL changes required by the new ZFS.

13 years agoNote bug in trying to printf(1) things like: '-%s\n' "foo"
obrien [Thu, 9 Sep 2010 19:27:40 +0000 (19:27 +0000)]
Note bug in trying to printf(1) things like: '-%s\n' "foo"

13 years agolibelf is overly strict about the type and alignment of Elf_Data
kaiw [Thu, 9 Sep 2010 18:51:50 +0000 (18:51 +0000)]
libelf is overly strict about the type and alignment of Elf_Data
objects inside one ELF section, which prevents the creation of a ELF
section with mixed data types. For example, gcc LTO use libelf to
create a .gnu_lto_XXX section that contains integers and a string
table, which doesn't work with our libelf implementation.

The changes made in this commit include:
* Allow Elf_Data type to be different than section type.
* Relax Elf_Data alignment check.
* Align each Elf_Data by their own alignment instead of section alignment.

MFC after:   1 month

13 years agoDocument the format of extended capabilities in the '-c' output.
jhb [Thu, 9 Sep 2010 18:51:20 +0000 (18:51 +0000)]
Document the format of extended capabilities in the '-c' output.

13 years agoFix an incorrect use of sbuf_overflowed() after a call to sbuf_finish().
mdf [Thu, 9 Sep 2010 18:35:08 +0000 (18:35 +0000)]
Fix an incorrect use of sbuf_overflowed() after a call to sbuf_finish().

13 years agoAdd a drain function for struct sysctl_req, and use it for a variety of
mdf [Thu, 9 Sep 2010 18:33:46 +0000 (18:33 +0000)]
Add a drain function for struct sysctl_req, and use it for a variety of
handlers, some of which had to do awkward things to get a large enough
FIXEDLEN buffer.

Note that some sysctl handlers were explicitly outputting a trailing NUL
byte.  This behaviour was preserved, though it should not be necessary.

Reviewed by: phk

13 years ago- Use 'sta' to hold the PCIR_STATUS register value instead of 'cmd' when
jhb [Thu, 9 Sep 2010 18:29:48 +0000 (18:29 +0000)]
- Use 'sta' to hold the PCIR_STATUS register value instead of 'cmd' when
  walking the capability list.
- Use constants for PCI header types instead of magic numbers.

MFC after: 1 week

13 years ago- Rename the constant for the Master Data Parity Error flag in the
jhb [Thu, 9 Sep 2010 18:19:15 +0000 (18:19 +0000)]
- Rename the constant for the Master Data Parity Error flag in the
  PCI status register to map its current name.
- Use PCIM_* rather than PCIR_* for constants for fields in various AER
  registers.  I got about half of them right in the previous commit.

MFC after: 1 week

13 years agoAdd drain functionality to sbufs. The drain is a function that is
mdf [Thu, 9 Sep 2010 17:49:18 +0000 (17:49 +0000)]
Add drain functionality to sbufs.  The drain is a function that is
called when the sbuf internal buffer is filled.  For kernel sbufs with a
drain, the internal buffer will never be expanded.  For userland sbufs
with a drain, the internal buffer may still be expanded by
sbuf_[v]printf(3).

Sbufs now have three basic uses:
1) static string manipulation.  Overflow is marked.
2) dynamic string manipulation.  Overflow triggers string growth.
3) drained string manipulation.  Overflow triggers draining.

In all cases the manipulation is 'safe' in that overflow is detected and
managed.

Reviewed by: phk (the previous version)

13 years agoClean up and update sys/mips/rmi/rmi_mips_exts.h
jchandra [Thu, 9 Sep 2010 17:45:48 +0000 (17:45 +0000)]
Clean up and update sys/mips/rmi/rmi_mips_exts.h

- Provide 64 bit implementations for some macros. On n64 and n32,
  don't split 64 bit values.
- No need for 32 bit ops for control registers.
- Fix few bugs (write control reg, write_c0_register64).
- Re-write EIRR/EIMR/CPUID operations using read_c0_registerXX, no
  need of inline assembly.
- rename control reg access functions to avoid phnx, update callers.
- stlye/whitespace fixes.

13 years agoRefactor sbuf code so that most uses of sbuf_extend() are in a new
mdf [Thu, 9 Sep 2010 16:51:52 +0000 (16:51 +0000)]
Refactor sbuf code so that most uses of sbuf_extend() are in a new
sbuf_put_byte().  This makes it easier to add drain functionality when a
buffer would overflow as there are fewer code points.

Reviewed by: phk

13 years agoFix small errors in the sbuf(9) man page.
mdf [Thu, 9 Sep 2010 16:27:02 +0000 (16:27 +0000)]
Fix small errors in the sbuf(9) man page.

13 years agoReorder statistics tracking and table lock acquisitions already in place
nwhitehorn [Thu, 9 Sep 2010 16:06:55 +0000 (16:06 +0000)]
Reorder statistics tracking and table lock acquisitions already in place
to avoid race conditions updating the PVO statistics.

13 years agoFix the experimental NFS client so that it doesn't panic when
rmacklem [Thu, 9 Sep 2010 15:45:11 +0000 (15:45 +0000)]
Fix the experimental NFS client so that it doesn't panic when
NFSv2,3 byte range locking is attempted. A fix that allows the
nlm_advlock() to work with both clients is in progress, but
may take a while. As such, I am doing this commit so that
the kernel doesn't panic in the meantime.

Submitted by: jh
MFC after: 2 weeks

13 years agoOn architectures with non-tree-based page tables like PowerPC, every page
nwhitehorn [Thu, 9 Sep 2010 13:32:58 +0000 (13:32 +0000)]
On architectures with non-tree-based page tables like PowerPC, every page
in a range must be checked when calling pmap_remove(). Calling
pmap_remove() from vm_pageout_map_deactivate_pages() with the entire range
of the map could result in attempting to demap an extraordinary number
of pages (> 10^15), so iterate through each map entry and unmap each of
them individually.

MFC after: 6 weeks

13 years agoFix a problem where device detection would work unreliably on Serverworks
nwhitehorn [Thu, 9 Sep 2010 13:17:30 +0000 (13:17 +0000)]
Fix a problem where device detection would work unreliably on Serverworks
K2 SATA controllers. The chip's status register must be read first, and
as a long, for other registers to be correctly updated after a command, and
this includes the command sequence in device detection as well as the
previously handled case after interrupts. While here, clean up some
previous hacks related to this controller.

Reported by: many
Reviewed by: mav
MFC after: 3 weeks

13 years agoDon't clobber an existing target object file when doing the DTrace
rpaulo [Thu, 9 Sep 2010 11:10:15 +0000 (11:10 +0000)]
Don't clobber an existing target object file when doing the DTrace
linking process. This is needed because we change the source object
files and the second this dtrace -G is run, no probes will be found.
This hack allows us to build postgres with DTrace probes enabled. I'll
try to find a way to fix this without needing this hack.

Sponsored by: The FreeBSD Foundation

13 years agoFix two bugs in DTrace:
rpaulo [Thu, 9 Sep 2010 09:58:05 +0000 (09:58 +0000)]
Fix two bugs in DTrace:
* when the process exits, remove the associated USDT probes
* when the process forks, duplicate the USDT probes.

Sponsored by: The FreeBSD Foundation

13 years agoRemove VI_MOUNT flag from vnode on VFS_MOUNT() failure.
pjd [Thu, 9 Sep 2010 07:55:13 +0000 (07:55 +0000)]
Remove VI_MOUNT flag from vnode on VFS_MOUNT() failure.

13 years agoLet psm(4) use si_drv1 to refer to its softc.
ed [Thu, 9 Sep 2010 07:52:15 +0000 (07:52 +0000)]
Let psm(4) use si_drv1 to refer to its softc.

13 years agoAdd file missed in r212337, my bad...
imp [Thu, 9 Sep 2010 03:33:07 +0000 (03:33 +0000)]
Add file missed in r212337, my bad...

13 years agoMinor clean up for nlge - nlna_submit_rx_free_desc() can use the same desc
jchandra [Thu, 9 Sep 2010 02:52:44 +0000 (02:52 +0000)]
Minor clean up for nlge - nlna_submit_rx_free_desc() can use the same desc
every time. Also merge couple of one-line functions into their caller.

13 years agoCorrect definition of T2 mode bit of MRBE Message Page 5 Next Page
yongari [Wed, 8 Sep 2010 21:08:54 +0000 (21:08 +0000)]
Correct definition of T2 mode bit of MRBE Message Page 5 Next Page
Control Register.

13 years agoDoing first mount and updating mount points are both handled by the same
pjd [Wed, 8 Sep 2010 21:00:53 +0000 (21:00 +0000)]
Doing first mount and updating mount points are both handled by the same
syscall and the same function, but are very different and share almost no code.
To make it easier to read and analyze, split vfs_domount() into
vfs_domount_first() and vfs_domount_update().

Reviewed by: kib

13 years ago- Log all the problems in devfs_fixup().
pjd [Wed, 8 Sep 2010 20:56:18 +0000 (20:56 +0000)]
- Log all the problems in devfs_fixup().

- Correct error paths. The system will be useless on devfs_fixup() failure, so
  why bother?  Maybe for the same reason why a dead body is washed and dressed
  in a nice suit before it is put into a coffin? Maybe system's last will is to
  panic without any locks held?

Reviewed by: kib

13 years agosh: Fix 'read' if all chars before the first IFS char are backslash-escaped.
jilles [Wed, 8 Sep 2010 20:35:43 +0000 (20:35 +0000)]
sh: Fix 'read' if all chars before the first IFS char are backslash-escaped.

Backslash-escaped characters did not set the flag for a non-IFS character.

MFC after: 2 weeks

13 years agoIf autoboot_delay is set to -1, boot immediately without checking for
jhb [Wed, 8 Sep 2010 20:10:29 +0000 (20:10 +0000)]
If autoboot_delay is set to -1, boot immediately without checking for
a keypress to match the behavior of the loader.

PR: docs/108101
Submitted by: Wayne Sierke  ws of au.dyndns.ws
Tested by: brd
MFC after: 1 week

13 years agopc-sysinstall(8) patch that allows images to be written to disks
imp [Wed, 8 Sep 2010 20:10:24 +0000 (20:10 +0000)]
pc-sysinstall(8) patch that allows images to be written to disks

This patch creates the "image" directive for the pc-sysinstall config
file. This allows disks to be configured with an image instead of
partitioning.

PR: 150137
Submitted by: John Hixson

13 years agoAdd few more bintime math macros.
mav [Wed, 8 Sep 2010 20:09:50 +0000 (20:09 +0000)]
Add few more bintime math macros.

13 years agoMake sure to only pickup hid_input items when parsing input reports.
emax [Wed, 8 Sep 2010 20:00:27 +0000 (20:00 +0000)]
Make sure to only pickup hid_input items when parsing input reports.
As it turns out, libusbhid(3) also picks up hic_collection items even
though we explicitly requested hid_input items only.

Tested by: Buganini < buganini at gmail dot com >
MFC after: 1 week

13 years agoCheck TARGET_ARCH as well as TARGET to determine if we are doing a cross
nwhitehorn [Wed, 8 Sep 2010 19:53:16 +0000 (19:53 +0000)]
Check TARGET_ARCH as well as TARGET to determine if we are doing a cross
build. This is necessary to be able to cross-build 32-bit PowerPC from
a 64-bit PowerPC host.

Reviewed by: imp

13 years agoAdd custom kernel configuration and device tree source files for
emax [Wed, 8 Sep 2010 19:50:47 +0000 (19:50 +0000)]
Add custom kernel configuration and device tree source files for
Seagate FreeAgent DockStar(tm) device. It seems to be a dumb down
version of Marvell SheevaPlug. Device tree source file could use
more tweaking, but at least it wll network boot and run FreeBSD/arm.

13 years agoFix a printf specifier on 64-bit systems.
nwhitehorn [Wed, 8 Sep 2010 19:28:43 +0000 (19:28 +0000)]
Fix a printf specifier on 64-bit systems.

13 years agosh: Add simple tests for backslashes in the read builtin.
jilles [Wed, 8 Sep 2010 18:32:23 +0000 (18:32 +0000)]
sh: Add simple tests for backslashes in the read builtin.

13 years agoSimplify chkattached(). The PCIOCATTACHED ioctl only needs the pi_sel
jhb [Wed, 8 Sep 2010 18:18:01 +0000 (18:18 +0000)]
Simplify chkattached().  The PCIOCATTACHED ioctl only needs the pi_sel
field populated, it ignores the rest of the 'pci_sel' structure.

MFC after: 1 week

13 years ago- Add register definitions related to extended capability IDs in
jhb [Wed, 8 Sep 2010 17:53:34 +0000 (17:53 +0000)]
- Add register definitions related to extended capability IDs in
  PCI-express.  I used PCIZ_* for ID constants (plain capability IDs use
  PCIY_*).
- Add register definitions for the Advanced Error Reporting, Virtual
  Channels, and Device Serial Number extended capabilities.
- Teach pciconf -c to list extended as well as plain capabilities.   Adds
  more detailed parsing for AER, VC, and device serial numbers.

MFC after: 2 weeks

13 years agosubr_bus: use hexadecimal representation for bit flags
avg [Wed, 8 Sep 2010 17:35:06 +0000 (17:35 +0000)]
subr_bus: use hexadecimal representation for bit flags

It seems that this format is more custom in our code, and it is more
convenient too.

Suggested by: jhb
No objection: imp
MFC after: 1 week

13 years agonlge (alternate XLR GMAC driver) updates:
jchandra [Wed, 8 Sep 2010 17:11:49 +0000 (17:11 +0000)]
nlge (alternate XLR GMAC driver) updates:

- Updates for the message ring clean up in r212321.
- Instead of dropping Tx packet on credit fail, retry send until it
  succeeds.
- Fix freeing mbufs in case of P2P descriptors:
  We cannot free the mbuf when the P2P descriptor freeback is received. The
  mbuf may be still in use by the GMAC, since the P2P freeback indicates that
  it read the P2D descriptors in the P2P message.
  Now we free just the P2P descriptor when the P2P freeback message is
  received.  Another freeback P2D message has been added to the end of
  the packet descriptors, the mbuf will be freed only when we received
  this.

The P2P descriptor issue was reported by srgorti at netlogicmicro dot com.

13 years agoDuring SMP startup there is time window, when SMP started, but interrupts
mav [Wed, 8 Sep 2010 16:59:22 +0000 (16:59 +0000)]
During SMP startup there is time window, when SMP started, but interrupts
are still bound to BSP. It confuses timer management logic in per-CPU mode
and may cause timer not being reloaded. Check such cases on interrupt
arival and reload timer to give system some more time to manage proper
binding.

13 years agoFix a typo in the original import of this code from NetBSD that caused the
nwhitehorn [Wed, 8 Sep 2010 16:58:06 +0000 (16:58 +0000)]
Fix a typo in the original import of this code from NetBSD that caused the
wrong element of the VSID bitmap array to be examined after a collision,
leading to reallocation of in-use VSIDs under some circumstances, with
attendant memory corruption. Also add an assert to check for this kind of
problem in the future.

MFC after: 4 days

13 years agoClean up fast message ring code for XLR.
jchandra [Wed, 8 Sep 2010 16:34:08 +0000 (16:34 +0000)]
Clean up fast message ring code for XLR.

Fix message ring send path:
- define msgrng_access_enable() which disables local interrupts
  and enables message ring access. Also define msgrng_restore() which
  restores interrupts
- remove all other msgrng enable/disable macros, no need of critical_enter
  and other locking here.
- message_send() fixup: re-read status until pending bit clears
- message_send_retry() fixup: retry only few times with interrupts disabled
- Fix up message_send/message_send_retry callers - call
  msgrng_access_enable() and msgrng_restore() correctly so that interrupts
  are not disabled for long.
- removed unused and obsolete code from sys/mips/rmi/msgring.h
- some style fixes - more later

rge.c (XLR GMAC driver):
- updated for the message ring changes
- remove unused message_send_block()
- retry on credit failure, this is not a permanent failure when credits
  are configured correctly. Add panic if credits are not available to
  send for a long time.

13 years agoAdd Buffalo (Melco Inc.) LUA3-U2-ATX to list of supported devices.
sanpei [Wed, 8 Sep 2010 13:26:19 +0000 (13:26 +0000)]
Add Buffalo (Melco Inc.) LUA3-U2-ATX to list of supported devices.

Submitted by: nork at FreeBSD.org
MFC after: 3 days

13 years agoFor total interrupt count on -vm screen count all interrupts, but not only
mav [Wed, 8 Sep 2010 07:30:46 +0000 (07:30 +0000)]
For total interrupt count on -vm screen count all interrupts, but not only
those which fit the screen.

13 years agoTo avoid possible race condition, SIGCANCEL is always sent except the
davidxu [Wed, 8 Sep 2010 02:18:20 +0000 (02:18 +0000)]
To avoid possible race condition, SIGCANCEL is always sent except the
thread is dead.

13 years agoFix an error made in r209975 related to context ID allocation for 64-bit
nwhitehorn [Tue, 7 Sep 2010 23:31:48 +0000 (23:31 +0000)]
Fix an error made in r209975 related to context ID allocation for 64-bit
PowerPC CPUs running a 32-bit kernel. This bug could cause in-use VSIDs
to be allocated again to another process, causing memory space overlaps
and corruption.

Reported by: linimon

13 years agoConsistently use tab characters instead of tab + space characters.
yongari [Tue, 7 Sep 2010 23:08:38 +0000 (23:08 +0000)]
Consistently use tab characters instead of tab + space characters.
No functional changes.

13 years agoRemove trailing CR at EOL.
yongari [Tue, 7 Sep 2010 22:44:29 +0000 (22:44 +0000)]
Remove trailing CR at EOL.

13 years agoAvoid "Entry can disappear before we lock fdvp" panic.
ivoras [Tue, 7 Sep 2010 22:40:45 +0000 (22:40 +0000)]
Avoid "Entry can disappear before we lock fdvp" panic.

PR: 150143
Submitted by: Gleb Kurtsou <gk at FreeBSD.org>
Pretty sure it won't blow up: mckusick
MFC after: 2 weeks

13 years agoCode correction in refresh_mbufs, just continuing
jfv [Tue, 7 Sep 2010 21:28:45 +0000 (21:28 +0000)]
Code correction in refresh_mbufs, just continuing
without index recalc was wrong.

13 years agoTighten up the rx mbuf refresh code, there were some
jfv [Tue, 7 Sep 2010 20:13:08 +0000 (20:13 +0000)]
Tighten up the rx mbuf refresh code, there were some
discrepencies from the igb version which was the target.

Change the message when neither MSI or MSIX are enabled
and a fallback to Legacy interrupts happen, the existing
message was confusing.

13 years agoMake sure to create DMA'able memory for statistics block. This was
yongari [Tue, 7 Sep 2010 18:29:29 +0000 (18:29 +0000)]
Make sure to create DMA'able memory for statistics block. This was
missed in r212061 and it caused crashes for 570x controllers as
controller DMAed statistics to physical address 0.

Reported by: kan

13 years agoDo not request SDP attributes using ranges.
emax [Tue, 7 Sep 2010 16:36:03 +0000 (16:36 +0000)]
Do not request SDP attributes using ranges.
Apparently some devices do not like it.

MFC after: 1 week
Tested by: Buganini < buganini at gmail dot com >

13 years agoStore the full timestamp when caching timestamps of files and
jhb [Tue, 7 Sep 2010 14:29:45 +0000 (14:29 +0000)]
Store the full timestamp when caching timestamps of files and
directories for purposes of validating name cache entries.  This
closes races where two updates to a file or directory within the same
second could result in stale entries in the name cache.  While here,
remove the 'n_expiry' field as it is no longer used.

Reviewed by: rmacklem
MFC after: 1 week

13 years agoEach processor socket in a QPI system has a special PCI bus for the
jhb [Tue, 7 Sep 2010 13:50:02 +0000 (13:50 +0000)]
Each processor socket in a QPI system has a special PCI bus for the
"uncore" devices (such as the memory controller) in that socket.  Stop
hardcoding support for two busses, but instead start probing buses at
domain 0, bus 255 and walk down until a bus probe fails.  Also, do not probe
a bus if it has already been enumerated elsewhere (e.g. if ACPI ever
enumerates these buses in the future).

13 years agoGCC defines built-ins for atomic instructions found on i486 and higher.
tijl [Tue, 7 Sep 2010 08:33:17 +0000 (08:33 +0000)]
GCC defines built-ins for atomic instructions found on i486 and higher.
Because FreeBSD no longer supports the 80386 cpu all code targeting
FreeBSD/i386 necessarily runs on i486 or higher so the compiler
built-ins can be used by default inside libstdc++ and in C++ headers.
This allows newly compiled C++ code to inline some atomic operations.
Old binaries continue to use libstdc++ functions.

PR: 148926
Tested by: Yuri Karaban <tech askold net>
Reviewed by: kan
Approved by: kib (mentor)
MFC after: 2 weeks

13 years agoPCIe updates for XLS.
jchandra [Tue, 7 Sep 2010 07:31:58 +0000 (07:31 +0000)]
PCIe updates for XLS.

Fix interrupt routing so that the irq returned is correct for XLR and
XLS. This also updates the MSI hack we had earlier - we still don't
really support MSI, but we support some drivers that use MSI, by providing
support for allocating one MSI per pci link - this MSI is directly
mapped to the link IRQ.

13 years agoWhitespace fixes - indent with tabs instead of spaces.
jchandra [Tue, 7 Sep 2010 06:02:43 +0000 (06:02 +0000)]
Whitespace fixes - indent with tabs instead of spaces.
Few other style(9) changes.

13 years agoOn boards with >512MB memory, the result of vtophys cannot be converted
jchandra [Tue, 7 Sep 2010 05:39:24 +0000 (05:39 +0000)]
On boards with >512MB memory, the result of vtophys cannot be converted
to KSEG1 address - use pmap_mapdev/pmap_unmapdev instead.

Remove unused variable maxphys.

13 years agoFix a typo in r212281. uintptr -> uintptr_t
rstone [Tue, 7 Sep 2010 02:51:11 +0000 (02:51 +0000)]
Fix a typo in r212281.  uintptr -> uintptr_t

Pointy hat to:  rstone

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

13 years agoIn munmap() downgrade the vm_map_lock to a read lock before taking a read
rstone [Tue, 7 Sep 2010 00:23:45 +0000 (00:23 +0000)]
In munmap() downgrade the vm_map_lock to a read lock before taking a read
lock on the pmc-sx lock.  This prevents a deadlock with
pmc_log_process_mappings, which has an exclusive lock on pmc-sx and tries
to get a read lock on a vm_map.  Downgrading the vm_map_lock in munmap
allows pmc_log_process_mappings to continue, preventing the deadlock.

Without this change I could cause a deadlock on a multicore 8.1-RELEASE
system by having one thread constantly mmap'ing and then munmap'ing a
PROT_EXEC mapping in a loop while I repeatedly invoked and stopped pmcstat
in system-wide sampling mode.

Reviewed by: fabient
Approved by: emaste (mentor)
MFC after: 2 weeks

13 years agoFix the same race condition on 32-bit AIM CPUs that was fixed for 64-bit
nwhitehorn [Mon, 6 Sep 2010 23:07:58 +0000 (23:07 +0000)]
Fix the same race condition on 32-bit AIM CPUs that was fixed for 64-bit
ones in r211967 involving VSID allocation.

13 years agoAdds LOADER TUNABLES section to mention knobs which could be controlled
weongyo [Mon, 6 Sep 2010 22:23:35 +0000 (22:23 +0000)]
Adds LOADER TUNABLES section to mention knobs which could be controlled
by loader(8) interface.

13 years agoAdds a CAVEATS section to mention DMA issues that currently only
weongyo [Mon, 6 Sep 2010 22:10:57 +0000 (22:10 +0000)]
Adds a CAVEATS section to mention DMA issues that currently only
a solution is using PIO mode.  As fas as I know all open source based
broadcom drivers for specially LP PHY has this issue because it's
a reverse engineered driver from wl(4).

Pointed by: Warren Block <wblock at wonkity.com>

13 years agoAdds bwi(4) at SEE ALSO section because some old devices aren't
weongyo [Mon, 6 Sep 2010 22:02:08 +0000 (22:02 +0000)]
Adds bwi(4) at SEE ALSO section because some old devices aren't
supported by the bwn(4) firmware that as fas as I know the vendor
dropped its support.  Bumps date also.

13 years agoAdd ECONNRESET to list of possible errors in connect(2).
gjb [Mon, 6 Sep 2010 21:39:54 +0000 (21:39 +0000)]
Add ECONNRESET to list of possible errors in connect(2).

PR: 148683
Submitted by: Gennady Proskurin <gpr at mail dot ru>
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoGrammar fixes.
kib [Mon, 6 Sep 2010 21:29:21 +0000 (21:29 +0000)]
Grammar fixes.

Submitted by: Ben Kaduk <minimarmot gmail com>, Valentin Nechaev

13 years agoFix CARP in backup mode by properly registering its hooks for INET and INET6
will [Mon, 6 Sep 2010 21:06:06 +0000 (21:06 +0000)]
Fix CARP in backup mode by properly registering its hooks for INET and INET6
using ipproto_{un,}register() and the newly created ip6proto_{un,}register()
so that it can again receive IPPROTO_CARP packets allowing its state machine
to work.

Reviewed by: bz
Approved by: ken (mentor)

13 years agoFix static kernel builds with carp(4) by changing its SYSINIT order so that
will [Mon, 6 Sep 2010 21:03:30 +0000 (21:03 +0000)]
Fix static kernel builds with carp(4) by changing its SYSINIT order so that
it is initialized after basic protocol initialization, which allows it to
register via pf_proto_register().

Reviewed by: bz
Approved by: ken (mentor)

13 years agoFix typo in bsdcpio manual:
gjb [Mon, 6 Sep 2010 20:40:38 +0000 (20:40 +0000)]
Fix typo in bsdcpio manual:
s/libarchive_formats/libarchive-formats

PR: 150300
Submitted by: Kurt Jaeger <fbsd-pr at opsec dot eu>
Patch by: Kurt Jaeger
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoAdd aesni(4) manpage.
kib [Mon, 6 Sep 2010 20:35:48 +0000 (20:35 +0000)]
Add aesni(4) manpage.

13 years agoPoint out who is my mentor.
andreast [Mon, 6 Sep 2010 20:16:10 +0000 (20:16 +0000)]
Point out who is my mentor.

Approved by: nwhitehorn (mentor)

13 years agoAdd myself to calendar.freebsd and committers-src.dot.
andreast [Mon, 6 Sep 2010 19:00:00 +0000 (19:00 +0000)]
Add myself to calendar.freebsd and committers-src.dot.

Approved by: nwhitehorn (mentor)

13 years agoin_delayed_cksum() requires host byte order.
glebius [Mon, 6 Sep 2010 13:17:01 +0000 (13:17 +0000)]
in_delayed_cksum() requires host byte order.

Reported by: Alexander Levin <amindomao googlemail.com>
MFC after: 1 week

13 years agosis(4) should work on all architectures now.
brueffer [Mon, 6 Sep 2010 11:02:50 +0000 (11:02 +0000)]
sis(4) should work on all architectures now.

13 years agoDocument dhclient-enter-hooks and dhclient-exit-hooks and mention
brian [Mon, 6 Sep 2010 09:59:10 +0000 (09:59 +0000)]
Document dhclient-enter-hooks and dhclient-exit-hooks and mention
how to configure dhclient to clear the interface of IP numbers prior
to configuring it.

PR: 149351
MFC after: 2 weeks

13 years agoacpi_hp: fix bus attachment code
avg [Mon, 6 Sep 2010 07:34:32 +0000 (07:34 +0000)]
acpi_hp: fix bus attachment code

- add identify method to create driver's own device_t
- successfully probe only driver's own device_t instead of any device_t
- (ab)use device order to hopefully be probed/attached after acpi_wmi

PR: kern/147858
Tested by: Maciej Suszko <maciej@suszko.eu>
MFC after: 1 week

13 years agoXLR/XLS hardware interrupts should be programmed level triggered at the
jchandra [Mon, 6 Sep 2010 06:18:49 +0000 (06:18 +0000)]
XLR/XLS hardware interrupts should be programmed level triggered at the
PIC.  This should fix the interrupt releated issues seen after the
interrupt handling re-write for SMP.

13 years agoHandle geli-encrypted root disk devices.
brian [Mon, 6 Sep 2010 04:15:49 +0000 (04:15 +0000)]
Handle geli-encrypted root disk devices.

MFC after: 2 weeks

13 years agoFix off-by-one error in function _thr_sigact_unload, also disable the
davidxu [Mon, 6 Sep 2010 03:00:54 +0000 (03:00 +0000)]
Fix off-by-one error in function _thr_sigact_unload, also disable the
function, it seems some gnome application tends to crash if we
unregister sigaction automatically.

13 years agoprintf(1): Clarify that \OOO produces a byte, different %b escape sequences.
jilles [Sun, 5 Sep 2010 21:44:50 +0000 (21:44 +0000)]
printf(1): Clarify that \OOO produces a byte, different %b escape sequences.

Octal escape sequences are expanded to bytes, not characters, and multiple
are required for a multibyte character.

The valid escape sequences in %b strings are slightly different from the
escape sequences in the format string.

13 years agosh: Improve comments in expand.c.
jilles [Sun, 5 Sep 2010 21:12:48 +0000 (21:12 +0000)]
sh: Improve comments in expand.c.

13 years agoImplement correct handling of address parameter and
tuexen [Sun, 5 Sep 2010 20:13:07 +0000 (20:13 +0000)]
Implement correct handling of address parameter and
sendinfo for SCTP send calls.

MFC after: 4 weeks.

13 years agoNote in rc.conf(5) that jail_list should contain only alphanumeric
gjb [Sun, 5 Sep 2010 20:04:54 +0000 (20:04 +0000)]
Note in rc.conf(5) that jail_list should contain only alphanumeric
characters.

PR: 150098
Submitted by: cc (cpt_complain at yahoo dot com)
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoAdd support for the Sharp/Micron flash chips to powermac_mvram(4).
mav [Sun, 5 Sep 2010 20:04:02 +0000 (20:04 +0000)]
Add support for the Sharp/Micron flash chips to powermac_mvram(4).
Tested on PowerMac G4 AGP.

Reviewed by: nwhitehorn

13 years agoMake nexus report name and compat fields as pnpinfo for devices on the
mav [Sun, 5 Sep 2010 19:57:24 +0000 (19:57 +0000)]
Make nexus report name and compat fields as pnpinfo for devices on the
first level of hierarchy, same as done on deeper levels.

13 years agoSeveral improvements to HPET driver:
mav [Sun, 5 Sep 2010 19:24:32 +0000 (19:24 +0000)]
Several improvements to HPET driver:
 - Add special check for case when time expires before being programmed.
This fixes interrupt loss and respectively timer death on attempt to
program very short interval. Increase minimal supported period to more
realistic value.
 - Add support for hint.hpet.X.allowed_irqs tunable, allowing manually
specify which interrupts driver allowed to use. Unluckily, many BIOSes
program wrong allowed interrupts mask, so driver tries to stay on safe
side by not using unshareable ISA IRQs. This option gives control over
this limitation, allowing more per-CPU timers to be provided, when FSB
interrupts are not supported. Value of this tunable is bitmask.
 - Do not use regular interrupts on virtual machines. QEMU and VirtualBox
do not support them properly, that may cause problems. Stay safe by default.
Same time both QEMU and VirtualBox work fine in legacy_route mode.
VirtualBox also works fine if manually specify allowed ISA IRQs with above.