Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
ipipe
Commits
6e7edf44
Commit
6e7edf44
authored
Sep 17, 2015
by
Philippe Gerum
Browse files
arm64/ipipe: mm tracking data is builtin
parent
58c2f69a
Changes
2
Hide whitespace changes
Inline
Side-by-side
arch/arm64/Kconfig
View file @
6e7edf44
...
...
@@ -86,11 +86,6 @@ config ARM64
help
ARM 64-bit (AArch64) Linux support.
if IPIPE
config IPIPE_WANT_ACTIVE_MM
def_bool y
endif
config 64BIT
def_bool y
...
...
arch/arm64/kernel/ipipe.c
View file @
6e7edf44
...
...
@@ -464,10 +464,8 @@ static void __ipipe_do_IRQ(unsigned irq, void *cookie)
void
__switch_mm_inner
(
struct
mm_struct
*
prev
,
struct
mm_struct
*
next
,
struct
task_struct
*
tsk
)
{
#ifdef CONFIG_IPIPE_WANT_ACTIVE_MM
struct
mm_struct
**
const
active_mm
=
raw_cpu_ptr
(
&
ipipe_percpu
.
active_mm
);
#endif
/* CONFIG_IPIPE_WANT_ACTIVE_MM */
#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH
struct
thread_info
*
const
tip
=
current_thread_info
();
prev
=
*
active_mm
;
...
...
@@ -476,23 +474,17 @@ void __switch_mm_inner(struct mm_struct *prev, struct mm_struct *next,
*
active_mm
=
NULL
;
barrier
();
for
(;;)
{
unsigned
long
flags
;
#endif
/* CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH */
#endif
int
rc
__maybe_unused
=
__do_switch_mm
(
prev
,
next
,
tsk
,
true
);
#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH
unsigned
long
flags
;
/*
* Reading thread_info flags and setting active_mm
* must be done atomically.
*/
flags
=
hard_local_irq_save
();
if
(
__test_and_clear_bit
(
TIF_MMSWITCH_INT
,
&
tip
->
flags
)
==
0
)
{
if
(
rc
<
0
)
*
active_mm
=
prev
;
else
{
*
active_mm
=
next
;
}
*
active_mm
=
rc
<
0
?
prev
:
next
;
hard_local_irq_restore
(
flags
);
return
;
}
...
...
@@ -509,23 +501,17 @@ void __switch_mm_inner(struct mm_struct *prev, struct mm_struct *next,
prev
=
NULL
;
}
#elif defined(CONFIG_IPIPE_WANT_ACTIVE_MM)
if
(
rc
<
0
)
*
active_mm
=
prev
;
else
{
*
active_mm
=
next
;
}
#endif
/* IPIPE_WANT_ACTIVE_MM */
#else
*
active_mm
=
rc
<
0
?
prev
:
next
;
#endif
}
#ifdef finish_arch_post_lock_switch
void
deferred_switch_mm
(
struct
mm_struct
*
next
)
{
#ifdef CONFIG_IPIPE_WANT_ACTIVE_MM
struct
mm_struct
**
const
active_mm
=
raw_cpu_ptr
(
&
ipipe_percpu
.
active_mm
);
struct
mm_struct
*
prev
=
*
active_mm
;
#endif
/* CONFIG_IPIPE_WANT_ACTIVE_MM */
#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH
struct
thread_info
*
const
tip
=
current_thread_info
();
clear_bit
(
TIF_MMSWITCH_INT
,
&
tip
->
flags
);
...
...
@@ -533,9 +519,8 @@ void deferred_switch_mm(struct mm_struct *next)
*
active_mm
=
NULL
;
barrier
();
for
(;;)
{
unsigned
long
flags
;
#endif
/* CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH */
unsigned
long
__maybe_unused
flags
;
#endif
__do_switch_mm
(
prev
,
next
,
NULL
,
false
);
#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH
...
...
@@ -552,9 +537,9 @@ void deferred_switch_mm(struct mm_struct *next)
hard_local_irq_restore
(
flags
);
prev
=
NULL
;
}
#el
if defined(CONFIG_IPIPE_WANT_ACTIVE_MM)
#el
se
*
active_mm
=
next
;
#endif
/* CONFIG_IPIPE_WANT_ACTIVE_MM */
#endif
}
#endif
#endif
/* CONFIG_MMU */
...
...
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