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.3 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,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 62157C433E0 for ; Wed, 10 Feb 2021 14:47:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 335EE64E79 for ; Wed, 10 Feb 2021 14:47:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231553AbhBJOrr (ORCPT ); Wed, 10 Feb 2021 09:47:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:53506 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231543AbhBJOrq (ORCPT ); Wed, 10 Feb 2021 09:47:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612968378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=fPXbqURy6kSX4ZxoBdBuEq+FZUuby0EHA9k832hQnFM=; b=X2pSm1cHDIH/x5FHLcrG4KW9NeagUJDeCotD0t6Mu/kvFkP+DEsmMO5g4xSOCAd8p9WcDy 2rZGoGxqs3EiJVo0d6QiZDBNuAata/iUyie7UOman50IKE98BvieddLSAZg0tZ7kkx7r/a LIONWPG2/V+RWOcI6BibcCn9kfiIxbQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-oJQTCZx_MwWRjqm9NwJ5tQ-1; Wed, 10 Feb 2021 09:46:16 -0500 X-MC-Unique: oJQTCZx_MwWRjqm9NwJ5tQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3CD8B1005501; Wed, 10 Feb 2021 14:46:13 +0000 (UTC) Received: from llong.com (ovpn-115-20.rdu2.redhat.com [10.10.115.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C24860936; Wed, 10 Feb 2021 14:46:06 +0000 (UTC) From: Waiman Long To: 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 , Waiman Long Subject: [PATCH] locking/arch: Move qrwlock.h include after qspinlock.h Date: Wed, 10 Feb 2021 09:45:56 -0500 Message-Id: <20210210144556.10932-1-longman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 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/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() -- 2.18.1 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=-14.3 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,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 EE978C433E0 for ; Wed, 10 Feb 2021 14:47:32 +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 A676F64E6C for ; Wed, 10 Feb 2021 14:47:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A676F64E6C 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-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=s5uJDJLUPQ7I8KiwTTrWd9bV2qHgcPF7vRSzS0gJQU8=; b=cytxw16n44B9THgNn7nEnMrEKx kM21og6ARdGhj0CUqQi/RDv7zPh67iPSU5yWDT+FEn+U2ZeQk4IQdNUel2EDuL2K7KApQgH0HRo/J o+nVVP6XNQg1aVLBGJkkYoLzME8nR7hyJgizYbcHl5agUi+yuYGYiS5/mboVcHJr2i5luxfwz6nsb BiOXndVFS2X5aTZQMbZnB2WYab29HnoUSPepgkwrB9Ot1Z6QNbqKm/3iDg9tQdXYj38UNJos9+vCK 1OANWOUQiNwzkBYJ9cVvDd+f0p1JoKGLk9HQfMGMx/vey7owhOPWN0xUFkpIvuq676lVwLmTvOjIP wth/eAiQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9ql5-0005YC-HS; Wed, 10 Feb 2021 14:46:23 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9ql3-0005XN-02 for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 14:46:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612968380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=fPXbqURy6kSX4ZxoBdBuEq+FZUuby0EHA9k832hQnFM=; b=HvfIbYhaapKJiLMt0VfJ3nn5fsVgkij3p279daAkdjJYbaTt73Zf/NtQoRIB9JUdPx9Phn 7kn2Ru5Haj5a19lueBOGIH1KIr3UsuA68rDLdfIE99x777W2TdwUobVoYIGEXVaqDjD8DV x6c2/kzTHmIiJ8xfPjfmTQ47NUG+UtQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-oJQTCZx_MwWRjqm9NwJ5tQ-1; Wed, 10 Feb 2021 09:46:16 -0500 X-MC-Unique: oJQTCZx_MwWRjqm9NwJ5tQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3CD8B1005501; Wed, 10 Feb 2021 14:46:13 +0000 (UTC) Received: from llong.com (ovpn-115-20.rdu2.redhat.com [10.10.115.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C24860936; Wed, 10 Feb 2021 14:46:06 +0000 (UTC) From: Waiman Long To: Peter Zijlstra , Ingo Molnar , Will Deacon , Catalin Marinas , Thomas Bogendoerfer , Chris Zankel , Max Filippov Subject: [PATCH] locking/arch: Move qrwlock.h include after qspinlock.h Date: Wed, 10 Feb 2021 09:45:56 -0500 Message-Id: <20210210144556.10932-1-longman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_094621_097002_15929BC1 X-CRM114-Status: GOOD ( 13.37 ) 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 , Waiman Long , Guenter Roeck MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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/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() -- 2.18.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel