public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Update to CMC/CPE polling
@ 2003-08-05 16:13 Alex Williamson
  2003-08-08 18:40 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2003-08-05 16:13 UTC (permalink / raw)
  To: linux-ia64

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


    Based on the feedback from Tony, here's the patch that flips
around the clearing of cmc_polling_enabled.  This is based on
what's currently in to-linus-2.5, but applies on 2.4.21 as well.
Bjorn, I've also attached the diff for the name change David
recommended.  Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab

[-- Attachment #2: cmc_cpe_update.diff --]
[-- Type: text/plain, Size: 681 bytes --]

--- to-linus-2.5/arch/ia64/kernel/mca.c~	2003-08-05 09:03:02.000000000 -0600
+++ to-linus-2.5/arch/ia64/kernel/mca.c	2003-08-05 09:05:03.000000000 -0600
@@ -1149,13 +1149,19 @@
 
 			printk(KERN_WARNING "%s: Returning to interrupt driven CMC handler\n", __FUNCTION__);
 
-			cmc_polling_enabled = 0;
 			/*
 			 * The cmc interrupt handler enabled irqs, so
 			 * this can't deadlock.
 			 */
 			smp_call_function(ia64_mca_cmc_vector_enable, NULL, 1, 0);
+
+			/*
+			 * Turn off interrupts before re-enabling the
+			 * cmc vector locally.  Make sure we get out.
+			 */
+			local_irq_disable();
 			ia64_mca_cmc_vector_enable(NULL);
+			cmc_polling_enabled = 0;
 
 		} else {
 

[-- Attachment #3: sal_call_reentrant.diff --]
[-- Type: text/plain, Size: 1349 bytes --]

--- linux-2.4.21/include/asm-ia64/sal.h~	2003-08-05 09:22:35.000000000 -0600
+++ linux-2.4.21/include/asm-ia64/sal.h	2003-08-05 09:24:22.000000000 -0600
@@ -56,7 +56,7 @@
 	ia64_load_scratch_fpregs(__ia64_scn_fr);	\
 } while (0)
 
-# define SAL_CALL_SAFE(result,args...) do {		\
+# define SAL_CALL_REENTRANT(result,args...) do {	\
 	struct ia64_fpreg __ia64_scs_fr[6];		\
 	ia64_save_scratch_fpregs(__ia64_scs_fr);	\
 	__SAL_CALL(result, args);			\
@@ -665,7 +665,7 @@
 ia64_sal_clear_state_info (u64 sal_info_type)
 {
 	struct ia64_sal_retval isrv;
-	SAL_CALL_SAFE(isrv, SAL_CLEAR_STATE_INFO, sal_info_type, 0,
+	SAL_CALL_REENTRANT(isrv, SAL_CLEAR_STATE_INFO, sal_info_type, 0,
 	              0, 0, 0, 0, 0);
 	return isrv.status;
 }
@@ -678,7 +678,7 @@
 ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info)
 {
 	struct ia64_sal_retval isrv;
-	SAL_CALL_SAFE(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
+	SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
 	              sal_info, 0, 0, 0, 0);
 	if (isrv.status)
 		return 0;
@@ -694,7 +694,7 @@
 ia64_sal_get_state_info_size (u64 sal_info_type)
 {
 	struct ia64_sal_retval isrv;
-	SAL_CALL_SAFE(isrv, SAL_GET_STATE_INFO_SIZE, sal_info_type, 0,
+	SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO_SIZE, sal_info_type, 0,
 	              0, 0, 0, 0, 0);
 	if (isrv.status)
 		return 0;

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

* Re: [PATCH] Update to CMC/CPE polling
  2003-08-05 16:13 [PATCH] Update to CMC/CPE polling Alex Williamson
@ 2003-08-08 18:40 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2003-08-08 18:40 UTC (permalink / raw)
  To: linux-ia64

On Tuesday 05 August 2003 10:13 am, Alex Williamson wrote:
>     Based on the feedback from Tony, here's the patch that flips
> around the clearing of cmc_polling_enabled.  This is based on
> what's currently in to-linus-2.5, but applies on 2.4.21 as well.
> Bjorn, I've also attached the diff for the name change David
> recommended.  Thanks,

I applied both patches for 2.4.

Bjorn


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

end of thread, other threads:[~2003-08-08 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-05 16:13 [PATCH] Update to CMC/CPE polling Alex Williamson
2003-08-08 18:40 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox