From 092f1132fe092a5259a629917c91b40fd8d4c5ef Mon Sep 17 00:00:00 2001 From: Yonattan Louise Date: Fri, 8 May 2015 17:12:46 -0500 Subject: [PATCH] Rename _IsrTable to _sw_isr_table Updating global variable's name to follow a consistent naming convention. Change accomplished with the following script: #!/bin/bash echo "Searching for ${1} to replace with ${2}" find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \ ! -path "./host/src/genIdt/*" \ ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g'; Change-Id: I7fc572f869c5f104538cfb3f84b1b36071e54dde Signed-off-by: Yonattan Louise --- arch/arc/core/irq_manage.c | 10 +++++----- arch/arc/core/isr_wrapper.s | 2 +- arch/arm/core/irq_manage.c | 10 +++++----- arch/arm/core/isr_wrapper.s | 4 ++-- arch/arm/fsl_frdm_k64f/sw_isr_table.c | 4 ++-- arch/arm/ti_lm3s6965/sw_isr_table.c | 4 ++-- include/sw_isr_table.h | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/arch/arc/core/irq_manage.c b/arch/arc/core/irq_manage.c index 2285aa1e2b8..1a736ec9ae7 100644 --- a/arch/arc/core/irq_manage.c +++ b/arch/arc/core/irq_manage.c @@ -73,12 +73,12 @@ void irq_handler_set( int key = irq_lock_inline(); int index = irq - 16; - __ASSERT(old == _IsrTable[index].isr, + __ASSERT(old == _sw_isr_table[index].isr, "expected ISR not found in table"); - if (old == _IsrTable[index].isr) { - _IsrTable[index].isr = new; - _IsrTable[index].arg = arg; + if (old == _sw_isr_table[index].isr) { + _sw_isr_table[index].isr = new; + _sw_isr_table[index].arg = arg; } irq_unlock_inline(key); @@ -201,5 +201,5 @@ void irq_disconnect(unsigned int irq) { int index = irq - 16; - irq_handler_set(irq, _IsrTable[index].isr, _irq_spurious, NULL); + irq_handler_set(irq, _sw_isr_table[index].isr, _irq_spurious, NULL); } diff --git a/arch/arc/core/isr_wrapper.s b/arch/arc/core/isr_wrapper.s index 1cec49cb40d..b2202004c52 100644 --- a/arch/arc/core/isr_wrapper.s +++ b/arch/arc/core/isr_wrapper.s @@ -227,7 +227,7 @@ SECTION_FUNC(TEXT, _isr_demux) lr r0, [_ARC_V2_ICAUSE] sub r0, r0, 16 - mov r1, _IsrTable + mov r1, _sw_isr_table add3 r0, r1, r0 /* table entries are 8-bytes wide */ ld r1, [r0, 4] /* ISR into r1 */ diff --git a/arch/arm/core/irq_manage.c b/arch/arm/core/irq_manage.c index 71cc0bdf709..4cba0ad5c28 100644 --- a/arch/arm/core/irq_manage.c +++ b/arch/arm/core/irq_manage.c @@ -66,11 +66,11 @@ void irq_handler_set(unsigned int irq, { int key = irq_lock_inline(); - __ASSERT(old == _IsrTable[irq].isr, "expected ISR not found in table"); + __ASSERT(old == _sw_isr_table[irq].isr, "expected ISR not found in table"); - if (old == _IsrTable[irq].isr) { - _IsrTable[irq].isr = new; - _IsrTable[irq].arg = arg; + if (old == _sw_isr_table[irq].isr) { + _sw_isr_table[irq].isr = new; + _sw_isr_table[irq].arg = arg; } irq_unlock_inline(key); @@ -185,5 +185,5 @@ int irq_connect(unsigned int irq, void irq_disconnect(unsigned int irq) { - irq_handler_set(irq, _IsrTable[irq].isr, _irq_spurious, NULL); + irq_handler_set(irq, _sw_isr_table[irq].isr, _irq_spurious, NULL); } diff --git a/arch/arm/core/isr_wrapper.s b/arch/arm/core/isr_wrapper.s index a95480641f8..b1808cad5e9 100644 --- a/arch/arm/core/isr_wrapper.s +++ b/arch/arm/core/isr_wrapper.s @@ -48,7 +48,7 @@ a parameter. _ASM_FILE_PROLOGUE -GDATA(_IsrTable) +GDATA(_sw_isr_table) GTEXT(_isr_wrapper) GTEXT(_IntExit) @@ -99,7 +99,7 @@ SECTION_FUNC(TEXT, _isr_wrapper) mrs r0, IPSR /* get exception number */ sub r0, r0, #16 /* get IRQ number */ lsl r0, r0, #3 /* table is 8-byte wide */ - ldr r1, =_IsrTable + ldr r1, =_sw_isr_table add r1, r1, r0 /* table entry: ISRs must have their MSB set to stay * in thumb mode */ diff --git a/arch/arm/fsl_frdm_k64f/sw_isr_table.c b/arch/arm/fsl_frdm_k64f/sw_isr_table.c index ca86a1b4f1d..0934eb929f4 100644 --- a/arch/arm/fsl_frdm_k64f/sw_isr_table.c +++ b/arch/arm/fsl_frdm_k64f/sw_isr_table.c @@ -55,7 +55,7 @@ extern void _irq_spurious(void *arg); #if defined(CONFIG_SW_ISR_TABLE_DYNAMIC) -_IsrTableEntry_t __isr_table_section _IsrTable[CONFIG_NUM_IRQS] = { +_IsrTableEntry_t __isr_table_section _sw_isr_table[CONFIG_NUM_IRQS] = { [0 ...(CONFIG_NUM_IRQS - 1)].arg = (void *)0xABAD1DEA, [0 ...(CONFIG_NUM_IRQS - 1)].isr = _irq_spurious, #if defined(CONFIG_CONSOLE_HANDLER) @@ -70,7 +70,7 @@ _IsrTableEntry_t __isr_table_section _IsrTable[CONFIG_NUM_IRQS] = { /* placeholders: fill with real ISRs */ -_IsrTableEntry_t __isr_table_section _IsrTable[CONFIG_NUM_IRQS] = { +_IsrTableEntry_t __isr_table_section _sw_isr_table[CONFIG_NUM_IRQS] = { [0 ...(CONFIG_NUM_IRQS - 1)].arg = (void *)0xABAD1DEA, [0 ...(CONFIG_NUM_IRQS - 1)].isr = _irq_spurious, #if defined(CONFIG_CONSOLE_HANDLER) diff --git a/arch/arm/ti_lm3s6965/sw_isr_table.c b/arch/arm/ti_lm3s6965/sw_isr_table.c index f7e7f5129ea..de0e9f5cfd8 100644 --- a/arch/arm/ti_lm3s6965/sw_isr_table.c +++ b/arch/arm/ti_lm3s6965/sw_isr_table.c @@ -55,7 +55,7 @@ extern void _irq_spurious(void *arg); #if defined(CONFIG_SW_ISR_TABLE_DYNAMIC) -_IsrTableEntry_t __isr_table_section _IsrTable[CONFIG_NUM_IRQS] = { +_IsrTableEntry_t __isr_table_section _sw_isr_table[CONFIG_NUM_IRQS] = { [0 ...(CONFIG_NUM_IRQS - 1)].arg = (void *)0xABAD1DEA, [0 ...(CONFIG_NUM_IRQS - 1)].isr = _irq_spurious, #if defined(CONFIG_CONSOLE_HANDLER) @@ -70,7 +70,7 @@ _IsrTableEntry_t __isr_table_section _IsrTable[CONFIG_NUM_IRQS] = { /* placeholders: fill with real ISRs */ -_IsrTableEntry_t __isr_table_section _IsrTable[CONFIG_NUM_IRQS] = { +_IsrTableEntry_t __isr_table_section _sw_isr_table[CONFIG_NUM_IRQS] = { [0 ...(CONFIG_NUM_IRQS - 1)].arg = (void *)0xABAD1DEA, [0 ...(CONFIG_NUM_IRQS - 1)].isr = _irq_spurious, #if defined(CONFIG_CONSOLE_HANDLER) diff --git a/include/sw_isr_table.h b/include/sw_isr_table.h index dbbc180b67f..2ea68d7f33b 100644 --- a/include/sw_isr_table.h +++ b/include/sw_isr_table.h @@ -51,7 +51,7 @@ struct _IsrTableEntry { typedef struct _IsrTableEntry _IsrTableEntry_t; -extern _IsrTableEntry_t _IsrTable[CONFIG_NUM_IRQS]; +extern _IsrTableEntry_t _sw_isr_table[CONFIG_NUM_IRQS]; #endif /* _ASMLANGUAGE */ #endif /* _SW_ISR_TABLE__H_ */