Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6969076rwr; Tue, 25 Apr 2023 06:32:07 -0700 (PDT) X-Google-Smtp-Source: AKy350b7GTRUVL29FO4q6JdU/rFMMRuOb4A6+Tx6UKYB/qKLHRgD8C8kNFwQcuGqPj0x60tzRISZ X-Received: by 2002:a17:902:da88:b0:1a6:62a2:2216 with SMTP id j8-20020a170902da8800b001a662a22216mr21958084plx.65.1682429527275; Tue, 25 Apr 2023 06:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682429527; cv=none; d=google.com; s=arc-20160816; b=yHXUPu+krfxW80FJ+13yZ/0fEPbJtiZWDPtcZYOLJzWH1EQ5CoD3ANHoUogxkwL1Rs G3SAt0iMdwvcpU0v5y6dQ//GmZKBVU6Ow0UGKYGeg0/dxuSV0apYfbpVLgd0aGGEhnwK s8c173Hp4WCIj4bt4O37xFmjnefi0Z1bhdQbF1v5d4/tFPnn0sRMWQwBUGhuqBVOAWQX 4XaK3sDa3wCp0ifPHYP9vP4RK5Unm7omeeoKMRrm8fzexIKkuKf2fWZvuWoBUdtwihCP nXbKXbA8DdBZR72escsfbqY/O/I8975xpC4SeRKcZstgQpQlrRa9i0UnIun0FViSlinQ AooA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=bTGi6OsQCLvqDR54zTL7Y0L2hZwNmxgdM46C9vCYOR4=; b=khC/V/EF7BBDBiEhbVJR7ey8Aol1CHB+YRfmlUv4Zu0hnijZwjJCBsfgNyMlfysNa1 jJqgtfdqAHbe1xyAQv5H+00DMCfTAQ9FEpUEzJ5JXLKOQysRMUnAEHW9Kq/Nyeh8yKqt sfstPpCpcbzPAjuSXbuZgCTnxYBRNSmiZNFgfYOAFnqeCD/a1DYNNf8GRaxyzH6ZLCir F8qhligw4TbC2aGIPbrL5/G2JQhvgSyPqSsi3Xbi/BC+CbcYVy6bev9wMD0WDMrFmudn +MRSA4zMvmNTAPUlTby61iOIGIvRtWMMg38pBm14jJb9TdUFLYP26JDqSGqtS/JKeS4N s0dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b="bKMZcH1/"; 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 q18-20020a170902eb9200b001a96e24e485si6421726plg.425.2023.04.25.06.31.47; Tue, 25 Apr 2023 06:32:07 -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=@xen0n.name header.s=mail header.b="bKMZcH1/"; 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 S233992AbjDYN2i (ORCPT + 99 others); Tue, 25 Apr 2023 09:28:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233980AbjDYN2g (ORCPT ); Tue, 25 Apr 2023 09:28:36 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81217CC20 for ; Tue, 25 Apr 2023 06:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1682429304; bh=fto49mKsONy93CZBngA/x8zbePY/8ToUDvSihHTfkN8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bKMZcH1/A1WohwTLZazwlB41Yp7AlxwebCyztci2IRrlKzyi4iP1M3z2rse5sjz6A Lax7lnr2WDaPLRykuZmYk5Ynoo2TcDvQti2sr4TEvkBC4Sy89zS2TpWOvpn0Fvxt8E qs7ncYRjWws/zhJRTo2BdNHdfL2eco5P1hkJlMm8= Received: from [100.100.57.122] (unknown [58.34.185.106]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id CD5C46011B; Tue, 25 Apr 2023 21:28:23 +0800 (CST) Message-ID: Date: Tue, 25 Apr 2023 21:28:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Loongson (and other $ARCHs?) idle VS timer enqueue Content-Language: en-US To: maobibo , Peter Zijlstra Cc: Frederic Weisbecker , Thomas Gleixner , Huacai Chen , "Rafael J. Wysocki" , Anna-Maria Behnsen , LKML References: <87leil2r7v.ffs@tglx> <20230422081700.GB1214746@hirez.programming.kicks-ass.net> <20230422150409.GL1214746@hirez.programming.kicks-ass.net> <7d91fa2a-57c5-6c78-8e2d-7fbdd6a11cba@loongson.cn> <20230425114937.GC1335080@hirez.programming.kicks-ass.net> <5ba79220-683f-a78a-8c3b-bc0b118226f8@loongson.cn> From: WANG Xuerui In-Reply-To: <5ba79220-683f-a78a-8c3b-bc0b118226f8@loongson.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,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 2023/4/25 21:25, maobibo wrote: > > > 在 2023/4/25 19:49, Peter Zijlstra 写道: >> >> diff --git a/arch/loongarch/kernel/genex.S b/arch/loongarch/kernel/genex.S >> index 44ff1ff64260..3c8a6bab98fe 100644 >> --- a/arch/loongarch/kernel/genex.S >> +++ b/arch/loongarch/kernel/genex.S >> @@ -18,27 +18,31 @@ >> >> .align 5 >> SYM_FUNC_START(__arch_cpu_idle) >> - /* start of rollback region */ >> - LONG_L t0, tp, TI_FLAGS >> - nop >> - andi t0, t0, _TIF_NEED_RESCHED >> - bnez t0, 1f >> - nop >> - nop >> - nop >> + /* start of idle interrupt region */ >> + move t0, CSR_CRMD_IE > addi.d t0, zero, CSR_CRMD_IE can be used here, move is used for reg to reg Or better: li.d t0, CSR_CRMD_IE (prefer pseudo-instruction over concrete ones whenever it helps readability). We don't need to support ancient in-house toolchains without support for even li. ;-) -- WANG "xen0n" Xuerui Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/