From owner-dev-commits-src-main@freebsd.org Wed Jan 13 16:42:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0FEB4E1D5F; Wed, 13 Jan 2021 16:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGCt26VQ4z4vfB; Wed, 13 Jan 2021 16:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D24AB1AB9E; Wed, 13 Jan 2021 16:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10DGgolF055397; Wed, 13 Jan 2021 16:42:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10DGgo7L055396; Wed, 13 Jan 2021 16:42:50 GMT (envelope-from git) Date: Wed, 13 Jan 2021 16:42:50 GMT Message-Id: <202101131642.10DGgo7L055396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 594389d1de64 - main - Create a stack frame when needed in the arm64 kernel MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 594389d1de647cbda3cb36f06c06d3f73b190e82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 16:42:51 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=594389d1de647cbda3cb36f06c06d3f73b190e82 commit 594389d1de647cbda3cb36f06c06d3f73b190e82 Author: Andrew Turner AuthorDate: 2021-01-12 14:18:59 +0000 Commit: Andrew Turner CommitDate: 2021-01-13 16:36:52 +0000 Create a stack frame when needed in the arm64 kernel When building the arm64 kernel for use with dtrace or hwpmc we need to include a stack frame so they can extract a stack trace. As with amd64 also build a stack frame in modules. Sponsored by: Innovate UK --- sys/conf/Makefile.arm64 | 2 +- sys/conf/kmod.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 1f5760021f3e..d48826197dbd 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -45,7 +45,7 @@ SYSTEM_LD= \ KERNEL_EXTRA+= ${KERNEL_KO}.bin KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin -.if !empty(DDB_ENABLED) +.if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index b7ba121925ea..c245f447cefb 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -146,7 +146,7 @@ LDFLAGS+= --build-id=sha1 .endif CFLAGS+= ${DEBUG_FLAGS} -.if ${MACHINE_CPUARCH} == amd64 +.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif