]> git.neil.brown.name Git - history.git/commitdiff
ia64: Rename McKinley to Itanium 2. Fix some compilation issues. Fix alignment
authorDavid Mosberger <davidm@wailua.hpl.hp.com>
Mon, 20 May 2002 01:51:06 +0000 (18:51 -0700)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Mon, 20 May 2002 01:51:06 +0000 (18:51 -0700)
of GOT section.

arch/ia64/Config.help
arch/ia64/config.in
arch/ia64/kernel/process.c
arch/ia64/vmlinux.lds.S
include/asm-ia64/kregs.h
include/asm-ia64/processor.h
include/asm-ia64/system.h

index 6819309d2017dd5e9e4775e43d0c59d8dd6e9757..744f6128aca3c6154d00b645ccb709b83e89e533 100644 (file)
@@ -400,7 +400,7 @@ CONFIG_ITANIUM
   Select your IA64 processor type.  The default is Intel Itanium.
 
 CONFIG_MCKINLEY
-  Select this to configure for a McKinley processor.
+  Select this to configure for an Itanium 2 (McKinley) processor.
 
 CONFIG_IA64_GENERIC
   This selects the system type of your hardware.  A "generic" kernel
index 00dae0f235b3674260af022a13be4ffb8cbb846b..e2bba0350958a3985789cdfb6d6e699791da7e02 100644 (file)
@@ -16,7 +16,7 @@ define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
 
 choice 'IA-64 processor type' \
        "Itanium                        CONFIG_ITANIUM \
-        McKinley                       CONFIG_MCKINLEY" Itanium
+        Itanium-2                      CONFIG_MCKINLEY" Itanium
 
 choice 'IA-64 system type'                                     \
        "generic                CONFIG_IA64_GENERIC             \
@@ -26,11 +26,18 @@ choice 'IA-64 system type'                                  \
         SGI-SN1                CONFIG_IA64_SGI_SN1             \
         SGI-SN2                CONFIG_IA64_SGI_SN2" generic
 
-choice 'Kernel page size'                                              \
+if [ "$CONFIG_ITANIUM" = "y" ]; then
+  choice 'Kernel page size'                                            \
+       "4KB                    CONFIG_IA64_PAGE_SIZE_4KB               \
+        8KB                    CONFIG_IA64_PAGE_SIZE_8KB               \
+        16KB                   CONFIG_IA64_PAGE_SIZE_16KB" 16KB
+else
+  choice 'Kernel page size'                                            \
        "4KB                    CONFIG_IA64_PAGE_SIZE_4KB               \
         8KB                    CONFIG_IA64_PAGE_SIZE_8KB               \
         16KB                   CONFIG_IA64_PAGE_SIZE_16KB              \
         64KB                   CONFIG_IA64_PAGE_SIZE_64KB" 16KB
+endif
 
 if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
   define_bool CONFIG_ACPI y
index abb43c7f2a5049c5b675ba83fd21a52a3816abd0..a0799a227999fa7076584d10ed6fa49998c40b7d 100644 (file)
@@ -199,8 +199,10 @@ ia64_save_extra (struct task_struct *task)
 # endif
 #endif
 
+#ifdef CONFIG_IA32_SUPPORT
        if (IS_IA32_PROCESS(ia64_task_regs(task)))
                ia32_save_state(task);
+#endif
 }
 
 void
@@ -218,8 +220,10 @@ ia64_load_extra (struct task_struct *task)
 # endif
 #endif
 
+#ifdef CONFIG_IA32_SUPPORT
        if (IS_IA32_PROCESS(ia64_task_regs(task)))
                ia32_load_state(task);
+#endif
 }
 
 /*
index 349ae209cff879da528de4ee7a80e51b8c757f42..019d1e79fc5f8a29999682f66f5f768a4850965d 100644 (file)
@@ -40,7 +40,8 @@ SECTIONS
 
   /* Read-only data */
 
-  __gp = ALIGN(16) + 0x200000; /* gp must be 16-byte aligned for exc. table */
+  . = ALIGN(16);
+  __gp = . + 0x200000; /* gp must be 16-byte aligned for exc. table */
 
   /* Global data */
   _data = .;
