Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/s390/kernel/facility.c
26424 views
1
// SPDX-License-Identifier: GPL-2.0
2
/*
3
* Copyright IBM Corp. 2023
4
*/
5
6
#include <linux/export.h>
7
#include <asm/facility.h>
8
9
unsigned int stfle_size(void)
10
{
11
static unsigned int size;
12
unsigned int r;
13
u64 dummy;
14
15
r = READ_ONCE(size);
16
if (!r) {
17
r = __stfle_asm(&dummy, 1) + 1;
18
WRITE_ONCE(size, r);
19
}
20
return r;
21
}
22
EXPORT_SYMBOL(stfle_size);
23
24