<commit_before>#include "dev_epiphany.h"

static int epiphany_team_coords_to_dev_coords(struct team *team,
                                              const p_coords_t *team_coords,
                                              p_coords_t *dev_coords);

static int dev_query(struct dev *dev, int property)
{
    if (!dev)
        return -EINVAL;

    switch (property) {
    case P_PROP_TYPE:
        return P_DEV_EPIPHANY;
    case P_PROP_NODES:
        return 16;
    case P_PROP_TOPOLOGY:
        return 2;
    case P_PROP_ROWS:
        return 4;
    case P_PROP_COLS:
        return 4;
    case P_PROP_PLANES:
        return 4;
    case P_PROP_CHIPROWS:
        return 4;
    case P_PROP_CHIPCOLS:
        return 4;
    case P_PROP_SIMD:
        return 1;
    case P_PROP_MEMSIZE:
        return 32768;
    case P_PROP_MEMBASE:
        return 0x80800000;
    case P_PROP_VERSION:
        return 0xdeadbeef;
    case P_PROP_MEMARCH:
    case P_PROP_WHOAMI:
        return -ENOSYS;
    }
    return -EINVAL;
}

static void *dev_map_member(struct team *team, int rank,
                            unsigned long offset, unsigned long size)
{
    uintptr_t coreid, addr;
<commit_msg>devices/epiphany/epiphany: p_query: Report actual properties<commit_after>#include "dev_epiphany.h"

static inline struct epiphany_dev *to_epiphany_dev(struct dev *dev)
{
    return container_of(dev, struct epiphany_dev, dev);
}


static int epiphany_team_coords_to_dev_coords(struct team *team,
                                              const p_coords_t *team_coords,
                                              p_coords_t *dev_coords);

static int dev_query(struct dev *dev, int property)
{
    struct epiphany_dev *epiphany = to_epiphany_dev(dev);

    switch (property) {
    case P_PROP_TYPE:
        return P_DEV_EPIPHANY;
    case P_PROP_NODES:
        return epiphany->dev.size.row * epiphany->dev.size.col;
    case P_PROP_TOPOLOGY:
        return P_TOPOLOGY_2D;
    case P_PROP_ROWS:
        return epiphany->dev.size.row;
    case P_PROP_COLS:
        return epiphany->dev.size.col;
    case P_PROP_PLANES:
        return 1;
    case P_PROP_CHIPROWS:
        return epiphany->dev.size.row;
    case P_PROP_CHIPCOLS:
        return epiphany->dev.size.col;
    case P_PROP_SIMD:
        return 1;
    case P_PROP_MEMSIZE:
        return epiphany->eram_size;
    case P_PROP_MEMBASE:
        return epiphany->eram_base;
    case P_PROP_VERSION:
        return 0xdeadbeef;
    case P_PROP_MEMARCH:
    case P_PROP_WHOAMI:
        return -ENOSYS;
    }
    return -EINVAL;
}

static void *dev_map_member(struct team *team, int rank,
                            unsigned long offset, unsigned long size)
{
    uintptr_t coreid, addr;

{'fraction_non_alphanumeric': 0.06742396482227922, 'fraction_numerical': 0.010260168559912056, 'mean_word_length': 2.112884834663626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3423346', 'n_tokens_mistral': 957, 'n_tokens_neox': 924, 'n_words': 211}