]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoFor some file types, select code registers two selfd structures. E.g.,
Konstantin Belousov [Sat, 28 Aug 2010 17:42:08 +0000 (17:42 +0000)]
For some file types, select code registers two selfd structures. E.g.,
for socket, when specified POLLIN|POLLOUT in events, you would have one
selfd registered for receiving socket buffer, and one for sending. Now,
if both events are not ready to fire at the time of the initial scan,
but are simultaneously ready after the sleep, pollrescan() would iterate
over the pollfd struct twice. Since both times revents is not zero,
returned value would be off by one.

Fix this by recalculating the return value in pollout().

PR: kern/143029
MFC after: 2 weeks

14 years agoTest the poll(2) return value.
Konstantin Belousov [Sat, 28 Aug 2010 17:38:40 +0000 (17:38 +0000)]
Test the poll(2) return value.

MFC after: 2 weeks

14 years agoAdd the MAP_PREFAULT_READ option to mmap(2).
Alan Cox [Sat, 28 Aug 2010 16:57:07 +0000 (16:57 +0000)]
Add the MAP_PREFAULT_READ option to mmap(2).

Reviewed by: jhb, kib

14 years agoFix incorrect usage of 'assure' and 'insure'.
Rebecca Cran [Sat, 28 Aug 2010 16:32:01 +0000 (16:32 +0000)]
Fix incorrect usage of 'assure' and 'insure'.

Approved by: rrs (mentor)

14 years agoFix breakage introduced in r211725 and improve functionality of truss on
Nathan Whitehorn [Sat, 28 Aug 2010 15:04:53 +0000 (15:04 +0000)]
Fix breakage introduced in r211725 and improve functionality of truss on
64-bit powerpc by adding 32-bit compatibility features.

14 years agoRepair some build breakage introduced in r211725 and garbage collect some
Nathan Whitehorn [Sat, 28 Aug 2010 15:03:11 +0000 (15:03 +0000)]
Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.

14 years agoImport changes from OpenSolaris that provide
Martin Matuska [Sat, 28 Aug 2010 09:24:11 +0000 (09:24 +0000)]
Import changes from OpenSolaris that provide
- better ACL caching and speedup of ACL permission checks
- faster handling of stat()
- lowered mutex contention in the read/writer lock (rrwlock)
- several related bugfixes

Detailed information (OpenSolaris onnv changesets and Bug IDs):

9749:105f407a2680
6802734 Support for Access Based Enumeration (not used on FreeBSD)
6844861 inconsistent xattr readdir behavior with too-small buffer

9866:ddc5f1d8eb4e
6848431 zfs with rstchown=0 or file_chown_self privilege allows user to "take" ownership

9981:b4907297e740
6775100 stat() performance on files on zfs should be improved
6827779 rrwlock is overly protective of its counters

10143:d2d432dfe597
6857433 memory leaks found at: zfs_acl_alloc/zfs_acl_node_alloc
6860318 truncate() on zfsroot succeeds when file has a component of its path set without access permission

10232:f37b85f7e03e
6865875 zfs sometimes incorrectly giving search access to a dir

10250:b179ceb34b62
6867395 zpool_upgrade_007_pos testcase panic'd with BAD TRAP: type=e (#pf Page fault)

10269:2788675568fd
6868276 zfs_rezget() can be hazardous when znode has a cached ACL

10295:f7a18a1e9610
6870564 panic in zfs_getsecattr

Approved by: delphij (mentor)
Obtained from: OpenSolaris (multiple Bug IDs)
MFC after: 2 weeks

14 years agoUpdate ZFS metaslab code from OpenSolaris.
Martin Matuska [Sat, 28 Aug 2010 08:59:55 +0000 (08:59 +0000)]
Update ZFS metaslab code from OpenSolaris.
This provides a noticeable write speedup, especially on pools with
less than 30% of free space.

Detailed information (OpenSolaris onnv changesets and Bug IDs):

11146:7e58f40bcb1c
6826241 Sync write IOPS drops dramatically during TXG sync
6869229 zfs should switch to shiny new metaslabs more frequently

