patch-2.4.19 linux-2.4.19/include/asm-ia64/system.h

Next file: linux-2.4.19/include/asm-ia64/unistd.h
Previous file: linux-2.4.19/include/asm-ia64/spinlock.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/include/asm-ia64/system.h linux-2.4.19/include/asm-ia64/system.h
@@ -7,8 +7,8 @@
  * on information published in the Processor Abstraction Layer
  * and the System Abstraction Layer manual.
  *
- * Copyright (C) 1998-2001 Hewlett-Packard Co
- * Copyright (C) 1998-2001 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2002 Hewlett-Packard Co
+ *	David Mosberger-Tang <davidm@hpl.hp.com>
  * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>
  * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>
  */
@@ -232,7 +232,7 @@
 		_tmp = __bad_increment_for_ia64_fetch_and_add();		\
 		break;								\
 	}									\
-	(__typeof__(*v)) (_tmp + (i));	/* return new value */			\
+	(__typeof__(*(v))) (_tmp + (i));	/* return new value */		\
 })
 
 /*
@@ -378,12 +378,18 @@
 extern void ia64_save_extra (struct task_struct *task);
 extern void ia64_load_extra (struct task_struct *task);
 
+#if defined(CONFIG_SMP) && defined(CONFIG_PERFMON)
+# define PERFMON_IS_SYSWIDE() (local_cpu_data->pfm_syst_wide != 0)
+#else
+# define PERFMON_IS_SYSWIDE() (0)
+#endif
+
 #define __switch_to(prev,next,last) do {						\
 	if (((prev)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID))	\
-	    || IS_IA32_PROCESS(ia64_task_regs(prev)))					\
+	    || IS_IA32_PROCESS(ia64_task_regs(prev)) || PERFMON_IS_SYSWIDE())	\
 		ia64_save_extra(prev);							\
 	if (((next)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID))	\
-	    || IS_IA32_PROCESS(ia64_task_regs(next)))					\
+	    || IS_IA32_PROCESS(ia64_task_regs(next)) || PERFMON_IS_SYSWIDE())	\
 		ia64_load_extra(next);							\
 	(last) = ia64_switch_to((next));						\
 } while (0)
@@ -405,10 +411,6 @@
 	ia64_psr(ia64_task_regs(prev))->dfh = 1;				\
 	__switch_to(prev,next,last);						\
   } while (0)
-
-/* Return true if this CPU can call the console drivers in printk() */
-#define arch_consoles_callable() (cpu_online_map & (1UL << smp_processor_id()))
-
 #else
 # define switch_to(prev,next,last) do {						\
 	ia64_psr(ia64_task_regs(next))->dfh = (ia64_get_fpu_owner() != (next));	\

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)