Bug fix: Rectify logic to enter or exit from DVM domain

Currently, `ccn_snoop_dvm_domain_common()` is responsible for providing
a bitmap of HN-F and HN-I nodes in the interconnect. There is a request
node (RN) corresponding to the master interface (e.g. cluster) that needs
to be added or removed from the snoop/DVM domain. This request node is
removed from or added to each HN-F or HN-I node present in the bitmap
depending upon the type of domain.

The above logic is incorrect when participation of a master interface in
the DVM domain has to be managed. The request node should be removed
from or added to the single Miscellaneous Node (MN) in the system
instead of each HN-I node.

This patch fixes this by removing the intermediate
`ccn_snoop_dvm_domain_common()` and instead reads the MN registers to
get the needed node Id bitmap for snoop(HN-F bitmap) and DVM(MN bitmap)
domains.

Additionally, it renames `MN_DDC_SET_OFF` to `MN_DDC_SET_OFFSET` to
be inline with other macros.

Change-Id: Id896046dd0ccc5092419e74f8ac85e31b104f7a4
This commit is contained in:
Vikram Kanigiri 2016-01-04 16:23:22 +00:00
parent dbc807179f
commit 3105f7ba9a
2 changed files with 51 additions and 61 deletions

View file

@ -147,7 +147,7 @@ typedef enum rn_types {
#define MN_HNI_NODEID_OFFSET 0x01C0
#define MN_SN_NODEID_OFFSET 0x01D0
#define MN_DDC_STAT_OFFSET DOMAIN_CTRL_STAT_OFFSET
#define MN_DDC_SET_OFF DOMAIN_CTRL_SET_OFFSET
#define MN_DDC_SET_OFFSET DOMAIN_CTRL_SET_OFFSET
#define MN_DDC_CLR_OFFSET DOMAIN_CTRL_CLR_OFFSET
#define MN_ID_OFFSET REGION_ID_OFFSET
@ -236,4 +236,21 @@ static inline unsigned int count_set_bits(uint64_t bitmap)
*/
#define FOR_EACH_PRESENT_MASTER_INTERFACE(iface_id, bit_map) \
FOR_EACH_BIT(iface_id, bit_map)
/*
* Macro that returns the node id bit map for the Miscellaneous Node
*/
#define CCN_GET_MN_NODEID_MAP(periphbase) \
(1 << get_node_id(ccn_reg_read(periphbase, MN_REGION_ID, \
REGION_ID_OFFSET)))
/*
* This macro returns the bitmap of Home nodes on the basis of the
* 'mn_hn_id_reg_offset' parameter from the Miscellaneous node's (MN)
* programmer's view. The MN has a register which carries the bitmap of present
* Home nodes of each type i.e. HN-Fs, HN-Is & HN-Ds.
*/
#define CCN_GET_HN_NODEID_MAP(periphbase, mn_hn_id_reg_offset) \
ccn_reg_read(periphbase, MN_REGION_ID, mn_hn_id_reg_offset)
#endif /* __CCN_PRIVATE_H__ */