linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
To: Mathieu Poirier
	<mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kaixu.xia-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v2 01/11] coresight-etm4x: Adding CoreSight ETM4x driver
Date: Thu, 30 Apr 2015 23:29:57 +0200	[thread overview]
Message-ID: <1430429397.2187.34.camel@x220> (raw)
In-Reply-To: <1430327795-10710-2-git-send-email-mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On Wed, 2015-04-29 at 11:16 -0600, Mathieu Poirier wrote:
> --- a/drivers/hwtracing/coresight/Kconfig
> +++ b/drivers/hwtracing/coresight/Kconfig

> +config CORESIGHT_SOURCE_ETM4X
> +	bool "CoreSight Embedded Trace Macrocell 4.x driver"
> +	depends on ARM64
> +	select CORESIGHT_LINKS_AND_SINKS
> +	help
> +	  This driver provides support for the ETM4.x tracer module, tracing the
> +	  instructions that a processor is executing. This is primarily useful
> +	  for instruction level tracing. Depending on the implemented version
> +	  data tracing may also be available.

(Please add an empty line here.)

>  endif

> --- a/drivers/hwtracing/coresight/Makefile
> +++ b/drivers/hwtracing/coresight/Makefile

> +obj-$(CONFIG_CORESIGHT_SOURCE_ETM4X) += coresight-etm4x.o

CORESIGHT_SOURCE_ETM4X is a bool symbol, so coresight-etm4x.o can never
be part of a module, right?

(If I'm wrong, we're done here.)

> --- /dev/null
> +++ b/drivers/hwtracing/coresight/coresight-etm4x.c

> +#include <linux/module.h>

Is this include needed?

> +static struct amba_driver etm4x_driver = {
> +	.drv = {
> +		.name   = "coresight-etm4x",
> +		.owner  = THIS_MODULE,

For built-in code this is basically equivalent to NULL (see
include/linux/export.h).

> +	},
> +	.probe		= etm4_probe,
> +	.remove		= etm4_remove,
> +	.id_table	= etm4_ids,
> +};
> +
> +module_amba_driver(etm4x_driver);

In a message I sent a short while ago, I suggested that for built-in
only code this is equivalent to calling
    amba_driver_register(&etm4x_driver);

from within a function marked with some sort of *initcall(). Please
double check.

> +MODULE_LICENSE("GPL v2");
> +MODULE_DESCRIPTION("CoreSight Embedded Trace Macrocell v4 driver");

These macros will be effectively be preprocessed away for built-in only
code.

(There is also a reference to module_param_named(). I don't know by
heart how that works for built-in only code, sorry.)


Paul Bolle

  parent reply	other threads:[~2015-04-30 21:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 17:16 [PATCH v2 00/11] Support for coresight ETMv4 tracer Mathieu Poirier
2015-04-29 17:16 ` [PATCH v2 01/11] coresight-etm4x: Adding CoreSight ETM4x driver Mathieu Poirier
     [not found]   ` <1430327795-10710-2-git-send-email-mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-04-30 21:29     ` Paul Bolle [this message]
2015-05-01 14:39       ` Mathieu Poirier
     [not found]         ` <CANLsYkywp0o8YtjkFwfvEiAje-w2jCWbs_82SiD29xdirA_7vQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-01 18:28           ` Paul Bolle
2015-04-29 17:16 ` [PATCH v2 02/11] coresight-etm4x: Controls pertaining to tracer configuration Mathieu Poirier
2015-04-29 17:16 ` [PATCH v2 03/11] coresight-etm4x: Controls pertaining to the reset, mode, pe and events Mathieu Poirier
2015-04-29 17:16 ` [PATCH v2 04/11] coresight-etm4x: Controls pertaining to various configuration options Mathieu Poirier
2015-04-29 17:16 ` [PATCH v2 05/11] coresight-etm4x: Controls pertaining to the ViewInst register Mathieu Poirier
2015-04-29 17:16 ` [PATCH v2 06/11] coresight-etm4x: Controls pertaining to the address comparator functions Mathieu Poirier
2015-04-29 17:16 ` [PATCH v2 07/11] coresight-etm4x: Controls pertaining to the sequencer functions Mathieu Poirier
2015-04-29 17:16 ` [PATCH v2 09/11] coresight-etm4x: Controls pertaining to the selection of resources Mathieu Poirier
     [not found] ` <1430327795-10710-1-git-send-email-mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-04-29 17:16   ` [PATCH v2 08/11] coresight-etm4x: Controls pertaining to the counter functions Mathieu Poirier
2015-04-29 17:16   ` [PATCH v2 10/11] coresight-etm4x: Controls pertaining to the context ID functions Mathieu Poirier
2015-04-29 17:16   ` [PATCH v2 11/11] coresight-etm4x: Controls pertaining to the VM " Mathieu Poirier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430429397.2187.34.camel@x220 \
    --to=pebolle-iwqwacnznjzz+pzb47itoq@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=kaixu.xia-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).