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

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

?? apm.c

?? linux-2.6.15.6
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* -*- 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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲精品超碰| 日韩 欧美一区二区三区| 亚洲成人av在线电影| 精品无人码麻豆乱码1区2区| 色婷婷综合久久久中文一区二区| 91精品国产色综合久久不卡电影| 最好看的中文字幕久久| 麻豆精品久久久| 欧美三级日本三级少妇99| 国产欧美视频一区二区| 日韩精品欧美成人高清一区二区| av亚洲产国偷v产偷v自拍| 久久综合视频网| 美女视频黄久久| 欧美群妇大交群中文字幕| 亚洲欧美区自拍先锋| 成人综合在线视频| 欧美激情资源网| 国产乱子伦视频一区二区三区 | 一色桃子久久精品亚洲| 久久电影网站中文字幕| 7777精品伊人久久久大香线蕉| 国产精品电影院| 成人精品电影在线观看| 中文字幕不卡在线观看| 国产激情精品久久久第一区二区| 日韩欧美视频在线| 青草av.久久免费一区| 欧美精品v日韩精品v韩国精品v| 亚洲精品久久7777| 日本道色综合久久| 亚洲一区二区在线免费看| 一本大道久久a久久精二百 | 亚洲一区免费在线观看| 一本久久综合亚洲鲁鲁五月天| 国产精品久久久久久久久免费樱桃 | 韩国成人在线视频| 久久综合五月天婷婷伊人| 国产麻豆精品95视频| 国产亚洲一区二区三区在线观看| 国产一区二区调教| 亚洲国产成人午夜在线一区 | 久久青草国产手机看片福利盒子| 美国毛片一区二区三区| 国产精品久久久久久亚洲毛片 | www.99精品| 亚洲卡通欧美制服中文| 欧美亚洲综合一区| 麻豆国产一区二区| 国产欧美日韩卡一| 91福利小视频| 蜜臀91精品一区二区三区 | 偷拍自拍另类欧美| 欧美www视频| 99久久久无码国产精品| 一区二区三区不卡视频| 日韩一区二区三区在线| 国产91丝袜在线播放| 亚洲嫩草精品久久| 欧美日本一道本| 国产成人精品亚洲777人妖| 亚洲视频每日更新| 欧美一级爆毛片| 成人av在线网| 午夜天堂影视香蕉久久| 久久综合99re88久久爱| 91在线高清观看| 男女男精品网站| 国产精品国产精品国产专区不蜜 | 色综合色狠狠综合色| 日日摸夜夜添夜夜添精品视频 | 欧美一级理论片| 91精品国产麻豆国产自产在线 | 精品视频全国免费看| 国产麻豆精品一区二区| 亚洲午夜久久久久久久久电影院 | 欧美一二区视频| 99久久久精品| 久久精品国产77777蜜臀| 亚洲人成在线观看一区二区| 日韩欧美一区二区久久婷婷| 91在线观看美女| 国产综合久久久久影院| 天堂在线亚洲视频| 亚洲私人影院在线观看| 精品成人佐山爱一区二区| 欧美性色黄大片手机版| 国产不卡一区视频| 久草精品在线观看| 亚洲成av人片观看| 亚洲免费av网站| 亚洲国产精品av| 久久婷婷国产综合国色天香| 欧美日韩国产片| 91麻豆国产精品久久| 国产99精品国产| 精东粉嫩av免费一区二区三区| 一区二区三区欧美激情| 国产精品国产自产拍高清av | 91精品国产91久久综合桃花| 一本久道中文字幕精品亚洲嫩| 欧美性极品少妇| 97se亚洲国产综合自在线不卡| 国产精品538一区二区在线| 蜜臂av日日欢夜夜爽一区| 丝袜亚洲另类欧美| 天堂资源在线中文精品| 亚洲最大的成人av| 一区二区国产视频| 亚洲自拍另类综合| 亚洲午夜免费视频| 亚洲成av人片一区二区| 亚洲第一激情av| 亚洲午夜激情网页| 天天影视色香欲综合网老头| 亚州成人在线电影| 首页综合国产亚洲丝袜| 日韩国产欧美在线播放| 日韩av电影天堂| 久久精品国产精品青草| 国产原创一区二区| 国产不卡视频在线观看| 97久久精品人人做人人爽| 91麻豆自制传媒国产之光| 91最新地址在线播放| 一本色道综合亚洲| 精品视频1区2区| 欧美一区二区视频在线观看| 欧美大肚乱孕交hd孕妇| 久久夜色精品国产噜噜av| 欧美国产视频在线| 亚洲激情图片qvod| 青青草原综合久久大伊人精品 | 成人免费视频一区二区| 99riav一区二区三区| 欧美视频三区在线播放| 91精品国产美女浴室洗澡无遮挡| 2020日本不卡一区二区视频| 国产精品久久久久精k8| 亚洲国产裸拍裸体视频在线观看乱了 | 日本一区二区三区高清不卡| 专区另类欧美日韩| 青草av.久久免费一区| 国产jizzjizz一区二区| 欧美性大战久久久| 亚洲精品一区二区三区香蕉| 自拍偷在线精品自拍偷无码专区| 亚洲成人精品一区| 国产一区久久久| 91高清视频在线| 欧美变态tickling挠脚心| 综合久久久久久| 老司机午夜精品| 色综合久久久久综合体桃花网| 91精品在线观看入口| 欧美国产激情二区三区 | 国产一区二区三区蝌蚪| 91丨九色丨国产丨porny| 欧美一级高清片| 一个色妞综合视频在线观看| 久久成人av少妇免费| 91麻豆自制传媒国产之光| 精品国产免费视频| 午夜日韩在线观看| a4yy欧美一区二区三区| 欧美成人欧美edvon| 亚洲综合激情另类小说区| 国产成人免费网站| 日韩欧美国产wwwww| 一级精品视频在线观看宜春院 | 老色鬼精品视频在线观看播放| 99精品视频免费在线观看| 精品国内片67194| 日韩国产一二三区| 一本久久精品一区二区| 欧美国产日韩亚洲一区| 久久国产精品99久久人人澡| 欧美日韩中字一区| 亚洲精品亚洲人成人网| 国产成a人亚洲精品| 精品国精品国产| 日本aⅴ免费视频一区二区三区| 日本韩国欧美三级| 国产精品国模大尺度视频| 国产酒店精品激情| 26uuu亚洲综合色| 美腿丝袜亚洲三区| 在线成人av网站| 天天免费综合色| 欧美剧在线免费观看网站 | 亚洲美女少妇撒尿| 97久久人人超碰| 亚洲日本乱码在线观看| av在线一区二区三区| 国产精品乱人伦中文| 高清国产午夜精品久久久久久| 久久久影视传媒| 成人午夜激情在线| 中文字幕中文字幕在线一区| 97aⅴ精品视频一二三区|