Skip to content

Commit

Permalink
um: kill system-um.h
Browse files Browse the repository at this point in the history
most of it belonged in irqflags.h, actually

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
Al Viro authored and richardweinberger committed Nov 2, 2011
1 parent b8c655d commit a34978c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 47 deletions.
38 changes: 37 additions & 1 deletion arch/um/include/asm/irqflags.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
#ifndef __UM_IRQFLAGS_H
#define __UM_IRQFLAGS_H

/* Empty for now */
extern int get_signals(void);
extern int set_signals(int enable);
extern void block_signals(void);
extern void unblock_signals(void);

static inline unsigned long arch_local_save_flags(void)
{
return get_signals();
}

static inline void arch_local_irq_restore(unsigned long flags)
{
set_signals(flags);
}

static inline void arch_local_irq_enable(void)
{
unblock_signals();
}

static inline void arch_local_irq_disable(void)
{
block_signals();
}

static inline unsigned long arch_local_irq_save(void)
{
unsigned long flags;
flags = arch_local_save_flags();
arch_local_irq_disable();
return flags;
}

static inline bool arch_irqs_disabled(void)
{
return arch_local_save_flags() == 0;
}

#endif
45 changes: 0 additions & 45 deletions arch/um/include/asm/system-um.h

This file was deleted.

4 changes: 3 additions & 1 deletion arch/x86/um/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <asm/cpufeature.h>
#include <asm/cmpxchg.h>
#include <asm/nops.h>
#include <asm/system-um.h>

#include <linux/kernel.h>
#include <linux/irqflags.h>
Expand Down Expand Up @@ -130,4 +129,7 @@ static inline void rdtsc_barrier(void)
alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
}

extern void *_switch_to(void *prev, void *next, void *last);
#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)

#endif

0 comments on commit a34978c

Please sign in to comment.