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
xenomai4
linux-evl
Commits
3deb4953
Commit
3deb4953
authored
Sep 19, 2020
by
Philippe Gerum
Browse files
evl/clock: make default gravity a per-arch setting
Signed-off-by:
Philippe Gerum
<
rpm@xenomai.org
>
parent
d57b109e
Changes
4
Hide whitespace changes
Inline
Side-by-side
arch/arm/include/asm/evl/calibration.h
0 → 100644
View file @
3deb4953
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _EVL_ARM_ASM_CALIBRATION_H
#define _EVL_ARM_ASM_CALIBRATION_H
#include <linux/kconfig.h>
static
inline
unsigned
int
evl_get_default_clock_gravity
(
void
)
{
/* Reasonable default for many armv7-based systems. */
return
IS_ENABLED
(
CONFIG_SMP
)
?
6000
:
3000
;
}
#endif
/* !_EVL_ARM_ASM_CALIBRATION_H */
arch/arm64/include/asm/evl/calibration.h
0 → 100644
View file @
3deb4953
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _EVL_ARM64_ASM_CALIBRATION_H
#define _EVL_ARM64_ASM_CALIBRATION_H
#include <linux/kconfig.h>
static
inline
unsigned
int
evl_get_default_clock_gravity
(
void
)
{
return
3000
;
}
#endif
/* !_EVL_ARM64_ASM_CALIBRATION_H */
arch/x86/include/asm/evl/calibration.h
0 → 100644
View file @
3deb4953
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _EVL_X86_ASM_CALIBRATION_H
#define _EVL_X86_ASM_CALIBRATION_H
#include <linux/kconfig.h>
static
inline
unsigned
int
evl_get_default_clock_gravity
(
void
)
{
return
3000
;
}
#endif
/* !_EVL_X86_ASM_CALIBRATION_H */
kernel/evl/clock.c
View file @
3deb4953
...
...
@@ -33,6 +33,7 @@
#include <evl/file.h>
#include <evl/irq.h>
#include <evl/uaccess.h>
#include <asm/evl/calibration.h>
#include <uapi/evl/factory.h>
#include <uapi/evl/clock.h>
#include <trace/events/evl.h>
...
...
@@ -1029,11 +1030,12 @@ static int set_coreclk_gravity(struct evl_clock *clock,
static
void
get_default_gravity
(
struct
evl_clock_gravity
*
p
)
{
unsigned
int
ulat
=
3000
;
/* ns, decent default. */
unsigned
int
ulat
=
CONFIG_EVL_LATENCY_USER
;
/* ns */
if
(
!
ulat
)
/* If not specified, pick a reasonable default. */
ulat
=
evl_get_default_clock_gravity
();
#if CONFIG_EVL_LATENCY_USER != 0
ulat
=
CONFIG_EVL_LATENCY_USER
;
#endif
p
->
user
=
ulat
;
p
->
kernel
=
CONFIG_EVL_LATENCY_KERNEL
;
p
->
irq
=
CONFIG_EVL_LATENCY_IRQ
;
...
...
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