| .. | .. |
|---|
| 11 | 11 | #include <asm/bcache.h> |
|---|
| 12 | 12 | #include <asm/setup.h> |
|---|
| 13 | 13 | |
|---|
| 14 | +#if defined(CONFIG_64BIT) && defined(CONFIG_FW_ARC32) |
|---|
| 15 | +/* |
|---|
| 16 | + * For 64bit kernels working with a 32bit ARC PROM pointer arguments |
|---|
| 17 | + * for ARC calls need to reside in CKEG0/1. But as soon as the kernel |
|---|
| 18 | + * switches to it's first kernel thread stack is set to an address in |
|---|
| 19 | + * XKPHYS, so anything on stack can't be used anymore. This is solved |
|---|
| 20 | + * by using a * static declartion variables are put into BSS, which is |
|---|
| 21 | + * linked to a CKSEG0 address. Since this is only used on UP platforms |
|---|
| 22 | + * there is not spinlock needed |
|---|
| 23 | + */ |
|---|
| 24 | +#define O32_STATIC static |
|---|
| 25 | +#else |
|---|
| 26 | +#define O32_STATIC |
|---|
| 27 | +#endif |
|---|
| 28 | + |
|---|
| 14 | 29 | /* |
|---|
| 15 | 30 | * IP22 boardcache is not compatible with board caches. Thus we disable it |
|---|
| 16 | 31 | * during romvec action. Since r4xx0.c is always compiled and linked with your |
|---|
| .. | .. |
|---|
| 23 | 38 | |
|---|
| 24 | 39 | void prom_putchar(char c) |
|---|
| 25 | 40 | { |
|---|
| 26 | | - ULONG cnt; |
|---|
| 27 | | - CHAR it = c; |
|---|
| 41 | + O32_STATIC ULONG cnt; |
|---|
| 42 | + O32_STATIC CHAR it; |
|---|
| 43 | + |
|---|
| 44 | + it = c; |
|---|
| 28 | 45 | |
|---|
| 29 | 46 | bc_disable(); |
|---|
| 30 | 47 | ArcWrite(1, &it, 1, &cnt); |
|---|
| .. | .. |
|---|
| 33 | 50 | |
|---|
| 34 | 51 | char prom_getchar(void) |
|---|
| 35 | 52 | { |
|---|
| 36 | | - ULONG cnt; |
|---|
| 37 | | - CHAR c; |
|---|
| 53 | + O32_STATIC ULONG cnt; |
|---|
| 54 | + O32_STATIC CHAR c; |
|---|
| 38 | 55 | |
|---|
| 39 | 56 | bc_disable(); |
|---|
| 40 | 57 | ArcRead(0, &c, 1, &cnt); |
|---|