diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
commit | ccaa36f73544163ef6e15eb29a620130755f6001 (patch) | |
tree | b5cf50592c45e25edbd66fea451e6941e455fa83 /arch/powerpc/platforms/pseries/setup.c | |
parent | b4a9071af62f95dc6d22040a0b37ac7225ce4d54 (diff) | |
parent | 5e980823581682d1566e7b5089cf827ddd5f3c94 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
[POWERPC] Fix rheap alignment problem
[POWERPC] Use check_legacy_ioport() for ISAPnP
[POWERPC] Avoid NULL pointer in gpio1_interrupt
[POWERPC] Enable generic rtc hook for the MPC8349 mITX
[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
[POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
[POWERPC] fix spin lock nesting in hvc_iseries
[POWERPC] EEH failure to mark pci slot as frozen.
[POWERPC] update powerpc defconfig files after libata kconfig breakage
[POWERPC] enable sysrq in pmac32_defconfig
[POWERPC] UPIO_TSI cleanup
[POWERPC] rewrite mkprep and mkbugboot in sane C
[POWERPC] maple/pci iomem annotations
[POWERPC] powerpc oprofile __user annotations
[POWERPC] cell spufs iomem annotations
[POWERPC] NULL noise removal: spufs
[POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
[POWERPC] update mpc8349_itx_defconfig and remove some debug settings
[POWERPC] Always call cede in pseries dedicated idle loop
[POWERPC] Fix loop logic in irq_alloc_virt()
...
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 4f0097f31bdb..43dbf737698c 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -477,7 +477,6 @@ static void pseries_dedicated_idle_sleep(void) | |||
477 | { | 477 | { |
478 | unsigned int cpu = smp_processor_id(); | 478 | unsigned int cpu = smp_processor_id(); |
479 | unsigned long start_snooze; | 479 | unsigned long start_snooze; |
480 | unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay); | ||
481 | 480 | ||
482 | /* | 481 | /* |
483 | * Indicate to the HV that we are idle. Now would be | 482 | * Indicate to the HV that we are idle. Now would be |
@@ -490,9 +489,9 @@ static void pseries_dedicated_idle_sleep(void) | |||
490 | * has been checked recently. If we should poll for a little | 489 | * has been checked recently. If we should poll for a little |
491 | * while, do so. | 490 | * while, do so. |
492 | */ | 491 | */ |
493 | if (*smt_snooze_delay) { | 492 | if (__get_cpu_var(smt_snooze_delay)) { |
494 | start_snooze = get_tb() + | 493 | start_snooze = get_tb() + |
495 | *smt_snooze_delay * tb_ticks_per_usec; | 494 | __get_cpu_var(smt_snooze_delay) * tb_ticks_per_usec; |
496 | local_irq_enable(); | 495 | local_irq_enable(); |
497 | set_thread_flag(TIF_POLLING_NRFLAG); | 496 | set_thread_flag(TIF_POLLING_NRFLAG); |
498 | 497 | ||
@@ -512,24 +511,7 @@ static void pseries_dedicated_idle_sleep(void) | |||
512 | goto out; | 511 | goto out; |
513 | } | 512 | } |
514 | 513 | ||
515 | /* | 514 | cede_processor(); |
516 | * If not SMT, cede processor. If CPU is running SMT | ||
517 | * cede if the other thread is not idle, so that it can | ||
518 | * go single-threaded. If the other thread is idle, | ||
519 | * we ask the hypervisor if it has pending work it | ||
520 | * wants to do and cede if it does. Otherwise we keep | ||
521 | * polling in order to reduce interrupt latency. | ||
522 | * | ||
523 | * Doing the cede when the other thread is active will | ||
524 | * result in this thread going dormant, meaning the other | ||
525 | * thread gets to run in single-threaded (ST) mode, which | ||
526 | * is slightly faster than SMT mode with this thread at | ||
527 | * very low priority. The cede enables interrupts, which | ||
528 | * doesn't matter here. | ||
529 | */ | ||
530 | if (!cpu_has_feature(CPU_FTR_SMT) || !lppaca[cpu ^ 1].idle | ||
531 | || poll_pending() == H_PENDING) | ||
532 | cede_processor(); | ||
533 | 515 | ||
534 | out: | 516 | out: |
535 | HMT_medium(); | 517 | HMT_medium(); |