'No magic solution' to unrest, Iraq PM Mahdi warns