Commit graph

41120 commits

Author SHA1 Message Date
Peter Mitsis
05e0c02a5d fifo: Simplify task_fifo_get() API family
Changes the FIFO API so that the timeout parameter must be specified
when invoking task_fifo_get() thereby making the following APIs obsolete:
    task_fifo_get_wait()
    task_fifo_get_wait_timeout()
    _task_fifo_get()

Change-Id: Iac626d9d6d4836033e06ffd5a2ca415ab2630b1a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:06 -05:00
Peter Mitsis
5deb202a8c fifo: Simplify task_fifo_put() API family
Changes the FIFO API so that the timeout parameter must be specified
when invoking task_fifo_put() thereby making the following APIs obsolete:
    task_fifo_put_wait()
    task_fifo_put_wait_timeout()
    _task_fifo_put()

Change-Id: Ifbbfb7018fd9a71551ccba648fda6d2d59d589a6
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
5a338dc21f Cosmetic: Update test_fifo file header
Converts test_fifo's file header to be doxygen compliant.

Change-Id: I1b37c0cdb08c6ceecc4b18c32b5ab9e91dd202c8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
4eae500445 mutex: Simplify task_mutex_lock() API family
Changes the mutex API so that the timeout parameter must be specified
when invoking task_mutex_lock() thereby obsoleting the following APIs:
    task_mutex_lock_wait()
    task_mutex_lock_wait_timeout()
    _task_mutex_lock()

Change-Id: I15d4bddbdc2707b3cbdab672498170da1c47b8db
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
4ab6ef7c5f Cosmetic: Update test_mutex file header
Converts test_mutex's file header to be doxygen compliant.

Change-Id: I5c5edfb70fa0cf4c6664bc21ce3869b1c22a4e71
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
9cc9bdcd53 mem_pool: Simplify task_mem_pool_alloc() API family
Changes the mem_pool API so that the timeout parameter must be specified
when invoking task_mem_pool_alloc() thereby obsoleting the following APIs:
	task_mem_pool_alloc_wait()
	task_mem_pool_alloc_wait_alloc()
	_task_mem_pool_alloc()

Change-Id: Ifa88f13bca98ca3c7d0e1a3b64b40a00068619e0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
e2cb5f5bdd mem_map: Simplify task_mem_map_alloc() API family
Changes the mem_map API so that the timeout parameter must be specified
when invoking task_mem_map_alloc() thereby obsoleting the following APIs:
    task_mem_map_alloc_wait()
    task_mem_map_alloc_wait_alloc()
    _task_mem_map_alloc()

Change-Id: I8905d07fa4b8c3729ca144e8f09e7ad0c7bf0f43
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
8968e87bd5 Cosmetic: Update test_map file header
Converts test_map's file header to be doxygen compliant.

Change-Id: Id0d90e893883756c91bb5de3c2f5fdc20f40dc6b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
f863d66dd8 semgroup: Simplify task_sem_group_take() API family
Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_group_take() thereby obsoleting the following APIs:
	task_sem_group_take_wait()
	task_sem_group_take_wait_timeout()
	_task_sem_group_take()

Change-Id: I64e3f4c9f1e74a86b49d4a0e55b82ecee7733220
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
40eba989e2 semaphore: Simplify task_sem_take() API family
Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_take() thereby obsoleting the following APIs:
	task_sem_take_wait()
	task_sem_take_wait_timeout()
	_task_sem_take()

Change-Id: I746d5c966a3b81ffe014333af51aa10ea8a63263
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
3fecd1e7a0 Cosmetic: Update test_sema file header
Converts test_sema's file header to be doxygen compliant.

Change-Id: Ia5945a64ae597239c9f5ff9ca14231625b9cb467
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
57c7977ecf pipes: Simplify task_pipe_get() API family
Changes the pipe API so that the timeout parameter must be specified
when invoking task_pipe_get() thereby obsoleting the following APIs:
	task_pipe_get_wait()
	task_pipe_get_wait_timeout()
	_task_pipe_get()

