Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4001309ybz; Tue, 28 Apr 2020 04:09:01 -0700 (PDT) X-Google-Smtp-Source: APiQypJ84bQ4zmY9+jUVe0f9BYI0nhKknfW42XaOrYxQCosDraeTLWX94Up/mQsuZckF8kFJrICO X-Received: by 2002:a17:906:1a06:: with SMTP id i6mr23528578ejf.90.1588072141617; Tue, 28 Apr 2020 04:09:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588072141; cv=none; d=google.com; s=arc-20160816; b=RvMgI9ZfxON/Hkb/VhyIFSsCIjYYGSE87iu/WyeiFttirPStW3BxL+S3K5hyLLGYPc 0DdEI3XZH6xdEpUwb4sgSaI9ea5vhiCpZOBhmRvJIiTuXNgnA0MIqMf1zUd/Z+LMmgN7 XtjSTU3liqGp6xJmCNR3MKtZV35cbfCQ8KeUtQ19tTwN8Tqce07zSHvpwACfG4MSOya/ MbnOjYl7lkh/u+mJWmijsR2qfaOdagWalmRwzqwO9+itcPdhi9QAhDmifI1G7iOba9yJ Te4DRCq0LpeoDzPzOHuLFrQD4E5JO/vuwFttir+7EOQCewSDFjU5IPrKY0t0qNGIr7Jd 8EVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=c/9qnr+obawEqau2zFEmFNTL9+u2ZCtZheFxnn5/i1w=; b=yGMmHWeehqr0qpe5Bynj/O+Dn3+IK/yrYnZLgMEIoKjKf+Anf2pIptFkzZT/9mqQTB BMr7Foind8ZNtiq4VHZxkXTBSDbh1bZI8DDG9nkMzojUcBLQRCkRU7tZQXoJXylZTNr8 QZ4//0DROKzXi5UmMBD6to1higvbSRkXk26ST6GhqVT5lq9VkeaQR5WB0Wx+bPebMaS7 EG7LYOtfr/AUXRsV8aLYq95x4NTguA65y5OTkNRS2W6UXhg/usm1/Nfqfz8+yrIVQCmo +fdqfrxTGCQUomY2dblI6ADlW9TOOwaW78Op4oLTxYqDJohHXg+t5x4RAA8AJAo8dpmr u3QA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si1320652edb.355.2020.04.28.04.08.34; Tue, 28 Apr 2020 04:09:01 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726474AbgD1LGj (ORCPT + 99 others); Tue, 28 Apr 2020 07:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726345AbgD1LGj (ORCPT ); Tue, 28 Apr 2020 07:06:39 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E454FC03C1A9; Tue, 28 Apr 2020 04:06:38 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jTO4Q-0007uN-9e; Tue, 28 Apr 2020 13:06:34 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id DA53E1C010B; Tue, 28 Apr 2020 13:06:33 +0200 (CEST) Date: Tue, 28 Apr 2020 11:06:33 -0000 From: "tip-bot2 for Christoph Hellwig" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/tboot: Mark tboot static Cc: Christoph Hellwig , Borislav Petkov , x86 , LKML In-Reply-To: <20200428051703.1625952-1-hch@lst.de> References: <20200428051703.1625952-1-hch@lst.de> MIME-Version: 1.0 Message-ID: <158807199339.28353.3171896201372652846.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/boot branch of tip: Commit-ID: 767dea211cd0c68d8116d8c3b5104e82454fb44b Gitweb: https://git.kernel.org/tip/767dea211cd0c68d8116d8c3b5104e82454fb44b Author: Christoph Hellwig AuthorDate: Tue, 28 Apr 2020 07:17:03 +02:00 Committer: Borislav Petkov CommitterDate: Tue, 28 Apr 2020 11:05:44 +02:00 x86/tboot: Mark tboot static This structure is only really used in tboot.c. The only exception is a single tboot_enabled check, but for that we don't need an inline function. Signed-off-by: Christoph Hellwig Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200428051703.1625952-1-hch@lst.de --- arch/x86/kernel/tboot.c | 8 ++++++-- include/linux/tboot.h | 8 +------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c index b89f6ac..b2942b2 100644 --- a/arch/x86/kernel/tboot.c +++ b/arch/x86/kernel/tboot.c @@ -35,8 +35,7 @@ #include "../realmode/rm/wakeup.h" /* Global pointer to shared data; NULL means no measured launch. */ -struct tboot *tboot __read_mostly; -EXPORT_SYMBOL(tboot); +static struct tboot *tboot __read_mostly; /* timeout for APs (in secs) to enter wait-for-SIPI state during shutdown */ #define AP_WAIT_TIMEOUT 1 @@ -46,6 +45,11 @@ EXPORT_SYMBOL(tboot); static u8 tboot_uuid[16] __initdata = TBOOT_UUID; +bool tboot_enabled(void) +{ + return tboot != NULL; +} + void __init tboot_probe(void) { /* Look for valid page-aligned address for shared page. */ diff --git a/include/linux/tboot.h b/include/linux/tboot.h index 5424bc6..c7e4247 100644 --- a/include/linux/tboot.h +++ b/include/linux/tboot.h @@ -121,13 +121,7 @@ struct tboot { #define TBOOT_UUID {0xff, 0x8d, 0x3c, 0x66, 0xb3, 0xe8, 0x82, 0x4b, 0xbf,\ 0xaa, 0x19, 0xea, 0x4d, 0x5, 0x7a, 0x8} -extern struct tboot *tboot; - -static inline int tboot_enabled(void) -{ - return tboot != NULL; -} - +bool tboot_enabled(void); extern void tboot_probe(void); extern void tboot_shutdown(u32 shutdown_type); extern struct acpi_table_header *tboot_get_dmar_table(