.. | .. |
---|
241 | 241 | #define get_cpu() ({ preempt_disable(); __smp_processor_id(); }) |
---|
242 | 242 | #define put_cpu() preempt_enable() |
---|
243 | 243 | |
---|
| 244 | +#ifdef CONFIG_IRQ_PIPELINE |
---|
| 245 | +#define hard_get_cpu(flags) ({ \ |
---|
| 246 | + (flags) = hard_preempt_disable(); \ |
---|
| 247 | + raw_smp_processor_id(); \ |
---|
| 248 | + }) |
---|
| 249 | +#define hard_put_cpu(flags) hard_preempt_enable(flags) |
---|
| 250 | +#else |
---|
| 251 | +#define hard_get_cpu(flags) ({ (void)(flags); get_cpu(); }) |
---|
| 252 | +#define hard_put_cpu(flags) \ |
---|
| 253 | + do { \ |
---|
| 254 | + (void)(flags); \ |
---|
| 255 | + put_cpu(); \ |
---|
| 256 | + } while (0) |
---|
| 257 | +#endif |
---|
| 258 | + |
---|
244 | 259 | /* |
---|
245 | 260 | * Callback to arch code if there's nosmp or maxcpus=0 on the |
---|
246 | 261 | * boot command line: |
---|