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=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 746D7C433E9 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 4F8DC64EAA for ; Wed, 10 Feb 2021 14:47:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230184AbhBJOrv (ORCPT ); Wed, 10 Feb 2021 09:47:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49512 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbhBJOrq (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-kernel@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