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 84BFDC433FE for ; Thu, 20 Jan 2022 13:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238853AbiATNnU (ORCPT ); Thu, 20 Jan 2022 08:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231760AbiATNnS (ORCPT ); Thu, 20 Jan 2022 08:43:18 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0582C061574; Thu, 20 Jan 2022 05:43:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AB9A4B81D5B; Thu, 20 Jan 2022 13:43:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AD52C340E8; Thu, 20 Jan 2022 13:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642686195; bh=D+Etye9r3fua1x02UnecAbZv0CalmuxTOWCQ+e8HzdE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cN8TeiZRwruoIRJkOoV5cCJrRkANf7l3v6f2dnF2xlBmUXAwCKjGM3kmUmmr7lfcJ 1APkSDv+D1H3WQp3uuaV0kT/S8OeoYHOyoCm+Uh5ZwvEw7IhawBDNn89d/q5eyXPa3 nAY2sqd8hpAZSIAYJGf70xVxfIBc+dqte1gPEuhjwCNzY97jFtY3PEtY924x+w0WZd wAeTD/djlb2LaOfPp5PAZ48mZs2FwdBxQt7SiLMX8KePhQm69b789EqQ8wWQDq0dC/ 8Od7DRhnmvf6YwO+Awvtgi4eoym2J8Zy/zeuP32XDNFMzEGlHelD0Dh2qQJ7xmBcHR 1Xfu4zn6tGfTQ== Received: by mail-vk1-f169.google.com with SMTP id z15so393775vkp.13; Thu, 20 Jan 2022 05:43:15 -0800 (PST) X-Gm-Message-State: AOAM530ztEEKfU5JodV39Z2gFeZVMW1ONO+knS9Gubx6OGhHrhE4BxPl /+H7A+6YWz03uQspLPqUgts+iT3ffL3usEUCN94= X-Google-Smtp-Source: ABdhPJxsPoD4QKSG5cjRmiwRNbBq9kp7PjD2iW5iWTPRRES5wTkmV/37UExZW0GDHhLl6tuiT3nFW4CEpN2qDzbKvC8= X-Received: by 2002:a1f:2844:: with SMTP id o65mr15161979vko.2.1642686194514; Thu, 20 Jan 2022 05:43:14 -0800 (PST) MIME-Version: 1.0 References: <20220120073911.99857-16-guoren@kernel.org> In-Reply-To: From: Guo Ren Date: Thu, 20 Jan 2022 21:43:03 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V3 15/17] riscv: compat: Add UXL_32 support in start_thread To: Arnd Bergmann Cc: Palmer Dabbelt , Anup Patel , gregkh , liush , Wei Fu , Drew Fustini , Wang Junqiang , Christoph Hellwig , Christoph Hellwig , Linux Kernel Mailing List , linux-riscv , linux-csky@vger.kernel.org, linux-s390 , sparclinux , linuxppc-dev , inux-parisc@vger.kernel.org, "open list:BROADCOM NVRAM DRIVER" , Linux ARM , "the arch/x86 maintainers" , Guo Ren Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 20, 2022 at 9:39 PM Arnd Bergmann wrote: > > On Thu, Jan 20, 2022 at 8:39 AM wrote: > > + > > +#ifdef CONFIG_COMPAT > > + if (is_compat_task()) > > + regs->status |= SR_UXL_32; > > +#endif > > > You should not need that #ifdef, as the is_compat_task() definition is > meant to drop the code at compile time, unless the SR_UXL_32 > definition is not visible here. I almost put CONFIG_COMPAT in every compat related code, because I hope the next arch that wants to support COMPAT could easily find where to be modified. > > Arnd -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/