From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 57CFD399358 for ; Mon, 24 Aug 2026 07:43:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787557383; cv=none; b=FNNrUhVwMtEkVwr7LYnpvRY9tUb2TCXvF5uh3UwDrnFQZX/x9QGj1LLmKPOcjK9Mdp+CIZrqz+Xxs1SbOGamLuYx57ozUjqWECufYxfHyUQZQShtRWmj6GHsaijCbWeisLA/EQfvocLOgOQV6AZ+IBG5D++qCQF39Fd2RIYjL1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787557383; c=relaxed/simple; bh=yRmqeB3nRRvYemUlNul/PM8ZinWnakfSns0oc5NX2oM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EWA5u5XkFYmF0uvhyticJyvak1PKClDF5PGFLu9udn+eZ8SruA06xuDexUojXAyX8PJpg4KW2gPuzc59IxT5Z0WSCPl3HoTsr0cOPKvjty3wr7LOMI6nbdwQ8kzkCh8lmZbz1jekDdqO3wleGXA/NH5n6fkmR89MdMS9FXKDC0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Gu5KgeyA; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Gu5KgeyA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1787557379; bh=yRmqeB3nRRvYemUlNul/PM8ZinWnakfSns0oc5NX2oM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Gu5KgeyAGYt4AmheSJnE1GUfgmYF5DqgmS6dqSHQ/s9fNh9o5GZRfjQA2It35cOvv 80VSAZOtz30FPHJQZVGlYXKrcDhEeFzis7K2VcEHPCJBCFD5lRLUjhARXs0VApE8VV mPZJwdqQdJ+aNA7Omuz2gZ5tUUIPdXDGHkHz0hRhFBkia/G/RP3WjLZVdQwycA8rnv YC+R5YDiwij6DxsNncxeQMMjAkPkygUahyNtwTvvbz53sd4AVG2yFhgi1oXJnc4WmB IuHLDLdQ2vPbd34YzGBm81+BbrtZ8+icoH68KGGBfVLzBKDOx5iwdl68HOY4YLHk2c 8AAUcN0FYCf7Q== Received: from fedora-21.home (unknown [100.64.0.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 96A7617E0887; Mon, 24 Aug 2026 09:42:58 +0200 (CEST) Date: Mon, 24 Aug 2026 09:42:53 +0200 From: Boris Brezillon To: Steven Price Cc: Liviu Dudau , Chia-I Wu , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 6/9] drm/panthor: Protect events processing with a separate spinlock Message-ID: <20260824094253.3e468c28@fedora-21.home> In-Reply-To: <85003800-2ba5-436e-8001-d6804ad2633d@arm.com> References: <20260811-panthor-signal-from-irq-v6-0-12f2ab53d735@collabora.com> <20260811-panthor-signal-from-irq-v6-6-12f2ab53d735@collabora.com> <85003800-2ba5-436e-8001-d6804ad2633d@arm.com> Organization: Collabora X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 17 Aug 2026 16:21:25 +0100 Steven Price wrote: > > + /** > > + * @events_lock: Lock taken when processing events. > > + * > > + * This also needs to be taken when csg_slots are updated, to make sure > > + * the event processing logic doesn't touch groups that have left the CSG > > + * slot. > > + */ > > + spinlock_t events_lock; > > + > > /** > > * @csg_slots: FW command stream group slots. > > + * > > + * Updates to these slots must happen with both panthor_scheduler::lock and > > + * panthor_scheduler::events_lock held. As a result, reads can happen with > > + * either of these locks held. > > Technically this isn't quite true - priority can be changed with only > sched->lock. Perhaps the following would be slightly more accurate wording? > > * Updates to the group binding must happen with both > * panthor_scheduler::lock and panthor_scheduler::events_lock held. > * The group binding may therefore be read while holding either lock. > * Other slot fields are protected by panthor_scheduler::lock. I'll go for your suggestion in v7.