gem5  v21.2.1.1
Public Member Functions | Private Attributes | List of all members
gem5::linux::SkipUDelay< ABI, Base > Class Template Reference

A class to skip udelay() and related calls in the kernel. More...

#include <events.hh>

Inheritance diagram for gem5::linux::SkipUDelay< ABI, Base >:

Public Member Functions

 SkipUDelay (PCEventScope *s, const std::string &desc, Addr addr, uint64_t mult, uint64_t div)
 
void process (ThreadContext *tc) override
 

Private Attributes

uint64_t argDivToNs
 Value to divide arg by to create ns. More...
 
uint64_t argMultToNs
 Value to multiple arg by to create ns. More...
 

Detailed Description

template<typename ABI, typename Base>
class gem5::linux::SkipUDelay< ABI, Base >

A class to skip udelay() and related calls in the kernel.

This class has two additional parameters that take the argument to udelay and manipulated it to come up with ns and eventually ticks to quiesce for. See descriptions of argDivToNs and argMultToNs below.

Definition at line 137 of file events.hh.

Constructor & Destructor Documentation

◆ SkipUDelay()

template<typename ABI , typename Base >
gem5::linux::SkipUDelay< ABI, Base >::SkipUDelay ( PCEventScope s,
const std::string &  desc,
Addr  addr,
uint64_t  mult,
uint64_t  div 
)
inline

Definition at line 156 of file events.hh.

Member Function Documentation

◆ process()

template<typename ABI , typename Base >
void gem5::linux::SkipUDelay< ABI, Base >::process ( ThreadContext tc)
inlineoverride

Member Data Documentation

◆ argDivToNs

template<typename ABI , typename Base >
uint64_t gem5::linux::SkipUDelay< ABI, Base >::argDivToNs
private

Value to divide arg by to create ns.

This is present beacues the linux kernel code sometime precomputes the first multiply that is done in udelay() if the parameter is a constant. We need to undo it so here is how.

Definition at line 146 of file events.hh.

Referenced by gem5::linux::SkipUDelay< ABI, Base >::process().

◆ argMultToNs

template<typename ABI , typename Base >
uint64_t gem5::linux::SkipUDelay< ABI, Base >::argMultToNs
private

Value to multiple arg by to create ns.

Nominally, this is 1000 to convert us to ns, but since linux can do some preprocessing of constant values something else might be required.

Definition at line 153 of file events.hh.

Referenced by gem5::linux::SkipUDelay< ABI, Base >::process().


The documentation for this class was generated from the following file:

Generated on Wed May 4 2022 12:15:44 for gem5 by doxygen 1.8.17