aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/pj4-cp0.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/kernel/pj4-cp0.c b/arch/arm/kernel/pj4-cp0.c
index fc7208636284..12352cd30ab2 100644
--- a/arch/arm/kernel/pj4-cp0.c
+++ b/arch/arm/kernel/pj4-cp0.c
@@ -45,7 +45,7 @@ static int iwmmxt_do(struct notifier_block *self, unsigned long cmd, void *t)
45 return NOTIFY_DONE; 45 return NOTIFY_DONE;
46} 46}
47 47
48static struct notifier_block iwmmxt_notifier_block = { 48static struct notifier_block __maybe_unused iwmmxt_notifier_block = {
49 .notifier_call = iwmmxt_do, 49 .notifier_call = iwmmxt_do,
50}; 50};
51 51
@@ -79,17 +79,21 @@ static void __init pj4_cp_access_write(u32 value)
79 */ 79 */
80static int __init pj4_cp0_init(void) 80static int __init pj4_cp0_init(void)
81{ 81{
82 u32 cp_access; 82 u32 __maybe_unused cp_access;
83 83
84 if (!cpu_is_pj4()) 84 if (!cpu_is_pj4())
85 return 0; 85 return 0;
86 86
87#ifndef CONFIG_IWMMXT
88 pr_info("PJ4 iWMMXt coprocessor detected, but kernel support is missing.\n");
89#else
87 cp_access = pj4_cp_access_read() & ~0xf; 90 cp_access = pj4_cp_access_read() & ~0xf;
88 pj4_cp_access_write(cp_access); 91 pj4_cp_access_write(cp_access);
89 92
90 printk(KERN_INFO "PJ4 iWMMXt coprocessor enabled.\n"); 93 printk(KERN_INFO "PJ4 iWMMXt coprocessor enabled.\n");
91 elf_hwcap |= HWCAP_IWMMXT; 94 elf_hwcap |= HWCAP_IWMMXT;
92 thread_register_notifier(&iwmmxt_notifier_block); 95 thread_register_notifier(&iwmmxt_notifier_block);
96#endif
93 97
94 return 0; 98 return 0;
95} 99}