All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	x86@kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Matt Fleming <matt@codeblueprint.co.uk>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <yehezkel.bernat@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Ronald Tschalaer <ronald@innovation.ch>,
	Federico Lorenzi <florenzi@gmail.com>,
	Leif Liddy <leif.liddy@gmail.com>,
	Daniel Roschka <danielroschka@phoenitydawn.de>,
	Mark Brown <broonie@kernel.org>,
	linux-acpi@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Lv Zheng <lv.zheng@intel.com>,
	Darren Hart <dvhart@infradead.org>
Subject: Re: [PATCH v4 1/5] treewide: Consolidate Apple DMI checks
Date: Tue, 01 Aug 2017 15:42:44 +0300	[thread overview]
Message-ID: <1501591364.29303.318.camel@linux.intel.com> (raw)
In-Reply-To: <1501590904.29303.316.camel@linux.intel.com>

On Tue, 2017-08-01 at 15:35 +0300, Andy Shevchenko wrote:
> On Tue, 2017-08-01 at 14:10 +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).
> 
> 
> I like the idea, though I can repeat what I commented on your Github
> page.
> 
> We might need to distinguish 2006 vs 2007 Apple hardware. Thus, my
> proposal was to use unsigned int (as bitwise flags) instead of bool
> and
> provide two definitions for the hardware. Set those bits accordingly.
> In case of most of the checks it will be the same as in this patch,
> but
> leaves a flexibility of a choice.

Okay, and you answered there.

TWIMC
https://github.com/l1k/linux/commit/20f8b74b83ed45171583fe501182c93e5c6e
b4d9


-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-08-01 12:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 12:10 [PATCH v4 0/5] Apple SPI properties Lukas Wunner
2017-08-01 12:10 ` [PATCH v4 4/5] ACPI / scan: Recognize Apple SPI and I2C slaves Lukas Wunner
2017-08-01 13:12   ` Mika Westerberg
2017-08-01 12:10 ` [PATCH v4 2/5] ACPI / property: Don't evaluate objects for devices w/o handle Lukas Wunner
     [not found] ` <cover.1501570421.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-08-01 12:10   ` [PATCH v4 1/5] treewide: Consolidate Apple DMI checks Lukas Wunner
2017-08-01 12:10     ` Lukas Wunner
     [not found]     ` <20f8b74b83ed45171583fe501182c93e5c6eb4d9.1501570421.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-08-01 12:35       ` Andy Shevchenko
2017-08-01 12:35         ` Andy Shevchenko
2017-08-01 12:42         ` Andy Shevchenko [this message]
2017-08-01 13:11       ` Mika Westerberg
2017-08-01 13:11         ` Mika Westerberg
2017-08-01 12:10 ` [PATCH v4 3/5] ACPI / property: Support Apple _DSM properties Lukas Wunner
2017-08-01 12:10 ` [PATCH v4 5/5] spi: Use Apple device properties in absence of ACPI resources Lukas Wunner
2017-08-01 13:08 ` [PATCH v4 0/5] Apple SPI properties Rafael J. Wysocki
2017-08-01 13:08   ` Rafael J. Wysocki
2017-08-01 13:08   ` Rafael J. Wysocki
2017-08-09 22:42   ` Rafael J. Wysocki
2017-08-09 22:42     ` Rafael J. Wysocki
2017-08-09 22:42     ` Rafael J. Wysocki

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=1501591364.29303.318.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andreas.noever@gmail.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=danielroschka@phoenitydawn.de \
    --cc=dvhart@infradead.org \
    --cc=florenzi@gmail.com \
    --cc=leif.liddy@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=lv.zheng@intel.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ronald@innovation.ch \
    --cc=x86@kernel.org \
    --cc=yehezkel.bernat@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.