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

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

?? pci.c

?? Linux Kernel 2.6.9 for OMAP1710
?? C
字號:
/* *	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;}DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge);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;		}	}}DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress);/* 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;	}}DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_final);/* Just declaring that the power-of-ten prefixes are actually the   power-of-two ones doesn't make it true :) */#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;}/* Create an __iomem token from a PCI BAR.  Copied from lib/iomap.c with   no changes, since we don't want the other things in that object file.  */void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen){	unsigned long start = pci_resource_start(dev, bar);	unsigned long len = pci_resource_len(dev, bar);	unsigned long flags = pci_resource_flags(dev, bar);	if (!len || !start)		return NULL;	if (maxlen && len > maxlen)		len = maxlen;	if (flags & IORESOURCE_IO)		return ioport_map(start, len);	if (flags & IORESOURCE_MEM) {		/* Not checking IORESOURCE_CACHEABLE because alpha does		   not distinguish between ioremap and ioremap_nocache.  */		return ioremap(start, len);	}	return NULL;}/* Destroy that token.  Not copied from lib/iomap.c.  */void pci_iounmap(struct pci_dev *dev, void __iomem * addr){	if (__is_mmio(addr))		iounmap(addr);}EXPORT_SYMBOL(pci_iomap);EXPORT_SYMBOL(pci_iounmap);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产色爱av资源综合区| 欧洲国内综合视频| 国产日韩欧美精品综合| 国产综合久久久久久鬼色| 久久久久久久久久久久电影 | 欧美国产日本韩| www.日韩大片| 亚洲图片有声小说| 日韩精品一区二区三区视频播放| 琪琪久久久久日韩精品| 久久日一线二线三线suv| 成人精品一区二区三区四区 | 欧美高清视频在线高清观看mv色露露十八| 亚洲精品高清视频在线观看| 欧美日韩一区二区在线观看| 日韩电影一区二区三区四区| 国产色综合一区| 欧洲精品一区二区| 国产麻豆精品视频| 一区二区视频在线看| 91麻豆精品国产91久久久使用方法| 久久精品国产秦先生| 国产精品不卡在线观看| 在线视频你懂得一区| 日本aⅴ亚洲精品中文乱码| 国产婷婷色一区二区三区四区 | 亚洲午夜国产一区99re久久| 日韩欧美中文字幕精品| av亚洲精华国产精华精华| 日韩国产在线一| 国产精品美女久久久久久| 欧美日本不卡视频| 成人中文字幕电影| 日产国产欧美视频一区精品| 亚洲欧洲日韩一区二区三区| 日韩女优毛片在线| 色欧美日韩亚洲| 国产美女在线观看一区| 亚洲一区二区三区四区五区中文| 久久久久久久久久看片| 欧美精品视频www在线观看 | 欧美四级电影网| 国产成人av电影在线| 天堂久久久久va久久久久| 国产精品国产自产拍高清av| 日韩丝袜情趣美女图片| 在线免费不卡电影| 成人午夜免费av| 久久精品国产网站| 丝袜美腿亚洲色图| 亚洲免费观看高清在线观看| 精品久久人人做人人爱| 欧美日韩一区视频| 91在线无精精品入口| 国产麻豆日韩欧美久久| 麻豆一区二区三| 亚洲风情在线资源站| 国产精品久久久久影院老司| 久久综合九色欧美综合狠狠| 日韩手机在线导航| 日韩视频一区在线观看| 欧美精品tushy高清| 精品视频色一区| 色婷婷狠狠综合| 色综合激情五月| 99视频精品全部免费在线| 国产一区二区三区av电影| 狠狠色伊人亚洲综合成人| 麻豆国产一区二区| 美女网站色91| 免费成人在线观看视频| 九色综合国产一区二区三区| 日本亚洲电影天堂| 免费人成在线不卡| 日韩福利视频网| 天堂在线亚洲视频| 另类小说综合欧美亚洲| 美女网站色91| 国产精品综合二区| 福利一区二区在线| 成人一区二区视频| 99精品视频在线观看免费| 91亚洲午夜精品久久久久久| 92精品国产成人观看免费| 在线亚洲高清视频| 欧美久久一二三四区| 欧美一区日韩一区| 精品国产髙清在线看国产毛片| 久久先锋影音av| 国产精品三级视频| 亚洲精品伦理在线| 午夜伊人狠狠久久| 免费成人性网站| 国产69精品久久777的优势| 99久久777色| 欧美午夜寂寞影院| 欧美成人欧美edvon| 国产精品色婷婷| 亚洲国产欧美另类丝袜| 日本中文一区二区三区| 国产原创一区二区| 91丝袜高跟美女视频| 欧美日韩国产欧美日美国产精品| 日韩午夜在线观看视频| 国产精品女主播在线观看| 夜夜爽夜夜爽精品视频| 婷婷国产v国产偷v亚洲高清| 激情欧美一区二区三区在线观看| 成人av在线播放网址| 在线免费不卡电影| 精品久久久久av影院| 亚洲欧洲精品一区二区三区不卡| 亚洲国产精品影院| 国产成人综合网| 欧美日韩国产首页| 国产精品嫩草99a| 午夜影院久久久| 99久久伊人久久99| 日韩欧美国产麻豆| 亚洲男人的天堂在线aⅴ视频| 日本免费在线视频不卡一不卡二| 成人妖精视频yjsp地址| 欧美日韩成人综合| 国产精品色呦呦| 麻豆精品久久精品色综合| 色综合天天综合| 日韩一区二区免费高清| 亚洲日本va午夜在线影院| 毛片av一区二区| 欧美性大战久久久久久久蜜臀| 国产亚洲一区二区在线观看| 亚洲成av人影院| 99精品久久久久久| 久久综合九色综合久久久精品综合| 亚洲国产乱码最新视频| 99精品视频在线播放观看| 久久久亚洲国产美女国产盗摄| 天天影视色香欲综合网老头| 99视频一区二区| 亚洲国产精品二十页| 免费人成黄页网站在线一区二区| 色综合激情久久| 亚洲欧洲成人精品av97| 国产乱码字幕精品高清av | 国产美女一区二区| 51精品视频一区二区三区| 亚洲欧洲中文日韩久久av乱码| 久久福利视频一区二区| 7777精品伊人久久久大香线蕉最新版 | 国产最新精品免费| 欧美日韩成人综合在线一区二区| 亚洲乱码国产乱码精品精98午夜| 国产成人精品亚洲777人妖| 日韩女优电影在线观看| 日本不卡高清视频| 91精品一区二区三区久久久久久| 亚洲精品乱码久久久久久日本蜜臀| 成人动漫中文字幕| 国产精品视频看| 成人免费av资源| 中文字幕精品在线不卡| 高清国产一区二区| 国产精品日产欧美久久久久| 国产福利一区在线| 国产校园另类小说区| 国产精品一区2区| 久久久777精品电影网影网| 国产精品99久久久| 中文字幕不卡一区| 成人av资源在线观看| 国产精品二区一区二区aⅴ污介绍| 国产精品123| 中文字幕色av一区二区三区| 成人在线视频一区| 亚洲精品视频自拍| 欧美伊人久久久久久午夜久久久久| 亚洲尤物视频在线| 欧美一区三区四区| 国产一区二区三区在线观看免费| 久久久久久毛片| 成人免费看片app下载| 亚洲另类中文字| 91精品国产综合久久香蕉麻豆| 人人超碰91尤物精品国产| 2024国产精品| 成人免费视频app| 一区二区三区免费| 欧美日韩大陆一区二区| 精品一区二区三区免费播放| 国产日本一区二区| 成人动漫视频在线| 亚洲一区二区三区四区在线免费观看 | 97久久超碰国产精品| 亚洲人成伊人成综合网小说| 在线亚洲一区观看| 国产精选一区二区三区| 亚洲视频一区二区免费在线观看| 色综合久久久久综合| 日本不卡的三区四区五区| 国产欧美1区2区3区|