From e35d312a77fbaeab9e87f2005499450320c9d010 Mon Sep 17 00:00:00 2001 From: Satyajit Desai Date: Thu, 26 Jan 2017 14:22:16 -0800 Subject: coresight: Add NULL pointer check for build paths Fail the path building if we end up without a valid device in our build path either due to incorrect device tree or an incorrect defconfig. Change-Id: I89b6b8544234251e10ebd4e1338b639685a9ff93 Signed-off-by: Satyajit Desai --- drivers/hwtracing/coresight/coresight.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index c34599c0594d..9b0cc7baca73 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2016 The Linux Foundation. All rights reserved. +/* Copyright (c) 2012, 2016-2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -309,6 +309,9 @@ static int coresight_build_paths(struct coresight_device *csdev, int i, ret = -EINVAL; struct coresight_connection *conn; + if (!csdev) + return ret; + list_add(&csdev->path_link, path); if ((csdev->type == CORESIGHT_DEV_TYPE_SINK || -- cgit v1.2.3 From e11aa6adb6664ef03c212912553c44f3f6b43492 Mon Sep 17 00:00:00 2001 From: Satyajit Desai Date: Fri, 27 Jan 2017 16:34:48 -0800 Subject: defconfig: arm64: Add coresight TMC support for msm8998 Adding back the missing coresight TMC support for 8998. Change-Id: I0f7db0f80b3b55d30b38430a0c257ef32c4e2653 Signed-off-by: Satyajit Desai --- arch/arm64/configs/msmcortex-perf_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/msmcortex-perf_defconfig b/arch/arm64/configs/msmcortex-perf_defconfig index d71cfed7614d..38ffcd675704 100644 --- a/arch/arm64/configs/msmcortex-perf_defconfig +++ b/arch/arm64/configs/msmcortex-perf_defconfig @@ -599,6 +599,7 @@ CONFIG_DEBUG_RODATA=y CONFIG_DEBUG_ALIGN_RODATA=y CONFIG_CORESIGHT=y CONFIG_CORESIGHT_EVENT=y +CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y CONFIG_CORESIGHT_QCOM_REPLICATOR=y CONFIG_CORESIGHT_STM=y CONFIG_CORESIGHT_HWEVENT=y -- cgit v1.2.3