]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip: gicv3-its: Allocate enough memory for the full range of DeviceID
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 6 Mar 2015 16:37:41 +0000 (16:37 +0000)
committerJason Cooper <jason@lakedaemon.net>
Sun, 8 Mar 2015 05:32:52 +0000 (05:32 +0000)
commit124f195fa090dbd3570485ec5beda8895371acc6
tree4664ec806519ff6d594d547d8b31be5bc774fc0a
parentfecdf5a0bdd82105831f9ffb7f6c5f7f4d24c866
irqchip: gicv3-its: Allocate enough memory for the full range of DeviceID

The ITS table allocator is only allocating a single page per table.
This works fine for most things, but leads to silent lack of
interrupt delivery if we end-up with a device that has an ID that is
out of the range defined by a single page of memory. Even worse, depending
on the page size, behaviour changes, which is not a very good experience.

A solution is actually to allocate memory for the full range of ID that
the ITS supports. A massive waste memory wise, but at least a safe bet.

Tested on a Phytium SoC.

Tested-by: Chen Baozi <chenbaozi@kylinos.com.cn>
Acked-by: Chen Baozi <chenbaozi@kylinos.com.cn>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1425659870-11832-3-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
drivers/irqchip/irq-gic-v3-its.c
include/linux/irqchip/arm-gic-v3.h