All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tick-broadcast: Fix the printing of broadcast masks
@ 2015-04-28  8:45 Preeti U Murthy
  2015-05-04  5:51 ` Preeti U Murthy
  2015-05-05  8:39 ` [tip:timers/core] " tip-bot for Preeti U Murthy
  0 siblings, 2 replies; 5+ messages in thread
From: Preeti U Murthy @ 2015-04-28  8:45 UTC (permalink / raw)
  To: tglx, mingo; +Cc: peterz, linuxppc-dev, john.stultz, linux-kernel

Today the number of bits of the broadcast masks that is output into
/proc/timer_list is sizeof(unsigned long). This means that on machines
with larger number of CPUs, the bitmasks of CPUs beyond this range do
not appear.

Fix this by using bitmap printing through "%*pb" instead, so as to
output the broadcast masks for the range of nr_cpu_ids into
/proc/timer_list.

Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
---

 kernel/time/timer_list.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index c82b03c..1afc726 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -269,11 +269,11 @@ static void timer_list_show_tickdevices_header(struct seq_file *m)
 {
 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
 	print_tickdevice(m, tick_get_broadcast_device(), -1);
-	SEQ_printf(m, "tick_broadcast_mask: %08lx\n",
-		   cpumask_bits(tick_get_broadcast_mask())[0]);
+	SEQ_printf(m, "tick_broadcast_mask: %*pb\n",
+		   cpumask_pr_args(tick_get_broadcast_mask()));
 #ifdef CONFIG_TICK_ONESHOT
-	SEQ_printf(m, "tick_broadcast_oneshot_mask: %08lx\n",
-		   cpumask_bits(tick_get_broadcast_oneshot_mask())[0]);
+	SEQ_printf(m, "tick_broadcast_oneshot_mask: %*pb\n",
+		   cpumask_pr_args(tick_get_broadcast_oneshot_mask()));
 #endif
 	SEQ_printf(m, "\n");
 #endif


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tick-broadcast: Fix the printing of broadcast masks
  2015-04-28  8:45 [PATCH] tick-broadcast: Fix the printing of broadcast masks Preeti U Murthy
@ 2015-05-04  5:51 ` Preeti U Murthy
  2015-05-13 23:40     ` John Stultz
  2015-05-05  8:39 ` [tip:timers/core] " tip-bot for Preeti U Murthy
  1 sibling, 1 reply; 5+ messages in thread
From: Preeti U Murthy @ 2015-05-04  5:51 UTC (permalink / raw)
  To: tglx, mingo; +Cc: peterz, linuxppc-dev, john.stultz, linux-kernel

Ping.

Any comments on this patch ?

Regards
Preeti U Murthy
On 04/28/2015 02:15 PM, Preeti U Murthy wrote:
> Today the number of bits of the broadcast masks that is output into
> /proc/timer_list is sizeof(unsigned long). This means that on machines
> with larger number of CPUs, the bitmasks of CPUs beyond this range do
> not appear.
> 
> Fix this by using bitmap printing through "%*pb" instead, so as to
> output the broadcast masks for the range of nr_cpu_ids into
> /proc/timer_list.
> 
> Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
> ---
> 
>  kernel/time/timer_list.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
> index c82b03c..1afc726 100644
> --- a/kernel/time/timer_list.c
> +++ b/kernel/time/timer_list.c
> @@ -269,11 +269,11 @@ static void timer_list_show_tickdevices_header(struct seq_file *m)
>  {
>  #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
>  	print_tickdevice(m, tick_get_broadcast_device(), -1);
> -	SEQ_printf(m, "tick_broadcast_mask: %08lx\n",
> -		   cpumask_bits(tick_get_broadcast_mask())[0]);
> +	SEQ_printf(m, "tick_broadcast_mask: %*pb\n",
> +		   cpumask_pr_args(tick_get_broadcast_mask()));
>  #ifdef CONFIG_TICK_ONESHOT
> -	SEQ_printf(m, "tick_broadcast_oneshot_mask: %08lx\n",
> -		   cpumask_bits(tick_get_broadcast_oneshot_mask())[0]);
> +	SEQ_printf(m, "tick_broadcast_oneshot_mask: %*pb\n",
> +		   cpumask_pr_args(tick_get_broadcast_oneshot_mask()));
>  #endif
>  	SEQ_printf(m, "\n");
>  #endif
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip:timers/core] tick-broadcast: Fix the printing of broadcast masks
  2015-04-28  8:45 [PATCH] tick-broadcast: Fix the printing of broadcast masks Preeti U Murthy
  2015-05-04  5:51 ` Preeti U Murthy
@ 2015-05-05  8:39 ` tip-bot for Preeti U Murthy
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Preeti U Murthy @ 2015-05-05  8:39 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: preeti, linux-kernel, hpa, mingo, tglx

Commit-ID:  1ef09cd713c90781b683a0b4e0a874803c172b1d
Gitweb:     http://git.kernel.org/tip/1ef09cd713c90781b683a0b4e0a874803c172b1d
Author:     Preeti U Murthy <preeti@linux.vnet.ibm.com>
AuthorDate: Tue, 28 Apr 2015 14:15:20 +0530
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 5 May 2015 10:35:58 +0200

tick-broadcast: Fix the printing of broadcast masks

Today the number of bits of the broadcast masks that is output into
/proc/timer_list is sizeof(unsigned long). This means that on machines
with a larger number of CPUs, the bitmasks of CPUs beyond this range do
not appear.

Fix this by using bitmap printing through "%*pb" instead, so as to
output the broadcast masks for the range of nr_cpu_ids into
/proc/timer_list.

Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: peterz@infradead.org
Cc: linuxppc-dev@ozlabs.org
Cc: john.stultz@linaro.org
Link: http://lkml.kernel.org/r/20150428084520.3314.62668.stgit@preeti.in.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/time/timer_list.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index 66f39bb..18b074b 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -276,11 +276,11 @@ static void timer_list_show_tickdevices_header(struct seq_file *m)
 {
 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
 	print_tickdevice(m, tick_get_broadcast_device(), -1);
-	SEQ_printf(m, "tick_broadcast_mask: %08lx\n",
-		   cpumask_bits(tick_get_broadcast_mask())[0]);
+	SEQ_printf(m, "tick_broadcast_mask: %*pb\n",
+		   cpumask_pr_args(tick_get_broadcast_mask()));
 #ifdef CONFIG_TICK_ONESHOT
-	SEQ_printf(m, "tick_broadcast_oneshot_mask: %08lx\n",
-		   cpumask_bits(tick_get_broadcast_oneshot_mask())[0]);
+	SEQ_printf(m, "tick_broadcast_oneshot_mask: %*pb\n",
+		   cpumask_pr_args(tick_get_broadcast_oneshot_mask()));
 #endif
 	SEQ_printf(m, "\n");
 #endif

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tick-broadcast: Fix the printing of broadcast masks
  2015-05-04  5:51 ` Preeti U Murthy
@ 2015-05-13 23:40     ` John Stultz
  0 siblings, 0 replies; 5+ messages in thread
From: John Stultz @ 2015-05-13 23:40 UTC (permalink / raw)
  To: Preeti U Murthy
  Cc: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, linuxppc-dev, lkml

On Sun, May 3, 2015 at 10:51 PM, Preeti U Murthy
<preeti@linux.vnet.ibm.com> wrote:
> Ping.
>
> Any comments on this patch ?
>

Got this queued for testing, and hopefully 4.2

thanks
-john

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tick-broadcast: Fix the printing of broadcast masks
@ 2015-05-13 23:40     ` John Stultz
  0 siblings, 0 replies; 5+ messages in thread
From: John Stultz @ 2015-05-13 23:40 UTC (permalink / raw)
  To: Preeti U Murthy
  Cc: Peter Zijlstra, linuxppc-dev, Thomas Gleixner, Ingo Molnar, lkml

On Sun, May 3, 2015 at 10:51 PM, Preeti U Murthy
<preeti@linux.vnet.ibm.com> wrote:
> Ping.
>
> Any comments on this patch ?
>

Got this queued for testing, and hopefully 4.2

thanks
-john

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-13 23:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28  8:45 [PATCH] tick-broadcast: Fix the printing of broadcast masks Preeti U Murthy
2015-05-04  5:51 ` Preeti U Murthy
2015-05-13 23:40   ` John Stultz
2015-05-13 23:40     ` John Stultz
2015-05-05  8:39 ` [tip:timers/core] " tip-bot for Preeti U Murthy

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.