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] [day] [month] [year] [list]
Message-ID: <54238E13.8040407@linux.intel.com>
Date:	Thu, 25 Sep 2014 11:37:55 +0800
From:	Jiang Liu <jiang.liu@...ux.intel.com>
To:	Jason Cooper <jason@...edaemon.net>
CC:	"Joe.C" <srv_yingjoe.chen@...iatek.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mark Rutland <mark.rutland@....com>,
	Boris BREZILLON <boris.brezillon@...e-electrons.com>,
	Russell King <linux@....linux.org.uk>,
	Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	yh.chen@...iatek.com, linux-kernel@...r.kernel.org,
	srv_heupstream@...iatek.com, devicetree@...r.kernel.org,
	Rob Herring <robh+dt@...nel.org>,
	Matthias Brugger <matthias.bgg@...il.com>,
	nathan.chung@...iatek.com, Sascha Hauer <kernel@...gutronix.de>,
	Kumar Gala <galak@...eaurora.org>,
	Grant Likely <grant.likely@...aro.org>,
	eddie.huang@...iatek.com, yingjoe.chen@...il.com,
	linux-arm-kernel@...ts.infradead.org, hc.yen@...iatek.com
Subject: Re: [PATCH] [RFC] Using hierarchy irqdomian to implement MTK intpol.



On 2014/9/25 11:17, Jason Cooper wrote:
> On Thu, Sep 25, 2014 at 11:04:37AM +0800, Jiang Liu wrote:
>> Hi Joe,
>> 	Thanks, I will merge them into my next version.
>> Regards!
>> Gerry
>>
>> On 2014/9/25 10:16, Joe.C wrote:
>>>
>>> Jiang,
>>>
>>> Please consider merge the following 2 changes into your next round.
> 
> ummm.  I'm confused.  I'll admit I'm a bit liquored up atm, but it looks
> like "Joe C." posted a patch 'From: Joe C.', and 'Signed-off-by: Joe C.'.
> _Then_, Joe C. replied to himself and asked someone *else* to merge the
> below changes into the originally posted patch.  The real kicker is that
> someone responded and said they would do it. (?!)
> 
> Please tell me the scotch is making this look more fucked up than it
> really is...
> 
> Also, if Joe.C could please fix his mailer and git config to produce a
> complete, correct name, that would be appreciated.
Hi Jason,
	Sorry for the confusion:)
	We are trying to extend irqdomain to support hierarchy
irqdomain. The code was originally developed on x86 only, and it's
still in RFC stage. When Joe trying to use hierarchy irqdomain
interfaces on ARM, he found some bugs, so hope that I could take
those bugfixes in next version.
Regards!
Gerry
> 
> thx,
> 
> Jason.
> 
>>> On Thu, 2014-09-25 at 00:04 +0800, Joe.C wrote:
>>>> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
>>>> index e285f3a..01e852b 100644
>>>> --- a/kernel/irq/irqdomain.c
>>>> +++ b/kernel/irq/irqdomain.c
>>>> @@ -467,7 +467,7 @@ unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data)
>>>>  	struct irq_domain *domain;
>>>>  	irq_hw_number_t hwirq;
>>>>  	unsigned int type = IRQ_TYPE_NONE;
>>>> -	unsigned int virq;
>>>> +	int virq;
>>>>  
>>>>  	domain = irq_data->np ? irq_find_host(irq_data->np) : irq_default_domain;
>>>>  	if (!domain) {
>>>> @@ -493,8 +493,8 @@ unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data)
>>>>  	else
>>>>  #endif
>>>>  		virq = irq_create_mapping(domain, hwirq);
>>>> -	if (!virq)
>>>> -		return virq;
>>>> +	if (virq <= 0)
>>>> +		return 0;
>>>>  
>>>>  	/* Set type if specified and different than the current one */
>>>>  	if (type != IRQ_TYPE_NONE &&
>>>
>>> irq_of_parse_and_map()/of_irq_to_resource() expect
>>> irq_create_of_mapping() to return 0 when fail. Return error code will
>>> cause of_irq_to_resource crash.
>>>
>>>
>>>> @@ -716,20 +716,20 @@ const struct irq_domain_ops irq_domain_simple_ops = {
>>>>  };
>>>>  EXPORT_SYMBOL_GPL(irq_domain_simple_ops);
>>>>  
>>>> -static int irq_domain_alloc_descs(int virq, unsigned int nr_irqs,
>>>> +static int irq_domain_alloc_descs(int virq, unsigned int cnt,
>>>>  				  irq_hw_number_t hwirq, int node)
>>>>  {
>>>>  	unsigned int hint;
>>>>  
>>>>  	if (virq >= 0) {
>>>> -		virq = irq_alloc_descs(virq, virq, nr_irqs, node);
>>>> +		virq = irq_alloc_descs(virq, virq, cnt, node);
>>>>  	} else {
>>>>  		hint = hwirq % nr_irqs;
>>>>  		if (hint == 0)
>>>>  			hint++;
>>>> -		virq = irq_alloc_descs_from(hint, nr_irqs, node);
>>>> +		virq = irq_alloc_descs_from(hint, cnt, node);
>>>>  		if (virq <= 0 && hint > 1)
>>>> -			virq = irq_alloc_descs_from(1, nr_irqs, node);
>>>> +			virq = irq_alloc_descs_from(1, cnt, node);
>>>>  	}
>>>>  
>>>>  	return virq;
>>>
>>> This come from irq_create_mapping(), the original code is using global
>>> nr_irqs. Change to match original behavior.
>>>
>>> Joe.C
>>>
>>>
--
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