亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? time.c

?? 優(yōu)龍2410linux2.6.8內(nèi)核源代碼
?? C
字號(hào):
/* *  arch/s390/kernel/time.c *    Time of day based timer functions. * *  S390 version *    Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation *    Author(s): Hartmut Penner (hp@de.ibm.com), *               Martin Schwidefsky (schwidefsky@de.ibm.com), *               Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) * *  Derived from "arch/i386/kernel/time.c" *    Copyright (C) 1991, 1992, 1995  Linus Torvalds */#include <linux/config.h>#include <linux/errno.h>#include <linux/module.h>#include <linux/sched.h>#include <linux/kernel.h>#include <linux/param.h>#include <linux/string.h>#include <linux/mm.h>#include <linux/interrupt.h>#include <linux/time.h>#include <linux/delay.h>#include <linux/init.h>#include <linux/smp.h>#include <linux/types.h>#include <linux/profile.h>#include <linux/timex.h>#include <linux/notifier.h>#include <asm/uaccess.h>#include <asm/delay.h>#include <asm/s390_ext.h>#include <asm/div64.h>#include <asm/irq.h>#include <asm/timer.h>/* change this if you have some constant time drift */#define USECS_PER_JIFFY     ((unsigned long) 1000000/HZ)#define CLK_TICKS_PER_JIFFY ((unsigned long) USECS_PER_JIFFY << 12)/* * Create a small time difference between the timer interrupts * on the different cpus to avoid lock contention. */#define CPU_DEVIATION       (smp_processor_id() << 12)#define TICK_SIZE ticku64 jiffies_64 = INITIAL_JIFFIES;EXPORT_SYMBOL(jiffies_64);static ext_int_info_t ext_int_info_cc;static u64 init_timer_cc;static u64 jiffies_timer_cc;static u64 xtime_cc;extern unsigned long wall_jiffies;/* * Scheduler clock - returns current time in nanosec units. */unsigned long long sched_clock(void){	return ((get_clock() - jiffies_timer_cc) * 1000) >> 12;}void tod_to_timeval(__u64 todval, struct timespec *xtime){	unsigned long long sec;	sec = todval >> 12;	do_div(sec, 1000000);	xtime->tv_sec = sec;	todval -= (sec * 1000000) << 12;	xtime->tv_nsec = ((todval * 1000) >> 12);}static inline unsigned long do_gettimeoffset(void) {	__u64 now;        now = (get_clock() - jiffies_timer_cc) >> 12;	/* We require the offset from the latest update of xtime */	now -= (__u64) wall_jiffies*USECS_PER_JIFFY;	return (unsigned long) now;}/* * This version of gettimeofday has microsecond resolution. */void do_gettimeofday(struct timeval *tv){	unsigned long flags;	unsigned long seq;	unsigned long usec, sec;	do {		seq = read_seqbegin_irqsave(&xtime_lock, flags);		sec = xtime.tv_sec;		usec = xtime.tv_nsec / 1000 + do_gettimeoffset();	} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));	while (usec >= 1000000) {		usec -= 1000000;		sec++;	}	tv->tv_sec = sec;	tv->tv_usec = usec;}EXPORT_SYMBOL(do_gettimeofday);int do_settimeofday(struct timespec *tv){	time_t wtm_sec, sec = tv->tv_sec;	long wtm_nsec, nsec = tv->tv_nsec;	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)		return -EINVAL;	write_seqlock_irq(&xtime_lock);	/* This is revolting. We need to set the xtime.tv_nsec	 * correctly. However, the value in this location is	 * is value at the last tick.	 * Discover what correction gettimeofday	 * would have done, and then undo it!	 */	nsec -= do_gettimeoffset() * 1000;	wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);	wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);	set_normalized_timespec(&xtime, sec, nsec);	set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);	time_adjust = 0;		/* stop active adjtime() */	time_status |= STA_UNSYNC;	time_maxerror = NTP_PHASE_LIMIT;	time_esterror = NTP_PHASE_LIMIT;	write_sequnlock_irq(&xtime_lock);	clock_was_set();	return 0;}EXPORT_SYMBOL(do_settimeofday);#ifndef CONFIG_ARCH_S390Xstatic inline __u32__calculate_ticks(__u64 elapsed){	register_pair rp;	rp.pair = elapsed >> 1;	asm ("dr %0,%1" : "+d" (rp) : "d" (CLK_TICKS_PER_JIFFY >> 1));	return rp.subreg.odd;}#else /* CONFIG_ARCH_S390X */static inline __u32__calculate_ticks(__u64 elapsed){	return elapsed / CLK_TICKS_PER_JIFFY;}#endif /* CONFIG_ARCH_S390X */#ifdef CONFIG_PROFILINGextern char _stext, _etext;/* * The profiling function is SMP safe. (nothing can mess * around with "current", and the profiling counters are * updated with atomic operations). This is especially * useful with a profiling multiplier != 1 */static inline void s390_do_profile(struct pt_regs * regs){	unsigned long eip;	extern cpumask_t prof_cpu_mask;	profile_hook(regs);	if (user_mode(regs))		return;	if (!prof_buffer)		return;	eip = instruction_pointer(regs);	/*	 * Only measure the CPUs specified by /proc/irq/prof_cpu_mask.	 * (default is all CPUs.)	 */	if (!cpu_isset(smp_processor_id(), prof_cpu_mask))		return;	eip -= (unsigned long) &_stext;	eip >>= prof_shift;	/*	 * Don't ignore out-of-bounds EIP values silently,	 * put them into the last histogram slot, so if	 * present, they will show up as a sharp peak.	 */	if (eip > prof_len-1)		eip = prof_len-1;	atomic_inc((atomic_t *)&prof_buffer[eip]);}#else#define s390_do_profile(regs)  do { ; } while(0)#endif /* CONFIG_PROFILING *//* * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick */void account_ticks(struct pt_regs *regs){	__u64 tmp;	__u32 ticks;	/* Calculate how many ticks have passed. */	if (S390_lowcore.int_clock < S390_lowcore.jiffy_timer)		return;	tmp = S390_lowcore.int_clock - S390_lowcore.jiffy_timer;	if (tmp >= 2*CLK_TICKS_PER_JIFFY) {  /* more than two ticks ? */		ticks = __calculate_ticks(tmp) + 1;		S390_lowcore.jiffy_timer +=			CLK_TICKS_PER_JIFFY * (__u64) ticks;	} else if (tmp >= CLK_TICKS_PER_JIFFY) {		ticks = 2;		S390_lowcore.jiffy_timer += 2*CLK_TICKS_PER_JIFFY;	} else {		ticks = 1;		S390_lowcore.jiffy_timer += CLK_TICKS_PER_JIFFY;	}	/* set clock comparator for next tick */	tmp = S390_lowcore.jiffy_timer + CPU_DEVIATION;        asm volatile ("SCKC %0" : : "m" (tmp));#ifdef CONFIG_SMP	/*	 * Do not rely on the boot cpu to do the calls to do_timer.	 * Spread it over all cpus instead.	 */	write_seqlock(&xtime_lock);	if (S390_lowcore.jiffy_timer > xtime_cc) {		__u32 xticks;		tmp = S390_lowcore.jiffy_timer - xtime_cc;		if (tmp >= 2*CLK_TICKS_PER_JIFFY) {			xticks = __calculate_ticks(tmp);			xtime_cc += (__u64) xticks * CLK_TICKS_PER_JIFFY;		} else {			xticks = 1;			xtime_cc += CLK_TICKS_PER_JIFFY;		}		while (xticks--)			do_timer(regs);	}	write_sequnlock(&xtime_lock);	while (ticks--)		update_process_times(user_mode(regs));#else	while (ticks--)		do_timer(regs);#endif	s390_do_profile(regs);}#ifdef CONFIG_NO_IDLE_HZ#ifdef CONFIG_NO_IDLE_HZ_INITint sysctl_hz_timer = 0;#elseint sysctl_hz_timer = 1;#endif/* * Stop the HZ tick on the current CPU. * Only cpu_idle may call this function. */static inline void stop_hz_timer(void){	__u64 timer;	if (sysctl_hz_timer != 0)		return;	/*	 * Leave the clock comparator set up for the next timer	 * tick if either rcu or a softirq is pending.	 */	if (rcu_pending(smp_processor_id()) || local_softirq_pending())		return;	/*	 * This cpu is going really idle. Set up the clock comparator	 * for the next event.	 */	cpu_set(smp_processor_id(), nohz_cpu_mask);	timer = (__u64) (next_timer_interrupt() - jiffies) + jiffies_64;	timer = jiffies_timer_cc + timer * CLK_TICKS_PER_JIFFY;	asm volatile ("SCKC %0" : : "m" (timer));}/* * Start the HZ tick on the current CPU. * Only cpu_idle may call this function. */static inline void start_hz_timer(void){	if (!cpu_isset(smp_processor_id(), nohz_cpu_mask))		return;	account_ticks(__KSTK_PTREGS(current));	cpu_clear(smp_processor_id(), nohz_cpu_mask);}static int nohz_idle_notify(struct notifier_block *self,			    unsigned long action, void *hcpu){	switch (action) {	case CPU_IDLE:		stop_hz_timer();		break;	case CPU_NOT_IDLE:		start_hz_timer();		break;	}	return NOTIFY_OK;}static struct notifier_block nohz_idle_nb = {	.notifier_call = nohz_idle_notify,};void __init nohz_init(void){	if (register_idle_notifier(&nohz_idle_nb))		panic("Couldn't register idle notifier");}#endif/* * Start the clock comparator on the current CPU. */void init_cpu_timer(void){	unsigned long cr0;	__u64 timer;	timer = jiffies_timer_cc + jiffies_64 * CLK_TICKS_PER_JIFFY;	S390_lowcore.jiffy_timer = timer + CLK_TICKS_PER_JIFFY;	timer += CLK_TICKS_PER_JIFFY + CPU_DEVIATION;	asm volatile ("SCKC %0" : : "m" (timer));        /* allow clock comparator timer interrupt */	__ctl_store(cr0, 0, 0);        cr0 |= 0x800;	__ctl_load(cr0, 0, 0);}extern void vtime_init(void);/* * Initialize the TOD clock and the CPU timer of * the boot cpu. */void __init time_init(void){	__u64 set_time_cc;	int cc;        /* kick the TOD clock */        asm volatile ("STCK 0(%1)\n\t"                      "IPM  %0\n\t"                      "SRL  %0,28" : "=r" (cc) : "a" (&init_timer_cc) 				   : "memory", "cc");        switch (cc) {        case 0: /* clock in set state: all is fine */                break;        case 1: /* clock in non-set state: FIXME */                printk("time_init: TOD clock in non-set state\n");                break;        case 2: /* clock in error state: FIXME */                printk("time_init: TOD clock in error state\n");                break;        case 3: /* clock in stopped or not-operational state: FIXME */                printk("time_init: TOD clock stopped/non-operational\n");                break;        }	jiffies_timer_cc = init_timer_cc - jiffies_64 * CLK_TICKS_PER_JIFFY;	/* set xtime */	xtime_cc = init_timer_cc + CLK_TICKS_PER_JIFFY;	set_time_cc = init_timer_cc - 0x8126d60e46000000LL +		(0x3c26700LL*1000000*4096);        tod_to_timeval(set_time_cc, &xtime);        set_normalized_timespec(&wall_to_monotonic,                                -xtime.tv_sec, -xtime.tv_nsec);	/* request the clock comparator external interrupt */        if (register_early_external_interrupt(0x1004, 0,					      &ext_int_info_cc) != 0)                panic("Couldn't request external interrupt 0x1004");        init_cpu_timer();#ifdef CONFIG_NO_IDLE_HZ	nohz_init();#endif#ifdef CONFIG_VIRT_TIMER	vtime_init();#endif}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文欧美字幕免费| 国产精品18久久久久久久久久久久| 成人动漫一区二区| 国产精品网站导航| 成人免费毛片嘿嘿连载视频| 亚洲国产电影在线观看| 99久久伊人精品| 中文字幕日韩一区| 91国内精品野花午夜精品| 亚洲精品ww久久久久久p站| 欧美性大战久久| 婷婷中文字幕综合| 精品卡一卡二卡三卡四在线| 精品在线一区二区| 中文字幕不卡在线播放| 成人精品小蝌蚪| 亚洲在线视频免费观看| 51午夜精品国产| 国产一区二区导航在线播放| 中文字幕av资源一区| 91免费版在线| 午夜电影一区二区| 精品国产亚洲在线| 91在线一区二区三区| 午夜精品一区二区三区三上悠亚| 日韩欧美一二区| 成人黄色软件下载| 五月激情综合色| 久久精品视频一区| 91精彩视频在线| 久久精品国产久精国产| 国产精品不卡视频| 91麻豆精品国产91久久久使用方法 | 亚洲成人av中文| 久久久天堂av| 在线看不卡av| 激情偷乱视频一区二区三区| 国产精品国产精品国产专区不蜜| 欧美另类久久久品| 国产99一区视频免费| 午夜国产精品影院在线观看| 欧美国产精品一区二区三区| 欧美嫩在线观看| 成人性生交大合| 蜜桃精品视频在线观看| ●精品国产综合乱码久久久久| 欧美一区二区三区视频免费播放| 成人黄色777网| 美女免费视频一区| 一区二区三区高清| 日本一区二区在线不卡| 91麻豆精品国产| 91免费看片在线观看| 国产麻豆成人精品| 日日夜夜精品免费视频| 亚洲色图欧美在线| 久久久精品影视| 91精品国产综合久久久久久漫画| av电影在线观看完整版一区二区| 久久福利视频一区二区| 午夜天堂影视香蕉久久| 亚洲天堂中文字幕| 国产日韩欧美一区二区三区乱码 | 亚洲天堂精品在线观看| 久久女同精品一区二区| 欧美一区二区人人喊爽| 在线观看亚洲一区| 91丝袜高跟美女视频| 国产成人午夜视频| 精品一区二区三区久久久| 婷婷久久综合九色国产成人| 伊人婷婷欧美激情| 视频一区二区不卡| 亚洲色图色小说| 亚洲欧美综合色| 国产精品不卡一区二区三区| 中文字幕av免费专区久久| 久久亚洲一区二区三区四区| 日韩亚洲欧美在线| 欧美精品一卡二卡| 91精品免费在线观看| 3atv在线一区二区三区| 91麻豆精品国产91| 日韩无一区二区| 日韩限制级电影在线观看| 日韩一区二区在线观看视频播放| 欧美乱妇23p| 91精品国产色综合久久不卡电影 | 国产精品久久久久三级| 亚洲国产成人在线| 亚洲欧美在线高清| 亚洲精品乱码久久久久久日本蜜臀 | 裸体健美xxxx欧美裸体表演| 奇米色一区二区| 免费日韩伦理电影| 精品一区二区三区久久| 国产精品一区免费在线观看| 东方欧美亚洲色图在线| 成人av免费网站| 日本道精品一区二区三区| 欧美亚洲国产一区二区三区va| 欧美这里有精品| 欧美日韩成人在线| 精品人伦一区二区色婷婷| 国产偷v国产偷v亚洲高清| 日韩美女视频一区二区| 亚洲一卡二卡三卡四卡无卡久久| 三级在线观看一区二区| 国内精品久久久久影院一蜜桃| 国产成人免费9x9x人网站视频| 97精品超碰一区二区三区| 91成人网在线| 精品国产3级a| √…a在线天堂一区| 天堂av在线一区| 国产精品中文字幕欧美| 一本色道久久综合亚洲精品按摩| 欧美欧美午夜aⅴ在线观看| 欧美xxxx在线观看| 亚洲丝袜美腿综合| 日韩黄色片在线观看| 懂色av一区二区三区免费看| 在线视频你懂得一区二区三区| 日韩一区二区三区四区| 国产欧美1区2区3区| 亚洲大片在线观看| 国产一区二区三区综合| 欧美性受xxxx| 国产亚洲精品7777| 丝袜美腿亚洲一区二区图片| 国产成人亚洲综合a∨婷婷图片 | 黄色精品一二区| 色哟哟日韩精品| 久久久久9999亚洲精品| 亚洲成人激情av| 成人手机电影网| 日韩欧美电影一区| 亚洲精品国产精品乱码不99| 国产在线精品不卡| 欧美精品一二三四| 亚洲精品免费在线| 国产精品一区久久久久| 91精品啪在线观看国产60岁| 亚洲欧美日韩在线播放| 国模套图日韩精品一区二区| 欧美日韩午夜在线| 日韩毛片一二三区| 国产精品99久久久| 欧美一区二区三区公司| 一区二区三区成人在线视频| 成人午夜电影小说| 久久综合久久综合亚洲| 日本亚洲天堂网| 欧美亚州韩日在线看免费版国语版| 国产精品欧美精品| 国产在线一区二区综合免费视频| 欧美日本免费一区二区三区| 亚洲蜜臀av乱码久久精品| 成人午夜电影小说| 久久久精品免费免费| 美女高潮久久久| 日韩亚洲欧美中文三级| 天堂va蜜桃一区二区三区漫画版| 在线观看欧美日本| 一区二区三区美女视频| 91色九色蝌蚪| 综合中文字幕亚洲| 成人手机在线视频| 国产精品无人区| 国产91露脸合集magnet| 国产午夜久久久久| 粉嫩欧美一区二区三区高清影视| 26uuu国产一区二区三区| 久久99国产乱子伦精品免费| 日韩一级片在线播放| 蜜桃传媒麻豆第一区在线观看| 88在线观看91蜜桃国自产| 亚洲一区二区中文在线| 欧美日韩视频专区在线播放| 午夜影院在线观看欧美| 在线播放日韩导航| 免费观看日韩av| 久久夜色精品一区| 国产99久久久国产精品免费看| 中文字幕av一区二区三区高| 99久久夜色精品国产网站| 亚洲欧美福利一区二区| 91啪九色porn原创视频在线观看| 亚洲免费视频成人| 欧美日韩国产在线观看| 免费观看91视频大全| 精品成a人在线观看| 国产成人免费视频| 亚洲视频小说图片| 欧美精品一级二级三级| 国产一区二区影院| 国产欧美久久久精品影院| 91麻豆视频网站| 天天操天天色综合| 久久久www免费人成精品|