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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7162C433EF for ; Tue, 21 Jun 2022 15:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352202AbiFUPIi (ORCPT ); Tue, 21 Jun 2022 11:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352248AbiFUPI2 (ORCPT ); Tue, 21 Jun 2022 11:08:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6C22BF67 for ; Tue, 21 Jun 2022 08:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655824107; 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=zUfLoKzkVAlW2Smcn1hCVbKkiGHkkqH1tY8/PyMPFmc=; b=aGfXH+A3bDRFjGlIbqxVCK9jLPJtkQiGs92W8d5lIUbiCvdafiNO4MC69Jo1b9dJ2CT4o6 mfgXlZYwFfiGivB+M9smaC4atOxX6sM5cC24OiVWUu4GCKPK8Y9sC6arAbzWR6q+HCmMlI GkcnvYaoh1lvvhOp3afWIao7WLgnVJo= 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-427-yJ7nw58YM5iNu96pCFOFnw-1; Tue, 21 Jun 2022 11:08:23 -0400 X-MC-Unique: yJ7nw58YM5iNu96pCFOFnw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B19BB185A7A4; Tue, 21 Jun 2022 15:08:22 +0000 (UTC) Received: from [10.22.34.147] (unknown [10.22.34.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id D60AC492C3B; Tue, 21 Jun 2022 15:08:21 +0000 (UTC) Message-ID: <7adc9e19-7ffc-4b11-3e18-6e3a5225638f@redhat.com> Date: Tue, 21 Jun 2022 11:08:21 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V6 0/2] riscv: Support qspinlock with generic headers Content-Language: en-US To: guoren@kernel.org, palmer@rivosinc.com, arnd@arndb.de, peterz@infradead.org, boqun.feng@gmail.com, Conor.Dooley@microchip.com, chenhuacai@loongson.cn, kernel@xen0n.name, r@hev.cc, shorne@gmail.com Cc: linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Guo Ren References: <20220621144920.2945595-1-guoren@kernel.org> From: Waiman Long In-Reply-To: <20220621144920.2945595-1-guoren@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/21/22 10:49, guoren@kernel.org wrote: > From: Guo Ren > > Enable qspinlock and meet the requirements mentioned in a8ad07e5240c9 > ("asm-generic: qspinlock: Indicate the use of mixed-size atomics"). > > RISC-V LR/SC pairs could provide a strong/weak forward guarantee that > depends on micro-architecture. And RISC-V ISA spec has given out > several limitations to let hardware support strict forward guarantee > (RISC-V User ISA - 8.3 Eventual Success of Store-Conditional > Instructions): > We restricted the length of LR/SC loops to fit within 64 contiguous > instruction bytes in the base ISA to avoid undue restrictions on > instruction cache and TLB size and associativity. Similarly, we Does the 64 contiguous bytes need to be cacheline aligned? Regards, Longman