Received: by 10.213.65.68 with SMTP id h4csp3745338imn; Tue, 3 Apr 2018 09:59:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/MaqqDnAo9i4reiqeuekOx1AUw3R9wRDOtbQEijPIaHhBVBSWIjsZkViqaGOVhfvafsdhx X-Received: by 2002:a17:902:9a88:: with SMTP id w8-v6mr14903443plp.29.1522774754359; Tue, 03 Apr 2018 09:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522774754; cv=none; d=google.com; s=arc-20160816; b=w6MQnxX6FzsM5BKh8GCjtArUGv6fvgB7y9yNup5hjKRx1i9/zLnejpi48mHpYlg6x8 zdA3u0kxtnGhVSVsHjj8P4t94/JgXELwR5ivdNqc7Oec8LU753EDtSj6QhdHMD91MfAp gxNjItrtCxrG90HOWvam+lK60L9zuqghWqp97HCVRiDqtwLGjxBTIxnh+qZNN+k2+jqQ vJ5WS3Xu2Tgmk144aQApSNaFLQxkH0sBApsxYaLVHkbrQuxliueOE/bA5CEmlzQgvaza 8ndaEY0kYCEXPfpSYmTbKmJZkdL5HVLeLgntkaG5TmeUloGbtEuHgRO63xJriYz4GVIh KFzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=rxtnUI3p1GsBtqRp2B3JxIfOOkXoEl068vMKrmiCCxI=; b=WUK0wfjo+xPDY3DtG8kXChPv0gz2EdmQiDPTYFITBa3DRhshRm2PeUjY0e9DUYSOc3 798Qw3EOQs2Sbupy2+vRPvMvYZioojwl9c+nueFkHetVyK/O3JJ/4SN5CouStt2zcEhz X4L+AZXHcUgZqrDbP0xjrbdojBWL5JZq7XBiKKs9AyKJrHAXRVwcgaiEj4YbEwcapBsp 303ocR4Poip+HJ3BbGbH8JOysNOXdRfx6QY0Z0xbUVDswCBfL+FdrNtqFzQFCNfm8OSo IDt6pXiwyKF79KVSV4PXhfLcs53zTLz5YukW0/Nh4dugiTnOO8GKkX2+dNeykBrS7ARp l23Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dQ6a9gJC; 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 z3-v6si915515plb.114.2018.04.03.09.59.00; Tue, 03 Apr 2018 09:59:14 -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=dQ6a9gJC; 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 S1752752AbeDCQ4j (ORCPT + 99 others); Tue, 3 Apr 2018 12:56:39 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:51768 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675AbeDCQ4e (ORCPT ); Tue, 3 Apr 2018 12:56:34 -0400 Received: by mail-wm0-f67.google.com with SMTP id v21so35205460wmc.1 for ; Tue, 03 Apr 2018 09:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rxtnUI3p1GsBtqRp2B3JxIfOOkXoEl068vMKrmiCCxI=; b=dQ6a9gJCYxhdgR6A7+8XVUle+yr/6xsLKKsSc5yZnkX5yah01298MkXORGVzIJbtCV XSrXBcFlbRFg8SCv444jW49Oe/4yZq/tGjcx7vb9d7teN3t7CF4ag5Wmbm5Q0rsCxMfp JsaTICXOrWuA2BYuhvNvdkSZozChy5eNvOKLg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rxtnUI3p1GsBtqRp2B3JxIfOOkXoEl068vMKrmiCCxI=; b=VSbWw6dNiv159l8/picjGmslXCwziPiLaMSHfbjYcFGv5cpaJvdjlyU2D+s9KJ8kMS 9VwgqgaBNgDLTtZ7XZ690AjMt/KKZPy3pWVyrfwk9N/HYrr7EggwU3CjlALBkXIfUkj/ 4geQNEX/DikfBpLngHxCfyXa/RifOsViwgCrzN8NjOQ3s2G1t2baN3KGIdYWypFSRqxk BSQ+2Ke/SwlxNFvcXy+3IFUNU2CMkjPHSIQ0YiOk2ky8FJZmZIFtJhrw/pSBSGgUHqNZ GELQ4PrrbIYHfHJldDqlKcgcLfdhniN/a9RdKC7a+EBEBct/Db85jANaUsfJ5vFfPpRY 2w8Q== X-Gm-Message-State: ALQs6tC1YmK6ZVgWYwvqEPZAwpxtdTBP4lZbixUuWCOAlj0J2fxzLM5F CWAWNn9zteDN7ykZpqT8Uno2Ow== X-Received: by 10.28.124.13 with SMTP id x13mr4329891wmc.71.1522774593624; Tue, 03 Apr 2018 09:56:33 -0700 (PDT) Received: from localhost.localdomain ([213.209.242.222]) by smtp.gmail.com with ESMTPSA id 135sm1653885wmv.12.2018.04.03.09.56.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Apr 2018 09:56:33 -0700 (PDT) From: Andrea Parri To: Ingo Molnar , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, Andrea Parri Subject: [PATCH 1/3] Documentation/features: Add script that refreshes the arch support status files in place Date: Tue, 3 Apr 2018 18:55:49 +0200 Message-Id: <1522774551-9503-2-git-send-email-andrea.parri@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522774551-9503-1-git-send-email-andrea.parri@amarulasolutions.com> References: <1522774551-9503-1-git-send-email-andrea.parri@amarulasolutions.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Suggested-by: Ingo Molnar Signed-off-by: Andrea Parri --- Documentation/features/scripts/features-refresh.sh | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 Documentation/features/scripts/features-refresh.sh diff --git a/Documentation/features/scripts/features-refresh.sh b/Documentation/features/scripts/features-refresh.sh new file mode 100755 index 0000000000000..ae3e9d5d3f262 --- /dev/null +++ b/Documentation/features/scripts/features-refresh.sh @@ -0,0 +1,55 @@ +# +# Small script that refreshes the kernel feature support status in place. +# + +for F_FILE in Documentation/features/*/*/arch-support.txt; do + K=$(grep "^# Kconfig:" "$F_FILE" | cut -c26-) + K_VALID="false" # K is 'valid' iff there exists a Kconfig file + # (for some arch) containing K. + + for ARCH_DIR in arch/*/; do + K_FILES=$(find $ARCH_DIR -name "Kconfig*") + + K_GREP=$(grep "$K" $K_FILES) + if [ ! -z "$K_GREP" ]; then + K_VALID="true" + break + fi + done + + if [ "$K_VALID" = "false" ]; then + printf "WARNING: '%s' is not a valid Kconfig\n" "$K" + fi + + T_FILE="$F_FILE.tmp" + + grep "^#" $F_FILE > $T_FILE + echo " -----------------------" >> $T_FILE + echo " | arch |status|" >> $T_FILE + echo " -----------------------" >> $T_FILE + + for ARCH_DIR in arch/*/; do + ARCH=$(echo $ARCH_DIR | sed -e 's/arch//g' | sed -e 's/\///g') + K_FILES=$(find $ARCH_DIR -name "Kconfig*") + + K_GREP=$(grep "$K" $K_FILES) + if [ ! -z "$K_GREP" ]; then + # K is 'supported by a given arch', if there exists + # a Kconfig file for this arch containing K. + printf " |%12s: | ok |\n" "$ARCH" >> $T_FILE + else + # ... Otherwise: Keep the original status (if any); + # default to "not yet supported". + S=$(grep -v "^#" "$F_FILE" | grep " $ARCH:") + if [ ! -z "$S" ]; then + echo "$S" >> $T_FILE + else + printf " |%12s: | TODO |\n" "$ARCH" \ + >> $T_FILE + fi + fi + done + + echo " -----------------------" >> $T_FILE + mv $T_FILE $F_FILE +done -- 2.7.4