From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6B3AB18FDAB; Wed, 22 Jan 2025 19:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737574294; cv=none; b=BF+eabN7QOwNejH1XrKHyzrU1pMMsv27D7uxKG01tvgBlh6XQygFZMz9J8qUpgkTc0amBzjSSg6P36OmBIFTY4d5HeWaS2mlN69e1Pz1bWvl4w6KfovjylpeTXiySlRXPRsWuuGTcz244p/t2byVpUhKae2digRiEQLmK/U2Lys= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737574294; c=relaxed/simple; bh=6QA8OxHuZG09CDIg9SnArXFjqSB/sN3uq4g+SbLI7Aw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X9cIdJa6NICkBnuba1Q9vAZOLL5P/DeZImtSb9q2xqutaPrfc7afcCTGLdgb4QrvuqGdoFS/dam5Y8cQ9uzzK+Fx5psMCkF04CAHc35+0Y2y3GaXIDTkFS3Upiwp2JsXCVQpSIG/nb4a4ICvd77hSy7SkuYlX7g3gMl/cjWFOcY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 748C5C4CED2; Wed, 22 Jan 2025 19:31:32 +0000 (UTC) Date: Wed, 22 Jan 2025 14:31:37 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , stable@vger.kernel.org, Thomas Gleixner , Linus Torvalds , Andreas Larsson , Ludwig Rydberg Subject: Re: [for-next][PATCH 2/2] atomic64: Use arch_spin_locks instead of raw_spin_locks Message-ID: <20250122143137.2f613629@gandalf.local.home> In-Reply-To: <20250122175701.GA34562@noisy.programming.kicks-ass.net> References: <20250121201942.978460684@goodmis.org> <20250121202123.224056304@goodmis.org> <20250122101457.GG7145@noisy.programming.kicks-ass.net> <20250122105517.4f80bf23@gandalf.local.home> <20250122175701.GA34562@noisy.programming.kicks-ass.net> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-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 Wed, 22 Jan 2025 18:57:01 +0100 Peter Zijlstra wrote: > If I followed the maze right, then I get something like: > > raw_spin_lock_irqsave(lock, flags) > local_irq_save(flags); > preempt_disable(); > arch_spin_lock(lock); > mmiowb_spin_lock(); > > > And here you leave out that preempt_disable() and mmiowb stuff. The > former is fine because local_irq_save() already makes things > non-preemptible and there are no irq-state games. The mmiowb thing is > fine because nothing inside this critical section cares about mmio. Ah, yeah. OK, I don't plan on adding the preempt_disable() either as again, this is really just an emulation of atomic64 for architectures that do not support it. I'll resend this with an updated change log. Thanks for the review. -- Steve