Re: [PATCH] treewide: Convert clockevents_notify to use int cpu

2015-01-22 Thread Thomas Gleixner
On Wed, 10 Dec 2014, Joe Perches wrote:
> As far as I can tell, there's no value indirecting
> the cpu passed to this function via a void *.
> 
> Update all the callers and called functions from within
> clockevents_notify.

Aside of that there is no value for this 'notification' function at
all. This should be seperate explicit calls. The notify function is a
leftover from the original implementation which used actual notifier
chains. I'll send out a cleanup series later today.

Thanks,

tglx


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


Re: [PATCH] treewide: Convert clockevents_notify to use int cpu

2015-01-09 Thread Thierry Reding
On Wed, Dec 10, 2014 at 03:28:53PM -0800, Joe Perches wrote:
[...]
>  arch/arm/mach-tegra/cpuidle-tegra114.c |  4 ++--
>  arch/arm/mach-tegra/cpuidle-tegra20.c  |  8 
>  arch/arm/mach-tegra/cpuidle-tegra30.c  |  8 
[...]

Acked-by: Thierry Reding 


pgpXYKBHwOOLK.pgp
Description: PGP signature


Re: [PATCH] treewide: Convert clockevents_notify to use int cpu

2014-12-20 Thread Rafael J. Wysocki
On Wednesday, December 10, 2014 03:28:53 PM Joe Perches wrote:
> As far as I can tell, there's no value indirecting
> the cpu passed to this function via a void *.
> 
> Update all the callers and called functions from within
> clockevents_notify.
> 
> Miscellanea:
> 
> Add pr_fmt and convert one printk(KERN_ERR to pr_err

That is fine by me, so

Acked-by: Rafael J. Wysocki 

for the cpuidle and ACPI changes.

> Signed-off-by: Joe Perches 
> ---
>  arch/arm/mach-omap2/cpuidle44xx.c  |  7 +++
>  arch/arm/mach-tegra/cpuidle-tegra114.c |  4 ++--
>  arch/arm/mach-tegra/cpuidle-tegra20.c  |  8 
>  arch/arm/mach-tegra/cpuidle-tegra30.c  |  8 
>  arch/x86/kernel/process.c  |  6 +++---
>  arch/x86/xen/suspend.c |  2 +-
>  drivers/acpi/acpi_pad.c|  9 +
>  drivers/acpi/processor_idle.c  |  4 ++--
>  drivers/cpuidle/driver.c   |  3 +--
>  drivers/idle/intel_idle.c  |  7 +++
>  include/linux/clockchips.h |  6 +++---
>  kernel/sched/idle.c|  4 ++--
>  kernel/time/clockevents.c  | 15 +++
>  kernel/time/hrtimer.c  |  6 ++
>  kernel/time/tick-broadcast.c   | 16 
>  kernel/time/tick-common.c  | 16 
>  kernel/time/tick-internal.h| 18 +-
>  kernel/time/timekeeping.c  |  4 ++--
>  18 files changed, 69 insertions(+), 74 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/cpuidle44xx.c 
> b/arch/arm/mach-omap2/cpuidle44xx.c
> index 01e398a..5d50aa1 100644
> --- a/arch/arm/mach-omap2/cpuidle44xx.c
> +++ b/arch/arm/mach-omap2/cpuidle44xx.c
> @@ -112,7 +112,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device 
> *dev,
>   mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) &&
>(cx->mpu_logic_state == PWRDM_POWER_OFF);
>  
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, cpu_id);
>  
>   /*
>* Call idle CPU PM enter notifier chain so that
> @@ -169,7 +169,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device 
> *dev,
>   if (dev->cpu == 0 && mpuss_can_lose_context)
>   cpu_cluster_pm_exit();
>  
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id);
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, cpu_id);
>  
>  fail:
>   cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
> @@ -184,8 +184,7 @@ fail:
>   */
>  static void omap_setup_broadcast_timer(void *arg)
>  {
> - int cpu = smp_processor_id();
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, smp_processor_id());
>  }
>  
>  static struct cpuidle_driver omap4_idle_driver = {
> diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c 
> b/arch/arm/mach-tegra/cpuidle-tegra114.c
> index f2b586d..3b2fc3f 100644
> --- a/arch/arm/mach-tegra/cpuidle-tegra114.c
> +++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
> @@ -44,7 +44,7 @@ static int tegra114_idle_power_down(struct cpuidle_device 
> *dev,
>   tegra_set_cpu_in_lp2();
>   cpu_pm_enter();
>  
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev->cpu);
>  
>   call_firmware_op(prepare_idle);
>  
> @@ -52,7 +52,7 @@ static int tegra114_idle_power_down(struct cpuidle_device 
> *dev,
>   if (call_firmware_op(do_idle, 0) == -ENOSYS)
>   cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
>  
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev->cpu);
>  
>   cpu_pm_exit();
>   tegra_clear_cpu_in_lp2();
> diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c 
> b/arch/arm/mach-tegra/cpuidle-tegra20.c
> index 4f25a7c..ab30758 100644
> --- a/arch/arm/mach-tegra/cpuidle-tegra20.c
> +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
> @@ -136,11 +136,11 @@ static bool tegra20_cpu_cluster_power_down(struct 
> cpuidle_device *dev,
>   if (tegra20_reset_cpu_1() || !tegra_cpu_rail_off_ready())
>   return false;
>  
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev->cpu);
>  
>   tegra_idle_lp2_last();
>  
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
> + clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev->cpu);
>  
>   if (cpu_online(1))
>   tegra20_wake_cpu1_from_reset();
> @@ -153,13 +153,13 @@ static bool tegra20_idle_enter_lp2_cpu_1(struct 
> cpuidle_device *dev,
>struct cpuidle_driver *drv,
>int index)
>  {
> - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->

[PATCH] treewide: Convert clockevents_notify to use int cpu

2014-12-10 Thread Joe Perches
As far as I can tell, there's no value indirecting
the cpu passed to this function via a void *.

Update all the callers and called functions from within
clockevents_notify.

Miscellanea:

Add pr_fmt and convert one printk(KERN_ERR to pr_err

Signed-off-by: Joe Perches 
---
 arch/arm/mach-omap2/cpuidle44xx.c  |  7 +++
 arch/arm/mach-tegra/cpuidle-tegra114.c |  4 ++--
 arch/arm/mach-tegra/cpuidle-tegra20.c  |  8 
 arch/arm/mach-tegra/cpuidle-tegra30.c  |  8 
 arch/x86/kernel/process.c  |  6 +++---
 arch/x86/xen/suspend.c |  2 +-
 drivers/acpi/acpi_pad.c|  9 +
 drivers/acpi/processor_idle.c  |  4 ++--
 drivers/cpuidle/driver.c   |  3 +--
 drivers/idle/intel_idle.c  |  7 +++
 include/linux/clockchips.h |  6 +++---
 kernel/sched/idle.c|  4 ++--
 kernel/time/clockevents.c  | 15 +++
 kernel/time/hrtimer.c  |  6 ++
 kernel/time/tick-broadcast.c   | 16 
 kernel/time/tick-common.c  | 16 
 kernel/time/tick-internal.h| 18 +-
 kernel/time/timekeeping.c  |  4 ++--
 18 files changed, 69 insertions(+), 74 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle44xx.c 
b/arch/arm/mach-omap2/cpuidle44xx.c
index 01e398a..5d50aa1 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -112,7 +112,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device 
*dev,
mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) &&
 (cx->mpu_logic_state == PWRDM_POWER_OFF);
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, cpu_id);
 
