]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years ago- When VFS_VGET() is not supported, switch to VOP_LOOKUP().
pjd [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

13 years ago- Check the result of malloc(M_NOWAIT) in replay_alloc(). The caller
pjd [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

13 years agoSet de_dir for user created symbolic links. This will be needed to be
jh [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.

13 years agoMake sure TARGET_ABI is defined. TARGET_ABI will die a horrible death
imp [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.

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

13 years agoMark __DTOR_LIST__, __EH_FRAME_BEGIN__ and __CTOR_END__ as used to avoid
rpaulo [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.

13 years agoMark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
rpaulo [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>.

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

Sponsored by: The FreeBSD Foundation

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

Sponsored by: The FreeBSD Foundation

13 years agoSync DTrace bits with amd64 and fix the build.
rpaulo [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

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

Submitted by: Ben Kaduk <minimarmot gmail com>

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

13 years agoDecrease rdlock count only when thread unlocked a reader lock.
davidxu [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

13 years agoUgly kludge to paper over some kind of ld bug and/or misuse: don't
imp [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.

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

13 years agoAdd mutex locking for the call to replay_prune() in
rmacklem [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

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

13 years agoAdd an experimental feature to shadow video BIOS. Long ago, this trick was
jkim [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.

13 years agoRevert r210194, adding a comment explaining why calls to chgproccnt()
trasz [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

13 years agoIncrease maximum number of page table entries per VM86 context from 8 to 24
jkim [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.

13 years agoAdd x86bios_set_intr() to set interrupt vectors for real mode and simplify
jkim [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.

13 years agoCheck opcode for short jump as well. Some option ROMs do short jumps
jkim [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

13 years agoAllow ABIs to provide their own LIBC_ARCH in a more generic way. As a side
nwhitehorn [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

13 years agoCorrectly ensure that the CPU family is 0x6, not non-zero.
jhb [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

13 years agoIntel QPI chipsets actually provide two extra "non-core" PCI buses that
jhb [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

13 years agoAdd one more new memory day for Russian Federation: the end of Second World War.
osa [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

13 years agoIf we read zero bytes from the directory, early out with ENOENT
brian [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

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

13 years agoCall devfs_populate_vp() from devfs_getattr(). It was possible that
jh [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.

13 years agoProvide timecounter based on XLR PIC timer.
jchandra [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.

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

Sponsored by: The FreeBSD Foundation

13 years agoXLR PIC code update.
jchandra [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

13 years agoXLR PIC code update and style(9) fixes.
jchandra [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.

13 years agoRename on_chip.c to fmn.c, as the file has just the fast messaging network
jchandra [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.

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

13 years agoCall the necessary DTrace function pointers when we have different kinds
rpaulo [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

13 years agoRMI XLR platform code clean-up.
jchandra [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

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

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

13 years ago- Change the threshold from 'running next scrub the <value+1>th day after the
netchild [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

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

13 years agoIf a thread is removed from umtxq while sleeping, reset error code
davidxu [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.

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

13 years agoProdded by Yongari, add support for Holtek HT80232. Add the device
imp [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)

13 years agoIf the first iteration of the do loop in replay_prune()
rmacklem [Wed, 25 Aug 2010 00:35:58 +0000 (00:35 +0000)]
If the first iteration of the do loop in replay_prune()
succeeded and a subsequent interation failed to find an
entry to prune, it could loop infinitely, since the
"freed" variable wasn't reset to FALSE. This patch moves
setting freed FALSE to inside the loop to fix the problem.

Tested by: alan.bryan at yahoo.com
MFC after: 2 weeks

13 years agoPort dtruss to FreeBSD.
rpaulo [Tue, 24 Aug 2010 23:24:43 +0000 (23:24 +0000)]
Port dtruss to FreeBSD.

Sponsored by: The FreeBSD Foundation

13 years agoMake RTLD work on powerpc64 again. If there is a sub-directory named
nwhitehorn [Tue, 24 Aug 2010 23:19:14 +0000 (23:19 +0000)]
Make RTLD work on powerpc64 again. If there is a sub-directory named
MACHINE_ARCH, use that specific one, otherwise use MACHINE_CPUARCH.

Reviewed by: imp

13 years agoMerge dtracetoolkit/dtruss from the vendor.
rpaulo [Tue, 24 Aug 2010 23:17:30 +0000 (23:17 +0000)]
Merge dtracetoolkit/dtruss from the vendor.

Sponsored by: The FreeBSD Foundation

13 years agoRemove this directory for an attempt to merge from the vendor tree.
rpaulo [Tue, 24 Aug 2010 23:14:02 +0000 (23:14 +0000)]
Remove this directory for an attempt to merge from the vendor tree.

13 years agos/ithread/interrupt thread/
trasz [Tue, 24 Aug 2010 21:38:44 +0000 (21:38 +0000)]
s/ithread/interrupt thread/

13 years agoFix an accidental sed...
imp [Tue, 24 Aug 2010 21:28:34 +0000 (21:28 +0000)]
Fix an accidental sed...

13 years agoPowerpc is special here. powerpc and powerpc64 use different ABIs, so
imp [Tue, 24 Aug 2010 20:54:43 +0000 (20:54 +0000)]
Powerpc is special here.  powerpc and powerpc64 use different ABIs, so
their implementations aren't in the same files.  Introduce LIBC_ARCH
and use that in preference to MACHINE_CPUARCH.  Tested by amd64 and
powerpc64 builds (thanks nathanw@)

13 years agoUnify 32-bit and 64-bit PowerPC libthr support. This reduces code
nwhitehorn [Tue, 24 Aug 2010 20:50:08 +0000 (20:50 +0000)]
Unify 32-bit and 64-bit PowerPC libthr support. This reduces code
duplication, and simplifies the TBEMD import.

Requested by: imp

13 years agoRemove unnecessary controller reinitialization.
yongari [Tue, 24 Aug 2010 19:41:15 +0000 (19:41 +0000)]
Remove unnecessary controller reinitialization.

PR: kern/87506

13 years agoRemove unnecessary controller reinitialization.
yongari [Tue, 24 Aug 2010 18:52:24 +0000 (18:52 +0000)]
Remove unnecessary controller reinitialization.

PR: kern/87506

13 years agovr_init_locked() will stop and reset the controller. Remove
yongari [Tue, 24 Aug 2010 18:44:12 +0000 (18:44 +0000)]
vr_init_locked() will stop and reset the controller. Remove
unnecessary vr_stop()/vr_reset() calls.

13 years agoRemove unnecessary controller reinitialization.
yongari [Tue, 24 Aug 2010 18:40:11 +0000 (18:40 +0000)]
Remove unnecessary controller reinitialization.
CAM filter handling was rewritten long time ago so it should not
require controller reinitialization.

PR: kern/87506

13 years agoAdd PNP id for Compex RL2000.
yongari [Tue, 24 Aug 2010 18:17:40 +0000 (18:17 +0000)]
Add PNP id for Compex RL2000.
I'm not sure whether adding this logical id is correct or not
because Compex RL2000 is in the list of supported hardware list.
I guess the Compex RL2000 could be PCI variant while the controller
in question is ISA controller. It seems PNP compat id didn't match
or it had multiple compat ids so isa_pnp_probe() seemed to return
ENOENT.

PR: kern/80853

13 years agoWhen ACPI reports current battery consumption rate in mAmps, print it also
mav [Tue, 24 Aug 2010 18:07:59 +0000 (18:07 +0000)]
When ACPI reports current battery consumption rate in mAmps, print it also
in mWatts. Values in mAmps are not always suitable, because they depend on
battery voltage, which depends on battery type and charge level.

13 years agozfs arc_reclaim_thread: no need to call arc_reclaim_needed when
avg [Tue, 24 Aug 2010 17:48:22 +0000 (17:48 +0000)]
zfs arc_reclaim_thread: no need to call arc_reclaim_needed when
resetting needfree

needfree is checked at the very start of arc_reclaim_needed.
This change makes code easier to follow and maintain in face of
potential changed in arc_reclaim_needed.

Also, put the whole sub-block under _KERNEL because needfree can be set
only in kernel code.

To do: rename needfree to something else to aovid confusion with
OpenSolaris global variable of the same name which is used in the same
code, but has different meaning (page deficit).

Note: I have an impression that locking around accesses to this variable
as well as mutual notifications between arc_reclaim_thread and
arc_lowmem are not proper.

MFC after: 1 week

13 years agoChange the logic here to match Makefile.inc1. Having it in two places
imp [Tue, 24 Aug 2010 16:35:26 +0000 (16:35 +0000)]
Change the logic here to match Makefile.inc1.  Having it in two places
suggests an opportunity for refactoring :)

Submitted by: nathanw@

13 years agoThe order was correct before. I'd talked to Nathan about this before,
imp [Tue, 24 Aug 2010 16:29:09 +0000 (16:29 +0000)]
The order was correct before.  I'd talked to Nathan about this before,
so this must have been mismerged into tbemd before I merged it back to
head.  This unbreaks this on powerpc64

Submitted by: nathanw@

13 years agoEnable timer interrupt before starting timer. This allows to handle very
mav [Tue, 24 Aug 2010 16:08:01 +0000 (16:08 +0000)]
Enable timer interrupt before starting timer. This allows to handle very
short periods without interrupt loss.

13 years agoSome fixes so we can build libstdc++ with clang:
rpaulo [Tue, 24 Aug 2010 13:38:53 +0000 (13:38 +0000)]
Some fixes so we can build libstdc++ with clang:
o Make the value_type, vector_type, iterator, __mutex_type types of
free_list class so we can access them
o In some cases template keywords must be inserted to treat classes as
dependent template names
o Remove two 'inline' keywords where they do not make sense

Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: trema

13 years agoEnable fasttrap and make dtraceall depend on fasttrap when building i386
rpaulo [Tue, 24 Aug 2010 13:21:05 +0000 (13:21 +0000)]
Enable fasttrap and make dtraceall depend on fasttrap when building i386
or amd64.

Sponsored by: The FreeBSD Foundation
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    dtrace/dtraceall/dtraceall.c
M    dtrace/Makefile

13 years agoAdd two DTrace trap type values. Used by fasttrap.
rpaulo [Tue, 24 Aug 2010 13:13:24 +0000 (13:13 +0000)]
Add two DTrace trap type values. Used by fasttrap.

Sponsored by: The FreeBSD Foundation

13 years agoAdd a trap code for DTrace induced traps.
rpaulo [Tue, 24 Aug 2010 13:11:24 +0000 (13:11 +0000)]
Add a trap code for DTrace induced traps.

Sponsored by: The FreeBSD Foundation

13 years agoRemove extra FreeBSD tag.
kib [Tue, 24 Aug 2010 13:02:22 +0000 (13:02 +0000)]
Remove extra FreeBSD tag.

MFC after: 3 days

13 years agoRemove exports table. Export control by the version script is enough.
kib [Tue, 24 Aug 2010 13:01:14 +0000 (13:01 +0000)]
Remove exports table. Export control by the version script is enough.

Reviewed by: kan
MFC after: 3 weeks

13 years agoMove the __stack_chk_fail_local@FBSD_1.0 compat symbol definition into
kib [Tue, 24 Aug 2010 12:58:54 +0000 (12:58 +0000)]
Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition into
the separate .o for libc_pic.a. This prevents rtld from making the
symbol global.

Putting the stack_protector_compat.c into the public domain acknowledged
by kan.

Reviewed by: kan
MFC after: 2 weeks

13 years agoReplace structure assignments with explicity memcpy calls. This allows
rpaulo [Tue, 24 Aug 2010 12:56:45 +0000 (12:56 +0000)]
Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want
to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: jhb

13 years agoUpdate for the recent location of the fasttrap code.
rpaulo [Tue, 24 Aug 2010 12:18:39 +0000 (12:18 +0000)]
Update for the recent location of the fasttrap code.

Sponsored by: The FreeBSD Foundation

13 years agoReplace a pksignal() call with tdksignal().
rpaulo [Tue, 24 Aug 2010 12:12:03 +0000 (12:12 +0000)]
Replace a pksignal() call with tdksignal().

Pointed out by: kib

13 years agoMD fasttrap implementation.
rpaulo [Tue, 24 Aug 2010 12:05:58 +0000 (12:05 +0000)]
MD fasttrap implementation.

Sponsored by: The FreeBSD Foundation

13 years agoRemove unused source.
kib [Tue, 24 Aug 2010 11:55:25 +0000 (11:55 +0000)]
Remove unused source.

MFC after: 2 weeks

13 years agoThe __hidden definition is provided by sys/cdefs.h.
kib [Tue, 24 Aug 2010 11:54:48 +0000 (11:54 +0000)]
The __hidden definition is provided by sys/cdefs.h.

MFC after: 2 weeks

13 years agoUse preferred spelling for the __attribute__.
kib [Tue, 24 Aug 2010 11:53:30 +0000 (11:53 +0000)]
Use preferred spelling for the __attribute__.

MFC after: 3 days

13 years agoPort the fasttrap provider to FreeBSD. This provider is responsible for
rpaulo [Tue, 24 Aug 2010 11:11:58 +0000 (11:11 +0000)]
Port the fasttrap provider to FreeBSD. This provider is responsible for
injecting debugging probes in the userland programs and is the basis for
the pid provider and the usdt provider.

Sponsored by: The FreeBSD Foundation

13 years agoAdd wrapper for setcontext() and swapcontext(), the wrappers
davidxu [Tue, 24 Aug 2010 09:57:06 +0000 (09:57 +0000)]
Add wrapper for setcontext() and swapcontext(), the wrappers
unblock SIGCANCEL which is needed by thread cancellation.

13 years agoBump __FreeBSD_version for revision 211732.
davidxu [Tue, 24 Aug 2010 08:09:30 +0000 (08:09 +0000)]
Bump __FreeBSD_version for revision 211732.

Noticed by: thompa

13 years agoOptimize thr_suspend, if timeout is zero, don't call msleep, just
davidxu [Tue, 24 Aug 2010 07:29:55 +0000 (07:29 +0000)]
Optimize thr_suspend, if timeout is zero, don't call msleep, just
return immediately.

13 years ago- According to specification, SI_USER code should only be generated by
davidxu [Tue, 24 Aug 2010 07:22:24 +0000 (07:22 +0000)]
- According to specification, SI_USER code should only be generated by
  standard kill(). On other systems, SI_LWP is generated by lwp_kill().
  This will allow conforming applications to differentiate between
  signals generated by standard events and those generated by other
  implementation events in a manner compatible with existing practice.
- Bump __FreeBSD_version

13 years agoCreate a checklist and call one of the *printw() functions from the
imp [Tue, 24 Aug 2010 06:30:46 +0000 (06:30 +0000)]
Create a checklist and call one of the *printw() functions from the
selected() callback. When the dialog first appears, you will not see
the printed statement on the dialog, if you move down one, you will,
move up again and it now appears. I am assuming that you call a
*printw() function on a line in the dialog box of course.

The fix, from the pr:
This is a hack at best, I looked at the redraw code in
dialog_checklist() and took the minimal amount of it out to do
a simple "refresh" right after the items are drawn. This
doesn't hurt anything and makes the library work like it
should. There is probably a better way however =).

PR: 148609
Submitted by: John Hixson

13 years agoIndent things consistently
imp [Tue, 24 Aug 2010 06:11:46 +0000 (06:11 +0000)]
Indent things consistently

PR: 149926
Submitted by: John Hixson

13 years agoMark the following static variables as __used__ instead of __unused__:
rpaulo [Tue, 24 Aug 2010 00:23:40 +0000 (00:23 +0000)]
Mark the following static variables as __used__ instead of __unused__:
o force_to_data
o __CTOR_LIST__
o __do_global_dtors_aux_fini_array_entry
o __frame_dummy_init_array_entry

This is necessary because Clang is smart enough to optimize out these
variables was they were marked as __unused__ (and they are also static).
The end result was programs segfaulting because these symbols weren't
present.

This follows the upstream revision 159228 and the author of that
revision (Jan Hubicka <jh at suse.de>) allowed us to backport this to our
GPLv2 GCC.

Discussed with: core

13 years agoMFtbemd:
imp [Mon, 23 Aug 2010 22:24:11 +0000 (22:24 +0000)]
MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.

13 years agoUse real atomic operations for sparc64.
marius [Mon, 23 Aug 2010 22:04:30 +0000 (22:04 +0000)]
Use real atomic operations for sparc64.

MFC after: 1 week

13 years agoFix a possible unaligned access to savebyte array.
yongari [Mon, 23 Aug 2010 21:40:03 +0000 (21:40 +0000)]
Fix a possible unaligned access to savebyte array.

PR: kern/122195

13 years agoImplement basic WOL support. Note, not all xl(4) controllers
yongari [Mon, 23 Aug 2010 19:18:50 +0000 (19:18 +0000)]
Implement basic WOL support. Note, not all xl(4) controllers
support WOL. Some controllers require additional 3-wire auxiliary
remote wakeup connector to draw power. More recent xl(4)
controllers may not need the wakeup connector though.

13 years agoMove xl_reset() to xl_init_locked(). This will make driver
yongari [Mon, 23 Aug 2010 18:51:31 +0000 (18:51 +0000)]
Move xl_reset() to xl_init_locked(). This will make driver
initialize controller from a known good state. Previously driver
used to issue controller reset while TX/RX DMA are in progress.
I guess resetting controller in active TX/RX DMA cycle is to ensure
stopping I/Os in xl_shutdown(). I remember some buggy controllers
didn't respond with stop command if controller is under high
network load at the time of shutdown so resetting controller was
the only safe way to stop the I/Os. However, from my experiments,
controller always responded with stop command under high network
load so I think it's okay to remove the xl_reset() in
device_shutdown handler.
Resetting controller also will clear configured RX filter which
in turn will make WOL support hard because driver have to reprogram
RX filter in WOL handler as well as setting station address.

13 years agoAdd powerpc64 to the list of architectures with real atomic operations.
nwhitehorn [Mon, 23 Aug 2010 16:47:29 +0000 (16:47 +0000)]
Add powerpc64 to the list of architectures with real atomic operations.

Submitted by: imp

13 years agoOn shared object unload, in __cxa_finalize, call and clear all installed
kib [Mon, 23 Aug 2010 15:38:02 +0000 (15:38 +0000)]
On shared object unload, in __cxa_finalize, call and clear all installed
atexit and __cxa_atexit handlers that are either installed by unloaded
dso, or points to the functions provided by the dso.

Use _rtld_addr_phdr to locate segment information from the address of
private variable belonging to the dso, supplied by crtstuff.c. Provide
utility function __elf_phdr_match_addr to do the match of address against
dso executable segment.

Call back into libthr from __cxa_finalize using weak
__pthread_cxa_finalize symbol to remove any atfork handler which
function points into unloaded object.

The rtld needs private __pthread_cxa_finalize symbol to not require
resolution of the weak undefined symbol at initialization time. This
cannot work, since rtld is relocated before sym_zero is set up.

Idea by: kan
Reviewed by: kan (previous version)
MFC after: 3 weeks

13 years agoIntroduce implementation-private rtld interface _rtld_addr_phdr, which
kib [Mon, 23 Aug 2010 15:27:03 +0000 (15:27 +0000)]
Introduce implementation-private rtld interface _rtld_addr_phdr, which
fills struct dl_phdr_info for the shared object that contains the
specified address, if any.

Idea and reviewed by: kan
MFC after: 3 weeks

13 years agoStyle.
kib [Mon, 23 Aug 2010 15:18:35 +0000 (15:18 +0000)]
Style.

MFC after: 3 days

13 years ago- Change default grep back to GNU version. BSD grep can be built with the
gabor [Mon, 23 Aug 2010 10:04:26 +0000 (10:04 +0000)]
- Change default grep back to GNU version. BSD grep can be built with the
  WITH_BSD_GREP knob.
- Bump __FreeBSD_version

Requested by:   dougb
Approved by:    delphij (mentor)

13 years agoThis should really be MACHINE not MACHINE_ARCH, and is this Makefile even used?
imp [Mon, 23 Aug 2010 06:22:35 +0000 (06:22 +0000)]
This should really be MACHINE not MACHINE_ARCH, and is this Makefile even used?

13 years agoMFtbemd:
imp [Mon, 23 Aug 2010 06:13:29 +0000 (06:13 +0000)]
MFtbemd:

Use MACHINE_CPUARCH in preference to MACHINE_ARCH.  The former is the
source code location of the machine, the latter the binary output.  In
general, we want to use MACHINE_CPUARCH instead of MACHINE_ARCH unless
we're tesitng for a specific target.  The isn't even moot for
i386/amd64 where there's momemntum towards a MACHINE_CPUARCH == x86,
although a specific cleanup for that likely would be needed...

13 years agouio_resid isn't updated by VOP_READDIR for nfs filesystems. Use
brian [Mon, 23 Aug 2010 05:33:31 +0000 (05:33 +0000)]
uio_resid isn't updated by VOP_READDIR for nfs filesystems.  Use
the uio_offset adjustment instead to calculate a correct *len.

Without this change, we run off the end of the directory data
we're reading and panic horribly for nfs filesystems.

MFC after: 1 week

13 years agoMF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simpl...
imp [Mon, 23 Aug 2010 01:50:34 +0000 (01:50 +0000)]
MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs)

13 years agoMF tbemd: move to using specific architecture makefiles
imp [Mon, 23 Aug 2010 01:48:07 +0000 (01:48 +0000)]
MF tbemd: move to using specific architecture makefiles

13 years agoMF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simpl...
imp [Mon, 23 Aug 2010 01:43:47 +0000 (01:43 +0000)]
MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs)