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

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

?? apm.c

?? linux-2.6.15.6
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
/* -*- linux-c -*- * APM BIOS driver for Linux * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au) * * Initial development of this driver was funded by NEC Australia P/L *	and NEC Corporation * * 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, 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. * * October 1995, Rik Faith (faith@cs.unc.edu): *    Minor enhancements and updates (to the patch set) for 1.3.x *    Documentation * January 1996, Rik Faith (faith@cs.unc.edu): *    Make /proc/apm easy to format (bump driver version) * March 1996, Rik Faith (faith@cs.unc.edu): *    Prohibit APM BIOS calls unless apm_enabled. *    (Thanks to Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>) * April 1996, Stephen Rothwell (sfr@canb.auug.org.au) *    Version 1.0 and 1.1 * May 1996, Version 1.2 * Feb 1998, Version 1.3 * Feb 1998, Version 1.4 * Aug 1998, Version 1.5 * Sep 1998, Version 1.6 * Nov 1998, Version 1.7 * Jan 1999, Version 1.8 * Jan 1999, Version 1.9 * Oct 1999, Version 1.10 * Nov 1999, Version 1.11 * Jan 2000, Version 1.12 * Feb 2000, Version 1.13 * Nov 2000, Version 1.14 * Oct 2001, Version 1.15 * Jan 2002, Version 1.16 * Oct 2002, Version 1.16ac * * History: *    0.6b: first version in official kernel, Linux 1.3.46 *    0.7: changed /proc/apm format, Linux 1.3.58 *    0.8: fixed gcc 2.7.[12] compilation problems, Linux 1.3.59 *    0.9: only call bios if bios is present, Linux 1.3.72 *    1.0: use fixed device number, consolidate /proc/apm into this file, *         Linux 1.3.85 *    1.1: support user-space standby and suspend, power off after system *         halted, Linux 1.3.98 *    1.2: When resetting RTC after resume, take care so that the time *         is only incorrect by 30-60mS (vs. 1S previously) (Gabor J. Toth *         <jtoth@princeton.edu>); improve interaction between *         screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 *    1.2a:Simple change to stop mysterious bug reports with SMP also added *	   levels to the printk calls. APM is not defined for SMP machines. *         The new replacment for it is, but Linux doesn't yet support this. *         Alan Cox Linux 2.1.55 *    1.3: Set up a valid data descriptor 0x40 for buggy BIOS's *    1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by *         Dean Gaudet <dgaudet@arctic.org>. *         C. Scott Ananian <cananian@alumni.princeton.edu> Linux 2.1.87 *    1.5: Fix segment register reloading (in case of bad segments saved *         across BIOS call). *         Stephen Rothwell *    1.6: Cope with complier/assembler differences. *         Only try to turn off the first display device. *         Fix OOPS at power off with no APM BIOS by Jan Echternach *                   <echter@informatik.uni-rostock.de> *         Stephen Rothwell *    1.7: Modify driver's cached copy of the disabled/disengaged flags *         to reflect current state of APM BIOS. *         Chris Rankin <rankinc@bellsouth.net> *         Reset interrupt 0 timer to 100Hz after suspend *         Chad Miller <cmiller@surfsouth.com> *         Add CONFIG_APM_IGNORE_SUSPEND_BOUNCE *         Richard Gooch <rgooch@atnf.csiro.au> *         Allow boot time disabling of APM *         Make boot messages far less verbose by default *         Make asm safer *         Stephen Rothwell *    1.8: Add CONFIG_APM_RTC_IS_GMT *         Richard Gooch <rgooch@atnf.csiro.au> *         change APM_NOINTS to CONFIG_APM_ALLOW_INTS *         remove dependency on CONFIG_PROC_FS *         Stephen Rothwell *    1.9: Fix small typo.  <laslo@wodip.opole.pl> *         Try to cope with BIOS's that need to have all display *         devices blanked and not just the first one. *         Ross Paterson <ross@soi.city.ac.uk> *         Fix segment limit setting it has always been wrong as *         the segments needed to have byte granularity. *         Mark a few things __init. *         Add hack to allow power off of SMP systems by popular request. *         Use CONFIG_SMP instead of __SMP__ *         Ignore BOUNCES for three seconds. *         Stephen Rothwell *   1.10: Fix for Thinkpad return code. *         Merge 2.2 and 2.3 drivers. *         Remove APM dependencies in arch/i386/kernel/process.c *         Remove APM dependencies in drivers/char/sysrq.c *         Reset time across standby. *         Allow more inititialisation on SMP. *         Remove CONFIG_APM_POWER_OFF and make it boot time *         configurable (default on). *         Make debug only a boot time parameter (remove APM_DEBUG). *         Try to blank all devices on any error. *   1.11: Remove APM dependencies in drivers/char/console.c *         Check nr_running to detect if we are idle (from *         Borislav Deianov <borislav@lix.polytechnique.fr>) *         Fix for bioses that don't zero the top part of the *         entrypoint offset (Mario Sitta <sitta@al.unipmn.it>) *         (reported by Panos Katsaloulis <teras@writeme.com>). *         Real mode power off patch (Walter Hofmann *         <Walter.Hofmann@physik.stud.uni-erlangen.de>). *   1.12: Remove CONFIG_SMP as the compiler will optimize *         the code away anyway (smp_num_cpus == 1 in UP) *         noted by Artur Skawina <skawina@geocities.com>. *         Make power off under SMP work again. *         Fix thinko with initial engaging of BIOS. *         Make sure power off only happens on CPU 0 *         (Paul "Rusty" Russell <rusty@rustcorp.com.au>). *         Do error notification to user mode if BIOS calls fail. *         Move entrypoint offset fix to ...boot/setup.S *         where it belongs (Cosmos <gis88564@cis.nctu.edu.tw>). *         Remove smp-power-off. SMP users must now specify *         "apm=power-off" on the kernel command line. Suggested *         by Jim Avera <jima@hal.com>, modified by Alan Cox *         <alan@lxorguk.ukuu.org.uk>. *         Register the /proc/apm entry even on SMP so that *         scripts that check for it before doing power off *         work (Jim Avera <jima@hal.com>). *   1.13: Changes for new pm_ interfaces (Andy Henroid *         <andy_henroid@yahoo.com>). *         Modularize the code. *         Fix the Thinkpad (again) :-( (CONFIG_APM_IGNORE_MULTIPLE_SUSPENDS *         is now the way life works). *         Fix thinko in suspend() (wrong return). *         Notify drivers on critical suspend. *         Make kapmd absorb more idle time (Pavel Machek <pavel@suse.cz> *         modified by sfr). *         Disable interrupts while we are suspended (Andy Henroid *         <andy_henroid@yahoo.com> fixed by sfr). *         Make power off work on SMP again (Tony Hoyle *         <tmh@magenta-logic.com> and <zlatko@iskon.hr>) modified by sfr. *         Remove CONFIG_APM_SUSPEND_BOUNCE.  The bounce ignore *         interval is now configurable. *   1.14: Make connection version persist across module unload/load. *         Enable and engage power management earlier. *         Disengage power management on module unload. *         Changed to use the sysrq-register hack for registering the *         power off function called by magic sysrq based upon discussions *         in irc://irc.openprojects.net/#kernelnewbies *         (Crutcher Dunnavant <crutcher+kernel@datastacks.com>). *         Make CONFIG_APM_REAL_MODE_POWER_OFF run time configurable. *         (Arjan van de Ven <arjanv@redhat.com>) modified by sfr. *         Work around byte swap bug in one of the Vaio's BIOS's *         (Marc Boucher <marc@mbsi.ca>). *         Exposed the disable flag to dmi so that we can handle known *         broken APM (Alan Cox <alan@redhat.com>). *   1.14ac: If the BIOS says "I slowed the CPU down" then don't spin *         calling it - instead idle. (Alan Cox <alan@redhat.com>) *         If an APM idle fails log it and idle sensibly *   1.15: Don't queue events to clients who open the device O_WRONLY. *         Don't expect replies from clients who open the device O_RDONLY. *         (Idea from Thomas Hood) *         Minor waitqueue cleanups. (John Fremlin <chief@bandits.org>) *   1.16: Fix idle calling. (Andreas Steinmetz <ast@domdv.de> et al.) *         Notify listeners of standby or suspend events before notifying *         drivers. Return EBUSY to ioctl() if suspend is rejected. *         (Russell King <rmk@arm.linux.org.uk> and Thomas Hood) *         Ignore first resume after we generate our own resume event *         after a suspend (Thomas Hood) *         Daemonize now gets rid of our controlling terminal (sfr). *         CONFIG_APM_CPU_IDLE now just affects the default value of *         idle_threshold (sfr). *         Change name of kernel apm daemon (as it no longer idles) (sfr). *   1.16ac: Fix up SMP support somewhat. You can now force SMP on and we *	   make _all_ APM calls on the CPU#0. Fix unsafe sign bug. *	   TODO: determine if its "boot CPU" or "CPU0" we want to lock to. * * APM 1.1 Reference: * *   Intel Corporation, Microsoft Corporation. Advanced Power Management *   (APM) BIOS Interface Specification, Revision 1.1, September 1993. *   Intel Order Number 241704-001.  Microsoft Part Number 781-110-X01. * * [This document is available free from Intel by calling 800.628.8686 (fax * 916.356.6100) or 800.548.4725; or via anonymous ftp from * ftp://ftp.intel.com/pub/IAL/software_specs/apmv11.doc.  It is also * available from Microsoft by calling 206.882.8080.] * * APM 1.2 Reference: *   Intel Corporation, Microsoft Corporation. Advanced Power Management *   (APM) BIOS Interface Specification, Revision 1.2, February 1996. * * [This document is available from Microsoft at: *    http://www.microsoft.com/hwdev/busbios/amp_12.htm] */#include <linux/config.h>#include <linux/module.h>#include <linux/poll.h>#include <linux/types.h>#include <linux/stddef.h>#include <linux/timer.h>#include <linux/fcntl.h>#include <linux/slab.h>#include <linux/stat.h>#include <linux/proc_fs.h>#include <linux/miscdevice.h>#include <linux/apm_bios.h>#include <linux/init.h>#include <linux/time.h>#include <linux/sched.h>#include <linux/pm.h>#include <linux/pm_legacy.h>#include <linux/device.h>#include <linux/kernel.h>#include <linux/smp.h>#include <linux/smp_lock.h>#include <linux/dmi.h>#include <linux/suspend.h>#include <asm/system.h>#include <asm/uaccess.h>#include <asm/desc.h>#include <asm/i8253.h>#include "io_ports.h"extern unsigned long get_cmos_time(void);extern void machine_real_restart(unsigned char *, int);#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT)extern int (*console_blank_hook)(int);#endif/* * The apm_bios device is one of the misc char devices. * This is its minor number. */#define	APM_MINOR_DEV	134/* * See Documentation/Config.help for the configuration options. * * Various options can be changed at boot time as follows: * (We allow underscores for compatibility with the modules code) *	apm=on/off			enable/disable APM *	    [no-]allow[-_]ints		allow interrupts during BIOS calls *	    [no-]broken[-_]psr		BIOS has a broken GetPowerStatus call *	    [no-]realmode[-_]power[-_]off	switch to real mode before *	    					powering off *	    [no-]debug			log some debugging messages *	    [no-]power[-_]off		power off on shutdown *	    [no-]smp			Use apm even on an SMP box *	    bounce[-_]interval=<n>	number of ticks to ignore suspend *	    				bounces *          idle[-_]threshold=<n>       System idle percentage above which to *                                      make APM BIOS idle calls. Set it to *                                      100 to disable. *          idle[-_]period=<n>          Period (in 1/100s of a second) over *                                      which the idle percentage is *                                      calculated. *//* KNOWN PROBLEM MACHINES: * * U: TI 4000M TravelMate: BIOS is *NOT* APM compliant *                         [Confirmed by TI representative] * ?: ACER 486DX4/75: uses dseg 0040, in violation of APM specification *                    [Confirmed by BIOS disassembly] *                    [This may work now ...] * P: Toshiba 1950S: battery life information only gets updated after resume * P: Midwest Micro Soundbook Elite DX2/66 monochrome: screen blanking * 	broken in BIOS [Reported by Garst R. Reese <reese@isn.net>] * ?: AcerNote-950: oops on reading /proc/apm - workaround is a WIP * 	Neale Banks <neale@lowendale.com.au> December 2000 * * Legend: U = unusable with APM patches *         P = partially usable with APM patches *//* * Define as 1 to make the driver always call the APM BIOS busy * routine even if the clock was not reported as slowed by the * idle routine.  Otherwise, define as 0. */#define ALWAYS_CALL_BUSY   1/* * Define to make the APM BIOS calls zero all data segment registers (so * that an incorrect BIOS implementation will cause a kernel panic if it * tries to write to arbitrary memory). */#define APM_ZERO_SEGS#include "apm.h"/* * Define to make all _set_limit calls use 64k limits.  The APM 1.1 BIOS is * supposed to provide limit information that it recognizes.  Many machines * do this correctly, but many others do not restrict themselves to their * claimed limit.  When this happens, they will cause a segmentation * violation in the kernel at boot time.  Most BIOS's, however, will * respect a 64k limit, so we use that.  If you want to be pedantic and * hold your BIOS to its claims, then undefine this. */#define APM_RELAX_SEGMENTS/* * Define to re-initialize the interrupt 0 timer to 100 Hz after a suspend. * This patched by Chad Miller <cmiller@surfsouth.com>, original code by * David Chen <chen@ctpa04.mit.edu> */#undef INIT_TIMER_AFTER_SUSPEND#ifdef INIT_TIMER_AFTER_SUSPEND#include <linux/timex.h>#include <asm/io.h>#include <linux/delay.h>#endif/* * Need to poll the APM BIOS every second */#define APM_CHECK_TIMEOUT	(HZ)/* * Ignore suspend events for this amount of time after a resume */#define DEFAULT_BOUNCE_INTERVAL		(3 * HZ)/* * Maximum number of events stored */#define APM_MAX_EVENTS		20/* * The per-file APM data */struct apm_user {	int		magic;	struct apm_user *	next;	unsigned int	suser: 1;	unsigned int	writer: 1;	unsigned int	reader: 1;	unsigned int	suspend_wait: 1;	int		suspend_result;	int		suspends_pending;	int		standbys_pending;	int		suspends_read;	int		standbys_read;	int		event_head;	int		event_tail;	apm_event_t	events[APM_MAX_EVENTS];};/* * The magic number in apm_user */#define APM_BIOS_MAGIC		0x4101/* * idle percentage above which bios idle calls are done */#ifdef CONFIG_APM_CPU_IDLE#define DEFAULT_IDLE_THRESHOLD	95#else#define DEFAULT_IDLE_THRESHOLD	100#endif#define DEFAULT_IDLE_PERIOD	(100 / 3)/* * Local variables */static struct {	unsigned long	offset;	unsigned short	segment;}				apm_bios_entry;static int			clock_slowed;static int			idle_threshold = DEFAULT_IDLE_THRESHOLD;static int			idle_period = DEFAULT_IDLE_PERIOD;static int			set_pm_idle;static int			suspends_pending;static int			standbys_pending;static int			ignore_sys_suspend;static int			ignore_normal_resume;static int			bounce_interval = DEFAULT_BOUNCE_INTERVAL;#ifdef CONFIG_APM_RTC_IS_GMT#	define	clock_cmos_diff	0#	define	got_clock_diff	1#elsestatic long			clock_cmos_diff;static int			got_clock_diff;#endifstatic int			debug;static int			smp;static int			apm_disabled = -1;#ifdef CONFIG_SMPstatic int			power_off;#elsestatic int			power_off = 1;#endif#ifdef CONFIG_APM_REAL_MODE_POWER_OFFstatic int			realmode_power_off = 1;#elsestatic int			realmode_power_off;#endifstatic int			exit_kapmd;static int			kapmd_running;#ifdef CONFIG_APM_ALLOW_INTSstatic int			allow_ints = 1;#elsestatic int			allow_ints;#endifstatic int			broken_psr;static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);static struct apm_user *	user_list;static DEFINE_SPINLOCK(user_list_lock);static struct desc_struct	bad_bios_desc = { 0, 0x00409200 };static char			driver_version[] = "1.16ac";	/* no spaces *//* *	APM event names taken from the APM 1.2 specification. These are *	the message codes that the BIOS uses to tell us about events */static char *	apm_event_name[] = {	"system standby",	"system suspend",	"normal resume",	"critical resume",	"low battery",	"power status change",	"update time",	"critical suspend",	"user standby",	"user suspend",	"system standby resume",	"capabilities change"};

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人一区二区三区中文字幕| 欧美日韩国产综合草草| 婷婷中文字幕一区三区| 久久综合999| 欧美日韩欧美一区二区| 成人自拍视频在线观看| 日欧美一区二区| 亚洲欧美激情插| 国产亚洲综合性久久久影院| 欧美一区二区网站| 欧美亚洲愉拍一区二区| 成人免费视频一区| 韩国av一区二区| 天天做天天摸天天爽国产一区| 国产精品大尺度| 久久久99精品久久| 日韩一区二区精品在线观看| 欧美日韩在线精品一区二区三区激情| 国产99久久久久久免费看农村| 日韩av电影免费观看高清完整版在线观看| 亚洲婷婷在线视频| 国产清纯在线一区二区www| 日韩精品一区二区三区四区| 欧美日韩国产另类一区| 色综合天天综合在线视频| 成人开心网精品视频| 国产麻豆视频一区二区| 免费成人深夜小野草| 天堂成人国产精品一区| 亚洲成av人影院在线观看网| 一区av在线播放| 一区二区三区高清不卡| 亚洲欧美怡红院| 中文字幕中文字幕在线一区 | 亚洲国产精华液网站w | 久久精品亚洲精品国产欧美 | 国产精品青草综合久久久久99| 亚洲精品在线观看视频| 欧美xingq一区二区| 日韩精品一区二区在线观看| 日韩一区二区免费在线观看| 日韩一区和二区| 日韩欧美国产精品| 欧美变态口味重另类| 日韩精品资源二区在线| 日韩欧美亚洲另类制服综合在线| 欧美一区三区四区| 日韩视频免费观看高清完整版在线观看 | 老司机免费视频一区二区| 蜜臀99久久精品久久久久久软件| 久久69国产一区二区蜜臀| 久久99精品久久只有精品| 激情综合五月天| 国产激情视频一区二区三区欧美 | 91亚洲精华国产精华精华液| 91一区二区三区在线观看| 色94色欧美sute亚洲线路二| 欧美性猛片xxxx免费看久爱| 在线成人av网站| 欧美一区二区美女| 国产亚洲综合性久久久影院| 1024精品合集| 亚洲成人av福利| 精品在线播放午夜| 99久久99久久久精品齐齐| 欧美日韩一区国产| 日韩欧美一级二级| 欧美国产视频在线| 亚洲在线视频免费观看| 琪琪一区二区三区| 国产精品一二三在| 色中色一区二区| 91精品国产入口| 国产亚洲精品7777| 亚洲综合成人网| 久久99九九99精品| 91麻豆国产福利在线观看| 69p69国产精品| 国产欧美日韩另类一区| 亚洲电影中文字幕在线观看| 久久99精品国产| 91麻豆免费观看| 精品国产3级a| 亚洲激情六月丁香| 国产一区二区三区四区五区入口| 91日韩在线专区| 欧美tickle裸体挠脚心vk| 亚洲精品中文在线观看| 青青草97国产精品免费观看无弹窗版| 处破女av一区二区| 日韩一区二区免费视频| 亚洲精品成人天堂一二三| 韩国v欧美v亚洲v日本v| 欧美三级资源在线| 亚洲国产高清在线| 蜜桃av一区二区在线观看| 色婷婷亚洲精品| 欧美激情艳妇裸体舞| 蜜臀av性久久久久蜜臀aⅴ| 91看片淫黄大片一级在线观看| 欧美不卡视频一区| 亚洲一二三四区| 成人高清视频免费观看| 精品国产电影一区二区| 五月天激情小说综合| 91片在线免费观看| 中文久久乱码一区二区| 国产一区二区三区四区五区美女| 制服丝袜激情欧洲亚洲| 亚洲国产色一区| 色婷婷综合视频在线观看| 欧美激情在线观看视频免费| 麻豆国产欧美一区二区三区| 欧美日韩国产欧美日美国产精品| 亚洲免费色视频| 成人激情小说网站| 久久久精品国产免费观看同学| 理论片日本一区| 欧美高清dvd| 视频一区二区三区入口| 欧美在线一区二区| 亚洲美女在线国产| 91丨九色丨蝌蚪富婆spa| 亚洲国产精品成人久久综合一区| 久久精品国产精品亚洲综合| 91精品国产综合久久久久久久久久 | 99久久精品费精品国产一区二区| 国产亚洲福利社区一区| 韩国成人精品a∨在线观看| 精品少妇一区二区三区在线播放| 热久久免费视频| 欧美猛男超大videosgay| 亚洲午夜久久久久| 欧美影片第一页| 亚洲国产精品久久久久秋霞影院 | 日韩中文字幕av电影| 欧美色手机在线观看| 曰韩精品一区二区| 91福利精品视频| 亚洲高清视频的网址| 91精品久久久久久久91蜜桃| 日韩av电影免费观看高清完整版| 欧美一区二区免费观在线| 久久成人羞羞网站| 欧美xxxxxxxx| 岛国av在线一区| 国产精品久久久99| 色悠悠亚洲一区二区| 亚洲精品欧美综合四区| 欧美视频三区在线播放| 首页国产欧美日韩丝袜| 精品少妇一区二区三区免费观看| 国产精品伊人色| 国产精品第五页| 欧美日韩高清一区二区三区| 欧美aⅴ一区二区三区视频| 日韩午夜激情免费电影| 亚洲欧美另类小说| 在线播放欧美女士性生活| 国内精品第一页| 综合自拍亚洲综合图不卡区| 欧美网站一区二区| 黄页网站大全一区二区| 中文字幕国产精品一区二区| 91色porny蝌蚪| 免费成人小视频| 欧美激情一区二区三区四区| 在线亚洲高清视频| 麻豆极品一区二区三区| 国产精品传媒视频| 在线播放中文字幕一区| 成人在线综合网| 午夜不卡av免费| 亚洲一区二区3| 久久久久久99精品| 色爱区综合激月婷婷| 美腿丝袜一区二区三区| 国产精品色哟哟网站| 69堂亚洲精品首页| 成人黄色av电影| 青青草原综合久久大伊人精品| 国产精品久久一级| 91精品国产91久久久久久最新毛片 | 国产剧情一区二区| 夜色激情一区二区| 久久精品在线免费观看| 欧美亚洲综合色| 高清国产一区二区| 天天影视网天天综合色在线播放| 亚洲国产精品黑人久久久| 91麻豆精品国产91久久久资源速度| 国产.欧美.日韩| 美国欧美日韩国产在线播放| 伊人开心综合网| 久久精品免费在线观看| 欧美一区日本一区韩国一区| 日本韩国欧美国产| 成人看片黄a免费看在线| 极品美女销魂一区二区三区免费| 亚洲精品中文在线观看|