diff for duplicates of <51ECB5C1.600@linaro.org> diff --git a/a/1.txt b/N1/1.txt index 965628d..9f70e2d 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -49,8 +49,16 @@ Does the attached patch changes something ? -- - <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs + <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog + +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: 0011-cpuidle-add-hotplug-support-to-initialize-the-timer-.patch +Type: text/x-diff +Size: 3462 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130722/66dbbf3f/attachment.bin> diff --git a/a/2.hdr b/a/2.hdr deleted file mode 100644 index fc8a152..0000000 --- a/a/2.hdr +++ /dev/null @@ -1,6 +0,0 @@ -Content-Type: text/x-diff; - name="0011-cpuidle-add-hotplug-support-to-initialize-the-timer-.patch" -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; - filename*0="0011-cpuidle-add-hotplug-support-to-initialize-the-timer-.pa"; - filename*1="tch" diff --git a/a/2.txt b/a/2.txt deleted file mode 100644 index 075c6bc..0000000 --- a/a/2.txt +++ /dev/null @@ -1,106 +0,0 @@ -From 5d4f611244834662d3ac077af4e8e6ef4bb1ed8a Mon Sep 17 00:00:00 2001 -From: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> -Date: Tue, 9 Apr 2013 12:03:28 +0200 -Subject: [PATCH 11/36] cpuidle: add hotplug support to initialize the timer - broadcast - -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-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> ---- - drivers/cpuidle/driver.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -Index: cpuidle-next/drivers/cpuidle/driver.c -=================================================================== ---- cpuidle-next.orig/drivers/cpuidle/driver.c -+++ cpuidle-next/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_time - } - - /** -+ * 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 cpuid - 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_drive - */ - 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); diff --git a/a/content_digest b/N1/content_digest index 86d8214..18218e4 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -11,16 +11,11 @@ "ref\01374462916.15946.14.camel@jlo-ubuntu-64.nvidia.com\0" "ref\051ECB223.5000002@linaro.org\0" "ref\01374467085.15946.16.camel@jlo-ubuntu-64.nvidia.com\0" - "ref\01374467085.15946.16.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org\0" - "From\0Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>\0" - "Subject\0Re: [PATCH] ARM: tegra: cpuidle: use CPUIDLE_FLAG_TIMER_STOP flag\0" + "From\0daniel.lezcano@linaro.org (Daniel Lezcano)\0" + "Subject\0[PATCH] ARM: tegra: cpuidle: use CPUIDLE_FLAG_TIMER_STOP flag\0" "Date\0Mon, 22 Jul 2013 06:32:01 +0200\0" - "To\0Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>\0" - "Cc\0Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>" - Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> - linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org <linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> - " linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org <linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>\0" - "\01:1\0" + "To\0linux-arm-kernel@lists.infradead.org\0" + "\00:1\0" "b\0" "On 07/22/2013 06:24 AM, Joseph Lo wrote:\n" "> On Mon, 2013-07-22 at 12:16 +0800, Daniel Lezcano wrote:\n" @@ -73,119 +68,18 @@ "\n" "\n" "-- \n" - " <http://www.linaro.org/> Linaro.org \342\224\202 Open source software for ARM SoCs\n" + " <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs\n" "\n" "Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |\n" "<http://twitter.com/#!/linaroorg> Twitter |\n" - <http://www.linaro.org/linaro-blog/> Blog - "\01:2\0" - "fn\00011-cpuidle-add-hotplug-support-to-initialize-the-timer-.patch\0" - "b\0" - "From 5d4f611244834662d3ac077af4e8e6ef4bb1ed8a Mon Sep 17 00:00:00 2001\n" - "From: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>\n" - "Date: Tue, 9 Apr 2013 12:03:28 +0200\n" - "Subject: [PATCH 11/36] cpuidle: add hotplug support to initialize the timer\n" - " broadcast\n" - "\n" - "Commit 89878baa73f0f1c679355006bd8632e5d78f96c2 introduced the flag\n" - "CPUIDLE_FLAG_TIMER_STOP where we specify a specific idle state stops the local\n" - "timer.\n" - "\n" - "Commit a06df062a189a8d5588babb8bf0bb78672497798 introduced the initialization\n" - "of the timer broadcast framework depending of the flag presence.\n" - "\n" - "If a system is booted with some cpus offline, by setting for example, maxcpus=1\n" - "in the kernel command line, and then they are set online, the timer broadcast\n" - "won't be setup automatically.\n" - "\n" - "Fix this by adding the cpu hotplug notifier and enable/disable the timer\n" - "broadcast automatically. So no need to handle that at the arch specific driver\n" - "level like eg. intel_idle does.\n" - "\n" - "Signed-off-by: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>\n" - "---\n" - " drivers/cpuidle/driver.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++\n" - " 1 file changed, 48 insertions(+)\n" + "<http://www.linaro.org/linaro-blog/> Blog\n" "\n" - "Index: cpuidle-next/drivers/cpuidle/driver.c\n" - "===================================================================\n" - "--- cpuidle-next.orig/drivers/cpuidle/driver.c\n" - "+++ cpuidle-next/drivers/cpuidle/driver.c\n" - "@@ -10,6 +10,7 @@\n" - " \n" - " #include <linux/mutex.h>\n" - " #include <linux/module.h>\n" - "+#include <linux/cpu.h>\n" - " #include <linux/cpuidle.h>\n" - " #include <linux/cpumask.h>\n" - " #include <linux/clockchips.h>\n" - "@@ -147,6 +148,48 @@ static void cpuidle_setup_broadcast_time\n" - " }\n" - " \n" - " /**\n" - "+ * cpuidle_hotplug_notify: notifier callback when a cpu is onlined/offlined\n" - "+ * @n: the notifier block\n" - "+ * @action: an unsigned long giving the event related to the notification\n" - "+ * @hcpu: a void pointer but used as the cpu number which the event is related\n" - "+ *\n" - "+ * The kernel can boot with some cpus offline, we have to init the timer\n" - "+ * broadcast for these cpus when they are onlined. Also we have to disable\n" - "+ * the timer broadcast when the cpu is down.\n" - "+ *\n" - "+ * Returns NOTIFY_OK\n" - "+ */\n" - "+static int cpuidle_hotplug_notify(struct notifier_block *n,\n" - "+\t\t\t\t unsigned long action, void *hcpu)\n" - "+{\n" - "+\tint cpu = (unsigned long)hcpu;\n" - "+\tstruct cpuidle_driver *drv;\n" - "+\n" - "+\tdrv = __cpuidle_get_cpu_driver(cpu);\n" - "+\tif (!drv || !drv->bctimer)\n" - "+\t\tgoto out;\n" - "+\n" - "+\tswitch (action & 0xf) {\n" - "+\tcase CPU_ONLINE:\n" - "+\t\tsmp_call_function_single(cpu, cpuidle_setup_broadcast_timer,\n" - "+\t\t\t\t\t (void *)CLOCK_EVT_NOTIFY_BROADCAST_ON,\n" - "+\t\t\t\t\t 1);\n" - "+\t\tbreak;\n" - "+\tcase CPU_DEAD:\n" - "+\t\tsmp_call_function_single(cpu, cpuidle_setup_broadcast_timer,\n" - "+\t\t\t\t\t (void *)CLOCK_EVT_NOTIFY_BROADCAST_OFF,\n" - "+\t\t\t\t\t 1);\n" - "+\t\tbreak;\n" - "+\t}\n" - "+out:\n" - "+\treturn NOTIFY_OK;\n" - "+}\n" - "+\n" - "+static struct notifier_block cpuidle_hotplug_notifier = {\n" - "+\t.notifier_call = cpuidle_hotplug_notify,\n" - "+};\n" - "+\n" - "+/**\n" - " * __cpuidle_driver_init - initialize the driver's internal data\n" - " * @drv: a valid pointer to a struct cpuidle_driver\n" - " *\n" - "@@ -262,6 +305,9 @@ int cpuidle_register_driver(struct cpuid\n" - " \tret = __cpuidle_register_driver(drv);\n" - " \tspin_unlock(&cpuidle_driver_lock);\n" - " \n" - "+\tif (!ret)\n" - "+\t\tret = register_cpu_notifier(&cpuidle_hotplug_notifier);\n" - "+\n" - " \treturn ret;\n" - " }\n" - " EXPORT_SYMBOL_GPL(cpuidle_register_driver);\n" - "@@ -276,6 +322,8 @@ EXPORT_SYMBOL_GPL(cpuidle_register_drive\n" - " */\n" - " void cpuidle_unregister_driver(struct cpuidle_driver *drv)\n" - " {\n" - "+\tunregister_cpu_notifier(&cpuidle_hotplug_notifier);\n" - "+\n" - " \tspin_lock(&cpuidle_driver_lock);\n" - " \t__cpuidle_unregister_driver(drv);\n" - " \tspin_unlock(&cpuidle_driver_lock);" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: 0011-cpuidle-add-hotplug-support-to-initialize-the-timer-.patch\n" + "Type: text/x-diff\n" + "Size: 3462 bytes\n" + "Desc: not available\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130722/66dbbf3f/attachment.bin> -9a086492f7bf386360db381b4754e50502449a155e223cf43097719601c333b9 +08d75d2729a63e47dc8c30b21bf2e47a7c0b8feb1244405042fe96434475c74a
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.