11728:59fdb3b856f6
6918420 zdb -m has issues printing metaslab statistics

12047:7c1fcc8419ca
6917066 zfs block picking can be improved

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6826241686922969184206917066)
MFC after: 2 weeks

14 years agoThere is a bug in vfs_allocate_syncvnode() failure handling in mount code.
Pawel Jakub Dawidek [Sat, 28 Aug 2010 08:57:15 +0000 (08:57 +0000)]
There is a bug in vfs_allocate_syncvnode() failure handling in mount code.
Actually it is hard to properly handle such a failure, especially in MNT_UPDATE
case. The only reason for the vfs_allocate_syncvnode() function to fail is
getnewvnode() failure. Fortunately it is impossible for current implementation
of getnewvnode() to fail, so we can assert this and make
vfs_allocate_syncvnode() void. This in turn free us from handling its failures
in the mount code.

Reviewed by: kib
MFC after: 1 month

14 years agoRemove debugging.
Rui Paulo [Sat, 28 Aug 2010 08:39:37 +0000 (08:39 +0000)]
Remove debugging.

Sponsored by: The FreeBSD Foundation

14 years agoRun all tasks from a proper context, with proper priority, etc.
Pawel Jakub Dawidek [Sat, 28 Aug 2010 08:38:03 +0000 (08:38 +0000)]
Run all tasks from a proper context, with proper priority, etc.

Reviewed by: jhb
MFC after: 1 month

14 years agoCorrect offset conversion to little endian. It was implemented in version 2,
Pawel Jakub Dawidek [Sat, 28 Aug 2010 08:30:20 +0000 (08:30 +0000)]
Correct offset conversion to little endian. It was implemented in version 2,
but because of a bug it was a no-op, so we were still using offsets in native
byte order for the host. Do it properly this time, bump version to 4 and set
the G_ELI_FLAG_NATIVE_BYTE_ORDER flag when version is under 4.

MFC after: 2 weeks

14 years agoAdd the path necessary to find fasttrap_isa.h to CFLAGS.
Rui Paulo [Sat, 28 Aug 2010 08:18:20 +0000 (08:18 +0000)]
Add the path necessary to find fasttrap_isa.h to CFLAGS.

Sponsored by: The FreeBSD Foundation

14 years agoReplace a memory barrier with a mutex barrier.
Rui Paulo [Sat, 28 Aug 2010 08:13:38 +0000 (08:13 +0000)]
Replace a memory barrier with a mutex barrier.

Sponsored by: The FreeBSD Foundation

14 years agoRegister an interrupt vector for DTrace return probes. There is some
Rui Paulo [Sat, 28 Aug 2010 08:03:29 +0000 (08:03 +0000)]
Register an interrupt vector for DTrace return probes. There is some
code missing in lapic to make sure that we don't overwrite this entry,
but this will be done on a sequent commit.

Sponsored by: The FreeBSD Foundation

14 years agoInitial code for XLR CompactFlash driver.
Jayachandran C. [Sat, 28 Aug 2010 07:58:10 +0000 (07:58 +0000)]
Initial code for XLR CompactFlash driver.

Submitted by: Sreekanth M. S. <kanthms at netlogicmicro com>

14 years agoMFata(4):
Alexander Motin [Sat, 28 Aug 2010 07:24:45 +0000 (07:24 +0000)]
MFata(4):
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

14 years agoAdd Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
Alexander Motin [Sat, 28 Aug 2010 07:10:51 +0000 (07:10 +0000)]
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

Submitted by: jfv@
MFC after: 1 week

14 years agoDo not allocate multicast array memory in multicast filter
Pyun YongHyeon [Sat, 28 Aug 2010 00:34:22 +0000 (00:34 +0000)]
Do not allocate multicast array memory in multicast filter
configuration function. For failed memory allocations, em(4)/lem(4)
called panic(9) which is not acceptable on production box.
igb(4)/ixgb(4)/ix(4) allocated the required memory in stack which
consumed 768 bytes of stack memory which looks too big.

To address these issues, allocate multicast array memory in device
attach time and make multicast configuration success under any
conditions. This change also removes the excessive use of memory in
stack.

