From patchwork Tue Nov 8 06:01:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: guoj17@chinatelecom.cn X-Patchwork-Id: 16880 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2513294wru; Mon, 7 Nov 2022 22:14:48 -0800 (PST) X-Google-Smtp-Source: AMsMyM5qLMIbZFbr+D7bjhJ5WkhBStgCHAxVZ+6jkZ9Q6Rv7slClGiFPcb7OtL8RNbTUC/9O820J X-Received: by 2002:a17:907:d10:b0:79a:a1fe:8be5 with SMTP id gn16-20020a1709070d1000b0079aa1fe8be5mr51850568ejc.125.1667888087864; Mon, 07 Nov 2022 22:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667888087; cv=none; d=google.com; s=arc-20160816; b=k1viC5feDpVQ31E4lZR3Mn0jUf8qtwEotYYWiu6jWg2dFAZQXuSTG4py7Uu13Vpz1A f0w8+ohvCF6hLMVtfGu84w//Qgcak62SmPHbXhE0dJBWkuMJi287zycdHFLh2FMq7FAe iBT7zlC6O5OiT5JWMkatwlaGzNMVVIjtBycHMP/v3qAXKWIACnMkhTUASZGOxWvHR/cm ZMUd/SXmR5q6I3mnzyVMeAxdlvtel1pqyJtToGrAgGDhSKfsmso3+Qz8ZRR+LAVyJePp 6ZWCJlSc98VJSteI7jC+yP6/y7TPTkP56b0qorgG7bQpD2FzJqPyreQCiEOJNZFGA7OB PLaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:hmm_source_type :hmm_attache_num:hmm_source_ip; bh=CP1n6jXW98rTX0mN6vyOFWqDtOhd+2ngXiBVyxfoJdM=; b=RL8Sxtdh1whMXEty2AlA5ZdzGhEuv1m6SfCONNwpcu8C7dgy8cKkvID5vLSFA3BjFx 8l2wkqj5Jf/kEg6PqLObXwC52aZMR7Tg2CxDj6wLr8LP+xp4jKRix3VlSpVrjBEXFWeZ 7k6EDhtbV2MUTnO+vzD35B6x6tOxYcN0N04Fbdcenr3F/FWGyfjA5dn4xC6TrEJCl3ry r0ekcGNJHqJ5Dr8QJ6/qoBwhn4hhGqHG1VcP/Z7uTiBx8Z3E7CWNXXxBNObbNZ6omAlT UR/6Gdnm+6oRdf6O2t6JzfV+81WgKe6WZ6oTJYUrZRMydfZHksWmV0gFBVMKOgpOzWdz nfpQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa12-20020a170907868c00b0079194d8b1f6si12908805ejc.892.2022.11.07.22.14.22; Mon, 07 Nov 2022 22:14:47 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233095AbiKHGCv (ORCPT + 99 others); Tue, 8 Nov 2022 01:02:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232411AbiKHGCs (ORCPT ); Tue, 8 Nov 2022 01:02:48 -0500 Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.220]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CBCCB317CA for ; Mon, 7 Nov 2022 22:02:45 -0800 (PST) HMM_SOURCE_IP: 172.18.0.48:45518.1913755082 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-10.133.8.199 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id 01E5B28009C; Tue, 8 Nov 2022 14:02:21 +0800 (CST) X-189-SAVE-TO-SEND: +guoj17@chinatelecom.cn Received: from ([10.133.8.199]) by app0024 with ESMTP id 014bcb9567d94db7a99521152a8399a7 for peterz@infradead.org; Tue, 08 Nov 2022 14:02:41 CST X-Transaction-ID: 014bcb9567d94db7a99521152a8399a7 X-Real-From: guoj17@chinatelecom.cn X-Receive-IP: 10.133.8.199 X-MEDUSA-Status: 0 Sender: guoj17@chinatelecom.cn From: guoj17@chinatelecom.cn To: peterz@infradead.org, mingo@redhat.com, will@kernel.org, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org Cc: longman@redhat.com, boqun.feng@gmail.com, linux-kernel@vger.kernel.org, hpa@zytor.com, nathan@kernel.org, ndesaulniers@google.com, trix@redhat.com, llvm@lists.linux.dev, huyd12@chinatelecom.cn, Guo Jin Subject: [PATCH] locking: fix kernel/locking/ inline asm error Date: Tue, 8 Nov 2022 14:01:26 +0800 Message-Id: <20221108060126.2505-1-guoj17@chinatelecom.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748907419786943472?= X-GMAIL-MSGID: =?utf-8?q?1748907419786943472?= From: Guo Jin When compiling linux 6.1.0-rc3 configured with CONFIG_64BIT=y and CONFIG_PARAVIRT_SPINLOCKS=y on x86_64 using LLVM 11.0, an error: " error: changed section flags for .spinlock.text, expected:: 0x6" occurred. The reason is the .spinlock.text in kernel/locking/qspinlock.o is used many times, but its flags are omitted in subsequent use. LLVM 11.0 assembler didn't permit to leave out flags in subsequent uses of the same sections. So this patch adds the corresponding flags to avoid above error. Signed-off-by: Guo Jin Reviewed-by: Nathan Chancellor Reviewed-by: Nathan Chancellor --- arch/x86/include/asm/qspinlock_paravirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/include/asm/qspinlock_paravirt.h index 60ece592b220..dbb38a6b4dfb 100644 --- a/arch/x86/include/asm/qspinlock_paravirt.h +++ b/arch/x86/include/asm/qspinlock_paravirt.h @@ -37,7 +37,7 @@ __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock_slowpath, ".spinlock.text"); * rsi = lockval (second argument) * rdx = internal variable (set to 0) */ -asm (".pushsection .spinlock.text;" +asm (".pushsection .spinlock.text, \"ax\";" ".globl " PV_UNLOCK ";" ".type " PV_UNLOCK ", @function;" ".align 4,0x90;"