diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-07-01 08:59:06 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-07-01 08:59:06 +0000 |
commit | 7beed3a871060bfa452163c1bd54ea0989e1fa74 (patch) | |
tree | 29d8c7936267d4579ce803208a126ec7c0055c94 /arch/mips/kernel | |
parent | 5db55a1e1de9e46e561bf100e90c01dd22bd03de (diff) |
Minor optimization, use save_and_cli() instead of save_flags();
cli(); sequences.
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/gdb-stub.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/irq.c | 14 | ||||
-rw-r--r-- | arch/mips/kernel/sysmips.c | 7 | ||||
-rw-r--r-- | arch/mips/kernel/time.c | 5 |
4 files changed, 16 insertions, 14 deletions
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index 255ec2228..adbb750d8 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c @@ -11,6 +11,8 @@ * Send complaints, suggestions etc. to <andy@waldorf-gmbh.de> * * Copyright (C) 1995 Andreas Busse + * + * $Id: gdb-stub.c,v 1.2 1997/06/28 23:26:24 ralf Exp $ */ /* @@ -328,7 +330,7 @@ void set_debug_traps(void) unsigned long flags; unsigned char c; - save_flags(flags); cli(); + save_and_cli(flags); for (ht = hard_trap_info; ht->tt && ht->signo; ht++) set_except_vector(ht->tt, trap_low); diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 0896ed1c7..32bc5a133 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c @@ -10,6 +10,8 @@ * should be easier. * * Mips support by Ralf Baechle and Andreas Busse + * + * $Id: irq.c,v 1.2 1997/06/28 23:26:25 ralf Exp $ */ #include <linux/config.h> #include <linux/errno.h> @@ -78,8 +80,7 @@ void disable_irq(unsigned int irq_nr) { unsigned long flags; - save_flags(flags); - cli(); + save_and_cli(flags); mask_irq(irq_nr); restore_flags(flags); } @@ -87,8 +88,7 @@ void disable_irq(unsigned int irq_nr) void enable_irq(unsigned int irq_nr) { unsigned long flags; - save_flags(flags); - cli(); + save_and_cli(flags); unmask_irq(irq_nr); restore_flags(flags); } @@ -226,8 +226,7 @@ int setup_x86_irq(int irq, struct irqaction * new) if (new->flags & SA_SAMPLE_RANDOM) rand_initialize_irq(irq); - save_flags(flags); - cli(); + save_and_cli(flags); *p = new; if (!shared) { @@ -287,8 +286,7 @@ void free_irq(unsigned int irq, void *dev_id) continue; /* Found it - now free it */ - save_flags(flags); - cli(); + save_and_cli(flags); *p = action->next; if (!irq[irq_action]) { mask_irq(irq); diff --git a/arch/mips/kernel/sysmips.c b/arch/mips/kernel/sysmips.c index c5e394d56..ae99466e4 100644 --- a/arch/mips/kernel/sysmips.c +++ b/arch/mips/kernel/sysmips.c @@ -5,7 +5,9 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1995 by Ralf Baechle + * Copyright (C) 1995, 1996, 1997 by Ralf Baechle + * + * $Id: sysmips.c,v 1.2 1997/06/28 23:26:25 ralf Exp $ */ #include <linux/errno.h> #include <linux/linkage.h> @@ -79,8 +81,7 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3) retval = verify_area(VERIFY_WRITE, p, sizeof(*p)); if (retval) goto out; - save_flags(flags); - cli(); + save_and_cli(flags); retval = *p; *p = arg2; restore_flags(flags); diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index fd57f6d0e..011fb6256 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -5,6 +5,8 @@ * * This file contains the time handling details for PC-style clocks as * found in some MIPS systems. + * + * $Id: time.c,v 1.2 1997/06/28 23:26:25 ralf Exp $ */ #include <linux/errno.h> #include <linux/init.h> @@ -134,8 +136,7 @@ void do_gettimeofday(struct timeval *tv) { unsigned long flags; - save_flags(flags); - cli(); + save_and_cli(flags); *tv = xtime; tv->tv_usec += do_gettimeoffset(); |