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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <547DC8B3.1000200@arm.com>
Date:	Tue, 02 Dec 2014 14:12:03 +0000
From:	Marc Zyngier <marc.zyngier@....com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
CC:	Yingjoe Chen <yingjoe.chen@...iatek.com>,
	Mark Rutland <Mark.Rutland@....com>,
	Jason Cooper <jason@...edaemon.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Boris BREZILLON <boris.brezillon@...e-electrons.com>,
	Russell King <linux@....linux.org.uk>,
	Pawel Moll <Pawel.Moll@....com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"hc.yen@...iatek.com" <hc.yen@...iatek.com>,
	"srv_heupstream@...iatek.com" <srv_heupstream@...iatek.com>,
	"yh.chen@...iatek.com" <yh.chen@...iatek.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"grant.likely@...aro.org" <grant.likely@...aro.org>,
	Yijing Wang <wangyijing@...wei.com>,
	Rob Herring <robh+dt@...nel.org>,
	"nathan.chung@...iatek.com" <nathan.chung@...iatek.com>,
	"yingjoe.chen@...il.com" <yingjoe.chen@...il.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	"eddie.huang@...iatek.com" <eddie.huang@...iatek.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Sascha Hauer <kernel@...gutronix.de>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Linux-sh list <linux-sh@...r.kernel.org>
Subject: Re: [PATCH v8 1/4] irqchip: gic: Support hierarchy irq domain.

On 02/12/14 13:55, Geert Uytterhoeven wrote:
> Hi Marc,
> 
> On Tue, Dec 2, 2014 at 2:37 PM, Marc Zyngier <marc.zyngier@....com> wrote:
>> On 02/12/14 13:27, Geert Uytterhoeven wrote:
>>> On Tue, Nov 25, 2014 at 9:04 AM, Yingjoe Chen <yingjoe.chen@...iatek.com> wrote:
>>>> Add support to use gic as a parent for stacked irq domain.
>>>>
>>>> Signed-off-by: Yingjoe Chen <yingjoe.chen@...iatek.com>
>>>
>>> This change (which is now in -next as commit 9a1091ef0017c40a) breaks
>>> booting on r8a7740/armadillo-legacy.
>>>
>>> It hangs because the timers cannot get their interrupts:
>>>
>>> console [tty0] enabled
>>>  sh-tmu.0: ch0: used for clock events
>>>  sh-tmu.0: ch0: used for periodic clock events
>>>  sh-tmu.0: ch0: failed to request irq 230
>>>  sh-tmu.0: ch1: used as clock source
>>>  sh-cmt-48.1: ch0: failed to request irq 90
>>>  sh-cmt-48.1: ch0: registration failed
>>> earlytimer: unable to probe sh-cmt-48 early.
>>> Calibrating delay loop...
>>
>> Grmbl... Are you, by any (lack of) chance, using a setup where the GIC
>> is probed via DT, but the timers have their IRQs hardcoded?
> 
> Yes, the GIC is declared in arch/arm/boot/dts/r8a7740.dtsi:
> 
>         gic: interrupt-controller@...00000 {
>                 compatible = "arm,cortex-a9-gic";
>                 #interrupt-cells = <3>;
>                 interrupt-controller;
>                 reg = <0xc2800000 0x1000>,
>                       <0xc2000000 0x1000>;
>         };
> 
> The timers come from legacy C board code in
> arch/arm/mach-shmobile/setup-r8a7740.c:
> 
> /* CMT */
> static struct sh_timer_config cmt1_platform_data = {
>         .channels_mask = 0x3f,
> };
> 
> static struct resource cmt1_resources[] = {
>         DEFINE_RES_MEM(0xe6138000, 0x170),
>         DEFINE_RES_IRQ(gic_spi(58)),
> };

Yup. This gic_spi() macro is completely doomed, as it computes a
hardware interrupt where the kernel expects a virtual one. The only way
to fix this is to init the GIC outside of DT, so that we stick to a
legacy irqdomain. You can still use information from DT, but you can't
rely on irqchip_init() to produce something that a legacy platform can use.

> The corresponding r8a7740/armadillo-multiplatform works fine.

OK, that's indeed the expected result.

> Still, I'm wondering why sh73a0/kzm9g-legacy is not impacted by this
> change...

I'm a bit lost looking at the shmobile code. But I agree, kzm9g should
die a painful death, as it has the same level of breakage as armadillo.

	M.
-- 
Jazz is not dead. It just smells funny...
--
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