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>/.
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.
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.
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.
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.
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.
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.
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
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.
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.
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
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.
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.
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
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.
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.
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.
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
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@)
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.
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.
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.
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
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
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.
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.
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
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.
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
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 =).
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.
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.
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.
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
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.
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...