DELAY must be a routine, not a macro definition.

This commit is contained in:
Peter Grehan 2003-09-26 09:02:24 +00:00
parent 3623186cbc
commit 02b63ceaff
4 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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);