Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1236210 > unrolled thread
| Started by | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| First post | 2015-09-30 14:00 +0200 |
| Last post | 2015-10-02 07:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC PATCH 15/20] coresight: etm-perf: implementing 'setup_aux()' API Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-09-30 14:00 +0200
Re: [RFC PATCH 15/20] coresight: etm-perf: implementing 'setup_aux()' API Mathieu Poirier <mathieu.poirier@linaro.org> - 2015-10-02 00:50 +0200
Re: [RFC PATCH 15/20] coresight: etm-perf: implementing 'setup_aux()' API Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-10-02 07:00 +0200
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| Date | 2015-09-30 14:00 +0200 |
| Subject | Re: [RFC PATCH 15/20] coresight: etm-perf: implementing 'setup_aux()' API |
| Message-ID | <qeodc-468-3@gated-at.bofh.it> |
Mathieu Poirier <mathieu.poirier@linaro.org> writes:
> +static void *etm_setup_aux(int cpu, void **pages,
> + int nr_pages, bool overwrite)
> +{
> + struct coresight_device *csdev;
> +
> + if (cpu == -1)
> + cpu = smp_processor_id();
> +
> + csdev = per_cpu(csdev_sink, cpu);
> + if (!csdev)
> + return NULL;
> +
> + return sink_ops(csdev)->setup_aux(csdev, cpu, pages,
> + nr_pages, overwrite);
Is it guaranteed that this sink would always have .setup_aux()?
Regards,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Date | 2015-10-02 00:50 +0200 |
| Message-ID | <qeUPL-1B8-3@gated-at.bofh.it> |
| In reply to | #1236210 |
On 30 September 2015 at 05:50, Alexander Shishkin
<alexander.shishkin@linux.intel.com> wrote:
> Mathieu Poirier <mathieu.poirier@linaro.org> writes:
>
>> +static void *etm_setup_aux(int cpu, void **pages,
>> + int nr_pages, bool overwrite)
>> +{
>> + struct coresight_device *csdev;
>> +
>> + if (cpu == -1)
>> + cpu = smp_processor_id();
>> +
>> + csdev = per_cpu(csdev_sink, cpu);
>> + if (!csdev)
>> + return NULL;
>> +
>> + return sink_ops(csdev)->setup_aux(csdev, cpu, pages,
>> + nr_pages, overwrite);
>
> Is it guaranteed that this sink would always have .setup_aux()?
A setup_aux() is vital to the design, both on Intel and ARM. I really
don't see how one could go without it. I can return NULL if it hasn't
been provided - that way the setup will fail without triggering a core
dump.
>
> Regards,
> --
> Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
|---|---|
| Date | 2015-10-02 07:00 +0200 |
| Message-ID | <qf0BP-1uk-5@gated-at.bofh.it> |
| In reply to | #1237807 |
Mathieu Poirier <mathieu.poirier@linaro.org> writes:
> On 30 September 2015 at 05:50, Alexander Shishkin
> <alexander.shishkin@linux.intel.com> wrote:
>> Mathieu Poirier <mathieu.poirier@linaro.org> writes:
>>
>>> +static void *etm_setup_aux(int cpu, void **pages,
>>> + int nr_pages, bool overwrite)
>>> +{
>>> + struct coresight_device *csdev;
>>> +
>>> + if (cpu == -1)
>>> + cpu = smp_processor_id();
>>> +
>>> + csdev = per_cpu(csdev_sink, cpu);
>>> + if (!csdev)
>>> + return NULL;
>>> +
>>> + return sink_ops(csdev)->setup_aux(csdev, cpu, pages,
>>> + nr_pages, overwrite);
>>
>> Is it guaranteed that this sink would always have .setup_aux()?
>
> A setup_aux() is vital to the design, both on Intel and ARM. I really
> don't see how one could go without it. I can return NULL if it hasn't
> been provided - that way the setup will fail without triggering a core
> dump.
It wasn't clear to me that the sink that ends up in csdev_sink will
always be the one that does have .setup_aux(). And if it indeed doesn't,
it's better to refuse to setup a buffer than crash.
Regards,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web