Change-Id: If249e57d086fef15fdc1616965f53b310ac9cf9d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
f5d90e1584 pipes: Simplify task_pipe_put() API family
Changes the pipe API so that the timeout parameter must be specified
when invoking task_pipe_put() thereby obsoletingg the following APIs:
	task_pipe_put_wait()
	task_pipe_put_wait_timeout()
	_task_pipe_put()

Change-Id: Ie5693716828e9d8681434c0d130792279ab97acc
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
db320964b0 test_pipe: Applied doxygen style
Updates the test_pipe file header to be doxygen compliant.

Change-Id: I6761fb5078c08d9968482baba47758e0bc3fd0d9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
18ea9a4d05 pipe, cosmetic: Put constant in comparisons on the right
Updates comparisons in the pipe code to put the constant on the
right side of the test. This improves compliance with checkpatch.

Change-Id: I8e55afd94e0532dd7a67bd83e737846279654dff
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
d3e4b72da2 mailbox: Simplify task_mbox_data_block_get() API family
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_data_block_get() thereby obsoleting the
following APIs:
    task_mbox_data_block_get_wait()
    task_mbox_data_block_get_wait_timeout()
    _task_mbox_data_block_get()

Change-Id: I284be505e6de792ba5483611d1299063162550e1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
a67b7070b7 events: Simplify task_event_recv() API family
Changes the event AIP so that the timeout parameter must be specified
when invoking task_event_recv() thereby making the following APIs obsolete:

	task_event_recv()
	task_event_recv_wait()
	task_event_recv_wait_timeout()
	_task_event_recv()

Change-Id: I165a8efbdedb431fee0c20e9ad1f1942c04124c0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
59592cda8a Cosmetic: Update test_events file header
Converts test_events' file header to be doxygen compliant.

Change-Id: I75f0fafbe7c7b81abda1db94fea3194962a446ba
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
1a163f53b7 task_irq: Simplify task_irq_test() API family
Changes the task IRQ API so that not only does task_irq_test() become
task_irq_wait(), but that the timeout parameter must also be specified.
Use of task_irq_wait() obsoletes the following APIs:
	task_irq_test()
	task_irq_test_wait()
	task_irq_test_wait_timeout()
	_task_irq_test()

Change-Id: Ie4d15f29941429249e9fbb258d29ec2b3ae73a93
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
b4ba8087e7 mailbox: Simplify task_mbox_get() API family
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_get() thereby obsoleting the following APIs:
    task_mbox_get_wait()
    task_mbox_get_wait_timeout()
    _task_mbox_get()

Change-Id: Ie028223ec342666e61d3d69750aec37dbe2b493e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
96116cadbb mailbox: Simplify task_mbox_put() API family
Changes the mailbox API so that the timeout parameter must be specified
when invoking task_mbox_put() thereby obsoleting the following APIs:
	task_mbox_put_wait()
	task_mbox_put_wait_timeout()
	_task_mbox_put()

Change-Id: I174857bdf32fe7e59b79838185666cd557312814
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
08fbb29834 test_mail: Apply doxygen style
Updates the test_mail file header to be doxygen compliant.

Change-Id: I890eeb8bfd2ac5ea16d06ad2f4ec0bbb00a77d79
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Peter Mitsis
95de74e121 mailbox, cosmetic: Put constant in comparisons on the right
Updates comparisons in the mailbox code to put the constant on the
right side of the test. This improves compliance with checkpatch.

Change-Id: If84cfbe4bbca312fabbb70d45f05675c9c15d011
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Andrew Boie
999e706dba mvic: fix how local interrupts are programmed
MVIC has only one local interrupt: the timer IRQ. What IRQ line
to use is not fixed, instead it is programmed into the LVTTIMER
register. This is unlike LOAPIC which has a fixed IRQ for the timer
and instead the *vector* to use for it is programmed into LVTTIMER.

