das [Wed, 25 Mar 2009 05:10:32 +0000 (05:10 +0000)]
Merge an important change that I mistakenly left out when merging C99
inline function support. This should fix instances where gcc
spuriously reports the following error:
error: nested function 'foo' declared but never defined
nwhitehorn [Wed, 25 Mar 2009 03:42:49 +0000 (03:42 +0000)]
Disable ATA DMA for ATAPI devices for now. Apparently, certain revisions
of this controller, in combination with certain ATAPI devices and phases
of the moon, will cause DMA operations for ATAPI to fail.
rnoland [Wed, 25 Mar 2009 01:50:56 +0000 (01:50 +0000)]
Rework the management of vblank interrupts a bit.
When a vt switch occurs the irq handler is uninstalled. Interrupts
and the state tracking of what was enabled/disabled wasn't working
properly. This should resolve the reports of "slow windows" after a
vt switch, among other things. The radeon 2d driver seems to work a
bit more correctly than the Intel driver. With the Intel driver,
vblank interrupts will be enabled at system startup and will only
be disabled after an additional modeset (vt switch, dpms, randr event).
With this patch, I am able to run glxgears synced to vblank and
vt switch while it is running without ill effects.
rwatson [Tue, 24 Mar 2009 23:16:48 +0000 (23:16 +0000)]
Fix two bugs in DTrace tracing of accesscache and attrcache load events:
- Trace non-error loads into the access cache once, not zero times or
twice.
- Sometimes attr cache loads fail due to a race, in which case they are
aborted leading to an invalidation; in this case, trace only the flush,
not a load.
jhb [Tue, 24 Mar 2009 18:10:22 +0000 (18:10 +0000)]
Fall back to using configuration type 1 accesses for PCI config requests if
the requested PCI bus falls outside of the bus range given in the ACPI
MCFG table. Several BIOSes seem to not include all of the PCI busses in
systems in their MCFG tables. It maybe that the BIOS is simply buggy and
does support all the busses, but it is more conservative to just fall back
to the old method unless it is certain that memory accesses will work.
edwin [Tue, 24 Mar 2009 10:50:30 +0000 (10:50 +0000)]
MFV of tzdata2009d:
- Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00
- Tunisia will not observe DST this year.
- Syria will start DST on 2009-03-27 00:00 this year
- the Province of San Luis will go to utc-04:00
jkim [Mon, 23 Mar 2009 22:35:30 +0000 (22:35 +0000)]
- Clean up suspend/resume code for amd64.
- Call acpi_resync_clock() to reset system time before hardclock is ready
to tick. Note we assume the current timecounter hardware and RTC are
already available for read operation.
jkim [Mon, 23 Mar 2009 22:12:33 +0000 (22:12 +0000)]
Add a function to reset system time after resuming, which will be used
by amd64 shortly. It can be turned off by setting "debug.acpi.reset_clock"
tunable to zero.
jkim [Mon, 23 Mar 2009 21:16:21 +0000 (21:16 +0000)]
Clean up MI inittodr(9) and kill noop code.
It was derived from i386 version long ago but never resync'ed again.
Originally, i386 version compared the current time from realtime clock
with time_second (which was just `time' in the old days). When this MI
version was written, it was wrongly compared against `base' AND never
used because of a bug (typo?) in the code. This check was killed
in i386 version when home-rolled calendaric calculation was removed.
Now, we just remove the code here as well to make the code simpler.
jhb [Mon, 23 Mar 2009 19:27:23 +0000 (19:27 +0000)]
Reenable 64-bit DMA for twa(4) controllers, but use a boundary of 4GB to
prevent individual transactions from crossing a 4GB address boundary. Due
to bus_size_t type limitations, the driver uses a 2GB boundary in PAE
kernels.
delphij [Mon, 23 Mar 2009 16:49:00 +0000 (16:49 +0000)]
Support for a new environment variable, LD_ELF_HINTS_PATH for overriding
the rtld hints file. This environment variable would be unset if the
process is considered as tainted with setuid/setgid. This feature gives
a convenient way of using a custom set of shared library that is not
located in the default location and switch back.
Feature requested by: iXsystems
Original patch by: John Hixson
MFC after: 2 weeks
marius [Mon, 23 Mar 2009 14:36:50 +0000 (14:36 +0000)]
- Ensure that INTx isn't disabled, as these chips apparently have a
quirk requiring it to be enabled even when using MSI. This makes
the latter work again after r189285.
- Remove a comment which no longer applies since r190194.
yongari [Mon, 23 Mar 2009 05:46:28 +0000 (05:46 +0000)]
Togging ALLMULTI does not require controller reset so have Rx
filtering handle this. Introduce a new function msk_rxfilter that
handles Rx filter configuration and multicast setup as well as
promiscuous mode. This simplifies code a lot.
Promiscuous mode always have preference to any other Rx
filtering so don't disable the mode when ALLMULTI is set.
kan [Mon, 23 Mar 2009 01:13:34 +0000 (01:13 +0000)]
Add safety check that does not allow empty strings to be queued
to the devctl notification queue. Empty strings cause devctl read
call to return 0 and result in devd exiting prematurely.
The actual offender (ugen notes for root hubs) will be fixed
by separate commit.
rwatson [Sun, 22 Mar 2009 22:07:52 +0000 (22:07 +0000)]
Add dtnfsclient, a first cut at an NFSv2/v3 client reuest DTrace
provider. The NFS client exposes 'start' and 'done' probes for NFSv2
and NFSv3 RPCs when using the new RPC implementation, passing in the
vnode, mbuf chain, credential, and NFSv2 or NFSv3 procedure number.
For 'done' probes, the error number is also available.
Access to the unmarshalled arguments is not easily available at this
point in the stack, but the passed probe arguments are sufficient to
to a lot of interesting things in practice. Technically, these probes
may cover multiple RPC retransmits, and even transactions if the
transaction ID change as a result of authentication failure or a
jukebox error from the server, but usefully capture the intent of a
single NFS request, such as access, getattr, write, etc.
Typical use might involve profiling RPC latency by system call, number
of RPCs, how often a getattr leads to a call to access, when failed
access control checks occur, etc. More detailed RPC information might
best be provided by adding a krpc provider. It would also be useful
to add NFS client probes for events such as the access cache or
attribute cache satisfying requests without an RPC.
stefanf [Sun, 22 Mar 2009 17:20:42 +0000 (17:20 +0000)]
Make the output of the alias built-in POSIX-compliant: Drop the leading 'alias'
and suppress printing the trailing space which is added for internal purposes.
kib [Sun, 22 Mar 2009 13:42:41 +0000 (13:42 +0000)]
Fix several issues with parsing the notes for ELF objects.
Badly formed ELF note may cause the caclulated pointer to the next note
to point both after the note region, that was checked in the code, but
also to point before the region, that was not checked [1]. Remember the
first note location in note0 and leap out if the note is not between
note0 and note_end.
In the similar way, badly formed note may cause infinite loop by
pointing next note into the same or previous note. Guard against this by
limiting amount of loop iterations by arbitrary choosen big number.
For clarity, check the calculated note alignment in each iteration.
Reported by: Chris Palmer <chris noncombatant org> [1]
PR: kern/132886
Reviewed and tested by: dchagin
MFC after: 3 days
imp [Sun, 22 Mar 2009 13:17:46 +0000 (13:17 +0000)]
NO_INQUIRY is wrong for this device. Alternatively, if it is right,
it is right for only a tiny fraction of these devices and this
wild-card entry is too broad.
# I run a kernel without this entry at all without ill effects...
alc [Sun, 22 Mar 2009 04:32:05 +0000 (04:32 +0000)]
In general, the kernel virtual address of the pml4 page table page that is
stored in the pmap is from the direct map region. The two exceptions have
been the kernel pmap and the swapper's pmap. These pmaps have used a
kernel virtual address established by pmap_bootstrap() for their shared
pml4 page table page. However, there is no reason not to use the direct
map for these pmaps as well.
alc [Sun, 22 Mar 2009 02:33:48 +0000 (02:33 +0000)]
Eliminate the recomputation of pcb_cr3 from cpu_set_upcall(). The
bcopy()ed value from the old thread is the correct value because the new
thread and the old thread will share a page table.
jmallett [Sun, 22 Mar 2009 00:45:47 +0000 (00:45 +0000)]
Remove local in6_addr variables for local and foreign addresses in sysctl_drop,
they were passed uninitialized to in6_pcblookup_hash. Instead, do as is done
for IPv4 and use the addresses within the sockaddr structure, which are
correctly populated.
rwatson [Sat, 21 Mar 2009 21:49:07 +0000 (21:49 +0000)]
In nfs_request(), always exit using the nfsmout label once we're
definitely doing an NFSv2 or NFSv3 RPC, rather than sometimes doing
so and sometimes not. This makes it easier to add a DTrace return
probe at a single point in the function.