Commit Graph

39 Commits

Author SHA1 Message Date
Masayuki Ishikawa d87f350831 arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
  g_irq_spin for backword compatibility (In this case, NULL must be specified)

Impact:
- None

Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Masayuki Ishikawa ad2e85433a boards, include, sched: Remove CONFIG_SPINLOCK_IRQ
Summary:
- This commit removes CONFIG_SPINLOCK_IRQ to avoid complexity

Impact:
- None

Testing:
- Tested with the following configs
- spresense:wifi, spresense:smp
- esp32-devkitc:smp (QEMU), sabre-6quad:smp (QEMU)
- maix-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi
2021-02-05 22:50:04 -08:00
Alin Jerpelea a8a1308240 include: nuttx: update licenses to Apache 2.0
The SGA from Gregory Nutt had been submitted and we can replace
the licenses to Apache 2.0

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Masayuki Ishikawa a24905059e sched: irq: Change irq_waitlock() from private to public
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 08:33:42 +01:00
Masayuki Ishikawa 08c4376606 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>
2020-09-03 10:20:20 +08:00
Xiang Xiao d6827cab60 arch: up_assert shouldn't call exit directly
since exit will be only callable from userspace and change
the 1st argument from "const uint8_t *" to "const char *"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I86487d57210ab63109148232da71dbc4d60a563b
2020-07-19 01:21:36 +01:00
Xiang Xiao 6884af68d8 include/nuttx/irq.h: Fix enter_critical_section/spin_lock_irqsave macro typo error and remove the duplicated inclusion of arch/irq.h 2019-01-27 11:21:03 -06:00
Gregory Nutt 6f9e477de3 include/nuttx/irq.h: Correct some comments. 2018-11-25 16:04:31 -06:00
Gregory Nutt 2474eda421 Fix a build problem introduced with commit 4ca7b72a98 2018-11-25 13:52:23 -06:00
Gregory Nutt fc6084f311 Squashed commit of the following:
fs/procfs/fs_procfsproc:  Extended the process ID ProcFS output to show per-thread maximum time for pre-emption disabled and maximum time within a critical section.

    sched/sched/sched_critmonitor.c:  Adds data collection logic in support of monitoring critical sections and pre-emption state.
2018-11-24 10:32:45 -06:00
zhuguangqing d38be46655 sched/irq: Add support interrupt chains in NuttX. IRQ chain is very useful in these cases: (1) Multiple hardware connect to the same request line(e.g. PCI), (2) Need multiple driver to support one hardware block (like Linux MFD) 2018-08-24 15:10:23 -06:00
Gregory Nutt 5beab6fbf0 spin_lock_irqsave() and spin_unlock_irqrestore() are only valid if the CPU supports global disabling of interrupts. 2018-02-04 15:41:22 -06:00
Gregory Nutt 0080225473 sched/irq: Add a configuration option to show interrupt information via a procfs file. 2018-01-12 18:26:46 -06:00
Masayuki Ishikawa 6150299f54 Merged in masayuki2009/nuttx.nuttx/irq_spinlock (pull request #550)
SMP: Introduce spin_lock_irqsave() and spin_unlock_irqrestore()

These APIs are simplified version of enter_critical_section() and
leave_critical_section() to protect data (e.g. registers) in SMP mode.
By using these APIs inside drivers, performace will be improved.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-12-07 19:39:04 +00:00
Gregory Nutt 06ce1a2291 Add missing endif 2017-03-03 14:39:35 -06:00
Gregory Nutt fc5fca5145 Add MAX value definitions to go along with irq_t and irq_mapped_t 2017-03-03 11:48:20 -06:00
Gregory Nutt e1218c4b4b Smaller vector tables: Add irq_mapped_t. 2017-03-03 10:20:40 -06:00
Gregory Nutt c2b620b4f8 Implements support for smaller interrupt tables as described at http://www.nuttx.org/doku.php?id=wiki:howtos:smallvectors . This is largely the work of Mark Schulte. However, I have made several changes to match with the Wiki document. If you like the change, thanks go to Marc. For any errors you can blame me. 2017-03-03 09:20:25 -06:00
Gregory Nutt 02b1e1ec1a Fixes for coding standard: '*' needs to 'snuggle' with following variable name 2017-02-28 18:22:57 -06:00
Mark Schulte b3222bbc8a irq_dispatch: Add argument pointer to irq_dispatch
Provide a user defined callback context for irq's, such that when
registering a callback users can provide a pointer that will get
passed back when the isr is called.
2017-02-27 06:27:56 -06:00
Gregory Nutt 6a7619b6f0 Update TODO list 2016-11-19 13:23:15 -06:00
Gregory Nutt a2aba90252 Update some comments 2016-11-19 11:48:08 -06:00
Gregory Nutt d20db82fcb Scheduler instrumentation: Fix some associated with monitoring critical sections 2016-03-21 17:08:07 -06:00
Gregory Nutt 9cb2a6b1f9 Rename irqsave() and irqrestore() to up_irq_save() and up_irq_restore() 2016-02-14 16:19:15 -06:00
Gregory Nutt 97cbd7112f SMP: Implement enter/leave_critical_section 2016-02-13 10:23:16 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt a41c1de32c Add basic data structures that will allow us to move named semaphore support out of the OS and into the VFS (not complete). 2014-09-28 10:15:33 -06:00
patacongo 854dbf19e5 Add support for ram vectors to the ARMv7-M architecture
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5756 42af7a65-404d-4744-a932-0658087f49c3
2013-03-18 21:10:08 +00:00
patacongo 8e5733ae3f Header file clean-up
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4948 42af7a65-404d-4744-a932-0658087f49c3
2012-07-17 03:58:11 +00:00
patacongo 4d215e34ca Moving toward system call infrastructure
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3435 42af7a65-404d-4744-a932-0658087f49c3
2011-03-29 00:07:02 +00:00
patacongo f016945ba8 Misc fixes, add button support, GPIO interrupt support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2523 42af7a65-404d-4744-a932-0658087f49c3
2010-01-23 03:05:05 +00:00
patacongo eeec4073a9 Switching to C99 stdint.h types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2340 42af7a65-404d-4744-a932-0658087f49c3
2009-12-14 23:32:23 +00:00
patacongo 9ff4834f74 Standardizing ioctls
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@912 42af7a65-404d-4744-a932-0658087f49c3
2008-09-12 00:39:12 +00:00
patacongo 9014f894a2 Code complete for 8051 (not tested)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@29 42af7a65-404d-4744-a932-0658087f49c3
2007-03-02 21:27:47 +00:00
patacongo a60059d9d0 Finally, a clean SDCC compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@20 42af7a65-404d-4744-a932-0658087f49c3
2007-02-27 21:17:21 +00:00
patacongo b8f3bd857b Progress toward clean SDCC compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@18 42af7a65-404d-4744-a932-0658087f49c3
2007-02-21 21:55:16 +00:00
patacongo 4881fed8bf Working toward compiler independence: Removed inline funcs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@15 42af7a65-404d-4744-a932-0658087f49c3
2007-02-20 23:16:24 +00:00
patacongo 3c0e634aee Eliminating GCC dependencies
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@14 42af7a65-404d-4744-a932-0658087f49c3
2007-02-20 22:39:56 +00:00
patacongo b08a86171f NuttX RTOS
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3 42af7a65-404d-4744-a932-0658087f49c3
2007-02-17 23:21:28 +00:00