lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d9c9b2cb-dd5e-03dd-9a7e-27938af96aaf@xen0n.name>
Date:   Tue, 25 Apr 2023 21:28:23 +0800
From:   WANG Xuerui <kernel@...0n.name>
To:     maobibo <maobibo@...ngson.cn>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     Frederic Weisbecker <frederic@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Huacai Chen <chenhuacai@...nel.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Anna-Maria Behnsen <anna-maria@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: Loongson (and other $ARCHs?) idle VS timer enqueue

On 2023/4/25 21:25, maobibo wrote:
> 
> 
> 在 2023/4/25 19:49, Peter Zijlstra 写道:

<snip>

>>
>> 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/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