All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] hotplug
@ 2006-01-09 11:33 carlos neira
  2006-01-09 15:11 ` Matthew Wilcox
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: carlos neira @ 2006-01-09 11:33 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

Greetings :
linux-2.6.15-rc7/drivers/pci/hotplug/pciehp_ctrl.c
linux-2.6.15-rc7/drivers/pci/hotplug/cpqphp_ctrl.c
linux-2.6.15-rc7/drivers/pci/hotplug/cpci_hotplug_core.c

Replaced lock_kernel()  with spinlocks , compile tested ok , using it.

As always if someone knows this patch breaks anything please tell me so.







-- 
"Employ your time in improving yourself by other men's writings, so that you 
shall gain easily what others have labored hard for."
Socrates

[-- Attachment #2: hotplug.patch --]
[-- Type: text/x-diff, Size: 3670 bytes --]

diff -uN /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/cpci_hotplug_core.c /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/cpci_hotplug_core.c
--- /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/cpci_hotplug_core.c	2005-12-24 20:47:48.000000000 -0300
+++ /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/cpci_hotplug_core.c	2006-01-08 23:41:07.000000000 -0300
@@ -35,6 +35,7 @@
 #include <linux/smp_lock.h>
 #include <asm/atomic.h>
 #include <linux/delay.h>
+#include <linux/spinlock.h>
 #include "pci_hotplug.h"
 #include "cpci_hotplug.h"
 
@@ -525,9 +526,9 @@
 {
 	int rc;
 
-	lock_kernel();
+	spin_lock(&event_thread);
 	daemonize("cpci_hp_eventd");
-	unlock_kernel();
+	spin_unlock(&event_thread);
 
 	dbg("%s - event thread started", __FUNCTION__);
 	while (1) {
@@ -566,9 +567,9 @@
 {
 	int rc;
 
-	lock_kernel();
+	spin_lock(&poll_thread);
 	daemonize("cpci_hp_polld");
-	unlock_kernel();
+	spin_unlock(&poll_thread);
 
 	while (1) {
 		if (thread_finished || signal_pending(current))
diff -uN /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/cpqphp_ctrl.c /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/cpqphp_ctrl.c
--- /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/cpqphp_ctrl.c	2005-12-24 20:47:48.000000000 -0300
+++ /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/cpqphp_ctrl.c	2006-01-08 23:37:19.000000000 -0300
@@ -37,6 +37,7 @@
 #include <linux/wait.h>
 #include <linux/smp_lock.h>
 #include <linux/pci.h>
+#include <linux/spinlock.h>
 #include "cpqphp.h"
 
 static u32 configure_new_device(struct controller* ctrl, struct pci_func *func,
@@ -1794,12 +1795,11 @@
 static int event_thread(void* data)
 {
 	struct controller *ctrl;
-	lock_kernel();
+	spin_lock(&event_thread);
 	daemonize("phpd_event");
+	spin_unlock(&event_thread);
 	
-	unlock_kernel();
-
-	while (1) {
+       while (1) {
 		dbg("!!!!event_thread sleeping\n");
 		down_interruptible (&event_semaphore);
 		dbg("event_thread woken finished = %d\n", event_finished);
diff -uN /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/pciehp_ctrl.c /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/pciehp_ctrl.c
--- /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/pciehp_ctrl.c	2005-12-24 20:47:48.000000000 -0300
+++ /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/pciehp_ctrl.c	2006-01-08 23:34:39.000000000 -0300
@@ -32,6 +32,7 @@
 #include <linux/types.h>
 #include <linux/smp_lock.h>
 #include <linux/pci.h>
+#include <linux/spinlock.h>
 #include "../pci.h"
 #include "pciehp.h"
 
@@ -517,10 +518,9 @@
 static int event_thread(void* data)
 {
 	struct controller *ctrl;
-	lock_kernel();
+	spin_lock(&event_thread);
 	daemonize("pciehpd_event");
-
-	unlock_kernel();
+	spin_unlock(&event_thread);
 
 	while (1) {
 		dbg("!!!!event_thread sleeping\n");
diff -uN /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/shpchp_ctrl.c /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/shpchp_ctrl.c
--- /usr/src/linux-2.6.15-rc7/drivers/pci/hotplug/shpchp_ctrl.c	2005-12-24 20:47:48.000000000 -0300
+++ /home/cneira/Linuxjanitoring/linux-janitorpatching/drivers/pci/hotplug/shpchp_ctrl.c	2006-01-09 00:30:06.000000000 -0300
@@ -32,6 +32,7 @@
 #include <linux/types.h>
 #include <linux/smp_lock.h>
 #include <linux/pci.h>
+#include <linux/spinlock.h>
 #include "../pci.h"
 #include "shpchp.h"
 
@@ -693,9 +694,9 @@
 static int event_thread(void* data)
 {
 	struct controller *ctrl;
-	lock_kernel();
+	spin_lock(&event_thread);
 	daemonize("shpchpd_event");
-	unlock_kernel();
+	spin_unlock(&event_thread);
 
 	while (1) {
 		dbg("!!!!event_thread sleeping\n");

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-09 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-09 11:33 [KJ] hotplug carlos neira
2006-01-09 15:11 ` Matthew Wilcox
2006-01-09 16:41 ` Alexey Dobriyan
2006-01-09 17:05 ` Greg KH
2006-01-09 17:32 ` Kristen Accardi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.