Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp208435pxa; Fri, 14 Aug 2020 01:40:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7fKgDiya2MXwh9/41tLXG46baWCBvGm8NCyMgiJjS8TjUQg6RgUol/6B7tiNoa6k8jFe1 X-Received: by 2002:a17:906:6b87:: with SMTP id l7mr1335203ejr.198.1597394447365; Fri, 14 Aug 2020 01:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597394447; cv=none; d=google.com; s=arc-20160816; b=wXc1mk3j4qFTJDyN5gYglcEv9L43PCT+BqSKnT5nQHlOEIxbWGJCEcw/dKH0afK8Tc XT2CxmYxSqsuCW1cSAEklCVlWa3QV/HYV8DpqyN2dLH0jyo+ASX7t1RgLgDtixqo9oc/ 4aND9toFHYra5MiWU9XKeoEZC65eo16Mj2f9Jzds8T8RMiebPKy6Tbx+/2ljISqD16aI eRwjDCnxuyiwbG1xnDivk9b7tFQjDRp6+PH7/5W4vF2yO2xD7hB0CepmH9oDo/WtmsjU tS+s1WXxW3NJfIPNIj8kf8Pw66jWw+FjH2v34BaLG+vkJcZ5Q8JVIBtLI/nDZ26DMwB3 CzzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=18TPc55bkABHqhJGmY/T7ZgEAif7O4EK6l81NPcoRxY=; b=GzTMS56xDMaBeMX0E+eLrEbivHX/Gl4hZQ6GmFF8fpYGKgs0EQbFE+u72RnSLHdVl8 JiOwvmOYzp4eZuG4ISPRYg4TnJAEHx7/mR3gE+xI3L2g/SKgVUhJJ7cQ1kdBp7oIPrEw roCk1/AnUj1/IaEIN0k7V9aQPcRYz+aYrx1ZAuq5gURdBAcJnv7hbSqlFMzk9heTpS2d ucS3mQF0hrxN+FEr4pybBX4ukp0ebfLXEDsKnMr/wtMMUR8YbFeCvqZ3KFOnMygawiOS caw6kEptm8i2pNyo2PNeUZ6ymO34P7W+1x6cFZaM3CizLX5cBsqd90x2E4nf/LzsoHbY kgrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=BaIDszgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si5681615edl.506.2020.08.14.01.40.23; Fri, 14 Aug 2020 01:40:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=BaIDszgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbgHNIgI (ORCPT + 99 others); Fri, 14 Aug 2020 04:36:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbgHNIgG (ORCPT ); Fri, 14 Aug 2020 04:36:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B38B6C061383 for ; Fri, 14 Aug 2020 01:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=18TPc55bkABHqhJGmY/T7ZgEAif7O4EK6l81NPcoRxY=; b=BaIDszgt+DmEDE5pdqG2vFnuja Q+kQmZ8spnM5fKdVLO2nF6cZTavxyE+jnAV2ebPfrM4XtEP0z92mCO9m7PcfqYqQyFpAyt2F4UAvH vlqES5h7qhIxarUAuGbOtgCd8ZB4ABzW9az1l6vWnEbXTJZKJFtCK53eyszVPXuN9datPI6lyBxTl Hw4ovzzG9RSPwIjqYeJM1YPICpRSL4pfcH3pR6dlsGAbCW47mtdiU2qbInU9br+N+nJFfkTamwvse tbtuNw2k51Mm+qjnOU4K4XgZXQmbU0r6QLE12zVbvdb6SCuWtpj+9/l0awex3LqczFGRMdMQOyCVL nDHMHWIg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6VBq-00065M-6f; Fri, 14 Aug 2020 08:35:54 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 111E0980C8B; Fri, 14 Aug 2020 10:35:53 +0200 (CEST) Date: Fri, 14 Aug 2020 10:35:52 +0200 From: Peter Zijlstra To: Xingxing Su Cc: Ingo Molnar , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] seqlock: Fix build errors Message-ID: <20200814083552.GE3982@worktop.programming.kicks-ass.net> References: <1597378358-2546-1-git-send-email-suxingxing@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1597378358-2546-1-git-send-email-suxingxing@loongson.cn> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 14, 2020 at 12:12:38PM +0800, Xingxing Su wrote: > Fix the following build errors: > > In file included from ./include/linux/time.h:6:0, > from ./include/linux/compat.h:10, > from arch/mips/kernel/asm-offsets.c:12: > ./include/linux/seqlock.h: In function ‘write_seqcount_begin_nested’: > ./include/linux/seqlock.h:286:2: error: implicit declaration of function > ‘raw_smp_processor_id’ [-Werror=implicit-function-declaration] > lockdep_assert_preemption_disabled(); > ^ > ./arch/mips/include/asm/smp.h: At top level: > ./arch/mips/include/asm/smp.h:28:19: error: static declaration of > ‘raw_smp_processor_id’ follows non-static declaration > static inline int raw_smp_processor_id(void) > ^ > cc1: some warnings being treated as errors > scripts/Makefile.build:117: recipe for target 'arch/mips/kernel/asm-offsets.s' failed > make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1 > arch/mips/Makefile:396: recipe for target 'archprepare' failed > make: *** [archprepare] Error 2 > What kernel are you building? Commit 0cd39f4600ed ("locking/seqlock, headers: Untangle the spaghetti monster") should have solved that I think. > > Signed-off-by: Xingxing Su > --- > v2: update the commit message > > include/linux/seqlock.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h > index 54bc204..4763c13 100644 > --- a/include/linux/seqlock.h > +++ b/include/linux/seqlock.h > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > #include Wrong place, it's lockdep_assert_preemption_disabled() that requires asm/percpu.h, and thus lockdep.h should include linux/smp. before asm/percpu.h