diff mbox

[05/16] blackfin idle: delete pm_idle

Message ID 512256A3.6050100@metafoo.de (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Lars-Peter Clausen Feb. 18, 2013, 4:28 p.m. UTC
On 02/10/2013 06:58 AM, Len Brown wrote:
> From: Len Brown <len.brown@intel.com>
> 
> pm_idle is dead code on blackfin.
> 
> Signed-off-by: Len Brown <len.brown@intel.com>
> Cc: uclinux-dist-devel@blackfin.uclinux.org
> ---
>  arch/blackfin/kernel/process.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
> index 3e16ad9..8061426 100644
> --- a/arch/blackfin/kernel/process.c
> +++ b/arch/blackfin/kernel/process.c
> @@ -39,12 +39,6 @@ int nr_l1stack_tasks;
>  void *l1_stack_base;
>  unsigned long l1_stack_len;
>  
> -/*
> - * Powermanagement idle function, if any..
> - */
> -void (*pm_idle)(void) = NULL;
> -EXPORT_SYMBOL(pm_idle);
> -
>  void (*pm_power_off)(void) = NULL;
>  EXPORT_SYMBOL(pm_power_off);
>  
> @@ -81,7 +75,6 @@ void cpu_idle(void)
>  {
>  	/* endless idle loop with no priority at all */
>  	while (1) {
> -		void (*idle)(void) = pm_idle;

Hi,

This results in the following error:

arch/blackfin/kernel/process.c: In function ‘cpu_idle’:
arch/blackfin/kernel/process.c:83: error: ‘idle’ undeclared (first use in
this function)
arch/blackfin/kernel/process.c:83: error: (Each undeclared identifier is
reported only once
arch/blackfin/kernel/process.c:83: error: for each function it appears in.)
arch/blackfin/kernel/process.c:88: error: implicit declaration of function
‘idle’


This change on top of your patch, fixes it.



Otherwise the patch seems to work fine.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Len Brown Feb. 20, 2013, 5:53 p.m. UTC | #1
> Otherwise the patch seems to work fine.

Thanks for testing Lars!
Sorry about breaking the build w/ my slopyness --
will get that patched up.

cheers,
Len Brown, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki Feb. 20, 2013, 7:52 p.m. UTC | #2
On Monday, February 18, 2013 05:28:19 PM Lars-Peter Clausen wrote:
> On 02/10/2013 06:58 AM, Len Brown wrote:
> > From: Len Brown <len.brown@intel.com>
> > 
> > pm_idle is dead code on blackfin.
> > 
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > Cc: uclinux-dist-devel@blackfin.uclinux.org
> > ---
> >  arch/blackfin/kernel/process.c | 7 -------
> >  1 file changed, 7 deletions(-)
> > 
> > diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
> > index 3e16ad9..8061426 100644
> > --- a/arch/blackfin/kernel/process.c
> > +++ b/arch/blackfin/kernel/process.c
> > @@ -39,12 +39,6 @@ int nr_l1stack_tasks;
> >  void *l1_stack_base;
> >  unsigned long l1_stack_len;
> >  
> > -/*
> > - * Powermanagement idle function, if any..
> > - */
> > -void (*pm_idle)(void) = NULL;
> > -EXPORT_SYMBOL(pm_idle);
> > -
> >  void (*pm_power_off)(void) = NULL;
> >  EXPORT_SYMBOL(pm_power_off);
> >  
> > @@ -81,7 +75,6 @@ void cpu_idle(void)
> >  {
> >  	/* endless idle loop with no priority at all */
> >  	while (1) {
> > -		void (*idle)(void) = pm_idle;
> 
> Hi,
> 
> This results in the following error:
> 
> arch/blackfin/kernel/process.c: In function ‘cpu_idle’:
> arch/blackfin/kernel/process.c:83: error: ‘idle’ undeclared (first use in
> this function)
> arch/blackfin/kernel/process.c:83: error: (Each undeclared identifier is
> reported only once
> arch/blackfin/kernel/process.c:83: error: for each function it appears in.)
> arch/blackfin/kernel/process.c:88: error: implicit declaration of function
> ‘idle’
> 
> 
> This change on top of your patch, fixes it.

Lars, I need your sign-off for the patch below.  May I add it?

Rafael


> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
> index 8061426..9782c03 100644
> --- a/arch/blackfin/kernel/process.c
> +++ b/arch/blackfin/kernel/process.c
> @@ -80,12 +80,10 @@ void cpu_idle(void)
>  		if (cpu_is_offline(smp_processor_id()))
>  			cpu_die();
>  #endif
> -		if (!idle)
> -			idle = default_idle;
>  		tick_nohz_idle_enter();
>  		rcu_idle_enter();
>  		while (!need_resched())
> -			idle();
> +			default_idle();
>  		rcu_idle_exit();
>  		tick_nohz_idle_exit();
>  		preempt_enable_no_resched();
> 
> 
> Otherwise the patch seems to work fine.
> 
> - Lars
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lars-Peter Clausen Feb. 20, 2013, 7:53 p.m. UTC | #3
On 02/20/2013 08:52 PM, Rafael J. Wysocki wrote:
> On Monday, February 18, 2013 05:28:19 PM Lars-Peter Clausen wrote:
>> On 02/10/2013 06:58 AM, Len Brown wrote:
>>> From: Len Brown <len.brown@intel.com>
>>>
>>> pm_idle is dead code on blackfin.
>>>
>>> Signed-off-by: Len Brown <len.brown@intel.com>
>>> Cc: uclinux-dist-devel@blackfin.uclinux.org
>>> ---
>>>  arch/blackfin/kernel/process.c | 7 -------
>>>  1 file changed, 7 deletions(-)
>>>
>>> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
>>> index 3e16ad9..8061426 100644
>>> --- a/arch/blackfin/kernel/process.c
>>> +++ b/arch/blackfin/kernel/process.c
>>> @@ -39,12 +39,6 @@ int nr_l1stack_tasks;
>>>  void *l1_stack_base;
>>>  unsigned long l1_stack_len;
>>>  
>>> -/*
>>> - * Powermanagement idle function, if any..
>>> - */
>>> -void (*pm_idle)(void) = NULL;
>>> -EXPORT_SYMBOL(pm_idle);
>>> -
>>>  void (*pm_power_off)(void) = NULL;
>>>  EXPORT_SYMBOL(pm_power_off);
>>>  
>>> @@ -81,7 +75,6 @@ void cpu_idle(void)
>>>  {
>>>  	/* endless idle loop with no priority at all */
>>>  	while (1) {
>>> -		void (*idle)(void) = pm_idle;
>>
>> Hi,
>>
>> This results in the following error:
>>
>> arch/blackfin/kernel/process.c: In function ‘cpu_idle’:
>> arch/blackfin/kernel/process.c:83: error: ‘idle’ undeclared (first use in
>> this function)
>> arch/blackfin/kernel/process.c:83: error: (Each undeclared identifier is
>> reported only once
>> arch/blackfin/kernel/process.c:83: error: for each function it appears in.)
>> arch/blackfin/kernel/process.c:88: error: implicit declaration of function
>> ‘idle’
>>
>>
>> This change on top of your patch, fixes it.
> 
> Lars, I need your sign-off for the patch below.  May I add it?
> 
> Rafael

Sure, I didn't realize the patches had already been merged, otherwise I'd have
sent a proper patch.

- Lars


>> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
>> index 8061426..9782c03 100644
>> --- a/arch/blackfin/kernel/process.c
>> +++ b/arch/blackfin/kernel/process.c
>> @@ -80,12 +80,10 @@ void cpu_idle(void)
>>  		if (cpu_is_offline(smp_processor_id()))
>>  			cpu_die();
>>  #endif
>> -		if (!idle)
>> -			idle = default_idle;
>>  		tick_nohz_idle_enter();
>>  		rcu_idle_enter();
>>  		while (!need_resched())
>> -			idle();
>> +			default_idle();
>>  		rcu_idle_exit();
>>  		tick_nohz_idle_exit();
>>  		preempt_enable_no_resched();
>>
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki Feb. 20, 2013, 7:59 p.m. UTC | #4
On Wednesday, February 20, 2013 08:53:38 PM Lars-Peter Clausen wrote:
> On 02/20/2013 08:52 PM, Rafael J. Wysocki wrote:
> > On Monday, February 18, 2013 05:28:19 PM Lars-Peter Clausen wrote:
> >> On 02/10/2013 06:58 AM, Len Brown wrote:
> >>> From: Len Brown <len.brown@intel.com>
> >>>
> >>> pm_idle is dead code on blackfin.
> >>>
> >>> Signed-off-by: Len Brown <len.brown@intel.com>
> >>> Cc: uclinux-dist-devel@blackfin.uclinux.org
> >>> ---
> >>>  arch/blackfin/kernel/process.c | 7 -------
> >>>  1 file changed, 7 deletions(-)
> >>>
> >>> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
> >>> index 3e16ad9..8061426 100644
> >>> --- a/arch/blackfin/kernel/process.c
> >>> +++ b/arch/blackfin/kernel/process.c
> >>> @@ -39,12 +39,6 @@ int nr_l1stack_tasks;
> >>>  void *l1_stack_base;
> >>>  unsigned long l1_stack_len;
> >>>  
> >>> -/*
> >>> - * Powermanagement idle function, if any..
> >>> - */
> >>> -void (*pm_idle)(void) = NULL;
> >>> -EXPORT_SYMBOL(pm_idle);
> >>> -
> >>>  void (*pm_power_off)(void) = NULL;
> >>>  EXPORT_SYMBOL(pm_power_off);
> >>>  
> >>> @@ -81,7 +75,6 @@ void cpu_idle(void)
> >>>  {
> >>>  	/* endless idle loop with no priority at all */
> >>>  	while (1) {
> >>> -		void (*idle)(void) = pm_idle;
> >>
> >> Hi,
> >>
> >> This results in the following error:
> >>
> >> arch/blackfin/kernel/process.c: In function ‘cpu_idle’:
> >> arch/blackfin/kernel/process.c:83: error: ‘idle’ undeclared (first use in
> >> this function)
> >> arch/blackfin/kernel/process.c:83: error: (Each undeclared identifier is
> >> reported only once
> >> arch/blackfin/kernel/process.c:83: error: for each function it appears in.)
> >> arch/blackfin/kernel/process.c:88: error: implicit declaration of function
> >> ‘idle’
> >>
> >>
> >> This change on top of your patch, fixes it.
> > 
> > Lars, I need your sign-off for the patch below.  May I add it?
> > 
> > Rafael
> 
> Sure, I didn't realize the patches had already been merged, otherwise I'd have
> sent a proper patch.

Please do now, if you can.  Sorry for the trouble.

Thanks,
Rafael
Lars-Peter Clausen Feb. 20, 2013, 8:21 p.m. UTC | #5
On 02/20/2013 08:59 PM, Rafael J. Wysocki wrote:
> On Wednesday, February 20, 2013 08:53:38 PM Lars-Peter Clausen wrote:
>> On 02/20/2013 08:52 PM, Rafael J. Wysocki wrote:
>>> On Monday, February 18, 2013 05:28:19 PM Lars-Peter Clausen wrote:
>>>> On 02/10/2013 06:58 AM, Len Brown wrote:
>>>>> From: Len Brown <len.brown@intel.com>
>>>>>
>>>>> pm_idle is dead code on blackfin.
>>>>>
>>>>> Signed-off-by: Len Brown <len.brown@intel.com>
>>>>> Cc: uclinux-dist-devel@blackfin.uclinux.org
>>>>> ---
>>>>>  arch/blackfin/kernel/process.c | 7 -------
>>>>>  1 file changed, 7 deletions(-)
>>>>>
>>>>> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
>>>>> index 3e16ad9..8061426 100644
>>>>> --- a/arch/blackfin/kernel/process.c
>>>>> +++ b/arch/blackfin/kernel/process.c
>>>>> @@ -39,12 +39,6 @@ int nr_l1stack_tasks;
>>>>>  void *l1_stack_base;
>>>>>  unsigned long l1_stack_len;
>>>>>  
>>>>> -/*
>>>>> - * Powermanagement idle function, if any..
>>>>> - */
>>>>> -void (*pm_idle)(void) = NULL;
>>>>> -EXPORT_SYMBOL(pm_idle);
>>>>> -
>>>>>  void (*pm_power_off)(void) = NULL;
>>>>>  EXPORT_SYMBOL(pm_power_off);
>>>>>  
>>>>> @@ -81,7 +75,6 @@ void cpu_idle(void)
>>>>>  {
>>>>>  	/* endless idle loop with no priority at all */
>>>>>  	while (1) {
>>>>> -		void (*idle)(void) = pm_idle;
>>>>
>>>> Hi,
>>>>
>>>> This results in the following error:
>>>>
>>>> arch/blackfin/kernel/process.c: In function ‘cpu_idle’:
>>>> arch/blackfin/kernel/process.c:83: error: ‘idle’ undeclared (first use in
>>>> this function)
>>>> arch/blackfin/kernel/process.c:83: error: (Each undeclared identifier is
>>>> reported only once
>>>> arch/blackfin/kernel/process.c:83: error: for each function it appears in.)
>>>> arch/blackfin/kernel/process.c:88: error: implicit declaration of function
>>>> ‘idle’
>>>>
>>>>
>>>> This change on top of your patch, fixes it.
>>>
>>> Lars, I need your sign-off for the patch below.  May I add it?
>>>
>>> Rafael
>>
>> Sure, I didn't realize the patches had already been merged, otherwise I'd have
>> sent a proper patch.
> 
> Please do now, if you can.  Sorry for the trouble.
> 

I can send it tomorrow morning, it's on my machine at work.

- Lars

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki Feb. 20, 2013, 9:18 p.m. UTC | #6
On Wednesday, February 20, 2013 09:21:16 PM Lars-Peter Clausen wrote:
> On 02/20/2013 08:59 PM, Rafael J. Wysocki wrote:
> > On Wednesday, February 20, 2013 08:53:38 PM Lars-Peter Clausen wrote:
> >> On 02/20/2013 08:52 PM, Rafael J. Wysocki wrote:
> >>> On Monday, February 18, 2013 05:28:19 PM Lars-Peter Clausen wrote:
> >>>> On 02/10/2013 06:58 AM, Len Brown wrote:
> >>>>> From: Len Brown <len.brown@intel.com>
> >>>>>
> >>>>> pm_idle is dead code on blackfin.
> >>>>>
> >>>>> Signed-off-by: Len Brown <len.brown@intel.com>
> >>>>> Cc: uclinux-dist-devel@blackfin.uclinux.org
> >>>>> ---
> >>>>>  arch/blackfin/kernel/process.c | 7 -------
> >>>>>  1 file changed, 7 deletions(-)
> >>>>>
> >>>>> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
> >>>>> index 3e16ad9..8061426 100644
> >>>>> --- a/arch/blackfin/kernel/process.c
> >>>>> +++ b/arch/blackfin/kernel/process.c
> >>>>> @@ -39,12 +39,6 @@ int nr_l1stack_tasks;
> >>>>>  void *l1_stack_base;
> >>>>>  unsigned long l1_stack_len;
> >>>>>  
> >>>>> -/*
> >>>>> - * Powermanagement idle function, if any..
> >>>>> - */
> >>>>> -void (*pm_idle)(void) = NULL;
> >>>>> -EXPORT_SYMBOL(pm_idle);
> >>>>> -
> >>>>>  void (*pm_power_off)(void) = NULL;
> >>>>>  EXPORT_SYMBOL(pm_power_off);
> >>>>>  
> >>>>> @@ -81,7 +75,6 @@ void cpu_idle(void)
> >>>>>  {
> >>>>>  	/* endless idle loop with no priority at all */
> >>>>>  	while (1) {
> >>>>> -		void (*idle)(void) = pm_idle;
> >>>>
> >>>> Hi,
> >>>>
> >>>> This results in the following error:
> >>>>
> >>>> arch/blackfin/kernel/process.c: In function ‘cpu_idle’:
> >>>> arch/blackfin/kernel/process.c:83: error: ‘idle’ undeclared (first use in
> >>>> this function)
> >>>> arch/blackfin/kernel/process.c:83: error: (Each undeclared identifier is
> >>>> reported only once
> >>>> arch/blackfin/kernel/process.c:83: error: for each function it appears in.)
> >>>> arch/blackfin/kernel/process.c:88: error: implicit declaration of function
> >>>> ‘idle’
> >>>>
> >>>>
> >>>> This change on top of your patch, fixes it.
> >>>
> >>> Lars, I need your sign-off for the patch below.  May I add it?
> >>>
> >>> Rafael
> >>
> >> Sure, I didn't realize the patches had already been merged, otherwise I'd have
> >> sent a proper patch.
> > 
> > Please do now, if you can.  Sorry for the trouble.
> > 
> 
> I can send it tomorrow morning, it's on my machine at work.

That will be fine.

Thanks,
Rafael
diff mbox

Patch

diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 8061426..9782c03 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -80,12 +80,10 @@  void cpu_idle(void)
 		if (cpu_is_offline(smp_processor_id()))
 			cpu_die();
 #endif
-		if (!idle)
-			idle = default_idle;
 		tick_nohz_idle_enter();
 		rcu_idle_enter();
 		while (!need_resched())
-			idle();
+			default_idle();
 		rcu_idle_exit();
 		tick_nohz_idle_exit();
 		preempt_enable_no_resched();