Colin Percival [Mon, 21 May 2007 04:22:38 +0000 (04:22 +0000)]
Remove pointless code: Don't assign a value to a variable when we're
going to overwrite it with a new value a few lines later.
Visual inspection of the surrounding code indicates that the code does
what it's supposed to do; i.e., the pointless code wasn't supposed to
be doing something other than what it was doing.
Garrett Wollman [Mon, 21 May 2007 04:15:32 +0000 (04:15 +0000)]
Long-delayed import of timezone database from Arthur Olson et al.
Timezone data changes in the following locations:
Antarctica
Bahamas
Chile (past timestamps only)
Cuba
Eritrea (Africa/Asmara renamed to Africa/Asmera)
Haiti
Honduras
Indonesia (past timestamps only)
Mongolia
New Zealand (future timestamps only)
Nunavut
Pulaski County, Indiana
Syria
Turkey
Turks & Caicos
Western Australia
Jeff Roberson [Sun, 20 May 2007 22:11:50 +0000 (22:11 +0000)]
- Move clock synchronization into a seperate clock lock so the global
scheduler lock is not involved. sched_lock still protects the sched_clock
call. Another patch will remedy this.
Contributed by: Attilio Rao <attilio@FreeBSD.org>
Tested by: kris, jeff
Marius Strobl [Sun, 20 May 2007 14:49:01 +0000 (14:49 +0000)]
- Staticize cpu_ipi_send() and cpu_mp_unleash() as these aren't
referenced outside of mp_machdep.c
- Replace a magic 14 with the newly added IDC_ITID_SHIFT macro.
- Remove the global mp_boot_mid variable as it's not really necessary
and just replacing it with PCPU_GET(mid) doesn't have any impact on
performance once booted.
- Replace PCPU_GET(cpuid) with the curcpu shortcut.
- Replace hardcoded function names in panic strings etc with __func__
so they don't need to be updated when renaming the function.
- Use register_t instead of u_long for variables used to hold the
return value of intr_disable() so we don't need to apply any
knowledge about the actual width of that value here.
- Improve the wording of some comments.
- Fix several style(9) bugs.
Marius Strobl [Sun, 20 May 2007 13:47:36 +0000 (13:47 +0000)]
- Also identify USIIIi+, USIV and USIV+ CPUs.
- Use __FBSDID in identcpu.c.
- Remove #ifndef SUN4V around global cpu_impl variable; it doesn't
hurt on sun4v for now and once setPQL2() is gone sun4v can stop
sharing identcpu.c with sparc64, making the reminder of this file
also sparc64-only again. [1]
Marius Strobl [Sun, 20 May 2007 13:19:32 +0000 (13:19 +0000)]
Given that these sparc64 (as in sun4u) specific headers only exist
in the sun4v source in order to be able to compile the source which
is shared between sparc64 and sun4v just #include the sparc64
version here instead of duplicating it.
This is based on the approach taken by pc98 headers in order to
compile the source shared between i386 and pc98.
Marius Strobl [Sun, 20 May 2007 13:06:45 +0000 (13:06 +0000)]
Delete the unused/not really used sparc64 (as in sun4u) cache.h,
iommureg.h (which already began to bitrot) and iommuvar.h from the
sun4v source and adjust some of the source which is shared between
sparc64 and sun4v as appropriate.
John Baldwin [Sat, 19 May 2007 21:26:05 +0000 (21:26 +0000)]
Rename the macros for assertion flags passed to sx_assert() from SX_* to
SA_* to match mutexes and rwlocks. The old flags still exist for
backwards compatiblity.
Andre Oppermann [Sat, 19 May 2007 20:50:59 +0000 (20:50 +0000)]
In kern_sendfile() adjust byte accounting of the file sending loop to
ignore the size of any headers that were passed with the sendfile(2)
system call. Otherwise the file sent will be truncated by the header
size if the nbytes parameter was provided. The bug doesn't show up
when either nbytes is zero, meaning send the whole file, or no header
iovec is provided.
Resolve a potential error aliasing of errors from the VM and sf_buf
parts and the protocol send parts where an error of the latter over-
writes one of the former.
Update comments.
The byte accounting bug wasn't seen in earlier because none of the popular
sendfile(2) consumers, Apache, lighttpd and our ftpd(8) use it in modes
that trigger it. The varnish HTTP proxy makes full use of it and exposed
the problem.
John Baldwin [Sat, 19 May 2007 20:18:12 +0000 (20:18 +0000)]
Expose sx_xholder() as a public macro. It returns a pointer to the thread
that holds the current exclusive lock, or NULL if no thread holds an
exclusive lock.
John Baldwin [Sat, 19 May 2007 16:35:27 +0000 (16:35 +0000)]
Add a new SX_RECURSE flag to make support for recursive exclusive locks
conditional. By default, sx(9) locks are back to not supporting recursive
exclusive locks.
Maxime Henrion [Sat, 19 May 2007 13:55:01 +0000 (13:55 +0000)]
Fix a typo that caused the #undef directive to not actually undefine
the correct symbol, thus causing a warning with GCC 4.2.0. Committed
into the vendor branch since this is already in the csup repository.
Marcel Moolenaar [Sat, 19 May 2007 13:11:27 +0000 (13:11 +0000)]
Add a level of indirection to the kernel PTE table. The old
scheme allowed for 1024 PTE pages, each containing 256 PTEs.
This yielded 2GB of KVA. This is not enough to boot a kernel
on a 16GB box and in general too low for a 64-bit machine.
By adding a level of indirection we now have 1024 2nd-level
directory pages, each capable of supporting 2GB of KVA. This
brings the grand total to 2TB of KVA.
Marcel Moolenaar [Sat, 19 May 2007 12:50:12 +0000 (12:50 +0000)]
Account for the fact that contigmalloc(9) can return a NULL pointer.
Fix the flags argument: M_WAITOK is not a valid flag. Its presence
leaves the indication that contigmalloc(9) will not return a NULL
pointer.
The use of contigmalloc(9) in this place is probably not a good idea
given the constraints. It's probably better to lift the constraints
and instead add a permanent mapping to the ITR. It's possible that
the first 256MB of memory is exhausted when we get here.
Olivier Houchard [Sat, 19 May 2007 12:47:34 +0000 (12:47 +0000)]
Switch the kernel's pmap domain from 15 to 0.
This should be a no-op, and this is needed for xscale core 3 supersections
support, as they are always part of the domain 0
Andrew Thompson [Sat, 19 May 2007 07:47:04 +0000 (07:47 +0000)]
Implement the Marker Protocol. A marker frame is placed on the interface queue
of each port and any further packets are blocked, when the all the marker frames
have been returned to us from the remote network device then we can be sure
that all interface queues are empty.
This is needed when a port is added or removed from the aggregation since it
will affect the hash based distribution, if the queues are not empty then a
packet from an existing connection may be placed on a different interface and
arrive out of order. This was previously achieved by suppressing transmission for
1 second, now that there is an active feedback this timeout as been increased
to 3 seconds and used as a fallback.
Alexander Kabaev [Sat, 19 May 2007 04:45:54 +0000 (04:45 +0000)]
Add -Wno-pointer-sign to CWARNFLAGS.
Switch ia64 kernels to -fpic. This is likely wrong, but at least gets
ia64 kernels to compile and link with GCC 4.2. The previous -mno-sdata
trick is not working anymore.
Alexander Kabaev [Sat, 19 May 2007 04:31:43 +0000 (04:31 +0000)]
Follow NetBSD, OpenBSD and DragonfyBSD project and add BSD-licensed
SSP functions into FreeBSD libc. Use the same file name and location
for consistency with other projects.
Alexander Kabaev [Sat, 19 May 2007 04:25:59 +0000 (04:25 +0000)]
Update bmake glue to build GCC 4.2.
Also:
Switch FreeBSD to use libgcc_s.so.1.
Use dl_iterate_phdr to locate shared objects' exception frame
info instead of depending on older register_frame_info machinery.
This allows us to avoid depending on libgcc_s.so.1 in binaries
that do not use exception handling directly. As an additional
benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.
Build newly added libgomp.so.1 library, the runtime support
bits for OpenMP.
Build LGPLed libssp library. Our libc provides our own
BSD-licensed SSP callbacks implementation, so this library
is only built to benefit applications that have hadcoded
knowledge of libssp.so and libssp_nonshared.a. When linked
in from command line, these libraries override libc
implementation.
Alexander Kabaev [Sat, 19 May 2007 03:34:59 +0000 (03:34 +0000)]
GCC will now properly link libc with all shared objects in order to record
their dependency on libc and its versioned symbols. For that to work,
libc needs to be built before any other shared library that might depend
on it. Add necessary glue to make that happen.
Alexander Kabaev [Sat, 19 May 2007 03:29:37 +0000 (03:29 +0000)]
Fix generator glue to only expose extern struct units %s_units[] is
struct units defintition it known. The above construct is treated
as an incorrect C by GCC 4.2 otherwise.