From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hajime Tazaki Subject: [RFC v3 01/26] asm-generic: atomic64: allow using generic atomic64 on 64bit platforms Date: Wed, 5 Feb 2020 16:30:10 +0900 Message-ID: <39e1313ff3cf3eab6ceb5ae322fcd3e5d4432167.1580882335.git.thehajime@gmail.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Received: from mail-pg1-f194.google.com ([209.85.215.194]:34535 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgBEHar (ORCPT ); Wed, 5 Feb 2020 02:30:47 -0500 Received: by mail-pg1-f194.google.com with SMTP id j4so538333pgi.1 for ; Tue, 04 Feb 2020 23:30:45 -0800 (PST) In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-um@lists.infradead.org Cc: Octavian Purdila , Akira Moroo , linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, Will Deacon , Peter Zijlstra , Boqun Feng From: Octavian Purdila With CONFIG_64BIT enabled, atomic64 via CONFIG_GENERIC_ATOMIC64 options are not compiled due to type conflict of atomic64_t defined in linux/type.h. This commit fixes the issue and allow using generic atomic64 ops. Currently, LKL is only the user which defines GENERIC_ATOMIC64 (lib/atomic64.c) under CONFIG_64BIT environment. Thus, there is no issues before this commit. Signed-off-by: Octavian Purdila Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng --- include/asm-generic/atomic64.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/atomic64.h b/include/asm-generic/atomic64.h index 370f01d4450f..9b15847baae5 100644 --- a/include/asm-generic/atomic64.h +++ b/include/asm-generic/atomic64.h @@ -9,9 +9,11 @@ #define _ASM_GENERIC_ATOMIC64_H #include +#ifndef CONFIG_64BIT typedef struct { s64 counter; } atomic64_t; +#endif #define ATOMIC64_INIT(i) { (i) } -- 2.21.0 (Apple Git-122.2)