[PATCH] arm64: sys_reg() : Fix encoding of system registers

Catalin Marinas catalin.marinas at arm.com
Wed Jul 22 03:07:39 PDT 2015


On Wed, Jul 22, 2015 at 10:54:17AM +0100, Suzuki K. Poulose wrote:
> From: "Suzuki K. Poulose" <suzuki.poulose at arm.com>
> 
> sys_reg() macro encodes Op0 as (Op0 - 2) and pushes it to Bit 19,
> leaving Bit 20 uninitialised.

A value of 0 doesn't mean uninitialised and as you noticed, it's set by
the value or'ed onto the sys_reg() returned value in the mrs_s etc.
macros.

So I would rather change the subject to "Generalise encoding of system
registers" and drop the uninitialised paragraph above, maybe replace it
with a statement that current sys_reg() was only meant for MSR/MRS
(register) encodings.

Otherwise, the patch itself is fine.

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>

-- 
Catalin



More information about the linux-arm-kernel mailing list