[PATCH v4 11/13] coresight: Refactor out buffer allocation function for ETR