Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1793711rwl; Wed, 12 Apr 2023 19:22:36 -0700 (PDT) X-Google-Smtp-Source: AKy350Z4r60BTxe/UiBGdAg8gxgmGogcG6zZ27Q4ONZHAg5y5W3CuD8GzfodBf7SCjAS2XSA2R8+ X-Received: by 2002:a17:902:e892:b0:1a6:7a19:3318 with SMTP id w18-20020a170902e89200b001a67a193318mr289905plg.13.1681352556137; Wed, 12 Apr 2023 19:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681352556; cv=none; d=google.com; s=arc-20160816; b=By3OoMxdBX+bkF2ATZx17WUCJkgLqIFr8nftw4eNY5VgUp24GE92hE4TTueg1nwodh KlEvuknaW69E1uw7ubmg4DlurVT/eZxfIIZSMM/qfpALQYa0IiS/DzzRntdXPKqebt0W b1QbWVPN3LLLBW9yGNT7jB6lvA4YnmL66N2igCOluISc+NK9dg7OLnqw8s1NqgaivFtC CgX2lGdV9SFpW+0PEYM0lOGUyJEuljq7d0mhU9JIYnmnmLiwI2OmItntKrnr+vVS5zra Jc7Xk5Pk4cKPaZmvcOTBwPyDsYi6yv86inYxj0vm/oiZhbT45kDpes9I+ryVyR/+VPW0 PlUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=EcqsGOQ/zGuI/gCGv0udOUa/mJZzD7TO3+xTqRbt34A=; b=OlQK2EwJ/vjcYorH86DzkDT2p3BFhFhHRMcVmfR8QhQI8Tt1gEzGNyvbsNigl3TTDU QIDA2n2WWmRLKyeVoVqnBbHw5zaLjxO6xQZ4pu8ITBg3fK0FhVn8KLGu/xDZsa62T5w9 /0DXaZbQZ9XCgCX96StkZS8KUp7WbyMsUVvb7qUoBUSE70XLuSCF30qZRILlK4Oy+Zdi XvdW4k6cCimUobt/J/wdDyN92ZgTiy+f8qeRq5NvOlWox7XdguDZ9jN2KpjprHvwUK3I 5lPJn81k6xgl5/gh6HUwDsGrtNt3XDLIXroQllaG20WGJVy9RGVmSI5gPckgJ2nHX7H/ rQOA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jb11-20020a170903258b00b001a51e159297si663207plb.368.2023.04.12.19.22.24; Wed, 12 Apr 2023 19:22:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbjDMB7B (ORCPT + 99 others); Wed, 12 Apr 2023 21:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbjDMB7A (ORCPT ); Wed, 12 Apr 2023 21:59:00 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1F6D65FC6 for ; Wed, 12 Apr 2023 18:58:56 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8AxJITfYTdkppEbAA--.42883S3; Thu, 13 Apr 2023 09:58:55 +0800 (CST) Received: from [10.130.0.149] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxsOTdYTdk9bkhAA--.9170S3; Thu, 13 Apr 2023 09:58:53 +0800 (CST) Subject: Re: [PATCH v1 3/4] LoongArch: Use larch_insn_gen_break() for kprobes To: Xi Ruoyao , Huacai Chen , WANG Xuerui References: <1681293901-24918-1-git-send-email-yangtiezhu@loongson.cn> <1681293901-24918-4-git-send-email-yangtiezhu@loongson.cn> Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn From: Tiezhu Yang Message-ID: <3249ca98-6293-a83d-d49b-d1d52827a062@loongson.cn> Date: Thu, 13 Apr 2023 09:58:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8CxsOTdYTdk9bkhAA--.9170S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvdXoWrKw4rGr1rZw45tFWUWryxuFg_yoW3Awc_ur 18ZryUCF98Za9xZw4UKa13ZFykGayxX3WUArykZw47Cwn8Xa4UArZIkr1kZa1jgryfXrnI kFnIqFWFkry7ujkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY 47kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUGVWUXwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7 xvwVC2z280aVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1UM2AI xVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64 kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q6rW5McIj6I8E87Iv67AKxVWUJVW8JwAm 72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04 k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18 MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr4 1lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1l IxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4 A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8xOz3UUUUU== X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 On 04/12/2023 07:08 PM, Xi Ruoyao wrote: > On Wed, 2023-04-12 at 18:05 +0800, Tiezhu Yang wrote: >> -static inline bool insns_not_supported(union loongarch_instruction insn) >> +static inline bool insns_not_supported(u32 code) >> { >> + union loongarch_instruction insn; >> + >> + insn.word = code; >> + > > I remember Xuerui disliked this change. Maybe we can add > __attribute__ (__transparent_union__) [1] for union > loongarch_instruction instead? > > [1]: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-transparent_005funion-type-attribute > OK, let me pass union parameter, then define a local variable to do type conversion for callers, the changes are small and then the code may be more readable, thank you. Thanks, Tiezhu