All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai] [PATCH] x86/ipipe: restore warning with AMD erratum
@ 2013-01-11  7:37 Jan Kiszka
  2013-01-11  7:45 ` Jan Kiszka
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Kiszka @ 2013-01-11  7:37 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai

> From acc3c57390d275a1b28d66f1ec88c85e0f8c0890 Mon Sep 17 00:00:00 2001
> From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> Date: Sat, 29 Dec 2012 17:48:20 +0100
> Subject: [PATCH] x86/ipipe: restore warning with AMD erratum
> 
> ---
>  arch/x86/kernel/apic/apic.c |   16 ++++++++++------
>  1 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index 7f07610..91531bb 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -545,14 +545,18 @@ static void __cpuinit setup_APIC_timer(void)
>  	memcpy(levt, &lapic_clockevent, sizeof(*levt));
>  	levt->cpumask = cpumask_of(smp_processor_id());
>  #ifdef CONFIG_IPIPE
> -	if (!(lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY))
> +	if (!(lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY)
> +	    && !cpu_has_amd_erratum(amd_erratum_400))
>  		levt->ipipe_timer = &__get_cpu_var(lapic_itimer);
>  	else {
> -	       printk(KERN_INFO
> -		      "I-pipe: cannot use LAPIC as a tick device\n");
> -	       if (cpu_has_amd_erratum(amd_erratum_400))
> -		       printk(KERN_INFO
> -			      "I-pipe: disable C1E power state in your BIOS\n");
> +		static atomic_t printed = ATOMIC_INIT(-1);
> +		printk(KERN_INFO
> +		       "I-pipe: cannot use LAPIC on cpu #%d as a tick device\n",
> +		       smp_processor_id());
> +		if (cpu_has_amd_erratum(amd_erratum_400)
> +		    && atomic_inc_and_test(&printed))
> +			printk(KERN_INFO
> +			       "I-pipe: disable C1E power state in your BIOS\n");

printk_once should do the trick as well.

>  	}
>  #endif /* CONFIG_IPIPE */
>  
> -- 
> 1.7.3.4

I can also carry an updated version in my queue if you like. Did you
already request a merge of your queue? Then I would rebase mine on top
these days.

Jan

PS: ipipe-jki.git works now, thanks again.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130111/6d1ee428/attachment.pgp>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-01-13 12:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11  7:37 [Xenomai] [PATCH] x86/ipipe: restore warning with AMD erratum Jan Kiszka
2013-01-11  7:45 ` Jan Kiszka
2013-01-11  7:49   ` Gilles Chanteperdrix
2013-01-11  7:52     ` Jan Kiszka
2013-01-11  7:55       ` Gilles Chanteperdrix
2013-01-12 17:35   ` Gilles Chanteperdrix
2013-01-12 17:45     ` Jan Kiszka
2013-01-12 17:59       ` Gilles Chanteperdrix
2013-01-13 12:28         ` Jan Kiszka
2013-01-13 12:39           ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.