summaryrefslogtreecommitdiff
path: root/include/linux/error-injection.h
blob: 20e738f4eae8ae614dd9e1ba1c3d08904689763f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_ERROR_INJECTION_H
#define _LINUX_ERROR_INJECTION_H

#include <linux/compiler.h>
#include <linux/errno.h>
#include <asm-generic/error-injection.h>

#ifdef CONFIG_FUNCTION_ERROR_INJECTION

extern bool within_error_injection_list(unsigned long addr);
extern int get_injectable_error_type(unsigned long addr);

#else /* !CONFIG_FUNCTION_ERROR_INJECTION */

static inline bool within_error_injection_list(unsigned long addr)
{
	return false;
}

static inline int get_injectable_error_type(unsigned long addr)
{
	return -EOPNOTSUPP;
}

#endif

#endif /* _LINUX_ERROR_INJECTION_H */
st?h=linux-6.12.y&id=0b9688ee95c123e2dc4449ef667abe4209e55ee4'>Merge back cpuidle material for 5.10.Rafael J. Wysocki 2020-09-30Documentation: PM: Fix a reStructuredText syntax errorYoann Congal 2020-09-23cpuidle: record state entry rejection statisticsLina Iyer 2020-05-19Documentation: cpuidle: update the documentHanjun Guo 2020-02-14Documentation: PM: QoS: Update to reflect previous code changesRafael J. Wysocki 2020-02-05cpuidle: Documentation: Clean up PM QoS descriptionRafael J. Wysocki 2019-12-27cpuidle: Allow idle states to be disabled by defaultRafael J. Wysocki