Change all archs that did:
#define clockframe somethingelse to: struct clockframe { struct somethingelse cf_se; }; and change access macros accordingly. That means that, at least for that very issue, things will not go ka-boomy if you don't have the actual definition of struct clockframe before including systm.h.
This commit is contained in:
parent
bbc1e050c5
commit
9f1eb3e30f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: frame.h,v 1.1 2002/03/24 15:46:58 bjh21 Exp $ */
|
||||
/* $NetBSD: frame.h,v 1.2 2005/08/11 20:32:55 cube Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Ben Harris.
|
||||
|
@ -78,7 +78,9 @@ typedef struct irqframe {
|
|||
register_t if_r15; /* Must be fixed so we know which branch to use */
|
||||
} irqframe_t;
|
||||
|
||||
#define clockframe irqframe
|
||||
struct clockframe {
|
||||
struct irqframe cf_if;
|
||||
};
|
||||
|
||||
/*
|
||||
* Switch frame
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.6 2004/09/25 11:08:47 yamt Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.7 2005/08/11 20:32:55 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -203,11 +203,13 @@ extern u_int32_t cpus_attached;
|
|||
* encapsulate the previous machine state in an opaque
|
||||
* clockframe; for now, use generic intrframe.
|
||||
*/
|
||||
#define clockframe intrframe
|
||||
struct clockframe {
|
||||
struct intrframe cf_if;
|
||||
};
|
||||
|
||||
#define CLKF_USERMODE(frame) USERMODE((frame)->if_cs, (frame)->if_rflags)
|
||||
#define CLKF_USERMODE(frame) USERMODE((frame)->cf_if.if_cs, (frame)->cf_if.if_rflags)
|
||||
#define CLKF_BASEPRI(frame) (0)
|
||||
#define CLKF_PC(frame) ((frame)->if_rip)
|
||||
#define CLKF_PC(frame) ((frame)->cf_if.if_rip)
|
||||
#define CLKF_INTR(frame) (curcpu()->ci_idepth > 1)
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: frame.h,v 1.11 2004/04/27 07:13:16 scw Exp $ */
|
||||
/* $NetBSD: frame.h,v 1.12 2005/08/11 20:32:55 cube Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1997 Mark Brinicombe.
|
||||
|
@ -76,7 +76,9 @@ typedef struct irqframe {
|
|||
unsigned int if_pc;
|
||||
} irqframe_t;
|
||||
|
||||
#define clockframe irqframe
|
||||
struct clockframe {
|
||||
struct irqframe cf_if;
|
||||
};
|
||||
|
||||
/*
|
||||
* Switch frame
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.36 2004/09/22 11:32:02 yamt Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.37 2005/08/11 20:32:55 cube Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1996 Mark Brinicombe.
|
||||
|
@ -127,9 +127,9 @@ extern int cpu_do_powersave;
|
|||
* frame came from USR mode or not.
|
||||
*/
|
||||
#ifdef __PROG32
|
||||
#define CLKF_USERMODE(frame) ((frame->if_spsr & PSR_MODE) == PSR_USR32_MODE)
|
||||
#define CLKF_USERMODE(frame) ((frame->cf_if.if_spsr & PSR_MODE) == PSR_USR32_MODE)
|
||||
#else
|
||||
#define CLKF_USERMODE(frame) ((frame->if_r15 & R15_MODE) == R15_MODE_USR)
|
||||
#define CLKF_USERMODE(frame) ((frame->cf_if.if_r15 & R15_MODE) == R15_MODE_USR)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -150,7 +150,7 @@ extern int current_intr_depth;
|
|||
/* Hack to treat FPE time as interrupt time so we can measure it */
|
||||
#define CLKF_INTR(frame) \
|
||||
((current_intr_depth > 1) || \
|
||||
(frame->if_spsr & PSR_MODE) == PSR_UND32_MODE)
|
||||
(frame->cf_if.if_spsr & PSR_MODE) == PSR_UND32_MODE)
|
||||
#else
|
||||
#define CLKF_INTR(frame) (current_intr_depth > 1)
|
||||
#endif
|
||||
|
@ -159,9 +159,9 @@ extern int current_intr_depth;
|
|||
* CLKF_PC: Extract the program counter from a clockframe
|
||||
*/
|
||||
#ifdef __PROG32
|
||||
#define CLKF_PC(frame) (frame->if_pc)
|
||||
#define CLKF_PC(frame) (frame->cf_if.if_pc)
|
||||
#else
|
||||
#define CLKF_PC(frame) (frame->if_r15 & R15_PC)
|
||||
#define CLKF_PC(frame) (frame->cf_if.if_r15 & R15_PC)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.117 2005/02/21 15:10:51 he Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.118 2005/08/11 20:32:55 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -263,11 +263,13 @@ extern u_int32_t cpus_attached;
|
|||
* running (hardclock) interrupt, CLKF_BASEPRI() *must* always be 0; otherwise
|
||||
* we could stall hardclock ticks if another interrupt takes too long.
|
||||
*/
|
||||
#define clockframe intrframe
|
||||
struct clockframe {
|
||||
struct intrframe cf_if;
|
||||
};
|
||||
|
||||
#define CLKF_USERMODE(frame) USERMODE((frame)->if_cs, (frame)->if_eflags)
|
||||
#define CLKF_USERMODE(frame) USERMODE((frame)->cf_if.if_cs, (frame)->cf_if.if_eflags)
|
||||
#define CLKF_BASEPRI(frame) (0)
|
||||
#define CLKF_PC(frame) ((frame)->if_eip)
|
||||
#define CLKF_PC(frame) ((frame)->cf_if.if_eip)
|
||||
#define CLKF_INTR(frame) (curcpu()->ci_idepth > 1)
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.42 2004/09/22 11:32:03 yamt Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.43 2005/08/11 20:32:55 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -74,11 +74,13 @@ extern struct cpu_info cpu_info_store;
|
|||
* clockframe; for now, use generic intrframe.
|
||||
*/
|
||||
|
||||
#define clockframe intrframe
|
||||
struct clockframe {
|
||||
struct intrframe cf_if;
|
||||
};
|
||||
|
||||
#define CLKF_USERMODE(framep) USERMODE((framep)->if_regs.r_psr)
|
||||
#define CLKF_BASEPRI(framep) ((framep)->if_pl == imask[IPL_ZERO])
|
||||
#define CLKF_PC(framep) ((framep)->if_regs.r_pc)
|
||||
#define CLKF_USERMODE(framep) USERMODE((framep)->cf_if.if_regs.r_psr)
|
||||
#define CLKF_BASEPRI(framep) ((framep)->cf_if.if_pl == imask[IPL_ZERO])
|
||||
#define CLKF_PC(framep) ((framep)->cf_if.if_regs.r_pc)
|
||||
#define CLKF_INTR(frame) (0) /* XXX should have an interrupt stack */
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.8 2005/04/16 22:49:37 bouyer Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.9 2005/08/11 20:32:55 cube Exp $ */
|
||||
/* NetBSD: cpu.h,v 1.113 2004/02/20 17:35:01 yamt Exp */
|
||||
|
||||
/*-
|
||||
|
@ -264,11 +264,13 @@ extern u_int32_t cpus_attached;
|
|||
* running (hardclock) interrupt, CLKF_BASEPRI() *must* always be 0; otherwise
|
||||
* we could stall hardclock ticks if another interrupt takes too long.
|
||||
*/
|
||||
#define clockframe intrframe
|
||||
struct clockframe {
|
||||
struct intrframe cf_if;
|
||||
};
|
||||
|
||||
#define CLKF_USERMODE(frame) USERMODE((frame)->if_cs, (frame)->if_eflags)
|
||||
#define CLKF_USERMODE(frame) USERMODE((frame)->cf_if.if_cs, (frame)->cf_if.if_eflags)
|
||||
#define CLKF_BASEPRI(frame) (0)
|
||||
#define CLKF_PC(frame) ((frame)->if_eip)
|
||||
#define CLKF_PC(frame) ((frame)->cf_if.if_eip)
|
||||
#define CLKF_INTR(frame) (curcpu()->ci_idepth > 1)
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.13 2005/06/25 18:44:59 bouyer Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.14 2005/08/11 20:32:56 cube Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -34,7 +34,7 @@
|
|||
#include "opt_xen.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.13 2005/06/25 18:44:59 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.14 2005/08/11 20:32:56 cube Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -271,7 +271,7 @@ xen_timer_handler(void *arg, struct intrframe *regs)
|
|||
cc_microset(ci);
|
||||
}
|
||||
}
|
||||
hardclock(regs);
|
||||
hardclock((struct clockframe *)regs);
|
||||
delta -= NS_PER_TICK;
|
||||
processed_system_time += NS_PER_TICK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue