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 | |
parent | 5db55a1e1de9e46e561bf100e90c01dd22bd03de (diff) |
Minor optimization, use save_and_cli() instead of save_flags();
cli(); sequences.
Diffstat (limited to 'arch/mips')
-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 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/indy_int.c | 13 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/indy_timer.c | 6 |
6 files changed, 26 insertions, 23 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(); diff --git a/arch/mips/sgi/kernel/indy_int.c b/arch/mips/sgi/kernel/indy_int.c index fe60c03c8..efc174795 100644 --- a/arch/mips/sgi/kernel/indy_int.c +++ b/arch/mips/sgi/kernel/indy_int.c @@ -1,8 +1,10 @@ -/* $Id: indy_int.c,v 1.12 1996/08/07 02:54:11 dm Exp $ +/* * indy_int.c: Routines for generic manipulation of the INT[23] ASIC * found on INDY workstations.. * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) + * + * $Id: indy_int.c,v 1.2 1997/06/28 23:27:29 ralf Exp $ */ #include <linux/config.h> @@ -67,8 +69,7 @@ void disable_local_irq(unsigned int irq_nr) { unsigned long flags; - save_flags(flags); - cli(); + save_and_cli(flags); switch(irq_nr) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: ioc_icontrol->imask0 &= ~(1 << irq_nr); @@ -95,8 +96,7 @@ void disable_local_irq(unsigned int irq_nr) void enable_local_irq(unsigned int irq_nr) { unsigned long flags; - save_flags(flags); - cli(); + save_and_cli(flags); switch(irq_nr) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: ioc_icontrol->imask0 |= (1 << irq_nr); @@ -408,8 +408,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; restore_flags(flags); kfree(action); diff --git a/arch/mips/sgi/kernel/indy_timer.c b/arch/mips/sgi/kernel/indy_timer.c index b49ec6762..43c1c76c6 100644 --- a/arch/mips/sgi/kernel/indy_timer.c +++ b/arch/mips/sgi/kernel/indy_timer.c @@ -1,7 +1,9 @@ -/* $Id: indy_timer.c,v 1.10 1996/08/07 02:54:11 dm Exp $ +/* * indy_timer.c: Setting up the clock on the INDY 8254 controller. * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) + * + * $Id: indy_timer.c,v 1.2 1997/06/28 23:27:29 ralf Exp $ */ #include <linux/errno.h> @@ -280,7 +282,7 @@ void do_gettimeofday(struct timeval *tv) { unsigned long flags; - save_flags(flags); cli(); + save_and_cli(flags); *tv = xtime; restore_flags(flags); } |