Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4630694pxj; Wed, 12 May 2021 09:37:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqEswwRlYBrTyLKSnU3i2cwqP3ZTgguhdoeJvxbMlIJ4u/2L24iAJ0bZBlysqN0Y0sdXka X-Received: by 2002:a9d:6353:: with SMTP id y19mr24258610otk.241.1620837427966; Wed, 12 May 2021 09:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837427; cv=none; d=google.com; s=arc-20160816; b=UC8Vw6KlPK0+dOO7a/WnqHRPRt493EMO5/Qphv+hVKWoW1HxXWrg6AcAHfw9g2tYBo EszM/svZ3nA2S/82CC0+taCfgcTXwO0rNAWb5za0EqxaUPQIX1pMz3ze3GPPLLMWsna/ XXemnfTQz3Beqcy9mlSxJU8ElFcDfKdBW4GqATNPXZQqScHYUrLDuagaeUIVjyGg1FDX D7MgCJ0QAziNkUaUMjrHoDSQ0Dzk4EIjqXcVC4r9v2b675ziIgHUH0ZyCXf0HSPSHSrH XQGBfh2j4YKMjPaV/r2lcd+GbMKvyw2jfTfaB7X0xPKn5R5GQBSiD+yLPkWDYOyw2Jmv asow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aGLUgseKOyBYYRdnYM2m2jnB9XHvexnTn+xobOoggqY=; b=qI6gtatAw4IxrhNVkyDxMjsbFVLCdoykHFJAqyGLxI5I8e+HUxMTpPT+nxMCfsq/F3 Ri/6dbJGPdtzCmO6pD7wNRfhPz3CoSeoJjoIONH9UB6Ovln8lSrHoPAO3LIxPbisdAtD B6t1zqufZn5ox0/hGAwvLGY01gfmwUtGDqN1gtzoQix3NdYi/vi8VRJIX5LZ00zuVe5R p9WQ2gN4A0wBhyQ8AEkEozNsE1vmPDA8CzL0Bk/RrGPqZMS6l7R6mUtr+iipx97iCa+M vx/8Wv/oEOo+xubv31W/pCDoD6Zos1MyVl3KIWSgAvM+26qg477m1zTZdJ9ueTEWO+n8 58eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lrWaCWXH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w19si501458ook.8.2021.05.12.09.36.53; Wed, 12 May 2021 09:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lrWaCWXH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242789AbhELQfw (ORCPT + 99 others); Wed, 12 May 2021 12:35:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:41830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235198AbhELPnR (ORCPT ); Wed, 12 May 2021 11:43:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E365A61C86; Wed, 12 May 2021 15:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832942; bh=gxlODZ85nCTDLysysM9vylBIlDyxt+ShhMjDh2KepUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lrWaCWXHL2OZVfmulReYZ63zN8OE0M2im8Q+3VAoOj7PdJbIhY97pc7RT1Jzuy3+/ 2ljMVsod9QGpQ5HCTu6irJyw4XEeqGzC6C4cZ/Rt3LbTlBx5RQ1DjC/gnITLnH+XKr hU6UAw9XT481f8/mM/NvuQ36iyqUDErgY59iWEMY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wolfram Sang , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Wolfram Sang , Sasha Levin Subject: [PATCH 5.10 440/530] i2c: rcar: make sure irq is not threaded on Gen2 and earlier Date: Wed, 12 May 2021 16:49:10 +0200 Message-Id: <20210512144834.231959607@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wolfram Sang [ Upstream commit 24c6d4bc563881539d2cd4433e502436ad87d512 ] Ensure this irq runs as fast as possible. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-rcar.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index ad6630e3cc77..3c9c3a6f7ac8 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -928,6 +928,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) struct rcar_i2c_priv *priv; struct i2c_adapter *adap; struct device *dev = &pdev->dev; + unsigned long irqflags = 0; int ret; /* Otherwise logic will break because some bytes must always use PIO */ @@ -976,6 +977,9 @@ static int rcar_i2c_probe(struct platform_device *pdev) rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */ + if (priv->devtype < I2C_RCAR_GEN3) + irqflags |= IRQF_NO_THREAD; + if (priv->devtype == I2C_RCAR_GEN3) { priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); if (!IS_ERR(priv->rstc)) { @@ -995,7 +999,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) priv->flags |= ID_P_HOST_NOTIFY; priv->irq = platform_get_irq(pdev, 0); - ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, 0, dev_name(dev), priv); + ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, irqflags, dev_name(dev), priv); if (ret < 0) { dev_err(dev, "cannot get irq %d\n", priv->irq); goto out_pm_disable; -- 2.30.2