Reviewed by: jfv

14 years agoAdd Intel Cougar Point PCH HD Audio Controller ID
Jack F Vogel [Sat, 28 Aug 2010 00:23:13 +0000 (00:23 +0000)]
Add Intel Cougar Point PCH HD Audio Controller ID

MFC in a week

14 years agoIf em(4) failed to allocate RX buffers, do not call panic(9).
Pyun YongHyeon [Sat, 28 Aug 2010 00:16:49 +0000 (00:16 +0000)]
If em(4) failed to allocate RX buffers, do not call panic(9).
Just showing some buffer allocation error is more appropriate
action for drivers. This should fix occasional panic reported on
em(4) when driver encountered resource shortage.

Reviewed by: jfv

14 years agoAdd Intel Cougar Point PCH LPC Controller Device IDs
Jack F Vogel [Sat, 28 Aug 2010 00:09:46 +0000 (00:09 +0000)]
Add Intel Cougar Point PCH LPC Controller Device IDs
for watchdog support. Also add additional Intel Ibex
Peak (5 Series/3400 Series) PCH IDs.

MFC after a week

14 years agoDo not call voluntary panic(9) in case of if_alloc() failure.
Pyun YongHyeon [Sat, 28 Aug 2010 00:09:19 +0000 (00:09 +0000)]
Do not call voluntary panic(9) in case of if_alloc() failure.

Reviewed by: jfv

14 years agoMake sure not to access unallocated stats memory.
Pyun YongHyeon [Fri, 27 Aug 2010 23:50:13 +0000 (23:50 +0000)]
Make sure not to access unallocated stats memory.

Reviewed by: jfv

14 years agoAdd support for Intel Cougar Point SMBus controller.
Jack F Vogel [Fri, 27 Aug 2010 23:24:08 +0000 (23:24 +0000)]
Add support for Intel Cougar Point SMBus controller.

MFC afer 1 week

14 years agoMFp4 CH=182972:
Bjoern A. Zeeb [Fri, 27 Aug 2010 23:22:58 +0000 (23:22 +0000)]
MFp4 CH=182972:

Add explicit linkstate UP/DOWN for the epair.  This is needed by carp(4)
and other things to work.

MFC after: 5 days

14 years agoUse ZFS_CTLDIR_NAME instead of hardcoding ".zfs".
Pawel Jakub Dawidek [Fri, 27 Aug 2010 21:31:15 +0000 (21:31 +0000)]
Use ZFS_CTLDIR_NAME instead of hardcoding ".zfs".

14 years agoWhen SIGTERM or SIGINT is received, terminate worker processes.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 21:28:02 +0000 (21:28 +0000)]
When SIGTERM or SIGINT is received, terminate worker processes.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoWhen logging to stdout/stderr, flush after each log.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 21:26:55 +0000 (21:26 +0000)]
When logging to stdout/stderr, flush after each log.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoCorrect when we log interrupted synchronization.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 21:20:32 +0000 (21:20 +0000)]
Correct when we log interrupted synchronization.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoCheck if no signals were delivered just before going to sleep.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 20:49:06 +0000 (20:49 +0000)]
Check if no signals were delivered just before going to sleep.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoAdd hooks execution.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 20:48:12 +0000 (20:48 +0000)]
Add hooks execution.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoDo not call __pthread_cxa_finalize with invalid struct dl_phdr_info.
Konstantin Belousov [Fri, 27 Aug 2010 19:57:17 +0000 (19:57 +0000)]
Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info.

Reported and tested by: Fabian Keil <freebsd-listen fabiankeil de>
MFC after: 17 days

14 years agoRevamp XLR interrupt handling, the previous scheme does not work well on
Jayachandran C. [Fri, 27 Aug 2010 19:53:57 +0000 (19:53 +0000)]
Revamp XLR interrupt handling, the previous scheme does not work well on
SMP.

We used to route all PIC based interrupts to cpu 0, and used the per-CPU
interrupt mask to enable/disable interrupts. But the interrupt threads can
run on any cpu on SMP, and the interrupt thread will re-enable the interrupts
on the CPU it runs on when it is done, and not on cpu0 where the PIC will
still send interrupts to.

