Page MenuHomeFreeBSD

riscv/pmap.c: Don't pass hartid map to 'smp_rendezvous_cpus'
Needs ReviewPublic

Authored by bnovkov on Sun, Sep 27, 7:07 PM.
Tags
None
Referenced Files
F173736508: D60072.id187833.diff
Mon, Sep 28, 1:08 AM
F173736263: D60072.diff
Mon, Sep 28, 1:06 AM
F173727602: D60072.id187833.diff
Sun, Sep 27, 11:53 PM
F173726977: D60072.diff
Sun, Sep 27, 11:48 PM
F173725639: D60072.diff
Sun, Sep 27, 11:35 PM
F173720182: D60072.id187833.diff
Sun, Sep 27, 10:46 PM
Subscribers

Details

Reviewers
markj
Group Reviewers
riscv
Summary

The pm_active bitmask is indexed by hart IDs which can differ from
CPU IDs. pmap_invalidate_range_svinval assumes that the map is
indexed by CPU IDs, which is wrong and causes remote TLB invalidations
on unrelated CPUs.

Fix this by adding a routine that converts a hart-indexed bitmask
to a CPU ID-indexed bitmask. While we're here, fix a similar issue
in pmap_active_cpus.

Fixes: 99360212c739 ("riscv/pmap.c: Add an Svinval-aware variant of pmap_invalidate_range")
Reported by: markj

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77387
Build 74270: arc lint + arc unit