Skip to content

Commit 9603a9c

Browse files
author
Fox Snowpatch
committed
1 parent 182544a commit 9603a9c

File tree

147 files changed

+640
-592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+640
-592
lines changed

Documentation/fb/udlfb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ metrics_bytes_sent 32-bit count of how many bytes were transferred over
156156
USB to communicate the resulting changed pixels to the
157157
hardware. Includes compression and protocol overhead
158158

159-
metrics_cpu_kcycles_used 32-bit count of CPU cycles used in processing the
160-
above pixels (in thousands of cycles).
159+
metrics_cpu_kcycles_used 32-bit count of microseconds used in processing the
160+
above pixels
161161

162162
metrics_reset Write-only. Any write to this file resets all metrics
163163
above to zero. Note that the 32-bit counters above

arch/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,19 @@ config ARCH_HAS_DMA_SET_UNCACHED
360360
config ARCH_HAS_DMA_CLEAR_UNCACHED
361361
bool
362362

363+
# cycles_t is always 64bit wide
364+
config ARCH_HAS_CYCLES_T_64
365+
bool
366+
363367
config ARCH_HAS_CPU_FINALIZE_INIT
364368
bool
365369

370+
config ARCH_HAS_DELAY_TIMER
371+
bool
372+
373+
config ARCH_HAS_RANDOM_ENTROPY
374+
bool
375+
366376
# The architecture has a per-task state that includes the mm's PASID
367377
config ARCH_HAS_CPU_PASID
368378
bool

arch/alpha/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config ALPHA
55
select ARCH_32BIT_USTAT_F_TINODE
66
select ARCH_HAS_CURRENT_STACK_POINTER
77
select ARCH_HAS_DMA_OPS if PCI
8+
select ARCH_HAS_RANDOM_ENTROPY
89
select ARCH_MIGHT_HAVE_PC_PARPORT
910
select ARCH_MIGHT_HAVE_PC_SERIO
1011
select ARCH_MODULE_NEEDS_WEAK_PER_CPU if SMP

arch/alpha/include/asm/random.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ASMALPHA_RANDOM_H
3+
#define _ASMALPHA_RANDOM_H
4+
5+
/* Use the cycle counter for entropy. */
6+
static inline unsigned long random_get_entropy(void)
7+
{
8+
unsigned long ret;
9+
10+
__asm__ __volatile__ ("rpcc %0" : "=r"(ret));
11+
return ret;
12+
}
13+
14+
#endif

arch/alpha/include/asm/timex.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
#ifndef _ASMALPHA_TIMEX_H
88
#define _ASMALPHA_TIMEX_H
99

10-
/* With only one or two oddballs, we use the RTC as the ticker, selecting
11-
the 32.768kHz reference clock, which nicely divides down to our HZ. */
12-
#define CLOCK_TICK_RATE 32768
13-
1410
/*
1511
* Standard way to access the cycle counter.
1612
* Currently only used on SMP for scheduling.
@@ -19,9 +15,6 @@
1915
* But this only means we'll force a reschedule every 8 seconds or so,
2016
* which isn't an evil thing.
2117
*/
22-
23-
typedef unsigned int cycles_t;
24-
2518
static inline cycles_t get_cycles (void)
2619
{
2720
cycles_t ret;

arch/arc/include/asm/timex.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

arch/arm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ config ARM
1111
select ARCH_HAS_CPU_FINALIZE_INIT if MMU
1212
select ARCH_HAS_CURRENT_STACK_POINTER
1313
select ARCH_HAS_DEBUG_VIRTUAL if MMU
14+
select ARCH_HAS_DELAY_TIMER
1415
select ARCH_HAS_DMA_ALLOC if MMU
1516
select ARCH_HAS_DMA_OPS
1617
select ARCH_HAS_DMA_WRITE_COMBINE if !ARM_DMA_MEM_BUFFERABLE
@@ -21,6 +22,7 @@ config ARM
2122
select ARCH_HAS_MEMBARRIER_SYNC_CORE
2223
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2324
select ARCH_HAS_PTE_SPECIAL if ARM_LPAE
25+
select ARCH_HAS_RANDOM_ENTROPY
2426
select ARCH_HAS_SETUP_DMA_OPS
2527
select ARCH_HAS_SET_MEMORY
2628
select ARCH_STACKWALK

arch/arm/include/asm/delay.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ extern void __loop_udelay(unsigned long usecs);
9191
extern void __loop_const_udelay(unsigned long);
9292

9393
/* Delay-loop timer registration. */
94-
#define ARCH_HAS_READ_CURRENT_TIMER
9594
extern void register_current_timer_delay(const struct delay_timer *timer);
9695

9796
#endif /* __ASSEMBLY__ */

arch/arm/include/asm/random.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
#ifndef _ASMARM_RANDOM_H
3+
#define _ASMARM_RANDOM_H
4+
5+
bool delay_read_timer(unsigned long *t);
6+
7+
static inline unsigned long random_get_entropy(void)
8+
{
9+
unsigned long t;
10+
11+
return delay_read_timer(&t) ? t : random_get_entropy_fallback();
12+
}
13+
14+
#endif

arch/arm/include/asm/timex.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
#ifndef _ASMARM_TIMEX_H
1010
#define _ASMARM_TIMEX_H
1111

12-
typedef unsigned long cycles_t;
13-
#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; })
12+
// Temporary workaround
13+
bool delay_read_timer(unsigned long *t);
14+
15+
#define get_cycles() ({ cycles_t c; delay_read_timer(&c) ? 0 : c; })
1416
#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
1517

1618
#endif

0 commit comments

Comments
 (0)