RE: [PATCH 2/5] percpu: Refactor percpu.h

From: Luck, Tony
Date: Fri Feb 06 2009 - 14:07:01 EST


> Why does IA64 still have a special percpu section on UP? Is there a
> particular reason why it can't degenerate to regular .data like every
> other arch?

There are a few per-cpu variables that are accessed in the machine
check handlers with MMU turned off[1], so access is in physical mode.
We handle this with the GET_THIS_PADDR() macro which computes the
address of percpu objects based on offsets from a special register
(ar.k3) that has the base physical address of the .data.percpu
section for this processor. The addressing mode used here has
a limited offset, so if percpu variables are scattered throughout
.data we get link errors.

-Tony

[1] The MMU may have been the cause of the machine check.

èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—