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]
Date:	Tue, 21 Feb 2012 15:51:29 +0100
From:	"Cousson, Benoit" <b-cousson@...com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
CC:	Grant Likely <grant.likely@...retlab.ca>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	<devicetree-discuss@...ts.ozlabs.org>,
	<linux-kernel@...r.kernel.org>, Milton Miller <miltonm@....com>,
	Rob Herring <rob.herring@...xeda.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	<linuxppc-dev@...ts.ozlabs.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 00/27] irq_domain generalization and rework

On 2/17/2012 6:55 PM, Russell King - ARM Linux wrote:
> On Fri, Feb 17, 2012 at 06:42:31PM +0100, Cousson, Benoit wrote:

[...]

>> @@ -1237,8 +1238,10 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
>>
>>   	pdata->irq_base = status;
>>   	pdata->irq_end = pdata->irq_base + nr_irqs;
>> +#ifdef IRQ_DOMAIN
>>   	irq_domain_add_legacy(node, nr_irqs, pdata->irq_base, 0,
>>   			&irq_domain_simple_ops, NULL);
>> +#endif
> 
> Do you really need this?  If you've tested this, then apparantly the answer
> is no, because it won't ever be built like that.  (You're missing a
> CONFIG_ prefix.)

Ooops, sorry about that.
It was indeed working fine in every cases except for the DT boot :-(

As explain before, for the moment the interrupt domain is used only for the DT boot. It is mandatory do get the interrupt binding to work properly for all the TWL sub modules (RTC...).

> Maybe the only solution to the x86 problem is to ensure that the driver
> includes linux/irq.h ?

Both will be needed to allow a DT boot with OMAP. Here is the updated version.

Regards,
Benoit

---
>From d844a8fc84d4514884356c935967f59d88a00124 Mon Sep 17 00:00:00 2001
From: Benoit Cousson <b-cousson@...com>
Date: Mon, 20 Feb 2012 10:58:34 +0100
Subject: [PATCH] mfd: twl-core: Fix IRQ_DOMAIN dependency

TWL chips might be potentially used on architecture that does not support
ird_domain yet.

Do not call ird_domain API in that case.

Include <linux/irq.h> directly since it will not be included anymore by
<linux/irqdomain.h> if !IRQ_DOMAIN.

Signed-off-by: Benoit Cousson <b-cousson@...com>
---
 drivers/mfd/twl-core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 66f9bff..18c4f93 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -38,6 +38,7 @@
 #include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
+#include <linux/irq.h>
 #include <linux/irqdomain.h>
 
 #include <linux/regulator/machine.h>
@@ -1223,8 +1224,10 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
 	pdata->irq_base = status;
 	pdata->irq_end = pdata->irq_base + nr_irqs;
+#ifdef CONFIG_IRQ_DOMAIN
 	irq_domain_add_legacy(node, nr_irqs, pdata->irq_base, 0,
 			      &irq_domain_simple_ops, NULL);
+#endif
 
 	if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
 		dev_dbg(&client->dev, "can't talk I2C?\n");
-- 
1.7.0.4


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