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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm+acpi-4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
"Three regression fixes this time, one for a recent regression in the
cpuidle core affecting multiple systems, one for an inadvertently
added duplicate typedef in ACPICA that breaks compilation with GCC 4.5
and one for an ACPI Smart Battery Subsystem driver regression
introduced during the 3.18 cycle (stable-candidate).

Specifics:

- Fix for a regression in the cpuidle core introduced by one of the
recent commits in the clockevents_notify() removal series that put
a call to a function which had to be executed with disabled
interrupts into a code path running with enabled interrupts (Rafael
J Wysocki)

- Fix for a build problem in ACPICA (with GCC 4.5) introduced by one
of the recent ACPICA tools commits that added a duplicate typedef
to one of the ACPICA's header files by mistake (Olaf Hering)

- Fix for a regression in the ACPI SBS (Smart Battery Subsystem)
driver introduced during the 3.18 development cycle causing the
smart battery manager to be marked as not present when it should be
marked as present (Chris Bainbridge)"

* tag 'pm+acpi-4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpuidle: Run tick_broadcast_exit() with disabled interrupts
ACPI / SBS: Enable battery manager when present
ACPICA: remove duplicate u8 typedef

+19 -16
+1 -1
drivers/acpi/sbs.c
··· 684 684 if (!sbs_manager_broken) { 685 685 result = acpi_manager_get_info(sbs); 686 686 if (!result) { 687 - sbs->manager_present = 0; 687 + sbs->manager_present = 1; 688 688 for (id = 0; id < MAX_SBS_BAT; ++id) 689 689 if ((sbs->batteries_supported & (1 << id))) 690 690 acpi_battery_add(sbs, id);
+16
drivers/cpuidle/cpuidle.c
··· 158 158 int entered_state; 159 159 160 160 struct cpuidle_state *target_state = &drv->states[index]; 161 + bool broadcast = !!(target_state->flags & CPUIDLE_FLAG_TIMER_STOP); 161 162 ktime_t time_start, time_end; 162 163 s64 diff; 164 + 165 + /* 166 + * Tell the time framework to switch to a broadcast timer because our 167 + * local timer will be shut down. If a local timer is used from another 168 + * CPU as a broadcast timer, this call may fail if it is not available. 169 + */ 170 + if (broadcast && tick_broadcast_enter()) 171 + return -EBUSY; 163 172 164 173 trace_cpu_idle_rcuidle(index, dev->cpu); 165 174 time_start = ktime_get(); ··· 177 168 178 169 time_end = ktime_get(); 179 170 trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu); 171 + 172 + if (broadcast) { 173 + if (WARN_ON_ONCE(!irqs_disabled())) 174 + local_irq_disable(); 175 + 176 + tick_broadcast_exit(); 177 + } 180 178 181 179 if (!cpuidle_state_is_coupled(dev, drv, entered_state)) 182 180 local_irq_enable();
-1
include/acpi/actypes.h
··· 124 124 #ifndef ACPI_USE_SYSTEM_INTTYPES 125 125 126 126 typedef unsigned char u8; 127 - typedef unsigned char u8; 128 127 typedef unsigned short u16; 129 128 typedef short s16; 130 129 typedef COMPILER_DEPENDENT_UINT64 u64;
+2 -14
kernel/sched/idle.c
··· 81 81 struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); 82 82 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); 83 83 int next_state, entered_state; 84 - unsigned int broadcast; 85 84 bool reflect; 86 85 87 86 /* ··· 149 150 goto exit_idle; 150 151 } 151 152 152 - broadcast = drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP; 153 - 154 - /* 155 - * Tell the time framework to switch to a broadcast timer 156 - * because our local timer will be shutdown. If a local timer 157 - * is used from another cpu as a broadcast timer, this call may 158 - * fail if it is not available 159 - */ 160 - if (broadcast && tick_broadcast_enter()) 161 - goto use_default; 162 - 163 153 /* Take note of the planned idle state. */ 164 154 idle_set_state(this_rq(), &drv->states[next_state]); 165 155 ··· 162 174 /* The cpu is no longer idle or about to enter idle. */ 163 175 idle_set_state(this_rq(), NULL); 164 176 165 - if (broadcast) 166 - tick_broadcast_exit(); 177 + if (entered_state == -EBUSY) 178 + goto use_default; 167 179 168 180 /* 169 181 * Give the governor an opportunity to reflect on the outcome