Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp871267lqp; Thu, 23 May 2024 02:32:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXj5O0odILWadnYcH+tbmfCc+gu4wjc1PaG76dMdn8CSKrdaI5qaa9kgHba5DxPszgXZUkYk3kBxqQX7mrDKUhxLN2tGQd0rSUv3FOuqA== X-Google-Smtp-Source: AGHT+IE/kMCuTHiftqgUgZyJYCRD+UrYjU/tlyzarac9SWwuTZc/cVsec9CeT2EnFarp0XH9EMBE X-Received: by 2002:a05:6a21:498b:b0:1ad:1c9d:f682 with SMTP id adf61e73a8af0-1b1f883a454mr4796417637.35.1716456727257; Thu, 23 May 2024 02:32:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716456727; cv=pass; d=google.com; s=arc-20160816; b=buuLcM2jPMMvnMTSMri04Ntyh1/cKBT2QtFZ811LUPIb9a0Qzll7ciWSua9zojW92C 945L9kUqn/7bDSt6vfyWFBgMpD+rUFlxpKr4u4BzrDdWYdvoYPwpbUvlIIxGu0YHuiFs kIY/OBPrOE04XdAb1LIQwm/wHNmcSRdBOZ+HqB2/j2L3fT7SkiujBsMLaVm02ZX6z6zJ YOOve/tU4xjOlWqYr3dQzOQyv32N70hYA+g2ck9O6ML8ti4/9t7AXZyx3AXvP0eA0gwb 5H6Tp+lpQlUDEpOoSj9ts1z6/chW1yZ4xB1BjB1Wgops2ABHC3c3HJC2IqHuSJtsZt6P s73Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=cWYYFiiIy8iBqPSnprAKdfn/GR6oESaZ1KiqoUtnUwI=; fh=QyxQz94Jr62U8gKgYKm2iD3kZWWPxswMUwqVkuGx3qI=; b=0iwoPg2c7QsAnhB5Py/A81Vhvxptu8sWALuNn4gRplTfG3aT/chVWNd9JmjFZ7LxSW bLjNE2RuIA9+3hSGu8cbjJroD4urcttx2jb6OdQT496iA3T+DRSA+gWRhKv7KgcXDeJ8 j50OpZGSMGWYsE2wosxtxBMPwyHzbBFS9Mteo1Eq5tu5tEge5NL4a3+DaH5Sd5a231eG 4ZLqxHNukGClhaPlPJJ4zVqMF75m3QdGqqiYXAp1ynfykXKEUpOts2ZJZ20S/0tjphM0 FAutYVIMoQT4WbeE7hWbL90B773CgPhUo54vG2t+zJXR6li0K84S/o9wmbQlfakc4mG8 q24Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HNcHYegf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-187264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6800cae49cfsi91231a12.480.2024.05.23.02.32.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 02:32:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HNcHYegf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-187264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 53907B23AC9 for ; Thu, 23 May 2024 09:27:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1090613D291; Thu, 23 May 2024 09:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HNcHYegf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C00F7E574; Thu, 23 May 2024 09:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716456444; cv=none; b=jCptHzaBLB8GrvU+RjsITmcNcFiTohXI9+4q92zVqouh/joNPuJm7RXtbuxoTgDhX20aAdP8KWFBuuB9T7v8NBijw8gX/IYvfDBpRrqNV5A/isPC5U05Vbmh/wVzDCmHUkiHgPLMQIjINQuHYk85QeBjI1+vHBXmgtKac7LnzLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716456444; c=relaxed/simple; bh=N/ArbF7qlHnI7bmUf29dhHWxFOpypeBXDi2ar0kz45E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rK4V6wsJzN2PTg4Mn7DRWmz/mMdSx4dTlbiB09ZJ2TMM8dXGVyaF1qudcLljsUVF5z4lsz67gIThZHAds+04OPuspETVm2pLQz5mjR7xSrua9WpEZC1hhW2vr6p0gbi636g2bs5FMvMb6in63BdIMi8kdPXGG8cgJFw9RGcrY0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HNcHYegf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41665C2BD10; Thu, 23 May 2024 09:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716456443; bh=N/ArbF7qlHnI7bmUf29dhHWxFOpypeBXDi2ar0kz45E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HNcHYegfzcNl7+BpuSfIQJjboFZW4OGts7YDUkKQrKkgk8d/nQGeT413YvcYDEnfT 8fFdZKuPu4RyejykXQZFHMhnmET+ZL0+1J4kPzCY9PTNawY2pVdRcexdVZRaLLja10 hns5yDYUsXLYWiGMKp1UxVuAisbwIceNXT9AwCnXI/SPALH3V3op8hm7/FfzmjGbF+ KWxepip8zQu1Q9VRcVZWzAMkasZ8X2ZWJ3mLZbLd962q8h2zijGY3fxUSdAwRzG6Bp uMpBWrrvs+SZfkIxCGQ3qXscCO2LnO8lUpZkhVNAzrnDzAFOJ2K8XBp9ToCwjI5Ryv j0eB5uZQmOLKQ== Message-ID: <21501af5-7558-4a15-bf0c-76b530792a36@kernel.org> Date: Thu, 23 May 2024 11:27:17 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC] [media] s5p-fimc: fix sleep in atomic in flite_hw_reset To: Anastasia Belova , Sylwester Nawrocki Cc: Mauro Carvalho Chehab , Alim Akhtar , Kyungmin Park , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240521073607.19426-1-abelova@astralinux.ru> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKbBn8P+QFxwl7pDsAKR1InemMAmuykCHl+XgC0LDqrsWhAH5TYeTVXGSyDsuZjHvj+FRP+ gZaEIYSw2Yf0e91U9HXo3RYhEwSmxUQ4Fjhc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J/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <20240521073607.19426-1-abelova@astralinux.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 21/05/2024 09:36, Anastasia Belova wrote: > flite_hw_reset is called in fimc_lite_resume with spinlock > acquired that is forbidden. Replace usleep_range with udelay. > > Fixes: 2b511edb986f ("[media] s5p-fimc: Add FIMC-LITE register definitions") > Signed-off-by: Anastasia Belova > --- > drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c b/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c > index 2483277a6cb0..f1e7375c9a5f 100644 > --- a/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c > +++ b/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c > @@ -30,7 +30,7 @@ void flite_hw_reset(struct fimc_lite *dev) > cfg = readl(dev->regs + FLITE_REG_CIGCTRL); > if (cfg & FLITE_REG_CIGCTRL_SWRST_RDY) > break; > - usleep_range(1000, 5000); > + udelay(1000); I think the code is rather wrong in fimc_lite_resume() - this should be called outside of spinlock, thus usleep is ok. Best regards, Krzysztof