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]
Date:	Wed, 28 Mar 2007 11:35:55 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	"Michael S. Tsirkin" <mst@....mellanox.co.il>
Cc:	Maxim <maximlevitsky@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jeff Chua <jeff.chua.linux@...il.com>,
	Adrian Bunk <bunk@...sta.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>, pavel@...e.cz,
	linux-pm@...ts.osdl.org, gregkh@...e.de,
	linux-pci@...ey.karlin.mff.cuni.cz,
	Jens Axboe <jens.axboe@...cle.com>,
	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	jgarzik@...ox.com, linux-ide@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [3/6] 2.6.21-rc4: known regressions

On Wed, 28 Mar 2007 20:04:57 +0200 Michael S. Tsirkin wrote:

> > Subject    : first disk access after resume takes several minutes
> >              ('date' does not advance after resume from RAM, CONFIG_NO_HZ=n)
> > References : http://lkml.org/lkml/2007/3/8/117
> >              http://lkml.org/lkml/2007/3/25/20
> > Submitter  : Michael S. Tsirkin <mst@...lanox.co.il>
> 
> ...
> 
> > Subject    : after resume: X hangs after drawing a couple of windows
> > References : http://lkml.org/lkml/2007/3/8/117
> > Submitter  : Michael S. Tsirkin <mst@...lanox.co.il>
> > Status     : unknown
> 
> ...
> 
> > > > > From: Jeff Chua <jeff.chua.linux@...il.com>
> > > > > > It's related. I tested without CONFIG_HPET_TIMER, and now my X60 can
> > > > > > suspend and resume from RAM (s2ram). Even better, it works
> > > > > > with/without CONFIG_NO_HZ.
> > 
> > Quoting Maxim <maximlevitsky@...il.com>:
> > 
> > Hi,
> > 	I almost sure Iknow why this happens,
> > 			The problem is that both hpet clock source
> > 	and hpet clockevents doesn't have a suspend/resume function
> > 	On resume we should enable the main counter _and_ enable
> > 	legacy replacement mode, On my system main counter in
> > 	enabled, by I think by bios, but legacy replacement mode is
> > 	not, so if a system doesn't use lapic as a tick source, but
> > 	use hpet+broadcast, it will hang for sure on resume, and i
> > 	tested it
> > 	
> > 			The patch below is a temporally fix, until
> > 	clock-events and clocksources will get proper suspend/resume
> > 	hooks:
> > 
> > 		Regards,
> > 			Maxim Levitsky
> 
> Bingo!
> 
> The patch below fixes the two problems (listed above) with
> resume from RAM that I have observed on my T60 with
> 2.6.21-rc5: with this patch applied, and with CONFIG_NO_HZ
> unset, date advances correctly, X functions properly and
> there is no delay on first disk access.
> 
> Thanks very much.
> 
> ---
> > Add suspend/resume for HPET
> > Signed-off-by: Maxim Levitsky <maximlevisky@...il.com>
> 
> Maxim, do you plan to send this upstream?

with whitespace fixes, please...


> Acked-by: Michael S. Tsirkin <mst@....mellanox.co.il>
> 
> ---
> 
> diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
> index 0fd9fba..a1ec79e 100644
> --- a/arch/i386/kernel/hpet.c
> +++ b/arch/i386/kernel/hpet.c
> @@ -152,6 +152,16 @@ static void hpet_set_mode(enum clock_event_mode mode,
>  	unsigned long cfg, cmp, now;
>  	uint64_t delta;
>  
> +
> +	if ( mode != CLOCK_EVT_MODE_UNUSED && mode != CLOCK_EVT_MODE_SHUTDOWN)
> +	{

	if (mode != CLOCK_EVT_MODE_UNUSED && mode != CLOCK_EVT_MODE_SHUTDOWN) {

> +		unsigned long cfg = hpet_readl(HPET_CFG);
> +		cfg |= HPET_CFG_ENABLE | HPET_CFG_LEGACY;
> +		hpet_writel(cfg, HPET_CFG);
> +		

delete above line.

> +	}
> +		
> +
>  	switch(mode) {
>  	case CLOCK_EVT_MODE_PERIODIC:
>  		delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * hpet_clockevent.mult;


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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