Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp528316imm; Wed, 6 Jun 2018 01:34:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLbOoY2rp1XqmQRxwyBQDt51G/qVCkjC3BirIkoFeOACL3BkUUdDOlQp199ITFnt1OymfLW X-Received: by 2002:a17:902:bb8a:: with SMTP id m10-v6mr2286747pls.236.1528274062304; Wed, 06 Jun 2018 01:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528274062; cv=none; d=google.com; s=arc-20160816; b=IQR9Zl4pA2Q75mUUMqzdB7rICgxJJGzvUQtFB2LzqkW9xp7I4TiH2Bku68g565j68t ov2J/DQTNbwFAWgGs+9h50lIcistsDjzRtUmD75OdtLaR4BZf53eglpA2fZI+jpfOotl 03nYRsMsRtX2SBDh+XhtTkSWYEBOogD1AMWDyrhxxX/dF83niYab/I0r4Aa+9yvXdXKa X20CMq0/4qBs8QXKKhBA8f2ZIkxMCmYaKY0zUMll6B/0DHJyEkHwTyXJ/VbrJcemEdv1 FBvC6ZjDHHtGKONMzGs2dVKoJFvqM3bbE3ttWluIuUR2gPgkjgabOD8ZrJ8KxK4uIbxd y8CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=xsDRGlHFAqID3S5QxZBOscvbBHlgmkzEhopOKT/UHe0=; b=JMFmyCpT222ZU4ZVT/zQV96tLTPJrd/ctJOxwuLUblXpnXSpkhBFARjHy8fVaXW+/I rhF7h/QsyABJxlVHL1e0wB1MHjK5Qba4eqN9gW9BqWOtkshwYnzXu/FTK4j4BV/7CbPV 0Bq6GoPcAbiWw5mYsx0VNgXDqBjNcAOCHL0dbeSYn76jRcWvKnvt+2Hjcj6h0QoGHNxN Q54i4Mb/yCvVL39BYiuk0AV6sDKxobGbFzwBr1war3f/F/CTq+c0nq/6GNpqMYNbX9rf edP6JVgBR16/hMjQuigU2uPhYHmLcVrj1U2K+v/FT4yoDTdFHpqiGFItAu3a89En1kSr kQ/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kyx6734/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4-v6si31464203plk.600.2018.06.06.01.34.07; Wed, 06 Jun 2018 01:34:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kyx6734/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932497AbeFFIdl (ORCPT + 99 others); Wed, 6 Jun 2018 04:33:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:46748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932430AbeFFIdk (ORCPT ); Wed, 6 Jun 2018 04:33:40 -0400 Received: from localhost (unknown [37.173.63.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E9D392077B; Wed, 6 Jun 2018 08:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528274020; bh=BULSG3knrqn6YYKV4B7sCrliLK0UTwrwf51uE5qk2t8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kyx6734/jVJe5Bnp11qDrbG7KAtG+zlqAduMe/cRa2YkcNlNB9/JRVK7J169lCjHi yuepA/5rwKYyNfkJkjbOgsx/NT6JOEqeW9tK3p4wEl4wxf7h7pssa9A4Vcv6NKE2WY wuCBVOW93THzgJQxjSagoA+wytlhY8fsX+yl0ets= Date: Wed, 6 Jun 2018 10:33:15 +0200 From: Greg Kroah-Hartman To: Kim Phillips Cc: Mathieu Poirier , Leo Yan , Suzuki K Poulose , Alexander Shishkin , Alex Williamson , Andrew Morton , David Howells , Eric Auger , Eric Biederman , Gargi Sharma , Geert Uytterhoeven , Kefeng Wang , Kirill Tkhai , Mike Rapoport , Oleg Nesterov , Pavel Tatashin , Rik van Riel , Robin Murphy , Russell King , Thierry Reding , Todd Kjos , Randy Dunlap , linux-arm-kernel , Linux Kernel Mailing List Subject: Re: [PATCH v4 14/14] coresight: allow the coresight core driver to be built as a module Message-ID: <20180606083315.GE19727@kroah.com> References: <20180605210710.22227-1-kim.phillips@arm.com> <20180605210710.22227-15-kim.phillips@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180605210710.22227-15-kim.phillips@arm.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 05, 2018 at 04:07:10PM -0500, Kim Phillips wrote: > Allow to build coresight as a module. This enhances > coresight developer efficiency by allowing the development to > take place exclusively on the target, and without needing to > reboot in between changes. > > - Kconfig becomes a tristate, to allow =m > - append -core to source file name to allow module to > be called coresight by the Makefile > - modules can have only one init/exit, so we add the core bus > register/unregister function calls to the etm_perf init/exit > functions, since coresight.c does not have etm_pmu defined. > - add a MODULE_DEVICE_TABLE for autoloading on boot > > Cc: Mathieu Poirier > Cc: Leo Yan > Cc: Alexander Shishkin > Cc: Randy Dunlap > Cc: Suzuki K Poulose > Cc: Greg Kroah-Hartman > Cc: Russell King > Signed-off-by: Kim Phillips > --- > drivers/hwtracing/coresight/Kconfig | 5 ++++- > drivers/hwtracing/coresight/Makefile | 7 +++++-- > .../coresight/{coresight.c => coresight-core.c} | 6 ------ > .../hwtracing/coresight/coresight-etm-perf.c | 17 ++++++++++++++++- > 4 files changed, 25 insertions(+), 10 deletions(-) > rename drivers/hwtracing/coresight/{coresight.c => coresight-core.c} (99%) > > diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresight/Kconfig > index 181a44ea2d61..c05b265f7731 100644 > --- a/drivers/hwtracing/coresight/Kconfig > +++ b/drivers/hwtracing/coresight/Kconfig > @@ -2,7 +2,7 @@ > # Coresight configuration > # > menuconfig CORESIGHT > - bool "CoreSight Tracing Support" > + tristate "CoreSight Tracing Support" > select ARM_AMBA > select PERF_EVENTS > help > @@ -12,6 +12,9 @@ menuconfig CORESIGHT > specification and configure the right series of components when a > trace source gets enabled. > > + To compile this driver as a module, choose M here: the > + module will be called coresight. > + > if CORESIGHT > config CORESIGHT_LINKS_AND_SINKS > tristate "CoreSight Link and Sink drivers" > diff --git a/drivers/hwtracing/coresight/Makefile b/drivers/hwtracing/coresight/Makefile > index 45d7a0f34170..ed2d4bcb017b 100644 > --- a/drivers/hwtracing/coresight/Makefile > +++ b/drivers/hwtracing/coresight/Makefile > @@ -2,8 +2,11 @@ > # > # Makefile for CoreSight drivers. > # > -obj-$(CONFIG_CORESIGHT) += coresight.o coresight-etm-perf.o > -obj-$(CONFIG_OF) += of_coresight.o > +obj-$(CONFIG_CORESIGHT) += coresight.o > +coresight-objs := coresight-core.o coresight-etm-perf.o Shouldn't this line be: coresight-y := coresight-core.o coresight-etm-perf.o > +ifeq ($(CONFIG_OF), y) > +coresight-objs += of_coresight.o > +endif Those 3 lines should be written as 1 line: coresight-$(CONFIG_OF) += of_coresight.o thanks, greg k-h