All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	kbuild test robot <fengguang.wu@intel.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Stable <stable@vger.kernel.org>
Subject: Re: [PATCH] ACPICA: Fix dispatcher timeout mechanism
Date: Tue, 16 Oct 2018 08:03:30 -0700	[thread overview]
Message-ID: <1539702210.129692.12.camel@acm.org> (raw)
In-Reply-To: <20181016050457.GA6031@kroah.com>

On Tue, 2018-10-16 at 07:04 +0200, Greg KH wrote:
> On Mon, Oct 15, 2018 at 04:01:35PM -0700, Bart Van Assche wrote:
> > On Tue, 2018-10-16 at 00:44 +0200, Rafael J. Wysocki wrote:
> > > On Tue, Oct 16, 2018 at 12:19 AM Bart Van Assche <bvanassche@acm.org> wrote:
> > > > 
> > > > This patch avoids that the following warning is reported during hibernation:
> > > 
> > > Well, what exactly is the problem and why is the patch the right way
> > > to address it?
> > 
> > It is not safe to call ktime_get() after having called timekeeping_suspend().
> > 
> > > >  /*
> > > > diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c
> > > > index 0da96268deb5..9dbea4549484 100644
> > > > --- a/drivers/acpi/acpica/dscontrol.c
> > > > +++ b/drivers/acpi/acpica/dscontrol.c
> > > > @@ -84,8 +84,8 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
> > > >                 control_state->control.package_end =
> > > >                     walk_state->parser_state.pkg_end;
> > > >                 control_state->control.opcode = op->common.aml_opcode;
> > > > -               control_state->control.loop_timeout = acpi_os_get_timer() +
> > > > -                   (u64)(acpi_gbl_max_loop_iterations * ACPI_100NSEC_PER_SEC);
> > > > +               control_state->control.loop_timeout = jiffies +
> > > > +                   acpi_gbl_max_loop_iterations * HZ;
> > > 
> > > jiffies is Linux-specific and so it should not be used in the ACPICA code.
> > 
> > Really? There is plenty of other ACPI code that uses the jiffies counter directly.
> > Why wouldn't it be allowed to use the jiffies counter in this context since there
> > is so much other ACPI code that uses that counter?
> 
> acpica is different from acpi.  It is the "core acpi code" that is
> shared across other operating systems.  That is why jiffies does not
> work in it :(

Thanks Greg for the feedback. I wasn't aware of the difference between ACPICA and
other ACPI code.

Bart.

      reply	other threads:[~2018-10-16 15:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 22:18 [PATCH] ACPICA: Fix dispatcher timeout mechanism Bart Van Assche
2018-10-15 22:44 ` Rafael J. Wysocki
2018-10-15 23:01   ` Bart Van Assche
2018-10-16  5:04     ` Greg KH
2018-10-16 15:03       ` Bart Van Assche [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1539702210.129692.12.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.