index d768cd6533de22a4c17aa5088b0b840352c3063b..66b7ea301de9a94797b96e052b67b18899ebcae6 100644 (file)
@@ -2,8 +2,8 @@
 #define _ASM_IA64_KREGS_H
 
 /*
- * Copyright (C) 2001 Hewlett-Packard Co
- * Copyright (C) 2001 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 2001-2002 Hewlett-Packard Co
+ *     David Mosberger-Tang <davidm@hpl.hp.com>
  */
 /*
  * This file defines the kernel register usage convention used by Linux/ia64.
 #define IA64_TR_PERCPU_DATA    1       /* dtr1: percpu data */
 #define IA64_TR_CURRENT_STACK  2       /* dtr2: maps kernel's memory- & register-stacks */
 
+/* Processor status register bits: */
+#define IA64_PSR_BE_BIT                1
+#define IA64_PSR_UP_BIT                2
+#define IA64_PSR_AC_BIT                3
+#define IA64_PSR_MFL_BIT       4
+#define IA64_PSR_MFH_BIT       5
+#define IA64_PSR_IC_BIT                13
+#define IA64_PSR_I_BIT         14
+#define IA64_PSR_PK_BIT                15
+#define IA64_PSR_DT_BIT                17
+#define IA64_PSR_DFL_BIT       18
+#define IA64_PSR_DFH_BIT       19
+#define IA64_PSR_SP_BIT                20
+#define IA64_PSR_PP_BIT                21
+#define IA64_PSR_DI_BIT                22
+#define IA64_PSR_SI_BIT                23
+#define IA64_PSR_DB_BIT                24
+#define IA64_PSR_LP_BIT                25
+#define IA64_PSR_TB_BIT                26
+#define IA64_PSR_RT_BIT                27
+/* The following are not affected by save_flags()/restore_flags(): */
+#define IA64_PSR_CPL0_BIT      32
+#define IA64_PSR_CPL1_BIT      33
+#define IA64_PSR_IS_BIT                34
+#define IA64_PSR_MC_BIT                35
+#define IA64_PSR_IT_BIT                36
+#define IA64_PSR_ID_BIT                37
+#define IA64_PSR_DA_BIT                38
+#define IA64_PSR_DD_BIT                39
+#define IA64_PSR_SS_BIT                40
+#define IA64_PSR_RI_BIT                41
+#define IA64_PSR_ED_BIT                43
+#define IA64_PSR_BN_BIT                44
+
+#define IA64_PSR_BE    (__IA64_UL(1) << IA64_PSR_BE_BIT)
+#define IA64_PSR_UP    (__IA64_UL(1) << IA64_PSR_UP_BIT)
+#define IA64_PSR_AC    (__IA64_UL(1) << IA64_PSR_AC_BIT)
+#define IA64_PSR_MFL   (__IA64_UL(1) << IA64_PSR_MFL_BIT)
+#define IA64_PSR_MFH   (__IA64_UL(1) << IA64_PSR_MFH_BIT)
+#define IA64_PSR_IC    (__IA64_UL(1) << IA64_PSR_IC_BIT)
+#define IA64_PSR_I     (__IA64_UL(1) << IA64_PSR_I_BIT)
+#define IA64_PSR_PK    (__IA64_UL(1) << IA64_PSR_PK_BIT)
+#define IA64_PSR_DT    (__IA64_UL(1) << IA64_PSR_DT_BIT)
+#define IA64_PSR_DFL   (__IA64_UL(1) << IA64_PSR_DFL_BIT)
+#define IA64_PSR_DFH   (__IA64_UL(1) << IA64_PSR_DFH_BIT)
+#define IA64_PSR_SP    (__IA64_UL(1) << IA64_PSR_SP_BIT)
+#define IA64_PSR_PP    (__IA64_UL(1) << IA64_PSR_PP_BIT)
+#define IA64_PSR_DI    (__IA64_UL(1) << IA64_PSR_DI_BIT)
+#define IA64_PSR_SI    (__IA64_UL(1) << IA64_PSR_SI_BIT)
+#define IA64_PSR_DB    (__IA64_UL(1) << IA64_PSR_DB_BIT)
+#define IA64_PSR_LP    (__IA64_UL(1) << IA64_PSR_LP_BIT)
+#define IA64_PSR_TB    (__IA64_UL(1) << IA64_PSR_TB_BIT)
+#define IA64_PSR_RT    (__IA64_UL(1) << IA64_PSR_RT_BIT)
+/* The following are not affected by save_flags()/restore_flags(): */
+#define IA64_PSR_IS    (__IA64_UL(1) << IA64_PSR_IS_BIT)
+#define IA64_PSR_MC    (__IA64_UL(1) << IA64_PSR_MC_BIT)
+#define IA64_PSR_IT    (__IA64_UL(1) << IA64_PSR_IT_BIT)
+#define IA64_PSR_ID    (__IA64_UL(1) << IA64_PSR_ID_BIT)
+#define IA64_PSR_DA    (__IA64_UL(1) << IA64_PSR_DA_BIT)
+#define IA64_PSR_DD    (__IA64_UL(1) << IA64_PSR_DD_BIT)
+#define IA64_PSR_SS    (__IA64_UL(1) << IA64_PSR_SS_BIT)
+#define IA64_PSR_RI    (__IA64_UL(3) << IA64_PSR_RI_BIT)
+#define IA64_PSR_ED    (__IA64_UL(1) << IA64_PSR_ED_BIT)
+#define IA64_PSR_BN    (__IA64_UL(1) << IA64_PSR_BN_BIT)
+
+/* User mask bits: */
+#define IA64_PSR_UM    (IA64_PSR_BE | IA64_PSR_UP | IA64_PSR_AC | IA64_PSR_MFL | IA64_PSR_MFH)
+
+/* Default Control Register */
+#define IA64_DCR_PP_BIT                 0      /* privileged performance monitor default */
+#define IA64_DCR_BE_BIT                 1      /* big-endian default */
+#define IA64_DCR_LC_BIT                 2      /* ia32 lock-check enable */
+#define IA64_DCR_DM_BIT                 8      /* defer TLB miss faults */
+#define IA64_DCR_DP_BIT                 9      /* defer page-not-present faults */
+#define IA64_DCR_DK_BIT                10      /* defer key miss faults */
+#define IA64_DCR_DX_BIT                11      /* defer key permission faults */
+#define IA64_DCR_DR_BIT                12      /* defer access right faults */
+#define IA64_DCR_DA_BIT                13      /* defer access bit faults */
+#define IA64_DCR_DD_BIT                14      /* defer debug faults */
+
+#define IA64_DCR_PP    (__IA64_UL(1) << IA64_DCR_PP_BIT)
+#define IA64_DCR_BE    (__IA64_UL(1) << IA64_DCR_BE_BIT)
+#define IA64_DCR_LC    (__IA64_UL(1) << IA64_DCR_LC_BIT)
+#define IA64_DCR_DM    (__IA64_UL(1) << IA64_DCR_DM_BIT)
+#define IA64_DCR_DP    (__IA64_UL(1) << IA64_DCR_DP_BIT)
+#define IA64_DCR_DK    (__IA64_UL(1) << IA64_DCR_DK_BIT)
+#define IA64_DCR_DX    (__IA64_UL(1) << IA64_DCR_DX_BIT)
+#define IA64_DCR_DR    (__IA64_UL(1) << IA64_DCR_DR_BIT)
+#define IA64_DCR_DA    (__IA64_UL(1) << IA64_DCR_DA_BIT)
+#define IA64_DCR_DD    (__IA64_UL(1) << IA64_DCR_DD_BIT)
+
+/* Interrupt Status Register */
+#define IA64_ISR_X_BIT         32      /* execute access */
+#define IA64_ISR_W_BIT         33      /* write access */
+#define IA64_ISR_R_BIT         34      /* read access */
+#define IA64_ISR_NA_BIT                35      /* non-access */
+#define IA64_ISR_SP_BIT                36      /* speculative load exception */
+#define IA64_ISR_RS_BIT                37      /* mandatory register-stack exception */
+#define IA64_ISR_IR_BIT                38      /* invalid register frame exception */
+#define IA64_ISR_CODE_MASK     0xf
+
+#define IA64_ISR_X     (__IA64_UL(1) << IA64_ISR_X_BIT)
+#define IA64_ISR_W     (__IA64_UL(1) << IA64_ISR_W_BIT)
+#define IA64_ISR_R     (__IA64_UL(1) << IA64_ISR_R_BIT)
+#define IA64_ISR_NA    (__IA64_UL(1) << IA64_ISR_NA_BIT)
+#define IA64_ISR_SP    (__IA64_UL(1) << IA64_ISR_SP_BIT)
+#define IA64_ISR_RS    (__IA64_UL(1) << IA64_ISR_RS_BIT)
+#define IA64_ISR_IR    (__IA64_UL(1) << IA64_ISR_IR_BIT)
+
+/* ISR code field for non-access instructions */
+#define IA64_ISR_CODE_TPA      0
+#define IA64_ISR_CODE_FC       1
+#define IA64_ISR_CODE_PROBE    2
+#define IA64_ISR_CODE_TAK      3
+#define IA64_ISR_CODE_LFETCH   4
+#define IA64_ISR_CODE_PROBEF   5
+
 #endif /* _ASM_IA64_kREGS_H */
