lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43163258.EoKrB011eQ@vostro.rjw.lan>
Date:	Mon, 16 Feb 2015 20:07:03 +0100
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org, tglx@...utronix.de
Subject: Re: [PATCH 07/35] clockevents: Make suspend/resume calls explicit

On Monday, February 16, 2015 01:14:42 PM Peter Zijlstra wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
> 
> clockevents_notify() is a leftover from the early design of the
> clockevents facility. It's really not a notification mechanism, it's a
> multiplex call.
> 
> We are way better off to have explicit calls instead of this
> monstrosity. Split out the suspend/resume() calls and invoke them
> directly from the call sites.
> 
> No locking required at this point because these calls happen with
> interrupts disabled and a single cpu online.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  arch/x86/xen/suspend.c      |   11 ++++-------
>  include/linux/clockchips.h  |    2 --
>  include/linux/tick.h        |    3 +++
>  kernel/time/clockevents.c   |    9 ---------
>  kernel/time/tick-common.c   |   23 +++++++++++++++++++++--
>  kernel/time/tick-internal.h |    3 ++-
>  kernel/time/timekeeping.c   |    6 ++----
>  7 files changed, 32 insertions(+), 25 deletions(-)

[cut]
 
> Index: linux/include/linux/tick.h
> ===================================================================
> --- linux.orig/include/linux/tick.h
> +++ linux/include/linux/tick.h
> @@ -27,8 +27,11 @@ extern struct tick_device *tick_get_devi
>  
>  #ifdef CONFIG_GENERIC_CLOCKEVENTS
>  extern void __init tick_init(void);
> +/* Should be core only, but XEN resume magic abuses this interface */
> +extern void tick_resume(void);
>  #else /* CONFIG_GENERIC_CLOCKEVENTS */
>  static inline void tick_init(void) { }
> +static inline void tick_resume(void) { }
>  #endif /* !CONFIG_GENERIC_CLOCKEVENTS */
>  
>  #ifdef CONFIG_TICK_ONESHOT

[cut]

> Index: linux/kernel/time/tick-common.c
> ===================================================================
> --- linux.orig/kernel/time/tick-common.c
> +++ linux/kernel/time/tick-common.c
> @@ -372,18 +372,37 @@ void tick_shutdown(unsigned int *cpup)
>  	}
>  }
>  
> +/**
> + * tick_suspend - Suspend the tick and the broadcast device
> + *
> + * Called from syscore_suspend() via timekeeping_suspend with only one
> + * CPU online and interrupts disabled.
> + *
> + * No locks required. Nothing can change the per cpu device.
> + */
>  void tick_suspend(void)
>  {
>  	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
>  
>  	clockevents_shutdown(td->evtdev);
> +	tick_suspend_broadcast();
>  }
>  

The above will slightly conflict with that commit of mine:

http://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=124cf9117c5f93cc5b324530b7e105b09c729d5d

but that's not a big deal I guess.

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