Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68k: Add missing types to asm/irq.h

As reported in commit f8b648bf6628 ("net: sunhme: move asm includes to
below linux includes") when including this <asm/*> header before the
needed <linux/*> headers the compilation will fail because of missing
types:

arch/m68k/include/asm/irq.h:66:20: warning: ‘struct pt_regs’ declared inside parameter list will not be visible outside of this definition or declaration
66 | struct pt_regs *));
| ^~~~~~~
arch/m68k/include/asm/irq.h:78:11: error: expected ‘;’ before ‘void’
78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
| ^~~~~
| ;
arch/m68k/include/asm/irq.h:78:40: warning: ‘struct pt_regs’ declared inside parameter list will not be visible outside of this definition or declaration
78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
| ^~~~~~~
arch/m68k/include/asm/irq.h:79:8: error: unknown type name ‘atomic_t’
79 | extern atomic_t irq_err_count;
| ^~~~~~~~

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/5971770.lOV4Wx5bFT@eto.sf-tec.de
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

authored by

Rolf Eike Beer and committed by
Geert Uytterhoeven
ec177486 c50b1fc1

+5
+5
arch/m68k/include/asm/irq.h
··· 2 2 #ifndef _M68K_IRQ_H_ 3 3 #define _M68K_IRQ_H_ 4 4 5 + #include <linux/atomic.h> 6 + #include <linux/linkage.h> 7 + 5 8 /* 6 9 * This should be the same as the max(NUM_X_SOURCES) for all the 7 10 * different m68k hosts compiled into the kernel. ··· 62 59 struct irq_data; 63 60 struct irq_chip; 64 61 struct irq_desc; 62 + struct pt_regs; 63 + 65 64 extern unsigned int m68k_irq_startup(struct irq_data *data); 66 65 extern unsigned int m68k_irq_startup_irq(unsigned int irq); 67 66 extern void m68k_irq_shutdown(struct irq_data *data);