Add and use a generic version of devmem_is_allowed()