All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sanil, Shruthi" <shruthi.sanil@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Cc: "andriy.shevchenko@linux.intel.com" 
	<andriy.shevchenko@linux.intel.com>,
	"kris.pan@linux.intel.com" <kris.pan@linux.intel.com>,
	"mgross@linux.intel.com" <mgross@linux.intel.com>,
	"Thokala, Srikanth" <srikanth.thokala@intel.com>,
	"Raja Subramanian,
	Lakshmi Bai"  <lakshmi.bai.raja.subramanian@intel.com>,
	"Sangannavar,
	Mallikarjunappa"  <mallikarjunappa.sangannavar@intel.com>
Subject: RE: [PATCH v6 2/2] clocksource: Add Intel Keem Bay timer support
Date: Thu, 25 Nov 2021 17:29:27 +0000	[thread overview]
Message-ID: <BN9PR11MB5545B71113E29434FB5EA96FF1629@BN9PR11MB5545.namprd11.prod.outlook.com> (raw)
In-Reply-To: 87lf3jaubj.ffs@tglx

Hi Thomas

> -----Original Message-----
> From: Sanil, Shruthi
> Sent: Thursday, November 11, 2021 4:12 PM
> To: Thomas Gleixner <tglx@linutronix.de>; daniel.lezcano@linaro.org;
> robh+dt@kernel.org; linux-kernel@vger.kernel.org;
> devicetree@vger.kernel.org
> Cc: andriy.shevchenko@linux.intel.com; kris.pan@linux.intel.com;
> mgross@linux.intel.com; Thokala, Srikanth <srikanth.thokala@intel.com>;
> Raja Subramanian, Lakshmi Bai <lakshmi.bai.raja.subramanian@intel.com>;
> Sangannavar, Mallikarjunappa <mallikarjunappa.sangannavar@intel.com>
> Subject: RE: [PATCH v6 2/2] clocksource: Add Intel Keem Bay timer support
> 
> > -----Original Message-----
> > From: Thomas Gleixner <tglx@linutronix.de>
> > Sent: Monday, September 27, 2021 3:11 AM
> > To: Sanil, Shruthi <shruthi.sanil@intel.com>;
> > daniel.lezcano@linaro.org;
> > robh+dt@kernel.org; linux-kernel@vger.kernel.org;
> > devicetree@vger.kernel.org
> > Cc: andriy.shevchenko@linux.intel.com; kris.pan@linux.intel.com;
> > mgross@linux.intel.com; Thokala, Srikanth
> > <srikanth.thokala@intel.com>; Raja Subramanian, Lakshmi Bai
> > <lakshmi.bai.raja.subramanian@intel.com>;
> > Sangannavar, Mallikarjunappa <mallikarjunappa.sangannavar@intel.com>;
> > Sanil, Shruthi <shruthi.sanil@intel.com>
> > Subject: Re: [PATCH v6 2/2] clocksource: Add Intel Keem Bay timer
> > support
> >
> > On Tue, Sep 07 2021 at 00:06, shruthi sanil wrote:
> > > +
> > > +/* Provides a unique ID for each timer */ static
> > > +DEFINE_IDA(keembay_timer_ida);
> >
> > > +
> > > +	timer_id = ida_alloc(&keembay_timer_ida, GFP_KERNEL);
> > > +	if (timer_id < 0) {
> > > +		ret = timer_id;
> > > +		goto err_keembay_ce_to_free;
> > > +	}
> >
> > May I ask what the purpose of the IDA, which is backed by a full blown
> > xarray, is here?
> >
> > AFAICT all you want is a unique number for the timer name for up to 8
> > timers.
> >
> > > +	timer_name = kasprintf(GFP_KERNEL, "keembay_timer%d",
> > timer_id);
> >
> > So what's wrong about:
> >
> > static unsigned int keembay_timer_id;
> >
> > 	timer_name = kasprintf(GFP_KERNEL, "keembay_timer%d",
> > keembay_timer_id++);
> >
> > Hmm?
> 
> Yes, we had initially implemented it in the similar way, but in the course of
> review it got changed to use IDA.
> 
> >
> > > +
> > > +	clockevents_config_and_register(&keembay_ce_to->clkevt,
> > > +					timer_of_rate(keembay_ce_to),
> > > +					1,
> > > +					U32_MAX);
> >
> > Aside of that what's the point of registering more than one of those
> > timers as clock event? The core will only use one and the rest is just
> > going to use memory for no value.
> 
> Instead of
> keembay_ce_to->clkevt.cpumask = cpumask_of(0); can I update it as
> keembay_ce_to->clkevt.cpumask = cpu_possible_mask; so that each timer
> would be associated with different cores?
> 

Could you please help me with the above query?

Thanks,
Shruthi

> Thanks,
> Shruthi
> 
> >
> > Thanks,
> >
> >         tglx

  parent reply	other threads:[~2021-11-25 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 18:36 [PATCH v6 0/2] Add the driver for Intel Keem Bay SoC timer block shruthi.sanil
2021-09-06 18:36 ` [PATCH v6 1/2] dt-bindings: timer: Add bindings for Intel Keem Bay SoC Timer shruthi.sanil
2021-09-07 11:49   ` Rob Herring
2021-09-06 18:36 ` [PATCH v6 2/2] clocksource: Add Intel Keem Bay timer support shruthi.sanil
2021-09-26 21:41   ` Thomas Gleixner
2021-11-11 10:42     ` Sanil, Shruthi
2021-12-23 14:16       ` Daniel Lezcano
2021-12-24  9:40         ` Sanil, Shruthi
2021-11-25 17:29     ` Sanil, Shruthi [this message]
2021-12-15 16:23     ` Sanil, Shruthi

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=BN9PR11MB5545B71113E29434FB5EA96FF1629@BN9PR11MB5545.namprd11.prod.outlook.com \
    --to=shruthi.sanil@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kris.pan@linux.intel.com \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mallikarjunappa.sangannavar@intel.com \
    --cc=mgross@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=srikanth.thokala@intel.com \
    --cc=tglx@linutronix.de \
    /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.