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: <20140820154358.GA27927@xora-yoga-deb.xora.org.uk>
Date:	Wed, 20 Aug 2014 16:43:58 +0100
From:	"graeme.gregory@...aro.org" <graeme.gregory@...aro.org>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	Grant Likely <grant.likely@...aro.org>,
	"hanjun.guo@...aro.org" <hanjun.guo@...aro.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Mark Rutland <Mark.Rutland@....com>,
	Arnd Bergmann <arnd@...db.de>,
	Sudeep Holla <Sudeep.Holla@....com>,
	Will Deacon <Will.Deacon@....com>,
	Jason Cooper <jason@...edaemon.net>,
	Marc Zyngier <Marc.Zyngier@....com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Mark Brown <broonie@...aro.org>,
	Robert Richter <rric@...nel.org>,
	Lv Zheng <lv.zheng@...el.com>,
	Robert Moore <robert.moore@...el.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Liviu Dudau <Liviu.Dudau@....com>,
	Randy Dunlap <rdunlap@...radead.org>,
	Charles Garcia-Tobin <Charles.Garcia-Tobin@....com>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linaro-acpi-private@...aro.org" <linaro-acpi-private@...aro.org>
Subject: Re: [PATCH 06/19] ARM64 / ACPI: Parse FADT table to get PSCI flags
 for PSCI init

On Wed, Aug 20, 2014 at 04:29:44PM +0100, Catalin Marinas wrote:
> On Wed, Aug 20, 2014 at 04:00:28PM +0100, Grant Likely wrote:
> > On Thu, 24 Jul 2014 21:00:12 +0800, Hanjun Guo <hanjun.guo@...aro.org> wrote:
> > > @@ -345,13 +378,19 @@ int __init psci_init(void)
> > >  	const struct of_device_id *matched_np;
> > >  	psci_initcall_t init_fn;
> > >  
> > > -	np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
> > > +	if (acpi_disabled) {
> > > +		np = of_find_matching_node_and_match(NULL,
> > > +				psci_of_match, &matched_np);
> > >  
> > > -	if (!np)
> > > -		return -ENODEV;
> > > +		if (!np)
> > > +			return -ENODEV;
> > > +
> > > +		init_fn = (psci_initcall_t)matched_np->data;
> > > +
> > > +		return init_fn(np);
> > > +	}
> > >  
> > > -	init_fn = (psci_initcall_t)matched_np->data;
> > > -	return init_fn(np);
> > > +	return psci_0_2_init_acpi();
> > >  }
> > 
> > So, while the functionality is sound, this is kind of a stinky diff. The
> > ACPI path should not push the OF code into a sub branch. Make it look
> > like this instead (with the advantage that the diff will be simpler):
> > 
> > +	if (IS_ENABLED(CONFIG_ACPI) && !acpi_disabled)
> > +		return psci_0_2_init_acpi();
> 
> Minor point: we should define acpi_disabled to 1 when !CONFIG_ACPI and
> avoid additional IS_ENABLED(CONFIG_ACPI) checks (unless already don this
> way).
> 
This is the default behaviour already.

Graeme

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