From 02b63ceaff48bf1b2cf7e3d6e144ccefba9a5059 Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Fri, 26 Sep 2003 09:02:24 +0000 Subject: [PATCH] DELAY must be a routine, not a macro definition. --- sys/powerpc/aim/clock.c | 2 +- sys/powerpc/include/cpu.h | 2 -- sys/powerpc/powerpc/clock.c | 2 +- sys/powerpc/powerpc/cpu.c | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/powerpc/aim/clock.c b/sys/powerpc/aim/clock.c index 11ba5d08bf9b..cee97f46bba9 100644 --- a/sys/powerpc/aim/clock.c +++ b/sys/powerpc/aim/clock.c @@ -306,7 +306,7 @@ decr_get_timecount(struct timecounter *tc) * Wait for about n microseconds (at least!). */ void -delay(int n) +DELAY(int n) { u_quad_t tb, ttb; diff --git a/sys/powerpc/include/cpu.h b/sys/powerpc/include/cpu.h index ae3893d7bd6a..4e4119cc517d 100644 --- a/sys/powerpc/include/cpu.h +++ b/sys/powerpc/include/cpu.h @@ -50,8 +50,6 @@ #define cpu_swapout(p) #define cpu_number() 0 -#define DELAY(n) delay(n) - #if defined(_KERNEL) || defined(_STANDALONE) #define CACHELINESIZE 32 #endif diff --git a/sys/powerpc/powerpc/clock.c b/sys/powerpc/powerpc/clock.c index 11ba5d08bf9b..cee97f46bba9 100644 --- a/sys/powerpc/powerpc/clock.c +++ b/sys/powerpc/powerpc/clock.c @@ -306,7 +306,7 @@ decr_get_timecount(struct timecounter *tc) * Wait for about n microseconds (at least!). */ void -delay(int n) +DELAY(int n) { u_quad_t tb, ttb; diff --git a/sys/powerpc/powerpc/cpu.c b/sys/powerpc/powerpc/cpu.c index 6b1085e5998b..eee0eab2fa90 100644 --- a/sys/powerpc/powerpc/cpu.c +++ b/sys/powerpc/powerpc/cpu.c @@ -245,7 +245,7 @@ cpu_print_speed(void) mtspr(SPR_MMCR0, SPR_MMCR0_FC); mtspr(SPR_PMC1, 0); mtspr(SPR_MMCR0, SPR_MMCR0_PMC1SEL(PMCN_CYCLES)); - delay(100000); + DELAY(100000); cps = (mfspr(SPR_PMC1) * 10) + 4999; printf(", %lld.%02lld MHz", cps / 1000000, (cps / 10000) % 100); } @@ -284,7 +284,7 @@ cpu_config_l2cr(u_int cpuid, uint16_t vers) __asm __volatile("sync"); /* Wait for L2 clock to be stable (640 L2 clocks). */ - delay(100); + DELAY(100); /* Invalidate all L2 contents. */ mtspr(SPR_L2CR, l2cr | L2CR_L2I);