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] [day] [month] [year] [list]
Message-ID: <87a5iiq6iw.ffs@tglx>
Date: Tue, 16 Jul 2024 06:56:23 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jiaxun Yang <jiaxun.yang@...goat.com>, Peter Zijlstra
 <peterz@...radead.org>, Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui
 <kernel@...0n.name>
Cc: linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev, Jiaxun Yang
 <jiaxun.yang@...goat.com>
Subject: Re: [PATCH v2 3/3] LoongArch: SMP: Implement parallel CPU bring up

On Mon, Jul 15 2024 at 21:35, Jiaxun Yang wrote:
>   */
>  void loongson_boot_secondary(int cpu, struct task_struct *idle)
>  {
> -	unsigned long entry;
> +	unsigned long entry, stack, thread_info;
>  
>  	pr_info("Booting CPU#%d...\n", cpu);
>  
>  	entry = __pa_symbol((unsigned long)&smpboot_entry);
> -	cpuboot_data.stack = (unsigned long)__KSTK_TOS(idle);
> -	cpuboot_data.thread_info = (unsigned long)task_thread_info(idle);
> +	stack = (unsigned long)__KSTK_TOS(idle);
> +	thread_info = (unsigned long)task_thread_info(idle);
>  
> +	csr_mail_send(thread_info, cpu_logical_map(cpu), 2);
> +	csr_mail_send(stack, cpu_logical_map(cpu), 1);
>  	csr_mail_send(entry, cpu_logical_map(cpu), 0);
>  
>  	loongson_send_ipi_single(cpu, ACTION_BOOT_CPU);
> @@ -525,20 +522,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
>  #endif
>  }
>  
> -int __cpu_up(unsigned int cpu, struct task_struct *tidle)
> +int arch_cpuhp_kick_ap_alive(unsigned int cpu, struct task_struct *tidle)
>  {
>  	loongson_boot_secondary(cpu, tidle);

What's the point of this indirection and why is
loongson_boot_secondary() global? The only caller is this function, no?
  
Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