The fix is move the disable/enable for PIC based interrupts to PIC, we will
ack on PIC only when the interrupt thread is done, and we do not use the
per-CPU interrupt mask.

The changes also introduce a way for subsystems to add a function that
will be called to clear the interrupt on the subsystem. Currently This is
used by the PCI/PCIe for doing additional work during the interrupt
handling.

14 years agoSimplify the tcp pcblist estimate logic slightly.
John Baldwin [Fri, 27 Aug 2010 18:17:46 +0000 (18:17 +0000)]
Simplify the tcp pcblist estimate logic slightly.

MFC after: 3 days

14 years agoDocument new 'exec' parameter.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 15:20:31 +0000 (15:20 +0000)]
Document new 'exec' parameter.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoAllow to execute specified program on various HAST events.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 15:16:52 +0000 (15:16 +0000)]
Allow to execute specified program on various HAST events.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years ago- Run hooks in background - don't block waiting for them to finish.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:38:12 +0000 (14:38 +0000)]
- Run hooks in background - don't block waiting for them to finish.
- Keep all hooks we're running in a global list, so we can report when
  they finish and also report when they are running for too long.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoWhen logging to stdout/stderr don't close those descriptors after fork().
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:35:39 +0000 (14:35 +0000)]
When logging to stdout/stderr don't close those descriptors after fork().

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoReduce indent where possible.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:28:39 +0000 (14:28 +0000)]
Reduce indent where possible.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoImplement keepalive mechanism inside HAST protocol so we can detect secondary
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:26:37 +0000 (14:26 +0000)]
Implement keepalive mechanism inside HAST protocol so we can detect secondary
node failures quickly for HAST resources that are rarely modified.

Remove XXX from a comment now that the guard thread never sleeps infinitely.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years ago- Remove redundant and incorrect 'old' word from debug message.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:12:53 +0000 (14:12 +0000)]
- Remove redundant and incorrect 'old' word from debug message.
- Log disconnects as warnings.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoDon't increase number synchronized bytes in case of an error.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:10:25 +0000 (14:10 +0000)]
Don't increase number synchronized bytes in case of an error.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoLog that synchronization was interrupted in a proper place.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:08:10 +0000 (14:08 +0000)]
Log that synchronization was interrupted in a proper place.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoWe have sync_start() function to start synchronization, introduce sync_stop()
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:06:00 +0000 (14:06 +0000)]
We have sync_start() function to start synchronization, introduce sync_stop()
function to stop it.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoAdd QUEUE_INSERT() and QUEUE_TAKE() macros that simplify the code a bit.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 14:01:28 +0000 (14:01 +0000)]
Add QUEUE_INSERT() and QUEUE_TAKE() macros that simplify the code a bit.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoAdd mtx_owned() implementation.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 13:58:38 +0000 (13:58 +0000)]
Add mtx_owned() implementation.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoMake comment more readable.
Pawel Jakub Dawidek [Fri, 27 Aug 2010 13:54:17 +0000 (13:54 +0000)]
Make comment more readable.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

14 years agoUse timestamp modulo comparison macro for automatic receive buffer
Andre Oppermann [Fri, 27 Aug 2010 12:34:53 +0000 (12:34 +0000)]
Use timestamp modulo comparison macro for automatic receive buffer
scaling to correctly handle wrapping of ticks value.

MFC after: 1 week

14 years agoDon't attempt to write label with GEOM_BSD based method if the class is
Jaakko Heinonen [Fri, 27 Aug 2010 11:08:11 +0000 (11:08 +0000)]
Don't attempt to write label with GEOM_BSD based method if the class is
not available. This improves error reporting when bsdlabel(8) is unable
to open a device for writing. If GEOM_BSD was unavailable, only a rather
obscure error message "Class not found" was printed.

PR: bin/58390
Reviewed by: ae
Discussed with: marcel
MFC after: 1 month

14 years agoUse private namespace for visibility keyword.
Konstantin Belousov [Fri, 27 Aug 2010 09:55:51 +0000 (09:55 +0000)]
Use private namespace for visibility keyword.

