All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH 20/20] mips/bcm1250_tbprof: remove
@ 2005-02-02 23:08 ` Nishanth Aravamudan
  0 siblings, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2005-02-02 23:08 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, kernel-janitors

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

Hello,

Please consider applying.

Description: Remove deprecated interruptible_sleep_on() function call
and replace with direct wait-queue usage.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc2-kj-v/arch/mips/sibyte/sb1250/bcm1250_tbprof.c	2005-01-24 09:28:12.000000000 -0800
+++ 2.6.11-rc2-kj/arch/mips/sibyte/sb1250/bcm1250_tbprof.c	2005-02-02 15:07:08.000000000 -0800
@@ -28,6 +28,7 @@
 #include <linux/fs.h>
 #include <linux/errno.h>
 #include <linux/reboot.h>
+#include <linux/wait.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/sibyte/sb1250.h>
@@ -227,6 +228,7 @@ int sbprof_zbprof_start(struct file *fil
 
 int sbprof_zbprof_stop(void)
 {
+	DEFINE_WAIT(wait);
 	DBG(printk(DEVNAME ": stopping\n"));
 
 	if (sbp.tb_enable) {
@@ -236,7 +238,9 @@ int sbprof_zbprof_stop(void)
 		   this sleep happens. */
 		if (sbp.tb_armed) {
 			DBG(printk(DEVNAME ": wait for disarm\n"));
-			interruptible_sleep_on(&sbp.tb_sync);
+			prepare_to_wait(&sbp.tb_sync, &wait, TASK_INTERRUPTIBLE);
+			schedule();
+			finish_wait(&sbp.tb_sync, &wait);
 			DBG(printk(DEVNAME ": disarm complete\n"));
 		}
 		free_irq(K_INT_TRACE_FREEZE, &sbp);
@@ -344,7 +348,10 @@ static int sbprof_tb_ioctl(struct inode 
 		error = sbprof_zbprof_stop();
 		break;
 	case SBPROF_ZBWAITFULL:
-		interruptible_sleep_on(&sbp.tb_read);
+		DEFINE_WAIT(wait);
+		prepare_to_wait(&sbp.tb_read, &wait, TASK_INTERRUPTIBLE);
+		schedule();
+		finish_wait(&sbp.tb_read, &wait);
 		/* XXXKW check if interrupted? */
 		return put_user(TB_FULL, (int *) arg);
 	default:

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

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

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

* [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage
@ 2005-02-02 23:08 ` Nishanth Aravamudan
  0 siblings, 0 replies; 5+ messages in thread
From: Nishanth Aravamudan @ 2005-02-02 23:08 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, kernel-janitors

Hello,

Please consider applying.

Description: Remove deprecated interruptible_sleep_on() function call
and replace with direct wait-queue usage.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc2-kj-v/arch/mips/sibyte/sb1250/bcm1250_tbprof.c	2005-01-24 09:28:12.000000000 -0800
+++ 2.6.11-rc2-kj/arch/mips/sibyte/sb1250/bcm1250_tbprof.c	2005-02-02 15:07:08.000000000 -0800
@@ -28,6 +28,7 @@
 #include <linux/fs.h>
 #include <linux/errno.h>
 #include <linux/reboot.h>
+#include <linux/wait.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/sibyte/sb1250.h>
@@ -227,6 +228,7 @@ int sbprof_zbprof_start(struct file *fil
 
 int sbprof_zbprof_stop(void)
 {
+	DEFINE_WAIT(wait);
 	DBG(printk(DEVNAME ": stopping\n"));
 
 	if (sbp.tb_enable) {
@@ -236,7 +238,9 @@ int sbprof_zbprof_stop(void)
 		   this sleep happens. */
 		if (sbp.tb_armed) {
 			DBG(printk(DEVNAME ": wait for disarm\n"));
-			interruptible_sleep_on(&sbp.tb_sync);
+			prepare_to_wait(&sbp.tb_sync, &wait, TASK_INTERRUPTIBLE);
+			schedule();
+			finish_wait(&sbp.tb_sync, &wait);
 			DBG(printk(DEVNAME ": disarm complete\n"));
 		}
 		free_irq(K_INT_TRACE_FREEZE, &sbp);
@@ -344,7 +348,10 @@ static int sbprof_tb_ioctl(struct inode 
 		error = sbprof_zbprof_stop();
 		break;
 	case SBPROF_ZBWAITFULL:
-		interruptible_sleep_on(&sbp.tb_read);
+		DEFINE_WAIT(wait);
+		prepare_to_wait(&sbp.tb_read, &wait, TASK_INTERRUPTIBLE);
+		schedule();
+		finish_wait(&sbp.tb_read, &wait);
 		/* XXXKW check if interrupted? */
 		return put_user(TB_FULL, (int *) arg);
 	default:

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

* [KJ] Re: [PATCH 20/20] mips/bcm1250_tbprof: remove
  2005-02-02 23:08 ` [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage Nishanth Aravamudan
@ 2005-02-03 13:38   ` Ralf Baechle
  -1 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2005-02-03 13:38 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: linux-mips, kernel-janitors

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

On Wed, Feb 02, 2005 at 03:08:53PM -0800, Nishanth Aravamudan wrote:

> Please consider applying.
> 
> Description: Remove deprecated interruptible_sleep_on() function call
> and replace with direct wait-queue usage.

Thanks,

  Ralf

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

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

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

* Re: [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage
@ 2005-02-03 13:38   ` Ralf Baechle
  0 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2005-02-03 13:38 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: linux-mips, kernel-janitors

On Wed, Feb 02, 2005 at 03:08:53PM -0800, Nishanth Aravamudan wrote:

> Please consider applying.
> 
> Description: Remove deprecated interruptible_sleep_on() function call
> and replace with direct wait-queue usage.

Thanks,

  Ralf

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

* Re: [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage
  2005-02-03 13:38   ` [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage Ralf Baechle
  (?)
@ 2005-02-03 15:08   ` Maciej W. Rozycki
  -1 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2005-02-03 15:08 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

On Thu, 3 Feb 2005, Ralf Baechle wrote:

> > Description: Remove deprecated interruptible_sleep_on() function call
> > and replace with direct wait-queue usage.
> 
> Thanks,

 Except that should rather use wait_event_interruptible().

  Maciej

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

end of thread, other threads:[~2005-02-03 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-02 23:08 [KJ] [PATCH 20/20] mips/bcm1250_tbprof: remove Nishanth Aravamudan
2005-02-02 23:08 ` [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage Nishanth Aravamudan
2005-02-03 13:38 ` [KJ] Re: [PATCH 20/20] mips/bcm1250_tbprof: remove Ralf Baechle
2005-02-03 13:38   ` [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage Ralf Baechle
2005-02-03 15:08   ` Maciej W. Rozycki

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.