]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic-v3-its: Cap lpi_id_bits to reduce memory footprint
authorJia He <jia.he@hxt-semitech.com>
Tue, 28 Aug 2018 04:53:26 +0000 (12:53 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 6 Sep 2018 18:31:59 +0000 (20:31 +0200)
commit7d51008e4fcbd8dde4859bc1b6f37145bb5a2b77
tree054aea44858a88290923e207e44be7f26ebd1623
parent83cbb668975cbf33e9d0cabb4b02b9de0cae6574
irqchip/gic-v3-its: Cap lpi_id_bits to reduce memory footprint

Commit cd6c530221cc ("irqchip/gic-v3-its: Use full range of LPIs"), removes
the cap for lpi_id_bits, which causes the following warning to trigger on a
QDF2400 server:

 WARNING: CPU: 0 PID: 0 at mm/page_alloc.c:4066  __alloc_pages_nodemask
 ...
 Call trace:
  __alloc_pages_nodemask+0x2d8/0x1188
  alloc_pages_current+0x8c/0xd8
  its_allocate_prop_table+0x5c/0xb8
  its_init+0x220/0x3c0
  gic_init_bases+0x250/0x380
  gic_acpi_init+0x16c/0x2a4

In its_alloc_lpi_tables(), lpi_id_bits is 24 in QDF2400. The allocation in
allocate_prop_table() tries therefore to allocate 16M (order 12 if
pagesize=4k), which triggers the warning.

As said by MarcL

 Capping lpi_id_bits at 16 (which is what we had before) is plenty,
 will save a some memory, and gives some margin before we need to push
 it up again.

Bring the upper limit of lpi_id_bits back to prevent

Fixes: cd6c530221cc ("irqchip/gic-v3-its: Use full range of LPIs")
Suggested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jia He <jia.he@hxt-semitech.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Olof Johansson <olof@lixom.net>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lkml.kernel.org/r/1535432006-2304-1-git-send-email-jia.he@hxt-semitech.com
drivers/irqchip/irq-gic-v3-its.c