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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71E19C4338F for ; Thu, 5 Aug 2021 09:04:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4940760E8D for ; Thu, 5 Aug 2021 09:04:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238830AbhHEJEn (ORCPT ); Thu, 5 Aug 2021 05:04:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231865AbhHEJEm (ORCPT ); Thu, 5 Aug 2021 05:04:42 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADC2C061765 for ; Thu, 5 Aug 2021 02:04:29 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628154267; 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=qerA/3w98zKHBl/JR8gFLXMxNSmnHTzMiH8UfpFC6/Y=; b=AlRdJ/zspZYgz2vHfFPAur1J8SgJSAV9YsS2NDJLAqhOETa7b20HFTwrga0da6a/wR3oCo A8k1VI7OkI+xBYmhJHxaMel97/bQviv6lLT0mabdjZDrH/EKXkftKxiDyFCiCopqf7xdM1 tEwSCrMtLpuJKLmM+hKt4zRf80jREz5QphnTdyhGNnaZ7No/Ib0HGtno5CaSy0kjiKN3HO +BUvqLJREpciZ/dzyGuMVnsHueBJ1Ifw2wH5h+mmawIvAFpoiSqH2kTPBU7x1BhPqipKxx CqH3ntp9VmCC/EFYKbpG87qrLi1EZdiZjkvbf6CJCRJstXo4KFpKGq4Nff7XCg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628154267; 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=qerA/3w98zKHBl/JR8gFLXMxNSmnHTzMiH8UfpFC6/Y=; b=yAjAnSnBRMsU8f4PUzplL65BNx3crGSeLOngfC8uZTVgRhayhTosWRqcZ7X3LPuFx0jStq 1nwqY5OnbDL9UQAw== To: Waiman Long , LKML Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Will Deacon , Boqun Feng , Sebastian Andrzej Siewior , Davidlohr Bueso Subject: Re: [patch 15/63] locking: Add base code for RT rw_semaphore and rwlock In-Reply-To: <710fff58-1db3-d0c2-21db-b1837d37bfee@redhat.com> References: <20210730135007.155909613@linutronix.de> <20210730135206.018846923@linutronix.de> <710fff58-1db3-d0c2-21db-b1837d37bfee@redhat.com> Date: Thu, 05 Aug 2021 11:04:27 +0200 Message-ID: <87o8ac1cv8.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 04 2021 at 15:37, Waiman Long wrote: > On 7/30/21 9:50 AM, Thomas Gleixner wrote: >> +static int __sched rwbase_write_lock(struct rwbase_rt *rwb, >> + unsigned int state) >> +{ >> + struct rt_mutex_base *rtm = &rwb->rtmutex; >> + unsigned long flags; >> + >> + /* Take the rtmutex as a first step */ >> + if (rwbase_rtmutex_lock_state(rtm, state)) > > This function is used here before it was defined in next patch (patch 16). Correct and there are more I think. But that's a hen and egg problem: The base code cannot be compiled without the actual implementation for either rw_semaphore or rw_lock substitutions. The implementations cannot be compiled without the base code. So I chose to split it up so the base logic is separate. Thanks, tglx