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:	Wed, 30 Dec 2015 12:41:37 -0600
From:	Felipe Balbi <balbi@...com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Jason Cooper <jason@...edaemon.net>,
	<linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	Suman Anna <s-anna@...com>, Roger Quadros <rogerq@...com>
Subject: Re: Routable IRQs


Hi Thomas,

Thomas Gleixner <tglx@...utronix.de> writes:
> On Tue, 29 Dec 2015, Felipe Balbi wrote:
>> Anyway, the interesting part is that PRUSS has 64 events (on current
>> incarnations at least) and PRUSS has 10 physical IRQ lines to the ARM
>> land. Each of these 64 events can be routed to any of these 10 IRQ
>> lines. This might not be very useful on UP (AM335x & AM437x) other than
>> the fact that soft-IP drivers running on Linux would need to guarantee
>> they are the ones who should handle the IRQ. However, on SMP (AM57xx) we
>> could have real tangible benefits by means of IRQ affinity, etc.
>> 
>> So, the question is, what is there in IRQ subsystem today for routable
>> IRQ support ?
>> 
>> If a Diagram helps here's a simple one. Note that I'm not showing
>> details on the PRUSS side, but that side can also map events pretty much
>> any way it wants.
>> 
>>  .--------------------.             .--------------------.
>>  |      HOST CPU      |             |       PRUSS        |
>>  |--------------------|             |--------------------|
>>  |                    |             |                    |
>>  |               irq0 |<-.----------|evt0                |
>>  |                    |  |          |                    |
>>  |               irq1 |  |  .-------|evt1                |
>>  |                    |  |  |       |                    |
>>  |               irq2 |  '----------|evt2                |
>>  |                    |     |       |                    |
>>  |               irq3 |     |       |                    |
>>  |                    |     |       |                    |
>>  |               irq4 |     |       | .                  |
>>  |                    |     |       |                    |
>>  |               irq5 |     |       | .                  |
>>  |                    |     |       |                    |
>>  |               irq6 |     |       | .                  |
>>  |                    |     |       |                    |
>>  |               irq7 |<----'       |                    |
>>  |                    |             |                    |
>>  |               irq8 |             |                    |
>>  |                    |             |                    |
>>  |               irq9 |<------------|evtN                |
>>  '--------------------'             '--------------------'
>> 
>> Given this setup, what I want to do, is let soft-IP drivers running on
>> linux rely on standard *request_*irq() calls and DTS descrition. But I'm
>> still considering how/if we should describe the routing itself or just
>> go round-robin (i.o.w. irq0 -> evt0, irq1 -> evt1, ..., irq9 -> evt9,
>> irq0 -> evt10, ...).
>> 
>> Thoughts ?
>
> I have a few questions:
>
>  - Is there a "mapping" block between PRUSS and the host interrupt controller
>    or is this "mapping" block part of PRUSS?

The description in TRM is a bit "poor", but from what I can gather, the
mapping is done on an interrupt controller inside the PRUSS. However,
Linux is the one who's got the driver for that INTC (well, Linux will be
the one with the soft ethernet/uart/whatever IP to talk to). All of its
(INTC's) registers are memory mapped to the ARM side.

>  - We all know how well shared interrupts work. Is there a point of supporting
>    64 interrupts when you only have 10 irq lines available?

I'm looking at these 64 events more like MSI kind of events. It's just
that the events themselves can be routed to any of the 10 available HW
IRQ lines.

>  - I assume that the PRUSS interrupt mapping is more or less a question of the
>    firmware implementation. So you either have a fixed association in the
>    firmware which is reflected in the DT description of the IP block or you
>    need an interface to tell the PRUSS firmware which event it should map to
>    which irq line. Is there actually a value in doing the latter?

right, I'd say the mapping is pretty static. Unless Suman has some extra
information which I don't. I guess the question was really to see if
there was an easy way for doing this so we don't have to mess with DTS
for every other FW and their neighbor.

Chances are (or at least I'm speculating) in most cases we won't use
more than 10 events anyway (Suman ?) so we might not run into any
troubles.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