lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140427113358.GB2092@earth.universe>
Date:	Sun, 27 Apr 2014 13:33:59 +0200
From:	Sebastian Reichel <sre@...nel.org>
To:	Pavel Machek <pavel@....cz>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Shubhrajyoti Datta <omaplinuxkernel@...il.com>,
	Carlos Chinea <cch.devel@...il.com>,
	Tony Lindgren <tony@...mide.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Kumar Gala <galak@...eaurora.org>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	Pali Rohár <pali.rohar@...il.com>,
	Ивайло Димитров 
	<freemangordon@....bg>,
	Joni Lapilainen <joni.lapilainen@...il.com>,
	Aaro Koskinen <aaro.koskinen@....fi>
Subject: Re: [PATCHv3 07/14] HSI: Add common DT binding for HSI client devices

On Sun, Apr 27, 2014 at 12:57:55PM +0200, Pavel Machek wrote:
> On Fri 2014-04-25 22:59:27, Sebastian Reichel wrote:
> > On Fri, Apr 25, 2014 at 08:25:36PM +0200, Sebastian Reichel wrote:
> > > On Sat, Apr 19, 2014 at 09:16:12PM +0200, Pavel Machek wrote:
> > > > On Sat 2014-03-29 01:31:43, Sebastian Reichel wrote:
> > > > > Implement and document generic DT bindings for HSI clients.
> > > > > 
> > > > > Signed-off-by: Sebastian Reichel <sre@...nel.org>
> > > > 
> > > > Reviewed-by: Pavel Machek <pavel@....cz>
> > > > 
> > > > > diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c
> > > > > index 07e1639..5973906 100644
> > > > > --- a/drivers/hsi/hsi.c
> > > > > +++ b/drivers/hsi/hsi.c
> > > > > @@ -26,8 +26,14 @@
> > > > >  #include <linux/slab.h>
> > > > >  #include <linux/string.h>
> > > > >  #include <linux/notifier.h>
> > > > > +#include <linux/of.h>
> > > > > +#include <linux/of_device.h>
> > > > >  #include "hsi_core.h"
> > > > 
> > > > 
> > > > > +	err = hsi_of_property_parse_mode(client, "hsi-mode", &mode);
> > > > > +	if (err) {
> > > > > +		err = hsi_of_property_parse_mode(client, "hsi-rx-mode",
> > > > > +						 &cl->rx_cfg.mode);
> > > > > +		if (err)
> > > > > +			goto err;
> > > > > +
> > > > > +		err = hsi_of_property_parse_mode(client, "hsi-tx-mode",
> > > > > +						 &cl->tx_cfg.mode);
> > > > > +		if (err)
> > > > > +			goto err;
> > > > 
> > > > Will this need some #ifdef CONFIG_OF?
> > > 
> > > It would only be needed to reduce the amount of kernel code for
> > > disabled Device Tree. I don't think its worth it, since there is no
> > > platform in the mainline kernel, which uses HSI without DT.
> > 
> > mh actually it is needed, since there is no stub provided for
> > of_modalias_node in non DT mode (there are stubs for all other
> > of_* methods used). I will include the ifdef in PATCHv5.
> 
> Alternatively, you can make driver depend on DT...

I would be ok with making individual HSI client or controller
drivers dependent on DT, but I don't think its a good idea to make
the whole HSI framework dependent on DT.

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