Noted by: bde
MFC after: 3 days

14 years agoFix an off-by-one error where we try to split a path name that's
Brian Somers [Fri, 27 Aug 2010 08:54:40 +0000 (08:54 +0000)]
Fix an off-by-one error where we try to split a path name that's
more than 100 characters long and the 101th last character is a
'/'.

MFC after: 3 weeks

14 years agoWhitespace fixes in mips/include, remove unused 'struct tlb' from locore.h
Jayachandran C. [Fri, 27 Aug 2010 07:45:50 +0000 (07:45 +0000)]
Whitespace fixes in mips/include, remove unused 'struct tlb' from locore.h

PR: misc/147471

14 years agopmap_mapdev() does not appear to actually need GIANT to be held here,
Nathan Whitehorn [Fri, 27 Aug 2010 05:29:59 +0000 (05:29 +0000)]
pmap_mapdev() does not appear to actually need GIANT to be held here,
and asserting that is held breaks drm.

MFC after: 2 weeks

14 years agoUnregister thread specific data destructor when a corresponding dso
David Xu [Fri, 27 Aug 2010 05:20:22 +0000 (05:20 +0000)]
Unregister thread specific data destructor when a corresponding dso
is unloaded.

14 years agoclear lock to zero state if it is destroyed.
David Xu [Fri, 27 Aug 2010 03:23:07 +0000 (03:23 +0000)]
clear lock to zero state if it is destroyed.

14 years agoUpdate comment now that I finally committed r211854.
Pawel Jakub Dawidek [Thu, 26 Aug 2010 23:44:32 +0000 (23:44 +0000)]
Update comment now that I finally committed r211854.

MFC after: 1 month

14 years ago- When VFS_VGET() is not supported, switch to VOP_LOOKUP().
Pawel Jakub Dawidek [Thu, 26 Aug 2010 23:41:40 +0000 (23:41 +0000)]
- When VFS_VGET() is not supported, switch to VOP_LOOKUP().
- We are fine by only share-locking the vnode.
- Remove assertion that doesn't hold for ZFS where we cross mount points
  boundaries by going into .zfs/snapshot/<name>/.

Reviewed by: rmacklem
MFC after: 1 month

14 years ago- Check the result of malloc(M_NOWAIT) in replay_alloc(). The caller
Pawel Jakub Dawidek [Thu, 26 Aug 2010 23:33:04 +0000 (23:33 +0000)]
- Check the result of malloc(M_NOWAIT) in replay_alloc(). The caller
  (replay_alloc()) knows how to handle replay_alloc() failure.
- Eliminate 'freed_one' variable, it is not needed - when no entry is found
  rce will be NULL.
- Add locking assertions where we expect a rc_lock to be held.

Reviewed by: rmacklem
MFC after: 2 weeks

14 years agoSet de_dir for user created symbolic links. This will be needed to be
Jaakko Heinonen [Thu, 26 Aug 2010 16:01:29 +0000 (16:01 +0000)]
Set de_dir for user created symbolic links. This will be needed to be
able to resolve their parent directories.

14 years agoMake sure TARGET_ABI is defined. TARGET_ABI will die a horrible death
Warner Losh [Thu, 26 Aug 2010 15:49:52 +0000 (15:49 +0000)]
Make sure TARGET_ABI is defined.  TARGET_ABI will die a horrible death
after we get all of TBEMD merged back into head, and make mips64 imply
n64, so don't bother to make this 100% pretty.  You'll have to settle
for only 64% pretty.

14 years agoGuard against TARGET_ABI being undefined (TARGET_ABI will go away soon)
Warner Losh [Thu, 26 Aug 2010 14:54:12 +0000 (14:54 +0000)]
Guard against TARGET_ABI being undefined (TARGET_ABI will go away soon)

14 years agoMark __DTOR_LIST__, __EH_FRAME_BEGIN__ and __CTOR_END__ as used to avoid
Rui Paulo [Thu, 26 Aug 2010 13:04:16 +0000 (13:04 +0000)]
Mark __DTOR_LIST__, __EH_FRAME_BEGIN__ and __CTOR_END__ as used to avoid
segfaults when building with clang.

