Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1165097lqa; Sun, 28 Apr 2024 23:08:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsk9PtZCeWjdQXx7gOVVdoMsDIHc7jSZO6KSSSgzynuO/F+xn6ZO2Ehvcd0FWnggYOGtgdu17Ku5/D33JyK7bfh8kATbbQtQ4UI7HTfQ== X-Google-Smtp-Source: AGHT+IFVyuZo+DmN3eAkLa3bYv0xafk8nfeoCXQ+kbCtARSbLY4pI3Ab8xEw4TmhtSIHrVYJEaeq X-Received: by 2002:a05:6a20:9752:b0:1a7:9812:3680 with SMTP id hs18-20020a056a20975200b001a798123680mr8749671pzc.40.1714370889801; Sun, 28 Apr 2024 23:08:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714370889; cv=pass; d=google.com; s=arc-20160816; b=doxPuz/Nt3iWYrp/rheWjfG+DAehCyOHlDq1YDNWvzF1Tq7hBgpuA4IDbyNxgjLIsk BrfFZuKLiwesfKy07T/G3AKpaGzfI66DY6l30Zsw50Du/e1kXWJL57tPR1xGwTIdd1WS 9Wke5t1CvzY9QV7g6ikNzAff008LtQcXVssJtHtgaMlSb2KIu/Klo07O0esv3h9G99ZM +8mX7fdXBHg3DSRoSU587hkhUpMZk/gZnKn21ssbBI+GTYN8ri8rvgyP5+zKTbLQ1o2u sJCWxRMn+0LarW7jlXil73hs/z3EX7qsZQlTfHG/ENwapQR3KXcBjMpTx/b2fc+gtLhX pinA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=TK0AmsxIvpdv+Eeo133AhkPR4FnsmSNMo4dv18n8nCg=; fh=pddMmTEBXzWW2N9j15BmZCAZLujzArlHbdygKO6kyuc=; b=lIZ4hs4kIoqD89/BQwt7hwJz3ke2R9trDZCJ8JoUPlMXk9pG8n7URQ0GU99OuwIRNX fNcBp9G5+iOLhVVt25nHFj+yqPpZKG5mKzOqiUsyf4tSIw70VNEks/3CoO+rGEFto80D 3OEKUus/DszJsM0hVIllK2bxBhUQP7Yer1+gGcmPmZMxtIr6Hu1F6Oty+nUdjjrI2u67 cUtkfg75rX+IBd/ebGhTCIjxnKoxOMK1jJJZdtRyxAZyYjNPAnvYJ+vmQj7hU/3XHGbu 1NkTFYdm1GyNdKx+7IPHLc86hqqLG72vhWBj8lLODe+4yQFcvhyEsN74EhUB5fFsmJkM m/pQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OMiLs4QB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-161770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lp11-20020a056a003d4b00b006eced1a16absi19640409pfb.200.2024.04.28.23.08.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 23:08:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OMiLs4QB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-161770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C0E82B21352 for ; Mon, 29 Apr 2024 06:07:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D78B01095C; Mon, 29 Apr 2024 06:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OMiLs4QB" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA80313FEA; Mon, 29 Apr 2024 06:07:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714370842; cv=none; b=ORUS77MaFiYvnyeM0msYI3NNbD4b0TmUChdtukPVzifdL51R+p1sl4U72RCNMMfl8PwlX7lq5A7Ehplx3+QodmCx+lfzcx+bD3mMGyqbnbF+KyekizZlI5CSxYhKqXRnbgDfPGEmpJUtoYIrj/19quh8HJLkn1/oy3e7mw7MLNg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714370842; c=relaxed/simple; bh=joF5/wjl9ipS7kB9gvjwJ7rSwQULfKl5HQhL4zla8cI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=DpbItIHURLhKtWEWX3XTpJ19dBb9VuOQegtQgTUrFoSgiiWgUDdCMv5XDk0MP7bK97KORKPoaiRPpfJnBpXBD6DBze0NZJHQ+C/zUVkeW7XqFHzZdPoAQzIVmVVB/lVOmHLrKXGNEa+ckrMzcYqOjrXreDGhcuM4zkkO7iPufRM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OMiLs4QB; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1e3c9300c65so33098825ad.0; Sun, 28 Apr 2024 23:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714370840; x=1714975640; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TK0AmsxIvpdv+Eeo133AhkPR4FnsmSNMo4dv18n8nCg=; b=OMiLs4QBErLZ3hT54aBrZRIn6A2EPfs1NlIG06nApoLGY3DCpaZX0PrgceXsD+5MIc zChVZFdZbSkOtZH2OUuMDkz+kD5SJ7WiNhuw8mPfp3vds2PAd4elqYN9Naam6MsNnBB5 qbqKJ8iv45LhyBgcAd1PEjc+fCuXAfPqidDxFeRiSI3nKGuQcfP4A22J9Gmaqmx1nNO9 1cSO3ZY8ZLAkPrJmCsgAaCg+5I9mMELo1I5BELyqoWZlb+SWiE+Gu5DVZOwK5gOgyfsR dczdHqE2R2Kul0kCaQrLimoRfCKLLv+vZGcFukzYr8xx810/ZNQYRZ4sBtVqqBB9cZJb 9JbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714370840; x=1714975640; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TK0AmsxIvpdv+Eeo133AhkPR4FnsmSNMo4dv18n8nCg=; b=DilOMUcI2GcBFx+7+Vmo+gucSEZDjsAJDCvr7PIkAAKDDt4BynJhwybyKgd2aW9F/S MCK4TEXkT5GkxSbGAHntT09QbBWAyivWXJsWvRqjmoa0u1F4nUbRO2Dnj7hgI4JhZ2qs jIwg2OWhm3lN7JMLE/GKb47eKn0OKQvCK3aUoRJdnYT7fiAj7QJGgEGZwtRptn4aU79S fml6/IdPCMQFP2UAX0UvQRS3irfcdhm33JO/ydR02Hcco2zwXA9OPbcOXO3Hbq7w8K8T qOlCcK6b/+wszLqr34Jr+6FxM3rDsfBZRL7vTa+iLpvJVTxRIH0WD5vuDELjfp2kHpTh 2TWQ== X-Forwarded-Encrypted: i=1; AJvYcCXCja8wesgr+Y4EyL4LiVbH6dB8iUsnoPnOOl5zHwlJ1hq1+3Vsi6Bhu4C8LzDruLzXte370vB1GUTP5MS6jHq2Gdxe56akhkx6RHb7 X-Gm-Message-State: AOJu0YzVtjXg2KfdLWZADMouWau0/Iq3E+wwctFt9UhefV6rjM1UTX0d hZUE/Yat4Zz+FoVMYQFiYAspYky5NaK9fM18yvBusV6LtlWICAHb X-Received: by 2002:a17:902:784f:b0:1e9:9fdb:567d with SMTP id e15-20020a170902784f00b001e99fdb567dmr8597220pln.68.1714370839787; Sun, 28 Apr 2024 23:07:19 -0700 (PDT) Received: from localhost.localdomain ([1.200.153.166]) by smtp.gmail.com with ESMTPSA id x6-20020a170902820600b001e43df03096sm19402915pln.30.2024.04.28.23.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 23:07:19 -0700 (PDT) From: Jim Liu X-Google-Original-From: Jim Liu To: KWLIU@nuvoton.com, JJLIU0@nuvoton.com, linus.walleij@linaro.org, jim.t90615@gmail.com, brgl@bgdev.pl Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: [PATCH v2] gpio: nuvoton: Fix sgpio irq handle error Date: Mon, 29 Apr 2024 14:06:42 +0800 Message-Id: <20240429060642.2920266-1-JJLIU0@nuvoton.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit User use gpiomon to monitor input pin ,if triger the system will call trace and rcu stall. The irq_handler uses generic_handle_domain_irq, so there is need to remove irq_find_mapping. Fixes: c4f8457d17ce ("gpio: nuvoton: Add Nuvoton NPCM sgpio driver") Signed-off-by: Jim Liu --- Changes for v2: - add more description --- drivers/gpio/gpio-npcm-sgpio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-npcm-sgpio.c b/drivers/gpio/gpio-npcm-sgpio.c index d31788b43abc..136838c25756 100644 --- a/drivers/gpio/gpio-npcm-sgpio.c +++ b/drivers/gpio/gpio-npcm-sgpio.c @@ -443,11 +443,9 @@ static void npcm_sgpio_irq_handler(struct irq_desc *desc) const struct npcm_sgpio_bank *bank = &npcm_sgpio_banks[i]; reg = ioread8(bank_reg(gpio, bank, EVENT_STS)); - for_each_set_bit(j, ®, 8) { - girq = irq_find_mapping(gc->irq.domain, - i * 8 + gpio->nout_sgpio + j); - generic_handle_domain_irq(gc->irq.domain, girq); - } + for_each_set_bit(j, ®, 8) + generic_handle_domain_irq(gc->irq.domain, + i * 8 + gpio->nout_sgpio + j); } chained_irq_exit(ic, desc); -- 2.25.1