Skip to content

Commit

Permalink
MN10300: Specify an ELF HWCAP flag for MN10300 Atomic Operations Unit…
Browse files Browse the repository at this point in the history
… support

Use an ELF HWCAP flag to indicate to the process that the CPU provides LL/SC
equivalent atomic operations unit support in addition to BSET/BCLR.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
Mark Salter authored and David Howells committed Oct 27, 2010
1 parent 5a226c6 commit 2502c64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/mn10300/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
#define R_MN10300_SYM_DIFF 33 /* Adjustment when relaxing. */
#define R_MN10300_ALIGN 34 /* Alignment requirement. */

/*
* AM33/AM34 HW Capabilities
*/
#define HWCAP_MN10300_ATOMIC_OP_UNIT 1 /* Has AM34 Atomic Operations */


/*
* ELF register definitions..
*/
Expand Down Expand Up @@ -128,7 +134,11 @@ do { \
* instruction set this CPU supports. This could be done in user space,
* but it's not easy, and we've already done it here.
*/
#ifdef CONFIG_MN10300_HAS_ATOMIC_OPS_UNIT
#define ELF_HWCAP (HWCAP_MN10300_ATOMIC_OP_UNIT)
#else
#define ELF_HWCAP (0)
#endif

/*
* This yields a string that ld.so will use to load implementation
Expand Down

0 comments on commit 2502c64

Please sign in to comment.