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]
Date:	Thu, 28 Mar 2013 21:12:35 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	LKML <linux-kernel@...r.kernel.org>, linux-arch@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Magnus Damm <magnus.damm@...il.com>,
	Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [patch 22/34] mips: Use generic idle loop

On 03/22/2013 03:23 AM, Thomas Gleixner wrote:
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ralf Baechle <ralf@...ux-mips.org>
> ---
>  arch/mips/Kconfig          |    1 
>  arch/mips/kernel/process.c |   46 ++++++++++++---------------------------------
>  arch/mips/kernel/smp.c     |    2 -
>  3 files changed, 15 insertions(+), 34 deletions(-)
>
[...]
 
> Index: linux-2.6/arch/mips/kernel/process.c
> ===================================================================
> --- linux-2.6.orig/arch/mips/kernel/process.c
> +++ linux-2.6/arch/mips/kernel/process.c
> @@ -41,44 +41,24 @@
>  #include <asm/inst.h>
>  #include <asm/stacktrace.h>
> 
> -/*
> - * The idle thread. There's no useful work to be done, so just try to conserve
> - * power and have a low exit latency (ie sit in a loop waiting for somebody to
> - * say that they'd like to reschedule)
> - */
> -void __noreturn cpu_idle(void)
> +void arch_cpu_idle_dead(void)
>  {
> -	int cpu;
> -
> -	/* CPU is going idle. */
> -	cpu = smp_processor_id();
> +	/* What the heck is this check doing ? */
> +	if (!cpu_isset(cpu, cpu_callin_map))
> +		play_dead();}

Extra closing brace?

> +}
> 
> -	/* endless idle loop with no priority at all */
> -	while (1) {
> -		tick_nohz_idle_enter();
> -		rcu_idle_enter();
> -		while (!need_resched() && cpu_online(cpu)) {
> +void arch__cpu_idle(void)

s/arch__cpu_idle/arch_cpu_idle (single underscore)


Regards,
Srivatsa S. Bhat

> +{
>  #ifdef CONFIG_MIPS_MT_SMTC
> -			extern void smtc_idle_loop_hook(void);
> +	extern void smtc_idle_loop_hook(void);
> 
> -			smtc_idle_loop_hook();
> +	smtc_idle_loop_hook();
>  #endif
> -
> -			if (cpu_wait) {
> -				/* Don't trace irqs off for idle */
> -				stop_critical_timings();
> -				(*cpu_wait)();
> -				start_critical_timings();
> -			}
> -		}
> -#ifdef CONFIG_HOTPLUG_CPU
> -		if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map))
> -			play_dead();
> -#endif
> -		rcu_idle_exit();
> -		tick_nohz_idle_exit();
> -		schedule_preempt_disabled();
> -	}
> +	if (cpu_wait)
> +		(*cpu_wait)();
> +	else
> +		local_irq_enable();
>  }
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