/*
 * Call idle CPU PM enter notifier chain so that
@@ -169,7 +169,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device 
*dev,
if (dev->cpu == 0 && mpuss_can_lose_context)
cpu_cluster_pm_exit();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, cpu_id);
 
 fail:
cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
@@ -184,8 +184,7 @@ fail:
  */
 static void omap_setup_broadcast_timer(void *arg)
 {
-   int cpu = smp_processor_id();
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, smp_processor_id());
 }
 
 static struct cpuidle_driver omap4_idle_driver = {
diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c 
b/arch/arm/mach-tegra/cpuidle-tegra114.c
index f2b586d..3b2fc3f 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra114.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
@@ -44,7 +44,7 @@ static int tegra114_idle_power_down(struct cpuidle_device 
*dev,
tegra_set_cpu_in_lp2();
cpu_pm_enter();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev->cpu);
 
call_firmware_op(prepare_idle);
 
@@ -52,7 +52,7 @@ static int tegra114_idle_power_down(struct cpuidle_device 
*dev,
if (call_firmware_op(do_idle, 0) == -ENOSYS)
cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev->cpu);
 
cpu_pm_exit();
tegra_clear_cpu_in_lp2();
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c 
b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 4f25a7c..ab30758 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -136,11 +136,11 @@ static bool tegra20_cpu_cluster_power_down(struct 
cpuidle_device *dev,
if (tegra20_reset_cpu_1() || !tegra_cpu_rail_off_ready())
return false;
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev->cpu);
 
tegra_idle_lp2_last();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev->cpu);
 
if (cpu_online(1))
tegra20_wake_cpu1_from_reset();
@@ -153,13 +153,13 @@ static bool tegra20_idle_enter_lp2_cpu_1(struct 
cpuidle_device *dev,
 struct cpuidle_driver *drv,
 int index)
 {
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev->cpu);
 
cpu_suspend(0, tegra20_sleep_cpu_secondary_finish);
 
tegra20_cpu_clear_resettable();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EX