From owner-svn-src-all@freebsd.org Tue Jul 31 15:08:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ED7C105C42A; Tue, 31 Jul 2018 15:08:04 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCA268E0D5; Tue, 31 Jul 2018 15:08:03 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9953615370; Tue, 31 Jul 2018 15:08:03 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6VF83fc047842; Tue, 31 Jul 2018 15:08:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6VF82vN047838; Tue, 31 Jul 2018 15:08:02 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807311508.w6VF82vN047838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 31 Jul 2018 15:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336971 - in head/sys: arm64/arm64 arm64/include dev/psci X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm64/arm64 arm64/include dev/psci X-SVN-Commit-Revision: 336971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2018 15:08:04 -0000 Author: andrew Date: Tue Jul 31 15:08:02 2018 New Revision: 336971 URL: https://svnweb.freebsd.org/changeset/base/336971 Log: 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 Modified: head/sys/arm64/arm64/cpu_errata.c head/sys/arm64/include/pcpu.h head/sys/dev/psci/smccc.c head/sys/dev/psci/smccc.h Modified: head/sys/arm64/arm64/cpu_errata.c ============================================================================== --- head/sys/arm64/arm64/cpu_errata.c Tue Jul 31 14:14:41 2018 (r336970) +++ head/sys/arm64/arm64/cpu_errata.c Tue Jul 31 15:08:02 2018 (r336971) @@ -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: Modified: head/sys/arm64/include/pcpu.h ============================================================================== --- head/sys/arm64/include/pcpu.h Tue Jul 31 14:14:41 2018 (r336970) +++ head/sys/arm64/include/pcpu.h Tue Jul 31 15:08:02 2018 (r336971) @@ -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 */ \ Modified: head/sys/dev/psci/smccc.c ============================================================================== --- head/sys/dev/psci/smccc.c Tue Jul 31 14:14:41 2018 (r336970) +++ head/sys/dev/psci/smccc.c Tue Jul 31 15:08:02 2018 (r336971) @@ -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)); } Modified: head/sys/dev/psci/smccc.h ============================================================================== --- head/sys/dev/psci/smccc.h Tue Jul 31 14:14:41 2018 (r336970) +++ head/sys/dev/psci/smccc.h Tue Jul 31 15:08:02 2018 (r336971) @@ -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_ */