All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jon-hunter@ti.com>
To: "Bedia, Vaibhav" <vaibhav.bedia@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	linux-arm <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/5] ARM: OMAP2+: Display correct system timer name
Date: Fri, 1 Feb 2013 04:34:27 -0600	[thread overview]
Message-ID: <510B9A33.1070706@ti.com> (raw)
In-Reply-To: <B5906170F1614E41A8A28DE3B8D121433ED073A5@DBDE01.ent.ti.com>


On 02/01/2013 03:31 AM, Bedia, Vaibhav wrote:
> On Fri, Feb 01, 2013 at 14:23:43, Hunter, Jon wrote:
> [...]
>>>>  
>>>> +/* Timer name needs to be big enough to store a string of "timerXX" */
>>>> +static char timer_name[10];
>>>> +
>>>
>>> Why not move this inside omap_dm_timer_init_one()?
>>
>> In the non-DT case, the name member of the clocksource/event struct will
>> point to this array and so it needs to reside in memory permanently and
>> not just temporary. Once we migrate completely to DT then we will be
>> able to remove this completely. See following snippet ...
>>
>> -		sprintf(name, "timer%d", gptimer_id);
>> -		oh_name = name;
>> +		sprintf(timer_name, "timer%d", gptimer_id);
>> +		*name = timer_name;
> 
> Ok. But in case of non-DT boot if someone selects gptimers for both clkevt and
> clksrc, both the name members will end up pointing to the same memory location.
> To be specific, in the current code the clkevt timer name will point to the clksrc
> name. This won't be noticeable during boot since the clkevt name gets printed
> before it is over-written.

Yes you are right! Good catch. Will fix that.

Cheers
Jon

WARNING: multiple messages have this Message-ID (diff)
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] ARM: OMAP2+: Display correct system timer name
Date: Fri, 1 Feb 2013 04:34:27 -0600	[thread overview]
Message-ID: <510B9A33.1070706@ti.com> (raw)
In-Reply-To: <B5906170F1614E41A8A28DE3B8D121433ED073A5@DBDE01.ent.ti.com>


On 02/01/2013 03:31 AM, Bedia, Vaibhav wrote:
> On Fri, Feb 01, 2013 at 14:23:43, Hunter, Jon wrote:
> [...]
>>>>  
>>>> +/* Timer name needs to be big enough to store a string of "timerXX" */
>>>> +static char timer_name[10];
>>>> +
>>>
>>> Why not move this inside omap_dm_timer_init_one()?
>>
>> In the non-DT case, the name member of the clocksource/event struct will
>> point to this array and so it needs to reside in memory permanently and
>> not just temporary. Once we migrate completely to DT then we will be
>> able to remove this completely. See following snippet ...
>>
>> -		sprintf(name, "timer%d", gptimer_id);
>> -		oh_name = name;
>> +		sprintf(timer_name, "timer%d", gptimer_id);
>> +		*name = timer_name;
> 
> Ok. But in case of non-DT boot if someone selects gptimers for both clkevt and
> clksrc, both the name members will end up pointing to the same memory location.
> To be specific, in the current code the clkevt timer name will point to the clksrc
> name. This won't be noticeable during boot since the clkevt name gets printed
> before it is over-written.

Yes you are right! Good catch. Will fix that.

Cheers
Jon

  reply	other threads:[~2013-02-01 10:34 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 17:04 [PATCH 0/5] ARM: OMAP2+: System timer updates Jon Hunter
2013-01-30 17:04 ` Jon Hunter
2013-01-30 17:04 ` [PATCH 1/5] ARM: OMAP2+: Display correct system timer name Jon Hunter
2013-01-30 17:04   ` Jon Hunter
2013-02-01  8:41   ` Bedia, Vaibhav
2013-02-01  8:41     ` Bedia, Vaibhav
2013-02-01  8:53     ` Jon Hunter
2013-02-01  8:53       ` Jon Hunter
2013-02-01  9:31       ` Bedia, Vaibhav
2013-02-01  9:31         ` Bedia, Vaibhav
2013-02-01 10:34         ` Jon Hunter [this message]
2013-02-01 10:34           ` Jon Hunter
2013-01-30 17:04 ` [PATCH 2/5] ARM: OMAP2+: Remove hard-coded test on timer ID Jon Hunter
2013-01-30 17:04   ` Jon Hunter
2013-01-30 17:04 ` [PATCH 3/5] ARM: OMAP2+: Simplify system timer clock definitions Jon Hunter
2013-01-30 17:04   ` Jon Hunter
2013-01-30 17:04 ` [PATCH 4/5] ARM: OMAP2+: Simplify system timers definitions Jon Hunter
2013-01-30 17:04   ` Jon Hunter
2013-01-31  9:09   ` Igor Grinberg
2013-01-31  9:09     ` Igor Grinberg
2013-02-04 15:27   ` Jon Hunter
2013-02-04 15:27     ` Jon Hunter
2013-01-30 17:04 ` [PATCH 5/5] ARM: OMAP3: Update clocksource timer selection Jon Hunter
2013-01-30 17:04   ` Jon Hunter
2013-01-31  9:08   ` Igor Grinberg
2013-01-31  9:08     ` Igor Grinberg
2013-01-31 16:07     ` Jon Hunter
2013-01-31 16:07       ` Jon Hunter
2013-02-01  8:41   ` Bedia, Vaibhav
2013-02-01  8:41     ` Bedia, Vaibhav
2013-02-01  8:59     ` Jon Hunter
2013-02-01  8:59       ` Jon Hunter
2013-02-01  9:25       ` Jon Hunter
2013-02-01  9:25         ` Jon Hunter
2013-02-01  9:31         ` Bedia, Vaibhav
2013-02-01  9:31           ` Bedia, Vaibhav
2013-01-31  9:40 ` [PATCH 0/5] ARM: OMAP2+: System timer updates Santosh Shilimkar
2013-01-31  9:40   ` Santosh Shilimkar
2013-02-01  8:41 ` Bedia, Vaibhav
2013-02-01  8:41   ` Bedia, Vaibhav

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=510B9A33.1070706@ti.com \
    --to=jon-hunter@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=vaibhav.bedia@ti.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.