Marius Strobl [Sat, 4 Jun 2005 23:24:50 +0000 (23:24 +0000)]
After some input from bde@ and rereading the datasheet use a MTX_SPIN
mutex instead of a MTX_DEF one in order to defer preemption while
reading the date and time registers. If we don't manage to read them
within the time slot where we are guaranteed that no updates occur we
might actually read them during an update in which case the output is
undefined.
Tim Kientzle [Sat, 4 Jun 2005 22:30:36 +0000 (22:30 +0000)]
Minor clean up for flags restoration: Use fchflags/lchflags when
available, stub out flags restore on platforms that don't support it,
update autoconf to probe for fchflags and lchflags support.
Tim Kientzle [Sat, 4 Jun 2005 22:19:25 +0000 (22:19 +0000)]
Fix one error in the example usage of the archive_write API and fill
in a few missing details. The example code here is now a complete,
functioning example program.
Fix getsecs(). It was not counting the seconds right. The immediate
and visible effect of the bug what that autoboot would boot a kernel
after only a couple of seconds had passed instead of waiting the
full 10 seconds it's supposed to wait by default.
Add my copyright notice, since one was missing and I reimplemented
the one and only function in this file.
Marius Strobl [Sat, 4 Jun 2005 21:54:31 +0000 (21:54 +0000)]
Replace the band-aid for allowing to call sunkbd_configure() multiple
times which was added in the last revision with what should be a proper
solution as long as keyboards that were pluggged in after the kernel
has fully booted aren't supported. I.e. when sunkbd_configure() is
called for the high-level console probe make sure that the keyboard is
both successfully configured (i.e. also probed) and attached. The band-
aid left the possibility to attach the keyboard device to the high-level
console without attaching the keyboard device itself when the keyboard
is plugged in after uart(4) attached but before syscons(4) does.
Marius Strobl [Sat, 4 Jun 2005 21:52:56 +0000 (21:52 +0000)]
On AXi and AXmp boards the NS16550 (used to connect keyboard and mouse)
share their IRQ lines with the i8042. Any IRQ activity (typically during
attach) on the NS16550 used to connect the keyboard when actually the
PS/2 keyboard is selected in OFW causes interaction with the OBP i8042
driver resulting in a hang (and vice versa). As RS232 keyboards and mice
obviously aren't meant to be used in parallel with PS/2 ones on these
boards don't attach to these NS16550 in case the RS232 keyboard isn't
selected in order to prevent such hangs.
Marius Strobl [Sat, 4 Jun 2005 21:33:18 +0000 (21:33 +0000)]
Change the semantics of uart_cpu_getdev_keyboard() to only match SCCs/
UARTs used to connect keyboards and not also PS/2 keyboards and only
return their package handle in case the keyboard is the preferred one
according to the OFW but otherwise still regardless of whether the
keyboard is used for stdin or not. This is simply achieved by looking
at the 'keyboard' alias and returning the corresponding package handle
in case it refers to a SCC/UART. This is change is done in order to
give the keyboard which the OFW or the user selected in OFW on boards
that support additional types of keyboards besides the RS232 ones also
preference in FreeBSD. It will be also used to determine on Sun AXi and
Sun AXmp boards whether a PS/2 or a RS232 is to be used as these are
sort of mutual exclusive there (see upcoming commit to uart_bus_ebus.c).
Note that Tatung AXi boards have the same issue but the former code
happened to already give the PS/2 keyboard preference by not identifying
the respective UART as keyboard system device there because the PS/2
keyboard node precedes the keyboard UART one in the OFW device tree of
these boards (which isn't the case for the Sun AXi).
Marius Strobl [Sat, 4 Jun 2005 21:18:30 +0000 (21:18 +0000)]
- In machfb_configure() when probed for the high-level console return
the number of registered adapters instead of determining again whether
stdout is a supported card (and which might have failed to attach and
register).
- Fix a bug in the handling of the FBIOSCURSOR IOCTL; the code was meant
to return ENODEV for all invocations expect when used to disable the
cursor and not just when used for enabling the cursor.
- In case the adapter is the OFW stdout move its OFW cursor to the start
of the last line on halt so OFW output doesn't get intermixed with what
FreeBSD left on the screen.
- Drop variable names in the prototypes of some functions in order to
match the style of majority of the prototypes in this file.
Marius Strobl [Sat, 4 Jun 2005 21:15:27 +0000 (21:15 +0000)]
- In creator_configure() when probed for the high-level console return
the number of registered adapters instead of determining again whether
stdout is a supported card (and which might have failed to attach and
register).
- Drop creator_set_mode() and move the relevant parts to creator_fill_rect()
and creator_putc() respectively. This is a bit cleaner than having to
make sure that creator_set_mode() was called before creator_fill_rect()
or creator_putc() are used and matches better what Xorg does.
- Fix a bug in the handling of the FBIOSCURSOR IOCTL; the code was meant
to return ENODEV for all invocations expect when used to disable the
cursor and not just when used for enabling the cursor.
- In case the adapter is the OFW stdout move its OFW cursor to the start
of the last line on halt so OFW output doesn't get intermixed with what
FreeBSD left on the screen. With hindsight this is what the faking of a
hardware cursor which was removed in the last revision really was about,
i.e. to keep the OFW updated about the current cursor position. The new
approach however is simpler while producing the same result and doesn't
cause the first letter of the OFW output to be turned into a blank and
a newline.
- Add variable names to the prototypes of creator_cursor_*() which were
added in the last revision and list them alphabetically in order to match
the style of this file.
Marius Strobl [Sat, 4 Jun 2005 20:31:20 +0000 (20:31 +0000)]
Now that all affected drivers have been changed remove the helpers
for the SYS_RES_IOPORT -> SYS_RES_MEMORY transition again. While it
was helpful to not need to change all of the affected drivers in a
single pass together with ebus(4) we probably shouldn't start into
6.0 with such a hack.
This requires some of the modules of affected drivers to be rebuilt,
namely: auxio(4), snd_audiocs(4) and puc(4).
Marius Strobl [Sat, 4 Jun 2005 20:27:39 +0000 (20:27 +0000)]
- Take advantage of ebus(4) having switched to SYS_RES_MEMORY for memory
resources in ebus.c rev. 1.22 and collapse the resource allocation for
both the EBus and SBus variants into auxio_attach_common().
- For the EBus variant make sure that the resource for controlling the
LED is actually available; (in theory) we could have ended up using
the resource without allocating it.
Alan Cox [Sat, 4 Jun 2005 19:16:33 +0000 (19:16 +0000)]
Eliminate the original method of requesting notification of aio_read(2) and
aio_write(2) completion through kevent(2). This method does not work on
64-bit architectures. It was deprecated in FreeBSD 4.4. See revisions
1.87 and 1.70.2.7.
Change aio_physwakeup() to call psignal(9) directly rather than indirectly
through a timeout(9). Discussed with: bde
Correct a bug introduced in revision 1.65 that could result in premature
delivery of a signal if an lio_listio(2) consisted of a mixture of
direct/raw and queued I/O operations. Observed by: tegge
Eliminate a field from struct kaioinfo that is now unused.
Brian Feldman [Sat, 4 Jun 2005 19:04:31 +0000 (19:04 +0000)]
Better explain, then actually implement the IPFW ALTQ-rule first-match
policy. It may be used to provide more detailed classification of
traffic without actually having to decide its fate at the time of
classification.
Jeff Roberson [Sat, 4 Jun 2005 09:23:28 +0000 (09:23 +0000)]
- Don't SLOT_USE() in the preempt case, sched_add() has already taken the
slot for us. Previously, we would take two slots on every preempt, and
setrunqueue() would fix it up for us in the non threaded case. The
threaded case was simply broken.
- Clean up flags, prototypes, comments.
Paul Saab [Sat, 4 Jun 2005 08:03:28 +0000 (08:03 +0000)]
Changes to tcp_sack_option() that
- Walks the scoreboard backwards from the tail to reduce the number of
comparisons for each sack option received.
- Introduce functions to add/remove sack scoreboard elements, making
the code more readable.
Submitted by: Noritoshi Demizu
Reviewed by: Raja Mukerji, Mohan Srinivasan
Paul Saab [Fri, 3 Jun 2005 23:15:01 +0000 (23:15 +0000)]
Wrap copyin/copyout for kevent so the 32bit wrapper does not have
to malloc nchanges * sizeof(struct kevent) AND/OR nevents *
sizeof(struct kevent) on every syscall.
Warner Losh [Fri, 3 Jun 2005 20:12:12 +0000 (20:12 +0000)]
In newbus land, ivars can only be accessed for direct child, or when
the driver has unholy private knowledge of its great-*cgrandchildren.
The ACPI allocation routine lacked such knowledge when it tried to do
a default allocation for all descendants, rather than just its
immeidate children, so would access grandchild's ivar in an unsafe
way. This could lead to a panic when devices were present which had
no addresses setup by the BIOS, but which were later allocated in a
lazy manner via pci_alloc_map. As such, only do the default
allocation adjustments for immediate children. The manner that
acpi_sysres_find accesses the resource list, used later in
acpi_alloc_resource, is safe and proper so no additional test is
needed there.
This fixes a panic when probing an disabled ata controller on some
newer intel blades.
Warner Losh [Fri, 3 Jun 2005 19:41:06 +0000 (19:41 +0000)]
Mask off the bar's value after the probe test write before testing
against 0 in pci_alloc_map, just like we do in pci_add_map. Also,
make sure that we restore the value to the BAR that was there before
if the bar is 0. Chances are that it was 0 before the write too and
that the restoration is a nop, but better safe than sorry.
Juli Mallett [Fri, 3 Jun 2005 18:42:49 +0000 (18:42 +0000)]
Remove my involvement from the regression test stuff, I don't know the modified
framework well, and nobody's ever sought my help with writing regression tests,
most people just don't bother with them at all, regrettably.
Hiroki Sato [Fri, 3 Jun 2005 18:37:16 +0000 (18:37 +0000)]
New release notes:
FreeBSD/i386 and /amd64 always use the local APIC timer even
on an UP system,
vm.blacklist tunable added,
ipfw now supports IPv4 only rule,
struct netent and getnetbyaddr(3) POSIX conformance and
the ABI breakage on 64-bit platforms, and
GNU GCC 3.4.2-prerelease --> 3.4.4.
Update release notes:
more machine-specific optimized version of math functions.
Andrew Gallatin [Fri, 3 Jun 2005 12:37:56 +0000 (12:37 +0000)]
Remove myself as maintainer of the OSF/1 compat code. I haven't had
an alpha booting -current since my xp1000 died over a year ago, and I
don't think I touched the osf1 code since long before then.
Dima Dorfman [Fri, 3 Jun 2005 11:38:35 +0000 (11:38 +0000)]
Remove the EXAMPLES section that describes how to sort by size using
sort(1). This functionality is provided by the -S option now, and it
is useful even though a similar effect is achievable with sort(1),
since the latter doesn't work in combination with -h. This option is
also present in NetBSD, OpenBSD, and GNU fileutils, so there's clearly
a demand for it.
Dima Dorfman [Fri, 3 Jun 2005 11:05:58 +0000 (11:05 +0000)]
Add the -S option to sort files by size. NetBSD and OpenBSD already
have this option with identical semantics (sorting large files first).
-r can be used to reverse the sort if that is desired.
Hajimu UMEMOTO [Fri, 3 Jun 2005 03:32:06 +0000 (03:32 +0000)]
- Remove padding for ABI compatibility of n_net member from struct
netent.
- Change 1st argument of getnetbyaddr() to an uint32_t on 64 bit
arch as well to confirm to POSIX-2001.
These changes break ABI compatibility on 64 bit arch.
There is similar padding issue for ai_addrlen of struct addrinfo.
However, it is leaved as is for now.
Discussed on: arch@, standards@ and current@
X-MFC after: never