Re: [PATCH] s2ram: add arch irq disable/enable hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 19, 2007 at 01:00:11PM +0200, Johannes Berg wrote:
> For powermac, we need to do some things between suspending devices and
> device_power_off, for example setting the decrementer. This patch
> allows architectures to define arch_s2ram_{en,dis}able_irqs in their
> asm/suspend.h to have control over this step.
> 
> Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> 
> ---
>  kernel/power/main.c |   14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> --- wireless-dev.orig/kernel/power/main.c	2007-04-17 18:52:24.536830941 +0200
> +++ wireless-dev/kernel/power/main.c	2007-04-17 19:09:40.966830941 +0200
> @@ -128,13 +128,22 @@ static int suspend_prepare(suspend_state
>  	return error;
>  }
>  
> +#ifndef arch_s2ram_disable_irqs
> +#define arch_s2ram_disable_irqs(flags) local_irq_save(*flags)
> +#endif
> +
> +#ifndef arch_s2ram_enable_irqs
> +#define arch_s2ram_enable_irqs(flags) local_irq_restore(*flags)
> +#endif

Can't you just make this a "weak" symbol and override it in your ppc
code if you really need it, and make a "real" function here in this file
for all other arches?

thanks,

greg k-h
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux