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

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

?? dpm-idle.c

?? 一段基于linux的電源管理的源代碼
?? C
字號:
/* * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2002, MontaVista Software <source@mvista.com>. * * Based on ibm405lp_dpm.c by Bishop Brock, Copyright (C) 2002, * International Business Machines Corporation. */#include <linux/config.h>#include <linux/dpm.h>#include <linux/errno.h>#include <linux/init.h>#include <linux/kernel.h>#include <linux/kmod.h>#include <linux/module.h>#include <linux/proc_fs.h>#include <linux/stat.h>#include <linux/string.h>#include <asm/delay.h>#include <asm/hardirq.h>#include <asm/page.h>#include <asm/processor.h>#include <asm/system.h>#include <asm/uaccess.h>#undef DEBUG#ifdef DEBUG#define DPRINT(args...) printk(args)#else#define DPRINT(args...) do {} while (0)#endif#ifdef CONFIG_DPM_DBGPIO#define DBGPIO_INIT() dbgpio_init()#define DBGPIO(n, v) dbgpio(n, v)#else#define DBGPIO_INIT()#define DBGPIO(n, v)#endif /* CONFIG_DPM_DBGPIO */#ifdef CONFIG_DPM_IDLE_STATS#error "CONFIG_DPM_IDLE_STATS is not working yet."struct dpm_idle_lats idle_lats;#define incr_stat(stat) do { (idle_lats.stat)++; } while (0)#define stat_entry_time(idle_parms, v)\ do { (idle_parms)->entry_time = (v); } while (0)#define stat_exit_time(idle_parms, v)\ do { (idle_parms)->exit_time = (v); } while (0)#define stat_irq_check_time(idle_parms, v)\ do { (idle_parms)->irq_check_time = (v); } while (0)static voidstat_start_time(struct dpm_idle_parms *idle_parms){	idle_parms->entry_time = 0;	idle_parms->exit_time = 0;	idle_parms->start_time = dpm_md_time(); 	idle_parms->irq_check_time = 0;}static voidlatency_stats(struct dpm_idle_parms *idle_parms){	u32 latency;	if (idle_parms->entry_time && idle_parms->exit_time) {		latency = dpm_md_time() - idle_parms->exit_time;		if (latency > idle_lats.max_latency_to_idle_task)			idle_lats.max_latency_to_idle_task = latency;	}	if (idle_parms->entry_time) {		latency = idle_parms->entry_time - idle_parms->start_time;		if (latency > idle_lats.max_latency_to_idle)			idle_lats.max_latency_to_idle = latency;		if (idle_parms->irq_check_time) {			latency = idle_parms->entry_time -				idle_parms->irq_check_time;			if (latency > idle_lats.max_cs_to_idle)				idle_lats.max_cs_to_idle = latency;		}	}		}#else#define incr_stat(stats) do { }while(0)#define stat_entry_time(parms, time) do { }while(0)#define stat_exit_time(parms, time) do { }while(0)#define stat_irq_check_time(parms, time) do { }while(0)#define stat_start_time(parms) do { }while(0)#define latency_stats(parms) do { }while(0)#define latency_stats(parms) do { }while(0)   #endif /* CONFIG_DPM_STATS *//**************************************************************************** *  DPM Idle Handler ****************************************************************************//*    The idle handler is one of the most important parts of DPM, as very   significant amounts of energy are saved by moving to a low-power idle state   whenever possible.  The basic coding of the core of this routine is simply:   dpm_set_os(DPM_IDLE_STATE);   machine-dependent-idle-routine(&idle_parms);   dpm_set_os(DPM_IDLE_TASK_STATE);   The added complexity found here is introduced to avoid unnecessary work, and   especially to reduce the latencies associated with going in and out of idle.   Idle power can be greatly reduced by moving to a very low-frequency   operating point, but we also need to be aware of the impact on interrupt   latencies.  The DPM implementation of idle attempts to balance these   competing needs.   We support 2 "idle" states: DPM_IDLE_TASK_STATE and DPM_IDLE_STATE.  The   idle thread is marked as a "no-state" task, so that operating point changes   are not automatically made when the idle thread is scheduled. The   "idle-task" state is used for the majority of the idle thread.  Interrupts   that occur during idle are handled in this state as well. The "idle" state   is only entered from the idle-task state, and only for the express purpose   of allowing an ultra-low-power operating point.   The introduction of the idle-task state supports a stepped voltage and   frequency scaling at idle.  On the IBM 405LP we would not want to go from,   e.g., 266/133 @ 1.8 V directly to 8/8 @ 1.0 V and back.  Why not?  Because   we would get "stuck" at 8MHz even though we need to wake up and resume   useful work, e.g., we would have to set the 266/133 operating point while   running at 8/8.  So instead when going idle first step down to idle-task,   e.g., 100/50 @ 1.0 V, and then step down to e.g. 8/8 to halt.  The interrupt   that takes us out of idle takes us back to idle-task (100/50) for interrupt   processing and the potential return to 266/133.   The best policies for this implementation will be able to transition between   idle-task and idle without voltage scaling or driver notification. In these   cases the transitions are handled with minimal latency by simple frequency   scaling. *//* Can we change operating points with a simple frequency scale? */#define notification_required(cur, next) 0 /* FIX FIX FIX [ constraints ] */static inline intfscaleable(struct dpm_md_opt *cur, struct dpm_md_opt *next){	return (cur->v == next->v) &&		(dpm_relock_wait(cur, next) == 0) &&		!notification_required(cur, next);}static voidpreempt_idle(struct dpm_idle_parms *idle_parms){	incr_stat(idle_preemptions);	stat_entry_time(idle_parms, dpm_md_time());	stat_exit_time(idle_parms, 0);}#define preempt_idle(parms) do { }while(0)static inline voidquick_idle(struct dpm_idle_parms *idle_parms){	dpm_quick_enter_state(DPM_IDLE_STATE);	if (basic_idle(idle_parms))		incr_stat(quick_idles);	else		incr_stat(idle_preemptions);	dpm_quick_enter_state(DPM_IDLE_TASK_STATE);}intreturn_from_idle_immediate(void);static voidfull_idle(struct dpm_idle_parms *idle_parms,	  struct dpm_opt *idle_task_opt, struct dpm_opt *idle_opt){	dpm_fscaler idle_fscaler, idle_task_fscaler;	if (fscaleable(&idle_task_opt->md_opt, &idle_opt->md_opt) &&	    fscaleable(&idle_opt->md_opt, &idle_task_opt->md_opt)) {		/* In case we've spent so much time getting ready that an		   interrupt is already pending we can preempt the idle.  */		idle_fscaler = compute_fscaler(&idle_task_opt->md_opt, 					       &idle_opt->md_opt);		idle_task_fscaler = compute_fscaler(&idle_opt->md_opt, 						    &idle_task_opt->md_opt);		if (return_from_idle_immediate()) {			preempt_idle(idle_parms);			return;		}		stat_irq_check_time(idle_parms, dpm_md_time());					dpm_quick_enter_state(DPM_IDLE_STATE);#ifdef CONFIG_DPM_OPT_STATS		dpm_update_stats(&idle_opt->stats, &idle_task_opt->stats);#endif		idle_fscaler(&idle_opt->md_opt.regs);		if (basic_idle(idle_parms))			incr_stat(full_idles);		else			incr_stat(idle_preemptions);		idle_task_fscaler(&idle_task_opt->md_opt.regs);		dpm_quick_enter_state(DPM_IDLE_TASK_STATE);#ifdef CONFIG_DPM_OPT_STATS		dpm_update_stats(&idle_task_opt->stats, &idle_opt->stats);#endif	} else {		/* If you're concerned at all about interrupt latency you don't		   want to be here.  The current policy requires a voltage		   scale or some other long-latency operation to move between		   idle and idle-task. */		dpm_set_os(DPM_IDLE_STATE);		if (basic_idle(idle_parms))			incr_stat(inefficient_idles);		else			incr_stat(idle_preemptions);		dpm_set_os(DPM_IDLE_TASK_STATE);	}}/* If DPM is currently disabled here we simply do the standard    idle wait.   If we're not actually in DPM_IDLE_TASK_STATE, we need to go back and get   into this state.  This could happen in rare instances - an interrupt between   dpm_set_os() and the critical section.   If we are not yet at the idle-task operating point, or if there is no   difference between idle-task and idle, we can enter/exit the idle state   quickly since it's only for statistical purposes.  This is also true if for   some reason we can't get the DPM lock, since obviously an asynchronous event   is going to have to occur to clear the lock, and this event is going to take   us out of idle.   Otherwise the full idle shutdown is done. */static struct dpm_idle_parms dpm_idle_parms;voiddpm_idle(void){	unsigned long flags;	struct dpm_idle_parms *idle_parms = &dpm_idle_parms;	struct dpm_opt *idle_task_opt, *idle_opt;	current->dpm_state = DPM_NO_STATE;	dpm_set_os(DPM_IDLE_TASK_STATE);	dpm_md_idle_set_parms(&idle_parms->md);		#ifdef EXTREME_WORST_CASE	flush_instruction_cache();	flush_dcache_all();	local_flush_tlb_all();#endif	critical_save_and_cli(flags);	if (!current->need_resched) {		incr_stat(idles);		stat_start_time(idle_parms);		if (!dpm_enabled) {			basic_idle(idle_parms);		} else if (dpm_active_state != DPM_IDLE_TASK_STATE) {			incr_stat(interrupted_idles);		} else {			idle_task_opt = dpm_active_policy-> 				classes[DPM_IDLE_TASK_STATE]->opt;			idle_opt = dpm_active_policy-> 				classes[DPM_IDLE_STATE]->opt;			if ((dpm_active_opt != idle_task_opt) ||			    (idle_task_opt == idle_opt) ||			    dpm_trylock()) {				quick_idle(idle_parms);			} else {				dpm_unlock();				full_idle(idle_parms, idle_task_opt, idle_opt);			}		}		latency_stats(idle_parms);	}	critical_restore_flags(flags);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
男男视频亚洲欧美| 国产一区高清在线| 欧美精品一区二区三| 成人精品视频网站| 日韩成人精品视频| 亚洲同性gay激情无套| 欧美大肚乱孕交hd孕妇| 99久久精品免费| 精品一区二区三区在线视频| 亚洲美女淫视频| 国产亚洲一二三区| 欧美一级在线视频| 91久久精品日日躁夜夜躁欧美| 久久99久久99小草精品免视看| 夜夜嗨av一区二区三区网页| 亚洲国产精品二十页| 欧美成人精精品一区二区频| 欧美视频中文一区二区三区在线观看| 成人污视频在线观看| 精品中文字幕一区二区| 亚洲成人自拍一区| 亚洲免费成人av| 国产精品久久一级| 久久久美女毛片| 欧美xxxxxxxx| 日韩欧美高清一区| 欧美一区三区四区| 欧美日韩另类一区| 欧日韩精品视频| 91黄视频在线| 91成人在线观看喷潮| 91在线视频官网| 91网站黄www| 91一区二区三区在线观看| 成人高清av在线| 成人精品在线视频观看| 国产精品香蕉一区二区三区| 国产在线精品一区二区夜色| 美国一区二区三区在线播放| 男人的天堂久久精品| 美女精品一区二区| 狠狠色2019综合网| 激情综合色播激情啊| 国产在线精品视频| 岛国一区二区在线观看| 粉嫩aⅴ一区二区三区四区 | 亚洲一区二区三区四区在线观看| 精品国免费一区二区三区| 日韩一区二区三区视频在线观看| 欧美群妇大交群中文字幕| 欧美日韩一二三区| 欧美日本国产视频| 欧美日本一区二区| 欧美日韩精品一二三区| 欧美视频一二三区| 91国偷自产一区二区使用方法| 99久久国产综合精品女不卡| 成人在线综合网| 不卡视频一二三| 99久久精品国产精品久久| 成人av资源在线观看| www.视频一区| 色94色欧美sute亚洲线路二 | 另类小说图片综合网| 日韩不卡手机在线v区| 日本一区中文字幕| 捆绑调教一区二区三区| 精品综合久久久久久8888| 韩国女主播成人在线| 国产自产v一区二区三区c| 福利一区二区在线| 91老师片黄在线观看| 色噜噜狠狠成人中文综合 | 精品在线亚洲视频| 国产高清不卡一区二区| 国产一区二区三区综合| 国产精品一区久久久久| 成人国产一区二区三区精品| 91欧美一区二区| 欧美高清一级片在线| 精品99一区二区三区| 欧美国产日韩一二三区| 有坂深雪av一区二区精品| 亚洲va欧美va人人爽午夜| 久久99久久99精品免视看婷婷| 蜜桃视频一区二区三区在线观看| 成人福利视频在线看| 欧美三级中文字幕在线观看| 欧美成人猛片aaaaaaa| 国产精品免费免费| 午夜伦欧美伦电影理论片| 国产一区二区三区在线观看免费| 99这里只有精品| 欧美一区二区三区电影| 中文字幕免费一区| 性欧美疯狂xxxxbbbb| 国产又粗又猛又爽又黄91精品| 91蝌蚪porny| 日韩一区二区三区视频| 国产精品黄色在线观看| 三级在线观看一区二区| 国产乱码一区二区三区| 欧日韩精品视频| 欧美国产综合色视频| 日本三级亚洲精品| 暴力调教一区二区三区| 欧美午夜精品一区| 中文字幕免费不卡| 美女任你摸久久| 在线精品观看国产| 日本一区二区三区在线不卡| 青青草97国产精品免费观看| 91在线免费看| 国产亚洲欧美色| 视频一区二区不卡| 91九色最新地址| 国产亲近乱来精品视频 | 亚洲免费在线播放| 九色综合狠狠综合久久| 在线精品视频一区二区| 国产精品天美传媒| 麻豆成人在线观看| 欧美性大战久久久| 成人免费在线观看入口| 国内精品国产成人| 欧美日韩一区精品| 一区免费观看视频| 国产九色sp调教91| 日韩亚洲欧美一区| 午夜精品123| 欧美在线观看视频一区二区| 国产精品成人网| 国产在线不卡一卡二卡三卡四卡| 精品日韩一区二区三区 | 成人午夜电影网站| 精品久久久久久综合日本欧美| 亚洲超丰满肉感bbw| 91久久人澡人人添人人爽欧美| 国产精品欧美一区二区三区| 国产在线一区二区| 国产清纯白嫩初高生在线观看91| 激情综合网最新| 精品欧美久久久| 奇米777欧美一区二区| 宅男噜噜噜66一区二区66| 亚洲v精品v日韩v欧美v专区| 欧美私模裸体表演在线观看| 亚洲欧美在线另类| 久久亚洲影视婷婷| 美女任你摸久久| 久久免费电影网| 国产精品一级二级三级| 欧美精品一区二区三区在线| 久久99精品一区二区三区 | 欧美日韩一区二区不卡| 亚洲一区成人在线| 欧美久久免费观看| 日韩国产在线观看一区| 欧美高清hd18日本| 人人精品人人爱| 欧美成人精品3d动漫h| 亚洲国产综合91精品麻豆| 777亚洲妇女| 久久丁香综合五月国产三级网站| 日韩欧美一区在线观看| 久久er99精品| 国产人妖乱国产精品人妖| av在线播放成人| 91视频一区二区| 视频一区视频二区在线观看| 日韩欧美国产1| 国产999精品久久久久久| 亚洲色图欧美激情| 欧美亚洲综合久久| 免费看日韩精品| 国产精品乱码一区二区三区软件| 99久久精品99国产精品| 午夜视频在线观看一区二区三区| 欧美一区二区视频在线观看2022 | 日韩福利电影在线观看| 国产日韩精品一区二区三区在线| av在线不卡电影| 香蕉成人啪国产精品视频综合网| 欧美一区二区三级| 国产91综合一区在线观看| 亚洲欧美日韩一区二区| 日韩精品一区二| 白白色 亚洲乱淫| 日韩精品欧美精品| 国产欧美一区二区三区鸳鸯浴| 91久久香蕉国产日韩欧美9色| 麻豆精品视频在线观看| 中文字幕在线一区免费| 欧美精选一区二区| 国产成人8x视频一区二区 | 欧美日韩精品免费| 韩国av一区二区三区| 亚洲欧美电影一区二区| 欧美一区二区三区电影| kk眼镜猥琐国模调教系列一区二区|