Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1101167rwn; Thu, 15 Sep 2022 10:25:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4y/9U5xTtUsV1aMAsMpHchGcCmV3qAs+KPllKTDssk0k1OnwC3yOWnatj6deMuhuStfJLg X-Received: by 2002:a17:907:6ea1:b0:77e:4c93:130a with SMTP id sh33-20020a1709076ea100b0077e4c93130amr699441ejc.482.1663262718422; Thu, 15 Sep 2022 10:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663262718; cv=none; d=google.com; s=arc-20160816; b=XNPnDppb8YEVH8bJn0/vAdoIJ1/OAejH8t21gTAZhe7Y3cYRy5/Tb/Wcffvwlf111k dFqbyUGHvmWigXkMnoO5IqL0eqO5ZUhHrz3zLHIIk5dj67LokVWvzdBs6T9UVUTiNgyi QJ2H7dL151DKFjgH5sYEAzYX6hxbFHpIM3UOtCEOIoApunS5Y94uKtQi0JWkRkBT5TS4 pFUTnNGc9iipZAjXCxBgo8DbcbsNAL8bPmlI2ZFqPkFgfLEwg395/JYdMEFF1jBVs/ff 5MRCCuEUquX62qDVblywTV9i6ZKGyiRnV8Sxt/u484hVqfe4pZqepMuRf80B8OdusP7G gfLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=st13mJuSkkLLd32MNsEtbcrb0dlPB41H5qgInX0H9Ck=; b=QymcwPtUaRZEs242j7909vwWFBYf557dzJ81Lo0Tc6aCDz2pYz1OcaLe3x6Z5LVmAg Fds88CLlPhb0W/72wSt82oq5f+57GAhu+OcywMgBEXxgUY2+LUUJw1O/kX+Vxy5ikL2P jSv+GoBEtl3qTuB9ByHKkqju9gy7yvIumNtLgMjO5FnoLMBjFAC9jF344ILZ7SPBozUh eTAinBb7nmFw1KJyjB3WLgFh4wnfEBBQLKzfibzzYaFqjnyTRqjZ47oR/iRjnq153n10 SUmsR8uo5DdInj0h51d4L3KUvAMIhVHvRt7vyX0tmQUDhd+DbPx7bQ/a+LEDsleXzPbz Djhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TommpFC5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw15-20020a170906478f00b0073ddf3ccee9si7291469ejc.308.2022.09.15.10.24.52; Thu, 15 Sep 2022 10:25:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TommpFC5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbiIORKX (ORCPT + 99 others); Thu, 15 Sep 2022 13:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbiIORKW (ORCPT ); Thu, 15 Sep 2022 13:10:22 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2261F2870E for ; Thu, 15 Sep 2022 10:10:20 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id 130so28664840ybz.9 for ; Thu, 15 Sep 2022 10:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=st13mJuSkkLLd32MNsEtbcrb0dlPB41H5qgInX0H9Ck=; b=TommpFC5Soi7b4uD9M2oEetvhtEt+UCAbLRoLIjRsaP2Nk0+sxzCakEkeI2zA288hU ZbcEulYLvrnyC40LHVDTO4u1EnUeKb+rLrSfxgPH3SD1SMt7fvAKgsg0HqHVEjhb452E gDer54IMky5E3tq2Li9f3yYWxfUpwjIuxXmlcTXlXWee6lRJqb9KNrP6jiLHp9FI52mV Z1ip3i6oIUf3deCPl+yGQ3eTGetJS9lnbGu5HbkjfxdROykmEOnBaK+gcIPyAepGexoz MYogNTNa4gPfLl9nC3A3IrnKqeGECCGDmJCjJbHyIQgogxBvy0OY0gxYZ6mWFQ0nyMIq UI8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=st13mJuSkkLLd32MNsEtbcrb0dlPB41H5qgInX0H9Ck=; b=zB1btx3G5gpcmIhwS2tqimbSPRC4DH1po12diRRr3G5yJUSskX/GIYwYJN50HZfr66 VhKRXhac3p+vAR6jh3rYREYEPqeIXkXHsn1vBcRdWrRC/SF6h9olymttp0t9ytiQ7uUW u4NZn2UIFpQ2IA4I4UP1i+FZTBmIILwV+fSCdyYw8X0udoU63Zjd2313O46qtt6h1lzB wdXH7UvzrslKdjhuT4BOIrqhUKM4ADFw2Z31EFXkrMDtcjxa1yhFOxxxAl1ZEtpl+3Hj VOt5IRBQOQWvVGC/omN/mJ7CyRdE62EurjAVsC+2GKQVAB+fxmX6wkwl8CFyb+7/g8eo 5xGw== X-Gm-Message-State: ACrzQf00uoThSEP581yDML8sCuqqcfGh5EV7nFaEG+ocnmdxI7ahwTx5 2VcckGBRCiGl64zmv+vU7LBl1DCC9fpbqUtl0A8= X-Received: by 2002:a25:dfd6:0:b0:6af:fa4d:33f5 with SMTP id w205-20020a25dfd6000000b006affa4d33f5mr686627ybg.253.1663261819306; Thu, 15 Sep 2022 10:10:19 -0700 (PDT) MIME-Version: 1.0 References: <20220914080016.67951-1-namcaov@gmail.com> <1a1d346e-be81-19a5-5cb7-8b5ac896d835@gmail.com> In-Reply-To: <1a1d346e-be81-19a5-5cb7-8b5ac896d835@gmail.com> From: Nam Cao Date: Thu, 15 Sep 2022 19:10:08 +0200 Message-ID: Subject: Re: [PATCH] staging: vt6655: replace spin_lock_irqsave with spin_lock To: Philipp Hortmann Cc: forest@alittletooquiet.net, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 14, 2022 at 8:55 PM Philipp Hortmann wrote: > > On 9/14/22 10:00, Nam Cao wrote: > > In vt6655 driver, there is a single interrupt handler: vnt_interrupt(), > > and it does not take the spinlock. The interrupt handler only schedules > > a workqueue, and the spinlock is taken in this workqueue. Thus, there is > > no need to use spin_lock_irqsave, as the spinlock is never taken by an > > interrupt. Replace spin_lock_irqsave (and spin_unlock_irqsave) with > > spin_lock (and spin_unlock). > > > > Signed-off-by: Nam Cao > > Hi Nam, > > I am lol ... my computer freezed (you don mind if I do not try this > patch again? Please send a v2) ;-) > I was digging for the log see below. (kern.log) > I hope you can do something with it. Thank you so much for testing the patch and providing the log. I think my patch introduces deadlock, which caused your computer to freeze. My bad, sorry about that. I may send v2 in the future, when I fully understand what is going on. Best regards, Nam