Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Mock Turtle
Commits
7840e6f3
Commit
7840e6f3
authored
Apr 18, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: bugfix use IRQ save spinlock in IRQ handler
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
c67fa77d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
mockturtle-tty.c
software/kernel/mockturtle-tty.c
+4
-3
No files found.
software/kernel/mockturtle-tty.c
View file @
7840e6f3
...
...
@@ -46,20 +46,21 @@ static inline void trtl_tty_flip_buffer_push(struct trtl_cpu *cpu)
* trtl_tty_handler_getchar - Get Character From soft-CPU
* It retrieves a character from the soft-CPU serial interface
* and it adds the character to the TTY buffer
* @cpu: the soft-CPU to use
* @cpu: the soft-CPU to use
*/
static
void
trtl_tty_handler_getchar
(
struct
trtl_cpu
*
cpu
)
{
struct
trtl_dev
*
trtl
=
to_trtl_dev
(
cpu
->
dev
.
parent
);
unsigned
long
flags
;
char
c
;
/* Select the CPU and read data */
spin_lock
(
&
trtl
->
lock_cpu_sel
);
spin_lock
_irqsave
(
&
trtl
->
lock_cpu_sel
,
flags
);
trtl_iowrite
(
trtl
,
cpu
->
index
,
trtl
->
base_csr
+
MT_CPU_CSR_REG_CORE_SEL
);
c
=
trtl_ioread
(
trtl
,
trtl
->
base_csr
+
MT_CPU_CSR_REG_DBG_MSG
);
spin_unlock
(
&
trtl
->
lock_cpu_sel
);
spin_unlock
_irqrestore
(
&
trtl
->
lock_cpu_sel
,
flags
);
if
(
!
cpu
->
tty_port
.
tty
)
/* Not open */
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment