Thread (44 messages) 44 messages, 3 authors, 2013-10-10
STALE4632d

[PATCH 2/2] ARM: include: asm: use 'int' instead of 'unsigned long' for normal register variables within atomic.h

From: Will Deacon <hidden>
Date: 2013-10-01 09:01:19

On Tue, Oct 01, 2013 at 03:05:27AM +0100, Chen Gang wrote:
On 10/01/2013 12:11 AM, Will Deacon wrote:
quoted
On Sun, Sep 29, 2013 at 04:52:28AM +0100, Chen Gang wrote:
quoted
"arc/arm" will be never on 64-bit, it is mainly on 32-bit (may also can
be on 16-bit).

So better to use 'int' instead of 'unsigned long' for normal register
variable (on 16-bit, 'int' is allowed to be 16-bit, so historically,
often use 'int' for normal register variables).
This commit message doesn't make a blind bit of sense! arch/arm/ is a 32-bit
architecture in the sense that int will always be 32-bit there. This patch
is just a cosmetic change, bringing our atomic_t manipulation code inline
with the atomic_t type definition.
OK, thanks. That means: "arm means arm 32-bit, arm64 means arm 64-bit.
The current Linux kernel main line does not support arm 16-bit".

Since "bringing our atomic_t ... with the atomic_t type definition", can
we use 'atomic_t" instead of 'unsigned long'?

And can we use 'atomic64_t" instead of 'unsigned long' in atomic64_*()?
That's probably a bit dodgy, since they are typedefs to compound types
which, if ever extended, would fall to bits if we tried to pack them into a
single register.

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help