Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1701020

Re: [PATCH v4 1/5] treewide: Consolidate Apple DMI checks

From Mika Westerberg <mika.westerberg@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 1/5] treewide: Consolidate Apple DMI checks
Date 2017-08-01 15:20 +0200
Message-ID <u9FfA-4tk-11@gated-at.bofh.it> (permalink)
References <u9Ejv-3Ut-7@gated-at.bofh.it> <u9Ejw-3Ut-33@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Tue, Aug 01, 2017 at 02:10:41PM +0200, Lukas Wunner wrote:
> We're about to amend ACPI bus scan with DMI checks whether we're running
> on a Mac to support Apple device properties in AML.  The DMI checks are
> performed for every single device, adding overhead for everything x86
> that isn't Apple, which is the majority.  Rafael and Andy therefore
> request to perform the DMI match only once and cache the result.
> 
> Outside of ACPI various other Apple DMI checks exist and it seems
> reasonable to use the cached value there as well.  Rafael, Andy and
> Darren suggest performing the DMI check in arch code and making it
> available with a header in include/linux/platform_data/x86/.
> 
> To this end, add early_platform_quirks() to arch/x86/kernel/quirks.c
> to perform the DMI check and invoke it from setup_arch().  Switch over
> all existing Apple DMI checks, thereby fixing two deficiencies:
> 
> * They are now #defined to false on non-x86 arches and can thus be
>   optimized away if they're located in cross-arch code.
> 
> * Some of them only match "Apple Inc." but not "Apple Computer, Inc.",
>   which is used by BIOSes released between January 2006 (when the first
>   x86 Macs started shipping) and January 2007 (when the company name
>   changed upon introduction of the iPhone).
> 
> Cc: Lv Zheng <lv.zheng@intel.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Matt Fleming <matt@codeblueprint.co.uk>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Andreas Noever <andreas.noever@gmail.com>
> Cc: Michael Jamet <michael.jamet@intel.com>
> Cc: Yehezkel Bernat <yehezkel.bernat@intel.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>

For the thunderbolt bits:

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v4 1/5] treewide: Consolidate Apple DMI checks Lukas Wunner <lukas@wunner.de> - 2017-08-01 14:20 +0200
  Re: [PATCH v4 1/5] treewide: Consolidate Apple DMI checks Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-08-01 14:40 +0200
    Re: [PATCH v4 1/5] treewide: Consolidate Apple DMI checks Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-08-01 14:50 +0200
  Re: [PATCH v4 1/5] treewide: Consolidate Apple DMI checks Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-08-01 15:20 +0200

csiph-web