linux/drivers/thunderbolt
Lukas Wunner 630b3aff8a treewide: Consolidate Apple DMI checks
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).

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Suggested-by: Darren Hart <dvhart@infradead.org>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03 23:26:22 +02:00
..
cap.c thunderbolt: Rework capability handling 2017-06-09 11:42:41 +02:00
ctl.c thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
ctl.h thunderbolt: Rework control channel to be more reliable 2017-06-09 11:42:43 +02:00
dma_port.c thunderbolt: Add support for DMA configuration based mailbox 2017-06-09 11:42:43 +02:00
dma_port.h thunderbolt: Add support for DMA configuration based mailbox 2017-06-09 11:42:43 +02:00
domain.c thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
eeprom.c thunderbolt: fix spelling mistake: "missmatch" -> "mismatch" 2017-06-09 11:44:17 +02:00
icm.c treewide: Consolidate Apple DMI checks 2017-08-03 23:26:22 +02:00
Kconfig thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
Makefile thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
nhi_regs.h thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
nhi.c thunderbolt: Add support for Internal Connection Manager (ICM) 2017-06-09 11:42:43 +02:00
nhi.h thunderbolt: Add support for host and device NVM firmware upgrade 2017-06-09 11:42:43 +02:00
path.c thunderbolt: Clear hops before overwriting 2014-08-26 14:54:48 -07:00
switch.c uuid fixups: 2017-07-25 19:46:05 -07:00
tb_msgs.h thunderbolt: use uuid_t instead of uuid_be 2017-07-24 17:50:18 +02:00
tb_regs.h thunderbolt: Rework capability handling 2017-06-09 11:42:41 +02:00
tb.c treewide: Consolidate Apple DMI checks 2017-08-03 23:26:22 +02:00
tb.h thunderbolt: use uuid_t instead of uuid_be 2017-07-24 17:50:18 +02:00
tunnel_pci.c thunderbolt: Introduce thunderbolt bus and connection manager 2017-06-09 11:42:41 +02:00
tunnel_pci.h thunderbolt: Add support for simple pci tunnels 2014-06-19 14:07:47 -07:00