aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2018-07-31 15:08:02 +0000
committerAndrew Turner <andrew@FreeBSD.org>2018-07-31 15:08:02 +0000
commit100a6d1905b1bb510020e6fe3a535ebf5fc395e8 (patch)
tree5cffe0c838ccbb7325746aaa4e99d0aead49901e /sys
parent97df4fd15850a682e8b941d8cc41b80e61a195d9 (diff)
downloadsrc-100a6d1905b1bb510020e6fe3a535ebf5fc395e8.tar.gz
src-100a6d1905b1bb510020e6fe3a535ebf5fc395e8.zip
Use int for the pcpu_ssbd argument. This is included from userland and may
not include the needed headers to get the bool definition. Reported by: manu Pointy hat to: andrew Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=336971
Diffstat (limited to 'sys')
-rw-r--r--sys/arm64/arm64/cpu_errata.c4
-rw-r--r--sys/arm64/include/pcpu.h2
-rw-r--r--sys/dev/psci/smccc.c4
-rw-r--r--sys/dev/psci/smccc.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/sys/arm64/arm64/cpu_errata.c b/sys/arm64/arm64/cpu_errata.c
index c41f9169cf4f..08253f69f4a7 100644
--- a/sys/arm64/arm64/cpu_errata.c
+++ b/sys/arm64/arm64/cpu_errata.c
@@ -126,10 +126,10 @@ install_ssbd_workaround(void)
switch(ssbd_method) {
case SSBD_FORCE_ON:
- smccc_arch_workaround_2(true);
+ smccc_arch_workaround_2(1);
break;
case SSBD_FORCE_OFF:
- smccc_arch_workaround_2(false);
+ smccc_arch_workaround_2(0);
break;
case SSBD_KERNEL:
default:
diff --git a/sys/arm64/include/pcpu.h b/sys/arm64/include/pcpu.h
index fbe4310da2af..a1d12559bb78 100644
--- a/sys/arm64/include/pcpu.h
+++ b/sys/arm64/include/pcpu.h
@@ -36,7 +36,7 @@
#define ALT_STACK_SIZE 128
typedef int (*pcpu_bp_harden)(void);
-typedef int (*pcpu_ssbd)(bool);
+typedef int (*pcpu_ssbd)(int);
#define PCPU_MD_FIELDS \
u_int pc_acpi_id; /* ACPI CPU id */ \
diff --git a/sys/dev/psci/smccc.c b/sys/dev/psci/smccc.c
index b59bf659eec5..54673d431d4c 100644
--- a/sys/dev/psci/smccc.c
+++ b/sys/dev/psci/smccc.c
@@ -93,10 +93,10 @@ smccc_arch_workaround_1(void)
}
int
-smccc_arch_workaround_2(bool enable)
+smccc_arch_workaround_2(int enable)
{
KASSERT(smccc_version != SMCCC_VERSION_1_0,
("SMCCC arch workaround 2 called with an invalid SMCCC interface"));
- return (psci_call(SMCCC_ARCH_WORKAROUND_2, enable ? 1 : 0, 0, 0));
+ return (psci_call(SMCCC_ARCH_WORKAROUND_2, enable, 0, 0));
}
diff --git a/sys/dev/psci/smccc.h b/sys/dev/psci/smccc.h
index 223f688fa80e..5ff78655552d 100644
--- a/sys/dev/psci/smccc.h
+++ b/sys/dev/psci/smccc.h
@@ -69,7 +69,7 @@
int32_t smccc_arch_features(uint32_t);
int smccc_arch_workaround_1(void);
-int smccc_arch_workaround_2(bool);
+int smccc_arch_workaround_2(int);
#endif /* _PSCI_SMCCC_H_ */