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=-18.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 C0DFEC4332B for ; Wed, 10 Feb 2021 18:44:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CAEE64E26 for ; Wed, 10 Feb 2021 18:44:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233894AbhBJSoK (ORCPT ); Wed, 10 Feb 2021 13:44:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:52556 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234189AbhBJSaj (ORCPT ); Wed, 10 Feb 2021 13:30:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612981745; 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: in-reply-to:in-reply-to:references:references; bh=fYYBsxu73w7K0XguXXBeoWTwhLVvhJ5OOGR+uAgX+h4=; b=YkF052rp7m5mLbunPUSNjSSkOpQdLb6hHYKdnRr78QHETCnCi/jkAo1aInhMJx3lK2jKW0 WiJp3OBlLcisVVnobi+dYqbXUaeY2yvsGWJQL4Gu+oESInkx+ckkT1PclClBTQriDfJnYY gWbd9ear3GbCpgD6BrmdR7jhF1zl/Cw= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-342-qtADkG5MOVey4vd8CGgtWw-1; Wed, 10 Feb 2021 13:29:00 -0500 X-MC-Unique: qtADkG5MOVey4vd8CGgtWw-1 Received: by mail-wm1-f71.google.com with SMTP id l21so1296402wmj.1 for ; Wed, 10 Feb 2021 10:29:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fYYBsxu73w7K0XguXXBeoWTwhLVvhJ5OOGR+uAgX+h4=; b=CHTmr6y+q5kzUSnVpByk10wjrBezODqS0jUR+jCCKiQ3aC67maU8elrHmNOMTySVTV bN99Rl0TgrTAfummSkzClRORQNi5LeYbubKZ7ebLl1K8DKAIptjNWy4dy/dNEBWSWoza 3UYGhcyWsqWPCTS6IcIX7cJZGt92hRGQmr29SCcPu4AP6MCDhGduePgkmzP0qywmiSts faEi5ciX5jVc8ez+0FChUOmrHRPLq3RjSlF+8zNsT8+5DfXOiZKaQOa+905XNehi6TFA XjwIqbETdt3n5gpv4NZp7eod/CDyY9vcXa8D7vKI6PMhlSJEIHy+M+bMhnqOedykTzYy 2eXw== X-Gm-Message-State: AOAM531R2PopIlxQ+EMSNE4xrE4T5Bf5+oEiodwEPRXqs0sjjiOjh2l0 P7i57moIX9B+0l24kpaHU6zqAQxgoShnGXL8i1eokUuOFCkGf3beKURzRqc6WZHj/M6shW7bHuE TDXNx76NL4FlW5eTQftz8PYcH X-Received: by 2002:a1c:4483:: with SMTP id r125mr223835wma.80.1612981739026; Wed, 10 Feb 2021 10:28:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmxlNWuCd4Xp+dCygWJQUgZ2qxgJCc955uVLjJdnKvNrD9YC2BN6UDsWfR7xqj2wXggvYDdg== X-Received: by 2002:a1c:4483:: with SMTP id r125mr223811wma.80.1612981738761; Wed, 10 Feb 2021 10:28:58 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id w2sm3766006wmg.27.2021.02.10.10.28.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Feb 2021 10:28:58 -0800 (PST) Subject: Re: [PATCH] locking/arch: Move qrwlock.h include after qspinlock.h To: Waiman Long , Peter Zijlstra , Ingo Molnar , Will Deacon , Catalin Marinas , Thomas Bogendoerfer , Chris Zankel , Max Filippov Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-xtensa@linux-xtensa.org, Naresh Kamboju , Guenter Roeck , Ben Gardon References: <20210210144556.10932-1-longman@redhat.com> From: Paolo Bonzini Message-ID: <1d7d564c-cc73-372b-be8b-1cfd51cf476c@redhat.com> Date: Wed, 10 Feb 2021 19:28:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210210144556.10932-1-longman@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/02/21 15:45, Waiman Long wrote: > The queued rwlock code has a dependency on the current spinlock > implementation (likely to be qspinlock), but not vice versa. Including > qrwlock.h before qspinlock.h can be problematic when expanding qrwlock > functionality. > > If both qspinlock.h and qrwlock.h are to be included, the qrwlock.h > include should always be after qspinlock.h. Update the current set of > asm/spinlock.h files to enforce that. > > Signed-off-by: Waiman Long arch/sparc/include/asm/spinlock_64.h is missing. Also, the include in kernel/locking/qrwlock.c is not necessary (it may be there for aesthetic reasons, but it complicates thing in this case). I'll send a v2 that is based on the kvm/next tree. Paolo > --- > arch/arm64/include/asm/spinlock.h | 2 +- > arch/mips/include/asm/spinlock.h | 2 +- > arch/xtensa/include/asm/spinlock.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/include/asm/spinlock.h b/arch/arm64/include/asm/spinlock.h > index 9083d6992603..0525c0b089ed 100644 > --- a/arch/arm64/include/asm/spinlock.h > +++ b/arch/arm64/include/asm/spinlock.h > @@ -5,8 +5,8 @@ > #ifndef __ASM_SPINLOCK_H > #define __ASM_SPINLOCK_H > > -#include > #include > +#include > > /* See include/linux/spinlock.h */ > #define smp_mb__after_spinlock() smp_mb() > diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h > index 8a88eb265516..6ce2117e49f6 100644 > --- a/arch/mips/include/asm/spinlock.h > +++ b/arch/mips/include/asm/spinlock.h > @@ -10,7 +10,6 @@ > #define _ASM_SPINLOCK_H > > #include > -#include > > #include > > @@ -27,5 +26,6 @@ static inline void queued_spin_unlock(struct qspinlock *lock) > } > > #include > +#include > > #endif /* _ASM_SPINLOCK_H */ > diff --git a/arch/xtensa/include/asm/spinlock.h b/arch/xtensa/include/asm/spinlock.h > index 584b0de6f2ca..41c449ece2d8 100644 > --- a/arch/xtensa/include/asm/spinlock.h > +++ b/arch/xtensa/include/asm/spinlock.h > @@ -12,8 +12,8 @@ > #define _XTENSA_SPINLOCK_H > > #include > -#include > #include > +#include > > #define smp_mb__after_spinlock() smp_mb() > > 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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 75910C433DB for ; Wed, 10 Feb 2021 18:30:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 192A964E57 for ; Wed, 10 Feb 2021 18:30:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 192A964E57 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=c5x7ygfe1vNK/pp7XuLkU5XUYn04/4D6NsOKdwFue9c=; b=eNXpqQsBfQ2vAWI7jfVtAu8KX OzOAxRv3cVoLF36eDXUuT3wSBIa5xwl8yoMKUnAldvNt16EvNh7rb5r23aAdGgfn9D0/vSbEcWB6X Xo9uuiSXlXqfSHnPy8HZJjUbq6LiGHRJugTkk/MR3w8kju6mqROQ0CwIFsJt5N3nOMayBkV7ql3oh +6Qv5wK6Acy3DP/pQRAaU0UFqgpVO50CiBoPx2pdMVh4kLnwJVu2w4Im/uRVJpq4JzgRbsTH8lAzb n4LliU+cwLBw629QPTY6zHOSoIHDo5VuAnBnp0HwAXwcFa+93NzBnO+51k2j0QicHVrGB9rpiC+Qs sGs104P8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9uEg-0005su-LG; Wed, 10 Feb 2021 18:29:10 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9uEd-0005sF-GX for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 18:29:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612981746; 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: in-reply-to:in-reply-to:references:references; bh=fYYBsxu73w7K0XguXXBeoWTwhLVvhJ5OOGR+uAgX+h4=; b=irHiJf6qFUWmtPKXXpxiyC3puFF6y41JkxxoviHRqVuzQNs+qht2YgFTOIbxDoTcz103z5 7uI24Wh+TlrARdEmIr1qGv6XeG2g5WdR2r74WOg6u7d2SgmRQm0314rU3/BTnY6/Y95jaO OKkpD68ie/nYLmAO9FGgAviocpex7c4= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-297-3Qdrw3duNPibz2vsXyeIGA-1; Wed, 10 Feb 2021 13:29:00 -0500 X-MC-Unique: 3Qdrw3duNPibz2vsXyeIGA-1 Received: by mail-wm1-f72.google.com with SMTP id o18so1287613wmq.2 for ; Wed, 10 Feb 2021 10:29:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fYYBsxu73w7K0XguXXBeoWTwhLVvhJ5OOGR+uAgX+h4=; b=t4s+hczayk4+e0qqm1NlIAKu2pNmmygTV8lB1+p46TUAD6nIAyFRGn6OifC7XUOd/f ZItJ+cDPkqs1sDVfyAnKE0X34AJKhSCiD5jaeNmRhYY1RDW2gjySyFrT6AcKLmRyRASH eoZihSddfcK2R23JE1d5YVuMv3VaEr0J+y1/gszKStNPprzq111s5LP/YSKSDaGwMsyh ZKh9uf8y7LmwnAZtiUJSq+yrqC2ON90tH+sPRDdgcWZJhHiG22btREzi8T2co9PbIeO3 s4MP4E78B24uFxF5ooI5a78Z3jgaNNChXJFHODCpb8QlslFvPyU7vapLezrEGjFhFZbL iP6w== X-Gm-Message-State: AOAM532jKqL5azOJ3CzDVHYRffky62SEZnOkyr8B7KBokYVgby4BKrB5 wa9QkWwh4IEIiOFrDmv/R4NR1wPqYZGqamEZJzrBcYMeKYYDhp8T9TxIXk4/rtYmWSRhiJPXAH+ J0RftOoqoB9OpLZi6qwurEyftUsMDWNY5Cmo= X-Received: by 2002:a1c:4483:: with SMTP id r125mr223846wma.80.1612981739027; Wed, 10 Feb 2021 10:28:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmxlNWuCd4Xp+dCygWJQUgZ2qxgJCc955uVLjJdnKvNrD9YC2BN6UDsWfR7xqj2wXggvYDdg== X-Received: by 2002:a1c:4483:: with SMTP id r125mr223811wma.80.1612981738761; Wed, 10 Feb 2021 10:28:58 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id w2sm3766006wmg.27.2021.02.10.10.28.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Feb 2021 10:28:58 -0800 (PST) Subject: Re: [PATCH] locking/arch: Move qrwlock.h include after qspinlock.h To: Waiman Long , Peter Zijlstra , Ingo Molnar , Will Deacon , Catalin Marinas , Thomas Bogendoerfer , Chris Zankel , Max Filippov References: <20210210144556.10932-1-longman@redhat.com> From: Paolo Bonzini Message-ID: <1d7d564c-cc73-372b-be8b-1cfd51cf476c@redhat.com> Date: Wed, 10 Feb 2021 19:28:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210210144556.10932-1-longman@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_132907_597745_F01D0DF6 X-CRM114-Status: GOOD ( 21.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-xtensa@linux-xtensa.org, Naresh Kamboju , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ben Gardon , Guenter Roeck Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/02/21 15:45, Waiman Long wrote: > The queued rwlock code has a dependency on the current spinlock > implementation (likely to be qspinlock), but not vice versa. Including > qrwlock.h before qspinlock.h can be problematic when expanding qrwlock > functionality. > > If both qspinlock.h and qrwlock.h are to be included, the qrwlock.h > include should always be after qspinlock.h. Update the current set of > asm/spinlock.h files to enforce that. > > Signed-off-by: Waiman Long arch/sparc/include/asm/spinlock_64.h is missing. Also, the include in kernel/locking/qrwlock.c is not necessary (it may be there for aesthetic reasons, but it complicates thing in this case). I'll send a v2 that is based on the kvm/next tree. Paolo > --- > arch/arm64/include/asm/spinlock.h | 2 +- > arch/mips/include/asm/spinlock.h | 2 +- > arch/xtensa/include/asm/spinlock.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/include/asm/spinlock.h b/arch/arm64/include/asm/spinlock.h > index 9083d6992603..0525c0b089ed 100644 > --- a/arch/arm64/include/asm/spinlock.h > +++ b/arch/arm64/include/asm/spinlock.h > @@ -5,8 +5,8 @@ > #ifndef __ASM_SPINLOCK_H > #define __ASM_SPINLOCK_H > > -#include > #include > +#include > > /* See include/linux/spinlock.h */ > #define smp_mb__after_spinlock() smp_mb() > diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h > index 8a88eb265516..6ce2117e49f6 100644 > --- a/arch/mips/include/asm/spinlock.h > +++ b/arch/mips/include/asm/spinlock.h > @@ -10,7 +10,6 @@ > #define _ASM_SPINLOCK_H > > #include > -#include > > #include > > @@ -27,5 +26,6 @@ static inline void queued_spin_unlock(struct qspinlock *lock) > } > > #include > +#include > > #endif /* _ASM_SPINLOCK_H */ > diff --git a/arch/xtensa/include/asm/spinlock.h b/arch/xtensa/include/asm/spinlock.h > index 584b0de6f2ca..41c449ece2d8 100644 > --- a/arch/xtensa/include/asm/spinlock.h > +++ b/arch/xtensa/include/asm/spinlock.h > @@ -12,8 +12,8 @@ > #define _XTENSA_SPINLOCK_H > > #include > -#include > #include > +#include > > #define smp_mb__after_spinlock() smp_mb() > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel