From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932658AbbCEL0Y (ORCPT ); Thu, 5 Mar 2015 06:26:24 -0500 Received: from mga02.intel.com ([134.134.136.20]:57381 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932229AbbCEL0V (ORCPT ); Thu, 5 Mar 2015 06:26:21 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,346,1422950400"; d="scan'208";a="687298890" Message-ID: <54F83D5B.6020109@linux.intel.com> Date: Thu, 05 Mar 2015 19:26:19 +0800 From: "Li, Aubrey" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "Rafael J. Wysocki" , Alan Cox CC: Borislav Petkov , Arjan van de Ven , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Len.Brown@intel.com, x86@kernel.org, LKML Subject: Re: [PATCH] x86: Bypass legacy PIC and PIT on ACPI hardware reduced platform References: <54F67ACC.3010500@linux.intel.com> <20150304140555.GG3516@pd.tnic> <1425500461.3838.140.camel@linux.intel.com> <8129220.9HmyqjfodP@vostro.rjw.lan> In-Reply-To: <8129220.9HmyqjfodP@vostro.rjw.lan> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/3/5 5:52, Rafael J. Wysocki wrote: > On Wednesday, March 04, 2015 08:21:01 PM Alan Cox wrote: >> On Wed, 2015-03-04 at 15:05 +0100, Borislav Petkov wrote: >>> On Wed, Mar 04, 2015 at 03:16:07PM +0100, Rafael J. Wysocki wrote: >>>> Sort of. What we need is a "do not touch PIC/PIT" bit for the code that >>>> tries to fall back to them in some cases (which may appear to work if >>>> the hardware is physically there, but it may confuse the platform). >>> >>> Can "some cases" detection be nicely put into a x86_platform >>> platform-specific method? >> >> In some cases they don't belong in x86, ACPI is also used for ARM64. >> >> However >> >> if ( has_8259_pic() ) >> >> is trivally 0, 1 or some platform or acpi provided method. > > And which is how that should have been implemented to start with IMO. > > Besides, the "ACPI reduced hardware" case is kind of a red herring here, > because it most likely is not the only case when we'll want has_8259_pic() > to return 0 (quite likely, we'll want that on all BayTrail-based systems, > for example). > BayTrail-based systems has BayTrail-I, BayTrail-M, BayTrail-D, BayTrail-T, BayTrail-T/CR. BayTrail-D is a desktop and BayTrail-M is a mobile/laptop and 8259 exists on both systems and I don't think we want to bypass it. ACPI reduced hardware is the best case in my mind unless you want to enumerate the platform one by one. can we make a global variable u8 has_8259; and initialize it by acpi reduced hardware flag? or a wrapper function? Thanks, -Aubrey