Move the initial clearing of the mask from the callers to
riscv_cpuid_to_hartid_mask, and remove the unused !CONFIG_SMP stub.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
        return boot_cpu_hartid;
 }
 
-static inline void riscv_cpuid_to_hartid_mask(const struct cpumask *in,
-                                             struct cpumask *out)
-{
-       cpumask_set_cpu(cpuid_to_hartid_map(0), out);
-}
-
 #endif /* CONFIG_SMP */
 #endif /* _ASM_RISCV_SMP_H */
 
 {
        struct cpumask hmask;
 
-       cpumask_clear(&hmask);
        riscv_cpuid_to_hartid_mask(cmask, &hmask);
        sbi_remote_sfence_vma(hmask.bits, start, size);
 }
 
 {
        int cpu;
 
+       cpumask_clear(out);
        for_each_cpu(cpu, in)
                cpumask_set_cpu(cpuid_to_hartid_map(cpu), out);
 }
 
        cpumask_andnot(&others, mm_cpumask(mm), cpumask_of(cpu));
        local |= cpumask_empty(&others);
        if (mm != current->active_mm || !local) {
-               cpumask_clear(&hmask);
                riscv_cpuid_to_hartid_mask(&others, &hmask);
                sbi_remote_fence_i(hmask.bits);
        } else {