public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [patch] 2.6.0 MCA TLB error recovery
Date: Sat, 20 Dec 2003 02:56:38 +0000	[thread overview]
Message-ID: <marc-linux-ia64-107188914431904@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-107181047921141@msgid-missing>

On Fri, 19 Dec 2003 16:32:14 -0800, 
David Mosberger <davidm@napali.hpl.hp.com> wrote:
>>>>>> On Sat, 20 Dec 2003 11:26:12 +1100, Keith Owens <kaos@sgi.com> said:
>
>  Keith> David, please apply the first mca/salinfo patch to your tree
>  Keith> (Forward port the recent changes to pal.h, sal.h, mca.h,
>  Keith> salinfo.c and mca.c from 2.4.23-rc2 to 2.6.0-test9), then I
>  Keith> will do a 2.6 version of the second patch over the top.
>
>Whoops, too late.  I did see the preempt comments and figured you'll
>fix that once it's in the tree.  Can you go from what's in the bk
>trees now (give me a minute or two, I'm just pushing things to
>to-linus-2.5 and linux-ia64-2.5 will be next).

Convert cmc deadlock avoidance patch from 2.4 to 2.6.

--- 2.6.0/arch/ia64/kernel/mca.c.orig	Sat Dec 20 13:33:30 2003
+++ 2.6.0/arch/ia64/kernel/mca.c	Sat Dec 20 13:52:10 2003
@@ -55,7 +55,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/smp.h>
-#include <linux/tqueue.h>
+#include <linux/workqueue.h>
 
 #include <asm/delay.h>
 #include <asm/machvec.h>
@@ -158,8 +158,6 @@
 
 extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size);
 
-static struct tq_struct	cmc_disable_tq, cmc_enable_tq;
-
 /*
  *  ia64_mca_log_sal_error_record
  *
@@ -622,14 +620,11 @@
  *
  * Called via keventd (smp_call_function() is not safe in interrupt context) to
  * disable the cmc interrupt vector.
- *
- * Note: needs preempt_disable() if you apply the preempt patch to 2.4.
  */
 static void
 ia64_mca_cmc_vector_disable_keventd(void *unused)
 {
-	ia64_mca_cmc_vector_disable(NULL);
-	smp_call_function(ia64_mca_cmc_vector_disable, NULL, 1, 0);
+	on_each_cpu(ia64_mca_cmc_vector_disable, NULL, 1, 0);
 }
 
 /*
@@ -637,14 +632,11 @@
  *
  * Called via keventd (smp_call_function() is not safe in interrupt context) to
  * enable the cmc interrupt vector.
- *
- * Note: needs preempt_disable() if you apply the preempt patch to 2.4.
  */
 static void
 ia64_mca_cmc_vector_enable_keventd(void *unused)
 {
-	smp_call_function(ia64_mca_cmc_vector_enable, NULL, 1, 0);
-	ia64_mca_cmc_vector_enable(NULL);
+	on_each_cpu(ia64_mca_cmc_vector_enable, NULL, 1, 0);
 }
 
 /*
@@ -680,9 +672,6 @@
 
 	IA64_MCA_DEBUG("ia64_mca_init: begin\n");
 
-	INIT_TQUEUE(&cmc_disable_tq, ia64_mca_cmc_vector_disable_keventd, NULL);
-	INIT_TQUEUE(&cmc_enable_tq, ia64_mca_cmc_vector_enable_keventd, NULL);
-
 	/* initialize recovery success indicator */
 	ia64_os_mca_recovery_successful = 0;
 
@@ -1055,6 +1044,9 @@
 	ia64_return_to_sal_check();
 }
 
+static DECLARE_WORK(cmc_disable_work, ia64_mca_cmc_vector_disable_keventd, NULL);
+static DECLARE_WORK(cmc_enable_work, ia64_mca_cmc_vector_enable_keventd, NULL);
+
 /*
  * ia64_mca_cmc_int_handler
  *
@@ -1101,7 +1093,7 @@
 
 			cmc_polling_enabled = 1;
 			spin_unlock(&cmc_history_lock);
-			schedule_task(&cmc_disable_tq);
+			schedule_work(&cmc_disable_work);
 
 			/*
 			 * Corrected errors will still be corrected, but
@@ -1196,7 +1188,7 @@
 		if (start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC)) {
 
 			printk(KERN_WARNING "%s: Returning to interrupt driven CMC handler\n", __FUNCTION__);
-			schedule_task(&cmc_enable_tq);
+			schedule_work(&cmc_enable_work);
 			cmc_polling_enabled = 0;
 
 		} else {


  parent reply	other threads:[~2003-12-20  2:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-19  5:06 [patch] 2.6.0 MCA TLB error recovery Keith Owens
2003-12-19 18:07 ` Luck, Tony
2003-12-19 23:22 ` David Mosberger
2003-12-20  0:03 ` Luck, Tony
2003-12-20  0:04 ` Luck, Tony
2003-12-20  0:26 ` Keith Owens
2003-12-20  0:32 ` David Mosberger
2003-12-20  2:56 ` Keith Owens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-18 23:37 Luck, Tony

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=marc-linux-ia64-107188914431904@msgid-missing \
    --to=kaos@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /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