Messages in this thread | | | Date | Thu, 15 Oct 2009 18:27:36 +0900 | From | Tejun Heo <> | Subject | Re: [PATCH 14/16] percpu: make access macros universal |
| |
Christoph Lameter wrote: > On Wed, 14 Oct 2009, Tejun Heo wrote: > >> @@ -182,17 +185,19 @@ static inline void *pcpu_lpage_remapped(void *kaddr) >> #ifndef percpu_read >> # define percpu_read(var) \ >> ({ \ >> - typeof(var) __tmp_var__; \ >> - __tmp_var__ = get_cpu_var(var); \ >> - put_cpu_var(var); \ >> - __tmp_var__; \ >> + typeof(var) *pr_ptr__ = &(var); \ >> + typeof(var) pr_ret__; \ >> + pr_ret__ = get_cpu_var(*pr_ptr__); \ >> + put_cpu_var(*pr_ptr__); \ >> + pr_ret__; \ >> }) >> #endif > > == this_cpu_read(var) ?
Yeah, all these extra and duplicate accessors need to go away. Once dust around this patchset settles down. That's the next thing to do.
Thanks.
-- tejun
| |