We don't want _loapic_int_vec_set() to do anything as the relationship
between IRQ lines and vectors is fixed and we do not want to be
programming vector numbers into bits 0-3 of LVTTIMER.

The IRQ line to use for timer interrupts is programmed into LVTTIMER
when the MVIC is initialized.

Change-Id: Icba0429f65ece7541fa8542814a8fdc39ad43936
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:05 -05:00
Andrew Boie
a664aae335 x86: reduce static IRQ stub size
All of these stubs at the end pop the stack and tell the LOAPIC
that we are at EOI. Put this in common code which falls through to
_IntExit(). Saves 8 bytes per static IRQ stub. There is also small
constant savings in the common code for dynamic IRQs.

Change-Id: If17e9f105928a4251a2cb3fc0d192649c1c4d84b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:05 -05:00
Andrew Boie
88808f1247 quark_se: apic: work around EOI forwarding issue
Quark SE Lakemont core has a hardware bug where the LOAPIC does
not properly notify the IOAPIC to clear the IRR bit for level-
triggered interrupts.

This patch introduces a workaround where the vector ID of the
in-service interrupt is manually written to the IOAPIC_EOI
register, resulting in the bit being cleared.

Unfortunately, in the context where EOI happens it's very difficult
to identify which IRQ line is being serviced, so this is done
unconditionally for all interrupts vectors whether they are registered
in the IOAPIC RTE table or not.

Change-Id: I639cd258dec4f50934e17eadbb821e6a7112e636
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:05 -05:00
Daniel Leung
9e9922265e serial: simplify interrupt config options
Instead of having two config options to specify interrupt triggering
conditions, merge them into one option and clarify. This is now
similar to other drivers which have interrupt triggers.

Change-Id: I4e60c8c45a08d005dcc8256cb89e4c5be7c94307
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:05 -05:00
Daniel Leung
c71dddb2c2 spi: dw: intel: move IOAPIC interrupt trigger flags into driver
Move the common #define for IOAPIC interrupt trigger flags out of
platform board.h and into the driver.

Change-Id: I89090181acb5f48dd797e7773ab65c5f3d46c42a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:05 -05:00
Daniel Leung
8effb4fed3 shared_irq: move IOAPIC interrupt trigger flags into driver
Move the common #define for IOAPIC interrupt trigger flags out of
platform board.h and into the driver.

Change-Id: Ie7262b69226ebffa7e1b9e35725fda24b3fe089f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Daniel Leung
66b99d9cc1 i2c/dw: move IOAPIC interrupt trigger flags into driver
Move the common #define for IOAPIC interrupt trigger flags out of
platform board.h and into the driver.

Change-Id: I2d50457a45fae62ff085f7239712d580243253bb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Daniel Leung
8cb01064f6 gpio/dw: move IOAPIC interrupt trigger flags into driver
Move the common #define for IOAPIC interrupt trigger flags out of
platform board.h and into the driver.

Change-Id: Ia0a069464392714f38037841de52e8d265fa4f49
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Daniel Leung
1b8a9ed895 device: fix synchronous call usage of nano semaphore
Initialization and usage of nano semaphore require an actual semaphore
object in memory. So make sure the semaphore is there.

Change-Id: I4a7391973c65f99132735133b82f1e3837eab4f8
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Daniel Leung
bfd02861fc samples/build_test: add build test for dw_aio_comparator
Add a build test for the dw_aio_comparator driver to catch any compilation
issue.

Change-Id: Id9c8e49656f1fd5843183fdd2cd0eb8d53fc8c8a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Daniel Leung
01fdf3ad12 samples/build_test: add build test for i2c_quark_se_ss
Add a build test for the i2c_quark_se_ss driver to catch any compilation
issue.

