Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp169524iob; Mon, 2 May 2022 16:10:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqzBeA3ci1C6OgyTR0BZN9rGASDeoi8mfgHc9xmtyQlpYFFx5MbbXfi0LlQ1L2xXmJBH09 X-Received: by 2002:a65:638d:0:b0:39d:74ad:ce0b with SMTP id h13-20020a65638d000000b0039d74adce0bmr11826701pgv.103.1651533021230; Mon, 02 May 2022 16:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651533021; cv=none; d=google.com; s=arc-20160816; b=d/yIYokv/vpH12JHWM08BthMEfWzLLklBjuIn0k305G8oqGgXxqkrFcVm1xqSO5Cno G9qnh4zGLYHnPI5XUie7QUFDzCyn11c218UIZq9QEUU5/msKYtCW/lAJT1d2CuiVBHmQ w13obpORww/h3nzNajlmANQ6KtXDtQqeAs5HdMj/QlVv8eSMrN9b5bpkQxvfW6jXMwAv 9VBRc9omht50FLvvVRxPCjPrNbT3yIi7UCWxbvayW9IiWRUYD2V/HE14mi5gg57j4B63 fSSL8zhQZHviL2KBa8ZEj8e7JWLzVWLlPRcsGQenw/16exWz8WNGMzvqNZOgeSkt0BPs DiiA== 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; bh=o65KlIPv62n1c9HkLSspJnLRPAe9i3ZkTaEPk5f0CJY=; b=g49jW32l8LegeQmn33nKSvf4bG/S4u2B9LJVWCp56aQjhQvM0L95x9VcXopN1coO6V 5Gzyd8fq7YpvAbk/YS+SFvTZs7keDFriHgCF3vyncWJEZhawigWjFDn7T/41SrFO4wDI 8NtN85UxKHozFt2eEkx2cynuCjXgK3ns2jPKHec4ZmuiBktXqyCK7tTcZ2vM4nVV78i+ WA7MK98XDgrO+T/SS4dyFG6sfSbV8g4icgFeCPyud2yKnN7vLvkJyyiLl2y5s7DxsJHb 6iMtV0/BVaU64u8nFW4NXpIvDPzembYCTUNMBdj8Z6jdq14arePuFIZeJQb2bJfA0nhk k6mA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g20-20020a056a001a1400b004fa7782f609si15306900pfv.24.2022.05.02.16.10.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:10:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3E8F32F396; Mon, 2 May 2022 16:10:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240438AbiD3Kvu (ORCPT + 99 others); Sat, 30 Apr 2022 06:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230459AbiD3Kvn (ORCPT ); Sat, 30 Apr 2022 06:51:43 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41AD295499; Sat, 30 Apr 2022 03:48:21 -0700 (PDT) Received: from mail-yb1-f177.google.com ([209.85.219.177]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MwQKp-1o1BTC1i8j-00sOOA; Sat, 30 Apr 2022 12:48:19 +0200 Received: by mail-yb1-f177.google.com with SMTP id d12so18534069ybc.4; Sat, 30 Apr 2022 03:48:19 -0700 (PDT) X-Gm-Message-State: AOAM5339bAUwu+qUmnymsiXelobcYRZ1ShdCZtZ4E43aMBum0im16TmY fOMttPf5ZHiG4Zrw+J03x3l7RgOVwbx2PD3YWpY= X-Received: by 2002:a25:c50a:0:b0:647:b840:df2c with SMTP id v10-20020a25c50a000000b00647b840df2cmr3193581ybe.106.1651315335679; Sat, 30 Apr 2022 03:42:15 -0700 (PDT) MIME-Version: 1.0 References: <20220430090518.3127980-1-chenhuacai@loongson.cn> <20220430090518.3127980-17-chenhuacai@loongson.cn> In-Reply-To: From: Arnd Bergmann Date: Sat, 30 Apr 2022 12:41:59 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V9 16/24] LoongArch: Add misc common routines To: Huacai Chen Cc: Arnd Bergmann , Huacai Chen , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds , linux-arch , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Xuefeng Li , Yanteng Si , Guo Ren , Xuerui Wang , Jiaxun Yang , Guo Ren , Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:7KAKj9I+D5At570gbNGr3cglDF4vT1MGlSQ6gRQI5WKGPBqqhXN rSU6LIxKBM1mX77Y49GAJ8oHRNK+f0d+75I0IM7hXJA/mG2wEKp/N21qMfcYH4qAtWF/aJ8 E7VlGyPy8xSrlCcULZ69Iv5lVOIKmquTHlildb4eU77VSFUQoBBPf1qoRtAdhoKkPVavx/m oWqYr89xL8luxaH9PC9tw== X-UI-Out-Filterresults: notjunk:1;V03:K0:avuFvZTkDnI=:LCL8ARtw02iWBlwVmCDdwM GGOqcejykQPT9n5mOtxsKPpB2xclvbwZzOigMweQE/nQw7Sn3lypQ6mLCYJPFZlyOX4BGXY+f 01XmYuuvoHgUw8bjiLbvGXk/tzbzOXCmCYuPvIBz9QiM1jfYsXNNOaFDeaSRI6ahRjuPbt1zg fkiPa2/pN53poTpZzdKWYSWC3QAboSTUq1lCeHLbhVQdeZ+/1L/1EeF94WVtMcZ+ejpyb956d I4wsN+iwFWSDpmuuw0GjDZE+0rduO/GmvK1etFFgM9IYrcPfUfcL9QUbvPMrJ5UDM/Wknc8JP s7fJBtRzEB9UJ67NbhkEyqLknEvv8DpQbduELrQgKFwdqbDRuO8dI2LGyEQc8suE2nfKPkB9l StyMPhfdBmGsoF6ZLjYaYnFTeT5bg/oTdKEWcrn0a+EZDzlGAqYfdsE9oOxJ9Y8WnqPSwW58O QtsyYF0OfBW+Gq1HBKxyVddgXeH3fb9di/zFJNhevnMcUci/LsEjYspUTct9tJ1SEFY60nTSB dJ4yBE0mfD3dlUwrOswqdV8mlIQp2uj/99oe1FyoBC0Z/oFV9Je12MnKCfl4q4aXAl8tCp2pO bi38wW5mNT69macSgvUB6Pi9XyzPJhzhO88qAUafoOCgzpD3+/0lis7CAsAIXw9+AuGGkLI+p gySBbeHZWOtRLxveU/iLs9eoay50Z6xxHKZ2K+RthSzL31OxeNVw0YhRK6jz7n3ukilHNCrPH XKeR9XDGhngrb6Th0Pn5dgDNRiqGX20I0GCNoMS7xol8kQ8rje6CdnUoTDTMG0tF/2UeIWatb ZALBjQqmus19tgo6NpzjVvBO723wFjqqFPAg4uJWsVFSyQ/hS/cToPgz1Z9GNeY28GKSGZR X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 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/