From nobody Mon Nov 25 03:03:56 2024 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 A70B81F12FA; Wed, 30 Oct 2024 14:49:55 +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=1730299797; cv=none; b=QCqJXlGP5q984xBw+0plYAn/xdMIJ3UMAKbMbbPD29+2Gql97fFXSEXiXW3ROK445rWgITy3bhyYcHlEAUE+wq0zGwKYyPHyQq40cBaUNWRIbwSpaxSfGvl55buB5Ka9MPFPO0TWxE0sc8BtkGhitp6TzxON1NWy3OUeCCaJTZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730299797; c=relaxed/simple; bh=3rJD0IoOHzoljRmHYCVcQ7jrw/vRQuOJiOESY5oQApY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=PCF0djhp+WvwXN91D27AeMg53rEIJkG4XABt/pIPI/NreGOKKXV7Ep88G8IhJpIScx+A2kT5EofSB72y+mdSBRUQFeLNklwzgLyEYK68fi8G2ATu3GlwH7XcM6mNU4lPB38pED50hY/8A3fboFdE9C58laxXVSouyZbAqaoOPu4= 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=dSU3/mFC; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=5zdGI+MH; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dSU3/mFC"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5zdGI+MH" Date: Wed, 30 Oct 2024 14:49:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730299794; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N/DfybQb4KOdfgEHV8N9RTu3gwHbZnhqHnAcnYys8yA=; b=dSU3/mFC+0KiwYlriOYatBR2CHMFNxqxou1iu01doOXfAvh/Jlo4R0/yV9iPum0ehe1HRb xQW7+uEcSEmzaNljYKozA/SiKEQCe7CIjWRD12t4e+tdGoSYKr8hD2yIY5sqVgvVn8/ypJ m3hX9en26kCBdKm2k5nICcm+OHp6mP9DGAJqnWqRanHkGdzPwpnk3udh+gHfWXXZ5BE9BE FA6sAo1+Tw+s7UdHgkcQkkqC4+cj+YE/YnsPC6Ex3tuoN0jyWnWAm2G68/NM29y486ci1P 3rGe4RnWUFu5Srl3iniE1XMr8OYW6ds7FVuzL6EJOj9k0u17DOiL6J256HVSng== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730299794; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N/DfybQb4KOdfgEHV8N9RTu3gwHbZnhqHnAcnYys8yA=; b=5zdGI+MHscp7v4HcWdbf78VNsK9WTl8b5nKzVeGBCPolfp+5NPWbPI9ay49T8d23Itl0pj kCesBM+lCYaDwNAw== From: "tip-bot2 for Paul Burton" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic() Cc: Paul Burton , "Chao-ying Fu" , Dragan Mladjenovic , Aleksandar Rikalo , Thomas Gleixner , Serge Semin , Gregory CLEMENT , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20241028175935.51250-3-arikalo@gmail.com> References: <20241028175935.51250-3-arikalo@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <173029979323.3137.10389404869472643777.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/core branch of tip: Commit-ID: d9e2ed610a6094534d13ea347c7b7a5bd7ce4ee5 Gitweb: https://git.kernel.org/tip/d9e2ed610a6094534d13ea347c7b7a5bd= 7ce4ee5 Author: Paul Burton AuthorDate: Mon, 28 Oct 2024 18:59:24 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 30 Oct 2024 15:41:18 +01:00 irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic() Use CM's GCR_CL_REDIRECT register to access registers in remote clusters, so that users of gic_with_each_online_cpu() gains support for multi-cluster without further changes. Signed-off-by: Paul Burton Signed-off-by: Chao-ying Fu Signed-off-by: Dragan Mladjenovic Signed-off-by: Aleksandar Rikalo Signed-off-by: Thomas Gleixner Tested-by: Serge Semin Tested-by: Gregory CLEMENT Link: https://lore.kernel.org/all/20241028175935.51250-3-arikalo@gmail.com --- drivers/irqchip/irq-mips-gic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index 6c7a7d2..29bdfdc 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c @@ -88,6 +88,12 @@ static int __gic_with_next_online_cpu(int prev) return cpu; } =20 +static inline void gic_unlock_cluster(void) +{ + if (mips_cps_multicluster_cpus()) + mips_cm_unlock_other(); +} + /** * for_each_online_cpu_gic() - Iterate over online CPUs, access local regi= sters * @cpu: An integer variable to hold the current CPU number @@ -102,6 +108,7 @@ static int __gic_with_next_online_cpu(int prev) guard(raw_spinlock_irqsave)(gic_lock); \ for ((cpu) =3D __gic_with_next_online_cpu(-1); \ (cpu) < nr_cpu_ids; \ + gic_unlock_cluster(), \ (cpu) =3D __gic_with_next_online_cpu(cpu)) =20 static void gic_clear_pcpu_masks(unsigned int intr)