Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp222572iob; Mon, 2 May 2022 17:41:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5vMQGhu7N6autM5RjhXW9riDpASYuojb3afwGfsFPZUt7sM4CMr6kj6qVeqS0fC1UBjYc X-Received: by 2002:a63:e80a:0:b0:3c1:6c84:de53 with SMTP id s10-20020a63e80a000000b003c16c84de53mr11757315pgh.224.1651538463359; Mon, 02 May 2022 17:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651538463; cv=none; d=google.com; s=arc-20160816; b=E1rQ3Y7Okc2zRHRiVldLuxfLvcoc1VTrDbvxEEpjozUwE7B3XwhYDcH0/P+MiJy2k3 5xWvntTUoVqRKu6dGIX3E0cRLrd1s/AUzgvN8XwNPB1hSQjw7VFdMk6hu8jCBh1/IfhJ RUDBzlSli8B5aFvGxWwHALPmBWopmJXlDdfiBS/iZk81WDgQ3cY8D5QIpopzHydvceJY Ea1LSbntk9YYLnGNpEl00DYXAZBz/8l47z2CevlRPVTxaGXJHLuqSYCnH8HJnlYFxSW1 znPyI+1qvczRnAA+uw1RHTNf3UEGIopRS2nlvOSVfl6Q4gdlFeceCp40DsTcE9j0Ngaq 44AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KX3hGhBdd+XtRcdHNUxbUkkuICp1yweLna1e0YtZ2H0=; b=MCP4rJFPW/OlvFWruPw7A2MRedYDa5FvHquM8GY7cdG3bPgNAZH/LcqYxBrbPQHhpe 5cVQZN/FMQmVy7aEiUdSLERERiU9uv7V4veS6TuOzqJKEqvh9kmBXuYtyHyILnAlJNyC qeDWsHgGCaVQBgqdgg5HeU+d8/jKGW8nSib2/LcjYS+I0pmbwbE4CXsb9CyTqtWjAzEU fTgDhRhNPxeKEB1ymfflR5K+oo/A1Xk0MQ3FYRhA0CprQPLZMZ2QdXeU3ahZLdlc6MaE fozIpK8N/bDvRv6ywS+pdzb3ar6gpuHvgBa8AH3zfHGOoGGNIBUYnNQiVDKDUQyCUqik RArw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ArxpYma4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ip10-20020a17090b314a00b001d2acdc720bsi865766pjb.6.2022.05.02.17.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:41:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ArxpYma4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E821947544; Mon, 2 May 2022 17:31:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240214AbiEAFPo (ORCPT + 99 others); Sun, 1 May 2022 01:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232817AbiEAFPj (ORCPT ); Sun, 1 May 2022 01:15:39 -0400 Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 686F850E10; Sat, 30 Apr 2022 22:12:15 -0700 (PDT) Received: by mail-vk1-xa2d.google.com with SMTP id e144so5371269vke.9; Sat, 30 Apr 2022 22:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KX3hGhBdd+XtRcdHNUxbUkkuICp1yweLna1e0YtZ2H0=; b=ArxpYma4yJaM4WntqJHd5wjwLLHhyQdqwBWYeuHBuvHFeDo9gbWZ03NbB7sdKdZBBS 25+QJrMwUIDnTmKfVl8Lc6wFAiEkZWMrHHt0b4z7bXvni0Ov4wWY+R1cDppvDltdL0De IIO0iwVUvvFEtxm6g3+xJyPtihtYGyAeiv7G6OMYEhVZX59Lx0dzvB5AAtuA9maYXmjA psZqUepwWpiPdrjYOHdOaH7aRSjIqY+XcIIhdQbsg9ZDwScYfAXtzYReKypLAXQiXwEF KPDjEMNTvzz10NjVodbEDw7PUZKj2OSTaPZqvMy9OQH8WPGMMMBp8hZM3PD5Wcyj97Re 0JlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KX3hGhBdd+XtRcdHNUxbUkkuICp1yweLna1e0YtZ2H0=; b=fJLEu1Q0PfDOZxjVauUVQPYlo9Mz+eHludCBicYW1a+iIeM9uQZ6FhGmkZJhQ2N372 rbndt4hs1SvfEbFWNuXyEqXjNMLtgnRZ8H7NBIATn8kdJ/rkbeOC+CeT6goVOQcLZgEh 8PJ110TiPzq6KD6VjLIraaJd7YUfF9JfWBcml/ApL9mppD2FGUzfutIay2Gu+HarU7Sp E2NTPhrpkrwJaB9q1Po67NSNoJDSBjmjr2o/bDhnwzo2pQfXGpK6bXoRNQY6EOYhpF36 3KtejBbvUtmQGynOjlKqJI2Z8d1Ky6/jMBNv+fXHCeZLPtayn7Dq6Y9T1p8NASAmbsZ6 TK6A== X-Gm-Message-State: AOAM530DrUbXwzyS6HL/LvStq46yttLYzke6Ny01fR3T1x0vwJwjFQsm gxCofmGujse/I+DkVgGe+MCqocL8R/damAsx3cT6BnYUJus= X-Received: by 2002:ac5:c30e:0:b0:34e:9da2:5163 with SMTP id j14-20020ac5c30e000000b0034e9da25163mr427837vkk.30.1651381934505; Sat, 30 Apr 2022 22:12:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Huacai Chen Date: Sun, 1 May 2022 13:12:03 +0800 Message-ID: Subject: Re: [PATCH V9 16/24] LoongArch: Add misc common routines To: Palmer Dabbelt Cc: Arnd Bergmann , Huacai Chen , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds , linux-arch , "open list:DOCUMENTATION" , LKML , Li Xuefeng , Yanteng Si , Guo Ren , WANG Xuerui , Jiaxun Yang , guoren@linux.alibaba.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,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 Hi, Palmer, On Sat, Apr 30, 2022 at 9:22 PM Palmer Dabbelt wrote: > > On Sat, 30 Apr 2022 03:41:59 PDT (-0700), Arnd Bergmann wrote: > > On Sat, Apr 30, 2022 at 12:00 PM Huacai Chen wrote: > >> > >> On Sat, Apr 30, 2022 at 5:50 PM Arnd Bergmann wrote: > >> > > >> > On Sat, Apr 30, 2022 at 11:05 AM Huacai Chen wrote: > >> > > >> > > +unsigned long __xchg_small(volatile void *ptr, unsigned long val, unsigned int size) > >> > > +{ > >> > > + u32 old32, mask, temp; > >> > > + volatile u32 *ptr32; > >> > > + unsigned int shift; > >> > > + > >> > > + /* Check that ptr is naturally aligned */ > >> > > >> > As discussed, please remove this function and all the references to it. > >> > >> It seems that "generic ticket spinlock" hasn't been merged in 5.18? > > > > No, but we can merge it together with the loongarch architecture for 5.19. > > > > I suggested you coordinate with Guo Ren and Palmer Dabbelt about how > > to best merge it. The latest version was pasted two weeks ago [1], and > > it sounds like there are only minor issues to work out and that I can merge > > v4 into the asm-generic tree before merging the loongarch code in the > > same place. > > > > Arnd > > > > [1] https://lore.kernel.org/lkml/20220414220214.24556-1-palmer@rivosinc.com/ > > I can just send another version, IIRC it was just that discussion about > the memory barrier and there's already prototype code so it shouldn't be > too bad. I was hoping to do it sooner, sorry. I've seen your v4 patches, then I will adjust LoongArch code to use generic ticket spinlocks. Huacai