From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755512AbdKNOLJ (ORCPT ); Tue, 14 Nov 2017 09:11:09 -0500 Received: from bin-mail-out-06.binero.net ([195.74.38.229]:45149 "EHLO bin-vsp-out-02.atm.binero.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755405AbdKNOKx (ORCPT ); Tue, 14 Nov 2017 09:10:53 -0500 X-Halon-ID: be7e4388-c944-11e7-96ab-005056917f90 Authorized-sender: andreas@gaisler.com From: Andreas Larsson To: David Miller , sparclinux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, software@gaisler.com Subject: [PATCH 0/2] sparc32,leon: Allow and use CAS for atomic operations for LEON Date: Tue, 14 Nov 2017 15:03:41 +0100 Message-Id: <1510668223-18484-1-git-send-email-andreas@gaisler.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The first patch makes sure that CAS can be assembled and the second patch adds the configurable possibility to use the CASA instruction rather than spinlock based emulation for atomic operations. Andreas Larsson (2): sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON sparc32,leon: Add support for atomic operations with CAS arch/sparc/Kconfig | 17 ++++- arch/sparc/Makefile | 10 ++- arch/sparc/include/asm/atomic_32.h | 55 ++++++++++++++- arch/sparc/include/asm/bitops_32.h | 13 ++++ arch/sparc/include/asm/cmpxchg_32.h | 37 ++++++++++ arch/sparc/lib/Makefile | 4 +- arch/sparc/lib/atomic_cas_32.S | 69 +++++++++++++++++++ arch/sparc/lib/bitops_cas_32.S | 130 ++++++++++++++++++++++++++++++++++++ 8 files changed, 326 insertions(+), 9 deletions(-) create mode 100644 arch/sparc/lib/atomic_cas_32.S create mode 100644 arch/sparc/lib/bitops_cas_32.S -- 2.8.0