Skip to content

Commit 22aa939

Browse files
Vladimir IsaevVVIsaev
authored andcommitted
ARC: Add missing CC_NAMEs for ARC32
ARC32 has 32-bit AUX registers, but 16 bytes countable condition names. It uses two more CC_NAME registers to provide condition names. Signed-off-by: Vladimir Isaev <isaev@synopsys.com>
1 parent a154b5e commit 22aa939

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

arch/arc/include/asm/perf_event.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#define ARC_REG_CC_INDEX 0x240
1717
#define ARC_REG_CC_NAME0 0x241
1818
#define ARC_REG_CC_NAME1 0x242
19+
#define ARC_REG_CC_NAME2 0x243
20+
#define ARC_REG_CC_NAME3 0x244
1921

2022
#define ARC_REG_PCT_BUILD 0xF5
2123
#define ARC_REG_PCT_COUNTL 0x250

arch/arc/kernel/perf_event.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,13 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
585585

586586
union cc_name {
587587
struct {
588-
#ifdef CONFIG_ISA_ARCV3
588+
#ifdef CONFIG_64BIT
589589
u64 word0, word1;
590590
#else
591591
u32 word0, word1;
592+
#ifdef CONFIG_ISA_ARCV3
593+
u32 word2, word3;
594+
#endif
592595
#endif
593596
char sentinel;
594597
} indiv;
@@ -643,6 +646,10 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
643646
#else
644647
cc_name.indiv.word0 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME0));
645648
cc_name.indiv.word1 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME1));
649+
#ifdef CONFIG_ISA_ARCV3
650+
cc_name.indiv.word2 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME2));
651+
cc_name.indiv.word3 = le32_to_cpu(read_aux_reg(ARC_REG_CC_NAME3));
652+
#endif
646653
#endif
647654
arc_pmu_map_hw_event(i, cc_name.str);
648655
arc_pmu_add_raw_event_attr(i, cc_name.str);

0 commit comments

Comments
 (0)