Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2301465pja; Thu, 26 Mar 2020 12:55:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuzd9ilqi2hDmCc4dLQP0YCmZCs9XB8UM/eizs6eUaD3adp9PH213LQxgtYeKV1Zo6vjeTn X-Received: by 2002:a9d:5e86:: with SMTP id f6mr4154807otl.238.1585252530476; Thu, 26 Mar 2020 12:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585252530; cv=none; d=google.com; s=arc-20160816; b=ca+QlLhwAVDJ39MoEvDu15panhsWtJ4KAuMVy4Akf0ynqFTaPbPJJ1lmcrAxj24gqR sAJ5YzLkn1vXxNhZ62BQy0U1TKZ10t1SVuSa8ryA8AHBCZnfKkQjNRN0fIN2UjFwxyCs 54Po5eOkb5+LMSgfkjahnyOR5kxGIiDUiWOwsWfSheJlT2YcvUxFojiA2F7oljmkXRfY YIoVSQhZZwUY+zAfZYHObuoDolaEQ5f59sHUFyTrJl8Dgri3Qanl2ANwlg0Fgmkokwty wP453r4Q6iX736vnsSxZKy9jt42jfyJoCMAUpyEcRonr8tYbysH1zc+DAu4S31tS+KIM 9k6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ec3bV7kfyncAdtBokCPztvFV6w0Rurp4KMKhkynRrbE=; b=VgNnno1tGfIGZtVt9GLWczTfjOYdcYS3CYz3lCjQ0eGlntTBn5CForp1qVkDkznGzP d2yaJi9a9iU7jsGFUQGIXyha5uwPmcvj3io+m3hGu89u8kMCJQKsL0bZGIHJsnWHGEuV Espi7DIacHwxiqfxC03BhVcxentVW+Qr4UIoW4DrzECI4qM3y2Au97M2XrWs8DXHutbK 5CatCMQdJJJoeumq6COsyyWTe5+/yq4p9x3G84dIB4bYBSI2DbBbSO1tgsEDvP/YWf1U nkTxUZAzTMzhiyG2KFVSPo/UKbzwYRy3kWSoj7nETwVKPmHNwL/7hAtEAaR5jnzfOp3o FrcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=wqxyOyNe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si1505332otc.58.2020.03.26.12.55.17; Thu, 26 Mar 2020 12:55:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=wqxyOyNe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728587AbgCZTyA (ORCPT + 99 others); Thu, 26 Mar 2020 15:54:00 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:34917 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727560AbgCZTyA (ORCPT ); Thu, 26 Mar 2020 15:54:00 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id e7128844; Thu, 26 Mar 2020 19:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=f1lz/GYg7MmJePg+lVSsCStJm3U=; b=wqxyOy NeaYX7S/Bf3CiXu6WxweGGWX1Hfa4F0YCmVxtZZenj6BFaEHcT/FL+g2VXrlWpjp WT22EOvuNl095TFGcln/LNho4QnbNf4lIL7ilDO0aXIMYwBHqoGaqvij8vUuQdjw tZDMhZHoN/evmNLuyINgvEGnxU7pjbS0slvQPhI8K94LyCMTL5O//nkpc0WXsDkD 5WDnNmI+SPwByl17mhH1Sbn3lAjpat2VMgDZHpMdAmK5bTT25g8OVj3S71RJc5Y2 hE+E0XLV5QnlcbIkD3yqZFvLcn0DKOSni0/9AsUO9tXyZ/wXVzJu9lZ/4wbp61QE UBZIuyHD4moYKtYg== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id f3fb72b3 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Thu, 26 Mar 2020 19:46:32 +0000 (UTC) Received: by mail-il1-f178.google.com with SMTP id 7so6624794ill.2; Thu, 26 Mar 2020 12:53:57 -0700 (PDT) X-Gm-Message-State: ANhLgQ3bTj0XaIl73u2eFyaAYfd8mthlqRj0Rax669Wmi93WAvLoGLse w766mjjKEA78EU9HpXBp/NZ7OPIzahVoqFEaOPk= X-Received: by 2002:a92:798f:: with SMTP id u137mr7565295ilc.231.1585252436484; Thu, 26 Mar 2020 12:53:56 -0700 (PDT) MIME-Version: 1.0 References: <20200326080104.27286-1-masahiroy@kernel.org> <20200326080104.27286-11-masahiroy@kernel.org> In-Reply-To: From: "Jason A. Donenfeld" Date: Thu, 26 Mar 2020 13:53:44 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 10/16] x86: probe assembler capabilities via kconfig instead of makefile To: Nick Desaulniers Cc: Masahiro Yamada , Linux Kbuild mailing list , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , "H . Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , clang-built-linux , Ingo Molnar , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2020 at 11:49 AM Nick Desaulniers wrote: > > On Thu, Mar 26, 2020 at 1:02 AM Masahiro Yamada wrote: > > > > From: "Jason A. Donenfeld" > > > > Doing this probing inside of the Makefiles means we have a maze of > > ifdefs inside the source code and child Makefiles that need to make > > proper decisions on this too. Instead, we do it at Kconfig time, like > > many other compiler and assembler options, which allows us to set up the > > dependencies normally for full compilation units. In the process, the > > ADX test changes to use %eax instead of %r10 so that it's valid in both > > 32-bit and 64-bit mode. > > Does KConfig generate -D flags for KBUILD_CFLAGS and KBUILD_AFLAGS? kconfig sticks everything it's got into include/generated/autoconf.h. That's how you're able to use all those #ifdef CONFIG_* macros already. This change moves things from a command line -D to the autoconf.h file. > Looks like lib/raid6/test/Makefile also generates some of these? raid6 has its own crazy thing going on. The test directory compiles that code for use in userspace. You might argue that its whole situation is non-standard and weird and should be reworked differently, but that seems like fodder for a different patchset on the linux-raid list.