Re: [-mm patch] {rd,wr}msr_on_cpu SMP=n optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 19, 2007 at 07:14:34PM -0500, Dave Jones wrote:
> On Tue, Feb 20, 2007 at 01:07:13AM +0100, Adrian Bunk wrote:
>...
>  > +#ifdef CONFIG_SMP
>  >  void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
>  >  void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
>  > +#else  /*  CONFIG_SMP  */
>  > +static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
>  > +{
>  > +	rdmsr(msr_no, *l, *h);
>  > +}
>  > +static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
>  > +{
>  > +	wrmsr(msr_no, l, h);
>  > +}
>  > +#endif  /*  CONFIG_SMP  */
> 
> BUG_ON(cpu!=smp_processor_id()) maybe?

This is the CONFIG_SMP=n case.

> 		Dave

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux