Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751073AbdGMFyC (ORCPT ); Thu, 13 Jul 2017 01:54:02 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:59365 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750748AbdGMFyB (ORCPT ); Thu, 13 Jul 2017 01:54:01 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="21231317" Subject: Re: A question about acpi_early_init(), and want to invoke acpi_early_init() earlier To: "Rafael J. Wysocki" , "Rafael J. Wysocki" References: CC: ACPI Devel Maling List , LKML , Julian Wollrath From: Dou Liyang Message-ID: <66904bb8-36ca-beb3-f19c-4796aae743df@cn.fujitsu.com> Date: Thu, 13 Jul 2017 13:53:47 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: 78FBC46B5243.AB606 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2186 Lines: 75 Hi, Rafael At 07/11/2017 09:26 PM, Dou Liyang wrote: > Hi, Rafael > > Recently, I worked for unify the interrupt delivery mode and do its > setup earlier[1]. And I met a bug about ACPI[2]. > > When I investigated it, I got your *commit c4e1acbb35e4 (ACPI / init: > Invoke early ACPI initialization later).* And I reproduced the > problem you said. > > Question: > -------- > > In the changelog of commit c4e1acbb35e4: > >> Commit 73f7d1ca3263 (ACPI / init: Run acpi_early_init() before >> timekeeping_init()) optimistically moved the early ACPI initialization >> before timekeeping_init(), but that didn't work, because it broke fast >> TSC calibration for Julian Wollrath on Thinkpad x121e (and most likely > Sorry to trouble you again, I forgot cc Julian who reported it. :) Add Cc: Julian Wollrath. Thanks, dou. > Here, does the fast TSC calibration means *quick_pit_calibrate()* ? > >> for others too). The reason is that acpi_early_init() enables the SCI >> and that interferes with the fast TSC calibration mechanism. > > I reproduced it by the following command line: > ...noapic acpi_sci=level... > > the original dmesg is: > > [ 0.000000] tsc: Fast TSC calibration using PIT > > the broken dmesg is: > > [ 0.001000] tsc: PIT calibration matches HPET. 1 loops > > Is it right? If it is wrong, please give the right process for > reproducing. > >> >> Thus follow the original idea to execute acpi_early_init() before >> efi_enter_virtual_mode() to help the EFI people for now and we can >> revisit the other problem that commit 73f7d1ca3263 attempted to >> address in the future (if really necessary). > > If the result which I reproduced was right, I think we can do what > the commit 73f7d1ca3263 attempted to do now. And it also can fix the > bug[2]. > > Because my patchset[1] will setup the interrupt delivery mode earlier > than TSC initialization. So, in Fast TSC calibration, kernel is in its > final interrupt mode, not just PIC mode. The change of trigger type > will never break the Fast TSC calibration(I have tested in my box). > > > [1] https://lkml.org/lkml/2017/6/30/17 > [2] https://lists.gt.net/xen/devel/483350 > > > Thanks, > > dou. >