All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <5125BC7C.7080007@ti.com>

diff --git a/a/1.txt b/N1/1.txt
index 21c1b47..55f0a70 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -127,12 +127,3 @@ clock_event_device *bc)
 
 -- 
 1.7.9.5
-
-
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: 0001-tick-broadcast-Add-tick-road-cast-affinity-suport.patch
-Type: text/x-patch
-Size: 3001 bytes
-Desc: not available
-URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130221/721d4f50/attachment.bin>
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..c3a82b8
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,5 @@
+Content-Type: text/x-patch;
+	name="0001-tick-broadcast-Add-tick-road-cast-affinity-suport.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment;
+	filename="0001-tick-broadcast-Add-tick-road-cast-affinity-suport.patch"
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..90cf9cf
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,78 @@
+>From d70f2d48ec08a3f1d73187c49b16e4e60f81a50c Mon Sep 17 00:00:00 2001
+From: Santosh Shilimkar <santosh.shilimkar@ti.com>
+Date: Wed, 25 Jul 2012 03:42:33 +0530
+Subject: [PATCH] tick-broadcast: Add tick road-cast affinity suport
+
+Current tick broad-cast code has affinity set to the boot CPU and hence
+the boot CPU will always wakeup from low power states when broad cast timer
+is armed even if the next expiry event doesn't belong to it.
+
+Patch adds broadcast affinity functionality to avoid above and let the
+tick framework set the affinity of the event for the CPU it belongs.
+
+Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
+---
+ include/linux/clockchips.h   |    2 ++
+ kernel/time/tick-broadcast.c |   13 ++++++++++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
+index 8a7096f..5488cdc 100644
+--- a/include/linux/clockchips.h
++++ b/include/linux/clockchips.h
+@@ -95,6 +95,8 @@ struct clock_event_device {
+ 	unsigned long		retries;
+ 
+ 	void			(*broadcast)(const struct cpumask *mask);
++	void			(*broadcast_affinity)
++					(const struct cpumask *mask, int irq);
+ 	void			(*set_mode)(enum clock_event_mode mode,
+ 					    struct clock_event_device *);
+ 	void			(*suspend)(struct clock_event_device *);
+diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
+index f113755..2ec2425 100644
+--- a/kernel/time/tick-broadcast.c
++++ b/kernel/time/tick-broadcast.c
+@@ -39,6 +39,8 @@ static void tick_broadcast_clear_oneshot(int cpu);
+ static inline void tick_broadcast_clear_oneshot(int cpu) { }
+ #endif
+ 
++static inline void dummy_broadcast_affinity(const struct cpumask *mask,
++							int irq) { }
+ /*
+  * Debugging: see timer_list.c
+  */
+@@ -485,14 +487,19 @@ void tick_broadcast_oneshot_control(unsigned long reason)
+ 		if (!cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
+ 			cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
+ 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
+-			if (dev->next_event.tv64 < bc->next_event.tv64)
++			if (dev->next_event.tv64 < bc->next_event.tv64) {
+ 				tick_broadcast_set_event(dev->next_event, 1);
++				bc->broadcast_affinity(
++				tick_get_broadcast_oneshot_mask(), bc->irq);
++			}
+ 		}
+ 	} else {
+ 		if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
+ 			cpumask_clear_cpu(cpu,
+ 					  tick_get_broadcast_oneshot_mask());
+ 			clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT);
++			bc->broadcast_affinity(
++				tick_get_broadcast_oneshot_mask(), bc->irq);
+ 			if (dev->next_event.tv64 != KTIME_MAX)
+ 				tick_program_event(dev->next_event, 1);
+ 		}
+@@ -536,6 +543,10 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
+ 
+ 		bc->event_handler = tick_handle_oneshot_broadcast;
+ 
++		/* setup dummy broadcast affinity handler if not provided */
++		if (bc->broadcast_affinity)
++			bc->broadcast_affinity = dummy_broadcast_affinity;
++
+ 		/* Take the do_timer update */
+ 		tick_do_timer_cpu = cpu;
+ 
+-- 
+1.7.9.5
diff --git a/a/content_digest b/N1/content_digest
index 8d8f76d..2e5c3ad 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,11 +1,17 @@
  "ref\05123BE35.8070902@linaro.org\0"
  "ref\0alpine.LFD.2.02.1302191904560.22263@ionos\0"
  "ref\05123C299.3080005@linaro.org\0"
- "From\0santosh.shilimkar@ti.com (Santosh Shilimkar)\0"
- "Subject\0[resend] Timer broadcast question\0"
+ "From\0Santosh Shilimkar <santosh.shilimkar@ti.com>\0"
+ "Subject\0Re: [resend] Timer broadcast question\0"
  "Date\0Thu, 21 Feb 2013 11:49:40 +0530\0"
- "To\0linux-arm-kernel@lists.infradead.org\0"
- "\00:1\0"
+ "To\0Daniel Lezcano <daniel.lezcano@linaro.org>\0"
+ "Cc\0Thomas Gleixner <tglx@linutronix.de>"
+  Frederic Weisbecker <fweisbec@gmail.com>
+  linaro-dev >> Lists Linaro-dev <linaro-dev@lists.linaro.org>
+  John Stultz <john.stultz@linaro.org>
+  Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
+ " Linux ARM Kernel Mailing List <linux-arm-kernel@lists.infradead.org>\0"
+ "\01:1\0"
  "b\0"
  "On Tuesday 19 February 2013 11:51 PM, Daniel Lezcano wrote:\n"
  "> On 02/19/2013 07:10 PM, Thomas Gleixner wrote:\n"
