Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / selftests / igt_atomic.c
blobfb506b6990956bc94f0d203a825d616af381307d
1 // SPDX-License-Identifier: MIT
2 /*
3 * Copyright © 2018 Intel Corporation
4 */
6 #include <linux/preempt.h>
7 #include <linux/bottom_half.h>
8 #include <linux/irqflags.h>
10 #include "igt_atomic.h"
12 static void __preempt_begin(void)
14 preempt_disable();
17 static void __preempt_end(void)
19 preempt_enable();
22 static void __softirq_begin(void)
24 local_bh_disable();
27 static void __softirq_end(void)
29 local_bh_enable();
32 static void __hardirq_begin(void)
34 local_irq_disable();
37 static void __hardirq_end(void)
39 local_irq_enable();
42 const struct igt_atomic_section igt_atomic_phases[] = {
43 { "preempt", __preempt_begin, __preempt_end },
44 { "softirq", __softirq_begin, __softirq_end },
45 { "hardirq", __hardirq_begin, __hardirq_end },
46 { }