diff options
Diffstat (limited to 'arch/ia64/include/asm/system.h')
-rw-r--r-- | arch/ia64/include/asm/system.h | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/arch/ia64/include/asm/system.h b/arch/ia64/include/asm/system.h index dd028f2b13b3..6cca30705d50 100644 --- a/arch/ia64/include/asm/system.h +++ b/arch/ia64/include/asm/system.h | |||
@@ -107,87 +107,11 @@ extern struct ia64_boot_param { | |||
107 | */ | 107 | */ |
108 | #define set_mb(var, value) do { (var) = (value); mb(); } while (0) | 108 | #define set_mb(var, value) do { (var) = (value); mb(); } while (0) |
109 | 109 | ||
110 | #define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */ | ||
111 | |||
112 | /* | 110 | /* |
113 | * The group barrier in front of the rsm & ssm are necessary to ensure | 111 | * The group barrier in front of the rsm & ssm are necessary to ensure |
114 | * that none of the previous instructions in the same group are | 112 | * that none of the previous instructions in the same group are |
115 | * affected by the rsm/ssm. | 113 | * affected by the rsm/ssm. |
116 | */ | 114 | */ |
117 | /* For spinlocks etc */ | ||
118 | |||
119 | /* | ||
120 | * - clearing psr.i is implicitly serialized (visible by next insn) | ||
121 | * - setting psr.i requires data serialization | ||
122 | * - we need a stop-bit before reading PSR because we sometimes | ||
123 | * write a floating-point register right before reading the PSR | ||
124 | * and that writes to PSR.mfl | ||
125 | */ | ||
126 | #ifdef CONFIG_PARAVIRT | ||
127 | #define __local_save_flags() ia64_get_psr_i() | ||
128 | #else | ||
129 | #define __local_save_flags() ia64_getreg(_IA64_REG_PSR) | ||
130 | #endif | ||
131 | |||
132 | #define __local_irq_save(x) \ | ||
133 | do { \ | ||
134 | ia64_stop(); \ | ||
135 | (x) = __local_save_flags(); \ | ||
136 | ia64_stop(); \ | ||
137 | ia64_rsm(IA64_PSR_I); \ | ||
138 | } while (0) | ||
139 | |||
140 | #define __local_irq_disable() \ | ||
141 | do { \ | ||
142 | ia64_stop(); \ | ||
143 | ia64_rsm(IA64_PSR_I); \ | ||
144 | } while (0) | ||
145 | |||
146 | #define __local_irq_restore(x) ia64_intrin_local_irq_restore((x) & IA64_PSR_I) | ||
147 | |||
148 | #ifdef CONFIG_IA64_DEBUG_IRQ | ||
149 | |||
150 | extern unsigned long last_cli_ip; | ||
151 | |||
152 | # define __save_ip() last_cli_ip = ia64_getreg(_IA64_REG_IP) | ||
153 | |||
154 | # define local_irq_save(x) \ | ||
155 | do { \ | ||
156 | unsigned long __psr; \ | ||
157 | \ | ||
158 | __local_irq_save(__psr); \ | ||
159 | if (__psr & IA64_PSR_I) \ | ||
160 | __save_ip(); \ | ||
161 | (x) = __psr; \ | ||
162 | } while (0) | ||
163 | |||
164 | # define local_irq_disable() do { unsigned long __x; local_irq_save(__x); } while (0) | ||
165 | |||
166 | # define local_irq_restore(x) \ | ||
167 | do { \ | ||
168 | unsigned long __old_psr, __psr = (x); \ | ||
169 | \ | ||
170 | local_save_flags(__old_psr); \ | ||
171 | __local_irq_restore(__psr); \ | ||
172 | if ((__old_psr & IA64_PSR_I) && !(__psr & IA64_PSR_I)) \ | ||
173 | __save_ip(); \ | ||
174 | } while (0) | ||
175 | |||
176 | #else /* !CONFIG_IA64_DEBUG_IRQ */ | ||
177 | # define local_irq_save(x) __local_irq_save(x) | ||
178 | # define local_irq_disable() __local_irq_disable() | ||
179 | # define local_irq_restore(x) __local_irq_restore(x) | ||
180 | #endif /* !CONFIG_IA64_DEBUG_IRQ */ | ||
181 | |||
182 | #define local_irq_enable() ({ ia64_stop(); ia64_ssm(IA64_PSR_I); ia64_srlz_d(); }) | ||
183 | #define local_save_flags(flags) ({ ia64_stop(); (flags) = __local_save_flags(); }) | ||
184 | |||
185 | #define irqs_disabled() \ | ||
186 | ({ \ | ||
187 | unsigned long __ia64_id_flags; \ | ||
188 | local_save_flags(__ia64_id_flags); \ | ||
189 | (__ia64_id_flags & IA64_PSR_I) == 0; \ | ||
190 | }) | ||
191 | 115 | ||
192 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
193 | 117 | ||