Tear it apart and see what going on.If the upper bearing cup is turning and the headtube is NOT cracked,you can fix it.
If the upper bearing race is loose in the headtube and everything looks fine,you can use some bearing mount to secure it in place.There isn't much strain on the upper bearing,it's just along for the ride and centers the steering tube.