From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D8B5C36015 for ; Tue, 17 Sep 2024 11:51:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zNebPkkCATOz/8G2Ty+8PI8yqXvC2oGmbRAGfEPpIEQ=; b=xlWfC6ZdR74S67QDIqwvF3MdEN ubpENF2eQ++2Mtixe1MR5OTmgTBfhT6hF7Li/M3zj83rte4qJVmHb3ISUpmGMGa2IWHzu2w/wpOGA sd/Cvb6EORn5EtkGq8qU4NayTSgY7yjmw5Vd6owFTBDbje9FvkotFnmjDUYeD3e14RM/7cLpauSUn Gu0HJ+mYmnKdRJRyt7120ZYah8Q2aBukglqeO0Hh0NpUl3a5Y0wZasD+CnOlO+vBBPT8we1IeYhP1 nFznVHqMHqdc0BA58X/fA6fs9WUBtYCxC6h5podzi/EWxPywZNeo0Rk7UXAolcxB4fovpQXW0ygt/ qyyDqBZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sqWk9-000000064xB-0164; Tue, 17 Sep 2024 11:51:41 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sqWiz-000000064my-49mH for linux-arm-kernel@lists.infradead.org; Tue, 17 Sep 2024 11:50:33 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1726573826; 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=zNebPkkCATOz/8G2Ty+8PI8yqXvC2oGmbRAGfEPpIEQ=; b=BYufc599OW5+qnbK4980v4vs8tbQ87dmQIKHUIPm3bX0LdTh0yIimmqTGgpRF4pdPWiMQ/ 9atAPwy9bSVufVu+YVSgJRUcHYhyAZXzi70kAHjGnnew2XCIKo6bSYoarnmjAdCO8coEc+ nGYLJhoqUfmAsEP1lx4eG7K9Ilf00dKu7Y4/Wv8fktbDVILaQe2r8tZhjww40k8cslhg0+ vxwi/ZrPIiQuKFeSlDldo1u+YI/eJCpR28+wc0QfOP/DxCzgbjls4tyLRTIT1q6YwvvynM xzD5E20+n5g/hImN0kKjIE50A5ZLyfqcK3N4s46/l+BF23pdTEpg8rSLzjDZ/g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1726573826; 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=zNebPkkCATOz/8G2Ty+8PI8yqXvC2oGmbRAGfEPpIEQ=; b=0W9NCMyQ+egH0HM5V0+4TQQneA5B2GzQAI0DJcSHVUfp/Ie0VUkXoSOjbkPqE/A0+QEHRs mDGYjLCZ8ngz+7CA== To: Will Deacon , "Christoph Lameter (Ampere)" Cc: kernel test robot , Christoph Lameter via B4 Relay , Catalin Marinas , Peter Zijlstra , Ingo Molnar , Waiman Long , Boqun Feng , oe-kbuild-all@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Jani Nikula , Rodrigo Vivi , intel-gfx@lists.freedesktop.org Subject: Re: [PATCH v3] Avoid memory barrier in read_seqcount() through load acquire In-Reply-To: <20240917073703.GB27290@willie-the-truck> References: <20240912-seq_optimize-v3-1-8ee25e04dffa@gentwo.org> <202409132135.ki3Mp5EA-lkp@intel.com> <766fe92a-13da-f299-0ecf-f8a477d58a79@gentwo.org> <20240917073703.GB27290@willie-the-truck> Date: Tue, 17 Sep 2024 13:50:25 +0200 Message-ID: <87r09i1ou6.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240917_045030_195450_6F9EF0E9 X-CRM114-Status: GOOD ( 19.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Cc+ i915 people On Tue, Sep 17 2024 at 08:37, Will Deacon wrote: > On Mon, Sep 16, 2024 at 10:52:18AM -0700, Christoph Lameter (Ampere) wrote: >> On Fri, 13 Sep 2024, kernel test robot wrote: >> >> > >> drivers/gpu/drm/i915/gt/intel_tlb.h:21:47: error: macro "seqprop_sequence" requires 2 arguments, but only 1 given >> >> From 15d86bc9589f16947c5fb0f34d2947eacd48f853 Mon Sep 17 00:00:00 2001 >> From: Christoph Lameter >> Date: Mon, 16 Sep 2024 10:44:16 -0700 >> Subject: [PATCH] Update Intel DRM use of seqprop_sequence >> >> One of Intels drivers uses seqprop_sequence() for its tlb sequencing. >> We added a parameter so that we can use acquire. Its pretty safe to >> assume that this will work without acquire. >> >> Signed-off-by: Christoph Lameter >> --- >> drivers/gpu/drm/i915/gt/intel_tlb.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/i915/gt/intel_tlb.h b/drivers/gpu/drm/i915/gt/intel_tlb.h >> index 337327af92ac..81998c4cd4fb 100644 >> --- a/drivers/gpu/drm/i915/gt/intel_tlb.h >> +++ b/drivers/gpu/drm/i915/gt/intel_tlb.h >> @@ -18,7 +18,7 @@ void intel_gt_fini_tlb(struct intel_gt *gt); >> >> static inline u32 intel_gt_tlb_seqno(const struct intel_gt *gt) >> { >> - return seqprop_sequence(>->tlb.seqno); >> + return seqprop_sequence(>->tlb.seqno, false); >> } > > Yikes, why is the driver using the seqlock internals here? It's a bit of > a pity, as a quick grep suggest that this is the _only_ user of > 'seqcount_mutex_t', yet it's still having to work around the API. Why the hell can't i915 use the proper interfaces and has to bypass the core code? Just because C allows that does not make it correct. Can the i915 people please remove this blatant violation of layering? Thanks, tglx