Global stability and bifurcation of macroscopic traffic flow models for upslope and downslope