This comes (partly) from the LLVM svn r41105.

14 years agoMark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
Rui Paulo [Thu, 26 Aug 2010 13:00:29 +0000 (13:00 +0000)]
Mark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
avoid segfaults when building with clang.

Permission to backport given by Jan hubicka <jh at suse.cz>.

14 years agoInstall dtruss.
Rui Paulo [Thu, 26 Aug 2010 11:46:38 +0000 (11:46 +0000)]
Install dtruss.

Sponsored by: The FreeBSD Foundation

14 years agoAdd a man page for dtruss.
Rui Paulo [Thu, 26 Aug 2010 11:45:39 +0000 (11:45 +0000)]
Add a man page for dtruss.

Sponsored by: The FreeBSD Foundation

14 years agoSync DTrace bits with amd64 and fix the build.
Rui Paulo [Thu, 26 Aug 2010 11:22:12 +0000 (11:22 +0000)]
Sync DTrace bits with amd64 and fix the build.

Sponsored by: The FreeBSD Foundation

14 years agoFix typo.
Konstantin Belousov [Thu, 26 Aug 2010 11:20:57 +0000 (11:20 +0000)]
Fix typo.

Submitted by: Ben Kaduk <minimarmot gmail com>

14 years agoeliminate unused code.
David Xu [Thu, 26 Aug 2010 09:04:27 +0000 (09:04 +0000)]
eliminate unused code.

14 years agoDecrease rdlock count only when thread unlocked a reader lock.
David Xu [Thu, 26 Aug 2010 07:09:48 +0000 (07:09 +0000)]
Decrease rdlock count only when thread unlocked a reader lock.

MFC after: 3 days

14 years agoUgly kludge to paper over some kind of ld bug and/or misuse: don't
Warner Losh [Thu, 26 Aug 2010 05:25:51 +0000 (05:25 +0000)]
Ugly kludge to paper over some kind of ld bug and/or misuse: don't
build uathload on mips n64 either.

14 years agoRescue doesn't work for n64.
Warner Losh [Thu, 26 Aug 2010 05:16:00 +0000 (05:16 +0000)]
Rescue doesn't work for n64.

14 years agoAdd mutex locking for the call to replay_prune() in
Rick Macklem [Wed, 25 Aug 2010 23:23:00 +0000 (23:23 +0000)]
Add mutex locking for the call to replay_prune() in
replay_setsize(), since replay_prune() expects the
rc_lock to be held when it is called.

MFC after: 2 weeks

14 years agoFix a debugging message under bootverbose. This address is not linear.
Jung-uk Kim [Wed, 25 Aug 2010 22:48:18 +0000 (22:48 +0000)]
Fix a debugging message under bootverbose.  This address is not linear.

14 years agoAdd an experimental feature to shadow video BIOS. Long ago, this trick was
Jung-uk Kim [Wed, 25 Aug 2010 22:09:02 +0000 (22:09 +0000)]
Add an experimental feature to shadow video BIOS.  Long ago, this trick was
supported by many BIOSes to improve performance of VESA BIOS calls for real
mode OSes but it is not our intention here.  However, this may help some
platforms where the video ROMs are inaccessible after suspend, for example.
Note it may consume up to 64K bytes of contiguous memory depending on video
controller model when it is enabled.  This feature can be disabled by
setting zero to 'debug.vesa.shadow_rom' loader tunable via loader(8) or
loader.conf(5).  The default is 1 (enabled), for now.

14 years agoRevert r210194, adding a comment explaining why calls to chgproccnt()
Edward Tomasz Napierala [Wed, 25 Aug 2010 21:32:08 +0000 (21:32 +0000)]
Revert r210194, adding a comment explaining why calls to chgproccnt()
in unionfs are actually needed.  I have a better fix in trasz_hrl p4 branch,
but now is not a good moment to commit it.

Reported by: Alex Kozlov

14 years agoIncrease maximum number of page table entries per VM86 context from 8 to 24
Jung-uk Kim [Wed, 25 Aug 2010 21:13:23 +0000 (21:13 +0000)]
Increase maximum number of page table entries per VM86 context from 8 to 24
pages, yet again.  Now we can allocate a whole segment, which is required
for shadowing option ROM images, for example.

