From: Leo Yan <leo.yan(a)linaro.org>
commit 95c6fe970a0160cb770c5dce9f80311b42d030c0 upstream.
If packet processing wants to know the packet is bound with which ETM
version, it needs to access metadata to decide that based on metadata
magic number; but we cannot simply to use CPU logic ID number as index
to access metadata sequential array, especially when system have
hotplugged off CPUs, the metadata array are only allocated for online
CPUs but not offline CPUs, so the CPU logic number doesn't match with
its index in the array.
This patch is to change tuple from traceID-CPU# to traceID-metadata,
thus it can use the tuple to retrieve metadata pointer according to
traceID.
For safe accessing metadata fields, this patch provides helper function
cs_etm__get_cpu() which is used to return CPU number according to
traceID; cs_etm_decoder__buffer_packet() is the first consumer for this
helper function.
Signed-off-by: Leo Yan <leo.yan(a)linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier(a)linaro.org>
Cc: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Cc: Jiri Olsa <jolsa(a)redhat.com>
Cc: Mike Leach <mike.leach(a)linaro.org>
Cc: Namhyung Kim <namhyung(a)kernel.org>
Cc: Robert Walker <robert.walker(a)arm.com>
Cc: Suzuki K Poulouse <suzuki.poulose(a)arm.com>
Cc: coresight ml <coresight(a)lists.linaro.org>
Cc: linux-arm-kernel(a)lists.infradead.org
Link: http://lkml.kernel.org/r/20190129122842.32041-6-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
[Salvatore Bonaccorso: Adjust for context changes in
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c]
Signed-off-by: Salvatore Bonaccorso <carnil(a)debian.org>
---
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 8 +++---
tools/perf/util/cs-etm.c | 26 ++++++++++++++-----
tools/perf/util/cs-etm.h | 9 ++++++-
3 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
index 938def6d0bb9..f540037eb705 100644
--- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
+++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
@@ -278,14 +278,12 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder,
enum cs_etm_sample_type sample_type)
{
u32 et = 0;
- struct int_node *inode = NULL;
+ int cpu;
if (decoder->packet_count >= MAX_BUFFER - 1)
return OCSD_RESP_FATAL_SYS_ERR;
- /* Search the RB tree for the cpu associated with this traceID */
- inode = intlist__find(traceid_list, trace_chan_id);
- if (!inode)
+ if (cs_etm__get_cpu(trace_chan_id, &cpu) < 0)
return OCSD_RESP_FATAL_SYS_ERR;
et = decoder->tail;
@@ -296,7 +294,7 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder,
decoder->packet_buffer[et].sample_type = sample_type;
decoder->packet_buffer[et].exc = false;
decoder->packet_buffer[et].exc_ret = false;
- decoder->packet_buffer[et].cpu = *((int *)inode->priv);
+ decoder->packet_buffer[et].cpu = cpu;
decoder->packet_buffer[et].start_addr = CS_ETM_INVAL_ADDR;
decoder->packet_buffer[et].end_addr = CS_ETM_INVAL_ADDR;
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 7b5e15cc6b71..5cde3956e19a 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -91,6 +91,20 @@ static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
pid_t tid, u64 time_);
+int cs_etm__get_cpu(u8 trace_chan_id, int *cpu)
+{
+ struct int_node *inode;
+ u64 *metadata;
+
+ inode = intlist__find(traceid_list, trace_chan_id);
+ if (!inode)
+ return -EINVAL;
+
+ metadata = inode->priv;
+ *cpu = (int)metadata[CS_ETM_CPU];
+ return 0;
+}
+
static void cs_etm__packet_dump(const char *pkt_string)
{
const char *color = PERF_COLOR_BLUE;
@@ -230,7 +244,7 @@ static void cs_etm__free(struct perf_session *session)
cs_etm__free_events(session);
session->auxtrace = NULL;
- /* First remove all traceID/CPU# nodes for the RB tree */
+ /* First remove all traceID/metadata nodes for the RB tree */
intlist__for_each_entry_safe(inode, tmp, traceid_list)
intlist__remove(traceid_list, inode);
/* Then the RB tree itself */
@@ -1316,9 +1330,9 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
0xffffffff);
/*
- * Create an RB tree for traceID-CPU# tuple. Since the conversion has
- * to be made for each packet that gets decoded, optimizing access in
- * anything other than a sequential array is worth doing.
+ * Create an RB tree for traceID-metadata tuple. Since the conversion
+ * has to be made for each packet that gets decoded, optimizing access
+ * in anything other than a sequential array is worth doing.
*/
traceid_list = intlist__new(NULL);
if (!traceid_list) {
@@ -1384,8 +1398,8 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
err = -EINVAL;
goto err_free_metadata;
}
- /* All good, associate the traceID with the CPU# */
- inode->priv = &metadata[j][CS_ETM_CPU];
+ /* All good, associate the traceID with the metadata pointer */
+ inode->priv = metadata[j];
}
/*
diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
index 37f8d48179ca..fb5fc6538b7f 100644
--- a/tools/perf/util/cs-etm.h
+++ b/tools/perf/util/cs-etm.h
@@ -53,7 +53,7 @@ enum {
CS_ETMV4_PRIV_MAX,
};
-/* RB tree for quick conversion between traceID and CPUs */
+/* RB tree for quick conversion between traceID and metadata pointers */
struct intlist *traceid_list;
#define KiB(x) ((x) * 1024)
@@ -69,6 +69,7 @@ static const u64 __perf_cs_etmv4_magic = 0x4040404040404040ULL;
#ifdef HAVE_CSTRACE_SUPPORT
int cs_etm__process_auxtrace_info(union perf_event *event,
struct perf_session *session);
+int cs_etm__get_cpu(u8 trace_chan_id, int *cpu);
#else
static inline int
cs_etm__process_auxtrace_info(union perf_event *event __maybe_unused,
@@ -76,6 +77,12 @@ cs_etm__process_auxtrace_info(union perf_event *event __maybe_unused,
{
return -1;
}
+
+static inline int cs_etm__get_cpu(u8 trace_chan_id __maybe_unused,
+ int *cpu __maybe_unused)
+{
+ return -1;
+}
#endif
#endif
--
2.29.2
With the steady stream of new features coming into the subsystem
it has been clear for some time now that help is needed.
Suzuki and Leo have worked extensively on various parts of the
project and have agreed to help.
While at it add the new location for the coresight git tree.
Signed-off-by: Mathieu Poirier <mathieu.poirier(a)linaro.org>
---
MAINTAINERS | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index e73636b75f29..8d0b008c7781 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1723,11 +1723,13 @@ F: arch/arm/mach-ep93xx/micro9.c
ARM/CORESIGHT FRAMEWORK AND DRIVERS
M: Mathieu Poirier <mathieu.poirier(a)linaro.org>
-R: Suzuki K Poulose <suzuki.poulose(a)arm.com>
+M: Suzuki K Poulose <suzuki.poulose(a)arm.com>
R: Mike Leach <mike.leach(a)linaro.org>
+R: Leo Yan <leo.yan(a)linaro.org>
L: coresight(a)lists.linaro.org (moderated for non-subscribers)
L: linux-arm-kernel(a)lists.infradead.org (moderated for non-subscribers)
S: Maintained
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git
F: Documentation/ABI/testing/sysfs-bus-coresight-devices-*
F: Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt
F: Documentation/devicetree/bindings/arm/coresight-cti.yaml
--
2.25.1
Hi There,
Hope you are staying safe and well.
Just wanted to update you about items we added to the PPE list:
We have stock in Los Angeles, Ready to ship today:
01. N95 - Niosh Approved - CDC List (Makrite)
02. Nitrile Gloves
03. KN95 - CDC list
04. Face Shield
05. Infrared Thermometer
06. Wet Wipes
07. Isolation Gowns
08. Hand Sanitizer
09. Shoe and Head Cover
10. 3Ply Masks
We are FDA approved and also PPAI / SAGE supplier.
Let me know what you are looking for and what quantity so we can get the
shipment going for you.
Thanks and Regards,
--
Tony FB
310 800 6438
8Health by Dioz Group
You may unsubscribe
<http://ec2-52-26-194-35.us-west-2.compute.amazonaws.com/x/u?u=cfdafefb-8f41…>
to stop receiving our emails.
Hi,
I've encountered a perf.data file whose PERF_RECORD_AUXTRACE_INFO
has an additional ETM register per CPU (i.e. the metadata for each CPU is
8 bytes longer than normal). Some patch somewhere must be adding this
register for reasons unknown.
Upstream perf won't even print this file, it reports failure to process
record type 70 and errors out. The metadata reading code in util/cs-etm.c
expects exactly CS_ETMV4_PRIV_MAX registers, no more. I.e. it won't
go skipping past extra ones to find the next "magic" number.
It's unfortunate that "perf report -D" errors out, when the reason for
using -D may be to investigate why perf in general isn't working.
I want to fix this at least.
Now firstly, has anyone got any ideas why there might be an additional
register, does anyone know of a patch that does this?
And secondly, could/should we make the metadata format more robust?
Cases of more or fewer registers than expected can, to some extent, be
handled by looking for the magic number, but that assumes that registers
don't legitimately have values equal to the magic number.
The version number could help us evolve upstream to a new format but
it isn't really an answer to robust interchange in general. Should we at
least have the metadata describe its own length (i.e. number of registers)
so that perf tools can read it, even if they might not be able to fully
understand it.
Al
Hello,
Who can I speak to about branding and custom apparel for your brand?
One of the largest custom clothing manufacturer, our office is in London,
Sydney, HQ in Beverly Hills, California. We currently work with some top
brands and companies worldwide and would love to discuss your branding and
custom clothing with you.
If you can direct me in the right direction, I would truly appreciate that,
as we are factory direct and can save you 30% cost on your bills.
Items we manufacture:
- T-Shirts
- Hoodies
- Jackets
- Activewear
- Towels
- Bags, clutches, and pouches
- Hats
- Promotional items
- Custom Cotton Masks
- Sublimated Apparel
- Sports Uniform
We are very creative, innovative, and offer you a full design team and
direct factory. We will do everything right, and provide amazing quality at
competitive prices which can be very effective for your brand development
and growth.
Let me know if you have a moment to discuss this. I can also get some
designs done for you. Our MOQ is 500 pcs per style, multiple sizes.
Let me know your thoughts
Thanks and stay safe,
--
Jeff FB | Director of Marketing
Dioz Group | Oasis Apparel | Alanic | PPE KITS | Clean Health USA
HQ: Beverly Hills, CA 90211, USA
Email: joe(a)oasisapparelusa.com
Website: https://oasisapparel.com/
You may unsubscribe <http://ec2-52-26-194-35.us-west-2.compute.amazonaws.com/x/u?u=74d8b53f-6635…> to stop
receiving our emails.
Je vous ai invité à remplir le formulaire suivant :
Formulaire sans titre
Pour remplir ce formulaire, consultez :
https://docs.google.com/forms/d/e/1FAIpQLSdkPaVLRqC8uiMrQKKxvJTaTbKOCbyZ7eh…
From Mrs. Dorathy Gaby
Abidjan- Cote D'Ivoire
May I humbly solicit your confidence in this transaction, as being utterly
confidential and top secret. But I am assuring you that you shall be very
happy at the end of the day. I decided to contact you due to the urgency of
this transaction, as I wish to repose my trust and confidence on your
discreteness and ability in transaction of this nature. Let me start by
introducing my self properly to you, my name is Mrs. Dorathy Gaby, I am
the regional Bank Manager of BOA Bank Abidjan-Cote D' Ivoire. I came to
know about you in my Private Search for a reliable and reputable foreigner
to handle this Confidential Transaction.
As the regional Bank Manager of BOA BANK; it is my duty to send a financial
report to my head office at the end of each year. On the course of the 2012
year report, We discovered an excess profit of Fifteen Million Us Dollars ,
[ $ 15,000,000.00 ] which we have kept in SUSPENSE ACCOUNT without any
beneficiary.
As an officer of the bank I can not be directly connected to this Fund for
Security Reasons, that is why I am contacting you for us to work together
to get the said Fund into your bank account for INVESTMENT in your Country.
The percentage Ratio is thus: 40% for you , 60 % for me and my colleagues .
Note: There are practically no risks involved in this transaction as it is
100% risk free and will be legally bonded, it will be bank to bank
transfer, all I need from you is to stand as the next of kin / Beneficiary
to the original depositor of this fund who made the deposit with Kumasi
branch so that my Head office can order the transfer to your designated
bank account. If you accept this offer to work with me, if you find this
proposal suitable for you, kindly reply for full details Via email:
dorathygaby3(a)yahoo.co.jp,
I will appreciate it very much, If this proposal is acceptable by you, do
not make undue advantage of the trust I have bestowed on you, and I assure
you that we shall achieve it successfully.
Best regards,
Mrs. Dorathy Gaby.
Google Forms vous permet de créer des enquêtes et d'en analyser les
résultats.
From: Mao Jinlong <jinlmao(a)codeaurora.org>
alloc_pages_node() return should be checked before calling
dma_map_page() to make sure that valid page is mapped or
else it can lead to aborts as below:
Unable to handle kernel paging request at virtual address ffffffc008000000
Mem abort info:
<snip>...
pc : __dma_inv_area+0x40/0x58
lr : dma_direct_map_page+0xd8/0x1c8
Call trace:
__dma_inv_area
tmc_pages_alloc
tmc_alloc_data_pages
tmc_alloc_sg_table
tmc_init_etr_sg_table
tmc_alloc_etr_buf
tmc_enable_etr_sink_sysfs
tmc_enable_etr_sink
coresight_enable_path
coresight_enable
enable_source_store
dev_attr_store
sysfs_kf_write
Fixes: 99443ea19e8b ("coresight: Add generic TMC sg table framework")
Cc: stable(a)vger.kernel.org
Signed-off-by: Mao Jinlong <jinlmao(a)codeaurora.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan(a)codeaurora.org>
---
drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
index 525f0ecc129c..a31a4d7ae25e 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
@@ -217,6 +217,8 @@ static int tmc_pages_alloc(struct tmc_pages *tmc_pages,
} else {
page = alloc_pages_node(node,
GFP_KERNEL | __GFP_ZERO, 0);
+ if (!page)
+ goto err;
}
paddr = dma_map_page(real_dev, page, 0, PAGE_SIZE, dir);
if (dma_mapping_error(real_dev, paddr))
base-commit: c04e5d7bbf6f92a346d6b36770705e7f034df42d
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
The patch below does not apply to the 5.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From dd94ac807a5e10e0b25b68397c473276905cca73 Mon Sep 17 00:00:00 2001
From: Leo Yan <leo.yan(a)linaro.org>
Date: Tue, 10 Nov 2020 14:34:17 +0800
Subject: [PATCH] perf test: Update branch sample pattern for cs-etm
Since the commit 943b69ac1884 ("perf parse-events: Set exclude_guest=1
for user-space counting"), 'exclude_guest=1' is set for user-space
counting; and the branch sample's modifier has been altered, the sample
event name has been changed from "branches:u:" to "branches:uH:", which
gives out info for "user-space and host counting".
But the cs-etm testing's regular expression cannot match the updated
branch sample event and leads to test failure.
This patch updates the branch sample pattern by using a more flexible
expression '.*' to match branch sample's modifiers, so that allows the
testing to work as expected.
Fixes: 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting")
Signed-off-by: Leo Yan <leo.yan(a)linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier(a)linaro.org>
Cc: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Cc: Jin Yao <yao.jin(a)linux.intel.com>
Cc: Jiri Olsa <jolsa(a)redhat.com>
Cc: Mark Rutland <mark.rutland(a)arm.com>
Cc: Mike Leach <mike.leach(a)linaro.org>
Cc: Namhyung Kim <namhyung(a)kernel.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose(a)arm.com>
Cc: coresight ml <coresight(a)lists.linaro.org>
Cc: stable(a)kernel.org
Link: http://lore.kernel.org/lkml/20201110063417.14467-2-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh
index 59d847d4981d..18fde2f179cd 100755
--- a/tools/perf/tests/shell/test_arm_coresight.sh
+++ b/tools/perf/tests/shell/test_arm_coresight.sh
@@ -44,7 +44,7 @@ perf_script_branch_samples() {
# touch 6512 1 branches:u: ffffb22082e0 strcmp+0xa0 (/lib/aarch64-linux-gnu/ld-2.27.so)
# touch 6512 1 branches:u: ffffb2208320 strcmp+0xe0 (/lib/aarch64-linux-gnu/ld-2.27.so)
perf script -F,-time -i ${perfdata} | \
- egrep " +$1 +[0-9]+ .* +branches:([u|k]:)? +"
+ egrep " +$1 +[0-9]+ .* +branches:(.*:)? +"
}
perf_report_branch_samples() {