Change-Id: Id7342c07f3630252a9a06b4afde9eea8f423287d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Daniel Leung
a56ed39825 i2c/i2c_quark_se_ss: fix build errors
Change-Id: I21f09c32f080aea06d65097549327489a81b57ba
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:04 -05:00
Tomasz Bursztyka
3963ae5060 nanokernel: Expose publicly nano_timer_wait
This is part of the convenience wrapper for timers as well as
nano_timer_init(), nano_timer_start(), etc...

Change-Id: I256e16682e5520eac2b590afcaf00df8b6e8ffd6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
590aa82517 sanity: disable mem_safe testcase on iamcu platforms
clflush and mfence are not supported on `iamcu'

Change-Id: I25b7c582de3b8e2bbea3f219d4655c16763410f8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
c25d6c5d63 loapic: handle spurious interrupts
A special situation may occur when a processor raises its task
priority to be greater than or equal to the level of the
interrupt for which the processor INTR signal is currently
being asserted. If at the time the INTA cycle is issued, the
interrupt that was to be dispensed has become masked (programmed
by software), the local APIC will deliver a spurious-interrupt
vector. Dispensing the spurious-interrupt vector does not affect
the ISR, so the handler for this vector should return without an EOI.

Change-Id: I4cf4744bd6efd68b72e2c380269de4181dc80bd9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
407d9e050b x86: irq_offload: don't use the last vector
The APIC by default uses vector 0xFF for the spurious interrupt
vector as described in the x86 CPU manual volume 3 section 10.9.
Make this its own config option defaulting to 32.

MVIC doesn't have a spurious interrupt vector, and due to the
fixed IRQ-to-vector mapping for this controller, continue
to use the last available entry.

Change-Id: I29bd09df700629dc0d15b30a6ae590b0df1ef890
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
a0e427f8a4 x86: remove loapic_int_vec_trigger()
This was only needed for an older implementation of software interrupts,
now superseded by the irq_offload() API (which doesn't interact with
the interrupt controller at all)

Change-Id: I8aa696d370ae1799872f6d70de69f3cb5b47456a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
4307552dab tests: latency_measure: use irq_offload()
Change-Id: I4f109652a4d778b641c7646a48309c552eb865dc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Andrew Boie
3589695508 ipi: rename to ipm
To many people, IPI connotes inter-processor interrupts on SMP
systems. Rename this to IPM, or Inter-Processor Mailboxes.

Change-Id: I032815e23c69a8297c0a43992132441c240fb71e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
f6f81868f8 build: Remove PROJECTINCLUDE from application makefiles
PROJECTINCLUDE is not required in app makefiles.

Change-Id: I3751b7c51c453dfe47d207bb11d171138668c4e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
3a87dae54d sanitize use of ARCH/SRCARCH
We now only use ARCH and avoid duplication of the same definition.

Change-Id: Ia61059b906a2ebc31e703412bead948997975d58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
801874d71f build: remove more unused linux code
Change-Id: Iac7472e6cdf002c850947375db7072f9a0d29e58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
9fe306bc2a Generate stack usage information only when enabled
This will only generate the .su files when CONFIG_STACK_USAGE
is specified, otherwise the tree will be full of .su files.

Change-Id: I3ffc7a7f5ab09aaae49ff65e8ad5de0832370777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
cf81e1ff87 gpio: gpio_dw_registers.h is local to the file including it
Change-Id: I501a6fd2239511d46236fade47fc41d69093471d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
487660def2 quark_se: shared_mem.h is local to the file including it
Change-Id: I7071dbb6e43a04a48aaff7462e5e5dd395c7b137
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
0a272bc420 fixed check for clang compiler
Use defined(__clang__) otherwise it might fail in some cases.

Change-Id: Ifb2e1cd971325e2a7f87e530e5ee921a5fcee6b9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif
938d8958a5 remove stray defconfig left behind during rebase
This one exists in configs/ now.

Change-Id: I7b75f16a837e58dbfaa2c2e3cf3666a89f4b0e26
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00