Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
common.c File Reference
#include <linux/oprofile.h>
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/errno.h>
#include <asm/ptrace.h>
#include <asm/special_insns.h>
#include "op_impl.h"

Go to the source code of this file.

Functions

struct op_axp_model op_model_ev4 __attribute__ ((weak))
 
int __init oprofile_arch_init (struct oprofile_operations *ops)
 
void oprofile_arch_exit (void)
 

Variables

void(* perf_irq )(unsigned long, struct pt_regs *)
 

Detailed Description

Remarks
Copyright 2002 OProfile authors
Read the file COPYING
Author
Richard Henderson rth@t.nosp@m.widd.nosp@m.le.ne.nosp@m.t

Definition in file common.c.

Function Documentation

read_persistent_clock - Return time from the persistent clock.

Weak dummy function for arches that do not yet support it. Reads the time from the battery backed persistent clock. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

read_boot_clock - Return time of the system start.

Weak dummy function for arches that do not yet support it. Function to read the exact time the system has been started. Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.

XXX - Do be sure to remove it once all arches implement it.

__iowrite32_copy - copy data to MMIO space, in 32-bit units : destination, in MMIO space (must be 32-bit aligned) : source (must be 32-bit aligned) : number of 32-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

__iowrite64_copy - copy data to MMIO space, in 64-bit or 32-bit units : destination, in MMIO space (must be 64-bit aligned) : source (must be 64-bit aligned) : number of 64-bit quantities to copy

Copy data from kernel space to MMIO space, in units of 32 or 64 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

get_user_pages_fast() - pin user pages in memory : starting user address : number of pages from start to pin : whether pages will be written to : array that receives pointers to the pages pinned. Should be at least nr_pages long.

Returns number of pages pinned. This may be fewer than the number requested. If nr_pages is 0 or negative, returns 0. If no pages were pinned, returns -errno.

get_user_pages_fast provides equivalent functionality to get_user_pages, operating on current and current->mm, with force=0 and vma=NULL. However unlike get_user_pages, it must be called without mmap_sem held.

get_user_pages_fast may take mmap_sem and page table locks, so no assumptions can be made about lack of locking. get_user_pages_fast is to be implemented in a way that is advantageous (vs get_user_pages()) when the user memory area is already faulted in and present in ptes. However if the pages have to be faulted in, it may turn out to be slightly slower so callers need to carefully consider what to use. On many architectures, get_user_pages_fast simply falls back to get_user_pages.

Definition at line 199 of file gumstix.c.

void oprofile_arch_exit ( void  )

One-time exit/cleanup for the arch.

Definition at line 187 of file common.c.

int __init oprofile_arch_init ( struct oprofile_operations ops)

One-time initialisation. *ops must be set to a filled-in operations structure. This is called even in timer interrupt mode so an arch can set a backtrace callback.

If an error occurs, the fields should be left untouched.

Definition at line 142 of file common.c.

Variable Documentation

void(* perf_irq)(unsigned long, struct pt_regs *)

Definition at line 36 of file irq_alpha.c.