index dac2135fcfd96b92f2293402b89498a66a4d2355..15692271eecbb876f690a198cd33e62ced1f81ad 100644 (file)
 #define MCA_bus 0
 #define MCA_bus__is_a_macro /* for versions in ksyms.c */
 
-/* Processor status register bits: */
-#define IA64_PSR_BE_BIT                1
-#define IA64_PSR_UP_BIT                2
-#define IA64_PSR_AC_BIT                3
-#define IA64_PSR_MFL_BIT       4
-#define IA64_PSR_MFH_BIT       5
-#define IA64_PSR_IC_BIT                13
-#define IA64_PSR_I_BIT         14
-#define IA64_PSR_PK_BIT                15
-#define IA64_PSR_DT_BIT                17
-#define IA64_PSR_DFL_BIT       18
-#define IA64_PSR_DFH_BIT       19
-#define IA64_PSR_SP_BIT                20
-#define IA64_PSR_PP_BIT                21
-#define IA64_PSR_DI_BIT                22
-#define IA64_PSR_SI_BIT                23
-#define IA64_PSR_DB_BIT                24
-#define IA64_PSR_LP_BIT                25
-#define IA64_PSR_TB_BIT                26
-#define IA64_PSR_RT_BIT                27
-/* The following are not affected by save_flags()/restore_flags(): */
-#define IA64_PSR_CPL0_BIT      32
-#define IA64_PSR_CPL1_BIT      33
-#define IA64_PSR_IS_BIT                34
-#define IA64_PSR_MC_BIT                35
-#define IA64_PSR_IT_BIT                36
-#define IA64_PSR_ID_BIT                37
-#define IA64_PSR_DA_BIT                38
-#define IA64_PSR_DD_BIT                39
-#define IA64_PSR_SS_BIT                40
-#define IA64_PSR_RI_BIT                41
-#define IA64_PSR_ED_BIT                43
-#define IA64_PSR_BN_BIT                44
-
-#define IA64_PSR_BE    (__IA64_UL(1) << IA64_PSR_BE_BIT)
-#define IA64_PSR_UP    (__IA64_UL(1) << IA64_PSR_UP_BIT)
-#define IA64_PSR_AC    (__IA64_UL(1) << IA64_PSR_AC_BIT)
-#define IA64_PSR_MFL   (__IA64_UL(1) << IA64_PSR_MFL_BIT)
-#define IA64_PSR_MFH   (__IA64_UL(1) << IA64_PSR_MFH_BIT)
-#define IA64_PSR_IC    (__IA64_UL(1) << IA64_PSR_IC_BIT)
-#define IA64_PSR_I     (__IA64_UL(1) << IA64_PSR_I_BIT)
-#define IA64_PSR_PK    (__IA64_UL(1) << IA64_PSR_PK_BIT)
-#define IA64_PSR_DT    (__IA64_UL(1) << IA64_PSR_DT_BIT)
-#define IA64_PSR_DFL   (__IA64_UL(1) << IA64_PSR_DFL_BIT)
-#define IA64_PSR_DFH   (__IA64_UL(1) << IA64_PSR_DFH_BIT)
-#define IA64_PSR_SP    (__IA64_UL(1) << IA64_PSR_SP_BIT)
-#define IA64_PSR_PP    (__IA64_UL(1) << IA64_PSR_PP_BIT)
-#define IA64_PSR_DI    (__IA64_UL(1) << IA64_PSR_DI_BIT)
-#define IA64_PSR_SI    (__IA64_UL(1) << IA64_PSR_SI_BIT)
-#define IA64_PSR_DB    (__IA64_UL(1) << IA64_PSR_DB_BIT)
-#define IA64_PSR_LP    (__IA64_UL(1) << IA64_PSR_LP_BIT)
-#define IA64_PSR_TB    (__IA64_UL(1) << IA64_PSR_TB_BIT)
-#define IA64_PSR_RT    (__IA64_UL(1) << IA64_PSR_RT_BIT)
-/* The following are not affected by save_flags()/restore_flags(): */
-#define IA64_PSR_IS    (__IA64_UL(1) << IA64_PSR_IS_BIT)
-#define IA64_PSR_MC    (__IA64_UL(1) << IA64_PSR_MC_BIT)
-#define IA64_PSR_IT    (__IA64_UL(1) << IA64_PSR_IT_BIT)
-#define IA64_PSR_ID    (__IA64_UL(1) << IA64_PSR_ID_BIT)
-#define IA64_PSR_DA    (__IA64_UL(1) << IA64_PSR_DA_BIT)
-#define IA64_PSR_DD    (__IA64_UL(1) << IA64_PSR_DD_BIT)
-#define IA64_PSR_SS    (__IA64_UL(1) << IA64_PSR_SS_BIT)
-#define IA64_PSR_RI    (__IA64_UL(3) << IA64_PSR_RI_BIT)
-#define IA64_PSR_ED    (__IA64_UL(1) << IA64_PSR_ED_BIT)
-#define IA64_PSR_BN    (__IA64_UL(1) << IA64_PSR_BN_BIT)
-
-/* User mask bits: */
-#define IA64_PSR_UM    (IA64_PSR_BE | IA64_PSR_UP | IA64_PSR_AC | IA64_PSR_MFL | IA64_PSR_MFH)
-
-/* Default Control Register */
-#define IA64_DCR_PP_BIT                 0      /* privileged performance monitor default */
-#define IA64_DCR_BE_BIT                 1      /* big-endian default */
-#define IA64_DCR_LC_BIT                 2      /* ia32 lock-check enable */
-#define IA64_DCR_DM_BIT                 8      /* defer TLB miss faults */
-#define IA64_DCR_DP_BIT                 9      /* defer page-not-present faults */
-#define IA64_DCR_DK_BIT                10      /* defer key miss faults */
-#define IA64_DCR_DX_BIT                11      /* defer key permission faults */
-#define IA64_DCR_DR_BIT                12      /* defer access right faults */
-#define IA64_DCR_DA_BIT                13      /* defer access bit faults */
-#define IA64_DCR_DD_BIT                14      /* defer debug faults */
-
-#define IA64_DCR_PP    (__IA64_UL(1) << IA64_DCR_PP_BIT)
-#define IA64_DCR_BE    (__IA64_UL(1) << IA64_DCR_BE_BIT)
-#define IA64_DCR_LC    (__IA64_UL(1) << IA64_DCR_LC_BIT)
-#define IA64_DCR_DM    (__IA64_UL(1) << IA64_DCR_DM_BIT)
-#define IA64_DCR_DP    (__IA64_UL(1) << IA64_DCR_DP_BIT)
-#define IA64_DCR_DK    (__IA64_UL(1) << IA64_DCR_DK_BIT)
-#define IA64_DCR_DX    (__IA64_UL(1) << IA64_DCR_DX_BIT)
-#define IA64_DCR_DR    (__IA64_UL(1) << IA64_DCR_DR_BIT)
-#define IA64_DCR_DA    (__IA64_UL(1) << IA64_DCR_DA_BIT)
-#define IA64_DCR_DD    (__IA64_UL(1) << IA64_DCR_DD_BIT)
-
-/* Interrupt Status Register */
-#define IA64_ISR_X_BIT         32      /* execute access */
-#define IA64_ISR_W_BIT         33      /* write access */
-#define IA64_ISR_R_BIT         34      /* read access */
-#define IA64_ISR_NA_BIT                35      /* non-access */
-#define IA64_ISR_SP_BIT                36      /* speculative load exception */
-#define IA64_ISR_RS_BIT                37      /* mandatory register-stack exception */
-#define IA64_ISR_IR_BIT                38      /* invalid register frame exception */
-#define IA64_ISR_CODE_MASK     0xf
-
-#define IA64_ISR_X     (__IA64_UL(1) << IA64_ISR_X_BIT)
-#define IA64_ISR_W     (__IA64_UL(1) << IA64_ISR_W_BIT)
-#define IA64_ISR_R     (__IA64_UL(1) << IA64_ISR_R_BIT)
-#define IA64_ISR_NA    (__IA64_UL(1) << IA64_ISR_NA_BIT)
-#define IA64_ISR_SP    (__IA64_UL(1) << IA64_ISR_SP_BIT)
-#define IA64_ISR_RS    (__IA64_UL(1) << IA64_ISR_RS_BIT)
-#define IA64_ISR_IR    (__IA64_UL(1) << IA64_ISR_IR_BIT)
-
-/* ISR code field for non-access instructions */
-#define IA64_ISR_CODE_TPA      0
-#define IA64_ISR_CODE_FC       1
-#define IA64_ISR_CODE_PROBE    2
-#define IA64_ISR_CODE_TAK      3
-#define IA64_ISR_CODE_LFETCH   4
-#define IA64_ISR_CODE_PROBEF   5
-
 #define IA64_THREAD_FPH_VALID  (__IA64_UL(1) << 0)     /* floating-point high state valid? */
 #define IA64_THREAD_DBG_VALID  (__IA64_UL(1) << 1)     /* debug registers valid? */
 #define IA64_THREAD_PM_VALID   (__IA64_UL(1) << 2)     /* performance registers valid? */
