DELAY must be a routine, not a macro definition.
This commit is contained in:
parent
3623186cbc
commit
02b63ceaff
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user