From 07062e186b0bbbc12bf27a253e6c3ed5dd25c29f Mon Sep 17 00:00:00 2001 From: Sumit Garg Date: Mon, 12 Aug 2019 14:50:33 +0530 Subject: [PATCH] [Fix] libutee: add headers for user-space to access sysregs On QEMU 32 bit machine, sysreg APIs aren't inlined but created as separate functions. As we don't need to profile these APIs, mark them as "__noprof". Signed-off-by: Sumit Garg --- scripts/arm32_sysreg.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/arm32_sysreg.py b/scripts/arm32_sysreg.py index bd0c619eafe..38aeb398946 100755 --- a/scripts/arm32_sysreg.py +++ b/scripts/arm32_sysreg.py @@ -69,7 +69,7 @@ def gen_read64_func(reg_name, opc1, crm, descr): print('') if len(descr): print('/* ' + descr + ' */') - print('static inline uint64_t read_' + reg_name.lower() + '(void)') + print('static inline __noprof uint64_t read_' + reg_name.lower() + '(void)') print('{') print('\tuint64_t v;') print('') @@ -84,7 +84,8 @@ def gen_write64_func(reg_name, opc1, crm, descr): print('') if len(descr): print('/* ' + descr + ' */') - print('static inline void write_' + reg_name.lower() + '(uint64_t v)') + print('static inline __noprof void write_' + reg_name.lower() + + '(uint64_t v)') print('{') print('\tasm volatile ("mcrr p15, ' + opc1 + ', %Q0, %R0, ' + crm + '"' + ' : : "r" (v));') @@ -95,7 +96,7 @@ def gen_read32_func(reg_name, crn, opc1, crm, opc2, descr): print('') if len(descr): print('/* ' + descr + ' */') - print('static inline uint32_t read_' + reg_name.lower() + '(void)') + print('static inline __noprof uint32_t read_' + reg_name.lower() + '(void)') print('{') print('\tuint32_t v;') print('') @@ -110,7 +111,8 @@ def gen_write32_func(reg_name, crn, opc1, crm, opc2, descr): print('') if len(descr): print('/* ' + descr + ' */') - print('static inline void write_' + reg_name.lower() + '(uint32_t v)') + print('static inline __noprof void write_' + reg_name.lower() + + '(uint32_t v)') print('{') print('\tasm volatile ("mcr p15, ' + opc1 + ', %0, ' + crn + ', ' + crm + ', ' + opc2 + '"' + ' : : "r" (v));')