static inline void shub_mmr_write(cnodeid_t cnode, shubreg_t reg, uint64_t val) { int nasid = cnodeid_to_nasid(cnode); volatile uint64_t *addr = (uint64_t *)(GLOBAL_MMR_ADDR(nasid, reg)); *addr = val; __ia64_mf_a(); }
/** * sn_inl - read a word from a port * @port: port to read from * * Reads a word from @port and returns it to the caller. */ unsigned int sn_inl (unsigned long port) { volatile unsigned int *addr = sn_io_addr(port); unsigned int ret; ret = *addr; __ia64_mf_a(); return ret; }
static inline uint32_t shub_mmr_read32(cnodeid_t cnode, shubreg_t reg) { int nasid = cnodeid_to_nasid(cnode); volatile uint32_t val; val = *(uint32_t *)(GLOBAL_MMR_ADDR(nasid, reg)); __ia64_mf_a(); return val; }