From: joeyli <jlee@suse.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Julian Wollrath <jwollrath@web.de>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [RESEND] Fast TSC calibration fails with v3.14-rc1 and later
Date: Wed, 12 Mar 2014 23:41:39 +0800 [thread overview]
Message-ID: <1394638899.26565.197.camel@linux-s257.site> (raw)
In-Reply-To: <53642014.xoKWERQIvL@vostro.rjw.lan>
Hi Rafael,
於 三,2014-03-12 於 14:30 +0100,Rafael J. Wysocki 提到:
> > But I wonder: Can we simply enable SCI later? In other words, can
> we
> > split acpi_early_init() so that the part before
> acpi_enable_subsystem()
> > is done before timekeeping_init() and the part including and after
> > is done right after anon_vma_init()? Would the TAD initialization
> work
> > then?
>
> Below is a patch implementing that idea. Julian, can you please test
> this one too?
>
> Rafael
>
> ---
> drivers/acpi/bus.c | 20 +++++++++++++++-----
> include/linux/acpi.h | 1 +
> init/main.c | 1 +
> 3 files changed, 17 insertions(+), 5 deletions(-)
>
> Index: linux-pm/drivers/acpi/bus.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/bus.c
> +++ linux-pm/drivers/acpi/bus.c
> @@ -494,11 +494,21 @@ void __init acpi_early_init(void)
> }
>
> status = acpi_load_tables();
> - if (ACPI_FAILURE(status)) {
> - printk(KERN_ERR PREFIX
> - "Unable to load the System Description Tables
> \n");
> - goto error0;
> - }
> + if (ACPI_SUCCESS(status))
> + return;
> +
> + printk(KERN_ERR PREFIX "Unable to load the System Description
> Tables\n");
> +
> + error0:
> + disable_acpi();
> +}
> +
> +void __init acpi_subsystem_init(void)
> +{
> + acpi_status status;
> +
> + if (acpi_disabled)
> + return;
>
After check the DSDT of target machine, I afraid the above patch is not
enough to use _GRT and _SRT because they need opregion support of
SystemMemory and SystemIO for trigger SMM to access RTC.
In my current semifinished patches, I add code to run the
acpi_ev_install_region_handlers() in acpi_enable_subsystem() when
acpi_early_init(), for install region handler to support opregion.
Before install region_handlers, it call acpi_enable() to enable acpi
mode and I think need setup SCI interrupt before run acpi_enable():
acpi_early_init(void)
acpi_pic_sci_set_trigger(acpi_gbl_FADT.sci_interrupt,
acpi_enable_subsystem(u32 flags)
acpi_enable(); /* Enable ACPI mode */
acpi_tb_initialize_facs();
acpi_ev_install_region_handlers(); /* Need it! */
For developing ACPI TAD support, I used SystemIO to access CMOS port in
DSDT of Intel DQ57 for simulate ACPI TAD. It also need SystemIO opregion
support as the real machine. I just run your patch on this machine but
it failed.
I think maybe still using ACPI_FADT_NO_CMOS_RTC to check does
acpi_early_init() need run before timekeeping_init().
If there have any future machine that applied ACPI TAD but "Fast TSC
calibration" fail, at least the alternate TSC calibration can work
around issue.
Thanks a lot!
Joey Lee
next prev parent reply other threads:[~2014-03-12 15:42 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 10:04 [RESEND] Fast TSC calibration fails with v3.14-rc1 and later Julian Wollrath
2014-03-10 10:27 ` Paul Bolle
2014-03-10 14:06 ` Thomas Gleixner
2014-03-10 15:28 ` Paul Bolle
2014-03-10 17:04 ` Thomas Gleixner
2014-03-10 18:32 ` Paul Bolle
2014-03-10 18:57 ` Thomas Gleixner
2014-03-10 19:19 ` Paul Bolle
2014-03-10 20:50 ` Thomas Gleixner
2014-03-10 23:06 ` Paul Bolle
2014-03-11 16:02 ` Thomas Gleixner
2014-03-11 13:27 ` Julian Wollrath
2014-03-10 10:39 ` Thomas Gleixner
2014-03-11 13:29 ` Julian Wollrath
2014-03-11 13:56 ` Thomas Gleixner
2014-03-11 17:15 ` Julian Wollrath
2014-03-12 4:00 ` joeyli
2014-03-12 10:20 ` Julian Wollrath
2014-03-12 13:52 ` joeyli
2014-03-12 11:20 ` Rafael J. Wysocki
2014-03-12 13:30 ` Rafael J. Wysocki
2014-03-12 13:55 ` Julian Wollrath
2014-03-12 15:41 ` joeyli [this message]
2014-03-12 16:20 ` Thomas Gleixner
2014-03-12 16:23 ` Thomas Gleixner
2014-03-12 16:39 ` Thomas Gleixner
2014-03-12 23:27 ` Rafael J. Wysocki
2014-03-12 23:49 ` Thomas Gleixner
2014-03-13 0:13 ` Rafael J. Wysocki
2014-03-13 2:56 ` joeyli
2014-03-13 0:54 ` Thomas Gleixner
2014-03-13 1:01 ` Thomas Gleixner
2014-03-13 2:38 ` joeyli
2014-03-13 3:11 ` H. Peter Anvin
2014-03-13 3:55 ` joeyli
2014-03-13 3:59 ` H. Peter Anvin
2014-03-13 4:12 ` joeyli
2014-03-13 8:12 ` Thomas Gleixner
2014-03-13 8:59 ` joeyli
2014-03-13 3:41 ` H. Peter Anvin
2014-03-12 14:00 ` joeyli
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=1394638899.26565.197.camel@linux-s257.site \
--to=jlee@suse.com \
--cc=hpa@zytor.com \
--cc=jwollrath@web.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox