in bridges/vme_fake.c [377:415]
static void fake_lm_check(struct fake_driver *bridge, unsigned long long addr,
u32 aspace, u32 cycle)
{
struct vme_bridge *fake_bridge;
unsigned long long lm_base;
u32 lm_aspace, lm_cycle;
int i;
struct vme_lm_resource *lm;
struct list_head *pos = NULL, *n;
/* Get vme_bridge */
fake_bridge = bridge->parent;
/* Loop through each location monitor resource */
list_for_each_safe(pos, n, &fake_bridge->lm_resources) {
lm = list_entry(pos, struct vme_lm_resource, list);
/* If disabled, we're done */
if (bridge->lm_enabled == 0)
return;
lm_base = bridge->lm_base;
lm_aspace = bridge->lm_aspace;
lm_cycle = bridge->lm_cycle;
/* First make sure that the cycle and address space match */
if ((lm_aspace == aspace) && (lm_cycle == cycle)) {
for (i = 0; i < lm->monitors; i++) {
/* Each location monitor covers 8 bytes */
if (((lm_base + (8 * i)) <= addr) &&
((lm_base + (8 * i) + 8) > addr)) {
if (bridge->lm_callback[i])
bridge->lm_callback[i](
bridge->lm_data[i]);
}
}
}
}
}