Unverified Commit afacf632 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2488 coresight: etm4x: Match all ETM4 instances based on DEVARCH and DEVTYPE

Merge Pull Request from: @ci-robot 
 
PR sync from: Junhao He <hejunhao3@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/MMO2TJLVTL3MCIFJG3WSXVI5XEBG6QOI/ 
Match all ETM4 instances based on DEVARCH and DEVTYPE

Junhao He (1):
  Revert "coresight: etm4x: Add Support for HiSilicon T6 ETM"

Suzuki K Poulose (1):
  coresight: etm4x: Match all ETM4 instances based on DEVARCH and
    DEVTYPE


-- 
2.33.0
 
https://gitee.com/openeuler/kernel/issues/I89N5L 
 
Link:https://gitee.com/openeuler/kernel/pulls/2488

 

Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents cbb6250d 72a949c1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2130,7 +2130,11 @@ static const struct amba_id etm4_ids[] = {
	CS_AMBA_UCI_ID(0x000cc0af, uci_id_etm4),/* Marvell ThunderX2 */
	CS_AMBA_UCI_ID(0x000b6d01, uci_id_etm4),/* HiSilicon-Hip08 */
	CS_AMBA_UCI_ID(0x000b6d02, uci_id_etm4),/* HiSilicon-Hip09 */
	CS_AMBA_UCI_ID(0x000b6d45, uci_id_etm4),/* HiSilicon-T6 */
	/*
	 * Match all PIDs with ETM4 DEVARCH. No need for adding any of the new
	 * CPUs to the list here.
	 */
	CS_AMBA_MATCH_ALL_UCI(uci_id_etm4),
	{},
};

+17 −2
Original line number Diff line number Diff line
@@ -193,12 +193,27 @@ extern void coresight_remove_cti_ops(void);
	}

/* coresight AMBA ID, full UCI structure: id table entry. */
#define CS_AMBA_UCI_ID(pid, uci_ptr)		\
#define __CS_AMBA_UCI_ID(pid, m, uci_ptr)	\
	{					\
		.id	= pid,			\
		.mask	= 0x000fffff,		\
		.mask	= m,			\
		.data	= (void *)uci_ptr	\
	}
#define CS_AMBA_UCI_ID(pid, uci)	__CS_AMBA_UCI_ID(pid, 0x000fffff, uci)
/*
 * PIDR2[JEDEC], BIT(3) must be 1 (Read As One) to indicate that rest of the
 * PIDR1, PIDR2 DES_* fields follow JEDEC encoding for the designer. Use that
 * as a match value for blanket matching all devices in the given CoreSight
 * device type and architecture.
 */
#define PIDR2_JEDEC			BIT(3)
#define PID_PIDR2_JEDEC			(PIDR2_JEDEC << 16)
/*
 * Match all PIDs in a given CoreSight device type and architecture, defined
 * by the uci.
 */
#define CS_AMBA_MATCH_ALL_UCI(uci)					\
	__CS_AMBA_UCI_ID(PID_PIDR2_JEDEC, PID_PIDR2_JEDEC, uci)

/* extract the data value from a UCI structure given amba_id pointer. */
static inline void *coresight_get_uci_data(const struct amba_id *id)