[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150304201102.GA6530@gmail.com>
Date: Wed, 4 Mar 2015 21:11:03 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Arjan van de Ven <arjan@...ux.intel.com>
Cc: Borislav Petkov <bp@...en8.de>,
"Li, Aubrey" <aubrey.li@...ux.intel.com>,
"alan@...ux.intel.com" <alan@...ux.intel.com>,
"H. Peter Anvin" <hpa@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>, Len.Brown@...el.com,
x86@...nel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Bypass legacy PIC and PIT on ACPI hardware reduced
platform
* Arjan van de Ven <arjan@...ux.intel.com> wrote:
> On 3/4/2015 1:50 AM, Borislav Petkov wrote:
> >On Wed, Mar 04, 2015 at 12:43:08AM -0800, Arjan van de Ven wrote:
> >>>
> >>>Using 'acpi_gbl_reduced_hardware' flag outside the ACPI code
> >>>is a mistake.
> >>
> >>ideally, the presence of that flag in the firmware table will clear/set more global settings,
> >>for example, having that flag should cause the 8042 input code to not probe for the 8042.
> >>
> >>for interrupts, there really ought to be a "apic first/only" mode, which is then used on
> >>all modern systems (not just hw reduced).
> >
> >Do we need some sort of platform-specific querying interfaces now too,
> >similar to cpu_has()? I.e., platform_has()...
> >
> > if (platform_has(X86_PLATFORM_REDUCED_HW))
> > do stuff..
>
> more like
>
> platform_has(X86_PLATFORM_PIT)
>
> etc, one for each legacy io item
Precisely. The main problem is the generic, 'lumps everything
together' nature of the acpi_gbl_reduced_hardware flag.
(Like the big kernel lock lumped together all sorts of locking rules
and semantics.)
Properly split out, feature-ish or driver-ish interfaces for PIT and
other legacy details are the proper approach to 'turn them off'.
- x86_platform is a function pointer driven, driver-ish interface.
- platform_has(X86_PLATFORM_IT) is a flag driven, feature-flag-ish
interface.
Both are fine - for something as separate as the PIT (or the PIC) it
might make more sense to go towards a 'driver' interface though, as
modern drivers are (and will be) much different from the legacy PIT.
Whichever method is used, low level platforms can just switch them
on/off in their enumeration/detection routines, while the generic code
will have them enabled by default.
> so we can clear it on hw reduced, but also in other cases. hw
> reduced is one way, but I'd be surprised if there weren't other ways
> (like quirks) where we'd want to do the same things
Exactly. The key step is the proper, clean separation out of hardware
interfaces.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists