arch, include, sched : Refactor ARCH_GLOBAL_IRQDISABLE related code

Summary:
- ARCH_GLOBAL_IRQDISABLE was initially introduced for LC823450 SMP
- At that time, i.MX6 (quad Cortex-A9) did not use this config
- However, this option is now used for all CPUs which support SMP
- So it's good timing for refactoring the code

Impact:
- Should have no impact because the logic is the same for SMP

Testing:
- Tested with board: spresense:smp, spresense:wifi_smp
- Tested with qemu: esp32-core:smp, maix-bit:smp, sabre-6quad:smp
- Build only: lc823450-xgevk:rndis, sam4cmp-db:nsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa
2020-09-02 16:18:25 +09:00
committed by Xiang Xiao
parent 74aec1c424
commit 08c4376606
14 changed files with 6 additions and 120 deletions
-9
View File
@@ -646,15 +646,6 @@ bool irq_cpu_locked(int cpu)
return false;
}
#if defined(CONFIG_ARCH_HAVE_FETCHADD) && !defined(CONFIG_ARCH_GLOBAL_IRQDISABLE)
/* If the global lockcount has been incremented then simply return true */
if (g_global_lockcount > 0)
{
return true;
}
#endif
/* Test if g_cpu_irqlock is locked. We don't really need to use check
* g_cpu_irqlock to do this, we can use the g_cpu_set.
*