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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Sep 2013 23:55:53 +0000
From:	"Liu, Chuansheng" <chuansheng.liu@...el.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
CC:	"lenb@...nel.org" <lenb@...nel.org>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Li, Zhuangzhi" <zhuangzhi.li@...el.com>,
	"Li, Fei" <fei.li@...el.com>
Subject: RE: [PATCH] ACPI / osl: implement acpi_os_sleep() with msleep()

Hello Rafael,

> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@...k.pl]
> Sent: Wednesday, September 11, 2013 8:37 PM
> To: Liu, Chuansheng
> Cc: lenb@...nel.org; linux-acpi@...r.kernel.org; linux-kernel@...r.kernel.org;
> Li, Zhuangzhi; Li, Fei
> Subject: Re: [PATCH] ACPI / osl: implement acpi_os_sleep() with msleep()
> 
> On Thursday, September 12, 2013 01:42:57 AM Chuansheng Liu wrote:
> >
> > Currently the acpi_os_sleep() is using the schedule_timeout_interruptible(),
> > which can be interrupted by signal, which causes the real sleep time is
> shorter.
> >
> > According to the ACPI spec:
> > The Sleep term is used to implement long-term timing requirements.
> > Execution is delayed for at least the required number of milliseconds.
> >
> > The sleeping time should be at least of the required number msecs, here
> > using msleep() to implement it.
> >
> > Also if the real time is shorter, we meet the device POWER ON issue.
> 
> What exactly is the "power on" issue?
The case is we have one device _PS0 method in platform.asl like below:
Write the pmcsr REG to power on;
Sleep 10ms;
Read some registers;
...

Here sometimes the actual sleeping time is < 10ms, it causes the following actions failed due this device
need 10ms to power on successfully.

> 
> Rafael
> 
> 
> > CC: lizhuangzhi <zhuangzhi.li@...el.com>
> > CC: Li Fei <fei.li@...el.com>
> > Signed-off-by: liu chuansheng <chuansheng.liu@...el.com>
> > ---
> >  drivers/acpi/osl.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> > index e5f416c..b1629b5 100644
> > --- a/drivers/acpi/osl.c
> > +++ b/drivers/acpi/osl.c
> > @@ -820,7 +820,7 @@ acpi_status acpi_os_remove_interrupt_handler(u32
> irq, acpi_osd_handler handler)
> >
> >  void acpi_os_sleep(u64 ms)
> >  {
> > -	schedule_timeout_interruptible(msecs_to_jiffies(ms));
> > +	msleep(ms);
> >  }
> >
> >  void acpi_os_stall(u32 us)
> >
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