linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Report double word access atomicity on LPAE enabled targets through AUXV
@ 2013-04-08 12:34 Vladimir Danushevsky
  2013-04-08 13:21 ` Will Deacon
  2013-04-08 14:24 ` Russell King - ARM Linux
  0 siblings, 2 replies; 13+ messages in thread
From: Vladimir Danushevsky @ 2013-04-08 12:34 UTC (permalink / raw)
  To: linux-arm-kernel

From: Vladimir Danushevsky <vladidan@oracle.com>

Hi All,

One of the indirect LPAE features in a single-copy atomicity of LDRD/STRD instructions. This information is useful for some dynamic code generating applications (e.g. JIT compilers) to produce a more efficient access mechanism to atomic/volatile operands. 

The feature is part of the design scheme therefore it's not related to the platform configuration i.e. whether CONFIG_ARM_LPAE is enabled or not.

The patch exposes that information through hwcap entry of an Auxiliary Vector.



Signed-off-by: Vladimir Danushevsky <vladidan@oracle.com>

---

--- linux-3.8.4_vanilla/arch/arm/include/uapi/asm/hwcap.h       2013-03-20 16:11:19.000000000 -0400

+++ linux-3.8.4/arch/arm/include/uapi/asm/hwcap.h       2013-03-26 16:32:18.266043699 -0400

@@ -25,6 +25,7 @@

 #define HWCAP_IDIVT    (1 << 18)

 #define HWCAP_VFPD32   (1 << 19)       /* set if VFP has 32 regs (not 16) */

 #define HWCAP_IDIV     (HWCAP_IDIVA | HWCAP_IDIVT)

+#define HWCAP_ATOMICD   (1 << 20)       /* ldrd/strd single-copy atomicity */



 #endif /* _UAPI__ASMARM_HWCAP_H */


--- linux-3.8.4_vanilla/arch/arm/kernel/setup.c 2013-03-20 16:11:19.000000000 -0400

+++ linux-3.8.4/arch/arm/kernel/setup.c 2013-04-03 15:42:31.580525201 -0400

@@ -487,6 +487,10 @@ static void __init setup_processor(void)

        elf_hwcap &= ~HWCAP_THUMB;

 #endif


+        /* check LPAE presence */ 

+        if (((read_cpuid_ext(CPUID_EXT_MMFR3) >> 28) & 0xf) > 0)

+          elf_hwcap |= HWCAP_ATOMICD;

+

        feat_v6_fixup();


        cacheid_init();

---

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-22 14:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 12:34 [PATCH] Report double word access atomicity on LPAE enabled targets through AUXV Vladimir Danushevsky
2013-04-08 13:21 ` Will Deacon
2013-04-08 15:11   ` Vladimir Danushevsky
2013-04-08 14:24 ` Russell King - ARM Linux
2013-04-08 15:31   ` Vladimir Danushevsky
2013-04-08 15:57   ` Will Deacon
2013-04-12 20:58     ` Vladimir Danushevsky
2013-04-16 16:04       ` Catalin Marinas
2013-04-16 17:22       ` Will Deacon
2013-04-17  9:48         ` Will Deacon
2013-04-18 16:22         ` Catalin Marinas
2013-04-22 14:17           ` Russell King - ARM Linux
2013-04-22 14:28             ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).