hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/arch/nios2/include/asm/timex.h
....@@ -1,17 +1,5 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /* Copyright Altera Corporation (C) 2014. All rights reserved.
2
- *
3
- * This program is free software; you can redistribute it and/or modify
4
- * it under the terms of the GNU General Public License, version 2,
5
- * as published by the Free Software Foundation.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU General Public License for more details.
11
- *
12
- * You should have received a copy of the GNU General Public License
13
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
- *
153 */
164
175 #ifndef _ASM_NIOS2_TIMEX_H
....@@ -20,5 +8,8 @@
208 typedef unsigned long cycles_t;
219
2210 extern cycles_t get_cycles(void);
11
+#define get_cycles get_cycles
12
+
13
+#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
2314
2415 #endif