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: <52FB52D7.4000906@atmel.com>
Date:	Wed, 12 Feb 2014 11:54:15 +0100
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	Gregory CLEMENT <gregory.clement@...e-electrons.com>,
	Jean-Jacques Hiblot <jjhiblot@...phandler.com>,
	<b.brezillon@...rkiz.com>
CC:	<plagnioj@...osoft.com>, <linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 1/8] at91: dt: Adds support for the bus matrix declaration
 in the DT

On 12/02/2014 11:45, Gregory CLEMENT :
> Hi Jean-Jacques,
> 
> Thanks for this new series, I have one little comment:
> 
> On 12/02/2014 11:06, Jean-Jacques Hiblot wrote:
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@...phandler.com>
>> ---
>>  arch/arm/mach-at91/setup.c | 23 +++++++++++++++++++++++
>>  1 file changed, 23 insertions(+)
>>
>> diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
>> index f7ca97b..b8d0b66 100644
>> --- a/arch/arm/mach-at91/setup.c
>> +++ b/arch/arm/mach-at91/setup.c
>> @@ -487,6 +487,28 @@ end:
>>  	of_node_put(np);
>>  }
>>  
>> +static struct of_device_id matrix_ids[] = {
>> +	{ .compatible = "atmel,at91sam9261-bus-matrix", },
>> +	{ /*sentinel*/ }

I think that we can introduce this compatible string with sam9260
product: "atmel,at91sam9260-bus-matrix".

In addition, can you add this new binding in the documentation file:
Documentation/devicetree/bindings/arm/atmel-at91.txt
(in another patch with the "dt: bindings: " subject prefix + add the DT
mailing-list: devicetree@...r.kernel.org).


>> +};
>> +
>> +static void at91_dt_matrix(void)
>> +{
>> +	struct device_node *np;
>> +
>> +	np = of_find_matching_node(NULL, matrix_ids);
>> +	if (!np) {
>> +		pr_debug("AT91: unable to find compatible bus matrix controller node in dtb\n");
> 
> I think that a panic here should be more consistent with the next check.
> Indeed if it fails here then at91_matrix_base will be uninitialized too,
> and it will make the kernel crash when at91_matrix_base will be accessed.

Yes.

> Thanks,
> 
> Gregory
> 
> 
>> +		return;
>> +	}
>> +
>> +	at91_matrix_base = of_iomap(np, 0);
>> +	if (!at91_matrix_base)
>> +		panic("Impossible to ioremap at91_matrix_base\n");
>> +
>> +	of_node_put(np);
>> +}
>> +
>>  void __init at91rm9200_dt_initialize(void)
>>  {
>>  	at91_dt_ramc();
>> @@ -506,6 +528,7 @@ void __init at91_dt_initialize(void)
>>  	at91_dt_rstc();
>>  	at91_dt_ramc();
>>  	at91_dt_shdwc();
>> +	at91_dt_matrix();
>>  
>>  	/* Init clock subsystem */
>>  	at91_dt_clock_init();
>>
> 
> 


-- 
Nicolas Ferre
--
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