Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3019758rwb; Mon, 7 Nov 2022 22:42:51 -0800 (PST) X-Google-Smtp-Source: AMsMyM4olG8D9ikv39rjUS6672ky439SvU8MUSi4nMzQHIU6lA42gvSUAYtVkVGW92ksp4goRi7T X-Received: by 2002:a17:906:3986:b0:7a0:3313:a793 with SMTP id h6-20020a170906398600b007a03313a793mr848813eje.577.1667889771474; Mon, 07 Nov 2022 22:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667889771; cv=none; d=google.com; s=arc-20160816; b=vk655sxwIHaE5l/YxeWtrExfXVpE3vMSiqrLMj5VdP5qE0yegSF5wrhxgGYk/x6R/H CXcAAdMhJOmERtalkiiE0ivdAGlR0ReVaJPoiPyqiMQ1hj+6jQHsOaLO5AcmNXv3B1lR Azean+J9V5kVdY4JRUAfDTRVUhEPlvIDSeFWtjQiFcwJqy8ICIXA7gFO4+w6qcJRkB67 3IwayhDbFSMOaUBGij/BNtU+ONxKazWvPNtl9Az4Ib5OfjnYcJGTgiFVcJ+R0UtNFTx+ IzU/yixdZAWRH4bRM1bAc9B/TiChQPXYF1Kjo++3DlaboyuK83xi7zyzypuR9xLFZZBc 9rOA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wj7-20020a170907050700b007330c08fe49si1400645ejb.206.2022.11.07.22.42.30; Mon, 07 Nov 2022 22:42:51 -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 + 90 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 Content-Transfer-Encoding: 8bit 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 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 --- 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;" -- 2.25.1