Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] ppc32: Removed non-inlined versions of local_irq* functions

We always use the inlined versions of local_irq_enable, local_irq_disable,
local_save_flags_ptr, and local_irq_restore on ppc32 so the non-inlined
versions where just taking up space.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Kumar Gala and committed by
Paul Mackerras
7da8f860 5f7c6907

-154
-128
arch/ppc/kernel/misc.S
··· 273 273 274 274 #endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */ 275 275 276 - /* void local_save_flags_ptr(unsigned long *flags) */ 277 - _GLOBAL(local_save_flags_ptr) 278 - mfmsr r4 279 - stw r4,0(r3) 280 - blr 281 - /* 282 - * Need these nops here for taking over save/restore to 283 - * handle lost intrs 284 - * -- Cort 285 - */ 286 - nop 287 - nop 288 - nop 289 - nop 290 - nop 291 - nop 292 - nop 293 - nop 294 - nop 295 - nop 296 - nop 297 - nop 298 - nop 299 - nop 300 - nop 301 - nop 302 - nop 303 - _GLOBAL(local_save_flags_ptr_end) 304 - 305 - /* void local_irq_restore(unsigned long flags) */ 306 - _GLOBAL(local_irq_restore) 307 - /* 308 - * Just set/clear the MSR_EE bit through restore/flags but do not 309 - * change anything else. This is needed by the RT system and makes 310 - * sense anyway. 311 - * -- Cort 312 - */ 313 - mfmsr r4 314 - /* Copy all except the MSR_EE bit from r4 (current MSR value) 315 - to r3. This is the sort of thing the rlwimi instruction is 316 - designed for. -- paulus. */ 317 - rlwimi r3,r4,0,17,15 318 - /* Check if things are setup the way we want _already_. */ 319 - cmpw 0,r3,r4 320 - beqlr 321 - 1: SYNC 322 - mtmsr r3 323 - SYNC 324 - blr 325 - nop 326 - nop 327 - nop 328 - nop 329 - nop 330 - nop 331 - nop 332 - nop 333 - nop 334 - nop 335 - nop 336 - nop 337 - nop 338 - nop 339 - nop 340 - nop 341 - nop 342 - nop 343 - nop 344 - _GLOBAL(local_irq_restore_end) 345 - 346 - _GLOBAL(local_irq_disable) 347 - mfmsr r0 /* Get current interrupt state */ 348 - rlwinm r3,r0,16+1,32-1,31 /* Extract old value of 'EE' */ 349 - rlwinm r0,r0,0,17,15 /* clear MSR_EE in r0 */ 350 - SYNC /* Some chip revs have problems here... */ 351 - mtmsr r0 /* Update machine state */ 352 - blr /* Done */ 353 - /* 354 - * Need these nops here for taking over save/restore to 355 - * handle lost intrs 356 - * -- Cort 357 - */ 358 - nop 359 - nop 360 - nop 361 - nop 362 - nop 363 - nop 364 - nop 365 - nop 366 - nop 367 - nop 368 - nop 369 - nop 370 - nop 371 - nop 372 - nop 373 - _GLOBAL(local_irq_disable_end) 374 - 375 - _GLOBAL(local_irq_enable) 376 - mfmsr r3 /* Get current state */ 377 - ori r3,r3,MSR_EE /* Turn on 'EE' bit */ 378 - SYNC /* Some chip revs have problems here... */ 379 - mtmsr r3 /* Update machine state */ 380 - blr 381 - /* 382 - * Need these nops here for taking over save/restore to 383 - * handle lost intrs 384 - * -- Cort 385 - */ 386 - nop 387 - nop 388 - nop 389 - nop 390 - nop 391 - nop 392 - nop 393 - nop 394 - nop 395 - nop 396 - nop 397 - nop 398 - nop 399 - nop 400 - nop 401 - nop 402 - _GLOBAL(local_irq_enable_end) 403 - 404 276 /* 405 277 * complement mask on the msr then "or" some values on. 406 278 * _nmask_and_or_msr(nmask, value_to_or)
-10
arch/ppc/kernel/ppc_ksyms.c
··· 272 272 #endif 273 273 274 274 EXPORT_SYMBOL(__delay); 275 - #ifndef INLINE_IRQS 276 - EXPORT_SYMBOL(local_irq_enable); 277 - EXPORT_SYMBOL(local_irq_enable_end); 278 - EXPORT_SYMBOL(local_irq_disable); 279 - EXPORT_SYMBOL(local_irq_disable_end); 280 - EXPORT_SYMBOL(local_save_flags_ptr); 281 - EXPORT_SYMBOL(local_save_flags_ptr_end); 282 - EXPORT_SYMBOL(local_irq_restore); 283 - EXPORT_SYMBOL(local_irq_restore_end); 284 - #endif 285 275 EXPORT_SYMBOL(timer_interrupt); 286 276 EXPORT_SYMBOL(irq_desc); 287 277 EXPORT_SYMBOL(tb_ticks_per_jiffy);
-16
include/asm-ppc/hw_irq.h
··· 10 10 11 11 extern void timer_interrupt(struct pt_regs *); 12 12 13 - #define INLINE_IRQS 14 - 15 13 #define irqs_disabled() ((mfmsr() & MSR_EE) == 0) 16 - 17 - #ifdef INLINE_IRQS 18 14 19 15 static inline void local_irq_disable(void) 20 16 { ··· 40 44 #define local_save_flags(flags) ((flags) = mfmsr()) 41 45 #define local_irq_save(flags) local_irq_save_ptr(&flags) 42 46 #define local_irq_restore(flags) mtmsr(flags) 43 - 44 - #else 45 - 46 - extern void local_irq_enable(void); 47 - extern void local_irq_disable(void); 48 - extern void local_irq_restore(unsigned long); 49 - extern void local_save_flags_ptr(unsigned long *); 50 - 51 - #define local_save_flags(flags) local_save_flags_ptr(&flags) 52 - #define local_irq_save(flags) ({local_save_flags(flags);local_irq_disable();}) 53 - 54 - #endif 55 47 56 48 extern void do_lost_interrupts(unsigned long); 57 49