Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c75011c9 authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta
Browse files

arm: vdso: Fix GENERIC_GETTIMEOFDAY dependencies



GENERIC_GETTIMEOFDAY can be enabled only if HAVE_GENERIC_VDSO
is enabled. However, HAVE_ARM_ARCH_TIMER selects it unconditionally,
thus throwing the following warning:

WARNING: unmet direct dependencies detected for GENERIC_GETTIMEOFDAY
Depends on [n]: HAVE_GENERIC_VDSO [=n]
Selected by [y]:
- HAVE_ARM_ARCH_TIMER [=y] && CPU_V7 [=y]

Fix this by selecting GENERIC_GETTIMEOFDAY conditionally in
HAVE_ARM_ARCH_TIMER as well.

Also, handle this conditional dependency in all the references.

Change-Id: Iccb154ad4c0f49857115372334e49504f31a8380
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
parent 5f5ad727
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1277,7 +1277,7 @@ config HAVE_ARM_ARCH_TIMER
	depends on CPU_V7
	select ARM_ARCH_TIMER
	select GENERIC_CLOCKEVENTS
	select GENERIC_GETTIMEOFDAY
	select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO
	help
	  This option enables support for the ARM architected timer

+14 −4
Original line number Diff line number Diff line
@@ -276,15 +276,25 @@ static void vdso_write_end(struct vdso_data *vdata)
	++vdso_data->seq_count;
}

#ifdef CONFIG_GENERIC_GETTIMEOFDAY
static bool tk_clock_mode_is_archtimer(const struct timekeeper *tk)
{
	return
	(tk->tkr_mono.clock->archdata.clock_mode == VDSO_CLOCKMODE_ARCHTIMER);
}
#else
static bool tk_clock_mode_is_archtimer(const struct timekeeper *tk)
{
	return true;
}
#endif

static bool tk_is_cntvct(const struct timekeeper *tk)
{
	if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
		return false;

	if (tk->tkr_mono.clock->archdata.clock_mode != VDSO_CLOCKMODE_ARCHTIMER)
		return false;

	return true;
	return tk_clock_mode_is_archtimer(tk);
}

/**
+5 −0
Original line number Diff line number Diff line
@@ -71,7 +71,12 @@ static enum arch_timer_ppi_nr arch_timer_uses_ppi = ARCH_TIMER_VIRT_PPI;
static bool arch_timer_c3stop;
static bool arch_timer_mem_use_virtual;
static bool arch_counter_suspend_stop;

#ifdef CONFIG_GENERIC_GETTIMEOFDAY
static enum vdso_clock_mode vdso_default = VDSO_CLOCKMODE_ARCHTIMER;
#else
static enum vdso_clock_mode vdso_default = VDSO_CLOCKMODE_NONE;
#endif

static cpumask_t evtstrm_available = CPU_MASK_NONE;
static bool evtstrm_enable = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EVTSTREAM);