Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp271788imn; Fri, 29 Jul 2022 06:29:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ChYsC6mgwVUcJ9VAMUb2L+Nd0llI6CWW7MOq4Ad8fAL80MJVUbeun9F5+RPDjq8O+fecQ X-Received: by 2002:a17:902:d642:b0:16b:d5b7:1117 with SMTP id y2-20020a170902d64200b0016bd5b71117mr3818633plh.167.1659101353971; Fri, 29 Jul 2022 06:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659101353; cv=none; d=google.com; s=arc-20160816; b=enccGzgQoZWHwnNVFr7MY5Dg9ATFg7evt3bKfjX3+K01v+S4Iasf77w/k/ZT2pcrbc bQKBY+J3DHcUBuea4g78ZlyKzf21mlHf/6TJB54Mwszgg1YdB6fZo53lsnFf7cTTruMR 4FcddObGJzwslqr1tjkzB8VuLEwiKo36+2a/rUsJ43oE9PlAWJ8AQi84jA2drur/1sgC qovc7HJFBdgz4J7RNz9G8eCKsheoIctjpuk7EX7EhetvCOkn0iUDbAdu3WIYLXy9AYOT +A/AR5zu3ZHm6LV2bwV9xsX2i9UBPLey3BSltzUhE2/B5QPfGyslk/Hk+1TtzxVS7Ghh Hv4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=1l3gCb2ITnVsJmSIV6t3KClLKLUa/VNdqTVHaVw67TY=; b=PTYxmGk1seKu6HyakbbuQQx1i+bBeZkSRDxEnOG+POF+Qa0LqveQe3JRTXCeUQYcYq GyYszUsdJElCH1uCpjLPEIfhugZyoeEpwsLHiig1eg4fg550nD+gFy9DtXSuWXatCFuz Q9xgh/sgMvMPeoEKYZaNlFmWA5t9VMDJFW+IhevUO0yJH2o1Pps3fHDgJNx/fv7tpk9p qKdHkHRsxJDdS9v5DoivyDmASgk+VpxRzUKgd9Na5ci2nVJjsNbhJN7ZTHhtGLBPgbgX pl9t8k4LC9AGN3lu0QD0K8r/qoeHN3z1byYCIkrlhsQrUZQK4TaSSNvP4eVx0pSEwrNm xubA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=pobXxGoe; dkim=neutral (no key) header.i=@suse.cz; 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 g21-20020a170902d1d500b0016b9cf35991si3590006plb.250.2022.07.29.06.28.58; Fri, 29 Jul 2022 06:29:13 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=pobXxGoe; dkim=neutral (no key) header.i=@suse.cz; 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 S235969AbiG2Mxw (ORCPT + 99 others); Fri, 29 Jul 2022 08:53:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230438AbiG2Mxu (ORCPT ); Fri, 29 Jul 2022 08:53:50 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AE113ED75 for ; Fri, 29 Jul 2022 05:53:48 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CA19F3490A; Fri, 29 Jul 2022 12:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1659099226; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1l3gCb2ITnVsJmSIV6t3KClLKLUa/VNdqTVHaVw67TY=; b=pobXxGoeMxvPX4wrp4BpHBToMhQCL+Itxo+AsTqbUw+Bndf+xKyJhgHqB2VaelDpWwy6/j AwgmjEJBMGvFfvHDklOe9Fn3XR5jyj61W6N/ga+Ac79QF5NbWukaNU+4xiX+f1IQX6uEGs UxCzCLfyi9nMUQLwfXkmnF/6rcI/AaA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1659099226; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1l3gCb2ITnVsJmSIV6t3KClLKLUa/VNdqTVHaVw67TY=; b=91Sn7KlNa84Cn+U0DGODc4uEh/4gjDTWGxspFHY0OXVd8+xeaqdZpjPIVAK1GHNYvnoub8 thfiQ1+F52aAc8AQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8AD9D13A8E; Fri, 29 Jul 2022 12:53:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id D26uHlrY42LIPQAAMHmgww (envelope-from ); Fri, 29 Jul 2022 12:53:46 +0000 Date: Fri, 29 Jul 2022 14:53:44 +0200 From: Petr Vorel To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , David Sterba Subject: Re: [PATCH v2 1/1] drivers/base/cpu: Print kernel arch Message-ID: Reply-To: Petr Vorel References: <20220729125141.12786-1-pvorel@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220729125141.12786-1-pvorel@suse.cz> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no 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 Hi all, > Print the machine hardware name (UTS_MACHINE) in /proc/sys/kernel/arch. > This helps people who debug kernel with initramfs with minimal > environment (i.e. without coreutils or even busybox) or allow to open > sysfs file instead of run 'uname -m' in high level languages. > Signed-off-by: Petr Vorel > --- Changes v1->v2: * Add file into /proc/sys/kernel/ (previously it was in /sys/devices/system/cpu/). There are * Update Documentation/ABI/ (Greg) Kind regards, Petr > Documentation/admin-guide/sysctl/kernel.rst | 5 +++++ kernel/utsname_sysctl.c > | 7 +++++++ 2 files changed, 12 insertions(+) > diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst > index ddccd1077462..70a0acf07101 100644 > --- a/Documentation/admin-guide/sysctl/kernel.rst > +++ b/Documentation/admin-guide/sysctl/kernel.rst > @@ -65,6 +65,11 @@ combining the following values: > 4 s3_beep > = ======= > +arch > +==== > + > +The machine hardware name, the same output as ``uname -m`` > +(e.g. ``x86_64`` or ``aarch64``). > auto_msgmni > =========== > diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c > index 4ca61d49885b..7ffdd2cd5ff9 100644 > --- a/kernel/utsname_sysctl.c > +++ b/kernel/utsname_sysctl.c > @@ -73,6 +73,13 @@ static DEFINE_CTL_TABLE_POLL(hostname_poll); > static DEFINE_CTL_TABLE_POLL(domainname_poll); > static struct ctl_table uts_kern_table[] = { > + { > + .procname = "arch", > + .data = init_uts_ns.name.machine, > + .maxlen = sizeof(init_uts_ns.name.machine), > + .mode = 0444, > + .proc_handler = proc_do_uts_string, > + }, > { > .procname = "ostype", > .data = init_uts_ns.name.sysname,