xen/arm: calculate vgic irq rank based on register size
authorVijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Wed, 9 Jul 2014 04:56:18 +0000 (10:26 +0530)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 10 Jul 2014 12:43:10 +0000 (13:43 +0100)
commit44add14c2e134d00b2eabfa4a306a4a24e3b0a7a
treed6c971e1d8bccc70a65c12918689d40764d76032
parent2673d904822ba2c765ca648f0bc89a3f112394b7
xen/arm: calculate vgic irq rank based on register size

vGIC irq rank was computed assuming the register offset is byte
size.Use the HSR abort address size in calculating register size.

So, with this patch following are achieved
   (1) In the code 'dabt.size != number' this number is always
       BYTE/HALF_WORD/WORD/DOUBLE defined by HSR register.
       Instead of checking for hard coded values use HSR abort
       address size values.
   (2) The vgic_rank_offset also depends on register size to
       compute the rank offset. Though there is no direct relation
       between rank offset computation and HSR dabt.size the same
       values are used to calculate irq rank.

This make vgic_rank_offset generic as it takes register
size as parameter to calculate irq rank instead of hard coding to
value 2 in previous patches

Also, output of REG_RANK_INDEX macro is modulo by 32 to make
sure register index is always within irq rank

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/vgic.c
xen/include/asm-arm/processor.h
xen/include/asm-arm/vgic.h