Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp718839rdb; Sat, 19 Aug 2023 22:58:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpN0p0/kiwQme8kujhVD6yAQN04fO1TB1ZBW+nySb8M83KgZlbArowz0Sq8aOw9pRWq7IE X-Received: by 2002:a05:6a20:2591:b0:f3:33fb:a62b with SMTP id k17-20020a056a20259100b000f333fba62bmr4870483pzd.9.1692511097641; Sat, 19 Aug 2023 22:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692511097; cv=none; d=google.com; s=arc-20160816; b=O3XjFWuSakb4Y+kkDCYhMFmMg7eD6tC5mNUJuxIiQoA2OqkngsIF9QE7TQ6wWLRm7v /QV97CEb0KJkDd4Lm32FEiOW/hKKdurjxzbjJOJqFRdHHzHIqTOp7dmagKtl/BxzZBST gQ3hChBlX4qno3m+yUQBjrABc1UadC64ZMJXWIIJuZIHie20Urg7lsPuzt8LUup39ag7 Ku99EXw++ucDZgxD8J3meyK20FPPhP/1vwknpM7PWvg0+PqEuJ+GWw0xA5uFXBb7ik2Q NZKUgRuGreGaVuUJIeymSCff3LjiDEkjI/BcpMCB2aYCTki6L0WF4uxznWJQIfuCrxv8 ewKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=/wsp6Nq6uiLfpud7FZMrvL9iirXiIV/1qv3JY30oVJU=; fh=dlW/33EH8UeHTfnUdygrP/ym6HajjanrHytPcQIZu9Y=; b=i+45/cHe1BuhSEai6Nl7IRo2U1o7WCWqYVr9raXYeW2Y62KsTBF1rKWplyXDETU8I8 255K/zqYdHGxFCIG17Y/gsOBTkW9Zf6DWhN6tIY+9SPRfAmxQ4GgX9KiI1fti2S3Dtr+ dUS0e3Z8cPCI9TBeaVGDBbaY2UbWZCHeZZfWYjteL7XEw5WBEMGZm4pTB5LJnK71efAY WhABlIczL5HI4D4M8isJBR+fgOup9UBZX82O3jVBo3ZB4vtoIFXD+82JyNSfD/DJc1AA uUZdKmiXz0HpXLukdbY60AQmTE3iqKsMZihYFfRQbXrx4o2OJcYInl7SubJ0v/oJbT2r oYQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r38-20020a634426000000b0056532a14f54si4526696pga.900.2023.08.19.22.58.05; Sat, 19 Aug 2023 22:58:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229648AbjHTATf convert rfc822-to-8bit (ORCPT + 99 others); Sat, 19 Aug 2023 20:19:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229763AbjHTATQ (ORCPT ); Sat, 19 Aug 2023 20:19:16 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B343ACFE22; Sat, 19 Aug 2023 14:17:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 6015C63DB7E5; Sat, 19 Aug 2023 23:17:48 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4g8WFByNW1hB; Sat, 19 Aug 2023 23:17:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id DB93163DB801; Sat, 19 Aug 2023 23:17:47 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id V-A1eIJKOCYu; Sat, 19 Aug 2023 23:17:47 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id ABF7E63DB7E5; Sat, 19 Aug 2023 23:17:47 +0200 (CEST) Date: Sat, 19 Aug 2023 23:17:47 +0200 (CEST) From: Richard Weinberger To: davidgow Cc: anton ivanov , Johannes Berg , tglx , mingo , bp , dave hansen , hpa , Arnd Bergmann , Noah Goldstein , linux-um , x86 , linux-arch , Geert Uytterhoeven , linux-kselftest , linux-kernel Message-ID: <1999963356.6490608.1692479867613.JavaMail.zimbra@nod.at> In-Reply-To: <20230704083022.692368-1-davidgow@google.com> References: <20230704083022.692368-1-davidgow@google.com> Subject: Re: [PATCH 1/2] asm-generic: current: Don't include thread-info.h if building asm MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: asm-generic: current: Don't include thread-info.h if building asm Thread-Index: nVjiU4WyfVH2A7QVxS/nlClMU8OkNw== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "davidgow" > asm/current.h is included by some assembly files (either directly, or > indirectly). This works on some architectures (such as x86), as their > implementation of current.h is careful to not include any C, but the > asm-generic version includes linux/thread-info.h unconditionally, which > leads to errors when either C code or non-asm-compatible preprocessor > directives are included. > > Just wrap the contents behind an #ifndef __ASSEMBLY__ to avoid any C > code making its way in. > > Signed-off-by: David Gow > --- > > This is requrired for patch #2 here, as UML uses this asm-generic > header, but works with x86 assembly files which are expecting the x86 > current.h, which is assembly-friendly. > > --- > include/asm-generic/current.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/asm-generic/current.h b/include/asm-generic/current.h > index 3a2e224b9fa0..9c2aeecbd05a 100644 > --- a/include/asm-generic/current.h > +++ b/include/asm-generic/current.h > @@ -2,9 +2,11 @@ > #ifndef __ASM_GENERIC_CURRENT_H > #define __ASM_GENERIC_CURRENT_H > > +#ifndef __ASSEMBLY__ > #include > > #define get_current() (current_thread_info()->task) > #define current get_current() > +#endif > > #endif /* __ASM_GENERIC_CURRENT_H */ I'm fine with the UML side of this change but the generic part needs Arnd's ACK. Thanks, //richard