Compounds of the formula I:
or pharmaceutically acceptable salts thereof, wherein m, n, R
1
, R
2
, R
3
, R
4
, R
5
and R
a
are as defined herein. Also disclosed are methods of making the compounds and using the compounds for treatment of diseases associated with the P2X7 purinergic receptor.