From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:40369 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727719AbfKZOCZ (ORCPT ); Tue, 26 Nov 2019 09:02:25 -0500 Received: by mail-pf1-f195.google.com with SMTP id i187so5064178pfc.7 for ; Tue, 26 Nov 2019 06:02:23 -0800 (PST) Date: Tue, 26 Nov 2019 23:02:11 +0900 Message-ID: From: Hajime Tazaki Subject: Re: [RFC v2 01/37] asm-generic: atomic64: allow using generic atomic64 on 64bit platforms In-Reply-To: References: <3ed3c306fc51b0073fcf3a222f7314fcaf50ccf4.1573179553.git.thehajime@gmail.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-arch-owner@vger.kernel.org List-ID: To: richard.weinberger@gmail.com Cc: linux-um@lists.infradead.org, tavi.purdila@gmail.com, linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, retrage01@gmail.com On Tue, 26 Nov 2019 07:02:04 +0900, Richard Weinberger wrote: > > On Fri, Nov 8, 2019 at 6:03 AM Hajime Tazaki wrote: > > > > 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. > > Hmm, why is this specific to LKL? Currently, LKL is only the user which defines GENERIC_ATOMIC64 (lib/atomic64.c) under CONFIG_64BIT environment. Thus, there would be no issues in the current tree. If you manually define `select GENERIC_ATOMIC64` in UML's Kconfig and build it on a 64BIT host, the same problem would happen. > This need a review from core developers. I will explicitly Cc to maintainers (ATOMIC INFRASTRUCTURE) from the next round. Thanks, -- Hajime > > Signed-off-by: Octavian Purdila > > --- > > 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) } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZbQ9-0001bl-2F for linux-um@lists.infradead.org; Tue, 26 Nov 2019 14:02:26 +0000 Received: by mail-pf1-x444.google.com with SMTP id p24so9244171pfn.4 for ; Tue, 26 Nov 2019 06:02:23 -0800 (PST) Date: Tue, 26 Nov 2019 23:02:11 +0900 Message-ID: From: Hajime Tazaki Subject: Re: [RFC v2 01/37] asm-generic: atomic64: allow using generic atomic64 on 64bit platforms In-Reply-To: References: <3ed3c306fc51b0073fcf3a222f7314fcaf50ccf4.1573179553.git.thehajime@gmail.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: richard.weinberger@gmail.com Cc: tavi.purdila@gmail.com, linux-kernel-library@freelists.org, retrage01@gmail.com, linux-um@lists.infradead.org, linux-arch@vger.kernel.org On Tue, 26 Nov 2019 07:02:04 +0900, Richard Weinberger wrote: > > On Fri, Nov 8, 2019 at 6:03 AM Hajime Tazaki wrote: > > > > 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. > > Hmm, why is this specific to LKL? Currently, LKL is only the user which defines GENERIC_ATOMIC64 (lib/atomic64.c) under CONFIG_64BIT environment. Thus, there would be no issues in the current tree. If you manually define `select GENERIC_ATOMIC64` in UML's Kconfig and build it on a 64BIT host, the same problem would happen. > This need a review from core developers. I will explicitly Cc to maintainers (ATOMIC INFRASTRUCTURE) from the next round. Thanks, -- Hajime > > Signed-off-by: Octavian Purdila > > --- > > 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) } _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um