public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David C. Hansen" <haveblue@us.ibm.com>
To: marcelo@conectiva.com.br
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] making some more global spinlocks static
Date: Mon, 10 Dec 2001 13:49:48 -0800	[thread overview]
Message-ID: <200112102149.fBALnm212435@localhost.localdomain> (raw)

Marcelo,
  I just sent a 2.5 version of this to Linus, so here is yours.  This patch makes several spinlocks static.  These are either locks that have appeared in the last few versions of 2.4, or older locks where the maintainers never passed the patch along.  Most of them are for new locks.  The patch applies against 2.4.16.

diff -ur linux-2.4.16-clean/arch/alpha/kernel/irq_i8259.c linux/arch/alpha/kernel/irq_i8259.c
--- linux-2.4.16-clean/arch/alpha/kernel/irq_i8259.c	Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/irq_i8259.c	Fri Dec  7 10:23:36 2001
@@ -22,7 +22,7 @@
 
 /* Note mask bit is true for DISABLED irqs.  */
 static unsigned int cached_irq_mask = 0xffff;
-spinlock_t i8259_irq_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t i8259_irq_lock = SPIN_LOCK_UNLOCKED;
 
 static inline void
 i8259_update_irq_hw(unsigned int irq, unsigned long mask)
diff -ur linux-2.4.16-clean/arch/i386/kernel/pci-pc.c linux/arch/i386/kernel/pci-pc.c
--- linux-2.4.16-clean/arch/i386/kernel/pci-pc.c	Fri Nov  9 13:58:02 2001
+++ linux/arch/i386/kernel/pci-pc.c	Thu Dec  6 16:10:39 2001
@@ -30,7 +30,7 @@
  * This interrupt-safe spinlock protects all accesses to PCI
  * configuration space.
  */
-spinlock_t pci_config_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t pci_config_lock = SPIN_LOCK_UNLOCKED;
 
 
 /*
diff -ur linux-2.4.16-clean/arch/ia64/kernel/efivars.c linux/arch/ia64/kernel/efivars.c
--- linux-2.4.16-clean/arch/ia64/kernel/efivars.c	Fri Nov  9 14:26:17 2001
+++ linux/arch/ia64/kernel/efivars.c	Fri Dec  7 10:27:56 2001
@@ -100,7 +100,7 @@
 	struct list_head        list;
 } efivar_entry_t;
 
-spinlock_t efivars_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t efivars_lock = SPIN_LOCK_UNLOCKED;
 static LIST_HEAD(efivar_list);
 static struct proc_dir_entry *efi_vars_dir = NULL;
 
diff -ur linux-2.4.16-clean/arch/ia64/kernel/pci.c linux/arch/ia64/kernel/pci.c
--- linux-2.4.16-clean/arch/ia64/kernel/pci.c	Fri Nov  9 14:26:17 2001
+++ linux/arch/ia64/kernel/pci.c	Fri Dec  7 10:24:07 2001
@@ -46,7 +46,7 @@
  * This interrupt-safe spinlock protects all accesses to PCI
  * configuration space.
  */
-spinlock_t pci_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t pci_lock = SPIN_LOCK_UNLOCKED;
 
 struct pci_fixup pcibios_fixups[] = {
 	{ 0 }
diff -ur linux-2.4.16-clean/arch/ia64/sn/io/hubspc.c linux/arch/ia64/sn/io/hubspc.c
--- linux-2.4.16-clean/arch/ia64/sn/io/hubspc.c	Thu Apr  5 12:51:47 2001
+++ linux/arch/ia64/sn/io/hubspc.c	Fri Dec  7 10:25:25 2001
@@ -61,7 +61,7 @@
 }cpuprom_info_t;
 
 static cpuprom_info_t	*cpuprom_head;
-spinlock_t	cpuprom_spinlock;
+static spinlock_t	cpuprom_spinlock;
 #define	PROM_LOCK()	mutex_spinlock(&cpuprom_spinlock)
 #define	PROM_UNLOCK(s)	mutex_spinunlock(&cpuprom_spinlock, (s))
 
diff -ur linux-2.4.16-clean/arch/ppc/kernel/i8259.c linux/arch/ppc/kernel/i8259.c
--- linux-2.4.16-clean/arch/ppc/kernel/i8259.c	Mon May 21 17:04:47 2001
+++ linux/arch/ppc/kernel/i8259.c	Fri Dec  7 10:29:12 2001
@@ -13,7 +13,7 @@
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-spinlock_t i8259_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t i8259_lock = SPIN_LOCK_UNLOCKED;
 
 int i8259_pic_irq_offset;
 
diff -ur linux-2.4.16-clean/arch/ppc/kernel/pmac_pic.c linux/arch/ppc/kernel/pmac_pic.c
--- linux-2.4.16-clean/arch/ppc/kernel/pmac_pic.c	Sat Sep  8 12:38:42 2001
+++ linux/arch/ppc/kernel/pmac_pic.c	Fri Dec  7 10:29:29 2001
@@ -36,7 +36,7 @@
 static int max_irqs;
 static int max_real_irqs;
 
-spinlock_t pmac_pic_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t pmac_pic_lock = SPIN_LOCK_UNLOCKED;
 
 
 #define GATWICK_IRQ_POOL_SIZE        10
diff -ur linux-2.4.16-clean/arch/ppc/kernel/prom.c linux/arch/ppc/kernel/prom.c
--- linux-2.4.16-clean/arch/ppc/kernel/prom.c	Sat Sep  8 12:38:42 2001
+++ linux/arch/ppc/kernel/prom.c	Fri Dec  7 10:29:05 2001
@@ -1928,7 +1928,7 @@
 }
 #endif
 
-spinlock_t rtas_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t rtas_lock = SPIN_LOCK_UNLOCKED;
 
 /* this can be called after setup -- Cort */
 int __openfirmware
diff -ur linux-2.4.16-clean/arch/sparc64/solaris/timod.c linux/arch/sparc64/solaris/timod.c
--- linux-2.4.16-clean/arch/sparc64/solaris/timod.c	Thu Sep 20 14:11:57 2001
+++ linux/arch/sparc64/solaris/timod.c	Fri Dec  7 10:30:52 2001
@@ -33,7 +33,7 @@
 	u32 arg);
 asmlinkage int solaris_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
 
-spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED;
+static spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED;
 static char * page = NULL ;
 
 #ifndef DEBUG_SOLARIS_KMALLOC
diff -ur linux-2.4.16-clean/drivers/char/sysrq.c linux/drivers/char/sysrq.c
--- linux-2.4.16-clean/drivers/char/sysrq.c	Tue Oct  2 09:20:37 2001
+++ linux/drivers/char/sysrq.c	Thu Dec  6 16:27:31 2001
@@ -336,7 +336,7 @@
 
 
 /* Key Operations table and lock */
-spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED;
 #define SYSRQ_KEY_TABLE_LENGTH 36
 static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
 /* 0 */	&sysrq_loglevel_op,

             reply	other threads:[~2001-12-10 21:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-10 21:49 David C. Hansen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-12-10 21:32 [PATCH] making some more global spinlocks static David C. Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200112102149.fBALnm212435@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox