Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp176141rwe; Wed, 31 Aug 2022 00:14:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7le/AvCoiMocf6vePMRYLEW+hIap9RfoZAJ0R7bSSScNtwoCAT/Npe1J9TdqtvXNyyL/GK X-Received: by 2002:a17:906:491:b0:73d:c060:7cef with SMTP id f17-20020a170906049100b0073dc0607cefmr19656707eja.111.1661930041097; Wed, 31 Aug 2022 00:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661930041; cv=none; d=google.com; s=arc-20160816; b=PbuO1qX4JLj0i4UUJHZ44toyyqlYNbiVi6DACUNT2ldm747nd1xzvQgmvLrfwTJe1B 5moGAkequ2pSBUPxUar2kLf/8nsyhQRe6QKA/phNaju/nyJ+Iztt7I+qtFPCLdf54OzN QgGv/jxLcyj9yDl4MdWxx3dYvUw2ZEdjhrDpXEVNf9ZLyYqJ4/vFXoJUF1eHadlRF/Q/ jC8yaa/2HHATrPnXaQ5H7TqtSu1x2URecZM1wK2BShkuY2rOOQer+bKyJNbqmJ7/mNYp BhXyifIfRwbqj+vDEAty8812TijX1e2f7k4QlgpNnHiz+YQuOXTksYe2x8lZ7Pzl6i4Q eSOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=70USwLN0cVzP/zKh6wgTroCrDHnsKsgsZzrBU5FMj9c=; b=B8cfQDG2i3jyB+5B7RYdWFsqd9Jq8CHUL5Z00uA+SdgTyERrflPJsxsl84LSOQTbVF 89rsxQsAqUwZ+gcwV2xkOKImAqGP9ByqYYPGn2Jr+YIY4vp/RnPWDsNiZo0x9YonrxXH tebk6OOtvYdhveOyog9y5TtR4Kz/iujwE23LNmqSAYbr5LB97Yn3ohmKaX7DreUcNVX0 08cwfvo2UmRuOJ4BhoH4TJgag7acThapQCCybBF3AvTse3+x0AeQiL1C7KwY6FaPRh4o Deg51xZ/mEUWiYbp8922UztdFWxbFQ3OPbeGYTRwks7jdygmGNyquqQKbUJEACtCywpT tfpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=J8M9dW33; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a5-20020a1709065f8500b0072af6e1fff0si8838207eju.330.2022.08.31.00.13.34; Wed, 31 Aug 2022 00:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=J8M9dW33; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230244AbiHaGuT (ORCPT + 99 others); Wed, 31 Aug 2022 02:50:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbiHaGuP (ORCPT ); Wed, 31 Aug 2022 02:50:15 -0400 Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DBE253006 for ; Tue, 30 Aug 2022 23:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1661928611; bh=70USwLN0cVzP/zKh6wgTroCrDHnsKsgsZzrBU5FMj9c=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=J8M9dW33G6NpWL38Dakdfk1FaAds7+8jwYyCzXG0EI25qQar3AXtJPqjoy+a6Uzq0 3AXlxLTYRCeYDuKPcLAYPyg2q/pHKrsoDzM38IsEU0a0mF0FLyFc/r+Zjy+3Z3c8Y8 pmd3z8ZIJrgVa+b1dm+czrc8EyIBRystlOC7LL8M= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 9C078667E8; Wed, 31 Aug 2022 02:50:09 -0400 (EDT) Message-ID: Subject: Re: [PATCH 1/1] LoongArch: Fixed loongarch kernel csr_xxx implicit declaration. From: Xi Ruoyao To: Yupeng Li , chenhuacai@kernel.org, kernel@xen0n.name, jiaxun.yang@flygoat.com Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, caizp2008@163.com Date: Wed, 31 Aug 2022 14:50:07 +0800 In-Reply-To: <20220831061406.431027-1-liyupeng@zbhlos.com> References: <20220831061406.431027-1-liyupeng@zbhlos.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2022-08-31 at 14:14 +0800, Yupeng Li wrote: > Loongarch CSR register operation related interface, use the > interface defined=C2=A0 __builtin_loongarch_xxx instead. > Build kernel error messages like: It's likely because you are using a draft version of LoongArch GCC port. Wrapper functions like __csrrd_w has been there in larchintrin.h since the first day GCC port was merged upstream (https://gcc.gnu.org/r12-7881). A quick search shows IA64 and PowerPC also use GCC ia64intrin.h and spu_intrinsics.h, so the use of these wrappers are not forbidden in kernel source. Unless there is some new good reason for the change, Nacked-by: Xi Ruoyao >=20 > =C2=A0 CALL=C2=A0=C2=A0=C2=A0 scripts/atomic/check-atomics.sh > =C2=A0 CC=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 arch/loongarch/kernel/asm-offsets= .s > In file included from ./arch/loongarch/include/asm/cpu-info.h:11, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 from ./arch/loongarch/include/asm/processor.h:13, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 from ./arch/loongarch/include/asm/thread_info.h:15= , > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 from ./include/linux/thread_info.h:60, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 from ./include/asm-generic/current.h:5, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 from > ./arch/loongarch/include/generated/asm/current.h:1, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 from ./include/linux/sched.h:12, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 from arch/loongarch/kernel/asm-offsets.c:8: > ./arch/loongarch/include/asm/loongarch.h: In function 'csr_read32': > ./arch/loongarch/include/asm/loongarch.h:232:9: error: implicit > declaration of function '__csrrd_w'; did you mean '__iocsrrd_w'? [- > Werror=3Dimplicit-function-declaration] > =C2=A0 return __csrrd_w(reg); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 __iocsrrd_w --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University