All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
Cc: "Rafael J. Wysocki"
	<rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Ronald Tschalaer <ronald-Cgq6lnktLNMTaf21n8AfGQ@public.gmane.org>,
	Federico Lorenzi
	<florenzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Andy Shevchenko
	<andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Leif Liddy <leif.liddy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Daniel Roschka
	<danielroschka-d2qyoUQsf3ABe69/dCFm4g@public.gmane.org>,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 3/4] ACPI / scan: Recognize Apple SPI and I2C slaves
Date: Thu, 29 Jun 2017 12:22:22 +0300	[thread overview]
Message-ID: <20170629092222.GC629@lahna.fi.intel.com> (raw)
In-Reply-To: <20170629084604.swuzzxsdiiosqurz-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>

On Thu, Jun 29, 2017 at 10:46:04AM +0200, Lukas Wunner wrote:
> On Thu, Jun 29, 2017 at 10:34:20AM +0300, Mika Westerberg wrote:
> > On Wed, Jun 28, 2017 at 07:20:19PM +0200, Lukas Wunner wrote:
> > > --- a/drivers/acpi/scan.c
> > > +++ b/drivers/acpi/scan.c
> > > @@ -1444,6 +1444,12 @@ static bool acpi_is_spi_i2c_slave(struct acpi_device *device)
> > >  	struct list_head resource_list;
> > >  	bool is_spi_i2c_slave = false;
> > >  
> > > +	/* Macs use device properties in lieu of _CRS resources */
> > > +	if (IS_ENABLED(CONFIG_X86) && dmi_match(DMI_SYS_VENDOR, "Apple Inc.") &&
> > 
> > Do we really need these checks?
> 
> With these checks present, searching for the properties can be optimized
> away on ARM and skipped on x86 non-Macs.  (Each property query requires
> decoding the _DSD Package and performing an O(n) search of the properties.)

Well, you add dmi_match() that gets called every time and I was under
the impression that we already performed _DSD decode when the property
set was initially parsed.

Those checks just uglify the code IMHO.

No strong feelings though, so up to Rafael to decide :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-06-29  9:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 17:20 [PATCH v2 0/4] Apple SPI properties Lukas Wunner
2017-06-28 17:20 ` [PATCH v2 2/4] ACPI / property: Support Apple _DSM properties Lukas Wunner
2017-06-28 18:53   ` Andy Shevchenko
2017-07-02 11:07     ` Lukas Wunner
     [not found]       ` <20170702110719.GA825-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-07-03 22:47         ` Rafael J. Wysocki
2017-06-29  7:45   ` Mika Westerberg
     [not found] ` <cover.1498636759.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-06-28 17:20   ` [PATCH v2 1/4] ACPI / property: Don't evaluate objects for devices w/o handle Lukas Wunner
2017-06-29  7:30     ` Mika Westerberg
2017-06-28 17:20   ` [PATCH v2 3/4] ACPI / scan: Recognize Apple SPI and I2C slaves Lukas Wunner
2017-06-29  7:34     ` Mika Westerberg
2017-06-29  8:46       ` Lukas Wunner
     [not found]         ` <20170629084604.swuzzxsdiiosqurz-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-06-29  9:22           ` Mika Westerberg [this message]
2017-06-28 17:20   ` [PATCH v2 4/4] spi: Use Apple device properties in absence of ACPI resources Lukas Wunner
2017-06-28 18:27     ` Mark Brown
     [not found]     ` <bca7fb9e406bbfa9ee7e8457cacd34418ef689be.1498636759.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-06-28 19:14       ` Andy Shevchenko
2017-06-29  7:54       ` Mika Westerberg

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=20170629092222.GC629@lahna.fi.intel.com \
    --to=mika.westerberg-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=danielroschka-d2qyoUQsf3ABe69/dCFm4g@public.gmane.org \
    --cc=florenzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=leif.liddy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
    --cc=rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ronald-Cgq6lnktLNMTaf21n8AfGQ@public.gmane.org \
    /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.