From mboxrd@z Thu Jan 1 00:00:00 1970 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 8EC0536BCDA for ; Thu, 9 Apr 2026 11:11: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=1775733118; cv=none; b=EVwsbkBLPUXAeNbCsHLl9EwMGp2rDAEVjnAR3jKs7bphcloSk7BOPPn0x1Hsx+/Ab64r7cEIjMw5ZCNe5D9cO4gnV8shfu2d4OR9dYB7P1xVQwgR+1+D/x09Vmpdb11NR2NQczssITxve7hUWaL65FHJHT78GmIzaxPbHuTlWjk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775733118; c=relaxed/simple; bh=AoUtqzYFWXn4OHGpv2KYzGB0nYdxCbB6fglYWbPzI9g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=jqB2mh8V/z8/HFfjG0pOia41/0ixwF8cnwnNICus39RAtaEsks1HgkpmL/XTyaxyUlHldjggiGq3XDaF6oHJH2tEQMEL5jCsGEgy+rsuCNIX/6MJGeG3UhCB7zyXPuHq8b+kaWrNoELlNq7pypPsWsr+4Mvr8nowzZq5xt76nU4= 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=u9cBn0zI; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LmaBh0t3; 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="u9cBn0zI"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LmaBh0t3" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775733115; 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=oZdKP1lErTq916N25vUT3CcocTc0ijygY1mA5pMEYCs=; b=u9cBn0zIA9fz8msN0P0BGC4H0zEdTqxoLpT2oLxSmlx7I5y2CDgbbJipDjCEGZ+4HHtjTD 9+4DFIBwWLq+achSE1/RyQeRGMT0oXsOlINRh4nr5PLwB79uE62/K4aj/IDRBdj+YVajmO QG5zu9l0Bj+D10nep8MXfSQheGrsXaEdUb9NqBtJFmLrrpU+Y90x0BtOtDH6uICd94coBE AGhbTpEUi7tX8pEs3tN6xNkJEYd5vW77NHtkZqls2l4FaYVZSC0DzaJFBOSdZE5JZPU991 i+6fXxnWdcyT4WmQK2OL9ykamD/iFsGVts5IKGFUnSNxu6JU2rVyCC2lsnv1vg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775733115; 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=oZdKP1lErTq916N25vUT3CcocTc0ijygY1mA5pMEYCs=; b=LmaBh0t3ncXU7W7jtAyiNrS6+JM2LtJZkw5Z4iS7sLBtFqUW1doLb1SSzPPAJp9v96SHKE P8T9XLDXTR+Zv+AQ== To: Thomas Gleixner , LKML Cc: Mathieu Desnoyers , =?utf-8?Q?Andr?= =?utf-8?Q?=C3=A8?= Almeida , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Florian Weimer , Rich Felker , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" , Uros Bizjak , Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Subject: Re: [patch V4 03/14] futex: Move futex related mm_struct data into a struct In-Reply-To: <20260402151939.799362400@kernel.org> References: <20260402151131.876492985@kernel.org> <20260402151939.799362400@kernel.org> Date: Thu, 09 Apr 2026 13:11:54 +0200 Message-ID: <87jyuggzgl.fsf@yellow.woof> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Thomas Gleixner writes: > --- a/include/linux/futex_types.h > +++ b/include/linux/futex_types.h > @@ -29,8 +29,41 @@ struct futex_sched_data { > struct mutex exit_mutex; > unsigned int state; > }; > -#else > + > +#ifdef CONFIG_FUTEX_PRIVATE_HASH > +/** > + * struct futex_mm_phash - Futex private hash related per MM data > + * @lock: Mutex to protect the private hash operations > + * @hash: RCU managed pointer to the private hash > + * @hash_new: Pointer to a newly allocated private hash > + * @batches: Batch state for RCU synchronization > + * @rcu: RCU head for call_rcu() > + * @atomic: Aggregate value for @hash_ref > + * @ref: Per CPU reference counter for a private hash > + */ > +struct futex_mm_phash { > + struct mutex lock; > + struct futex_private_hash __rcu *hash; > + struct futex_private_hash *hash_new; > + unsigned long batches; > + struct rcu_head rcu; > + atomic_long_t atomic; > + unsigned int __percpu *ref; > +}; Riscv build breaks horribly. This fixes it: diff --git a/include/linux/futex_types.h b/include/linux/futex_types.h index 288666fb37b6..eb9f9cc0ffc6 100644 --- a/include/linux/futex_types.h +++ b/include/linux/futex_types.h @@ -5,6 +5,7 @@ #ifdef CONFIG_FUTEX #include #include +#include struct compat_robust_list_head; struct futex_pi_state; Nam