@@ -135,15 +141,87 @@
  "  \t\ttick_do_timer_cpu = cpu;\n"
  "\n"
  "-- \n"
- "1.7.9.5\n"
+ 1.7.9.5
+ "\01:2\0"
+ "fn\00001-tick-broadcast-Add-tick-road-cast-affinity-suport.patch\0"
+ "b\0"
+ ">From d70f2d48ec08a3f1d73187c49b16e4e60f81a50c Mon Sep 17 00:00:00 2001\n"
+ "From: Santosh Shilimkar <santosh.shilimkar@ti.com>\n"
+ "Date: Wed, 25 Jul 2012 03:42:33 +0530\n"
+ "Subject: [PATCH] tick-broadcast: Add tick road-cast affinity suport\n"
+ "\n"
+ "Current tick broad-cast code has affinity set to the boot CPU and hence\n"
+ "the boot CPU will always wakeup from low power states when broad cast timer\n"
+ "is armed even if the next expiry event doesn't belong to it.\n"
+ "\n"
+ "Patch adds broadcast affinity functionality to avoid above and let the\n"
+ "tick framework set the affinity of the event for the CPU it belongs.\n"
  "\n"
+ "Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>\n"
+ "---\n"
+ " include/linux/clockchips.h   |    2 ++\n"
+ " kernel/time/tick-broadcast.c |   13 ++++++++++++-\n"
+ " 2 files changed, 14 insertions(+), 1 deletion(-)\n"
  "\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: 0001-tick-broadcast-Add-tick-road-cast-affinity-suport.patch\n"
- "Type: text/x-patch\n"
- "Size: 3001 bytes\n"
- "Desc: not available\n"
- URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130221/721d4f50/attachment.bin>
+ "diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h\n"
+ "index 8a7096f..5488cdc 100644\n"
+ "--- a/include/linux/clockchips.h\n"
+ "+++ b/include/linux/clockchips.h\n"
+ "@@ -95,6 +95,8 @@ struct clock_event_device {\n"
+ " \tunsigned long\t\tretries;\n"
+ " \n"
+ " \tvoid\t\t\t(*broadcast)(const struct cpumask *mask);\n"
+ "+\tvoid\t\t\t(*broadcast_affinity)\n"
+ "+\t\t\t\t\t(const struct cpumask *mask, int irq);\n"
+ " \tvoid\t\t\t(*set_mode)(enum clock_event_mode mode,\n"
+ " \t\t\t\t\t    struct clock_event_device *);\n"
+ " \tvoid\t\t\t(*suspend)(struct clock_event_device *);\n"
+ "diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c\n"
+ "index f113755..2ec2425 100644\n"
+ "--- a/kernel/time/tick-broadcast.c\n"
+ "+++ b/kernel/time/tick-broadcast.c\n"
+ "@@ -39,6 +39,8 @@ static void tick_broadcast_clear_oneshot(int cpu);\n"
+ " static inline void tick_broadcast_clear_oneshot(int cpu) { }\n"
+ " #endif\n"
+ " \n"
+ "+static inline void dummy_broadcast_affinity(const struct cpumask *mask,\n"
+ "+\t\t\t\t\t\t\tint irq) { }\n"
+ " /*\n"
+ "  * Debugging: see timer_list.c\n"
+ "  */\n"
+ "@@ -485,14 +487,19 @@ void tick_broadcast_oneshot_control(unsigned long reason)\n"
+ " \t\tif (!cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {\n"
+ " \t\t\tcpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());\n"
+ " \t\t\tclockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);\n"
+ "-\t\t\tif (dev->next_event.tv64 < bc->next_event.tv64)\n"
+ "+\t\t\tif (dev->next_event.tv64 < bc->next_event.tv64) {\n"
+ " \t\t\t\ttick_broadcast_set_event(dev->next_event, 1);\n"
+ "+\t\t\t\tbc->broadcast_affinity(\n"
+ "+\t\t\t\ttick_get_broadcast_oneshot_mask(), bc->irq);\n"
+ "+\t\t\t}\n"
+ " \t\t}\n"
+ " \t} else {\n"
+ " \t\tif (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {\n"
+ " \t\t\tcpumask_clear_cpu(cpu,\n"
+ " \t\t\t\t\t  tick_get_broadcast_oneshot_mask());\n"
+ " \t\t\tclockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT);\n"
+ "+\t\t\tbc->broadcast_affinity(\n"
+ "+\t\t\t\ttick_get_broadcast_oneshot_mask(), bc->irq);\n"
+ " \t\t\tif (dev->next_event.tv64 != KTIME_MAX)\n"
+ " \t\t\t\ttick_program_event(dev->next_event, 1);\n"
+ " \t\t}\n"
+ "@@ -536,6 +543,10 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)\n"
+ " \n"
+ " \t\tbc->event_handler = tick_handle_oneshot_broadcast;\n"
+ " \n"
+ "+\t\t/* setup dummy broadcast affinity handler if not provided */\n"
+ "+\t\tif (bc->broadcast_affinity)\n"
+ "+\t\t\tbc->broadcast_affinity = dummy_broadcast_affinity;\n"
+ "+\n"
+ " \t\t/* Take the do_timer update */\n"
+ " \t\ttick_do_timer_cpu = cpu;\n"
+ " \n"
+ "-- \n"
+ 1.7.9.5
 
-c7c4fbe4512c356b15b986547604c7b9988cf6f8e706caaf54b0428cd040c910
+d9fd93bda2c09d7ec60af0b155a0524822456248e606a15c14e9e7905cc34387

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.