Skip to content

Commit 767dea2

Browse files
Christoph Hellwigsuryasaimadhu
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 694cfd8 commit 767dea2

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

arch/x86/kernel/tboot.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
#include "../realmode/rm/wakeup.h"
3636

3737
/* Global pointer to shared data; NULL means no measured launch. */
38-
struct tboot *tboot __read_mostly;
39-
EXPORT_SYMBOL(tboot);
38+
static struct tboot *tboot __read_mostly;
4039

4140
/* timeout for APs (in secs) to enter wait-for-SIPI state during shutdown */
4241
#define AP_WAIT_TIMEOUT 1
@@ -46,6 +45,11 @@ EXPORT_SYMBOL(tboot);
4645

4746
static u8 tboot_uuid[16] __initdata = TBOOT_UUID;
4847

48+
bool tboot_enabled(void)
49+
{
50+
return tboot != NULL;
51+
}
52+
4953
void __init tboot_probe(void)
5054
{
5155
/* Look for valid page-aligned address for shared page. */

include/linux/tboot.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,7 @@ struct tboot {
121121
#define TBOOT_UUID {0xff, 0x8d, 0x3c, 0x66, 0xb3, 0xe8, 0x82, 0x4b, 0xbf,\
122122
0xaa, 0x19, 0xea, 0x4d, 0x5, 0x7a, 0x8}
123123

124-
extern struct tboot *tboot;
125-
126-
static inline int tboot_enabled(void)
127-
{
128-
return tboot != NULL;
129-
}
130-
124+
bool tboot_enabled(void);
131125
extern void tboot_probe(void);
132126
extern void tboot_shutdown(u32 shutdown_type);
133127
extern struct acpi_table_header *tboot_get_dmar_table(

0 commit comments

Comments
 (0)