From patchwork Wed May 8 01:30:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 1096640 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44zJqL1LNjz9s4Y for ; Wed, 8 May 2019 11:31:58 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=neuling.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=neuling.org header.i=@neuling.org header.b="afWhlewF"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44zJqK70s8zDqMy for ; Wed, 8 May 2019 11:31:57 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44zJp06CL5zDqL2 for ; Wed, 8 May 2019 11:30:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=neuling.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=neuling.org header.i=@neuling.org header.b="afWhlewF"; dkim-atps=neutral Received: from neuling.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 44zJp02dZMz9s3l; Wed, 8 May 2019 11:30:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neuling.org; s=201811; t=1557279048; bh=4PVY2bZ7JdKhxRG+2PP4o9feJP3Y71cclUeVMdw8qUY=; h=From:To:Cc:Subject:Date:From; b=afWhlewFpiBP9Mf9iRbpBibBx1cm48lVOhKT/06q/5A8ZiNDodZjD5fIaDkJZw6rW imqRY8YFSGVHBMJ8zfZS7bLTNlnKejIUG0R6FD8/02W6hPqECQcFgIygenosU390rX T+Yv3VCCxV7GvyuFThkdg1POVso+qUD5XoN6MDye7r89by+NODJl8mRDnGy8BC2ey/ vQcCIKn4TbMGh76SU+A17a374X+VSstYXGw/J7NcF3rL1rpVg0bCXonpIRMCU0TcCw BQ9e31bUrWURV+hps8tKJo4IiAg/Tns6Txtt7/JB7k8tQlDIEwbHoAuzJXwF5B7VQP Pxj6L4kwUASpA== Received: by neuling.org (Postfix, from userid 1000) id 39B3C2A051F; Wed, 8 May 2019 11:30:48 +1000 (AEST) From: Michael Neuling To: mpe@ellerman.id.au Subject: [PATCH] powerpc: Fix compile issue with force DAWR Date: Wed, 8 May 2019 11:30:47 +1000 Message-Id: <20190508013047.12850-1-mikey@neuling.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikey@neuling.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" If you compile with KVM but without CONFIG_HAVE_HW_BREAKPOINT you fail at linking with: arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x708): undefined reference to `dawr_force_enable' This was caused by this recent patch: commit c1fe190c06723322f2dfac31d3b982c581e434ef Author: Michael Neuling powerpc: Add force enable of DAWR on P9 option This builds dawr_force_enable in always via a new file. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/dawr.c | 11 +++++++++++ arch/powerpc/kernel/hw_breakpoint.c | 3 --- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 arch/powerpc/kernel/dawr.c diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 0ea6c4aa3a..48a20ef5be 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -49,7 +49,7 @@ obj-y := cputable.o ptrace.o syscalls.o \ signal.o sysfs.o cacheinfo.o time.o \ prom.o traps.o setup-common.o \ udbg.o misc.o io.o misc_$(BITS).o \ - of_platform.o prom_parse.o + of_platform.o prom_parse.o dawr.o obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ signal_64.o ptrace32.o \ paca.o nvram_64.o firmware.o diff --git a/arch/powerpc/kernel/dawr.c b/arch/powerpc/kernel/dawr.c new file mode 100644 index 0000000000..ca343efd23 --- /dev/null +++ b/arch/powerpc/kernel/dawr.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// DAWR global variables +// +// Copyright 2019, Michael Neuling, IBM Corporation. + +#include +#include + +bool dawr_force_enable; +EXPORT_SYMBOL_GPL(dawr_force_enable); diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index da307dd93e..78a17454f4 100644 --- a/arch/powerpc/kernel/hw_breakpoint.c +++ b/arch/powerpc/kernel/hw_breakpoint.c @@ -381,9 +381,6 @@ void hw_breakpoint_pmu_read(struct perf_event *bp) /* TODO */ } -bool dawr_force_enable; -EXPORT_SYMBOL_GPL(dawr_force_enable); - static ssize_t dawr_write_file_bool(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos)