cregit-Linux how code gets into the kernel

Release 4.14 arch/openrisc/lib/delay.c

/*
 * OpenRISC Linux
 *
 * Linux architectural port borrowing liberally from similar works of
 * others.  All original copyrights apply as per the original source
 * declaration.
 *
 * Modifications for the OpenRISC architecture:
 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
 *
 *      This program is free software; you can redistribute it and/or
 *      modify it under the terms of the GNU General Public License
 *      version 2 as published by the Free Software Foundation
 *
 * Precise Delay Loops
 */

#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/init.h>
#include <asm/param.h>
#include <asm/delay.h>
#include <asm/timex.h>
#include <asm/processor.h>


int read_current_timer(unsigned long *timer_value) { *timer_value = mfspr(SPR_TTCR); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Bonn21100.00%1100.00%
Total21100.00%1100.00%


void __delay(unsigned long cycles) { cycles_t start = get_cycles(); while ((get_cycles() - start) < cycles) cpu_relax(); }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Bonn2379.31%150.00%
Will Deacon620.69%150.00%
Total29100.00%2100.00%

EXPORT_SYMBOL(__delay);
inline void __const_udelay(unsigned long xloops) { unsigned long long loops; loops = (unsigned long long)xloops * loops_per_jiffy * HZ; __delay(loops >> 32); }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Bonn3085.71%150.00%
Will Deacon514.29%150.00%
Total35100.00%2100.00%

EXPORT_SYMBOL(__const_udelay);
void __udelay(unsigned long usecs) { __const_udelay(usecs * 0x10C7UL); /* 2**32 / 1000000 (rounded up) */ }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Bonn17100.00%1100.00%
Total17100.00%1100.00%

EXPORT_SYMBOL(__udelay);
void __ndelay(unsigned long nsecs) { __const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */ }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Bonn17100.00%1100.00%
Total17100.00%1100.00%

EXPORT_SYMBOL(__ndelay);

Overall Contributors

PersonTokensPropCommitsCommitProp
Jonas Bonn14690.68%125.00%
Will Deacon116.83%250.00%
Stafford Horne42.48%125.00%
Total161100.00%4100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.