14 years agoAdd x86bios_set_intr() to set interrupt vectors for real mode and simplify
Jung-uk Kim [Wed, 25 Aug 2010 21:03:50 +0000 (21:03 +0000)]
Add x86bios_set_intr() to set interrupt vectors for real mode and simplify
x86bios_get_intr() a little.

14 years agoCheck opcode for short jump as well. Some option ROMs do short jumps
Jung-uk Kim [Wed, 25 Aug 2010 20:52:40 +0000 (20:52 +0000)]
Check opcode for short jump as well.  Some option ROMs do short jumps
(e.g., some NVIDIA video cards) and we were not able to do POST while
resuming because we only honored long jump.

MFC after: 3 days

14 years agoAllow ABIs to provide their own LIBC_ARCH in a more generic way. As a side
Nathan Whitehorn [Wed, 25 Aug 2010 20:48:24 +0000 (20:48 +0000)]
Allow ABIs to provide their own LIBC_ARCH in a more generic way. As a side
effect, this fixes the build on powerpc64.

Reviewed by: imp

14 years agoCorrectly ensure that the CPU family is 0x6, not non-zero.
John Baldwin [Wed, 25 Aug 2010 20:37:58 +0000 (20:37 +0000)]
Correctly ensure that the CPU family is 0x6, not non-zero.

Submitted by: Dimitry Andric

14 years agoIntel QPI chipsets actually provide two extra "non-core" PCI buses that
John Baldwin [Wed, 25 Aug 2010 19:12:05 +0000 (19:12 +0000)]
Intel QPI chipsets actually provide two extra "non-core" PCI buses that
provide PCI devices for various hardware such as memory controllers, etc.
These PCI buses are not enumerated via ACPI however.  Add qpi(4) psuedo
bus and Host-PCI bridge drivers to enumerate these buses.  Currently the
driver uses the CPU ID to determine the bridges' presence.

In collaboration with: Joseph Golio @ Isilon Systems
MFC after: 2 weeks

14 years agoAdd one more new memory day for Russian Federation: the end of Second World War.
Sergey A. Osokin [Wed, 25 Aug 2010 18:11:01 +0000 (18:11 +0000)]
Add one more new memory day for Russian Federation: the end of Second World War.

Obtained from: http://kremlin.ru/acts/8444

14 years agoIf we read zero bytes from the directory, early out with ENOENT
Brian Somers [Wed, 25 Aug 2010 18:09:51 +0000 (18:09 +0000)]
If we read zero bytes from the directory, early out with ENOENT
rather than forging ahead and interpreting garbage buffer content
and dirent structures.

This change backs out r211684 which was essentially a no-op.

MFC after: 1 week

14 years agoFix build of ppc32 loader.
Nathan Whitehorn [Wed, 25 Aug 2010 16:23:50 +0000 (16:23 +0000)]
Fix build of ppc32 loader.

14 years agoCall devfs_populate_vp() from devfs_getattr(). It was possible that
Jaakko Heinonen [Wed, 25 Aug 2010 15:29:12 +0000 (15:29 +0000)]
Call devfs_populate_vp() from devfs_getattr(). It was possible that
fstat(2) returned stale information through an open file descriptor.

14 years agoProvide timecounter based on XLR PIC timer.
Jayachandran C. [Wed, 25 Aug 2010 13:37:55 +0000 (13:37 +0000)]
Provide timecounter based on XLR PIC timer.

- Use timer 7 in XLR PIC as a 32 counter
- provide pic_init_timer(), pic_set_timer(), pic_timer_count32() and
  pic_timer_count() PIC timer operations.
- register this timer as platform_timecounter on rmi platform.

14 years agoAdd the necessary DTrace function pointers.
Rui Paulo [Wed, 25 Aug 2010 12:35:36 +0000 (12:35 +0000)]
Add the necessary DTrace function pointers.

Sponsored by: The FreeBSD Foundation

