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

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

?? iseries_irq.c

?? 這個linux源代碼是很全面的~基本完整了~使用c編譯的~由于時間問題我沒有親自測試~但就算用來做參考資料也是非常好的
?? C
字號:
/************************************************************************//* This module supports the iSeries PCI bus interrupt handling          *//* Copyright (C) 20yy  <Robert L Holtorf> <IBM Corp>                    *//*                                                                      *//* 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                                          *//************************************************************************//* Change Activity:                                                     *//*   Created, December 13, 2000 by Wayne Holm                           */ /* End Change Activity                                                  *//************************************************************************/#include <linux/pci.h>#include <linux/init.h>#include <linux/threads.h>#include <linux/smp.h>#include <linux/param.h>#include <linux/string.h>#include <linux/bootmem.h>#include <linux/blk.h>#include <linux/ide.h>#include <linux/irq.h>#include <linux/spinlock.h>#include <asm/ppcdebug.h>#include <asm/iSeries/HvCallPci.h>#include <asm/iSeries/HvCallXm.h>#include <asm/iSeries/iSeries_irq.h>#include <asm/iSeries/XmPciLpEvent.h>hw_irq_controller iSeries_IRQ_handler = {	"iSeries irq controller",	iSeries_startup_IRQ,	/* startup */	iSeries_shutdown_IRQ,	/* shutdown */	iSeries_enable_IRQ,	/* enable */	iSeries_disable_IRQ,	/* disable */	NULL,			/* ack  */	iSeries_end_IRQ,	/* end  */	NULL			/* set_affinity */};struct iSeries_irqEntry {	u32 dsa;	struct iSeries_irqEntry* next;};struct iSeries_irqAnchor {	u8  valid : 1;	u8  reserved : 7;	u16  entryCount;	struct iSeries_irqEntry* head;};struct iSeries_irqAnchor iSeries_irqMap[NR_IRQS];void iSeries_init_irqMap(int irq);/*  This is called by init_IRQ.  set in ppc_md.init_IRQ by iSeries_setup.c */void __init iSeries_init_IRQ(void){	int i;	for (i = 0; i < NR_IRQS; i++) {		irq_desc[i].handler = &iSeries_IRQ_handler;		irq_desc[i].status = 0;		irq_desc[i].status |= IRQ_DISABLED;		irq_desc[i].depth = 1;		iSeries_init_irqMap(i);	}	/* Register PCI event handler and open an event path */	PPCDBG(PPCDBG_BUSWALK,"Register PCI event handler and open an event path\n");	XmPciLpEvent_init();	return;}/********************************************************************** *  Called by iSeries_init_IRQ  * Prevent IRQs 0 and 255 from being used.  IRQ 0 appears in * uninitialized devices.  IRQ 255 appears in the PCI interrupt * line register if a PCI error occurs, *********************************************************************/void __init iSeries_init_irqMap(int irq){	iSeries_irqMap[irq].valid = (irq == 0 || irq == 255)? 0 : 1;	iSeries_irqMap[irq].entryCount = 0;	iSeries_irqMap[irq].head = NULL;}/* This is called out of iSeries_scan_slot to allocate an IRQ for an EADS slot *//* It calculates the irq value for the slot.                                   */int __init iSeries_allocate_IRQ(HvBusNumber busNumber, HvSubBusNumber subBusNumber, HvAgentId deviceId){	u8 idsel = (deviceId >> 4);	u8 function = deviceId & 0x0F;	int irq = ((((busNumber-1)*16 + (idsel-1)*8 + function)*9/8) % 253) + 2;	return irq;}/* This is called out of iSeries_scan_slot to assign the EADS slot to its IRQ number */int __init iSeries_assign_IRQ(int irq, HvBusNumber busNumber, HvSubBusNumber subBusNumber, HvAgentId deviceId){	int rc;	u32 dsa = (busNumber << 16) | (subBusNumber << 8) | deviceId;	struct iSeries_irqEntry* newEntry;	unsigned long flags;	if (irq < 0 || irq >= NR_IRQS) {		return -1;	}	newEntry = kmalloc(sizeof(*newEntry), GFP_KERNEL);	if (newEntry == NULL) {		return -ENOMEM;	}	newEntry->dsa  = dsa;	newEntry->next = NULL;	/********************************************************************	* Probably not necessary to lock the irq since allocation is only 	* done during buswalk, but it should not hurt anything except a 	* little performance to be smp safe.	*******************************************************************/	spin_lock_irqsave(&irq_desc[irq].lock, flags);	if (iSeries_irqMap[irq].valid) {		/* Push the new element onto the irq stack */		newEntry->next = iSeries_irqMap[irq].head;		iSeries_irqMap[irq].head = newEntry;		++iSeries_irqMap[irq].entryCount;		rc = 0;		PPCDBG(PPCDBG_BUSWALK,"iSeries_assign_IRQ   0x%04X.%02X.%02X = 0x%04X\n",busNumber, subBusNumber, deviceId, irq);	}	else {		printk("PCI: Something is wrong with the iSeries_irqMap. \n");		kfree(newEntry);		rc = -1;    }	spin_unlock_irqrestore(&irq_desc[irq].lock, flags);	return rc;}/* This is called by iSeries_activate_IRQs */unsigned int iSeries_startup_IRQ(unsigned int irq){	struct iSeries_irqEntry* entry;	u32 bus, subBus, deviceId, function, mask;	for(entry=iSeries_irqMap[irq].head; entry!=NULL; entry=entry->next) {		bus      = (entry->dsa >> 16) & 0xFFFF;		subBus   = (entry->dsa >> 8) & 0xFF;		deviceId = entry->dsa & 0xFF;		function = deviceId & 0x0F;		/* Link the IRQ number to the bridge */		HvCallXm_connectBusUnit(bus, subBus, deviceId, irq);        	/* Unmask bridge interrupts in the FISR */		mask = 0x01010000 << function;		HvCallPci_unmaskFisr(bus, subBus, deviceId, mask);		PPCDBG(PPCDBG_BUSWALK,"iSeries_activate_IRQ 0x%02X.%02X.%02X  Irq:0x%02X\n",bus,subBus,deviceId,irq);	}	return 0;}/* This is called out of iSeries_fixup to activate interrupt * generation for usable slots                              */void __init iSeries_activate_IRQs(){	int irq;	unsigned long flags;	for (irq=0; irq < NR_IRQS; irq++) {		spin_lock_irqsave(&irq_desc[irq].lock, flags);		irq_desc[irq].handler->startup(irq);		spin_unlock_irqrestore(&irq_desc[irq].lock, flags);    	}}/*  this is not called anywhere currently */void iSeries_shutdown_IRQ(unsigned int irq) {	struct iSeries_irqEntry* entry;	u32 bus, subBus, deviceId, function, mask;	/* irq should be locked by the caller */	for (entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {		bus = (entry->dsa >> 16) & 0xFFFF;		subBus = (entry->dsa >> 8) & 0xFF;		deviceId = entry->dsa & 0xFF;		function = deviceId & 0x0F;		/* Invalidate the IRQ number in the bridge */		HvCallXm_connectBusUnit(bus, subBus, deviceId, 0);		/* Mask bridge interrupts in the FISR */		mask = 0x01010000 << function;		HvCallPci_maskFisr(bus, subBus, deviceId, mask);	}}/*********************************************************** * This will be called by device drivers (via disable_IRQ) * to disable INTA in the bridge interrupt status register. ***********************************************************/void iSeries_disable_IRQ(unsigned int irq){	struct iSeries_irqEntry* entry;	u32 bus, subBus, deviceId, mask;	/* The IRQ has already been locked by the caller */	for (entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {		bus      = (entry->dsa >> 16) & 0xFFFF;		subBus   = (entry->dsa >> 8) & 0xFF;		deviceId = entry->dsa & 0xFF;		/* Mask secondary INTA   */		mask = 0x80000000;		HvCallPci_maskInterrupts(bus, subBus, deviceId, mask);		PPCDBG(PPCDBG_BUSWALK,"iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n",bus,subBus,deviceId,irq);    	}}/*********************************************************** * This will be called by device drivers (via enable_IRQ) * to enable INTA in the bridge interrupt status register. ***********************************************************/void iSeries_enable_IRQ(unsigned int irq){	struct iSeries_irqEntry* entry;	u32 bus, subBus, deviceId, mask;	/* The IRQ has already been locked by the caller */	for (entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {		bus      = (entry->dsa >> 16) & 0xFFFF;		subBus   = (entry->dsa >> 8) & 0xFF;		deviceId = entry->dsa & 0xFF;		/* Unmask secondary INTA */		mask = 0x80000000;		HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask);		PPCDBG(PPCDBG_BUSWALK,"iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n",bus,subBus,deviceId,irq);	}}/* Need to define this so ppc_irq_dispatch_handler will NOT call   enable_IRQ at the end of interrupt handling.  However, this   does nothing because there is not enough information provided   to do the EOI HvCall.  This is done by XmPciLpEvent.c */void iSeries_end_IRQ(unsigned int irq){}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜精品一区二区三区嫩草 | 日韩一区精品视频| 美女爽到高潮91| 91麻豆精品国产91久久久久久| 亚洲风情在线资源站| 5566中文字幕一区二区电影| 日本视频一区二区| 久久久久99精品一区| 成人一区二区视频| 一区二区三区影院| 欧美日韩一区二区三区不卡| 日韩成人av影视| 国产欧美日韩卡一| 日本精品视频一区二区| 日韩电影一区二区三区四区| 精品久久久久久久久久久久久久久久久| 日韩一区二区电影| 国产一区二区美女诱惑| 国产精品私房写真福利视频| 91黄色在线观看| 日韩高清在线不卡| 欧美国产禁国产网站cc| 色狠狠一区二区| 亚洲国产精品一区二区www在线| 精品精品国产高清一毛片一天堂| 成人小视频免费在线观看| 亚洲色图欧美在线| 日韩欧美在线网站| 不卡的av电影在线观看| 日韩影视精彩在线| 国产精品欧美经典| 欧美一级欧美三级在线观看| 成人看片黄a免费看在线| 亚洲一区成人在线| 中文久久乱码一区二区| 日韩欧美中文字幕一区| 91国产丝袜在线播放| 国产在线精品一区二区三区不卡 | 日韩欧美中文一区二区| 成人av电影在线| 日韩va欧美va亚洲va久久| 欧美经典三级视频一区二区三区| 欧美精品 日韩| xfplay精品久久| 亚洲国产欧美在线人成| 国产美女娇喘av呻吟久久| 色诱亚洲精品久久久久久| 精品精品欲导航| 亚洲无线码一区二区三区| 国产在线精品一区在线观看麻豆| 色婷婷激情综合| 亚洲日本一区二区| 亚洲另类在线一区| 91女人视频在线观看| 国内外成人在线视频| 亚洲精品欧美激情| 国产精品久久久一区麻豆最新章节| 色婷婷亚洲精品| 蜜臀av一区二区| 亚洲精品久久7777| 欧美久久久久久久久| 91色porny| 国产精品69毛片高清亚洲| 日本亚洲天堂网| 最新国产成人在线观看| 国产69精品久久久久777| 国产成人综合亚洲网站| 欧美精品一区二| 色婷婷综合久久久| 97国产一区二区| 国产一区二区女| 国产一区二区三区不卡在线观看 | 成人av在线资源网站| 国产综合成人久久大片91| 毛片不卡一区二区| 亚洲小说欧美激情另类| 亚洲美女视频在线观看| 国产欧美日韩在线视频| 久久久综合视频| 7777精品伊人久久久大香线蕉的 | 在线欧美日韩精品| 亚洲风情在线资源站| 精品一区二区在线视频| 亚洲成人综合视频| 亚洲丝袜另类动漫二区| 亚洲精品国产一区二区三区四区在线| 久久亚洲欧美国产精品乐播| 久久中文娱乐网| 91精品国产91久久综合桃花| 亚洲乱码日产精品bd | 日本成人在线不卡视频| 中文字幕中文字幕在线一区 | 欧美一区二区三区不卡| 欧美一区二区视频在线观看2022| 欧美亚洲国产一卡| 日韩三级视频在线观看| 欧美一区二区三区视频在线 | 久久成人av少妇免费| 韩国欧美国产1区| 国产精品白丝jk白祙喷水网站| 亚洲va天堂va国产va久| 蜜桃视频在线观看一区二区| 午夜精品在线视频一区| 久久aⅴ国产欧美74aaa| 极品美女销魂一区二区三区| 高清beeg欧美| 成人激情动漫在线观看| 8x8x8国产精品| 26uuuu精品一区二区| 久久久综合激的五月天| 久久亚区不卡日本| 久久久噜噜噜久噜久久综合| 国产精品亲子伦对白| 亚洲欧美激情一区二区| 一区二区三区免费在线观看| 天天综合网天天综合色| 另类小说色综合网站| 99久久精品一区二区| 在线观看亚洲精品| 日韩一级片在线播放| 久久综合999| 香蕉成人伊视频在线观看| 日本欧美一区二区三区| 成人黄色免费短视频| 在线观看日韩国产| 久久免费的精品国产v∧| 亚洲视频一区在线观看| 亚洲激情一二三区| 青娱乐精品在线视频| 成人黄色小视频在线观看| 欧美亚洲综合色| 在线观看亚洲专区| 欧美国产精品中文字幕| 国产精品美女一区二区在线观看| 视频一区视频二区中文字幕| 国产真实乱子伦精品视频| 欧美另类一区二区三区| 国产欧美精品区一区二区三区| 免费美女久久99| 成人激情开心网| 国产亚洲一区二区三区四区| 亚洲欧美精品午睡沙发| 国产成a人亚洲| 欧美天堂亚洲电影院在线播放| 国产欧美日韩精品一区| 成人小视频免费观看| 91浏览器入口在线观看| 精品一区二区三区免费播放| 六月婷婷色综合| 中文字幕一区二区三区在线观看 | 国内精品久久久久影院薰衣草 | 精品一区二区三区在线观看国产| 99久久精品免费看国产| 国产视频在线观看一区二区三区| 亚洲国产日韩一区二区| 99麻豆久久久国产精品免费优播| 欧美精品在线一区二区三区| 亚洲视频电影在线| 国产麻豆一精品一av一免费| 日韩一区二区在线看片| 亚洲四区在线观看| 成人激情免费视频| 欧美激情在线一区二区| 国产乱子伦视频一区二区三区 | eeuss国产一区二区三区| 精品国产制服丝袜高跟| 久久精品国内一区二区三区| 欧美在线视频日韩| 中文字幕精品一区| 国内精品在线播放| 欧美二区乱c少妇| 欧美aaa在线| 欧美日本精品一区二区三区| 天天综合色天天综合色h| 在线观看亚洲专区| 国产高清不卡一区| 久久婷婷成人综合色| 国产一区不卡视频| 欧美不卡一区二区三区| 国产剧情在线观看一区二区| 欧美电影免费观看高清完整版在线 | 在线不卡的av| 一二三四区精品视频| 91国内精品野花午夜精品| 亚洲欧美日韩国产另类专区| 99精品视频在线观看| 亚洲男同1069视频| 在线国产亚洲欧美| 美女一区二区三区在线观看| 欧美老人xxxx18| 精东粉嫩av免费一区二区三区| 日韩亚洲欧美高清| 国产99久久久久久免费看农村| 2024国产精品视频| 本田岬高潮一区二区三区| 国产视频911| 欧美伊人久久大香线蕉综合69 | 日本女人一区二区三区| 91福利在线看| 日本欧美一区二区|