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: <878ughuc93.fsf@free.fr>
Date:	Sun, 01 Feb 2015 12:01:12 +0100
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Daniel Mack <daniel@...que.org>
Cc:	Haojian Zhuang <haojian.zhuang@...il.com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM: pxa: fix pxa interrupts handling in DT

Robert Jarzmik <robert.jarzmik@...e.fr> writes:

> The commit "ARM: pxa: arbitrarily set first interrupt number" changed
> the first pxa interrupt to 16.
>
> As a consequence, device-tree builds got broken, because :
>  - pxa_mask_irq() and pxa_unmask_irq() are using IRQ_BIT()
>  - IRQ_BIT(x) calculates the interrupts as : x - PXA_IRQ(0)
>
> Before the commit, the first interrupt shift, PXA_IRQ(0) was 0,
> therefore IRQ_BIT(x) was x. After the change, it is necessary that the
> same shift of 16 is applied between the virtual interrupt number and the
> hardware irq number.
>
> This situation comes from the common irq_chip shared between legacy
> platform builds and device-tree builds.
>
> Fix the broken interrupts in DT case by adding this shift in the DT case
> too.

Actually, this work should be pushed a bit more for the irq_chip functions, so
that they're freed from the IRQ_BIT(x) macro. A more complete work would be to
use BIT(irqd_to_hwirq(d)) instead of IRQ_BIT(d->irq) in :
 - pxa_mask_irq()
 - pxa_unmask_irq()
And add the legacy irq_domain in pxa_init_irq().

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