Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2745098pxu; Mon, 7 Dec 2020 14:40:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZnCMzb8V7M3wwM6iFAdr6HSICSHDQkr1HMH/l+M5LCS3X9jzOjjbKhRXTQgliH5UaS4pr X-Received: by 2002:aa7:d511:: with SMTP id y17mr17785351edq.249.1607380809100; Mon, 07 Dec 2020 14:40:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607380809; cv=none; d=google.com; s=arc-20160816; b=tf/sHkI1DGmolhVsYtXfK4iAw8UsU/mbKNjwGWBFt9pfYStqF2MPQDeB+K7o9x+z2A oXTcxAFx0Cpet58DWjtvlYHa1p/uOLKU6/rMWFm8fLc3aRe2LRRiMchpylM/GVlWT5Wc 566evML1d3asR/SVX+ioMXLEh+FFn6REz3vqo3CGZKw+wFbjH0iUaON5TDx0/JEw/0WL y3TfFQevt7DSabSJ9t2hG6szCx8iM815DyeN/SZIXVZC2b9VB1LDqHFhcW6Ghz4KHLLB Fdg+XbzYoDtV+hd+PB7GGUksVT+VaVUSpvA4hcwuZSJenXc0rMYrwpUKfLVFjPhqraqP h50Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=bghgC8s1RZpcGCj7iPmhAPelRLZ5y+oqGwRK63rNvoU=; b=jxAxOp9ExfBauTMQqNi+PAU4iIbfpG9a70gC8q5qJYDPzstWPZCAvBv4/iBhYvAKd0 0TryJS2lSviIQlbaLEnx2H38cugLhnqpgQWNt5v0lU1OprTgOMttQ/LVBPEVTAuxQ/iI mzKbjODg+HdEGZMOpe47tv0IGrFS3O08E1A5u27AWoxWKv2U0fIBOGvjBoEOQ2Ujdte8 qMk5HldgqDaimexvA2kkx+8ozdqhXTFlxtSmw+foLxGSaVPf9kc4qDNRuLNR/N3xeJCC fokFY56wS6xUWLO/HZXm6NEK8wtYKv1DQtPM/9ghvjdJeoWqfuuPmVZad2NPr6g2wphF HNrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZQXaYFr9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=hmVpTaWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si8914767edn.50.2020.12.07.14.39.45; Mon, 07 Dec 2020 14:40:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZQXaYFr9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=hmVpTaWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727905AbgLGWi0 (ORCPT + 99 others); Mon, 7 Dec 2020 17:38:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727662AbgLGWiZ (ORCPT ); Mon, 7 Dec 2020 17:38:25 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3774FC061793; Mon, 7 Dec 2020 14:37:45 -0800 (PST) Date: Mon, 07 Dec 2020 22:37:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607380663; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bghgC8s1RZpcGCj7iPmhAPelRLZ5y+oqGwRK63rNvoU=; b=ZQXaYFr9JVmccDrmDNEb+9JVbqaZurVuHCkbdDe2AUc8ougOhcD8LmrwBBGhyTGEiz3a9y yCHQIXK2wDEYaBEEo7M+Vyx4GijySQ0wxDBZTE6gYvkPNGmOmZw71NuwL7+jWLX/QeL3pN ImU5w35vKWCDhbsV7I+qVu9ZKCFcOPULVCoAQXnSc+QFxxisux24seYozt5y9EeDRqTz5T LMtDi5YbXmtdMLZ/tg4momIs/z507z9bKXjWTd/m36lvoSXuVLuWDwJgzUegKPFpVFQwv2 hLgdMFq8Lfrf/4u99Icubx9klfBUn3I5+d0JX3NMjYx9afZwO7uf9CDUiSGx/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607380663; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bghgC8s1RZpcGCj7iPmhAPelRLZ5y+oqGwRK63rNvoU=; b=hmVpTaWJFshl3fJArBd3tneT9Xxsn4Oy9XmWLtHvUQCRJ98y/Ku0xGkRbXxli7j6Jqm1Pt ayOG5LYFkJY1CFCA== From: "tip-bot2 for Mike Travis" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/platform] x86/platform/uv: Add sysfs leaves to replace those in procfs Cc: Mike Travis , Borislav Petkov , Steve Wahl , Hans de Goede , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20201128034227.120869-3-mike.travis@hpe.com> References: <20201128034227.120869-3-mike.travis@hpe.com> MIME-Version: 1.0 Message-ID: <160738066283.3364.14396167239614008322.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/platform branch of tip: Commit-ID: 612a0063c9ba3aba79b9006faa0edad5f9d41162 Gitweb: https://git.kernel.org/tip/612a0063c9ba3aba79b9006faa0edad5f9d41162 Author: Mike Travis AuthorDate: Fri, 27 Nov 2020 21:42:24 -06:00 Committer: Borislav Petkov CommitterDate: Mon, 07 Dec 2020 19:49:01 +01:00 x86/platform/uv: Add sysfs leaves to replace those in procfs Add uv_sysfs leaves to display the info. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201128034227.120869-3-mike.travis@hpe.com --- drivers/platform/x86/uv_sysfs.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/platform/x86/uv_sysfs.c b/drivers/platform/x86/uv_sysfs.c index c27f5ff..922d32f 100644 --- a/drivers/platform/x86/uv_sysfs.c +++ b/drivers/platform/x86/uv_sysfs.c @@ -736,17 +736,35 @@ static ssize_t uv_type_show(struct kobject *kobj, return scnprintf(buf, PAGE_SIZE, "%s\n", uv_type_string()); } +static ssize_t uv_archtype_show(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) +{ + return uv_get_archtype(buf, PAGE_SIZE); +} + +static ssize_t uv_hub_type_show(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) +{ + return scnprintf(buf, PAGE_SIZE, "0x%x\n", uv_hub_type()); +} + static struct kobj_attribute partition_id_attr = __ATTR(partition_id, 0444, partition_id_show, NULL); static struct kobj_attribute coherence_id_attr = __ATTR(coherence_id, 0444, coherence_id_show, NULL); static struct kobj_attribute uv_type_attr = __ATTR(uv_type, 0444, uv_type_show, NULL); +static struct kobj_attribute uv_archtype_attr = + __ATTR(archtype, 0444, uv_archtype_show, NULL); +static struct kobj_attribute uv_hub_type_attr = + __ATTR(hub_type, 0444, uv_hub_type_show, NULL); static struct attribute *base_attrs[] = { &partition_id_attr.attr, &coherence_id_attr.attr, &uv_type_attr.attr, + &uv_archtype_attr.attr, + &uv_hub_type_attr.attr, NULL, };