All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonghwan Choi <jhbird.choi@samsung.com>
To: 'Sachin Kamat' <spk.linux@gmail.com>
Cc: 'linux-samsung-soc' <linux-samsung-soc@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	'Kukjin Kim' <kgene.kim@samsung.com>,
	'Eduardo Valentin' <eduardo.valentin@ti.com>,
	'Jonghwa Lee' <jonghwa3.lee@samsung.com>,
	'Lukasz Majewski' <l.majewski@samsung.com>,
	'Naveen Krishna Chatradhi' <ch.naveen@samsung.com>
Subject: RE: [PATCH] thermal: Add missing cpumask_clear
Date: Sat, 05 Jul 2014 08:37:53 +0900	[thread overview]
Message-ID: <000101cf97e0$f9ba7a50$ed2f6ef0$@samsung.com> (raw)
In-Reply-To: <CAK5sBcHDTgyj67xVWgtNH-Z7XU1Ykp6m650_mWBVp=Az2P6f=Q@mail.gmail.com>

On Fri, Jul 4, 2014 at 8:23 PM, Sachin Kamat <spk.linux@gmail.com> wrote:

> > Cpumasks should be cleared before using.
> 
> Please explain why and what is issue observed without this.
>

-> When I checked the mask value, I knew that unwanted bit is set.

Test code without cpumask_clear.

+       cpumask_set_cpu(0, &mask_val);
+       cpulist_scnprintf(buf, 64, &mask_val);
+       printk("--ID [ %d] = %s \n", id, buf);
+       th_zone->cool_dev[id] = cpufreq_cooling_register(&mask_val);


Console message-> 4.861157] [c6] --ID [ 1] = 0,4-5,7 (4,5,7 cpu bit was set.)

And when I tried to register two cooling devices with cpumask_set_cpu(0, &mask_val) and cpumask_set_cpu(4, &mask_val). 

I found that cpu 0 bit is also set in latter cpumask. (I hope latter cpumask has a cpu 4 bit.)

So I think that cpumask_clear should be inserted.

Thanks.

WARNING: multiple messages have this Message-ID (diff)
From: jhbird.choi@samsung.com (Jonghwan Choi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] thermal: Add missing cpumask_clear
Date: Sat, 05 Jul 2014 08:37:53 +0900	[thread overview]
Message-ID: <000101cf97e0$f9ba7a50$ed2f6ef0$@samsung.com> (raw)
In-Reply-To: <CAK5sBcHDTgyj67xVWgtNH-Z7XU1Ykp6m650_mWBVp=Az2P6f=Q@mail.gmail.com>

On Fri, Jul 4, 2014 at 8:23 PM, Sachin Kamat <spk.linux@gmail.com> wrote:

> > Cpumasks should be cleared before using.
> 
> Please explain why and what is issue observed without this.
>

-> When I checked the mask value, I knew that unwanted bit is set.

Test code without cpumask_clear.

+       cpumask_set_cpu(0, &mask_val);
+       cpulist_scnprintf(buf, 64, &mask_val);
+       printk("--ID [ %d] = %s \n", id, buf);
+       th_zone->cool_dev[id] = cpufreq_cooling_register(&mask_val);


Console message-> 4.861157] [c6] --ID [ 1] = 0,4-5,7 (4,5,7 cpu bit was set.)

And when I tried to register two cooling devices with cpumask_set_cpu(0, &mask_val) and cpumask_set_cpu(4, &mask_val). 

I found that cpu 0 bit is also set in latter cpumask. (I hope latter cpumask has a cpu 4 bit.)

So I think that cpumask_clear should be inserted.

Thanks.

  reply	other threads:[~2014-07-04 23:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04 10:22 [PATCH] thermal: Add missing cpumask_clear Jonghwan Choi
2014-07-04 10:22 ` Jonghwan Choi
2014-07-04 11:23 ` Sachin Kamat
2014-07-04 11:23   ` Sachin Kamat
2014-07-04 23:37   ` Jonghwan Choi [this message]
2014-07-04 23:37     ` Jonghwan Choi
2014-07-05  0:34     ` Tomasz Figa
2014-07-05  0:34       ` Tomasz Figa
2014-07-05  0:40       ` Jonghwan Choi
2014-07-05  0:40         ` Jonghwan Choi
2014-07-05 14:59       ` Sachin Kamat
2014-07-05 14:59         ` Sachin Kamat
2014-07-08 13:56 ` Javi Merino
2014-07-08 13:56   ` Javi Merino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000101cf97e0$f9ba7a50$ed2f6ef0$@samsung.com' \
    --to=jhbird.choi@samsung.com \
    --cc=ch.naveen@samsung.com \
    --cc=eduardo.valentin@ti.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=spk.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.