patch-2.4.21 linux-2.4.21/include/asm-ia64/system.h
Next file: linux-2.4.21/include/asm-ia64/unistd.h
Previous file: linux-2.4.21/include/asm-ia64/sn/xtalk/xwidget.h
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
2003-06-13 07:51:38.000000000 -0700
- Orig file:
linux-2.4.20/include/asm-ia64/system.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/include/asm-ia64/system.h linux-2.4.21/include/asm-ia64/system.h
@@ -122,7 +122,7 @@
unsigned long ip, psr; \
\
__asm__ __volatile__ ("mov %0=psr;; rsm psr.i;;" : "=r" (psr) :: "memory"); \
- if (psr & (1UL << 14)) { \
+ if (psr & IA64_PSR_I) { \
__asm__ ("mov %0=ip" : "=r"(ip)); \
last_cli_ip = ip; \
} \
@@ -134,12 +134,23 @@
unsigned long ip, psr; \
\
__asm__ __volatile__ ("mov %0=psr;; rsm psr.i;;" : "=r" (psr) :: "memory"); \
- if (psr & (1UL << 14)) { \
+ if (psr & IA64_PSR_I) { \
__asm__ ("mov %0=ip" : "=r"(ip)); \
last_cli_ip = ip; \
} \
} while (0)
+# define local_irq_set(x) \
+do { \
+ unsigned long psr; \
+ \
+ __asm__ __volatile__ ("mov %0=psr;;" \
+ "ssm psr.i;;" \
+ "srlz.d" \
+ : "=r" (psr) :: "memory"); \
+ (x) = psr; \
+} while (0)
+
# define local_irq_restore(x) \
do { \
unsigned long ip, old_psr, psr = (x); \
@@ -148,7 +159,7 @@
"cmp.ne p6,p7=%1,r0;;" \
"(p6) ssm psr.i;" \
"(p7) rsm psr.i;;" \
- "srlz.d" \
+ "(p6) srlz.d" \
: "=&r" (old_psr) : "r"((psr) & IA64_PSR_I) \
: "p6", "p7", "memory"); \
if ((old_psr & IA64_PSR_I) && !(psr & IA64_PSR_I)) { \
@@ -163,6 +174,10 @@
: "=r" (x) :: "memory")
# define local_irq_disable() __asm__ __volatile__ (";; rsm psr.i;;" ::: "memory")
/* (potentially) setting psr.i requires data serialization: */
+# define local_irq_set(x) __asm__ __volatile__ ("mov %0=psr;;" \
+ "ssm psr.i;;" \
+ "srlz.d" \
+ : "=r" (x) :: "memory")
# define local_irq_restore(x) __asm__ __volatile__ ("cmp.ne p6,p7=%0,r0;;" \
"(p6) ssm psr.i;" \
"(p7) rsm psr.i;;" \
@@ -176,7 +191,9 @@
#define __cli() local_irq_disable ()
#define __save_flags(flags) __asm__ __volatile__ ("mov %0=psr" : "=r" (flags) :: "memory")
#define __save_and_cli(flags) local_irq_save(flags)
+#define __save_and_sti(flags) local_irq_set(flags)
#define save_and_cli(flags) __save_and_cli(flags)
+#define save_and_sti(flags) __save_and_sti(flags)
#define __sti() local_irq_enable ()
#define __restore_flags(flags) local_irq_restore(flags)
@@ -384,8 +401,8 @@
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)
+#ifdef CONFIG_PERFMON
+# define PERFMON_IS_SYSWIDE() (local_cpu_data->pfm_syst_info & 0x1)
#else
# define PERFMON_IS_SYSWIDE() (0)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)