Re: [PATCH] fix vmstat per cpu usage

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

 



On Tue, Aug 01, Andrew Morton wrote:

> >  
> >  static inline void __count_vm_event(enum vm_event_item item)
> >  {
> > -	__get_cpu_var(vm_event_states.event[item])++;
> > +	__get_cpu_var(vm_event_states).event[item]++;
> >  }
> 
> How odd.  Are there any negative consequences to the existing code?

In asm-s390/percpu.h we use

 #define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset)

and for modules on s390x __reloc_hide() is defined as

 #define __reloc_hide(var,offset) \
   (*({ unsigned long *__ptr; \
        asm ( "larl %0,per_cpu__"#var"@GOTENT" \
              : "=a" (__ptr) : "X" (per_cpu__##var) ); \
        (typeof(&per_cpu__##var))((*__ptr) + (offset)); }))

which leads in this case to

 larl %0, per_cpu__vm_event_states.event[item]@GOTENT

which is invalid asm.
-
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