[PATCH v3 12/20] coresight: tmc-etr: Refactor function tmc_etr_setup_perf_buf()