Skip to contentSkip to conversation

dovetail/x86: Redundant oob_trap_notify in kernelmode_fixup_or_oops?

DISCUSSION Jan Kiszka 2 participants 2 messages Feb 17, 2022 – Feb 18, 2022

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi Philippe,

oob_trap_notify() only notifies if running oob [1]. But at [2], we are always in-band due to the check at [3], no? What was the idea behind placing a hook here?

Jan

[1]
https://source.denx.de/Xenomai/linux-dovetail/-/blob/a1536285c0e15b7d49f772922477077794bfdcfd/include/linux/dovetail.h#L67
[2]
https://source.denx.de/Xenomai/linux-dovetail/-/blob/a1536285c0e15b7d49f772922477077794bfdcfd/arch/x86/mm/fault.c#L743
[3]
https://source.denx.de/Xenomai/linux-dovetail/-/blob/a1536285c0e15b7d49f772922477077794bfdcfd/arch/x86/mm/fault.c#L731

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux
#1 lore raw
Quoted 6 lines · Jan Kiszka

Hi Philippe,

oob_trap_notify() only notifies if running oob [1]. But at [2], we are always in-band due to the check at [3], no? What was the idea behind placing a hook here?

As you noticed, [2] and its counterpart notifying about the end-of-trap condition are superfluous.

Quoted 8 lines

Jan

[1]
https://source.denx.de/Xenomai/linux-dovetail/-/blob/a1536285c0e15b7d49f772922477077794bfdcfd/include/linux/dovetail.h#L67
[2]
https://source.denx.de/Xenomai/linux-dovetail/-/blob/a1536285c0e15b7d49f772922477077794bfdcfd/arch/x86/mm/fault.c#L743
[3]
https://source.denx.de/Xenomai/linux-dovetail/-/blob/a1536285c0e15b7d49f772922477077794bfdcfd/arch/x86/mm/fault.c#L731

Signature · 1 line
Philippe.