From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: Size of irq field Date: Thu, 2 Apr 2015 16:19:11 +0100 Message-ID: <1427987951.4037.92.camel@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Iurii Konovalenko Cc: Embedded-pv-devel@lists.xenproject.org, Julien Grall , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2015-04-02 at 18:05 +0300, Iurii Konovalenko wrote: > Hi, Julien! > > During bringing up Xen on Renesas Lager board we faced with problem. > A lot of Xen sources relies on statement, that IRQ number is less then > 256 and variables, parameters, fields etc. are of type uint8_t. Please can you give some example of this? Internally most irq stuff is unsigned int I think and "git grep uint8_t.*irq -- xen" is not showing lots of hits, there are a few but none which seem terribly scary or hard to fix. > But we > can have IRQs, that are greater then 255, for example on RCar H2 SoC. > Also, as I saw from one of your latest commits, GICv supports 1020 > physical interrupts. This has always been true, in fact Julien's commit was reducing the limit (which was too high), not increasing it. > As a result, overflow can occur. So it seems > logical to increase all irq staff to uint16_t or uint32_t. We have > local patches for increasing some structures, functions etc. > But before pushing these patches I want to know your opinion, what do > you think about this problem? What type should we use uint16_t or > uint32_t? How to find all places where uint8_t type is used for IRQ? We should certainly fix anywhere which is not using a large enough data type. Ian.