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 X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F6F0C4361B for ; Wed, 9 Dec 2020 06:39:06 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C29223B23 for ; Wed, 9 Dec 2020 06:39:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C29223B23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f1WeLokRYDsGr04pjebQDZqHAEt3U2zC7VDURTGtSVg=; b=NMbVfUUbctzNzvbCxXj0sY56P l9Y4u2l7tQGIeDQ7ksUdMrg7B0q3JHqnN8ddzkNIfiD28tGXigUjOLdt8qPYGHd2uTbEC8szhMA73 2Nc8qBcXfovO88Eoo9AWAiRZAKUxS+9Cw93ZVryZP9+9Gig0Bu4TYdDXQWd5lsHdXIkUd8/AFZuNK i5k/jOmoxMUkYRHgGwT/W5LNBpEQ4kqt9z2gqGyus17XuRNSy6SsUF/vPvszwU0jeW0wPfOLHOIE3 nKs857n4GYokzZKfNj50FbJsVpb577VBxDYlHpa6IrIUQHkDdLhgNuq/38EkMtDouV0hS/qzBhBMt p7J1CPzAQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmt6o-0006wb-EX; Wed, 09 Dec 2020 06:37:54 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmt6j-0006u7-J8 for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2020 06:37:52 +0000 Received: by mail-pj1-x1041.google.com with SMTP id hk16so355444pjb.4 for ; Tue, 08 Dec 2020 22:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=e50gjx2u+dk5VMtYgu+q4thABv8jJUcueqKzMMAspdM=; b=ixLOM9HvY9cq9Z4h6NLLxTGvQ6HSYGtx3j6FDGjAbxvLa2OpQf6evTG0K7aZ8AyjSg Vz4p0EtroLc123xr1LjxiO7na/Pplis+8FzmNk1d2UrvVlqZn09vTY6OtuwPEytSuGG5 2KCJbhZpSunbmaFIabDEFehnWei8Vt8i4Oc66zINdaloS1KlTL4RhfHAx8SycAn2ADXy YYLbUI9xC9wRdfqk9Ka7jLgWNvZxP0tNIfJltreYt+Oh5syP5tk1wE9V022lxItkYGs5 /OGETCIhjaIt9TdmtA4GohQaG58NA5xxvbe5jJROaeFQOjvoee/Vgex7LnTi6mSyI+/t Kb4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=e50gjx2u+dk5VMtYgu+q4thABv8jJUcueqKzMMAspdM=; b=m0NavEufj5JJwvaFzuBPBPh1Bv3oNsf3SPTjchQF9dEvfwVnw+7uVSxaaM929bT69f Ay16sO8/eCKwWJxT3oaqhD7bBl7nsiH5Y1Irwg0RpijQ/kM44tDXMxZ0f2fBkaRVNzKe cj2TQoDm75Sy3p4eOQHQKNKZiW8I4WP/kZTsgOr+lzju5XQeh1SjxUPA3pIODoMe+/bC Utmd6E34JEEwfg+vmcVgRlBWKcTIUjUAHegCgwpNowiNvi9p43SmwKPwTvqr5jiY/ya5 Rqb7uhW4XWNmLtASg8pfuDERbchUnznb/BjFNGoIeMvHhrxIBmSjklH4PFF5A9y14wEF DyZw== X-Gm-Message-State: AOAM533zoonFea/Ll/QGgtzeNN3hpTkGW/90gv/BRQ9kFeg/078MVjUm DwGcwEk11x5bEvBiq/4+hFyEh4A5LTQ= X-Google-Smtp-Source: ABdhPJwjfEiPLMae+ffo6Cnhp7douBFcf3vSLYOtRxV9vdx0S2C51CdSPEgUeVMZh9kilf8XyPe8TA== X-Received: by 2002:a17:90b:4a0d:: with SMTP id kk13mr880119pjb.23.1607495865199; Tue, 08 Dec 2020 22:37:45 -0800 (PST) Received: from google.com ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id z11sm990299pfj.191.2020.12.08.22.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 22:37:44 -0800 (PST) Date: Tue, 8 Dec 2020 22:37:40 -0800 From: Dmitry Torokhov To: Marek Szyprowski Subject: Re: [PATCH v4 2/7] Input: use input_device_enabled() Message-ID: References: <2336e15d-ff4b-bbb6-c701-dbf3aa110fcd@redhat.com> <20200608112211.12125-1-andrzej.p@collabora.com> <20200608112211.12125-3-andrzej.p@collabora.com> <27ce1176-6318-45aa-4e22-3dec9f3df15d@samsung.com> <9c784a23-eade-eacd-3e67-d344a5758b83@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_013749_702450_94D608C7 X-CRM114-Status: GOOD ( 23.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@collabora.com, Nick Dyer , linux-iio@vger.kernel.org, platform-driver-x86@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Laxman Dewangan , Peter Meerwald-Stadler , Peter Hutterer , Fabio Estevam , linux-samsung-soc@vger.kernel.org, Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Jonathan Hunter , linux-acpi@vger.kernel.org, Kukjin Kim , NXP Linux Team , linux-input@vger.kernel.org, Len Brown , Michael Hennerich , linux-pm@vger.kernel.org, Sascha Hauer , Sylvain Lemieux , Henrique de Moraes Holschuh , Vladimir Zapolskiy , Hans de Goede , Lars-Peter Clausen , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Barry Song , Ferruh Yigit , patches@opensource.cirrus.com, "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Andrzej Pietrasiewicz , Thierry Reding , Sangwon Jee , Pengutronix Kernel Team , Hartmut Knaack , Shawn Guo , Jonathan Cameron Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 08, 2020 at 11:05:42AM +0100, Marek Szyprowski wrote: > Hi Andrzej, > = > On 07.12.2020 16:50, Andrzej Pietrasiewicz wrote: > > Hi Marek, > > > > W dniu 07.12.2020 o=A014:32, Marek Szyprowski pisze: > >> Hi Andrzej, > >> > >> On 08.06.2020 13:22, Andrzej Pietrasiewicz wrote: > >>> Use the newly added helper in relevant input drivers. > >>> > >>> Signed-off-by: Andrzej Pietrasiewicz > >> > >> This patch landed recently in linux-next as commit d69f0a43c677 ("Inpu= t: > >> use input_device_enabled()"). Sadly it causes following warning during > >> system suspend/resume cycle on ARM 32bit Samsung Exynos5250-based Snow > >> Chromebook with kernel compiled from exynos_defconfig: > >> > >> ------------[ cut here ]------------ > >> WARNING: CPU: 0 PID: 1777 at drivers/input/input.c:2230 > >> input_device_enabled+0x68/0x6c > >> Modules linked in: cmac bnep mwifiex_sdio mwifiex sha256_generic > >> libsha256 sha256_arm cfg80211 btmrvl_sdio btmrvl bluetooth s5p_mfc > >> exynos_gsc v4l2_mem2mem videob > >> CPU: 0 PID: 1777 Comm: rtcwake Not tainted > >> 5.10.0-rc6-next-20201207-00001-g49a0dc04c46d-dirty #9902 > >> Hardware name: Samsung Exynos (Flattened Device Tree) > >> [] (unwind_backtrace) from [] (show_stack+0x10/0x1= 4) > >> [] (show_stack) from [] (dump_stack+0xb4/0xd4) > >> [] (dump_stack) from [] (__warn+0xd8/0x11c) > >> [] (__warn) from [] (warn_slowpath_fmt+0xb0/0xb8) > >> [] (warn_slowpath_fmt) from [] > >> (input_device_enabled+0x68/0x6c) > >> [] (input_device_enabled) from [] > > > > Apparently you are hitting this line of code in drivers/input/input.c: > > > > lockdep_assert_held(&dev->mutex); > > > > Inspecting input device's "users" member should happen under dev's lock. > > > This check and warning has been introduced by this patch. I assume that = > the suspend/resume paths are correct, but it looks that they were not = > tested with this patch thus it has not been noticed that they are not = > called under the input's lock. This needs a fix. Dmitry: how would you = > like to handle this issue? The check is proper and the warning is legit, cyapa should not be checking this field without holding the lock. I think we can simply remove this check from the power ops for gen3 and gen5, and this should shut up the warning on suspend, but there other places in cyapa that do check 'users', and they also need to be fixed. Thanks. -- = Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel