Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp962664ybm; Wed, 27 May 2020 12:17:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwep3Ym7BE4YUHc6r5J6GCaSwIlTenzE2cU7fk76npw2nMy/StJnN+qRORE1z6qRPwcZZ0F X-Received: by 2002:a05:6402:b0b:: with SMTP id bm11mr26289707edb.92.1590607053284; Wed, 27 May 2020 12:17:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590607053; cv=none; d=google.com; s=arc-20160816; b=QaxXjnoa4U9POmPxiUpu9Zg3M3BRAm0FWUPOoh0BbCqZbkRJnKnB2TR8Q+rtx6MGAn 7GWgMKKHqUou5BvjdATBwGu6TnQ13PLXmfdXpmvQjMRVGU0wSmXPVidW5lGEuODyx08Z aUb8j+sqlQSPs/oxYQ6CGfJHe1UZlcR8fmi6rmc5r54big1ZeOKmTHuTYGzGUsOv3GDE ZUlQhHHEiVVXnVw0hXCCgAqGpMChMicVEpIJBCmPiNibB94QZu91AxeSueywMnt1+PHq lxFzNNV9GAz2zqEJUXCuFgK/4JnMod2WpBKFiJfCDVTp3tSw+0y5jjGMH4PaAcxfp8b5 S1fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2Lhu2ZcEcwwrOR37CL1brFOzPiOBufKSZIC4FQQB508=; b=WKoyLsIy0Umj3umyvLl9Jf6Yu4zrGr2+2nMC+UGb2ve6qYk3G4hE1Wfn6CREjlCj2H twp5JwZJgq60tMf5f7lCFmWU1DE1JpxLuXeL+UbqzV5L9JPu/Z8Cg3bePjNWH3t+s3LH nbo8uZkVVOEDrtudnETLhJuCqBEqthS9ulhOyw+d5J6TAYwUJNlfuZ1mVYijWwwEEIUp DXCxZDVf9nGhqeq0OVkQteL10nXNKKpYZipTQUKxwja0vQ4PFhQPZJVW4vLMsQ67Jyu4 2LSkEX1i6PiQ2mWNZTRmGrchBFJuM5q4aLS1VPkzuZirTGzsTHNfRodJwJ2OhyT0bw5/ 4Cug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=yPtc2Wor; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si2060083edt.317.2020.05.27.12.17.10; Wed, 27 May 2020 12:17:33 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=yPtc2Wor; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727939AbgE0RGj (ORCPT + 98 others); Wed, 27 May 2020 13:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbgE0RGi (ORCPT ); Wed, 27 May 2020 13:06:38 -0400 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA2BBC03E97D for ; Wed, 27 May 2020 10:06:38 -0700 (PDT) Received: by mail-qt1-x841.google.com with SMTP id h9so9564780qtj.7 for ; Wed, 27 May 2020 10:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2Lhu2ZcEcwwrOR37CL1brFOzPiOBufKSZIC4FQQB508=; b=yPtc2Wor4aOKqJgM9mCqbJiYDKwPnGCFGYXNxj12SXW369UtlgQZGLVdXV30NwYzZO xOPRn6AmKsb53FSpNBpXSjdR7FkAeWtZQfeFNThPDTZ/zYr+b0vRman0zIjoUfQoW5qZ xIHzSEuTDr68Xsyul5g7SSQnsI9O8JPUFz/TkKbNQ6fsO4MZ5Bt+HVOsqzKnZ7XF1L5l BexiMBwU9qQeCUB+L9tgJGedJHoQwuRNZso/rQIerZHTtzLdBZUdqde0hGTbv4aQxgO6 HAUaM1GCCknfDzepc8ifaHScr+mr2SbwKX0HYEQRZMyuMN9DVgeK5trZQbWZQrU5o+A8 N6JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2Lhu2ZcEcwwrOR37CL1brFOzPiOBufKSZIC4FQQB508=; b=auqNrYD2O0e4ndo+8PLkiHO6fSs15737NrN343wkDV6MzFLzK5FaqeROgMjLKzOR/P aEssvhQ/mlPyrdyG7xi3j6EDNemsOJ7OYt4PVyRMsSqsu6WqWL2pVPd/Dr50z2ZT9+RW E2D+y56HzbErejgr7SqnlIVzVGcfV8NEWpJU0F4iBKiOWwmbmlaCDynP3bA2vI1aZ1TV EGga1VlIvgekiABBOKKd1lDECSW3IVBW07Q9633JRhz8e0f8M0a31+EYpImoDnhbnRYm /gzWdgvILO3s7KWlMwT7aQYSn+EPjTTdcJ9qv2rPppD3qOagIRmM/+2/9x74VfyzyYu3 y5xA== X-Gm-Message-State: AOAM530tBq4qUkc28ey2PeZSG1yzBjUgpyS1euLHjPvCWlCc6AxKJw2T 6HxU1n6KWQ6grKcZxUz1xTnz+M0///CQCzGf0umivw== X-Received: by 2002:ac8:718d:: with SMTP id w13mr5369489qto.131.1590599197938; Wed, 27 May 2020 10:06:37 -0700 (PDT) MIME-Version: 1.0 References: <20200527161743.15972-1-brgl@bgdev.pl> <58fca7418c8d18392562aaad2c3a6634@kernel.org> In-Reply-To: <58fca7418c8d18392562aaad2c3a6634@kernel.org> From: Bartosz Golaszewski Date: Wed, 27 May 2020 19:06:26 +0200 Message-ID: Subject: Re: [PATCH] irqchip/irq-mtk-sysirq: drop unnecessary spinlock To: Marc Zyngier Cc: Bartosz Golaszewski , Thomas Gleixner , Jason Cooper , Matthias Brugger , LKML , arm-soc , linux-mediatek@lists.infradead.org, Fabien Parent , Stephane Le Provost , Pedro Tsai , Andrew Perepech Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =C5=9Br., 27 maj 2020 o 18:38 Marc Zyngier napisa=C5=82(a)= : > > Sight... Do you realize that these two locks do not protect the same > thing at all? One protects the interrupt data, and the other protects > the MMIO register which is shared between multiple interrupts, and > on which the driver performs a RMW. > > Thanks to the removal of this spinlock, two irq_set_type() can execute > in parallel and silently corrupt the register. Not exactly an > improvement. > Eek I missed the fact that the internal lock is tied to the chip, not the interrupt. In that case I'll convert this spinlock to a raw one. Bart