US stocks have closed mostly higher as investors cheered reports that US-Iranian peace talks may start again.