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

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

?? pciehp_ctrl.c

?? h內(nèi)核
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
 * size must be a power of two. */static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size){	struct pci_resource *prevnode;	struct pci_resource *node;	struct pci_resource *split_node = NULL;	u32 temp_dword;	if (!(*head))		return NULL;	if ( pciehp_resource_sort_and_combine(head) )		return NULL;	if ( sort_by_size(head) )		return NULL;	for (node = *head; node; node = node->next) {		if (node->length < size)			continue;		if (node->base & (size - 1)) {			/* this one isn't base aligned properly			   so we'll make a new entry and split it up */			temp_dword = (node->base | (size-1)) + 1;			/*/ Short circuit if adjusted size is too small */			if ((node->length - (temp_dword - node->base)) < size)				continue;			split_node = kmalloc(sizeof(struct pci_resource),						GFP_KERNEL);			if (!split_node)				return NULL;			split_node->base = node->base;			split_node->length = temp_dword - node->base;			node->base = temp_dword;			node->length -= split_node->length;			/* Put it in the list */			split_node->next = node->next;			node->next = split_node;		} /* End of non-aligned base */		/* Don't need to check if too small since we already did */		if (node->length > size) {			/* this one is longer than we need			   so we'll make a new entry and split it up */			split_node = kmalloc(sizeof(struct pci_resource),						GFP_KERNEL);			if (!split_node)				return NULL;			split_node->base = node->base + size;			split_node->length = node->length - size;			node->length = size;			/* Put it in the list */			split_node->next = node->next;			node->next = split_node;		}  /* End of too big on top end */		/* For IO make sure it's not in the ISA aliasing space */		if (node->base & 0x300L)			continue;		/* If we got here, then it is the right size 		   Now take it out of the list */		if (*head == node) {			*head = node->next;		} else {			prevnode = *head;			while (prevnode->next != node)				prevnode = prevnode->next;			prevnode->next = node->next;		}		node->next = NULL;		/* Stop looping */		break;	}	return node;}/* * get_max_resource * * Gets the largest node that is at least "size" big from the * list pointed to by head.  It aligns the node on top and bottom * to "size" alignment before returning it. * J.I. modified to put max size limits of; 64M->32M->16M->8M->4M->1M *  This is needed to avoid allocating entire ACPI _CRS res to one child bridge/slot. */static struct pci_resource *get_max_resource(struct pci_resource **head, u32 size){	struct pci_resource *max;	struct pci_resource *temp;	struct pci_resource *split_node;	u32 temp_dword;	u32 max_size[] = { 0x4000000, 0x2000000, 0x1000000, 0x0800000, 0x0400000, 0x0200000, 0x0100000, 0x00 };	int i;	if (!(*head))		return NULL;	if (pciehp_resource_sort_and_combine(head))		return NULL;	if (sort_by_max_size(head))		return NULL;	for (max = *head;max; max = max->next) {		/* If not big enough we could probably just bail, 		   instead we'll continue to the next. */		if (max->length < size)			continue;		if (max->base & (size - 1)) {			/* this one isn't base aligned properly			   so we'll make a new entry and split it up */			temp_dword = (max->base | (size-1)) + 1;			/* Short circuit if adjusted size is too small */			if ((max->length - (temp_dword - max->base)) < size)				continue;			split_node = kmalloc(sizeof(struct pci_resource),						GFP_KERNEL);			if (!split_node)				return NULL;			split_node->base = max->base;			split_node->length = temp_dword - max->base;			max->base = temp_dword;			max->length -= split_node->length;			/* Put it next in the list */			split_node->next = max->next;			max->next = split_node;		}		if ((max->base + max->length) & (size - 1)) {			/* this one isn't end aligned properly at the top			   so we'll make a new entry and split it up */			split_node = kmalloc(sizeof(struct pci_resource),						GFP_KERNEL);			if (!split_node)				return NULL;			temp_dword = ((max->base + max->length) & ~(size - 1));			split_node->base = temp_dword;			split_node->length = max->length + max->base					     - split_node->base;			max->length -= split_node->length;			/* Put it in the list */			split_node->next = max->next;			max->next = split_node;		}		/* Make sure it didn't shrink too much when we aligned it */		if (max->length < size)			continue;		for ( i = 0; max_size[i] > size; i++) {			if (max->length > max_size[i]) {				split_node = kmalloc(sizeof(struct pci_resource),							GFP_KERNEL);				if (!split_node)					break;	/* return NULL; */				split_node->base = max->base + max_size[i];				split_node->length = max->length - max_size[i];				max->length = max_size[i];				/* Put it next in the list */				split_node->next = max->next;				max->next = split_node;				break;			}		}		/* Now take it out of the list */		temp = (struct pci_resource*) *head;		if (temp == max) {			*head = max->next;		} else {			while (temp && temp->next != max) {				temp = temp->next;			}			temp->next = max->next;		}		max->next = NULL;		return max;	}	/* If we get here, we couldn't find one */	return NULL;}/* * get_resource * * this function sorts the resource list by size and then * returns the first node of "size" length.  If it finds a node * larger than "size" it will split it up. * * size must be a power of two. */static struct pci_resource *get_resource(struct pci_resource **head, u32 size){	struct pci_resource *prevnode;	struct pci_resource *node;	struct pci_resource *split_node;	u32 temp_dword;	if (!(*head))		return NULL;	if ( pciehp_resource_sort_and_combine(head) )		return NULL;	if ( sort_by_size(head) )		return NULL;	for (node = *head; node; node = node->next) {		dbg("%s: req_size =0x%x node=%p, base=0x%x, length=0x%x\n",		    __FUNCTION__, size, node, node->base, node->length);		if (node->length < size)			continue;		if (node->base & (size - 1)) {			dbg("%s: not aligned\n", __FUNCTION__);			/* this one isn't base aligned properly			   so we'll make a new entry and split it up */			temp_dword = (node->base | (size-1)) + 1;			/* Short circuit if adjusted size is too small */			if ((node->length - (temp_dword - node->base)) < size)				continue;			split_node = kmalloc(sizeof(struct pci_resource),						GFP_KERNEL);			if (!split_node)				return NULL;			split_node->base = node->base;			split_node->length = temp_dword - node->base;			node->base = temp_dword;			node->length -= split_node->length;			/* Put it in the list */			split_node->next = node->next;			node->next = split_node;		} /* End of non-aligned base */		/* Don't need to check if too small since we already did */		if (node->length > size) {			dbg("%s: too big\n", __FUNCTION__);			/* this one is longer than we need			   so we'll make a new entry and split it up */			split_node = kmalloc(sizeof(struct pci_resource),						GFP_KERNEL);			if (!split_node)				return NULL;			split_node->base = node->base + size;			split_node->length = node->length - size;			node->length = size;			/* Put it in the list */			split_node->next = node->next;			node->next = split_node;		}  /* End of too big on top end */		dbg("%s: got one!!!\n", __FUNCTION__);		/* If we got here, then it is the right size		   Now take it out of the list */		if (*head == node) {			*head = node->next;		} else {			prevnode = *head;			while (prevnode->next != node)				prevnode = prevnode->next;			prevnode->next = node->next;		}		node->next = NULL;		/* Stop looping */		break;	}	return node;}/* * pciehp_resource_sort_and_combine * * Sorts all of the nodes in the list in ascending order by * their base addresses.  Also does garbage collection by * combining adjacent nodes. * * returns 0 if success */int pciehp_resource_sort_and_combine(struct pci_resource **head){	struct pci_resource *node1;	struct pci_resource *node2;	int out_of_order = 1;	dbg("%s: head = %p, *head = %p\n", __FUNCTION__, head, *head);	if (!(*head))		return 1;	dbg("*head->next = %p\n",(*head)->next);	if (!(*head)->next)		return 0;	/* only one item on the list, already sorted! */	dbg("*head->base = 0x%x\n",(*head)->base);	dbg("*head->next->base = 0x%x\n",(*head)->next->base);	while (out_of_order) {		out_of_order = 0;		/* Special case for swapping list head */		if (((*head)->next) &&		    ((*head)->base > (*head)->next->base)) {			node1 = *head;			(*head) = (*head)->next;			node1->next = (*head)->next;			(*head)->next = node1;			out_of_order++;		}		node1 = (*head);		while (node1->next && node1->next->next) {			if (node1->next->base > node1->next->next->base) {				out_of_order++;				node2 = node1->next;				node1->next = node1->next->next;				node1 = node1->next;				node2->next = node1->next;				node1->next = node2;			} else				node1 = node1->next;		}	}  /* End of out_of_order loop */	node1 = *head;	while (node1 && node1->next) {		if ((node1->base + node1->length) == node1->next->base) {			/* Combine */			dbg("8..\n");			node1->length += node1->next->length;			node2 = node1->next;			node1->next = node1->next->next;			kfree(node2);		} else			node1 = node1->next;	}	return 0;}/** * pciehp_slot_create - Creates a node and adds it to the proper bus. * @busnumber - bus where new node is to be located * * Returns pointer to the new node or NULL if unsuccessful */struct pci_func *pciehp_slot_create(u8 busnumber){	struct pci_func *new_slot;	struct pci_func *next;	dbg("%s: busnumber %x\n", __FUNCTION__, busnumber);	new_slot = kmalloc(sizeof(struct pci_func), GFP_KERNEL);	if (new_slot == NULL)		return new_slot;	memset(new_slot, 0, sizeof(struct pci_func));	new_slot->next = NULL;	new_slot->configured = 1;	if (pciehp_slot_list[busnumber] == NULL) {		pciehp_slot_list[busnumber] = new_slot;	} else {		next = pciehp_slot_list[busnumber];		while (next->next != NULL)			next = next->next;		next->next = new_slot;	}	return new_slot;}/** * slot_remove - Removes a node from the linked list of slots. * @old_slot: slot to remove * * Returns 0 if successful, !0 otherwise. */static int slot_remove(struct pci_func * old_slot){	struct pci_func *next;	if (old_slot == NULL)		return 1;	next = pciehp_slot_list[old_slot->bus];	if (next == NULL)		return 1;	if (next == old_slot) {		pciehp_slot_list[old_slot->bus] = old_slot->next;		pciehp_destroy_board_resources(old_slot);		kfree(old_slot);		return 0;	}	while ((next->next != old_slot) && (next->next != NULL)) {		next = next->next;	}	if (next->next == old_slot) {		next->next = old_slot->next;		pciehp_destroy_board_resources(old_slot);		kfree(old_slot);		return 0;	} else		return 2;}/** * bridge_slot_remove - Removes a node from the linked list of slots. * @bridge: bridge to remove * * Returns 0 if successful, !0 otherwise. */static int bridge_slot_remove(struct pci_func *bridge){	u8 subordinateBus, secondaryBus;	u8 tempBus;	struct pci_func *next;	if (bridge == NULL)		return 1;	secondaryBus = (bridge->config_space[0x06] >> 8) & 0xFF;	subordinateBus = (bridge->config_space[0x06] >> 16) & 0xFF;	for (tempBus = secondaryBus; tempBus <= subordinateBus; tempBus++) {		next = pciehp_slot_list[tempBus];		while (!slot_remove(next)) {			next = pciehp_slot_list[tempBus];		}	}	next = pciehp_slot_list[bridge->bus];	if (next == NULL) {		return 1;	}	if (next == bridge) {		pciehp_slot_list[bridge->bus] = bridge->next;		kfree(bridge);		return 0;	}	while ((next->next != bridge) && (next->next != NULL)) {		next = next->next;	}	if (next->next == bridge) {		next->next = bridge->next;		kfree(bridge);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人1区2区| 精品一区二区三区免费播放| 欧美精品日韩一区| 色94色欧美sute亚洲线路一久| 欧美日韩精品一区二区| 在线影院国内精品| 久久在线观看免费| 精品久久久网站| 亚洲午夜一二三区视频| 亚洲一区在线观看视频| 亚洲一区二区精品视频| 成人成人成人在线视频| 国产91精品精华液一区二区三区 | 国内成人免费视频| 色女孩综合影院| 国产女同性恋一区二区| 秋霞电影网一区二区| 欧美三级视频在线观看| 亚洲人成精品久久久久| www.66久久| 国产欧美中文在线| 国产中文字幕精品| 精品久久久三级丝袜| 日日夜夜免费精品视频| 美女高潮久久久| 欧美精品1区2区3区| 亚洲午夜av在线| 亚洲成人免费观看| 老汉av免费一区二区三区| 激情久久久久久久久久久久久久久久| 久99久精品视频免费观看| 欧美精品在线视频| 日本在线不卡一区| 欧美一区二区精品在线| 免费亚洲电影在线| 成人做爰69片免费看网站| 国产日韩亚洲欧美综合| 国产成人亚洲精品狼色在线| 国产亚洲精品久| 亚洲国产日日夜夜| 国产传媒一区在线| 欧美日产在线观看| 国产亚洲一本大道中文在线| 亚洲麻豆国产自偷在线| 色嗨嗨av一区二区三区| 亚洲一卡二卡三卡四卡| 欧美年轻男男videosbes| 久久精品国产亚洲a| 久久蜜桃av一区精品变态类天堂 | 亚洲午夜av在线| 欧美乱妇15p| 国产精品全国免费观看高清| 日韩在线一区二区三区| 成人动漫在线一区| 樱桃国产成人精品视频| 欧美肥胖老妇做爰| 亚洲色图视频网| 欧美福利视频一区| 依依成人精品视频| 不卡的av在线| 亚洲va欧美va天堂v国产综合| 这里只有精品免费| 国产一区二区久久| 亚洲一区二区三区四区五区黄| 精品视频999| 国产精品69毛片高清亚洲| 亚洲免费视频成人| 成人精品一区二区三区中文字幕| 337p亚洲精品色噜噜| 亚洲精品国产第一综合99久久 | 精品日韩在线观看| 日韩二区三区在线观看| 日本一区二区视频在线| 欧美午夜视频网站| 亚洲激情自拍偷拍| 一本一道久久a久久精品综合蜜臀| 亚洲第一成人在线| 欧美日韩综合一区| 亚洲电影一级黄| 91影视在线播放| 经典三级视频一区| 欧美成人性战久久| 久久激情综合网| 欧美精品一区二区三区一线天视频| 首页国产丝袜综合| 国产精品成人在线观看| 欧美电影精品一区二区| 色婷婷激情久久| 日韩精品91亚洲二区在线观看| 欧美日韩高清不卡| 日韩精品三区四区| 亚洲激情网站免费观看| 欧美经典一区二区| 91丨porny丨最新| 国产一区 二区| 亚洲国产精品高清| 色先锋久久av资源部| 丰满岳乱妇一区二区三区| 麻豆一区二区三区| 欧美国产日韩a欧美在线观看| 国产成人日日夜夜| 激情综合色丁香一区二区| 午夜视频一区二区三区| 亚洲黄色av一区| 最新国产成人在线观看| 欧美午夜一区二区三区免费大片| 日韩精品免费专区| 午夜精品久久久久久久99樱桃| 中文字幕一区二区三区四区不卡| 久久亚洲一区二区三区明星换脸| 日韩天堂在线观看| 91精品国产综合久久精品app| 欧美三级视频在线| 国产综合久久久久久鬼色| 免费成人在线网站| 中文乱码免费一区二区 | 在线亚洲精品福利网址导航| 亚洲成va人在线观看| 亚洲精品国产精华液| 欧美性色黄大片手机版| 欧美在线你懂得| 欧美午夜片在线观看| 欧美日韩国产一级| 国产激情偷乱视频一区二区三区| 国产毛片精品视频| 国产一区欧美一区| 成人午夜伦理影院| 色狠狠av一区二区三区| 在线不卡中文字幕播放| 日韩欧美一区二区视频| 色综合久久中文综合久久97| 免费看日韩a级影片| 蜜桃久久精品一区二区| 国产精品免费视频网站| 自拍视频在线观看一区二区| 亚洲综合激情另类小说区| 日韩成人免费看| 亚洲女人小视频在线观看| 欧美成人福利视频| 欧美国产精品专区| 亚洲国产精品久久一线不卡| 日本一区中文字幕| 国产老妇另类xxxxx| 日日摸夜夜添夜夜添国产精品 | 日韩精品在线一区| 欧美日韩在线电影| av一区二区不卡| 国产精品亚洲成人| 一本色道久久加勒比精品| 这里只有精品视频在线观看| 欧美网站大全在线观看| 欧美第一区第二区| 欧美精品亚洲一区二区在线播放| 欧美精品一区二区三区蜜桃视频| 国产精品美女久久久久aⅴ | 捆绑调教一区二区三区| 国产成人综合在线播放| 欧美日免费三级在线| 欧美国产日本视频| 久久精品欧美日韩| 亚洲午夜日本在线观看| 亚洲综合在线第一页| 一区二区三区.www| 国产真实乱对白精彩久久| 91久久香蕉国产日韩欧美9色| 欧美mv和日韩mv国产网站| 亚洲宅男天堂在线观看无病毒| 韩国成人在线视频| 国产精品一区二区三区乱码| 日本韩国精品在线| 欧美视频三区在线播放| 久久久国产精华| 久久精品国产一区二区三区免费看| 日日摸夜夜添夜夜添国产精品 | 欧美日韩五月天| 亚洲欧洲日韩综合一区二区| 国产精品美女久久久久久| 久久精品国产99国产精品| 久久99久久精品欧美| 欧美色视频在线| 亚洲免费观看高清完整版在线观看熊| 国产精一区二区三区| 日韩视频免费观看高清在线视频| 亚洲精品ww久久久久久p站| 国产v日产∨综合v精品视频| 91美女精品福利| 欧美视频在线一区二区三区| 欧美视频在线观看一区| 欧美一卡二卡在线观看| 亚洲成人第一页| 国产综合色精品一区二区三区| 欧美精品亚洲一区二区在线播放| 日韩一区二区高清| 日韩一区精品字幕| 国产高清在线精品| 久久新电视剧免费观看| 中文av一区二区| www.日韩av| 欧美肥妇free| 中文字幕av一区二区三区免费看 |