Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2508142rdb; Wed, 21 Feb 2024 09:38:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWED1h8LgXmx31Om0DMe3BMKkmFBfXOGO7L17QDNuVZwO2HFXGuQraNO5HD3qIYpKhu+K55dtERlQw30TS65sB5nHg2XkTZMTBEnUPMkQ== X-Google-Smtp-Source: AGHT+IE2QiM2AMBbjDCQCAruDlpdShiSgd4/Vzvjx2vCwtAo4eFDfzydaAf8Q19JpY0M59jaSP/H X-Received: by 2002:a17:906:2785:b0:a3e:b523:6c8 with SMTP id j5-20020a170906278500b00a3eb52306c8mr4700043ejc.67.1708537087237; Wed, 21 Feb 2024 09:38:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708537087; cv=pass; d=google.com; s=arc-20160816; b=mubjTINbyn4Wpix/Rb/iIhRS0mzPWoHsLras7ita1gcG2gRq+TiD524pC95Drjnkoe U9zYNfAMwG9Ci1A1ulO91/NHujuPyEoGKeM4pZArg8s/9f6UxyBMTkiWYwrlU9gdwfAV WUue5kX6G1e2jkv9/dg5DNXKXAb9u2H9g+38Cf3Il9q/SL3e3m4p6W2R5vG2SA+GTg8V TsQ0VZ3ZK2POSnl8iW8oNIi/NJlehC8fIX0vFIOo17SdUXoHivu3q3n/rp5ZX/gV0cXq haw8p7QNkY7HnJgrGnwEwfiGUiioDDQ6bYBB8v5XLhklj76VT+ocHH0Jm/65V/+NDQiQ NFlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=rNP/pSU4Q89ArPZAYOkavXsZq7rBfQprq8vBcMveDTI=; fh=DryuI1qrun9daSHg57xqu47MEZjB//mPJOl3GcaQtSU=; b=ymfVzfODudxsGtjka/Kmc6SUGUt5DTG7Ti0PmdCPDlSl/VJdxQFlgPL5hhC0yNN63M duqDb9o4psnH/33A7GIGDWFmuLZkJNLRUjdwv7n7Rc9CiSOA+jSsxcgaRUy1C7ERJlCI Y1GjdnCI7zb53LEn7Xc6m7lIUvTM4NVyrCzh9rqtYGnq8NC5yMBJYrfG0QclCghpsibt d4mA6Bd4PloPqSahZaNUkMD6Vd5kEly9I+NAF9B3Z0WvfkNqt9mhW0LUv3j7rm+RthZD qpINkPM+QPbGvQ/wXv9dMSZbDMSqQ0+60k3t7UV8Ek1b/IVkQukGm6GpkyX29wv1LFUB OVAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xLEbcmth; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-75205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l18-20020a1709061c5200b00a3ed810b4e5si2193115ejg.505.2024.02.21.09.38.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 09:38:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xLEbcmth; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-75205-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 002061F22778 for ; Wed, 21 Feb 2024 17:38:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66C8183CD8; Wed, 21 Feb 2024 17:38:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xLEbcmth"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xQf2fTtB" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 4287A7FBD5; Wed, 21 Feb 2024 17:37:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708537079; cv=none; b=K87cQMLJhIUzZ9fgY3NF9FbkylUVfYbPdTWPGxY8pxCaZ7pBT/EJUASLEUXAOfp3D3jAc92Ic3WuZIufBv1tdVkFq2SuCw88bGkQSPbe2mYG9M3STFLheX+F5RCDaDajJW/6XYm174q1ASUMsxLLdqh6t1krzs80dEgWm17Hs3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708537079; c=relaxed/simple; bh=RSJEdvZKXkX3yGEIkS9DaCnaNb3HO5rM3mqCc71lxT8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=eeI7Wqgn8ZwpQ6CCdsOo+v7m1gXmE6Os3P1cxe04Xsu95O88qGmChvB55xf+CPCBVXM9FyzhUOEeiKo9+cr0fkQQGIfMWIiDMzslSYdX5Utjp3Ou+gkAsAjV4E84qRBTZBmwVooEL5H7W5j88sK0gAGqIguyBTqWByaoRtZY9FU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xLEbcmth; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xQf2fTtB; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708537076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rNP/pSU4Q89ArPZAYOkavXsZq7rBfQprq8vBcMveDTI=; b=xLEbcmthFRfBygzZ69VL2DG/D0gBYdP2sN2Lgb8itqPYkU2o1cKTqlQ9JHvN9mWqw1vFEf 5FkMFYZDTJoe/BqGdmY+A/NaVuf49L514Y+kGdUneY5FIX7EdlE+mxfgfQL6NcEvHMEyVP 2HB9Gn75wHE39/Iwnc1QGEr5A1Kfae8HlwjYAnOAaDb+b+VUsA/OW74yWiGP70IqnV1ZHv a+N6AfJAhsWBDCo/gUomai03e6H9G5Reh2aU0g6h/C72VAEZ8mi23zSDyTBOlbqj2aieJc aD845IESs2nX6iPzvlHCMqUdWfI4i7/NQsWtjRWTJMeXzGaj00flY4bLm/gQVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708537076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rNP/pSU4Q89ArPZAYOkavXsZq7rBfQprq8vBcMveDTI=; b=xQf2fTtB4GWLnzNERvE/GFUF0GEltMGR9pYEU1fe90JMgmi5FmXkeB6Xdj5dZJ0u1y5IjA 4I/r2JPMR/kcPXAg== To: Changhuang Liang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel Cc: Ley Foon Tan , Jack Zhu , Changhuang Liang , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 2/2] irqchip: Add StarFive external interrupt controller In-Reply-To: <20240221022647.5297-3-changhuang.liang@starfivetech.com> References: <20240221022647.5297-1-changhuang.liang@starfivetech.com> <20240221022647.5297-3-changhuang.liang@starfivetech.com> Date: Wed, 21 Feb 2024 18:37:56 +0100 Message-ID: <87ttm1g1l7.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Feb 20 2024 at 18:26, Changhuang Liang wrote: > +static void starfive_intc_unmask(struct irq_data *d) > +{ > + struct starfive_irq_chip *irqc = irq_data_get_irq_chip_data(d); > + unsigned long flags; > + > + raw_spin_lock_irqsave(&irqc->lock, flags); This does not need the _irqsave() variant as this is guaranteed to be called with interrupts disabled from the core code. > + starfive_intc_bit_clear(irqc, STARFIVE_INTC_SRC0_MASK, BIT(d->hwirq)); > + raw_spin_unlock_irqrestore(&irqc->lock, flags); > +} > + chained_irq_enter(chip, desc); > + > + value = ioread32(irqc->base + STARFIVE_INTC_SRC0_INT); > + while (value) { > + hwirq = ffs(value) - 1; > + > + generic_handle_domain_irq(irqc->domain, hwirq); > + > + starfive_intc_bit_set(irqc, STARFIVE_INTC_SRC0_CLEAR, BIT(hwirq)); > + starfive_intc_bit_clear(irqc, STARFIVE_INTC_SRC0_CLEAR, BIT(hwirq)); > + > + clear_bit(hwirq, &value); As this is a local variable you really don't want to have the atomic variant for clearing the bit. __clear_bit() is your friend. Other than those nitpicks this looks good. Thanks, tglx