Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'lineage-17.1' into stock-10
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Jun 22, 2020
2 parents 55554c2 + d778757 commit 21cc99b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions arch/arm64/include/asm/vdso/compat_gettimeofday.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define __VDSO_USE_SYSCALL ULLONG_MAX

#define VDSO_HAS_CLOCK_GETRES 1

#define VDSO_HAS_TIME 1

#define BUILD_VDSO32 1
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/include/asm/vdso/gettimeofday.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define __VDSO_USE_SYSCALL ULLONG_MAX

#define VDSO_HAS_CLOCK_GETRES 1

#define VDSO_HAS_TIME 1

static __always_inline
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/kernel/vdso/vgettimeofday.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int __kernel_clock_getres(clockid_t clock_id,
return __cvdso_clock_getres(clock_id, res);
}

time_t __kernel_time(time_t *t)
time_t __kernel_time(time_t *time)
{
return __cvdso_time(t);
return __cvdso_time(time);
}
3 changes: 2 additions & 1 deletion arch/arm64/kernel/vdso32/vdso.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ VERSION
__vdso_clock_gettime;
__vdso_gettimeofday;
__vdso_clock_getres;
__vdso_time;
__kernel_sigreturn_arm;
__kernel_sigreturn_thumb;
__kernel_rt_sigreturn_arm;
__kernel_rt_sigreturn_thumb;
__vdso_clock_gettime64;
__vdso_time;
local: *;
};
}
Expand Down
6 changes: 2 additions & 4 deletions arch/arm64/kernel/vdso32/vgettimeofday.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ int __vdso_clock_gettime(clockid_t clock,
return __cvdso_clock_gettime32(clock, ts);
}

#if 0
int __vdso_clock_gettime64(clockid_t clock,
struct __kernel_timespec *ts)
{
return __cvdso_clock_gettime(clock, ts);
}
#endif

int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
struct timezone *tz)
Expand All @@ -32,9 +30,9 @@ int __vdso_clock_getres(clockid_t clock_id,
return __cvdso_clock_getres_time32(clock_id, res);
}

time_t __vdso_time(time_t *t)
time_t __vdso_time(time_t *time)
{
return __cvdso_time(t);
return __cvdso_time(time);
}

/* Avoid unresolved references emitted by GCC */
Expand Down
13 changes: 7 additions & 6 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2564,14 +2564,8 @@ static void dwc3_gadget_enable_irq(struct dwc3 *dwc)
DWC3_DEVTEN_USBRSTEN |
DWC3_DEVTEN_DISCONNEVTEN);

/*
* Enable SUSPENDEVENT(BIT:6) for version 230A and above
* else enable USB Link change event (BIT:3) for older version
*/
if (dwc->revision < DWC3_REVISION_230A)
reg |= DWC3_DEVTEN_ULSTCNGEN;
else
reg |= DWC3_DEVTEN_EOPFEN;

dwc3_writel(dwc->regs, DWC3_DEVTEN, reg);
}
Expand Down Expand Up @@ -3678,6 +3672,13 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
speed = reg & DWC3_DSTS_CONNECTSPD;
dwc->speed = speed;

/* Enable SUSPENDEVENT(BIT:6) for version 230A and above */
if (dwc->revision >= DWC3_REVISION_230A) {
reg = dwc3_readl(dwc->regs, DWC3_DEVTEN);
reg |= DWC3_DEVTEN_EOPFEN;
dwc3_writel(dwc->regs, DWC3_DEVTEN, reg);
}

/* Reset the retry on erratic error event count */
dwc->retries_on_error = 0;

Expand Down
3 changes: 2 additions & 1 deletion lib/vdso/gettimeofday.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
static __maybe_unused time_t __cvdso_time(time_t *time)
{
const struct vdso_data *vd = __arch_get_vdso_data();
time_t t = READ_ONCE(vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec);
time_t t = READ_ONCE(
vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME_COARSE].sec);

if (time)
*time = t;
Expand Down

0 comments on commit 21cc99b

Please sign in to comment.