index 6d75cf2061fad74758fc4b362f62c4bf9f547191..088e84a1b4dff888b057a580e85cb15c88a87c08 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include <linux/config.h>
 
+#include <asm/kregs.h>
 #include <asm/page.h>
 
 #define KERNEL_START           (PAGE_OFFSET + 68*1024*1024)
@@ -135,20 +136,21 @@ do {                                                                                      \
        }                                                                               \
 } while (0)
 
-# define local_irq_restore(x)                                           \
-do {                                                                    \
-       unsigned long ip, old_psr, psr = (x);                                           \
-                                                                                       \
-       __asm__ __volatile__ ("mov %0=psr;"                                             \
-                             "cmp.ne p6,p7=%1,r0;;"                                    \
-                             "(p6) ssm psr.i;"                                         \
-                             "(p7) rsm psr.i;;"                                        \
-                             "srlz.d"                                                  \
-                             : "=&r" (old_psr) : "r"((psr) & IA64_PSR_I) : "memory");  \
-       if ((old_psr & IA64_PSR_I) && !(psr & IA64_PSR_I)) {                            \
-               __asm__ ("mov %0=ip" : "=r"(ip));                                       \
-               last_cli_ip = ip;                                                       \
-       }                                                                               \
+# define local_irq_restore(x)                                                  \
+do {                                                                           \
+       unsigned long ip, old_psr, psr = (x);                                   \
+                                                                               \
+       __asm__ __volatile__ ("mov %0=psr;"                                     \
+                             "cmp.ne p6,p7=%1,r0;;"                            \
+                             "(p6) ssm psr.i;"                                 \
+                             "(p7) rsm psr.i;;"                                \
+                             "srlz.d"                                          \
+                             : "=&r" (old_psr) : "r"((psr) & IA64_PSR_I)       \
+                             : "p6", "p7", "memory");                          \
+       if ((old_psr & IA64_PSR_I) && !(psr & IA64_PSR_I)) {                    \
+               __asm__ ("mov %0=ip" : "=r"(ip));                               \
+               last_cli_ip = ip;                                               \
+       }                                                                       \
 } while (0)
 
 #else /* !CONFIG_IA64_DEBUG_IRQ */
@@ -157,11 +159,12 @@ do {                                                                       \
                                                      : "=r" (x) :: "memory")
 # define local_irq_disable()   __asm__ __volatile__ (";; rsm psr.i;;" ::: "memory")
 /* (potentially) setting psr.i requires data serialization: */
-# define local_irq_restore(x)  __asm__ __volatile__ ("cmp.ne p6,p7=%0,r0;;"                    \
-                                                     "(p6) ssm psr.i;"                         \
-                                                     "(p7) rsm psr.i;;"                        \
-                                                     "srlz.d"                                  \
-                                                     :: "r"((x) & IA64_PSR_I) : "memory")
+# define local_irq_restore(x)  __asm__ __volatile__ ("cmp.ne p6,p7=%0,r0;;"    \
+                                                     "(p6) ssm psr.i;"         \
+                                                     "(p7) rsm psr.i;;"        \
+                                                     "srlz.d"                  \
+                                                     :: "r"((x) & IA64_PSR_I)  \
+                                                     : "p6", "p7", "memory")
 #endif /* !CONFIG_IA64_DEBUG_IRQ */
 
 #define local_irq_enable()     __asm__ __volatile__ (";; ssm psr.i;; srlz.d" ::: "memory")