From 810839ddeeee974b37118daf491194ec6fc9e341 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 20 Jan 2004 03:10:29 -0800 Subject: [PATCH] [PATCH] get PPC64 iSeries closer to building From: Stephen Rothwell This patch allows iSeries to come much closer to building. This is a precurser to my trying to merge the virtual device drivers for iSeries (console, disk and cdrom). --- arch/ppc64/kernel/iSeries_setup.h | 2 ++ include/asm-ppc64/hw_irq.h | 28 ++++++++++++++++------------ include/asm-ppc64/system.h | 7 ------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/arch/ppc64/kernel/iSeries_setup.h b/arch/ppc64/kernel/iSeries_setup.h index 93470fcd8a161..53776d4035084 100644 --- a/arch/ppc64/kernel/iSeries_setup.h +++ b/arch/ppc64/kernel/iSeries_setup.h @@ -19,6 +19,8 @@ #ifndef __ISERIES_SETUP_H__ #define __ISERIES_SETUP_H__ +#include /* for irq_desc_t */ + extern void iSeries_init_early(void); extern void iSeries_init(unsigned long r3, unsigned long ird_start, unsigned long ird_end, unsigned long cline_start, diff --git a/include/asm-ppc64/hw_irq.h b/include/asm-ppc64/hw_irq.h index 9b4ad1f7993f0..8db7a1a707564 100644 --- a/include/asm-ppc64/hw_irq.h +++ b/include/asm-ppc64/hw_irq.h @@ -21,18 +21,15 @@ extern void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq); #ifdef CONFIG_PPC_ISERIES -extern void __no_use_sti(void); -extern void __no_use_cli(void); -extern void __no_use_restore_flags(unsigned long); -extern unsigned long __no_use_save_flags(void); -extern void __no_use_set_lost(unsigned long); -extern void __no_lpq_restore_flags(unsigned long); - -#define local_irq_disable() __no_use_cli() -#define local_irq_enable() __no_use_sti() -#define local_save_flags(flags) ((flags) = __no_use_save_flags()) -#define local_irq_restore(flags) __no_use_restore_flags((unsigned long)flags) -#define local_irq_save(flags) ({local_save_flags(flags);local_irq_disable();}) +extern unsigned long local_get_flags(void); +extern unsigned long local_irq_disable(void); +extern void local_irq_restore(unsigned long); + +#define local_irq_enable() local_irq_restore(1) +#define local_save_flags(flags) ((flags) = local_get_flags()) +#define local_irq_save(flags) ((flags) = local_irq_disable()) + +#define irqs_disabled() (local_get_flags() == 0) #else @@ -69,6 +66,13 @@ static inline void __do_save_and_cli(unsigned long *flags) #define local_irq_save(flags) __do_save_and_cli(&flags) +#define irqs_disabled() \ +({ \ + unsigned long flags; \ + local_save_flags(flags); \ + !(flags & MSR_EE); \ +}) + #endif /* CONFIG_PPC_ISERIES */ #define mask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->disable) irq_desc[irq].handler->disable(irq);}) diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index cdf80cf206f5e..2a88765fd6003 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h @@ -104,13 +104,6 @@ extern struct task_struct * _switch(struct thread_struct *prev, struct pt_regs; extern void dump_regs(struct pt_regs *); -#define irqs_disabled() \ -({ \ - unsigned long flags; \ - local_save_flags(flags); \ - !(flags & MSR_EE); \ -}) - static inline int __is_processor(unsigned long pv) { unsigned long pvr; -- 2.53.0