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=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 8035AC433E0 for ; Wed, 10 Feb 2021 14:58:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E86364E87 for ; Wed, 10 Feb 2021 14:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231759AbhBJO6z (ORCPT ); Wed, 10 Feb 2021 09:58:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26060 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230394AbhBJO6u (ORCPT ); Wed, 10 Feb 2021 09:58:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612969042; 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=PA7CbQ28iF3COQPnO4RZrKLSnHnB37vlar5EOpU27eg=; b=UO2z/dO4M1uW/buHIn9oJv7HzbeNmIv2sAF49BZNRitNp2JmJQVl7cDYdJd0E4UPmyjTiy ++6b7oreIeE4F4mmyHIytVRuukf92XHTTHFAq26/z3oo8Z9PKANugs88TfN+BsUNk3XRvE /ijDpivBnCztLumtpeM/R3VDjBeDiTE= 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-48-luhDp1vNMdKn38bF2w6E4Q-1; Wed, 10 Feb 2021 09:57:19 -0500 X-MC-Unique: luhDp1vNMdKn38bF2w6E4Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 30FCF106BC6D; Wed, 10 Feb 2021 14:57:17 +0000 (UTC) Received: from llong.remote.csb (ovpn-115-20.rdu2.redhat.com [10.10.115.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42CFD57; Wed, 10 Feb 2021 14:57:12 +0000 (UTC) Subject: Re: [PATCH v2 06/28] locking/rwlocks: Add contention detection for rwlocks To: Guenter Roeck Cc: Ben Gardon , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Peter Xu , Sean Christopherson , Peter Shier , Peter Feiner , Junaid Shahid , Jim Mattson , Yulei Zhang , Wanpeng Li , Vitaly Kuznetsov , Xiao Guangrong , Ingo Molnar , Will Deacon , Peter Zijlstra , Davidlohr Bueso References: <20210202185734.1680553-1-bgardon@google.com> <20210202185734.1680553-7-bgardon@google.com> <20210209203908.GA255655@roeck-us.net> <3ee109cd-e406-4a70-17e8-dfeae7664f5f@redhat.com> <20210209222519.GA178687@roeck-us.net> <4e00a7a6-aad4-57cf-0cd3-93338a5f363f@roeck-us.net> From: Waiman Long Organization: Red Hat Message-ID: Date: Wed, 10 Feb 2021 09:57:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <4e00a7a6-aad4-57cf-0cd3-93338a5f363f@roeck-us.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/10/21 1:04 AM, Guenter Roeck wrote: > On 2/9/21 4:27 PM, Waiman Long wrote: > [ ... ] > >> It is because in arch/mips/include/asm/spinlock.h, asm/qrwlock.h is included before asm/qspinlock.h. The compilation error should be gone if the asm/qrwlock.h is removed or moved after asm/qspinlock.h. >> >> I did a x86 build and there was no compilation issue. >> > I can not really comment on what exactly is wrong - I don't know the code well > enough to do that - but I don't think this is a valid argument. > > Anyway, it seems like mips is the only architecture affected by the problem. > I am not entirely sure, though - linux-next is too broken for that. It does look like a rather common practice to include both qrwlock.h and qspinlock.h in asm/spinlock.h file. I have just a patch to make sure that qrwlock is always included after qspinlock.h if present. Hopefully that can fix the compilation problem. Cheers, Longman