提交 8e8a52ed 编写于 作者: R Ralf Baechle

[MIPS] SMTC: Don't continue in set_vi_srs_handler on detected bad arguments.

Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 ef36fc3c
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
* Copyright (C) 2000, 01 MIPS Technologies, Inc. * Copyright (C) 2000, 01 MIPS Technologies, Inc.
* Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki
*/ */
#include <linux/bug.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -1190,8 +1191,8 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) ...@@ -1190,8 +1191,8 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
memcpy (b, &except_vec_vi, handler_len); memcpy (b, &except_vec_vi, handler_len);
#ifdef CONFIG_MIPS_MT_SMTC #ifdef CONFIG_MIPS_MT_SMTC
if (n > 7) BUG_ON(n > 7); /* Vector index %d exceeds SMTC maximum. */
printk("Vector index %d exceeds SMTC maximum\n", n);
w = (u32 *)(b + mori_offset); w = (u32 *)(b + mori_offset);
*w = (*w & 0xffff0000) | (0x100 << n); *w = (*w & 0xffff0000) | (0x100 << n);
#endif /* CONFIG_MIPS_MT_SMTC */ #endif /* CONFIG_MIPS_MT_SMTC */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册