From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: fweisbec@gmail.com, paul.gortmaker@windriver.com,
paulus@samba.org, shangw@linux.vnet.ibm.com, rjw@sisk.pl,
paulmck@linux.vnet.ibm.com, arnd@arndb.de,
linux-pm@vger.kernel.org, rostedt@goodmis.org,
michael@ellerman.id.au, john.stultz@linaro.org,
chenhui.zhao@freescale.com, deepthi@linux.vnet.ibm.com,
r58472@freescale.com, geoff@infradead.org,
linux-kernel@vger.kernel.org, srivatsa.bhat@linux.vnet.ibm.com,
schwidefsky@de.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V4 6/9] cpuidle/ppc: Add basic infrastructure to enable the broadcast framework on ppc
Date: Mon, 02 Dec 2013 20:57:25 +0530 [thread overview]
Message-ID: <529CA6DD.2050108@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1311291256180.30673@ionos.tec.linutronix.de>
Hi Thomas,
On 11/29/2013 05:28 PM, Thomas Gleixner wrote:
> On Fri, 29 Nov 2013, Preeti U Murthy wrote:
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index b44b52c..cafa788 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -129,6 +129,8 @@ config PPC
>> select GENERIC_CMOS_UPDATE
>> select GENERIC_TIME_VSYSCALL_OLD
>> select GENERIC_CLOCKEVENTS
>> + select GENERIC_CLOCKEVENTS_BROADCAST
>> + select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
>
> What's the point of this config switch? It's nowhere used.
When broadcast IPIs are to be sent, either the "broadcast" method
associated with the local timers is used or an arch-specific method
tick_broadcast() is invoked. For the latter be invoked,
ARCH_HAS_TICK_BROADCAST config needs to be set. On PowerPC, the
broadcast method is not associated with the local timer. Hence we invoke
tick_broadcast(). This function has been added in [PATCH 2/9].
>
>> +static int broadcast_set_next_event(unsigned long evt,
>> + struct clock_event_device *dev)
>> +{
>> + return 0;
>> +}
>> +
>> +static void broadcast_set_mode(enum clock_event_mode mode,
>> + struct clock_event_device *dev)
>> +{
>> + if (mode != CLOCK_EVT_MODE_ONESHOT)
>> + broadcast_set_next_event(DECREMENTER_MAX, dev);
>
> What's the point of calling an empty function?
You are right, this should have remained a dummy function like
broadcast_set_next_event() as per the design of this patchset.
>
>> +}
>> +
>> static void decrementer_set_mode(enum clock_event_mode mode,
>> struct clock_event_device *dev)
>> {
>> @@ -840,6 +869,19 @@ static void register_decrementer_clockevent(int cpu)
>> clockevents_register_device(dec);
>> }
>>
>> +static void register_broadcast_clockevent(int cpu)
>> +{
>> + struct clock_event_device *bc_evt = &bc_timer;
>> +
>> + *bc_evt = broadcast_clockevent;
>> + bc_evt->cpumask = cpu_possible_mask;
>> +
>> + printk_once(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n",
>> + bc_evt->name, bc_evt->mult, bc_evt->shift, cpu);
>> +
>> + clockevents_register_device(bc_evt);
>> +}
>> +
>> static void __init init_decrementer_clockevent(void)
>> {
>> int cpu = smp_processor_id();
>> @@ -854,6 +896,19 @@ static void __init init_decrementer_clockevent(void)
>> register_decrementer_clockevent(cpu);
>> }
>>
>> +static void __init init_broadcast_clockevent(void)
>> +{
>> + int cpu = smp_processor_id();
>> +
>> + clockevents_calc_mult_shift(&broadcast_clockevent, ppc_tb_freq, 4);
>> +
>> + broadcast_clockevent.max_delta_ns =
>> + clockevent_delta2ns(DECREMENTER_MAX, &broadcast_clockevent);
>> + broadcast_clockevent.min_delta_ns =
>> + clockevent_delta2ns(2, &broadcast_clockevent);
>
> clockevents_config()
Right, I will change this to call clockevents_config(). I see that this
needs to be done during the initialization of the decrementer as well.
Will do the same.
Thank you
Regards
Preeti U Murthy
>
> Thanks,
>
> tglx
>
next prev parent reply other threads:[~2013-12-02 16:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 10:41 [PATCH V4 0/9] cpuidle/ppc: Enable deep idle states on PowerNV Preeti U Murthy
2013-11-29 10:41 ` [PATCH V4 1/9] powerpc: Free up the slot of PPC_MSG_CALL_FUNC_SINGLE IPI message Preeti U Murthy
2013-11-29 10:41 ` [PATCH V4 2/9] powerpc: Implement tick broadcast IPI as a fixed " Preeti U Murthy
2013-11-29 10:42 ` [PATCH V4 3/9] cpuidle/ppc: Split timer_interrupt() into timer handling and interrupt handling routines Preeti U Murthy
2013-11-29 10:42 ` [PATCH V4 4/9] powernv/cpuidle: Add context management for Fast Sleep Preeti U Murthy
2013-11-29 10:42 ` [PATCH V4 5/9] powermgt: Add OPAL call to resync timebase on wakeup Preeti U Murthy
2013-11-29 10:43 ` [PATCH V4 6/9] cpuidle/ppc: Add basic infrastructure to enable the broadcast framework on ppc Preeti U Murthy
2013-11-29 11:58 ` Thomas Gleixner
2013-12-02 15:27 ` Preeti U Murthy [this message]
2013-11-29 10:43 ` [PATCH V4 7/9] cpuidle/powernv: Add "Fast-Sleep" CPU idle state Preeti U Murthy
2013-11-29 14:39 ` Thomas Gleixner
2013-12-02 15:07 ` Preeti U Murthy
2013-12-02 18:00 ` Thomas Gleixner
2013-11-29 10:43 ` [PATCH V4 8/9] cpuidle/ppc: Nominate new broadcast cpu on hotplug of the old Preeti U Murthy
2013-11-29 10:43 ` [PATCH V4 9/9] cpuidle/powernv: Parse device tree to setup idle states Preeti U Murthy
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=529CA6DD.2050108@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=arnd@arndb.de \
--cc=chenhui.zhao@freescale.com \
--cc=deepthi@linux.vnet.ibm.com \
--cc=fweisbec@gmail.com \
--cc=geoff@infradead.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=paul.gortmaker@windriver.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=r58472@freescale.com \
--cc=rjw@sisk.pl \
--cc=rostedt@goodmis.org \
--cc=schwidefsky@de.ibm.com \
--cc=shangw@linux.vnet.ibm.com \
--cc=srivatsa.bhat@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).