[PATCH 6/8] coresight: Refactor out buffer allocation function for ETR