From patchwork Thu Jun 20 17:56:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Wojtaszczyk X-Patchwork-Id: 13706211 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5944EC27C79 for ; Thu, 20 Jun 2024 18:01:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Qz8kTOxdaIm1u93eV0Is+4r0vyFAn21pP7Hjv/L4wvo=; b=v7tX5WbSw0okO3x6H6TG8heldC 01mMsAFXUUbYjAmJuDVkSEUhq3F6OD2ERG1wDaSdH/yQJsupkjNJoxBTxZmlkF4Hum8t+LT0zfxxP Bvv52/gcH4t47VbEQ1mnkBD+mxVOFHl6vu6ZiJ5Cdmj3EMdRV+/ReaO3VxcxiLbVUbePdHFpMT2ub vdqnSiZt7uYCSNrHyehR4bDbgiwwRdDnc0U8qE8t4n3wfkbBMUtA+um8jHIGeV2ookV4J9Q6gvt12 trvArvJMSwIdbLEwrdhxoVLlATMtYSzhlhFDf4lFM78E0hfxdC68TurN5rwoPQ+Uni5l9nncsVxmq fs5VZDlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKM6H-00000006D5d-0avQ; Thu, 20 Jun 2024 18:01:33 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKM5t-00000006CpG-3ARS for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2024 18:01:14 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a6f177b78dcso127934066b.1 for ; Thu, 20 Jun 2024 11:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20230601.gappssmtp.com; s=20230601; t=1718906468; x=1719511268; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Qz8kTOxdaIm1u93eV0Is+4r0vyFAn21pP7Hjv/L4wvo=; b=wjS3Zv9boVUPBcY5fjDKRhgvkMoeP2FUgSwoegaG9VgGHSCxIbDeI0s4yKVRh46Kiu VVtp24JCxome5S8vSVPjJ2KqcdgqRAwC7mT5dGazRJMlrJU8EQd6l1rpUiZt+OoMYGOR HqedjCrilu4NgYlVZzgsRRyAgJBxkY81w7CBF8uwhUwI1GmNPlZxlPH8VUEHTVCiRHDU 8jva+5KMk4Px8a4qtCs3I2C1fc1gZSMeWT81c8Kj89mpYfd4794WVetPpC5kG2VC6CM2 sxvlYtsGk0fu4r2HaCCP155qH0ZpzEcIDurWOp/5EJxT4wvdZ2HmigCbJex2SCnih9vk kP0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718906468; x=1719511268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qz8kTOxdaIm1u93eV0Is+4r0vyFAn21pP7Hjv/L4wvo=; b=fd4lUaTDfz66/uHxLFo53ck11IoNU61RFaECq4C/muY3Ow9Q99ic6jb6c745S6iFEq VUEi0LMvIeQpxg0VYyyFvmxZLlaKTyOVufk9yLKmTFJz11/aobMylK4QwKTkACen6g2c KtC4M0eShLW0yIusDB7lldTc7LD0deWRkpbYLR90Kxw4IL/ZrcIQwZipimwYVABiwQuI oaUaWO9f706dVX/ni06tqSaYpLFqW/vNhJiktdu94bB/O4A7xVB7dwIN4XyJ4iFuBGw4 R/+a1P6j68L7ZX/Kry0oN3cFNOTKfabC+J40MCzLX8/jzcWA68+cqOgJP0j1N2nHjtcs INOQ== X-Forwarded-Encrypted: i=1; AJvYcCVcocY91jl8ZrxgbB5PZAE/fcxgkJzoPE9JiVxazSch121ZRE7sNdQZvIbE0L2bJSdvyQgUhzDCyXMY+bh49ceFTcbfND0wgW4Yr1Cszo6lCRZnRP0= X-Gm-Message-State: AOJu0YyYe52VWMChF8dF/1gmfgBhzXyZvXd2k9szPZWt7JdCeDy7PFJl g4FiQq51WewOCkM0b615buZjqtAQQP81r7OwB0DfZuIvW4OerAoR57yZxEcQ91U= X-Google-Smtp-Source: AGHT+IG8eY8d/PSntzHXSfPtqV/wO9neoC+Na07hB+VY1pAoMYT9SP6YNE1GHB/rvuCByUpgceEg7w== X-Received: by 2002:a17:907:a80f:b0:a6f:b67d:959e with SMTP id a640c23a62f3a-a6fb67d9870mr344459666b.53.1718906468099; Thu, 20 Jun 2024 11:01:08 -0700 (PDT) Received: from localhost.localdomain ([91.216.213.152]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f42e80sm781370766b.186.2024.06.20.11.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 11:01:07 -0700 (PDT) From: Piotr Wojtaszczyk To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "J.M.B. Downing" , Piotr Wojtaszczyk , Vladimir Zapolskiy , Liam Girdwood , Mark Brown , Russell King , Michael Turquette , Stephen Boyd , Andi Shyti , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Jaroslav Kysela , Takashi Iwai , Arnd Bergmann , Yangtao Li , Li Zetao , Chancel Liu , Michael Ellerman , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org Cc: Markus Elfring Subject: [Patch v4 10/10] i2x: pnx: Use threaded irq to fix warning from del_timer_sync() Date: Thu, 20 Jun 2024 19:56:41 +0200 Message-Id: <20240620175657.358273-11-piotr.wojtaszczyk@timesys.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240620175657.358273-1-piotr.wojtaszczyk@timesys.com> References: <20240620175657.358273-1-piotr.wojtaszczyk@timesys.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240620_110110_073804_D29455F0 X-CRM114-Status: GOOD ( 15.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When del_timer_sync() is called in an interrupt context it throws a warning because of potential deadlock. Threaded irq handler fixes the potential problem. Signed-off-by: Piotr Wojtaszczyk --- drivers/i2c/busses/i2c-pnx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index a12525b3186b..b2ab6fb168bf 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c @@ -718,8 +718,8 @@ static int i2c_pnx_probe(struct platform_device *pdev) ret = alg_data->irq; goto out_clock; } - ret = devm_request_irq(&pdev->dev, alg_data->irq, i2c_pnx_interrupt, - 0, pdev->name, alg_data); + ret = devm_request_threaded_irq(&pdev->dev, alg_data->irq, NULL, i2c_pnx_interrupt, + IRQF_ONESHOT, pdev->name, alg_data); if (ret) goto out_clock;