From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 116EDC433FE for ; Mon, 11 Apr 2022 13:34:16 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nduBG-0000Ez-3g; Mon, 11 Apr 2022 09:34:10 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nduBD-0000Eo-KT for kernelnewbies@kernelnewbies.org; Mon, 11 Apr 2022 09:34:07 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id EA91B320204E; Mon, 11 Apr 2022 09:34:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 11 Apr 2022 09:34:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1649684045; x=1649770445; bh=caJZDEfzer uh1ikqfREk8BADM+a06wvmTDVtAf9bAOY=; b=X3L6KAp88c5WbZm8DEjMtQOxu1 VsxYKmKLmDW8ZwzqkM/RCkIV7EL1uHI9jhSgR2dFQ5WxZm1sEh20/TBwkdfn9Mcz KEKu9aLYR8CJqd99TAeLYdIddmAGtE586zcSkcmtJF29iyRHa5pQEfyO8F1qLZUV bjYOu52Xc0E9ZSNndvHHkR/hM8NhDxEiQ04rdrkJlo6vTMHHyiGY5lzPyoixDW0N uw68jUXotdwIiDfPrqqKqwGPU1tWpQsV1TK10AtidQPMSSm/rJa0OQgG98pZr/sY 0XzMgsV5gio1SXXPl+H7oqZtm8RcRarfPvtJhO3wGSpvoEm7RKz3lQ1Q1KHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1649684045; x= 1649770445; bh=caJZDEfzeruh1ikqfREk8BADM+a06wvmTDVtAf9bAOY=; b=m 3UzvgN90sXSXzP/JoCwT8vA/oSFcsHsqo2nYPDuY4PcI5Kb/pRuBCy71AC0cM+g2 xMaUrmcXcZBf8HNZJywWYS4s0xQN8NWkb9J12u0OcAWvFxaonoZOQNuL+AAbipFY y2g83cRpk3wL1rVXVSY2VzhU2UrHhjDSwOaE1zS2bfPh+72Wp3q4E4m4WUzgK/eh Wg6ykVd30T2Xky/JXAZlnjdm6CuTPgScoxlRg3gDN7zD8h2qdUgMnt5x9LbwWhER Qp4cPIzoYQJSQYgd3pUSb6b/eLCqWMlTHHnkd8wA4gtHOkEicLJC1EnWcg2qCfXj IzxDRHGs+Zi48wSyrZwmQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekiedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpedkifhrvghg ucfmjfdkuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeeihf eghefghfevveekueeiieeghedvhfeludevgfeujedvleeufeegtdduleeufeenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhroh grhhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 09:34:03 -0400 (EDT) Date: Mon, 11 Apr 2022 15:34:02 +0200 From: 'Greg KH' To: Chan Kim Subject: Re: Can't understand /proc/interrupts output for GICv3 case Message-ID: References: <049201d84b04$951cbab0$bf563010$@etri.re.kr> <06c401d84da0$bc1a5ca0$344f15e0$@etri.re.kr> <06cf01d84da5$f7a1fa80$e6e5ef80$@etri.re.kr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <06cf01d84da5$f7a1fa80$e6e5ef80$@etri.re.kr> Cc: kernelnewbies@kernelnewbies.org, 'qemu-discuss' X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Mon, Apr 11, 2022 at 10:13:42PM +0900, Chan Kim wrote: > Hi, Greg K-H, > Thanks for replyaing. > > > > You ask the system for it. It depends on the bus type your driver is > > written for for how to do this. > > > > For example, if you have a platform driver, you would call > > platform_get_irq(). If you are a pci driver, the irq for your device is > > already stored in the pci device structure passed into your probe > function. > > > > What bus type is your driver written for? > > > That sounds very logical. In my case I added it to system bus. What exactly do you mean by "system bus"? > This is the qemu code making fdt. > > static void create_ab21q_axpu_device(const Ab21qMachineState *vms) > { > char *nodename; > printf("create_ab21q_axpu_device called!\n"); > hwaddr base = vms->memmap[AB21Q_AXPU].base; > hwaddr size = vms->memmap[AB21Q_AXPU].size; > int irq = vms->irqmap[AB21Q_AXPU]; > const char compat[] = "ab21q-axpu"; > > sysbus_create_simple("ab21q-axpu", base, qdev_get_gpio_in(vms->gic, > irq)); > > nodename = g_strdup_printf("/ab21q_axpu@%" PRIx64, base); > qemu_fdt_add_subnode(vms->fdt, nodename); > qemu_fdt_setprop(vms->fdt, nodename, "compatible", compat, > sizeof(compat)); > qemu_fdt_setprop_sized_cells(vms->fdt, nodename, "reg", 2, base, 2, > size); > qemu_fdt_setprop_cells(vms->fdt, nodename, "interrupts", > GIC_FDT_IRQ_TYPE_SPI, irq, > GIC_FDT_IRQ_FLAGS_LEVEL_HI); > qemu_fdt_setprop_cell(vms->fdt, nodename, "interrupt-parent", > vms->gic_phandle); > > g_free(nodename); This is qemu code, not kernel code. > } > > I understand it creates the device axpu and connects its irq output to a > gpio input connected to gic interrupt controller. Again, this is qemu code, not kernel code. > But this driver is not in the form of platform device/driver. (a char > device). What function should I use to get the irq number in this case? > I couldn't find a function with a likely name in the tags file for linux > source.(5.4.188) Where is your kernel code? confused, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies