Commit 89878baa73f0f1c679355006bd8632e5d78f96c2 introduced the flag
CPUIDLE_FLAG_TIMER_STOP where we specify a specific idle state stops the local
timer.
Commit a06df062a189a8d5588babb8bf0bb78672497798 introduced the initialization
of the timer broadcast framework depending of the flag presence.
If a system is booted with some cpus offline, by setting for example, maxcpus=1
in the kernel command line, and then they are set online, the timer broadcast
won't be setup automatically.
Fix this by adding the cpu hotplug notifier and enable/disable the timer
broadcast automatically. So no need to handle that at the arch specific driver
level like eg. intel_idle does.
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
drivers/cpuidle/driver.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 3ac499d..e976994 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -10,6 +10,7 @@
#include <linux/mutex.h>
#include <linux/module.h>
+#include <linux/cpu.h>
#include <linux/cpuidle.h>
#include <linux/cpumask.h>
#include <linux/clockchips.h>
@@ -147,6 +148,48 @@ static void cpuidle_setup_broadcast_timer(void *arg)
}
/**
+ * cpuidle_hotplug_notify: notifier callback when a cpu is onlined/offlined
+ * @n: the notifier block
+ * @action: an unsigned long giving the event related to the notification
+ * @hcpu: a void pointer but used as the cpu number which the event is related
+ *
+ * The kernel can boot with some cpus offline, we have to init the timer
+ * broadcast for these cpus when they are onlined. Also we have to disable
+ * the timer broadcast when the cpu is down.
+ *
+ * Returns NOTIFY_OK
+ */
+static int cpuidle_hotplug_notify(struct notifier_block *n,
+ unsigned long action, void *hcpu)
+{
+ int cpu = (unsigned long)hcpu;
+ struct cpuidle_driver *drv;
+
+ drv = __cpuidle_get_cpu_driver(cpu);
+ if (!drv || !drv->bctimer)
+ goto out;
+
+ switch (action & 0xf) {
+ case CPU_ONLINE:
+ smp_call_function_single(cpu, cpuidle_setup_broadcast_timer,
+ (void *)CLOCK_EVT_NOTIFY_BROADCAST_ON,
+ 1);
+ break;
+ case CPU_DEAD:
+ smp_call_function_single(cpu, cpuidle_setup_broadcast_timer,
+ (void *)CLOCK_EVT_NOTIFY_BROADCAST_OFF,
+ 1);
+ break;
+ }
+out:
+ return NOTIFY_OK;
+}
+
+static struct notifier_block cpuidle_hotplug_notifier = {
+ .notifier_call = cpuidle_hotplug_notify,
+};
+
+/**
* __cpuidle_driver_init - initialize the driver's internal data
* @drv: a valid pointer to a struct cpuidle_driver
*
@@ -262,6 +305,9 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
ret = __cpuidle_register_driver(drv);
spin_unlock(&cpuidle_driver_lock);
+ if (!ret)
+ ret = register_cpu_notifier(&cpuidle_hotplug_notifier);
+
return ret;
}
EXPORT_SYMBOL_GPL(cpuidle_register_driver);
@@ -276,6 +322,8 @@ EXPORT_SYMBOL_GPL(cpuidle_register_driver);
*/
void cpuidle_unregister_driver(struct cpuidle_driver *drv)
{
+ unregister_cpu_notifier(&cpuidle_hotplug_notifier);
+
spin_lock(&cpuidle_driver_lock);
__cpuidle_unregister_driver(drv);
spin_unlock(&cpuidle_driver_lock);
--
1.7.9.5
v1->v2: Return specific error value instead of just return -1, and
correct some grammar mistake in changelog.
For cpu hot add, evaluate _MAT or parse MADT will did twice to get
APIC id:
acpi_processor_add()
acpi_processor_get_info()
acpi_get_cpuid() will evaluate _MAT or parse MADT;
acpi_processor_hotadd_init()
acpi_map_lsapic() will evaluate _MAT again;
This patch set introduces apic_id in struct processor to save parsed
APIC id, and use it to remove the duplicated _MAT evaluation.
Further more, the new logical cpu number will be generated in
acpi_register_lapic(), this can be returned to remove the cpumask
allocation and operation to simplify _acpi_map_lsapic().
There are also some cleanups for the ACPI processor dirver code.
Hanjun Guo (2):
ACPI / processor: remove unnecessary if (!pr) check
ACPI / processor: Remove outdated comments
Jiang Liu (4):
ACPI / processor: Introduce apic_id in struct processor to save
parsed APIC id
ACPI / processor: use apic_id and remove duplicated _MAT evaluation
x86 / ACPI: simplify _acpi_map_lsapic()
ACPI / processor: remove some dead code in acpi_processor_get_info()
arch/ia64/kernel/acpi.c | 38 ++----------------
arch/x86/include/asm/mpspec.h | 2 +-
arch/x86/kernel/acpi/boot.c | 88 +++++++++--------------------------------
arch/x86/kernel/apic/apic.c | 8 ++--
drivers/acpi/acpi_processor.c | 22 +++--------
drivers/acpi/processor_core.c | 26 +++++++++---
include/acpi/processor.h | 3 ++
include/linux/acpi.h | 2 +-
8 files changed, 60 insertions(+), 129 deletions(-)
--
1.7.9.5
This patch series removes the use of the ASoC-level read and write
functions from the cq93vc driver as part of a wider push to remove them
completely and just use regmap for all register I/O. Since the driver
is essentially doing what regmap-mmio is doing this is done by adding a
MMIO regmap to the core device and using that. This is compile tested
only, I don't have any hardware to run on.
Since I anticipate doing more cleanups over the CODEC drivers during the
next release cycle it'd be good to merge via ASoC, though there
shouldn't be any overlap with the first patch.
Mark Brown (5):
mfd: davinci_voicecodec: Remove unused read and write functions
mfd: davinci_voicecodec: Provide a regmap for register I/O
ASoC: cq93vc: Use core I/O functions
ASoC: cq93vc: Don't use control data for core driver data
ASoC: cq93vc: Use regmap for I/O
drivers/mfd/davinci_voicecodec.c | 23 +++++++++++--------
include/linux/mfd/davinci_voicecodec.h | 3 +++
sound/soc/codecs/cq93vc.c | 42 +++++++++++-----------------------
3 files changed, 29 insertions(+), 39 deletions(-)
Update cmdline to contain "console=ttyAMA0" only
Enable devtmpfs filesystem
Enable voltage regulator support
Enable ext4 filesystem
Signed-off-by: Fathi Boudra <fathi.boudra(a)linaro.org>
---
arch/arm/configs/vexpress_defconfig | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig
index f2de51f..8ddd187 100644
--- a/arch/arm/configs/vexpress_defconfig
+++ b/arch/arm/configs/vexpress_defconfig
@@ -30,7 +30,7 @@ CONFIG_HOTPLUG_CPU=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M"
+CONFIG_CMDLINE="console=ttyAMA0"
CONFIG_VFP=y
CONFIG_NEON=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
@@ -45,6 +45,7 @@ CONFIG_IP_PNP_BOOTP=y
# CONFIG_IPV6 is not set
# CONFIG_WIRELESS is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
CONFIG_MTD=y
CONFIG_MTD_CONCAT=y
CONFIG_MTD_PARTITIONS=y
@@ -75,6 +76,7 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
CONFIG_LEGACY_PTY_COUNT=16
# CONFIG_HW_RANDOM is not set
# CONFIG_HWMON is not set
+CONFIG_REGULATOR=y
CONFIG_FB=y
CONFIG_FB_ARMCLCD=y
CONFIG_FRAMEBUFFER_CONSOLE=y
@@ -115,6 +117,7 @@ CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT4_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y
--
1.8.1.2
Hi Gleb and Paolo,
The following changes since commit cc2df20c7c4ce594c3e17e9cc260c330646012c8:
KVM: x86: Update symbolic exit codes (2013-08-13 16:58:42 +0200)
are available in the git repository at:
git://git.linaro.org/people/cdall/linux-kvm-arm.git tags/kvm-arm-for-3.12
for you to fetch changes up to 1fe40f6d39d23f39e643607a3e1883bfc74f1244:
ARM: KVM: Add newlines to panic strings (2013-08-30 15:48:02 -0700)
----------------------------------------------------------------
KVM/ARM Updates for Linux 3.12
----------------------------------------------------------------
Christoffer Dall (4):
ARM: KVM: Fix kvm_set_pte assignment
ARM: KVM: Simplify tracepoint text
ARM: KVM: Work around older compiler bug
ARM: KVM: Add newlines to panic strings
arch/arm/include/asm/kvm_mmu.h | 2 +-
arch/arm/kvm/interrupts.S | 8 ++++----
arch/arm/kvm/reset.c | 2 +-
arch/arm/kvm/trace.h | 7 +++----
4 files changed, 9 insertions(+), 10 deletions(-)