History

kernel.h: split out instruction pointer accessors

bottom_half.h needs _THIS_IP_ to be standalone, so split that and _RET_IP_ out from kernel.h into the new instruction_pointer.h. kernel.h directly needs them, so include it there and replace the include of kernel.h with this new file in bottom_half.h.

Stephen Rothwell committed 5 years ago

Commit e52340d1 parent b4b87653 files · +10 −4Browse files

Unified · Split

3 files
  1. include/linux/bottom_half.h +1 −1
  2. include/linux/instruction_pointer.h +8 −0
  3. include/linux/kernel.h +1 −3
include/linux/bottom_half.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2#ifndef _LINUX_BH_H2#ifndef _LINUX_BH_H
3#define _LINUX_BH_H3#define _LINUX_BH_H
4 4
5#include <linux/kernel.h>5#include <linux/instruction_pointer.h>
6#include <linux/preempt.h>6#include <linux/preempt.h>
7 7
8#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_TRACE_IRQFLAGS)8#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_TRACE_IRQFLAGS)
include/linux/instruction_pointer.h+8−0
@@ -0,0 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_INSTRUCTION_POINTER_H
3#define _LINUX_INSTRUCTION_POINTER_H
4
5#define _RET_IP_ (unsigned long)__builtin_return_address(0)
6#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
7
8#endif /* _LINUX_INSTRUCTION_POINTER_H */
include/linux/kernel.h+1−3
@@ -20,6 +20,7 @@ · 19 unmodified lines
20#include <linux/printk.h>20#include <linux/printk.h>
21#include <linux/build_bug.h>21#include <linux/build_bug.h>
22#include <linux/static_call_types.h>22#include <linux/static_call_types.h>
23#include <linux/instruction_pointer.h>
23#include <asm/byteorder.h>24#include <asm/byteorder.h>
24 25
25#include <uapi/linux/kernel.h>26#include <uapi/linux/kernel.h>
@@ -53,9 +54,6 @@ · 27 unmodified lines
53} \54} \
54)55)
55 56
56#define _RET_IP_ (unsigned long)__builtin_return_address(0)
57#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
58
59/**57/**
60 * upper_32_bits - return bits 32-63 of a number58 * upper_32_bits - return bits 32-63 of a number
61 * @n: the number we're accessing59 * @n: the number we're accessing

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t