smp_topo: dynamically allocate group array
(cherry picked from commit 9801e7c275f6ec42a44b98a2e2e1a8ac4674a096)