aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/kernel/irq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 6eba6fd8a8ec..8ac2097f13d4 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -196,7 +196,7 @@ asmlinkage void do_softirq(void)
196 * ext_int_hash[index] is the list head for all external interrupts that hash 196 * ext_int_hash[index] is the list head for all external interrupts that hash
197 * to this index. 197 * to this index.
198 */ 198 */
199static struct hlist_head ext_int_hash[256]; 199static struct hlist_head ext_int_hash[32] ____cacheline_aligned;
200 200
201struct ext_int_info { 201struct ext_int_info {
202 ext_int_handler_t handler; 202 ext_int_handler_t handler;
@@ -210,7 +210,9 @@ static DEFINE_SPINLOCK(ext_int_hash_lock);
210 210
211static inline int ext_hash(u16 code) 211static inline int ext_hash(u16 code)
212{ 212{
213 return (code + (code >> 9)) & 0xff; 213 BUILD_BUG_ON(!is_power_of_2(ARRAY_SIZE(ext_int_hash)));
214
215 return (code + (code >> 9)) & (ARRAY_SIZE(ext_int_hash) - 1);
214} 216}
215 217
216int register_external_interrupt(u16 code, ext_int_handler_t handler) 218int register_external_interrupt(u16 code, ext_int_handler_t handler)