diff options
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 76bf2cea61d7..534227f4da30 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/cacheflush.h> | 42 | #include <asm/cacheflush.h> |
43 | #include <asm/blackfin.h> | 43 | #include <asm/blackfin.h> |
44 | #include <asm/cplbinit.h> | 44 | #include <asm/cplbinit.h> |
45 | #include <asm/fixed_code.h> | ||
45 | 46 | ||
46 | u16 _bfin_swrst; | 47 | u16 _bfin_swrst; |
47 | 48 | ||
@@ -404,6 +405,27 @@ void __init setup_arch(char **cmdline_p) | |||
404 | 405 | ||
405 | printk(KERN_INFO "Hardware Trace Enabled\n"); | 406 | printk(KERN_INFO "Hardware Trace Enabled\n"); |
406 | bfin_write_TBUFCTL(0x03); | 407 | bfin_write_TBUFCTL(0x03); |
408 | |||
409 | /* Copy atomic sequences to their fixed location, and sanity check that | ||
410 | these locations are the ones that we advertise to userspace. */ | ||
411 | memcpy((void *)FIXED_CODE_START, &fixed_code_start, | ||
412 | FIXED_CODE_END - FIXED_CODE_START); | ||
413 | BUG_ON((char *)&sigreturn_stub - (char *)&fixed_code_start | ||
414 | != SIGRETURN_STUB - FIXED_CODE_START); | ||
415 | BUG_ON((char *)&atomic_xchg32 - (char *)&fixed_code_start | ||
416 | != ATOMIC_XCHG32 - FIXED_CODE_START); | ||
417 | BUG_ON((char *)&atomic_cas32 - (char *)&fixed_code_start | ||
418 | != ATOMIC_CAS32 - FIXED_CODE_START); | ||
419 | BUG_ON((char *)&atomic_add32 - (char *)&fixed_code_start | ||
420 | != ATOMIC_ADD32 - FIXED_CODE_START); | ||
421 | BUG_ON((char *)&atomic_sub32 - (char *)&fixed_code_start | ||
422 | != ATOMIC_SUB32 - FIXED_CODE_START); | ||
423 | BUG_ON((char *)&atomic_ior32 - (char *)&fixed_code_start | ||
424 | != ATOMIC_IOR32 - FIXED_CODE_START); | ||
425 | BUG_ON((char *)&atomic_and32 - (char *)&fixed_code_start | ||
426 | != ATOMIC_AND32 - FIXED_CODE_START); | ||
427 | BUG_ON((char *)&atomic_xor32 - (char *)&fixed_code_start | ||
428 | != ATOMIC_XOR32 - FIXED_CODE_START); | ||
407 | } | 429 | } |
408 | 430 | ||
409 | static int __init topology_init(void) | 431 | static int __init topology_init(void) |