Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2290906imn; Mon, 1 Aug 2022 19:18:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uF+oaz2lPkIqls72IiLk0Aqp4okT9klVRbqiWvYQpV27reGALcgsNTcXxAyRJzZeiiSA6I X-Received: by 2002:a17:906:844c:b0:72b:4d77:fd83 with SMTP id e12-20020a170906844c00b0072b4d77fd83mr14564789ejy.151.1659406734524; Mon, 01 Aug 2022 19:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659406734; cv=none; d=google.com; s=arc-20160816; b=YLPmgMnk5HEOhwAuIyKtbt5Izvqj/atoGowVnaebrZaC1u28ELYy4VmlEyCbJ+tT7M MmOutrEhXcxXQRR6lSX1On6FYeLl/la0bVolhR7i83kcccf6EYxRrTkgYpPObdOre1dA hV+ngtT5BWe+4/W4UDwc2QqY9NzuwNOPRoBuA4BSd9m/3Hz3cL48FGZ2iCaX5QJ2R96e /5Hn4k70eXcMqVSswTfS6u4dOB0wk+MGEQj9CJd7FYNPgJKuHPZJgeAl6NRL+M9fWinp VVRTt/2acI/6vGP7EJtT9VRr/H1Z0TF6E2PfQErlh3CHianUSyskkUDqk6BhKnaIpzK6 yFAQ== 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=qC2hZsRv5H5yVh2kG269oCcj9WnFBeM/B53brNRZJ5E=; b=FELl1HmVy3qiXVdunWI45igTt8N1BYBjiQQOdQbOsMfbevhkKuLn20NoGk9+xRav8z /2uA9XEPoZ3ewrliGeiHuq6ejBUHxiRL/anSooByJWtQctdqc7CMrSXqKCGQrrUN4hqh lCmwZeu57QMeSoO8EMBsFlTzK4LnIoR61P7vN0A6vR/5nOGK3urCMNcIaBYw2nHntHrt Rrd/s1jWjowRmE2Ooc88f9QuD3EfhcSweHyKMoKcE2zFaDj8PRcd8tscLylute7Qnm9u q10lw//vRoybfcLCisA5Nk+nRLTlrCwRhdp+rKDdTlM6zqXCn54m8+4YShkb1xs+ulYY JqfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gskRq/Ap"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id er8-20020a056402448800b0043d7a3c3cddsi5032235edb.408.2022.08.01.19.18.30; Mon, 01 Aug 2022 19:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gskRq/Ap"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235838AbiHBB4K (ORCPT + 99 others); Mon, 1 Aug 2022 21:56:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234831AbiHBBze (ORCPT ); Mon, 1 Aug 2022 21:55:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D064B4B4 for ; Mon, 1 Aug 2022 18:53:57 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 2D52C610E7 for ; Tue, 2 Aug 2022 01:53:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91FF1C43140 for ; Tue, 2 Aug 2022 01:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659405236; bh=Ji1d5P2JFD8eg6AjTCjdkhd67npMDhGaNZy8jS/PYWs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gskRq/ApykGFhpi+aCpK1RpLyHxAoYS2j0Yo+KT9ey0J+pirEg+c6FuXtfGTuqljl wcWzBrKbpgY1VSQUgfB7zlpi+T1EVrjjLY1t77QQNG8jdyPUe+bj/AnokdFTIxZ2hM +mRgEH5W7sq4q942RF4ovmfbhARPyiB5mUgxg81BCc87ToRTxBQcQl3Ds+JHXP5OK2 /ZhDJlWOJkKJX/lvoREiIWDY2qyzhE6rzp2iHA7yoMzFulFNXw5ML4rBB+NEpzID6x LcwRUI7rtDm0vX1cjdbcbZU1/qMOvOCV3MG6yH9TinIVIjSMSencA7bBc5lV0VuxFf gD+5AUotDNOeQ== Received: by mail-ua1-f53.google.com with SMTP id r12so5273085uaf.7 for ; Mon, 01 Aug 2022 18:53:56 -0700 (PDT) X-Gm-Message-State: ACgBeo2eX2rHDVZtxr60pL3ZNHBNt/MewNWK+s61/ORMn7axdvF+URsa p0TxKes9YwUrjtojDRndNRy70w4JB87p4cfceGI= X-Received: by 2002:ab0:6798:0:b0:382:d9f4:8d0 with SMTP id v24-20020ab06798000000b00382d9f408d0mr7215680uar.63.1659405235487; Mon, 01 Aug 2022 18:53:55 -0700 (PDT) MIME-Version: 1.0 References: <20220801121726.9681-1-zhangqing@loongson.cn> <20220801121726.9681-3-zhangqing@loongson.cn> <6e6a7219-8666-bd9e-770a-e60e4b329832@loongson.cn> <1afd44fab8dacdda7927b6e699bf74c8a1cad773.camel@xry111.site> In-Reply-To: <1afd44fab8dacdda7927b6e699bf74c8a1cad773.camel@xry111.site> From: Huacai Chen Date: Tue, 2 Aug 2022 09:53:42 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] LoongArch: Add prologue unwinder support To: Xi Ruoyao Cc: Youling Tang , Qing Zhang , WANG Xuerui , loongarch@lists.linux.dev, LKML , Jiaxun Yang , Jinyang He Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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, Ruoyao, On Tue, Aug 2, 2022 at 9:39 AM Xi Ruoyao wrote: > > On Tue, 2022-08-02 at 09:34 +0800, Huacai Chen wrote: > > > > #define UNWINDER_GUESS 0 > > > > #define UNWINDER_PROLOGURE 1 > > > > > > Maybe it's better to define with enum type? > > > enum unwind_type { > > > UNWINDER_GUESS, > > > UNWINDER_PROLOGURE, > > > }; > > Both macro and enum are acceptable, but enum is essentially "int", > > while the "type" member is "char" here. > > "0" or "1" will also be "int" (C99 6.4.4.1 para 5). OK, then Zhang Qing has her rights to choose. :) Huacai > > -- > Xi Ruoyao > School of Aerospace Science and Technology, Xidian University