diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-02 17:56:03 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-02 17:56:03 -0500 |
commit | 2a7383529109252a7f9d81639784e5fddb4f3df4 (patch) | |
tree | 9b72cbccefca6f852003a74dff9d13e08f29f740 /drivers/acpi | |
parent | 5f97d6628640842229824c9f4fd433621c5a7b72 (diff) |
ACPI / cpuidle: Drop flags.bm_check tests from acpi_idle_enter_bm()
Since acpi_idle_enter_bm() is only used if flags.bm_check is set for
the given acpi_processor object, it doesn't make sense to check that
flag in there.
For this reason, drop flags.bm_check tests (and some code depending
on them) from acpi_idle_enter_bm().
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_idle.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index c05d5ec9882a..eaa32586f89c 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -842,28 +842,25 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
842 | /* | 842 | /* |
843 | * disable bus master | 843 | * disable bus master |
844 | * bm_check implies we need ARB_DIS | 844 | * bm_check implies we need ARB_DIS |
845 | * !bm_check implies we need cache flush | ||
846 | * bm_control implies whether we can do ARB_DIS | 845 | * bm_control implies whether we can do ARB_DIS |
847 | * | 846 | * |
848 | * That leaves a case where bm_check is set and bm_control is | 847 | * That leaves a case where bm_check is set and bm_control is |
849 | * not set. In that case we cannot do much, we enter C3 | 848 | * not set. In that case we cannot do much, we enter C3 |
850 | * without doing anything. | 849 | * without doing anything. |
851 | */ | 850 | */ |
852 | if (pr->flags.bm_check && pr->flags.bm_control) { | 851 | if (pr->flags.bm_control) { |
853 | raw_spin_lock(&c3_lock); | 852 | raw_spin_lock(&c3_lock); |
854 | c3_cpu_count++; | 853 | c3_cpu_count++; |
855 | /* Disable bus master arbitration when all CPUs are in C3 */ | 854 | /* Disable bus master arbitration when all CPUs are in C3 */ |
856 | if (c3_cpu_count == num_online_cpus()) | 855 | if (c3_cpu_count == num_online_cpus()) |
857 | acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1); | 856 | acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1); |
858 | raw_spin_unlock(&c3_lock); | 857 | raw_spin_unlock(&c3_lock); |
859 | } else if (!pr->flags.bm_check) { | ||
860 | ACPI_FLUSH_CPU_CACHE(); | ||
861 | } | 858 | } |
862 | 859 | ||
863 | acpi_idle_do_entry(cx); | 860 | acpi_idle_do_entry(cx); |
864 | 861 | ||
865 | /* Re-enable bus master arbitration */ | 862 | /* Re-enable bus master arbitration */ |
866 | if (pr->flags.bm_check && pr->flags.bm_control) { | 863 | if (pr->flags.bm_control) { |
867 | raw_spin_lock(&c3_lock); | 864 | raw_spin_lock(&c3_lock); |
868 | acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0); | 865 | acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0); |
869 | c3_cpu_count--; | 866 | c3_cpu_count--; |