14 years agoXLR PIC code update.
Jayachandran C. [Wed, 25 Aug 2010 12:10:20 +0000 (12:10 +0000)]
XLR PIC code update.
- Fix a bug in xlr_pic_init (use irq in PIC_IRQ_IS_EDGE_TRIGGERED)
- use new macro PIC_INTR_TO_IRQ() and PIC_IRT_x() in xlr_pic_init

14 years agoXLR PIC code update and style(9) fixes.
Jayachandran C. [Wed, 25 Aug 2010 11:49:48 +0000 (11:49 +0000)]
XLR PIC code update and style(9) fixes.

- style(9) fixes to mips/rmi platform files
- update pic.h to add pic_setup_intr() and use pic_setup_intr() for setting
  up interrupts which are routed thru PIC.
- remove rmi_spin_mutex_safe and haslock, and make sure that the functions
  are called only after mutexes are available.

14 years agoRename on_chip.c to fmn.c, as the file has just the fast messaging network
Jayachandran C. [Wed, 25 Aug 2010 09:53:00 +0000 (09:53 +0000)]
Rename on_chip.c to fmn.c, as the file has just the fast messaging network
code.  The iodi.c has the bus for SoC devices, so the name on_chip.c is
misleading.

14 years ago- Regen after adding WITH_BSD_GREP and removing WITH_GNU_GREP
Gabor Kovesdan [Wed, 25 Aug 2010 09:48:21 +0000 (09:48 +0000)]
- Regen after adding WITH_BSD_GREP and removing WITH_GNU_GREP

14 years agoCall the necessary DTrace function pointers when we have different kinds
Rui Paulo [Wed, 25 Aug 2010 09:10:32 +0000 (09:10 +0000)]
Call the necessary DTrace function pointers when we have different kinds
of traps.

Sponsored by: The FreeBSD Foundation

14 years agoRMI XLR platform code clean-up.
Jayachandran C. [Wed, 25 Aug 2010 08:48:54 +0000 (08:48 +0000)]
RMI XLR platform code clean-up.

- move PIC code to xlr_machdep.c
- move fast message ring code completely to on_chip.c
- move memory initialization to a new function xlr_mem_init()
- style fixes

14 years agoo Correct typo.
Maxim Konovalov [Wed, 25 Aug 2010 08:37:18 +0000 (08:37 +0000)]
o Correct typo.

Submitted by: Bojidara Marinchovska via -stable
MFC after: 1 week

14 years ago- Change the threshold from 'running next scrub the <value+1>th day after the
Alexander Leidinger [Wed, 25 Aug 2010 08:09:42 +0000 (08:09 +0000)]
- Change the threshold from 'running next scrub the <value+1>th day after the
  last one' to 'running next scrub the <value>th day after the last one'.
- Improve wording.

Requested by: jhell <jhell@DataIX.net>
MFC after: 1 week

14 years agoSync up XLR tick.c with the new MIPS tick.c
Jayachandran C. [Wed, 25 Aug 2010 07:33:35 +0000 (07:33 +0000)]
Sync up XLR tick.c with the new MIPS tick.c

14 years agoIf a thread is removed from umtxq while sleeping, reset error code
David Xu [Wed, 25 Aug 2010 03:14:32 +0000 (03:14 +0000)]
If a thread is removed from umtxq while sleeping, reset error code
to zero, this gives userland a better indication that a thread needn't
to be cancelled.

14 years agoOn second thought, we need to force 16-bit mode
Warner Losh [Wed, 25 Aug 2010 02:09:07 +0000 (02:09 +0000)]
On second thought, we need to force 16-bit mode

14 years agoProdded by Yongari, add support for Holtek HT80232. Add the device
Warner Losh [Wed, 25 Aug 2010 02:03:48 +0000 (02:03 +0000)]
Prodded by Yongari, add support for Holtek HT80232.  Add the device
ID, plus the ability to force '16-bit mode' which really means NE-2000
mode.  Other open source drivers suggest that the Holtek misbehaves if
you allow the 8-bit probe.  Also, all of the PCI chips emulate
NE-2000ish cards, so always force 16-bit mode for memory transfers.

PR: 84202 (patch not used)