[lkml]   [2009]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH 13/16] percpu: remove per_cpu__ prefix.
>> -#define __ia64_per_cpu_var(var)	per_cpu__##var
>> +#define __ia64_per_cpu_var(var) var
> IA64 could completely drop the macro? Tony?

A #define that just returns its original argument untouched
does seem to be a no-op. So I suppose we could just fix
the dozen or so places where it is used to just use the
variable directly.

But that would leave no visual indicator in the source
code that a per-cpu variable was being used. E.g. in
delayed_tlb_flush() we'd end up with:

if (unlikely(ia64_need_tlb_flush)) {
spin_lock ...
if (ia64_need_tlb_flush) {
ia64_need_tlb_flush = 0;
spin_unlock ...

This might cause confusion to anyone who is looking at
this code and has let the

DECLARE_PER_CPU(u8, ia64_need_tlb_flush);

scroll off the top of their screen. I'd be tempted to go
and change all the names to make this obvious:

DECLARE_PER_CPU(u8, PERCPU_ia64_need_tlb_flush);


 \ /
  Last update: 2009-10-14 18:53    [W:0.095 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site