From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6213238644D for ; Tue, 4 Aug 2026 13:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785849792; cv=none; b=PxSxruinuMOEy2I+Vjl8PIR9a8eu1qaLjPYdGeHlNBOgd/pdLrVqQV2J9B0JyyVlJXt+eQ5Vs1EJ2PqZ8uI3JKCn0QMPp3ZMUhnW6twlXPTieJJMxFjmPok0s9MedhZojfYOXtXoffXmGpfBmNx4YEY55gXQFiFZNn0B74vtDu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785849792; c=relaxed/simple; bh=Bpz4EOMhivfuILCNjK+1WCphsPbYAji7N/PHVQzUouk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ugkLGtYmuevpZjPCtsu0xRW+JJ2D6IFk22p+tKvNH+cE0eRDEaGe0WAFG0dXoSjFf4F3u0IM4QiML6d1R1TCh6IbRWWzkCxrCJ8IhFfiksfzhkQU2oPzjI/3a+6fLLWcZ6LxRUviyYghNCm7RMV7Xu/pjwwWdjSChMFgEF4UF+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=dyrLH/zx; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="dyrLH/zx" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AEB301476; Tue, 4 Aug 2026 06:23:05 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CA32E3F66F; Tue, 4 Aug 2026 06:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1785849789; bh=Bpz4EOMhivfuILCNjK+1WCphsPbYAji7N/PHVQzUouk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dyrLH/zxaSvft5wkvkCm1C0Zzl1n4AWnxFrWeqitT402zZErU6t3t9TfXpKkW1kfz MLEs2gbX2flreE54g024UyS4fMMFR18pilGmj0dxSSvxaverNiIm0FAFlxrj3r0HHu p0i2KaswadZjKPFYsYAjyTqct9JyNUgHaLxswaLY= Date: Tue, 4 Aug 2026 14:23:02 +0100 From: Mark Rutland To: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org, ada.coupriediaz@arm.com, ardb@kernel.org, catalin.marinas@arm.com, hca@linux.ibm.com, linux-kernel@vger.kernel.org, maz@kernel.org, ruanjinjie@huawei.com, vladimir.murzin@arm.com, will@kernel.org, yang@os.amperecomputing.com Subject: Re: [RFC PATCH 06/13] arm64: percpu: Add infrastructure for preemptible this_cpu_*() ops Message-ID: References: <20260728123859.2911495-1-mark.rutland@arm.com> <20260728123859.2911495-7-mark.rutland@arm.com> <20260728141958.GV751831@noisy.programming.kicks-ass.net> <20260728164912.GK651302@noisy.programming.kicks-ass.net> 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-Disposition: inline In-Reply-To: <20260728164912.GK651302@noisy.programming.kicks-ass.net> On Tue, Jul 28, 2026 at 06:49:12PM +0200, Peter Zijlstra wrote: > On Tue, Jul 28, 2026 at 04:53:52PM +0100, Mark Rutland wrote: > > > > > +#define ____PCPU_GPRS_BEGIN(gprs, pcp, off, addr) \ > > > > + __DEFINE_ASM_GPR_NUMS \ > > > > + __DEFINE_ASM_GPR_ALIASES \ > > > > + " mov w" off ", #" __VAL_PCPU_GPRS(pcp, off, addr) "\n" \ > > > > + " strh w" off ", " gprs "\n" \ > > > > + __KERN_ASM_CPU_OFFSET(off) "\n" > > > > > > Can this macro also generate a readable comment for those few of us > > > building the .i file ? > > > > Do you mean for __VAL_PCPU_GPRS, or ____PCPU_GPRS_BEGIN() ? > > I was thinking BEGIN, but whatever is easiest, the __VAL thing is only > ever used in BEGIN anyway. > > > I can happily add comments for either (and the corresponding ENDs). > > Not sure the comment makes sense for end, that's simply storing 0 and > seems clear enough. FWIW, for v2 I've added the following to ____PCPU_GPRS_BEGIN(): "// ____PCPU_GPRS_BEGIN(" gprs ", " pcp ", " off ", " addr")\n" ... which should make that easy to spot, and surfaces the exact registers used. Mark.