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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF12DC61DA4 for ; Tue, 14 Mar 2023 02:56:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E65A76B0072; Mon, 13 Mar 2023 22:56:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E15E36B0074; Mon, 13 Mar 2023 22:56:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CDD5F6B0075; Mon, 13 Mar 2023 22:56:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id BC46D6B0072 for ; Mon, 13 Mar 2023 22:56:52 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 90B5D160B91 for ; Tue, 14 Mar 2023 02:56:52 +0000 (UTC) X-FDA: 80565991464.05.76D4804 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id 2C16C1C0006 for ; Tue, 14 Mar 2023 02:56:50 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=MCVrVINc; spf=pass (imf18.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678762610; h=from:from:sender: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:dkim-signature; bh=JyrIGLqX2YJPW6IWpAt0DsDXF+2ApyDZOpSw0P/BqXc=; b=5GDOokpdAEJtqkrVelTleq61CZ1PHEypQa+REDxkHROPl91tRHBgwtw+FR6EAkHXwFsz6k cqKgWUrUGhlsT55ZqcgS3LqrjLaNVnOmmg6cUWSBYFn9jJUcqzHU0gXs0GnQXSF/tkWgyf ERJJtK8/il6olV+f2hg3vzb4EWhkawM= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=MCVrVINc; spf=pass (imf18.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678762610; a=rsa-sha256; cv=none; b=nc1Qz/F/Dj0v9Qz1uLzp1T3bcybaBZNhcAcurVlhF6/ASD+zaWhXW7X3sLEgImX7PrR2+9 n58ebvmW/2+lF7iAWTQQduOPI6lXgPagvUK6Kchv3q4L/Pp5IiCY0cv1az1sBa6/LNo/E/ 69jPWME1r2OmiPrLMZ5+54gblyocknk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678762609; 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=JyrIGLqX2YJPW6IWpAt0DsDXF+2ApyDZOpSw0P/BqXc=; b=MCVrVINcwST2mcoqMLnF3NO39h3mdpx8+Dhynhgub3v8HxODz3YjFmt7jONIBmcKi0x4Gc pBK4fZZ8WQtaeOx6iPTq4rsNXVQqkIomuWRYXekDzLiFaxYXdM/4A0S8mHPlxX2bjtPxWZ 78WrYb/4Y2P0r2iiYtCvbu+3H//qWl0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-224-YTYGE28YOkKWi1CSSHqk2g-1; Mon, 13 Mar 2023 22:56:42 -0400 X-MC-Unique: YTYGE28YOkKWi1CSSHqk2g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A64B4100F909; Tue, 14 Mar 2023 02:56:41 +0000 (UTC) Received: from localhost (ovpn-12-81.pek2.redhat.com [10.72.12.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51E402A68; Tue, 14 Mar 2023 02:56:39 +0000 (UTC) Date: Tue, 14 Mar 2023 10:56:36 +0800 From: Baoquan He To: Thomas Bogendoerfer Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, mpe@ellerman.id.au, geert@linux-m68k.org, mcgrof@kernel.org, hch@infradead.org, Helge Deller , Serge Semin , Florian Fainelli , Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org Subject: Re: [PATCH v4 2/4] mips: add including Message-ID: References: <20230308130710.368085-1-bhe@redhat.com> <20230308130710.368085-3-bhe@redhat.com> <20230313175521.GA14404@alpha.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230313175521.GA14404@alpha.franken.de> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 2C16C1C0006 X-Rspam-User: X-Stat-Signature: 8s4karajg7hmtdob6wfhybz6p1syq88t X-HE-Tag: 1678762610-491822 X-HE-Meta: U2FsdGVkX184DC1Pl59+3lyL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3Sc1dOgktg1k6ou8l2aMAkhCDlv10hWg9eEz8BiTkYxAUPogEL2ecXUcV4cN1y22zSTOGrMuB7qiusNWRvbtt4fq527021pX6XlOUWKcWmHs2nb2CZQ6j5iW+1scoZ4dtnwzhd8Ygu9i7KCYnrvxW+1DaClE5rB4pWLEDj+FpPEVtLZqC33RQoGRLlmK5V7ZG6BTgQyA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 03/13/23 at 06:55pm, Thomas Bogendoerfer wrote: ...... > /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:111:2: error: implicit declaration of function ‘LOCK_CONTENDED’ [-Werror=implicit-function-declaration] > LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); > ^~~~~~~~~~~~~~ > GEN Makefile > Checking missing-syscalls for N32 > CALL /local/tbogendoerfer/korg/linux/scripts/checksyscalls.sh > Checking missing-syscalls for O32 > CALL /local/tbogendoerfer/korg/linux/scripts/checksyscalls.sh > CALL /local/tbogendoerfer/korg/linux/scripts/checksyscalls.sh > CC init/version.o > In file included from /local/tbogendoerfer/korg/linux/include/linux/spinlock.h:311:0, > from /local/tbogendoerfer/korg/linux/include/linux/vmalloc.h:5, > from /local/tbogendoerfer/korg/linux/include/asm-generic/io.h:994, > from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/io.h:618, > from /local/tbogendoerfer/korg/linux/include/linux/io.h:13, > from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/mips-cps.h:11, > from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/smp-ops.h:16, > from /local/tbogendoerfer/korg/linux/arch/mips/include/asm/smp.h:21, > from /local/tbogendoerfer/korg/linux/include/linux/smp.h:113, > from /local/tbogendoerfer/korg/linux/include/linux/lockdep.h:14, > from /local/tbogendoerfer/korg/linux/include/linux/rcupdate.h:29, > from /local/tbogendoerfer/korg/linux/include/linux/rculist.h:11, > from /local/tbogendoerfer/korg/linux/include/linux/pid.h:5, > from /local/tbogendoerfer/korg/linux/include/linux/sched.h:14, > from /local/tbogendoerfer/korg/linux/include/linux/utsname.h:6, > from /local/tbogendoerfer/korg/linux/init/version.c:17: > /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h: In function ‘__raw_spin_trylock’: > /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:90:3: error: implicit declaration of function ‘spin_acquire’ [-Werror=implicit-function-declaration] > spin_acquire(&lock->dep_map, 0, 1, _RET_IP_); > ^~~~~~~~~~~~ > /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:90:21: error: ‘raw_spinlock_t {aka struct raw_spinlock}’ has no member named ‘dep_map’ > spin_acquire(&lock->dep_map, 0, 1, _RET_IP_); > ^~ > /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h: In function ‘__raw_spin_lock_irqsave’: > /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:110:20: error: ‘raw_spinlock_t {aka struct raw_spinlock}’ has no member named ‘dep_map’ > spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); > ^~ > /local/tbogendoerfer/korg/linux/include/linux/spinlock_api_smp.h:111:2: error: implicit declaration of function ‘LOCK_CONTENDED’ [-Werror=implicit-function-declaration] > LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); > ^~~~~~~~~~~~~~ > [...] > > I've cut the compiler output. Removing the asm-generic doesn't show this > problem, but so far I fail to see the reason... Thanks for trying this. Do you have the kernel config file, I can try to reproduce on my local machine. And by the way, it could be fixed with below patch, not very sure. Earlier, Arnd suggested this to fix a similar case. >From b3310e58c063b695ba7ab3966c57269f57f16585 Mon Sep 17 00:00:00 2001 From: Baoquan He Date: Tue, 14 Mar 2023 08:53:15 +0800 Subject: [PATCH] mips: use wmb() instead to replace iobarrier_w() Content-type: text/plain Otherwise nested including of asm/io.h and asm/mmiowb.h will cause compiling error. Signed-off-by: Baoquan He --- arch/mips/include/asm/mmiowb.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/mips/include/asm/mmiowb.h b/arch/mips/include/asm/mmiowb.h index a40824e3ef8e..dd206792abed 100644 --- a/arch/mips/include/asm/mmiowb.h +++ b/arch/mips/include/asm/mmiowb.h @@ -2,9 +2,7 @@ #ifndef _ASM_MMIOWB_H #define _ASM_MMIOWB_H -#include - -#define mmiowb() iobarrier_w() +#define mmiowb() wmb() #include -- 2.34.1