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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 E3386C4338F for ; Sun, 15 Aug 2021 21:29:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3F8760FD8 for ; Sun, 15 Aug 2021 21:29:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229760AbhHOV3b (ORCPT ); Sun, 15 Aug 2021 17:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbhHOV2V (ORCPT ); Sun, 15 Aug 2021 17:28:21 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC57C061764 for ; Sun, 15 Aug 2021 14:27:51 -0700 (PDT) Message-ID: <20210815211302.429918071@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1629062870; 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: content-transfer-encoding:content-transfer-encoding: references:references; bh=7CBCUxlgHeb+vOFixqTSYYb16Nxvav4y8tgc2d3NAcQ=; b=11LzPJUybhIyRxhgWwOLzp1JZ6zGh4AwgW5VsGWZYnlWjT5wLkUnLfcJkNpZ8dPO8HDHrI AeHgYtSE6pOx8oMeo7kp5dfGdY4kL2OsV99qwNIKt0YnJMnTTSvCD1xCoPo8gXz6hId1C5 fzRLEPttczVdSuppfZ0hb9NULNwGEU+e8cXW4o4kf3PgTg0gpsIX/JB4dv3W/ZQoyGcl2b ERabq1ke2uNxuGSBQdVKTwctRmnrUNUIWQ7TO05VK0YvPgpGGONtK8AUVb6xPRx4UPlwnJ iuTpxFoTpRlGgCUWPetDXhIyVO6eLVMwb7rAgEggxS8PKx0nzmxqBNHXYzRe1Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1629062870; 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: content-transfer-encoding:content-transfer-encoding: references:references; bh=7CBCUxlgHeb+vOFixqTSYYb16Nxvav4y8tgc2d3NAcQ=; b=72GSGSsKuwaCOpKxbRhsgqPAgoDO16RwA3yvQWWEVeM3MMVSGHZxrRGKjO+zmq+HqKU3Nh zp1ADK6K9X+cNqAA== From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Will Deacon , Waiman Long , Boqun Feng , Sebastian Andrzej Siewior , Davidlohr Bueso , Mike Galbraith Subject: [patch V5 09/72] sched/wake_q: Provide WAKE_Q_HEAD_INITIALIZER References: <20210815203225.710392609@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-transfer-encoding: 8-bit Date: Sun, 15 Aug 2021 23:27:49 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner The RT specific spin/rwlock implementation requires special handling of the to be woken waiters. Provide a WAKE_Q_HEAD_INITIALIZER which can be used by the rtmutex code to implement a RT aware wake_q derivative. Signed-off-by: Thomas Gleixner --- include/linux/sched/wake_q.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- --- a/include/linux/sched/wake_q.h +++ b/include/linux/sched/wake_q.h @@ -42,8 +42,11 @@ struct wake_q_head { #define WAKE_Q_TAIL ((struct wake_q_node *) 0x01) -#define DEFINE_WAKE_Q(name) \ - struct wake_q_head name = { WAKE_Q_TAIL, &name.first } +#define WAKE_Q_HEAD_INITIALIZER(name) \ + { WAKE_Q_TAIL, &name.first } + +#define DEFINE_WAKE_Q(name) \ + struct wake_q_head name = WAKE_Q_HEAD_INITIALIZER(name) static inline void wake_q_init(struct wake_q_head *head) {