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

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

?? pci.c

?? 優(yōu)龍2410linux2.6.8內(nèi)核源代碼
?? C
字號(hào):
/* *	linux/arch/alpha/kernel/pci.c * * Extruded from code written by *	Dave Rusling (david.rusling@reo.mts.dec.com) *	David Mosberger (davidm@cs.arizona.edu) *//* 2.3.x PCI/resources, 1999 Andrea Arcangeli <andrea@suse.de> *//* * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru> *	     PCI-PCI bridges cleanup */#include <linux/config.h>#include <linux/string.h>#include <linux/pci.h>#include <linux/init.h>#include <linux/ioport.h>#include <linux/kernel.h>#include <linux/bootmem.h>#include <linux/module.h>#include <linux/cache.h>#include <linux/slab.h>#include <asm/machvec.h>#include "proto.h"#include "pci_impl.h"/* * Some string constants used by the various core logics.  */const char *const pci_io_names[] = {  "PCI IO bus 0", "PCI IO bus 1", "PCI IO bus 2", "PCI IO bus 3",  "PCI IO bus 4", "PCI IO bus 5", "PCI IO bus 6", "PCI IO bus 7"};const char *const pci_mem_names[] = {  "PCI mem bus 0", "PCI mem bus 1", "PCI mem bus 2", "PCI mem bus 3",  "PCI mem bus 4", "PCI mem bus 5", "PCI mem bus 6", "PCI mem bus 7"};const char pci_hae0_name[] = "HAE0";/* Indicate whether we respect the PCI setup left by console. *//* * Make this long-lived  so that we know when shutting down * whether we probed only or not. */int pci_probe_only;/* * The PCI controller list. */struct pci_controller *hose_head, **hose_tail = &hose_head;struct pci_controller *pci_isa_hose;/* * Quirks. */static void __initquirk_isa_bridge(struct pci_dev *dev){	dev->class = PCI_CLASS_BRIDGE_ISA << 8;}static void __initquirk_cypress(struct pci_dev *dev){	/* The Notorious Cy82C693 chip.  */	/* The Cypress IDE controller doesn't support native mode, but it	   has programmable addresses of IDE command/control registers.	   This violates PCI specifications, confuses the IDE subsystem and	   causes resource conflicts between the primary HD_CMD register and	   the floppy controller.  Ugh.  Fix that.  */	if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE) {		dev->resource[0].flags = 0;		dev->resource[1].flags = 0;	}	/* The Cypress bridge responds on the PCI bus in the address range	   0xffff0000-0xffffffff (conventional x86 BIOS ROM).  There is no	   way to turn this off.  The bridge also supports several extended	   BIOS ranges (disabled after power-up), and some consoles do turn	   them on.  So if we use a large direct-map window, or a large SG	   window, we must avoid the entire 0xfff00000-0xffffffff region.  */	else if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA) {		if (__direct_map_base + __direct_map_size >= 0xfff00000UL)			__direct_map_size = 0xfff00000UL - __direct_map_base;		else {			struct pci_controller *hose = dev->sysdata;			struct pci_iommu_arena *pci = hose->sg_pci;			if (pci && pci->dma_base + pci->size >= 0xfff00000UL)				pci->size = 0xfff00000UL - pci->dma_base;		}	}}/* Called for each device after PCI setup is done. */static void __initpcibios_fixup_final(struct pci_dev *dev){	unsigned int class = dev->class >> 8;	if (class == PCI_CLASS_BRIDGE_ISA || class == PCI_CLASS_BRIDGE_EISA) {		dev->dma_mask = MAX_ISA_DMA_ADDRESS - 1;		isa_bridge = dev;	}}struct pci_fixup pcibios_fixups[] __initdata = {	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378,	  quirk_isa_bridge },	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693,	  quirk_cypress },	{ PCI_FIXUP_FINAL,  PCI_ANY_ID,	PCI_ANY_ID,	  pcibios_fixup_final },	{ 0 }};#define KB			1024#define MB			(1024*KB)#define GB			(1024*MB)voidpcibios_align_resource(void *data, struct resource *res,		       unsigned long size, unsigned long align){	struct pci_dev *dev = data;	struct pci_controller *hose = dev->sysdata;	unsigned long alignto;	unsigned long start = res->start;	if (res->flags & IORESOURCE_IO) {		/* Make sure we start at our min on all hoses */		if (start - hose->io_space->start < PCIBIOS_MIN_IO)			start = PCIBIOS_MIN_IO + hose->io_space->start;		/*		 * Put everything into 0x00-0xff region modulo 0x400		 */		if (start & 0x300)			start = (start + 0x3ff) & ~0x3ff;	}	else if	(res->flags & IORESOURCE_MEM) {		/* Make sure we start at our min on all hoses */		if (start - hose->mem_space->start < PCIBIOS_MIN_MEM)			start = PCIBIOS_MIN_MEM + hose->mem_space->start;		/*		 * The following holds at least for the Low Cost		 * Alpha implementation of the PCI interface:		 *		 * In sparse memory address space, the first		 * octant (16MB) of every 128MB segment is		 * aliased to the very first 16 MB of the		 * address space (i.e., it aliases the ISA		 * memory address space).  Thus, we try to		 * avoid allocating PCI devices in that range.		 * Can be allocated in 2nd-7th octant only.		 * Devices that need more than 112MB of		 * address space must be accessed through		 * dense memory space only!		 */		/* Align to multiple of size of minimum base.  */		alignto = max(0x1000UL, align);		start = ALIGN(start, alignto);		if (hose->sparse_mem_base && size <= 7 * 16*MB) {			if (((start / (16*MB)) & 0x7) == 0) {				start &= ~(128*MB - 1);				start += 16*MB;				start  = ALIGN(start, alignto);			}			if (start/(128*MB) != (start + size - 1)/(128*MB)) {				start &= ~(128*MB - 1);				start += (128 + 16)*MB;				start  = ALIGN(start, alignto);			}		}	}	res->start = start;}#undef KB#undef MB#undef GBstatic int __initpcibios_init(void){	if (alpha_mv.init_pci)		alpha_mv.init_pci();	return 0;}subsys_initcall(pcibios_init);char * __initpcibios_setup(char *str){	return str;}#ifdef ALPHA_RESTORE_SRM_SETUPstatic struct pdev_srm_saved_conf *srm_saved_configs;void __initpdev_save_srm_config(struct pci_dev *dev){	struct pdev_srm_saved_conf *tmp;	static int printed = 0;	if (!alpha_using_srm || pci_probe_only)		return;	if (!printed) {		printk(KERN_INFO "pci: enabling save/restore of SRM state\n");		printed = 1;	}	tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);	if (!tmp) {		printk(KERN_ERR "%s: kmalloc() failed!\n", __FUNCTION__);		return;	}	tmp->next = srm_saved_configs;	tmp->dev = dev;	pci_save_state(dev, tmp->regs);	srm_saved_configs = tmp;}voidpci_restore_srm_config(void){	struct pdev_srm_saved_conf *tmp;	/* No need to restore if probed only. */	if (pci_probe_only)		return;	/* Restore SRM config. */	for (tmp = srm_saved_configs; tmp; tmp = tmp->next) {		pci_restore_state(tmp->dev, tmp->regs);	}}#endifvoid __initpcibios_fixup_resource(struct resource *res, struct resource *root){	res->start += root->start;	res->end += root->start;}void __initpcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus){	/* Update device resources.  */	struct pci_controller *hose = (struct pci_controller *)bus->sysdata;	int i;	for (i = 0; i < PCI_NUM_RESOURCES; i++) {		if (!dev->resource[i].start)			continue;		if (dev->resource[i].flags & IORESOURCE_IO)			pcibios_fixup_resource(&dev->resource[i],					       hose->io_space);		else if (dev->resource[i].flags & IORESOURCE_MEM)			pcibios_fixup_resource(&dev->resource[i],					       hose->mem_space);	}}void __initpcibios_fixup_bus(struct pci_bus *bus){	/* Propagate hose info into the subordinate devices.  */	struct pci_controller *hose = bus->sysdata;	struct list_head *ln;	struct pci_dev *dev = bus->self;	if (!dev) {		/* Root bus. */		u32 pci_mem_end;		u32 sg_base = hose->sg_pci ? hose->sg_pci->dma_base : ~0;		unsigned long end;		bus->resource[0] = hose->io_space;		bus->resource[1] = hose->mem_space;		/* Adjust hose mem_space limit to prevent PCI allocations		   in the iommu windows. */		pci_mem_end = min((u32)__direct_map_base, sg_base) - 1;		end = hose->mem_space->start + pci_mem_end;		if (hose->mem_space->end > end)			hose->mem_space->end = end; 	} else if (pci_probe_only && 		   (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { 		pci_read_bridge_bases(bus); 		pcibios_fixup_device_resources(dev, bus);	} 	for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {		struct pci_dev *dev = pci_dev_b(ln);		pdev_save_srm_config(dev);		if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)			pcibios_fixup_device_resources(dev, bus);	}}void __initpcibios_update_irq(struct pci_dev *dev, int irq){	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);}/* Most Alphas have straight-forward swizzling needs.  */u8 __initcommon_swizzle(struct pci_dev *dev, u8 *pinp){	u8 pin = *pinp;	while (dev->bus->parent) {		pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));		/* Move up the chain of bridges. */		dev = dev->bus->self;        }	*pinp = pin;	/* The slot is the slot of the last bridge. */	return PCI_SLOT(dev->devfn);}void __devinitpcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,			 struct resource *res){	struct pci_controller *hose = (struct pci_controller *)dev->sysdata;	unsigned long offset = 0;	if (res->flags & IORESOURCE_IO)		offset = hose->io_space->start;	else if (res->flags & IORESOURCE_MEM)		offset = hose->mem_space->start;	region->start = res->start - offset;	region->end = res->end - offset;}#ifdef CONFIG_HOTPLUGEXPORT_SYMBOL(pcibios_resource_to_bus);#endifintpcibios_enable_device(struct pci_dev *dev, int mask){	u16 cmd, oldcmd;	int i;	pci_read_config_word(dev, PCI_COMMAND, &cmd);	oldcmd = cmd;	for (i = 0; i < PCI_NUM_RESOURCES; i++) {		struct resource *res = &dev->resource[i];		if (res->flags & IORESOURCE_IO)			cmd |= PCI_COMMAND_IO;		else if (res->flags & IORESOURCE_MEM)			cmd |= PCI_COMMAND_MEMORY;	}	if (cmd != oldcmd) {		printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",		       pci_name(dev), cmd);		/* Enable the appropriate bits in the PCI command register.  */		pci_write_config_word(dev, PCI_COMMAND, cmd);	}	return 0;}/* *  If we set up a device for bus mastering, we need to check the latency *  timer as certain firmware forgets to set it properly, as seen *  on SX164 and LX164 with SRM. */voidpcibios_set_master(struct pci_dev *dev){	u8 lat;	pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);	if (lat >= 16) return;	printk("PCI: Setting latency timer of device %s to 64\n",							pci_name(dev));	pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);}static void __initpcibios_claim_one_bus(struct pci_bus *b){	struct list_head *ld;	struct pci_bus *child_bus;	for (ld = b->devices.next; ld != &b->devices; ld = ld->next) {		struct pci_dev *dev = pci_dev_b(ld);		int i;		for (i = 0; i < PCI_NUM_RESOURCES; i++) {			struct resource *r = &dev->resource[i];			if (r->parent || !r->start || !r->flags)				continue;			pci_claim_resource(dev, i);		}	}	list_for_each_entry(child_bus, &b->children, node)		pcibios_claim_one_bus(child_bus);}static void __initpcibios_claim_console_setup(void){	struct list_head *lb;	for(lb = pci_root_buses.next; lb != &pci_root_buses; lb = lb->next) {		struct pci_bus *b = pci_bus_b(lb);		pcibios_claim_one_bus(b);	}}void __initcommon_init_pci(void){	struct pci_controller *hose;	struct pci_bus *bus;	int next_busno;	int need_domain_info = 0;	/* Scan all of the recorded PCI controllers.  */	for (next_busno = 0, hose = hose_head; hose; hose = hose->next) {		bus = pci_scan_bus(next_busno, alpha_mv.pci_ops, hose);		hose->bus = bus;		hose->need_domain_info = need_domain_info;		next_busno = bus->subordinate + 1;		/* Don't allow 8-bit bus number overflow inside the hose -		   reserve some space for bridges. */ 		if (next_busno > 224) {			next_busno = 0;			need_domain_info = 1;		}	}	if (pci_probe_only)		pcibios_claim_console_setup();	pci_assign_unassigned_resources();	pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);}struct pci_controller * __initalloc_pci_controller(void){	struct pci_controller *hose;	hose = alloc_bootmem(sizeof(*hose));	*hose_tail = hose;	hose_tail = &hose->next;	return hose;}struct resource * __initalloc_resource(void){	struct resource *res;	res = alloc_bootmem(sizeof(*res));	return res;}/* Provide information on locations of various I/O regions in physical   memory.  Do this on a per-card basis so that we choose the right hose.  */asmlinkage longsys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn){	struct pci_controller *hose;	struct pci_dev *dev;	/* from hose or from bus.devfn */	if (which & IOBASE_FROM_HOSE) {		for(hose = hose_head; hose; hose = hose->next) 			if (hose->index == bus) break;		if (!hose) return -ENODEV;	} else {		/* Special hook for ISA access.  */		if (bus == 0 && dfn == 0) {			hose = pci_isa_hose;		} else {			dev = pci_find_slot(bus, dfn);			if (!dev)				return -ENODEV;			hose = dev->sysdata;		}	}	switch (which & ~IOBASE_FROM_HOSE) {	case IOBASE_HOSE:		return hose->index;	case IOBASE_SPARSE_MEM:		return hose->sparse_mem_base;	case IOBASE_DENSE_MEM:		return hose->dense_mem_base;	case IOBASE_SPARSE_IO:		return hose->sparse_io_base;	case IOBASE_DENSE_IO:		return hose->dense_io_base;	case IOBASE_ROOT_BUS:		return hose->bus->number;	}	return -EOPNOTSUPP;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www国产精品av| 亚洲欧洲成人自拍| 97久久久精品综合88久久| 亚洲成人免费在线| 亚洲国产高清不卡| 欧美一区二区三区在线看| 成人在线视频一区| 激情欧美一区二区三区在线观看| 亚洲激情自拍视频| 欧美激情一二三区| 精品久久久久久综合日本欧美 | 国产成人av在线影院| 亚洲国产综合在线| 中文字幕中文乱码欧美一区二区 | 成人高清视频在线| 精品无人区卡一卡二卡三乱码免费卡| 亚洲欧美视频在线观看视频| 国产日韩精品一区二区三区| 欧美大尺度电影在线| 在线成人午夜影院| 欧美日韩一卡二卡三卡| 91国在线观看| 色婷婷av久久久久久久| 成人黄色综合网站| 国产不卡在线一区| 高清国产一区二区| 国产精品1024| 激情文学综合网| 精品在线免费观看| 久久电影网站中文字幕| 蜜桃免费网站一区二区三区| 日韩中文字幕av电影| 亚洲成人精品一区二区| 亚洲午夜私人影院| 亚洲成在人线在线播放| 性做久久久久久久免费看| 亚洲一区二区欧美| 亚洲国产wwwccc36天堂| 亚洲bdsm女犯bdsm网站| 亚洲福利视频一区二区| 亚洲第一激情av| 亚洲私人影院在线观看| 中文字幕一区二区三| 亚洲色图在线视频| 尤物视频一区二区| 亚洲国产另类av| 日日嗨av一区二区三区四区| 美女在线视频一区| 加勒比av一区二区| 国产福利精品一区| 成人一区在线观看| 91美女在线看| 欧美午夜片在线看| 日韩一区二区精品在线观看| 精品国产亚洲一区二区三区在线观看 | 国产一区二区看久久| 国产一区二区在线看| 成人美女在线观看| 色屁屁一区二区| 欧美日产国产精品| 欧美刺激脚交jootjob| 欧美国产日韩一二三区| 一区二区三区成人在线视频| 亚洲成在人线免费| 国产在线视频一区二区| 波波电影院一区二区三区| 欧美在线综合视频| 欧美tickling挠脚心丨vk| 中文字幕第一区综合| 亚洲精品菠萝久久久久久久| 视频一区视频二区中文| 国产精品一二三四| 色94色欧美sute亚洲13| 欧美一区二区在线免费播放| 中文字幕高清一区| 午夜亚洲福利老司机| 国产盗摄女厕一区二区三区| 色综合网站在线| 欧美成人官网二区| 亚洲日本免费电影| 久久99国产精品久久99| 97久久超碰国产精品| 欧美一区日韩一区| 最新高清无码专区| 久久99精品久久久久| 色av成人天堂桃色av| 亚洲精品一区二区三区在线观看| 中文字幕一区二区三区四区| 六月丁香综合在线视频| 91免费观看视频| 精品国产在天天线2019| 一区二区免费在线播放| 国产精品一区免费视频| 欧美色视频在线| 国产精品国产三级国产aⅴ原创| 日韩**一区毛片| 91在线你懂得| 久久精品一区二区三区四区| 天堂一区二区在线免费观看| 91丨国产丨九色丨pron| 26uuu亚洲| 日本v片在线高清不卡在线观看| 99国产精品99久久久久久| 欧美videos中文字幕| 亚洲图片欧美色图| 日本韩国欧美一区| 国产精品视频你懂的| 狠狠色丁香久久婷婷综合丁香| 欧美性色黄大片手机版| 中文字幕制服丝袜一区二区三区| 韩国三级电影一区二区| 欧美一区二区三区在线观看视频| 亚洲最新在线观看| aaa国产一区| 国产精品久线在线观看| 国产电影精品久久禁18| 精品免费日韩av| 蜜桃av噜噜一区| 欧美精品xxxxbbbb| 亚洲一区电影777| 色诱视频网站一区| 中文字幕一区二区三| 成人黄色免费短视频| 国产午夜亚洲精品午夜鲁丝片| 久久av资源网| 日韩久久久久久| 久久精品72免费观看| 宅男在线国产精品| 青青草一区二区三区| 欧美一级在线观看| 日韩一区欧美二区| 欧美一级免费观看| 蜜臀av性久久久久蜜臀aⅴ四虎 | 亚洲成av人片在线观看无码| 欧美系列亚洲系列| 亚洲成av人片| 欧美日韩国产电影| 日韩精品亚洲一区二区三区免费| 欧美精品欧美精品系列| 午夜精品久久久久久久久久| 91精品国产综合久久久久久久久久 | 亚洲国产成人高清精品| 欧洲人成人精品| 亚洲午夜久久久久久久久久久| 欧美少妇性性性| 美女mm1313爽爽久久久蜜臀| 精品少妇一区二区三区在线播放| 麻豆久久久久久| 国产色综合一区| 99久久伊人精品| 亚洲综合无码一区二区| 欧美巨大另类极品videosbest | 国产一区二区三区免费播放| 国产欧美日本一区二区三区| 成人a区在线观看| 一级特黄大欧美久久久| 欧美一区二区在线播放| 狠狠v欧美v日韩v亚洲ⅴ| 久久色视频免费观看| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 久久久精品欧美丰满| 成人一级黄色片| 悠悠色在线精品| 日韩网站在线看片你懂的| 国产精品一区三区| 亚洲精品国久久99热| 欧美精品成人一区二区三区四区| 国产在线精品一区二区不卡了| 1区2区3区精品视频| 欧美日韩国产一级二级| 玖玖九九国产精品| 日韩美女精品在线| 日韩女优av电影| 99视频精品在线| 日韩精品电影一区亚洲| 国产人伦精品一区二区| 欧美日韩日本视频| 国产激情偷乱视频一区二区三区| 亚洲黄色片在线观看| 久久久五月婷婷| 在线视频欧美区| 国产精品资源网| 亚洲成人动漫一区| 国产精品免费观看视频| 欧美一区午夜精品| 99精品在线观看视频| 久久国产精品无码网站| 亚洲精品精品亚洲| 国产亚洲一区二区三区| 欧美日韩在线播放三区| 国产91精品一区二区麻豆亚洲| 天天影视色香欲综合网老头| 国产精品国产馆在线真实露脸| 日韩视频免费观看高清完整版在线观看 | 午夜欧美视频在线观看| 国产精品久久毛片| 日韩西西人体444www| 欧美三级视频在线播放| 成人黄色在线视频| 国产一区二区三区视频在线播放 |