From: Joe Perches <joe@perches.com>
To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org,
pebolle@tiscali.nl, peter.lachner@intel.com,
norbert.schulz@intel.com, keven.boell@intel.com,
yann.fouassier@intel.com, laurent.fert@intel.com
Subject: Re: [PATCH v1 07/11] intel_th: Add Global Trace Hub driver
Date: Fri, 20 Mar 2015 10:59:05 -0700 [thread overview]
Message-ID: <1426874345.21142.37.camel@perches.com> (raw)
In-Reply-To: <1426872598-68807-8-git-send-email-alexander.shishkin@linux.intel.com>
On Fri, 2015-03-20 at 19:29 +0200, Alexander Shishkin wrote:
> Global Trace Hub (GTH) is the central component of Intel TH architecture;
> it carries out switching between the trace sources and trace outputs, can
> enable/disable tracing, perform STP encoding, internal buffering, control
> backpressure from outputs to sources and so on.
trivia:
> diff --git a/drivers/hwtracing/intel_th/gth.c b/drivers/hwtracing/intel_th/gth.c
> +struct gth_output {
> + struct gth_device *gth;
> + struct intel_th_output *output;
> + unsigned int index;
> + unsigned int port_type;
> + unsigned long master[TH_CONFIGURABLE_MASTERS + 1 /
> + BITS_PER_LONG];
DECLARE_BITMAP(master, TH_CONFIGURABLE_MASTERS+ 1); ?
> +};
> +
> +/**
> + * struct gth_device - GTH device
> + * @dev: driver core's device
> + * @base: register window base address
> + * @output_group: attributes describing output ports
> + * @master_group: attributes describing master assignments
> + * @output: output ports
> + * @master: master/output port assignments
> + * @gth_lock: serializes accesses to GTH bits
> + */
> +struct gth_device {
> + struct device *dev;
> + void __iomem *base;
> +
> + struct attribute_group output_group;
> + struct attribute_group master_group;
> + struct gth_output output[TH_POSSIBLE_OUTPUTS];
> + signed char master[TH_CONFIGURABLE_MASTERS + 1];
why signed?
[]
> +#define OUTPUT_PARM(_name, _mask, _r, _w) \
> + [TH_OUTPUT_PARM(_name)] = { .name = __stringify(_name), \
> + .mask = (_mask), \
> + .readable = (_r), \
> + .writable = (_w) }
> +
> +static struct output_parm {
const
> + const char *name;
> + unsigned int mask;
> + unsigned int readable : 1,
> + writable : 1;
> +} output_parms[] = {
> + OUTPUT_PARM(port, 0x7, 1, 0),
> + OUTPUT_PARM(null, BIT(3), 1, 1),
> + OUTPUT_PARM(drop, BIT(4), 1, 1),
> + OUTPUT_PARM(reset, BIT(5), 1, 0),
> + OUTPUT_PARM(flush, BIT(7), 0, 1),
> +};
[]
> +static int intel_th_master_attributes(struct gth_device *gth)
> +{
> + struct master_attribute *master_attrs;
> + struct attribute **attrs;
> + int i, nattrs = TH_CONFIGURABLE_MASTERS + 2;
> +
> + attrs = devm_kzalloc(gth->dev, sizeof(void *) * nattrs, GFP_KERNEL);
> + if (!attrs)
> + return -ENOMEM;
> +
> + master_attrs = devm_kzalloc(gth->dev,
> + sizeof(struct master_attribute) * nattrs,
> + GFP_KERNEL);
devm_kcalloc
next prev parent reply other threads:[~2015-03-20 17:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 17:29 [PATCH v1 00/11] Introduce Intel Trace Hub support Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 01/11] stm class: Introduce an abstraction for System Trace Module devices Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 02/11] MAINTAINERS: add an entry for System Trace Module device class Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 03/11] stm class: dummy_stm: Add dummy driver for testing stm class Alexander Shishkin
2015-03-21 12:02 ` Paul Bolle
2015-03-22 20:38 ` Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 04/11] stm class: stm_console: Add kernel-console-over-stm driver Alexander Shishkin
2015-03-21 11:59 ` Paul Bolle
2015-03-20 17:29 ` [PATCH v1 05/11] intel_th: Add driver infrastructure for Intel Trace Hub devices Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 06/11] intel_th: Add pci glue layer for Intel Trace Hub Alexander Shishkin
2015-03-20 17:43 ` Joe Perches
2015-03-22 20:36 ` Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 07/11] intel_th: Add Global Trace Hub driver Alexander Shishkin
2015-03-20 17:59 ` Joe Perches [this message]
2015-03-22 20:35 ` Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 08/11] intel_th: Add Software " Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 09/11] intel_th: Add Memory Storage Unit driver Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 10/11] intel_th: Add PTI output driver Alexander Shishkin
2015-03-20 17:29 ` [PATCH v1 11/11] MAINTAINERS: add an entry for Intel(R) Trace Hub Alexander Shishkin
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=1426874345.21142.37.camel@perches.com \
--to=joe@perches.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=keven.boell@intel.com \
--cc=laurent.fert@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=norbert.schulz@intel.com \
--cc=pebolle@tiscali.nl \
--cc=peter.lachner@intel.com \
--cc=yann.fouassier@intel.com \
/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