Received: by 10.213.65.68 with SMTP id h4csp712188imn; Wed, 4 Apr 2018 06:06:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+SriATOt5DsE0UHgdRlTODcbOub6dkL3hk8DUn5E4QDDlmabZCT9A7ZixQlkbJIzKy+CIi X-Received: by 10.98.200.130 with SMTP id i2mr13672775pfk.221.1522847160541; Wed, 04 Apr 2018 06:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522847160; cv=none; d=google.com; s=arc-20160816; b=RH2Iq3rMFchCeGwiifmTWFtg+rjMan208gyvYsghURFh8VgwjNJWDB4AgPx9thcaf0 NcgGZc8ULHu14CBv23GYdDjIYAtTWZEKP7FOsZJNh5ssO1ZdHY4qI39ulQ4Ry++u6RLI 7RreN/WrzFi4J8tZE2/eJvu+KtySejo0Q2GHCPkJcdGdI3PNyDpACnM7wxAkbjEACjxC PQwlSiw7zNLcL1+o6io5LOlsnAToCn36kkDldXz+M5Fz5/XC8XIJpBP+E0NZmI+/n7GC Q3vAjrIwrX5Py18bQTFg5ML+dmnXIzUNlkptWeWNkKXRbmxHxpXq2dLLIspGbjcxyWq6 nEZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=daCG/P8nKej1ZgtEXWfngcjvo3jOA4/Eh96ZTDhtA+4=; b=e7H7MeFxF+I0Q/mCD01pHizRIc5aITPH9D7ZH3XYRA+0Fhqg3L5oH4vLBA+hERa2JG CVdgiZmO8rUT/BIguT6EU6/N3YA5LkKJa3Six4NF1T9XXzC5CxlAv8Db+QrqKdkUTwcT zPIZojdb/FkP7r7D2d7HGvqzD4/7ZTzCuivsKF+DWRV03oCGS+aLpfxabumAH7X9eeUQ e2jrPZdVY91IpGcELd9eD8oFAGim4WlFc0ze0QIQ1FHc3UpQtBNBm4RimtHE6lc4EDQR LhMZHhJCoCi0gNRhD4E+OhZ98qs6Hq1bPB+C0YncvhWvwYsptDh9/9BxaSlQLXYcWbLG lsNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZhdfQsyV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si5248044plz.76.2018.04.04.06.05.46; Wed, 04 Apr 2018 06:06:00 -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=@amarulasolutions.com header.s=google header.b=ZhdfQsyV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbeDDNEK (ORCPT + 99 others); Wed, 4 Apr 2018 09:04:10 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:40509 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbeDDNEG (ORCPT ); Wed, 4 Apr 2018 09:04:06 -0400 Received: by mail-wr0-f193.google.com with SMTP id n2so19208235wrj.7 for ; Wed, 04 Apr 2018 06:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=daCG/P8nKej1ZgtEXWfngcjvo3jOA4/Eh96ZTDhtA+4=; b=ZhdfQsyVLHZDgvLpmFrgCjfiuNxGIz5N42ruXNYRVYcFStPsXeVyYDi6NJ33cHlYw7 wpvQh3xAVZUbFwBAYMh2aLUE0COZ9OLq/aELDqDCr7Vsxs1wo07Mc5uEwWNhaNKIya3k ymcL/uZsXGjpGWNJIuEXgXqO4sIaSKG+Jrf0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=daCG/P8nKej1ZgtEXWfngcjvo3jOA4/Eh96ZTDhtA+4=; b=RaJuj3Q07J0gDjij7ynk8yeVk1j58Yeltpdjm+TXBHU3XIWxrFwbrlFOVlwpEJ0nb3 1nubFIHEqC2oUU9VEInjltGcWxo5r7ojCECXEtW1HFjh7o6w/O0IlMB50RHl7//LZ2QB LRMEWW87IA1sxoFqRAIAYeae20tPQtj1KOMajz/9RF7hBKPQSe9f+colCvaJo/adEzQ4 qqt6KxqqjuSMd2Y9X0r+FfwYS/RU5aetA0A9i+X66sK6lwNGPYLdNFgwEt7R+kDrp3T1 UOwtB+mgW7Sc8riO0FndwHRxk8H2fNbh4xPqGb1QiGSGFq77gpqDDwOKzydo5UQqqchv kjCw== X-Gm-Message-State: AElRT7F1s9dFuT+fWVAxoxvi7iaaE5qciulvRhqelYx2Rn/3K3SwBiPh dX3nvEKBGAs3bNUl+K0XJDWwwg== X-Received: by 10.223.176.237 with SMTP id j42mr13525031wra.25.1522847045246; Wed, 04 Apr 2018 06:04:05 -0700 (PDT) Received: from andrea ([213.209.242.222]) by smtp.gmail.com with ESMTPSA id k14sm6092425wrc.62.2018.04.04.06.04.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 06:04:04 -0700 (PDT) Date: Wed, 4 Apr 2018 15:03:57 +0200 From: Andrea Parri To: Ingo Molnar Cc: Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, Andrew Morton Subject: Re: [RFC PATCH 0/3] Documentation/features: Provide and apply "features-refresh.sh" Message-ID: <20180404130357.GA9125@andrea> References: <1522774551-9503-1-git-send-email-andrea.parri@amarulasolutions.com> <20180404045632.uniwfrl32bjmsn5g@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180404045632.uniwfrl32bjmsn5g@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 04, 2018 at 06:56:32AM +0200, Ingo Molnar wrote: > > * Andrea Parri wrote: > > > In Ingo's words [1]: > > > > "[...] what should be done instead is to write a script that refreshes > > all the arch-support.txt files in-place. [...] > > > > It's OK for the script to have various quirks for weirdly implemented > > features and exceptions: i.e. basically whenever it gets a feature wrong, > > we can just tweak the script with quirks to make it all work out of box. > > > > [...] But in the end there should only be a single new script: > > > > Documentation/features/scripts/features-refresh.sh > > > > ... which operates on the arch-support.txt files and refreshes them in > > place, and which, after all the refreshes have been committed, should > > produce an empty 'git diff' result." > > > > "[...] New features can then be added by basically just creating a > > header-only arch-support.txt file, such as: > > > > triton:~/tip/Documentation/features> cat foo/bar/arch-support.txt > > # > > # Feature name: shiny new fubar kernel feature > > # Kconfig: ARCH_USE_FUBAR > > # description: arch supports the fubar feature > > # > > > > And running Documentation/features/scripts/features-refresh.sh would > > auto-generate the arch support matrix. [...] > > > > This way we soft- decouple the refreshing of the entries from the > > introduction of the features, while still making it all easy to keep > > sync and to extend." > > > > This RFC presents a first attempt to implement such a feature/script, and > > applies it script on top of Arnd's: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git arch-removal > > > > Patch 1/3 provides the "features-refresh.sh" script. Patch 2/3 removes the > > "BPF-JIT" feature file and it creates header-only files for "cBPF-JIT" and > > "eBPF-JIT". Patch 3/3 presents the results of running the script; this run > > also printed to standard output the following warnings: > > > > WARNING: '__HAVE_ARCH_STRNCASECMP' is not a valid Kconfig > > WARNING: 'Optimized asm/rwsem.h' is not a valid Kconfig > > WARNING: '!ARCH_USES_GETTIMEOFFSET' is not a valid Kconfig > > WARNING: '__HAVE_ARCH_PTE_SPECIAL' is not a valid Kconfig > > > > (I'm sending these patches with empty commit messagges, for early feedback: > > I'll fill in these messages in subsequent versions if this makes sense...) > > > > Cheers, > > Andrea > > > > Andrea Parri (3): > > Documentation/features: Add script that refreshes the arch support status files in place > > Documentation/features/core: Add arch support status files for 'cBPF-JIT' and 'eBPF-JIT' > > Documentation/features: Refresh and auto-generate the arch support status files in place > > Ok, this series is really impressive at its RFC stage already! > > Beyond fixing those warnings, I'd also suggest another change: please make the > new BPF features patch the last one, so that the 'refresh' patch shows how much > original bit-rot we gathered recently. > > The 'new features' patch should then also include the result of also running the > script, i.e. a single patch adding the base fields and the generated parts as > well. That will be the usual development flow anyway - people won't do two-part > patches just to show which bits are by hand and which are auto-generated. Yes, I'll do. Let me ask some hints about the warnings, as I'm not sure how to 'fix' them; we have: a) __HAVE_ARCH_STRNCASECMP __HAVE_ARCH_PTE_SPECIAL b) Optimized asm/rwsem.h c) !ARCH_USES_GETTIMEOFFSET For (c), I see two options: 1. replace that with 'ARCH_USES_GETTIMEOFFSET' (and update the status matrix accordingly) 2. add logics/code to the script to handle simple boolean expressions (mmh, this could get nasty really soon... let's say: limiting to a leading '!', to start with ;) For (a), I realize that 'grep-ing' the macros in arch-specific _sources_ does serve the purpose of producing the hard-coded status matrices; but is this a reasonable approach? (e.g., can produce 'false-positives'?) What could it be a suitable solution for (b)? are there Kconfig options which I could in place of that expression? some other suggestion? Thanks, Andrea > > Thanks, > > Ingo