Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] uclibc: arc: Disable usage of atomic ops if hardware has no LLSC
Date: Wed, 19 Apr 2017 20:48:57 +0300	[thread overview]
Message-ID: <20170419174857.23185-1-abrodkin@synopsys.com> (raw)

Since uClibc-ng v1.0.20 we may force libc to either use llock/scond
instructions for atomic ops or if those are missing use kernel-assisted
emulation. By defult atomics are used so we disable that feature in libc
if we build for target without LLSC.

This allows us to build and use NPTL on ARC750 for example which was
not possible before.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 package/uclibc/uclibc.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 45bb6dede..ce7f23f25 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -101,6 +101,12 @@ define UCLIBC_ARC_PAGE_SIZE_CONFIG
 	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE),$(@D)/.config)
 endef
 
+ifneq ($(BR2_ARC_ATOMIC_EXT),y)
+define UCLIBC_ARC_ATOMICS_CONFIG
+	$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS,$(@D)/.config)
+endef
+endif
+
 endif # arc
 
 #
@@ -395,6 +401,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
 	$(UCLIBC_BINFMT_CONFIG)
 	$(UCLIBC_ARC_TYPE_CONFIG)
 	$(UCLIBC_ARC_PAGE_SIZE_CONFIG)
+	$(UCLIBC_ARC_ATOMICS_CONFIG)
 	$(UCLIBC_ARM_ABI_CONFIG)
 	$(UCLIBC_ARM_BINFMT_FLAT)
 	$(UCLIBC_ARM_NO_CONTEXT_FUNCS)
-- 
2.11.0

             reply	other threads:[~2017-04-19 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 17:48 Alexey Brodkin [this message]
2017-05-04 20:54 ` [Buildroot] [PATCH] uclibc: arc: Disable usage of atomic ops if hardware has no LLSC Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170419174857.23185-1-abrodkin@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox