PERFORCE change 72925 for review
Peter Wemm
peter at FreeBSD.org
Fri Mar 11 12:49:32 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=72925
Change 72925 by peter at peter_daintree on 2005/03/11 20:48:57
integ -b i386_hammer. Attempt to unspam the !@#%!@# compiler kludges where
the same changes were made gratuitously differently in both branches (different
whitespace etc. grrr!)
Affected files ...
.. //depot/projects/hammer/sys/amd64/acpica/acpi_wakeup.c#13 integrate
.. //depot/projects/hammer/sys/amd64/amd64/busdma_machdep.c#32 integrate
.. //depot/projects/hammer/sys/amd64/amd64/fpu.c#25 integrate
.. //depot/projects/hammer/sys/amd64/amd64/identcpu.c#38 integrate
.. //depot/projects/hammer/sys/amd64/amd64/in_cksum.c#12 integrate
.. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#45 integrate
.. //depot/projects/hammer/sys/amd64/amd64/machdep.c#117 integrate
.. //depot/projects/hammer/sys/amd64/conf/NOTES#58 integrate
.. //depot/projects/hammer/sys/amd64/include/_types.h#12 integrate
.. //depot/projects/hammer/sys/amd64/include/atomic.h#14 integrate
.. //depot/projects/hammer/sys/amd64/include/bus_amd64.h#13 integrate
.. //depot/projects/hammer/sys/amd64/include/clock.h#15 integrate
.. //depot/projects/hammer/sys/amd64/include/cpufunc.h#31 integrate
.. //depot/projects/hammer/sys/amd64/include/critical.h#19 integrate
.. //depot/projects/hammer/sys/amd64/include/endian.h#12 integrate
.. //depot/projects/hammer/sys/amd64/include/ieeefp.h#14 integrate
.. //depot/projects/hammer/sys/amd64/include/in_cksum.h#12 integrate
.. //depot/projects/hammer/sys/amd64/include/limits.h#11 integrate
.. //depot/projects/hammer/sys/amd64/include/pcpu.h#21 integrate
.. //depot/projects/hammer/sys/amd64/include/profile.h#26 integrate
.. //depot/projects/hammer/sys/amd64/include/stdarg.h#9 integrate
.. //depot/projects/hammer/sys/amd64/include/varargs.h#10 integrate
.. //depot/projects/hammer/sys/amd64/isa/clock.c#34 integrate
Differences ...
==== //depot/projects/hammer/sys/amd64/acpica/acpi_wakeup.c#13 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/amd64/busdma_machdep.c#32 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/amd64/fpu.c#25 (text+ko) ====
@@ -77,7 +77,7 @@
: : "n" (CR0_TS) : "ax")
#define stop_emulating() __asm("clts")
-#else /* !__GNUCLIKE_ASM */
+#else /* !(__GNUCLIKE_ASM && !lint) */
void fldcw(caddr_t addr);
void fnclex(void);
@@ -89,7 +89,7 @@
void start_emulating(void);
void stop_emulating(void);
-#endif /* __GNUCLIKE_ASM */
+#endif /* __GNUCLIKE_ASM && !lint */
#define GET_FPU_CW(thread) ((thread)->td_pcb->pcb_save.sv_env.en_cw)
#define GET_FPU_SW(thread) ((thread)->td_pcb->pcb_save.sv_env.en_sw)
==== //depot/projects/hammer/sys/amd64/amd64/identcpu.c#38 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/amd64/in_cksum.c#12 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#45 (text+ko) ====
@@ -67,9 +67,9 @@
CTASSERT(APIC_LOCAL_INTS == 240);
CTASSERT(IPI_STOP < APIC_SPURIOUS_INT);
-#define LAPIC_TIMER_HZ_DIVIDER 3
-#define LAPIC_TIMER_STATHZ_DIVIDER 23
-#define LAPIC_TIMER_PROFHZ_DIVIDER 2
+#define LAPIC_TIMER_HZ_DIVIDER 2
+#define LAPIC_TIMER_STATHZ_DIVIDER 15
+#define LAPIC_TIMER_PROFHZ_DIVIDER 3
/*
* Support for local APICs. Local APICs manage interrupts on each
@@ -131,8 +131,6 @@
volatile lapic_t *lapic;
static u_long lapic_timer_divisor, lapic_timer_period, lapic_timer_hz;
-static u_long *lapic_virtual_hardclock, *lapic_virtual_statclock,
- *lapic_virtual_profclock;
static void lapic_enable(void);
static void lapic_timer_enable_intr(void);
@@ -370,9 +368,6 @@
stathz = lapic_timer_hz / LAPIC_TIMER_STATHZ_DIVIDER;
profhz = lapic_timer_hz / LAPIC_TIMER_PROFHZ_DIVIDER;
lapic_timer_period = value / lapic_timer_hz;
- intrcnt_add("lapic: hardclock", &lapic_virtual_hardclock);
- intrcnt_add("lapic: statclock", &lapic_virtual_statclock);
- intrcnt_add("lapic: profclock", &lapic_virtual_profclock);
/*
* Start up the timer on the BSP. The APs will kick off their
@@ -627,10 +622,9 @@
la->la_hard_ticks += hz;
if (la->la_hard_ticks >= lapic_timer_hz) {
la->la_hard_ticks -= lapic_timer_hz;
- if (PCPU_GET(cpuid) == 0) {
- (*lapic_virtual_hardclock)++;
+ if (PCPU_GET(cpuid) == 0)
hardclock(&frame);
- } else
+ else
hardclock_process(&frame);
}
@@ -638,8 +632,6 @@
la->la_stat_ticks += stathz;
if (la->la_stat_ticks >= lapic_timer_hz) {
la->la_stat_ticks -= lapic_timer_hz;
- if (PCPU_GET(cpuid) == 0)
- (*lapic_virtual_statclock)++;
statclock(&frame);
}
@@ -647,8 +639,6 @@
la->la_prof_ticks += profhz;
if (la->la_prof_ticks >= lapic_timer_hz) {
la->la_prof_ticks -= lapic_timer_hz;
- if (PCPU_GET(cpuid) == 0)
- (*lapic_virtual_profclock)++;
if (profprocs != 0)
profclock(&frame);
}
==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#117 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/conf/NOTES#58 (text+ko) ====
@@ -4,7 +4,7 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# (XXX from i386:NOTES,v 1.1187)
+# (XXX from i386:NOTES,v 1.1188)
# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.26 2005/02/28 00:58:06 obrien Exp $
#
@@ -255,6 +255,7 @@
device ath_hal # Atheros HAL (includes binary component)
device ath_rate_onoe # Onoe rate control for ath driver
#device ath_rate_amrr # AMRR rate control for ath driver
+#device ath_rate_sample # SampleRate rate control for the ath driver
device wlan # 802.11 layer
#
==== //depot/projects/hammer/sys/amd64/include/_types.h#12 (text+ko) ====
@@ -108,8 +108,8 @@
#endif
#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \
&& !defined(__NO_GNUC_VA_LIST)
-#define __GNUC_VA_LIST
-typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
+#define __GNUC_VA_LIST
+typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#endif /* !_MACHINE__TYPES_H_ */
==== //depot/projects/hammer/sys/amd64/include/atomic.h#14 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/include/bus_amd64.h#13 (text+ko) ====
@@ -72,6 +72,10 @@
#ifndef _AMD64_BUS_AMD64_H_
#define _AMD64_BUS_AMD64_H_
+#ifndef _SYS_CDEFS_H_
+#error this file needs sys/cdefs.h as a prerequisite
+#endif
+
#include <machine/cpufunc.h>
#ifndef _SYS_CDEFS_H_
@@ -437,7 +441,7 @@
#endif
{
int _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: inw %w2,%%ax \n\
@@ -456,7 +460,7 @@
#endif
{
bus_space_handle_t _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
repne \n\
@@ -479,7 +483,7 @@
#endif
{
int _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: inl %w2,%%eax \n\
@@ -498,7 +502,7 @@
#endif
{
bus_space_handle_t _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
repne \n\
@@ -627,7 +631,7 @@
else
#endif
{
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: lodsb \n\
@@ -656,7 +660,7 @@
else
#endif
{
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: lodsw \n\
@@ -685,7 +689,7 @@
else
#endif
{
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: lodsl \n\
@@ -735,7 +739,7 @@
#endif
{
int _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: lodsb \n\
@@ -754,7 +758,7 @@
#endif
{
bus_space_handle_t _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
repne \n\
@@ -777,7 +781,7 @@
#endif
{
int _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: lodsw \n\
@@ -796,7 +800,7 @@
#endif
{
bus_space_handle_t _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
repne \n\
@@ -819,7 +823,7 @@
#endif
{
int _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
1: lodsl \n\
@@ -838,7 +842,7 @@
#endif
{
bus_space_handle_t _port_ = bsh + offset;
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
repne \n\
@@ -1217,7 +1221,7 @@
bus_space_barrier(bus_space_tag_t tag __unused, bus_space_handle_t bsh __unused,
bus_size_t offset __unused, bus_size_t len __unused, int flags)
{
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
if (flags & BUS_SPACE_BARRIER_READ)
__asm __volatile("lock; addl $0,0(%%rsp)" : : : "memory");
else
==== //depot/projects/hammer/sys/amd64/include/clock.h#15 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/include/cpufunc.h#31 (text+ko) ====
@@ -161,7 +161,7 @@
#define inb(port) inbv(port)
#define outb(port, data) outbv(port, data)
-#else /* __GNUCLIKE_BUILTIN_CONSTANT_P && __GNUCLIKE_ASM >= 3 */
+#else /* __GNUCLIKE_BUILTIN_CONSTANT_P && __GNUCLIKE_ASM >= 3 */
/*
* The following complications are to get around gcc not having a
@@ -208,7 +208,7 @@
__asm __volatile("outb %0,%1" : : "a" (data), "id" ((u_short)(port)));
}
-#endif /* __GNUCLIKE_BUILTIN_CONSTANT_P */
+#endif /* __GNUCLIKE_BUILTIN_CONSTANT_P && __GNUCLIKE_ASM >= 3*/
static __inline u_char
inbv(u_int port)
==== //depot/projects/hammer/sys/amd64/include/critical.h#19 (text+ko) ====
@@ -46,7 +46,7 @@
*/
void cpu_critical_fork_exit(void);
-#ifdef __CC_SUPPORTS___INLINE
+#ifdef __CC_SUPPORTS___INLINE
/*
* cpu_critical_enter:
@@ -79,7 +79,7 @@
void cpu_critical_enter(struct thread *td);
void cpu_critical_exit(struct thread *td);
-#endif /* __CC_SUPPORTS___INLINE */
+#endif /* __CC_SUPPORTS___INLINE */
__END_DECLS
==== //depot/projects/hammer/sys/amd64/include/endian.h#12 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/include/ieeefp.h#14 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/include/in_cksum.h#12 (text+ko) ====
@@ -35,6 +35,10 @@
#ifndef _MACHINE_IN_CKSUM_H_
#define _MACHINE_IN_CKSUM_H_ 1
+#ifndef _SYS_CDEFS_H_
+#error this file needs sys/cdefs.h as a prerequisite
+#endif
+
#include <sys/cdefs.h>
#define in_cksum(m, len) in_cksum_skip(m, len, 0)
==== //depot/projects/hammer/sys/amd64/include/limits.h#11 (text+ko) ====
==== //depot/projects/hammer/sys/amd64/include/pcpu.h#21 (text+ko) ====
@@ -59,8 +59,8 @@
#define PCPU_PTR(member) (&pcpup->pc_ ## member)
#define PCPU_SET(member,value) (pcpup->pc_ ## member = (value))
-#elif defined(__GNUCLIKE___TYPEOF) && defined(__GNUCLIKE___OFFSETOF) \
- && defined(__GNUCLIKE_ASM)
+#elif defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) \
+ && defined(__GNUCLIKE___OFFSETOF)
/*
* Evaluates to the byte offset of the per-cpu variable name.
==== //depot/projects/hammer/sys/amd64/include/profile.h#26 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)profile.h 8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/amd64/include/profile.h,v 1.44 2005/03/02 21:33:21 joerg Exp $
+ * $FreeBSD: src/sys/i386/include/profile.h,v 1.40 2005/03/02 21:33:26 joerg Exp $
*/
#ifndef _MACHINE_PROFILE_H_
@@ -75,7 +75,7 @@
#define MEXITCOUNT_OVERHEAD_GETLABEL()
#else
#error this file needs to be ported to your compiler
-#endif /* __GNUCLIKE_ASM */
+#endif /* !__GNUCLIKE_ASM */
#else /* !GUPROF */
#define MCOUNT_DECL(s) u_long s;
#ifdef SMP
@@ -112,7 +112,7 @@
static void _mcount(uintfptr_t frompc, uintfptr_t selfpc) __used; \
static void _mcount
-#ifdef __GNUCLIKE_ASM
+#ifdef __GNUCLIKE_ASM
#define MCOUNT __asm(" \n\
.globl .mcount \n\
.type .mcount @function \n\
==== //depot/projects/hammer/sys/amd64/include/stdarg.h#9 (text+ko) ====
@@ -39,7 +39,8 @@
typedef __va_list va_list;
#endif
-#if defined(__GNUCLIKE_BUILTIN_STDARG)
+#ifdef __GNUCLIKE_BUILTIN_STDARG
+
#define va_start(ap, last) \
__builtin_stdarg_start((ap), (last))
==== //depot/projects/hammer/sys/amd64/include/varargs.h#10 (text+ko) ====
@@ -71,7 +71,7 @@
#define __va_size(type) \
(((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
-#ifdef __GNUCLIKE_BUILTIN_VAALIST
+#if defined(__GNUCLIKE_BUILTIN_VAALIST)
#define va_alist __builtin_va_alist
#endif
#define va_dcl int va_alist; ...
==== //depot/projects/hammer/sys/amd64/isa/clock.c#34 (text+ko) ====
@@ -89,6 +89,7 @@
#define TIMER_DIV(x) ((timer_freq + (x) / 2) / (x))
+
int adjkerntz; /* local offset from GMT in seconds */
int clkintr_pending;
int disable_rtc_set; /* disable resettodr() if != 0 */
@@ -154,6 +155,7 @@
hardclock(frame);
}
+
int
acquire_timer2(int mode)
{
@@ -174,6 +176,7 @@
return (0);
}
+
int
release_timer2()
{
More information about the p4-projects
mailing list