From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759054AbcAKJFD (ORCPT ); Mon, 11 Jan 2016 04:05:03 -0500 Received: from mail.asrmicro.com ([116.236.196.108]:26869 "EHLO mailsh.asrmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758227AbcAKJFA convert rfc822-to-8bit (ORCPT ); Mon, 11 Jan 2016 04:05:00 -0500 Content-class: urn:content-classes:message Subject: RE: [Questions]: how to extend nr_irqs for arch arm64 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8BIT Date: Mon, 11 Jan 2016 17:04:38 +0800 Message-ID: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Questions]: how to extend nr_irqs for arch arm64 Thread-Index: AdFMTUwX8Kyk2if6TLKpUcMMARkOBQAAOhyQ References: From: =?gb2312?B?WmhvdSBRaWFvKNbcx8gp?= To: "Thomas Gleixner" Cc: , Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: Monday, January 11, 2016 4:51 PM > To: Zhou Qiao(ÖÜÇÈ) > Cc: jason@lakedaemon.net; linux-kernel@vger.kernel.org > Subject: RE: [Questions]: how to extend nr_irqs for arch arm64 > > On Mon, 11 Jan 2016, Zhou Qiao(ÖÜÇÈ) wrote: > > I met an issue here. The nr_irqs is extended when the start_irq + cnt > > > nr_irqs. So when nr_irqs is not extended(still 64), a device with a > > large > > hr_irq(70) will get a wrong virq. since it will be mod by nr_irqs > > before > > No, it won't get a wrong virq. It will get a virq and it does not > matter at all whether the hardware irq number is 10, 70, 500 or 5000. > What's your problem? Let's assume the hw_irq is 70, and after the mod operation, it will call irq_alloc_descs_from with parameter from = 6, instead of 70. So the newly allocated descriptor is mapped to hw_irq = 6, not 70. Later when driver registers irq with irq = 70, it will fail since there is no irq descriptor for irq = 70. > > Thanks, > > tglx > >