License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2013-12-11 19:44:40 +08:00
|
|
|
/*
|
|
|
|
* Perf PMU sysfs events attributes for available CPU-measurement counters
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/slab.h>
|
|
|
|
#include <linux/perf_event.h>
|
2018-08-06 21:56:43 +08:00
|
|
|
#include <asm/cpu_mf.h>
|
2013-12-11 19:44:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* BEGIN: CPUM_CF COUNTER DEFINITIONS =================================== */
|
|
|
|
|
2017-10-10 17:52:02 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, CPU_CYCLES, 0x0000);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, INSTRUCTIONS, 0x0001);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, L1I_DIR_WRITES, 0x0002);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, L1I_PENALTY_CYCLES, 0x0003);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_CPU_CYCLES, 0x0020);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_INSTRUCTIONS, 0x0021);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1I_DIR_WRITES, 0x0022);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1I_PENALTY_CYCLES, 0x0023);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1D_DIR_WRITES, 0x0024);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, PROBLEM_STATE_L1D_PENALTY_CYCLES, 0x0025);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, L1D_DIR_WRITES, 0x0004);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn1, L1D_PENALTY_CYCLES, 0x0005);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, CPU_CYCLES, 0x0000);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, INSTRUCTIONS, 0x0001);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, L1I_DIR_WRITES, 0x0002);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, L1I_PENALTY_CYCLES, 0x0003);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, PROBLEM_STATE_CPU_CYCLES, 0x0020);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, PROBLEM_STATE_INSTRUCTIONS, 0x0021);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, L1D_DIR_WRITES, 0x0004);
|
|
|
|
CPUMF_EVENT_ATTR(cf_fvn3, L1D_PENALTY_CYCLES, 0x0005);
|
2019-03-28 18:21:47 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_FUNCTIONS, 0x0040);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_CYCLES, 0x0041);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS, 0x0042);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_BLOCKED_CYCLES, 0x0043);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, SHA_FUNCTIONS, 0x0044);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, SHA_CYCLES, 0x0045);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS, 0x0046);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, SHA_BLOCKED_CYCLES, 0x0047);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, DEA_FUNCTIONS, 0x0048);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, DEA_CYCLES, 0x0049);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS, 0x004a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, DEA_BLOCKED_CYCLES, 0x004b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, AES_FUNCTIONS, 0x004c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, AES_CYCLES, 0x004d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS, 0x004e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_12345, AES_BLOCKED_CYCLES, 0x004f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_6, ECC_FUNCTION_COUNT, 0x0050);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_6, ECC_CYCLES_COUNT, 0x0051);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_6, ECC_BLOCKED_FUNCTION_COUNT, 0x0052);
|
|
|
|
CPUMF_EVENT_ATTR(cf_svn_6, ECC_BLOCKED_CYCLES_COUNT, 0x0053);
|
2013-12-11 19:44:40 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1I_L2_SOURCED_WRITES, 0x0080);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1D_L2_SOURCED_WRITES, 0x0081);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1I_L3_LOCAL_WRITES, 0x0082);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1D_L3_LOCAL_WRITES, 0x0083);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1I_L3_REMOTE_WRITES, 0x0084);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1D_L3_REMOTE_WRITES, 0x0085);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1D_LMEM_SOURCED_WRITES, 0x0086);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1I_LMEM_SOURCED_WRITES, 0x0087);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1D_RO_EXCL_WRITES, 0x0088);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L1I_CACHELINE_INVALIDATES, 0x0089);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, ITLB1_WRITES, 0x008a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, DTLB1_WRITES, 0x008b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, TLB2_PTE_WRITES, 0x008c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, TLB2_CRSTE_WRITES, 0x008d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, TLB2_CRSTE_HPAGE_WRITES, 0x008e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, ITLB1_MISSES, 0x0091);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, DTLB1_MISSES, 0x0092);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z10, L2C_STORES_SENT, 0x0093);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_L2_SOURCED_WRITES, 0x0080);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1I_L2_SOURCED_WRITES, 0x0081);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, DTLB1_MISSES, 0x0082);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, ITLB1_MISSES, 0x0083);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L2C_STORES_SENT, 0x0085);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_OFFBOOK_L3_SOURCED_WRITES, 0x0086);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_ONBOOK_L4_SOURCED_WRITES, 0x0087);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1I_ONBOOK_L4_SOURCED_WRITES, 0x0088);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_RO_EXCL_WRITES, 0x0089);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_OFFBOOK_L4_SOURCED_WRITES, 0x008a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1I_OFFBOOK_L4_SOURCED_WRITES, 0x008b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, DTLB1_HPAGE_WRITES, 0x008c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_LMEM_SOURCED_WRITES, 0x008d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1I_LMEM_SOURCED_WRITES, 0x008e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1I_OFFBOOK_L3_SOURCED_WRITES, 0x008f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, DTLB1_WRITES, 0x0090);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, ITLB1_WRITES, 0x0091);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, TLB2_PTE_WRITES, 0x0092);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, TLB2_CRSTE_HPAGE_WRITES, 0x0093);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, TLB2_CRSTE_WRITES, 0x0094);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0096);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1D_OFFCHIP_L3_SOURCED_WRITES, 0x0098);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1I_ONCHIP_L3_SOURCED_WRITES, 0x0099);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z196, L1I_OFFCHIP_L3_SOURCED_WRITES, 0x009b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, DTLB1_MISSES, 0x0080);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, ITLB1_MISSES, 0x0081);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_L2I_SOURCED_WRITES, 0x0082);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_L2I_SOURCED_WRITES, 0x0083);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_L2D_SOURCED_WRITES, 0x0084);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, DTLB1_WRITES, 0x0085);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_LMEM_SOURCED_WRITES, 0x0087);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_LMEM_SOURCED_WRITES, 0x0089);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_RO_EXCL_WRITES, 0x008a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, DTLB1_HPAGE_WRITES, 0x008b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, ITLB1_WRITES, 0x008c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TLB2_PTE_WRITES, 0x008d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TLB2_CRSTE_HPAGE_WRITES, 0x008e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TLB2_CRSTE_WRITES, 0x008f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES, 0x0091);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES, 0x0092);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_ONBOOK_L4_SOURCED_WRITES, 0x0093);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L4_SOURCED_WRITES, 0x0094);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TX_NC_TEND, 0x0095);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0096);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES_IV, 0x0097);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES_IV, 0x0098);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES, 0x0099);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES, 0x009a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES, 0x009b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_ONBOOK_L4_SOURCED_WRITES, 0x009c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L4_SOURCED_WRITES, 0x009d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TX_C_TEND, 0x009e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x009f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES_IV, 0x00a0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES_IV, 0x00a1);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TX_NC_TABORT, 0x00b1);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TX_C_TABORT_NO_SPECIAL, 0x00b2);
|
|
|
|
CPUMF_EVENT_ATTR(cf_zec12, TX_C_TABORT_SPECIAL, 0x00b3);
|
2018-04-18 23:59:58 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_RO_EXCL_WRITES, 0x0080);
|
2017-02-17 19:16:00 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z13, DTLB1_WRITES, 0x0081);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, DTLB1_MISSES, 0x0082);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, DTLB1_HPAGE_WRITES, 0x0083);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, DTLB1_GPAGE_WRITES, 0x0084);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_L2D_SOURCED_WRITES, 0x0085);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, ITLB1_WRITES, 0x0086);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, ITLB1_MISSES, 0x0087);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_L2I_SOURCED_WRITES, 0x0088);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TLB2_PTE_WRITES, 0x0089);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TLB2_CRSTE_HPAGE_WRITES, 0x008a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TLB2_CRSTE_WRITES, 0x008b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TX_C_TEND, 0x008c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TX_NC_TEND, 0x008d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1C_TLB1_MISSES, 0x008f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0091);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L4_SOURCED_WRITES, 0x0092);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES_IV, 0x0093);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES, 0x0094);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L4_SOURCED_WRITES, 0x0095);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES_IV, 0x0096);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES, 0x0097);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES, 0x0098);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV, 0x0099);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES, 0x009a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES, 0x009b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV, 0x009c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES, 0x009d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONNODE_MEM_SOURCED_WRITES, 0x009e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONDRAWER_MEM_SOURCED_WRITES, 0x009f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_OFFDRAWER_MEM_SOURCED_WRITES, 0x00a0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1D_ONCHIP_MEM_SOURCED_WRITES, 0x00a1);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES, 0x00a2);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x00a3);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L4_SOURCED_WRITES, 0x00a4);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES_IV, 0x00a5);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES, 0x00a6);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L4_SOURCED_WRITES, 0x00a7);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES_IV, 0x00a8);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES, 0x00a9);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES, 0x00aa);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV, 0x00ab);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES, 0x00ac);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES, 0x00ad);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV, 0x00ae);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES, 0x00af);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONNODE_MEM_SOURCED_WRITES, 0x00b0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONDRAWER_MEM_SOURCED_WRITES, 0x00b1);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_OFFDRAWER_MEM_SOURCED_WRITES, 0x00b2);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, L1I_ONCHIP_MEM_SOURCED_WRITES, 0x00b3);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TX_NC_TABORT, 0x00da);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TX_C_TABORT_NO_SPECIAL, 0x00db);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, TX_C_TABORT_SPECIAL, 0x00dc);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z13, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
|
2018-04-18 23:59:58 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_RO_EXCL_WRITES, 0x0080);
|
2017-10-10 17:52:02 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z14, DTLB2_WRITES, 0x0081);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, DTLB2_MISSES, 0x0082);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, DTLB2_HPAGE_WRITES, 0x0083);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, DTLB2_GPAGE_WRITES, 0x0084);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_L2D_SOURCED_WRITES, 0x0085);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, ITLB2_WRITES, 0x0086);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, ITLB2_MISSES, 0x0087);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_L2I_SOURCED_WRITES, 0x0088);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TLB2_PTE_WRITES, 0x0089);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TLB2_CRSTE_WRITES, 0x008a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TLB2_ENGINES_BUSY, 0x008b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TX_C_TEND, 0x008c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TX_NC_TEND, 0x008d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1C_TLB2_MISSES, 0x008f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_MEMORY_SOURCED_WRITES, 0x0091);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0092);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES, 0x0093);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONCLUSTER_MEMORY_SOURCED_WRITES, 0x0094);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES_IV, 0x0095);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES, 0x0096);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES, 0x0097);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV, 0x0098);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES, 0x0099);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_MEMORY_SOURCED_WRITES, 0x009a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES_IV, 0x009b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONDRAWER_L4_SOURCED_WRITES, 0x009c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_OFFDRAWER_L4_SOURCED_WRITES, 0x009d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_RO, 0x009e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES, 0x00a2);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_ONCHIP_MEMORY_SOURCED_WRITES, 0x00a3);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x00a4);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES, 0x00a5);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_ONCLUSTER_MEMORY_SOURCED_WRITES, 0x00a6);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES_IV, 0x00a7);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES, 0x00a8);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES, 0x00a9);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV, 0x00aa);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES, 0x00ab);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_MEMORY_SOURCED_WRITES, 0x00ac);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES_IV, 0x00ad);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_ONDRAWER_L4_SOURCED_WRITES, 0x00ae);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, L1I_OFFDRAWER_L4_SOURCED_WRITES, 0x00af);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, BCD_DFP_EXECUTION_SLOTS, 0x00e0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, VX_BCD_EXECUTION_SLOTS, 0x00e1);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, DECIMAL_INSTRUCTIONS, 0x00e2);
|
2018-01-24 23:25:23 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z14, LAST_HOST_TRANSLATIONS, 0x00e8);
|
2017-10-10 17:52:02 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TX_NC_TABORT, 0x00f3);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TX_C_TABORT_NO_SPECIAL, 0x00f4);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, TX_C_TABORT_SPECIAL, 0x00f5);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z14, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
|
2013-12-11 19:44:40 +08:00
|
|
|
|
2020-03-05 14:44:09 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_RO_EXCL_WRITES, 0x0080);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DTLB2_WRITES, 0x0081);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DTLB2_MISSES, 0x0082);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DTLB2_HPAGE_WRITES, 0x0083);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DTLB2_GPAGE_WRITES, 0x0084);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_L2D_SOURCED_WRITES, 0x0085);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, ITLB2_WRITES, 0x0086);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, ITLB2_MISSES, 0x0087);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_L2I_SOURCED_WRITES, 0x0088);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TLB2_PTE_WRITES, 0x0089);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TLB2_CRSTE_WRITES, 0x008a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TLB2_ENGINES_BUSY, 0x008b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TX_C_TEND, 0x008c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TX_NC_TEND, 0x008d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1C_TLB2_MISSES, 0x008f);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONCHIP_L3_SOURCED_WRITES, 0x0090);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONCHIP_MEMORY_SOURCED_WRITES, 0x0091);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONCHIP_L3_SOURCED_WRITES_IV, 0x0092);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONCLUSTER_L3_SOURCED_WRITES, 0x0093);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONCLUSTER_MEMORY_SOURCED_WRITES, 0x0094);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONCLUSTER_L3_SOURCED_WRITES_IV, 0x0095);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_OFFCLUSTER_L3_SOURCED_WRITES, 0x0096);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES, 0x0097);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV, 0x0098);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_OFFDRAWER_L3_SOURCED_WRITES, 0x0099);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_OFFDRAWER_MEMORY_SOURCED_WRITES, 0x009a);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_OFFDRAWER_L3_SOURCED_WRITES_IV, 0x009b);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONDRAWER_L4_SOURCED_WRITES, 0x009c);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_OFFDRAWER_L4_SOURCED_WRITES, 0x009d);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1D_ONCHIP_L3_SOURCED_WRITES_RO, 0x009e);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_ONCHIP_L3_SOURCED_WRITES, 0x00a2);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_ONCHIP_MEMORY_SOURCED_WRITES, 0x00a3);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_ONCHIP_L3_SOURCED_WRITES_IV, 0x00a4);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_ONCLUSTER_L3_SOURCED_WRITES, 0x00a5);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_ONCLUSTER_MEMORY_SOURCED_WRITES, 0x00a6);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_ONCLUSTER_L3_SOURCED_WRITES_IV, 0x00a7);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_OFFCLUSTER_L3_SOURCED_WRITES, 0x00a8);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES, 0x00a9);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV, 0x00aa);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_OFFDRAWER_L3_SOURCED_WRITES, 0x00ab);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_OFFDRAWER_MEMORY_SOURCED_WRITES, 0x00ac);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_OFFDRAWER_L3_SOURCED_WRITES_IV, 0x00ad);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_ONDRAWER_L4_SOURCED_WRITES, 0x00ae);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, L1I_OFFDRAWER_L4_SOURCED_WRITES, 0x00af);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, BCD_DFP_EXECUTION_SLOTS, 0x00e0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, VX_BCD_EXECUTION_SLOTS, 0x00e1);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DECIMAL_INSTRUCTIONS, 0x00e2);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, LAST_HOST_TRANSLATIONS, 0x00e8);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TX_NC_TABORT, 0x00f3);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TX_C_TABORT_NO_SPECIAL, 0x00f4);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, TX_C_TABORT_SPECIAL, 0x00f5);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DFLT_ACCESS, 0x00f7);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DFLT_CYCLES, 0x00fc);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DFLT_CC, 0x00108);
|
2020-07-17 17:27:22 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z15, DFLT_CCFINISH, 0x00109);
|
2020-03-05 14:44:09 +08:00
|
|
|
CPUMF_EVENT_ATTR(cf_z15, MT_DIAG_CYCLES_ONE_THR_ACTIVE, 0x01c0);
|
|
|
|
CPUMF_EVENT_ATTR(cf_z15, MT_DIAG_CYCLES_TWO_THR_ACTIVE, 0x01c1);
|
|
|
|
|
2017-10-10 17:52:02 +08:00
|
|
|
static struct attribute *cpumcf_fvn1_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, CPU_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, INSTRUCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, L1I_DIR_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, L1I_PENALTY_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_CPU_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_INSTRUCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1I_DIR_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1I_PENALTY_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1D_DIR_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, PROBLEM_STATE_L1D_PENALTY_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, L1D_DIR_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn1, L1D_PENALTY_CYCLES),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct attribute *cpumcf_fvn3_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, CPU_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, INSTRUCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, L1I_DIR_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, L1I_PENALTY_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, PROBLEM_STATE_CPU_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, PROBLEM_STATE_INSTRUCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, L1D_DIR_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_fvn3, L1D_PENALTY_CYCLES),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2019-03-28 18:21:47 +08:00
|
|
|
static struct attribute *cpumcf_svn_12345_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_CYCLES),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct attribute *cpumcf_svn_6_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_6, ECC_FUNCTION_COUNT),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_6, ECC_CYCLES_COUNT),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_6, ECC_BLOCKED_FUNCTION_COUNT),
|
|
|
|
CPUMF_EVENT_PTR(cf_svn_6, ECC_BLOCKED_CYCLES_COUNT),
|
2013-12-11 19:44:40 +08:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct attribute *cpumcf_z10_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1I_L2_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1D_L2_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1I_L3_LOCAL_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1D_L3_LOCAL_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1I_L3_REMOTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1D_L3_REMOTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1D_LMEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1I_LMEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1D_RO_EXCL_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L1I_CACHELINE_INVALIDATES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, ITLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, DTLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, TLB2_PTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, TLB2_CRSTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, TLB2_CRSTE_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, ITLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, DTLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z10, L2C_STORES_SENT),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct attribute *cpumcf_z196_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_L2_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1I_L2_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, DTLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, ITLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L2C_STORES_SENT),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_OFFBOOK_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_ONBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1I_ONBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_RO_EXCL_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_OFFBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1I_OFFBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, DTLB1_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_LMEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1I_LMEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1I_OFFBOOK_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, DTLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, ITLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, TLB2_PTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, TLB2_CRSTE_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, TLB2_CRSTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1D_OFFCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1I_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z196, L1I_OFFCHIP_L3_SOURCED_WRITES),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct attribute *cpumcf_zec12_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, DTLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, ITLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_L2I_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_L2I_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_L2D_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, DTLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_LMEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_LMEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_RO_EXCL_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, DTLB1_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, ITLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TLB2_PTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TLB2_CRSTE_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TLB2_CRSTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_ONBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TX_NC_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_OFFCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1D_OFFBOOK_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_ONBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TX_C_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_OFFCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, L1I_OFFBOOK_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TX_NC_TABORT),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TX_C_TABORT_NO_SPECIAL),
|
|
|
|
CPUMF_EVENT_PTR(cf_zec12, TX_C_TABORT_SPECIAL),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2017-02-17 19:16:00 +08:00
|
|
|
static struct attribute *cpumcf_z13_pmu_event_attr[] __initdata = {
|
2018-04-18 23:59:58 +08:00
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_RO_EXCL_WRITES),
|
2017-02-17 19:16:00 +08:00
|
|
|
CPUMF_EVENT_PTR(cf_z13, DTLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, DTLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, DTLB1_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, DTLB1_GPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_L2D_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, ITLB1_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, ITLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_L2I_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TLB2_PTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TLB2_CRSTE_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TLB2_CRSTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TX_C_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TX_NC_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1C_TLB1_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONNODE_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONDRAWER_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_OFFDRAWER_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1D_ONCHIP_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONNODE_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONDRAWER_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_OFFDRAWER_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, L1I_ONCHIP_MEM_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TX_NC_TABORT),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TX_C_TABORT_NO_SPECIAL),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, TX_C_TABORT_SPECIAL),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, MT_DIAG_CYCLES_ONE_THR_ACTIVE),
|
|
|
|
CPUMF_EVENT_PTR(cf_z13, MT_DIAG_CYCLES_TWO_THR_ACTIVE),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2017-10-10 17:52:02 +08:00
|
|
|
static struct attribute *cpumcf_z14_pmu_event_attr[] __initdata = {
|
2018-04-18 23:59:58 +08:00
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_RO_EXCL_WRITES),
|
2017-10-10 17:52:02 +08:00
|
|
|
CPUMF_EVENT_PTR(cf_z14, DTLB2_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, DTLB2_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, DTLB2_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, DTLB2_GPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_L2D_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, ITLB2_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, ITLB2_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_L2I_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TLB2_PTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TLB2_CRSTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TLB2_ENGINES_BUSY),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TX_C_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TX_NC_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1C_TLB2_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_OFFDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1D_ONCHIP_L3_SOURCED_WRITES_RO),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_ONCHIP_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_ONCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_ONCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_ONDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, L1I_OFFDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, BCD_DFP_EXECUTION_SLOTS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, VX_BCD_EXECUTION_SLOTS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, DECIMAL_INSTRUCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, LAST_HOST_TRANSLATIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TX_NC_TABORT),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TX_C_TABORT_NO_SPECIAL),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, TX_C_TABORT_SPECIAL),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, MT_DIAG_CYCLES_ONE_THR_ACTIVE),
|
|
|
|
CPUMF_EVENT_PTR(cf_z14, MT_DIAG_CYCLES_TWO_THR_ACTIVE),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2020-03-05 14:44:09 +08:00
|
|
|
static struct attribute *cpumcf_z15_pmu_event_attr[] __initdata = {
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_RO_EXCL_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DTLB2_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DTLB2_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DTLB2_HPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DTLB2_GPAGE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_L2D_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, ITLB2_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, ITLB2_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_L2I_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TLB2_PTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TLB2_CRSTE_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TLB2_ENGINES_BUSY),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TX_C_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TX_NC_TEND),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1C_TLB2_MISSES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONCHIP_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_OFFCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_OFFCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_OFFCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_OFFDRAWER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_OFFDRAWER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_OFFDRAWER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_OFFDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1D_ONCHIP_L3_SOURCED_WRITES_RO),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_ONCHIP_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_ONCHIP_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_ONCHIP_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_ONCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_ONCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_ONCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_OFFCLUSTER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_OFFCLUSTER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_OFFCLUSTER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_OFFDRAWER_L3_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_OFFDRAWER_MEMORY_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_OFFDRAWER_L3_SOURCED_WRITES_IV),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_ONDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, L1I_OFFDRAWER_L4_SOURCED_WRITES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, BCD_DFP_EXECUTION_SLOTS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, VX_BCD_EXECUTION_SLOTS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DECIMAL_INSTRUCTIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, LAST_HOST_TRANSLATIONS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TX_NC_TABORT),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TX_C_TABORT_NO_SPECIAL),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, TX_C_TABORT_SPECIAL),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DFLT_ACCESS),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DFLT_CYCLES),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, DFLT_CC),
|
2020-07-17 17:27:22 +08:00
|
|
|
CPUMF_EVENT_PTR(cf_z15, DFLT_CCFINISH),
|
2020-03-05 14:44:09 +08:00
|
|
|
CPUMF_EVENT_PTR(cf_z15, MT_DIAG_CYCLES_ONE_THR_ACTIVE),
|
|
|
|
CPUMF_EVENT_PTR(cf_z15, MT_DIAG_CYCLES_TWO_THR_ACTIVE),
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2013-12-11 19:44:40 +08:00
|
|
|
/* END: CPUM_CF COUNTER DEFINITIONS ===================================== */
|
|
|
|
|
2017-02-17 19:53:55 +08:00
|
|
|
static struct attribute_group cpumcf_pmu_events_group = {
|
2013-12-11 19:44:40 +08:00
|
|
|
.name = "events",
|
|
|
|
};
|
|
|
|
|
|
|
|
PMU_FORMAT_ATTR(event, "config:0-63");
|
|
|
|
|
2017-02-17 19:53:55 +08:00
|
|
|
static struct attribute *cpumcf_pmu_format_attr[] = {
|
2013-12-11 19:44:40 +08:00
|
|
|
&format_attr_event.attr,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
2017-02-17 19:53:55 +08:00
|
|
|
static struct attribute_group cpumcf_pmu_format_group = {
|
2013-12-11 19:44:40 +08:00
|
|
|
.name = "format",
|
2017-02-17 19:53:55 +08:00
|
|
|
.attrs = cpumcf_pmu_format_attr,
|
2013-12-11 19:44:40 +08:00
|
|
|
};
|
|
|
|
|
2017-02-17 19:53:55 +08:00
|
|
|
static const struct attribute_group *cpumcf_pmu_attr_groups[] = {
|
|
|
|
&cpumcf_pmu_events_group,
|
|
|
|
&cpumcf_pmu_format_group,
|
2013-12-11 19:44:40 +08:00
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static __init struct attribute **merge_attr(struct attribute **a,
|
2017-10-10 17:52:02 +08:00
|
|
|
struct attribute **b,
|
|
|
|
struct attribute **c)
|
2013-12-11 19:44:40 +08:00
|
|
|
{
|
|
|
|
struct attribute **new;
|
|
|
|
int j, i;
|
|
|
|
|
|
|
|
for (j = 0; a[j]; j++)
|
|
|
|
;
|
|
|
|
for (i = 0; b[i]; i++)
|
|
|
|
j++;
|
2017-10-10 17:52:02 +08:00
|
|
|
for (i = 0; c[i]; i++)
|
|
|
|
j++;
|
2013-12-11 19:44:40 +08:00
|
|
|
j++;
|
|
|
|
|
treewide: kmalloc() -> kmalloc_array()
The kmalloc() function has a 2-factor argument form, kmalloc_array(). This
patch replaces cases of:
kmalloc(a * b, gfp)
with:
kmalloc_array(a * b, gfp)
as well as handling cases of:
kmalloc(a * b * c, gfp)
with:
kmalloc(array3_size(a, b, c), gfp)
as it's slightly less ugly than:
kmalloc_array(array_size(a, b), c, gfp)
This does, however, attempt to ignore constant size factors like:
kmalloc(4 * 1024, gfp)
though any constants defined via macros get caught up in the conversion.
Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.
The tools/ directory was manually excluded, since it has its own
implementation of kmalloc().
The Coccinelle script used for this was:
// Fix redundant parens around sizeof().
@@
type TYPE;
expression THING, E;
@@
(
kmalloc(
- (sizeof(TYPE)) * E
+ sizeof(TYPE) * E
, ...)
|
kmalloc(
- (sizeof(THING)) * E
+ sizeof(THING) * E
, ...)
)
// Drop single-byte sizes and redundant parens.
@@
expression COUNT;
typedef u8;
typedef __u8;
@@
(
kmalloc(
- sizeof(u8) * (COUNT)
+ COUNT
, ...)
|
kmalloc(
- sizeof(__u8) * (COUNT)
+ COUNT
, ...)
|
kmalloc(
- sizeof(char) * (COUNT)
+ COUNT
, ...)
|
kmalloc(
- sizeof(unsigned char) * (COUNT)
+ COUNT
, ...)
|
kmalloc(
- sizeof(u8) * COUNT
+ COUNT
, ...)
|
kmalloc(
- sizeof(__u8) * COUNT
+ COUNT
, ...)
|
kmalloc(
- sizeof(char) * COUNT
+ COUNT
, ...)
|
kmalloc(
- sizeof(unsigned char) * COUNT
+ COUNT
, ...)
)
// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@
(
- kmalloc
+ kmalloc_array
(
- sizeof(TYPE) * (COUNT_ID)
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(TYPE) * COUNT_ID
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(TYPE) * (COUNT_CONST)
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(TYPE) * COUNT_CONST
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(THING) * (COUNT_ID)
+ COUNT_ID, sizeof(THING)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(THING) * COUNT_ID
+ COUNT_ID, sizeof(THING)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(THING) * (COUNT_CONST)
+ COUNT_CONST, sizeof(THING)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(THING) * COUNT_CONST
+ COUNT_CONST, sizeof(THING)
, ...)
)
// 2-factor product, only identifiers.
@@
identifier SIZE, COUNT;
@@
- kmalloc
+ kmalloc_array
(
- SIZE * COUNT
+ COUNT, SIZE
, ...)
// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@
(
kmalloc(
- sizeof(TYPE) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kmalloc(
- sizeof(TYPE) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kmalloc(
- sizeof(TYPE) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kmalloc(
- sizeof(TYPE) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kmalloc(
- sizeof(THING) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kmalloc(
- sizeof(THING) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kmalloc(
- sizeof(THING) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kmalloc(
- sizeof(THING) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
)
// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@
(
kmalloc(
- sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kmalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kmalloc(
- sizeof(THING1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kmalloc(
- sizeof(THING1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kmalloc(
- sizeof(TYPE1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
|
kmalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
)
// 3-factor product, only identifiers, with redundant parens removed.
@@
identifier STRIDE, SIZE, COUNT;
@@
(
kmalloc(
- (COUNT) * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kmalloc(
- COUNT * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kmalloc(
- COUNT * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kmalloc(
- (COUNT) * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kmalloc(
- COUNT * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kmalloc(
- (COUNT) * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kmalloc(
- (COUNT) * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kmalloc(
- COUNT * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
)
// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression E1, E2, E3;
constant C1, C2, C3;
@@
(
kmalloc(C1 * C2 * C3, ...)
|
kmalloc(
- (E1) * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
|
kmalloc(
- (E1) * (E2) * E3
+ array3_size(E1, E2, E3)
, ...)
|
kmalloc(
- (E1) * (E2) * (E3)
+ array3_size(E1, E2, E3)
, ...)
|
kmalloc(
- E1 * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
)
// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@
(
kmalloc(sizeof(THING) * C2, ...)
|
kmalloc(sizeof(TYPE) * C2, ...)
|
kmalloc(C1 * C2 * C3, ...)
|
kmalloc(C1 * C2, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(TYPE) * (E2)
+ E2, sizeof(TYPE)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(TYPE) * E2
+ E2, sizeof(TYPE)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(THING) * (E2)
+ E2, sizeof(THING)
, ...)
|
- kmalloc
+ kmalloc_array
(
- sizeof(THING) * E2
+ E2, sizeof(THING)
, ...)
|
- kmalloc
+ kmalloc_array
(
- (E1) * E2
+ E1, E2
, ...)
|
- kmalloc
+ kmalloc_array
(
- (E1) * (E2)
+ E1, E2
, ...)
|
- kmalloc
+ kmalloc_array
(
- E1 * E2
+ E1, E2
, ...)
)
Signed-off-by: Kees Cook <keescook@chromium.org>
2018-06-13 04:55:00 +08:00
|
|
|
new = kmalloc_array(j, sizeof(struct attribute *), GFP_KERNEL);
|
2013-12-11 19:44:40 +08:00
|
|
|
if (!new)
|
|
|
|
return NULL;
|
|
|
|
j = 0;
|
|
|
|
for (i = 0; a[i]; i++)
|
|
|
|
new[j++] = a[i];
|
|
|
|
for (i = 0; b[i]; i++)
|
|
|
|
new[j++] = b[i];
|
2017-10-10 17:52:02 +08:00
|
|
|
for (i = 0; c[i]; i++)
|
|
|
|
new[j++] = c[i];
|
2013-12-11 19:44:40 +08:00
|
|
|
new[j] = NULL;
|
|
|
|
|
|
|
|
return new;
|
|
|
|
}
|
|
|
|
|
|
|
|
__init const struct attribute_group **cpumf_cf_event_group(void)
|
|
|
|
{
|
2017-10-10 17:52:02 +08:00
|
|
|
struct attribute **combined, **model, **cfvn, **csvn;
|
2017-02-17 19:16:00 +08:00
|
|
|
struct attribute *none[] = { NULL };
|
2017-10-10 17:52:02 +08:00
|
|
|
struct cpumf_ctr_info ci;
|
2013-12-11 19:44:40 +08:00
|
|
|
struct cpuid cpu_id;
|
|
|
|
|
2017-10-10 17:52:02 +08:00
|
|
|
/* Determine generic counters set(s) */
|
|
|
|
qctri(&ci);
|
|
|
|
switch (ci.cfvn) {
|
|
|
|
case 1:
|
|
|
|
cfvn = cpumcf_fvn1_pmu_event_attr;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
cfvn = cpumcf_fvn3_pmu_event_attr;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
cfvn = none;
|
|
|
|
}
|
2019-03-28 18:21:47 +08:00
|
|
|
|
|
|
|
/* Determine version specific crypto set */
|
|
|
|
switch (ci.csvn) {
|
|
|
|
case 1 ... 5:
|
|
|
|
csvn = cpumcf_svn_12345_pmu_event_attr;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
csvn = cpumcf_svn_6_pmu_event_attr;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
csvn = none;
|
|
|
|
}
|
2017-10-10 17:52:02 +08:00
|
|
|
|
|
|
|
/* Determine model-specific counter set(s) */
|
2013-12-11 19:44:40 +08:00
|
|
|
get_cpu_id(&cpu_id);
|
|
|
|
switch (cpu_id.machine) {
|
|
|
|
case 0x2097:
|
|
|
|
case 0x2098:
|
|
|
|
model = cpumcf_z10_pmu_event_attr;
|
|
|
|
break;
|
|
|
|
case 0x2817:
|
|
|
|
case 0x2818:
|
|
|
|
model = cpumcf_z196_pmu_event_attr;
|
|
|
|
break;
|
|
|
|
case 0x2827:
|
|
|
|
case 0x2828:
|
|
|
|
model = cpumcf_zec12_pmu_event_attr;
|
|
|
|
break;
|
2017-02-17 19:16:00 +08:00
|
|
|
case 0x2964:
|
|
|
|
case 0x2965:
|
|
|
|
model = cpumcf_z13_pmu_event_attr;
|
|
|
|
break;
|
2017-10-10 17:52:02 +08:00
|
|
|
case 0x3906:
|
2018-04-13 20:04:24 +08:00
|
|
|
case 0x3907:
|
2020-03-05 14:44:09 +08:00
|
|
|
model = cpumcf_z14_pmu_event_attr;
|
|
|
|
break;
|
2019-04-12 17:32:28 +08:00
|
|
|
case 0x8561:
|
|
|
|
case 0x8562:
|
2020-03-05 14:44:09 +08:00
|
|
|
model = cpumcf_z15_pmu_event_attr;
|
2017-10-10 17:52:02 +08:00
|
|
|
break;
|
2013-12-11 19:44:40 +08:00
|
|
|
default:
|
2017-02-17 19:16:00 +08:00
|
|
|
model = none;
|
2013-12-11 19:44:40 +08:00
|
|
|
break;
|
2017-01-02 15:51:02 +08:00
|
|
|
}
|
2013-12-11 19:44:40 +08:00
|
|
|
|
2017-10-10 17:52:02 +08:00
|
|
|
combined = merge_attr(cfvn, csvn, model);
|
2013-12-11 19:44:40 +08:00
|
|
|
if (combined)
|
2017-02-17 19:53:55 +08:00
|
|
|
cpumcf_pmu_events_group.attrs = combined;
|
|
|
|
return cpumcf_pmu_attr_groups;
|
2013-12-11 19:44:40 +08:00
|
|
|
}
|