Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2509061lqt; Mon, 22 Apr 2024 12:45:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVg2WYJVVyKpuYA5m9m4N9582b/Y9yhrpH4WIS73OJ0lrGuItIpZL7J0u9qf/OyjBYCzX5ZP0cX05bZeoAenNSOtJnLANCYJMbbcyZ8uw== X-Google-Smtp-Source: AGHT+IFhZ1uaob0h+fNaENLI6EK5CT1tAJdTKphhXTe5XrNy1bV1jA6vaqmVMxOthXf6HA3IoAwK X-Received: by 2002:a17:906:6013:b0:a52:ec:a87d with SMTP id o19-20020a170906601300b00a5200eca87dmr7300450ejj.74.1713815146160; Mon, 22 Apr 2024 12:45:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713815146; cv=pass; d=google.com; s=arc-20160816; b=g+4Zpogw+Z4SatPBoLDF8Dbgo7n1CsSLH8+tDwDjh5yMeRL7Mq+dLaVMQ6iCmAKS+Y 3Q9RWIKlGmgGlpRDWhlGYbqWFbc2f2kyFHf/zj68/HVSMaCYfzY2MEY8jHSZW2Wl0vV5 A5TYSMV7tgWCyiarQY9jCCFA9+Cnu7JBq05WbE9Fdw+fSZ6ad/1YMJzeVpzLObNPXz6M khqWSVWoSTvpwt+CLUargiucSmOAk1JSnnJqHR5nh/jwwVkGEeYHEX+0LK43oJpNSywW znkQeE9l1ElBH6TORKZwx07ihSYMQ+m/MltmStcu0zIISNUo5MHq1YE2Lyy/Tsj9kdru SbZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature; bh=pNksngP012bsXOiEvMGxmyYcdrAVliwL5a7RPH9fopQ=; fh=iTJIMVl3+kUx7Szimg6teJ3DlA2pB2VA5ufEuENSJ9g=; b=vBNuhO0rW8aYq4UMM65BYIi4dAVGZlveBOvZUZH2GGt6GE5RyKJaARQ7nFRmMUhBS3 qgl74JPuwxwr8xTfS1y3ppgnryGZWklMsNWLq105qnt3nZXECUqTa9BsWtjwyPEWITFW 80jZPYd2QhmFojF+c3/aYm+rjzDDADsYaxw7A235Sl6v9W0ISF1F5vXX2RxobwXfTh+T T08oKF24uD8Sp2281j9wW8nYbphiaBryzXN+vjRSdi5t+5h3QTmgSruNJzGvtuufm74U HqyaUHGXUgVrSDiOzpQ05UxEGVyzufzmIyUHfeO7ZylnM73OdrOeHXPlECLQUSsdqEGQ MR4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SMOaSimx; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k26-20020a170906055a00b00a51a45374d7si5998008eja.228.2024.04.22.12.45.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 12:45:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SMOaSimx; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A60FB1F226E3 for ; Mon, 22 Apr 2024 19:45:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA3F715535D; Mon, 22 Apr 2024 19:45:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SMOaSimx" Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83797153BFB for ; Mon, 22 Apr 2024 19:45:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713815131; cv=none; b=L1FMHr5mamnfU7PIDIfbZfMSwDiHzR+ZFdWLSfApLjfzlLUa9TG//AJ6ZOa+kzgHRPyd8D4abV3L/S/M3UzpuywUeuYnmi3nMvUFJtyS315zOUW9brdca1TJBQQf2U9+h410heXf7u4PLI4CjZy2N/afwRKAW6ZqrDeV0+m2Nbg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713815131; c=relaxed/simple; bh=JCTuekCFiJjIYv3mB+0rClPkhd5P3ZD4j1WbAdIpCV0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LSTHXncXCXwq9SC6QsuNtUlJZdg0Qdx1uiq6N5cp+cgMe4rucwJJ5xFL/NY3g3FLQ9KW5+mWJQllwCLrbSOzp2YHjL0s/SBNOjDudhL9Fd4u0W56ZZaW6vJp/3GJjGPnyNIuJVVTzGYCdvvMF/MU2v70k2tls0KQw2BGWjVSQfA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SMOaSimx; arc=none smtp.client-ip=209.85.222.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-78ef59a369bso359036285a.2 for ; Mon, 22 Apr 2024 12:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713815129; x=1714419929; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=pNksngP012bsXOiEvMGxmyYcdrAVliwL5a7RPH9fopQ=; b=SMOaSimxJ584e6wbHT+FeOAqlsBCi8V6opvIt/969feR5J7BOI5yESD6oaDiqfrzg1 uIGYbBX3NiSEQiZbCPKxd0/OJfjHPsQ4396taFXuqb0YT9qZtGZUcuzJUfacMZSKnNLK xqWvRbd1RelF8Mgi5bvzESuEf6uDe51XHmSRyfqlATqB9D9hbkrS5UaSyCKv2Sao4XBo 1JJKld7ZiU1oQyDg5ZozUZj2CNZckwXx4elyssivhEidOh9gO+jOoW02Ra7HlWj5j3Ln 5Kedt81NKBqglViKUQ1bpfNRziAbNTj9nqOU5tTJNrEIQljDmdt0GxE3Edc/u4uKVPT6 Y6Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713815129; x=1714419929; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pNksngP012bsXOiEvMGxmyYcdrAVliwL5a7RPH9fopQ=; b=huqearOehofrCwZncjest5m3hA/V3tz4aCoLvcd8NNHW1s7L4LRlcGE0LZxrym/Gzl AoMr7UHMS+4Znkawd9DzU6GzwRDjHwe+VW0o0jJ6FPEqF+WFZ6pIfW1ukpFtryuvq1Qm C3J4L0EpZsEXAeUTez61hhwDZ6wkXk13Fm57K7B4lsJ6cJnjd4juq0qyEH7SXJWgpDY9 BawNjjf4596O09WdHW0zGmdRGftIqDLGoWQjal45X8m8GBEPNOsmSrpIyso8qkZDwqkt cM3jMxYrcpKcgzp8JenQlq/8WUIWN+SO5BcW1kKt6Bgqh7azZo2Og2IcQ+4uEq8mU3cg N+Sw== X-Forwarded-Encrypted: i=1; AJvYcCVLn8oxboCNrUfu6moQXlNSZ4bJbRowbv31GutbzGC8Y/1lAva4SbwrK2QMj8wsm+VHZCb6hVTtM2658DvdakK6p03rlHfJOq6ClbpB X-Gm-Message-State: AOJu0YwUdBtDIayya19zxPB+OFw31re/zZ2PH0opFcwM3BPDgYvqoSES jf2Kj/u8Ib353lSSAY1Z6Qebj6BMp9EnJyKVR+bORvLGpn7Gj+6FB2wF8Q== X-Received: by 2002:ac8:7fd5:0:b0:437:74fe:1a18 with SMTP id b21-20020ac87fd5000000b0043774fe1a18mr14584862qtk.62.1713815129332; Mon, 22 Apr 2024 12:45:29 -0700 (PDT) Received: from fauth2-smtp.messagingengine.com (fauth2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id m3-20020ac86883000000b004365bc5b9a2sm4512828qtq.33.2024.04.22.12.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 12:45:28 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfauth.nyi.internal (Postfix) with ESMTP id 1748C1200066; Mon, 22 Apr 2024 15:45:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 22 Apr 2024 15:45:28 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudekledgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhephedugfduffffteeutddvheeuveelvdfhleelieevtdeguefhgeeuveei udffiedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedt ieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfh higihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Apr 2024 15:45:27 -0400 (EDT) Date: Mon, 22 Apr 2024 12:45:25 -0700 From: Boqun Feng To: Uros Bizjak Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long Subject: Re: [PATCH] locking/pvqspinlock/x86: Use _Q_LOCKED_VAL in PV_UNLOCK_ASM macro Message-ID: References: <20240422151752.53997-1-ubizjak@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240422151752.53997-1-ubizjak@gmail.com> On Mon, Apr 22, 2024 at 05:17:35PM +0200, Uros Bizjak wrote: > Use _Q_LOCKED_VAL instead of hardcoded $0x1 in PV_UNLOCK_ASM macro. > > No functional changes intended. > > Signed-off-by: Uros Bizjak > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Will Deacon > Cc: Waiman Long > Cc: Boqun Feng > --- > 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 466af57b8ed6..0a985784be9b 100644 > --- a/arch/x86/include/asm/qspinlock_paravirt.h > +++ b/arch/x86/include/asm/qspinlock_paravirt.h > @@ -40,7 +40,7 @@ __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock_slowpath, ".spinlock.text"); > #define PV_UNLOCK_ASM \ > FRAME_BEGIN \ > "push %rdx\n\t" \ > - "mov $0x1,%eax\n\t" \ > + "mov $" __stringify(_Q_LOCKED_VAL) ",%eax\n\t" \ > "xor %edx,%edx\n\t" \ > LOCK_PREFIX "cmpxchg %dl,(%rdi)\n\t" \ > "jne .slowpath\n\t" \ There is also a "cmp $0x1,%al" afterwards. Regards, Boqun > -- > 2.42.0 >