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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? time.c

?? h內核
?? C
字號:
/* *  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);#ifdef CONFIG_PROFILING#define s390_do_profile(regs)	profile_tick(CPU_PROFILING, regs)#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, xticks;	/* 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 = __div(tmp, CLK_TICKS_PER_JIFFY) + 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) {		tmp = S390_lowcore.jiffy_timer - xtime_cc;		if (tmp >= 2*CLK_TICKS_PER_JIFFY) {			xticks = __div(tmp, CLK_TICKS_PER_JIFFY);			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);#else	for (xticks = ticks; xticks > 0; xticks--)		do_timer(regs);#endif#ifdef CONFIG_VIRT_CPU_ACCOUNTING	account_user_vtime(current);#else	while (ticks--)		update_process_times(user_mode(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;	cpu_set(smp_processor_id(), nohz_cpu_mask);	/*	 * 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()) {		cpu_clear(smp_processor_id(), nohz_cpu_mask);		return;	}	/*	 * This cpu is going really idle. Set up the clock comparator	 * for the next event.	 */	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}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久精| 欧美日韩国产成人在线免费| 婷婷中文字幕综合| 亚洲女子a中天字幕| 亚洲天堂2016| 亚洲一区在线播放| 亚洲一二三四久久| 午夜精品福利在线| 日本伊人色综合网| 麻豆精品一二三| 国产精品资源网站| 不卡av电影在线播放| 99视频有精品| 欧美性极品少妇| 6080yy午夜一二三区久久| 欧美精三区欧美精三区| 日韩一区二区视频| 久久精品水蜜桃av综合天堂| 国产欧美一区二区三区在线老狼| 欧美国产综合色视频| 亚洲卡通动漫在线| 欧美a级理论片| 大美女一区二区三区| 在线亚洲欧美专区二区| 欧美一区二区在线视频| 久久这里只有精品首页| 一区在线中文字幕| 午夜精品久久久久久久久久| 毛片不卡一区二区| 99久久er热在这里只有精品15 | 国产成人av影院| 成人激情黄色小说| 制服丝袜亚洲网站| 国产精品麻豆久久久| 亚洲电影一区二区| 国产一区二区三区免费在线观看| 93久久精品日日躁夜夜躁欧美| 在线播放国产精品二区一二区四区| 久久先锋影音av鲁色资源| 亚洲精品高清在线观看| 国产乱人伦偷精品视频免下载| 在线亚洲一区二区| 亚洲国产精品v| 日本欧美一区二区在线观看| 99天天综合性| 久久精品亚洲麻豆av一区二区| 亚洲高清久久久| 成人av片在线观看| 日韩视频一区二区在线观看| 亚洲精品欧美激情| 岛国一区二区在线观看| 日韩一区二区免费高清| 一区二区三区精品在线| 福利电影一区二区三区| 日韩免费观看2025年上映的电影| 亚洲另类色综合网站| 国产sm精品调教视频网站| 日韩久久精品一区| 日韩不卡手机在线v区| 91久久精品一区二区三区| 中文字幕不卡在线观看| 韩日av一区二区| 欧美精品久久天天躁| 亚洲国产日韩一区二区| 91久久精品午夜一区二区| 国产精品成人在线观看| 成人一级片网址| 久久精品一级爱片| 国产精品亚洲第一| 精品国产伦一区二区三区免费| 日本vs亚洲vs韩国一区三区 | 91老师片黄在线观看| 亚洲国产成人在线| 国产成人精品免费网站| 国产欧美综合色| www.爱久久.com| 国产精品国产自产拍在线| 不卡电影一区二区三区| 18成人在线观看| 91久久精品一区二区三区| 亚洲午夜私人影院| 欧美精品在欧美一区二区少妇| 丝袜美腿亚洲色图| 精品国产亚洲在线| 成人毛片视频在线观看| 亚洲色图都市小说| 欧美熟乱第一页| 日韩中文字幕1| 欧美岛国在线观看| 高清国产一区二区| 亚洲欧洲综合另类在线| 欧美理论电影在线| 韩国三级中文字幕hd久久精品| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 美女精品一区二区| 久久综合久久综合久久综合| 成人免费视频视频在线观看免费 | 在线观看免费视频综合| 婷婷久久综合九色综合绿巨人| 91精品国产麻豆国产自产在线| 久久精品国内一区二区三区| 日本一区二区久久| 在线观看亚洲专区| 国产呦精品一区二区三区网站| 国产精品不卡一区二区三区| 在线成人小视频| 成人自拍视频在线观看| 香蕉加勒比综合久久| 精品三级在线看| 色成年激情久久综合| 久久丁香综合五月国产三级网站 | 亚洲一区二区三区四区中文字幕 | 91色porny在线视频| 丝袜a∨在线一区二区三区不卡| 久久久电影一区二区三区| 在线免费不卡视频| 国产精品一品二品| 午夜精品影院在线观看| 欧美国产精品专区| 欧美老女人在线| 97久久人人超碰| 国产在线播放一区| 日韩精品一级二级| 亚洲黄色小说网站| 国产人久久人人人人爽| 69久久99精品久久久久婷婷| 99久久99久久久精品齐齐| 狠狠狠色丁香婷婷综合激情| 亚洲福利电影网| 亚洲欧美一区二区三区国产精品| 亚洲精品在线电影| 欧美日韩激情一区二区三区| 99久久久无码国产精品| 国产成人精品亚洲午夜麻豆| 麻豆国产精品777777在线| 亚洲一卡二卡三卡四卡无卡久久| 欧美国产综合一区二区| 26uuu精品一区二区在线观看| 在线成人午夜影院| 欧美精品丝袜中出| 欧美在线视频你懂得| 色综合久久综合| 91免费在线视频观看| 波多野结衣精品在线| 成人综合婷婷国产精品久久蜜臀| 久久99精品久久久久久| 另类中文字幕网| 久久狠狠亚洲综合| 麻豆91精品91久久久的内涵| 久久国产人妖系列| 久久99精品国产麻豆婷婷 | 国产精品久久久久7777按摩| 国产欧美一区二区在线| 久久久777精品电影网影网| 久久亚洲一区二区三区四区| 欧美大片一区二区| 久久―日本道色综合久久| 日韩免费高清av| 亚洲图片欧美一区| 午夜av电影一区| 美国毛片一区二区三区| 国产一区欧美一区| 成人国产精品免费网站| 色综合夜色一区| 在线观看日韩电影| 8x8x8国产精品| 久久色在线视频| 亚洲欧洲一区二区在线播放| 亚洲精品久久7777| 奇米影视在线99精品| 国产乱对白刺激视频不卡| 成人免费不卡视频| 欧美日韩免费电影| 精品久久一区二区三区| 亚洲国产精品成人综合色在线婷婷 | 久久久久亚洲综合| 国产精品不卡在线观看| 水野朝阳av一区二区三区| 极品少妇xxxx精品少妇偷拍| 99免费精品在线观看| 欧美日韩久久一区| 久久这里只有精品首页| 亚洲一区影音先锋| 国内精品免费在线观看| 91在线小视频| 日韩精品一区二区三区视频| 国产精品久久久久久久久果冻传媒 | 亚洲一区二区欧美| 久久se精品一区精品二区| 欧美剧在线免费观看网站| 日韩精品在线看片z| 亚洲视频免费在线观看| 久久黄色级2电影| 97久久超碰国产精品电影| 欧美三区免费完整视频在线观看| 精品国产伦一区二区三区观看方式 | 欧美va亚洲va| 亚洲欧美激情视频在线观看一区二区三区| 三级久久三级久久| www.视频一区|