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

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

?? arch.c

?? fsmlabs的real time linux的內核
?? C
字號:
/* * (C) Finite State Machine Labs Inc. 1999-2001 <business@fsmlabs.com> * * Released under the terms of GPL 2. * Open RTLinux makes use of a patented process described in * US Patent 5,995,745. Use of this process is governed * by the Open RTLinux Patent License which can be obtained from * www.fsmlabs.com/PATENT or by sending email to * licensequestions@fsmlabs.com */#include <asm/uaccess.h>#include <asm/system.h>#include <linux/irq.h>#include <asm/irq.h>#include "arch.h"#include <rtl_core.h>#include <rtl_sync.h>#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,1)struct int_control_struct rtl_hard_int_control;#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,1) */irq_desc_t rtl_hard_irq_desc[NR_IRQS];unsigned long hard_timer_interrupt, hard_do_IRQ, hard_do_IRQ2, hard_do_IRQ3;int (*hard_get_irq)(struct pt_regs *);int bogus_get_irq(struct pt_regs *);unsigned int (*timer_handler)(struct pt_regs *r);extern ulong ret_to_user_hook;extern void flush_icache_range(ulong, ulong);#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,1)ulong ppc_cli_block[11], ppc_sti_block[11], ppc_save_flags_ptr_block[11],	ppc_restore_flags_block[11];#endifvoid rtl_local_intercept(struct pt_regs *regs);int rtl_irq_set_affinity (unsigned int irq, const unsigned long *mask, unsigned long *oldmask){	return -1;}void rtl_hard_pic_end(unsigned int irq_nr){	rtl_irqstate_t flags;	rtl_no_interrupts(flags);	if ( rtl_hard_irq_desc[irq_nr].handler && rtl_hard_irq_desc[irq_nr].handler->end )		rtl_hard_irq_desc[irq_nr].handler->end(irq_nr);	rtl_restore_interrupts(flags);}hw_irq_controller rtl_fake_pic ={ " RTLinux PIC  ", NULL, NULL, rtl_virt_enable, rtl_virt_disable, NULL, /*rtl_hard_pic_end*/0 };void ppc_rtl_soft_restore_flags(unsigned long x){	rtl_soft_restore_flags(x&MSR_EE);}void rtl_set_lost(unsigned long irq){	rtl_global_pend_irq(irq);}struct {	atomic_t waiting;	atomic_t done;} sync_data = {{0},{0}};/* * Make a copy of the hard version of these functions in the kernel, then write over them * with a jump to our soft version. * -- Cort <cort@fsmlabs.com> */void write_func( ulong *hard_func, ulong *hard_func_end, ulong *copy_to, ulong *copy_to_end, ulong call_addr ){	unsigned long block[11] = {		/* r3-r13 are caller save - so we use them */		0x3821fff8, /* subi r1,r1,8 */		0x7da802a6, /* mflr r13 */		0x91a10000, /* stw r13,0(r1) */		0x3d80dead, /* lis r12,0xdeadbeef@h */		0x618cbeef, /* ori r12,r12,0xdeadbeef@l */		0x7d8803a6, /* mtlr r12 */		0x4e800021, /* blrl */		0x81a10000, /* lwz r13,0(r1) */		0x38210008, /* addi r1,r1,8 */		0x7da803a6, /* mtlr r13 */		0x4e800020  /* blr */	};	/* check to make sure the hard_func size is big enough to hold our patch-up */	if ( (((ulong)hard_func_end) - ((ulong)hard_func)) < (sizeof(ulong)*11) )	{		printk( "write_func(): Cannot patch function at %p, too small\n",			hard_func );		return;	}	/*	 * These blocks are allocated statically now, so we don't need to	 * do checks at run-time.	 * -- Cort <cort@fsmlabs.com>	 */#if 0		/*	 * Check to make sure the copy_to func size is big enough to hold	 * the hard version of the function - but only the amount that	 * we need to copy (11 longs).	 */	if ( (((ulong)copy_to_end) - ((ulong)copy_to)) <	     (((ulong)hard_func_end) - ((ulong)hard_func)) )	{		printk("write_func(): Cannot copy hard function at %p, "		       "too large %lu <= %lu\n",		       hard_func,		       (((ulong)copy_to_end) - ((ulong)copy_to)),		       (((ulong)hard_func_end) - ((ulong)hard_func)));		return;	}#endif			/* make a copy of the function that we're going to over-write */	memcpy( copy_to, hard_func, sizeof(long)*11 );	flush_icache_range( (ulong)copy_to, (ulong)copy_to + (sizeof(ulong)*11) );	/* over-write that function with a call to our version */	block[3] = (block[3]&0xffff0000) | (((ulong)call_addr>>16)&0xffff);	block[4] = (block[4]&0xffff0000) | ((ulong)call_addr&0xffff);	memcpy( (ulong *)hard_func, &block[0], sizeof(ulong)*11 );	flush_icache_range( (ulong)hard_func, ((ulong)hard_func)+(sizeof(ulong)*11));}/* * Architecture specific function to take over the handling of interrupts. * -- Cort */int arch_takeover(void){	int i;	struct task_struct *p;	void rtl_soft_sti_no_emulation(void);#ifdef CONFIG_SMP		int timeout, cpus = smp_num_cpus - 1;#endif /* CONFIG_SMP */		if ( timer_interrupt_intercept != (unsigned long)timer_interrupt )	{		printk("RTL: Timer interrupt already being intercepted!\n");		return -1;	}#ifdef CONFIG_SMP		smp_call_function( sync_takeover, 0, 0 /*atomic */,0 /*don't wait*/ );	/* everyone else is now starting to exec sync_function */	timeout = jiffies + HZ;	while ((atomic_read(&sync_data.waiting) != cpus)			&& time_before(jiffies, timeout));	if(atomic_read(&sync_data.waiting) != cpus)	{	       printk("rtl_smp_synchronize timed out\n");       	       return -1;	}#endif /* CONFIG_SMP */		__cli();	/*	 * Put our trampoline code, for the ret_from_int call to rtl_soft_sti(), at	 * KERNELBASE. -- Cort	 */	{		long trash[50];		write_func( (ulong *)KERNELBASE, (ulong *)KERNELBASE+0x30, trash, &trash[50],			    (ulong)rtl_soft_sti );	}	ret_to_user_hook = 0x48000000 | 1 |		(((KERNELBASE+0x0) - (ulong)&ret_to_user_hook)&0x03fffffc);	flush_icache_range((ulong)&ret_to_user_hook, (ulong)&ret_to_user_hook);		/* copy the current (hard) versions from the kernel... */	hard_timer_interrupt = timer_interrupt_intercept;	hard_do_IRQ = do_IRQ_intercept;	hard_get_irq = ppc_md.get_irq;	memcpy(rtl_hard_irq_desc, irq_desc, sizeof(irq_desc_t)*NR_IRQS);		/*	 * Take over cli/sti and restore/save flags, then replace	 * them with our own versions.	 *	 * __sti/__cli and friends changed with v2.4.2 of Linux/PPC to	 * outlined functions instead of function pointers.	 *   -- Cort Dougan <cort@fsmlabs.com>	 */#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,1)	rtl_hard_int_control = int_control;	int_control.int_cli = rtl_soft_cli;	int_control.int_sti = rtl_soft_sti;	int_control.int_save_flags = rtl_soft_save_flags;	int_control.int_restore_flags = ppc_rtl_soft_restore_flags;	int_control.int_set_lost = rtl_set_lost;#else	write_func( (ulong *)__cli, (ulong *)&__cli_end, &ppc_cli_block[0], &ppc_cli_block[11],		    (ulong)rtl_soft_cli );	write_func( (ulong *)__sti, (ulong *)&__sti_end, &ppc_sti_block[0], &ppc_sti_block[11],		    (ulong)rtl_soft_sti );	write_func( (ulong *)__save_flags_ptr, (ulong *)&__save_flags_ptr_end,		    &ppc_save_flags_ptr_block[0], &ppc_save_flags_ptr_block[11],		    (ulong)rtl_soft_save_flags );	write_func( (ulong *)__restore_flags, (ulong *)&__restore_flags_end,		    &ppc_restore_flags_block[0], &ppc_restore_flags_block[11],		    (ulong)ppc_rtl_soft_restore_flags );#endif			atomic_set(&ppc_n_lost_interrupts,0);	for ( i = 0 ; i < NR_MASK_WORDS; i++ )		ppc_lost_interrupts[i] = 0;	do_IRQ_intercept = (unsigned long)rtl_intercept;	timer_interrupt_intercept = (unsigned long)rtl_local_intercept;	/*	 * This should never be called since it's only used in the	 * linux version of do_IRQ() but just in case...	 * -- Cort	 */	ppc_md.get_irq = bogus_get_irq;	/* replace all the interrupt controller pointers with our fake one */	for ( i = 0 ; i < NR_IRQS; i++ )		if ( irq_desc[i].handler )			irq_desc[i].handler = &rtl_fake_pic;	/*	 * Now we need to correct for any tasks that may have	 * MSR_EE cleared (interrupts disabled) in their task	 * struct so they don't disable when switching back to	 * them.	 *  -- Cort	 */	/* have to do init_task separately */	((struct pt_regs *)(init_task.thread.ksp+STACK_FRAME_OVERHEAD))->msr |= MSR_EE;	for_each_task(p)	{		((struct pt_regs *)(p->thread.ksp+STACK_FRAME_OVERHEAD))->msr |= MSR_EE;		if ( p->thread.regs )			p->thread.regs->msr |= MSR_EE;	}	/*	 * This hard sti matches the above cli() since the cli()	 * was hard (RTLinux wasn't loaded yet).	 *  -- Cort	 */	rtl_hard_sti();	__sti();#ifdef CONFIG_SMP	atomic_set( &sync_data.done, 1);#endif /* CONFIG_SMP */	return 0;}void arch_giveup(void){	int i;		rtl_hard_cli();	timer_interrupt_intercept = hard_timer_interrupt;	do_IRQ_intercept = hard_do_IRQ;	ppc_md.get_irq = hard_get_irq;	/* clear out our call to to the rtl_soft_sti trampoline code in the ret from int path */	ret_to_user_hook = 0x60000000; /* nop */	flush_icache_range((ulong)&ret_to_user_hook, (ulong)&ret_to_user_hook);#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,1)	/* put the old copies of __cli/__sti and such back */	memcpy( (void *)__cli, &ppc_cli_block[0], sizeof(ulong)*11 );	flush_icache_range( (ulong)__cli, ((ulong)__cli)+(sizeof(ulong)*11));		memcpy( (void *)__sti, &ppc_sti_block[0], sizeof(ulong)*11 );	flush_icache_range( (ulong)__sti, ((ulong)__sti)+(sizeof(ulong)*11));		memcpy( (void *)__save_flags_ptr, &ppc_save_flags_ptr_block[0], sizeof(ulong)*11 );	flush_icache_range( (ulong)__save_flags_ptr, ((ulong)__save_flags_ptr)+(sizeof(ulong)*11));		memcpy( (void *)__restore_flags, &ppc_restore_flags_block[0], sizeof(ulong)*11 );	flush_icache_range( (ulong)__restore_flags, ((ulong)__restore_flags)+(sizeof(ulong)*11));#else	int_control = rtl_hard_int_control;#endif		/* give Linux back the hard irq handlers */	for ( i = 0; i < NR_IRQS; i++ )		irq_desc[i].handler = rtl_hard_irq_desc[i].handler;	/*	 * This is safe since we have turned off RTLinux and	 * the RTLinux __sti() will behave just like the normal	 * linux __sti().  -- Cort	 */	__sti();}int bogus_get_irq(struct pt_regs *regs){	printk("BOGUS_GET_IRQ! from %p\n", __builtin_return_address(0));	*(unsigned long *)(0) = 1;	return -1;}void dispatch_rtl_local_irq(int irq){	struct pt_regs r;	if ( !(unsigned long)timer_handler )		printk("No timer handler in dispatch_rtl_local_irq!\n");	else		timer_handler(&r);}int rtl_free_local_irq(int i, unsigned int cpu){	if ( (unsigned long)timer_handler )	{		(unsigned long)timer_handler = 0;		clear_bit(0,&rtl_local[smp_processor_id()].rtirq);	}	else		return -EINVAL;	return 0;}int rtl_request_local_irq(int i, unsigned int (*handler)(struct pt_regs *r),			  unsigned int cpu){	if ( !(unsigned long)timer_handler )	{		timer_handler = handler;		set_bit(0,&rtl_local[smp_processor_id()].rtirq);		return 0;	}	else		return -EINVAL;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷狠狠综合| 色综合久久天天综合网| 欧美日韩国产电影| 午夜欧美视频在线观看| 欧美日韩国产一区二区三区地区| 岛国一区二区三区| 青椒成人免费视频| 国内精品久久久久影院一蜜桃| 麻豆国产精品视频| 一区二区三区四区在线| 亚洲欧美韩国综合色| 亚洲激情网站免费观看| 亚洲精品视频免费看| 日日夜夜一区二区| 制服丝袜成人动漫| 欧美一级黄色片| 亚洲男人的天堂网| 337p亚洲精品色噜噜噜| 国内不卡的二区三区中文字幕| 久久精品一级爱片| 一本到不卡精品视频在线观看 | 国产成人精品亚洲午夜麻豆| 中文字幕一区二区三区四区| 欧美在线短视频| 国产一本一道久久香蕉| 自拍偷拍亚洲激情| 日韩视频中午一区| 91麻豆swag| 精品一区二区久久久| 亚洲色图.com| 精品国产免费视频| 欧美三级电影网站| 国产aⅴ综合色| 视频一区视频二区在线观看| 中文字幕国产一区二区| 91精品免费观看| 91免费国产视频网站| 国产麻豆视频一区| 爽好久久久欧美精品| 欧美韩日一区二区三区| 日韩一区二区三区av| 欧美专区日韩专区| 成人国产亚洲欧美成人综合网| 日本不卡视频在线| 一区二区成人在线观看| 国产午夜精品在线观看| 91精品免费在线| 久久久综合视频| 8x8x8国产精品| 色综合久久88色综合天天6| 国产麻豆精品在线| 久久精品国产在热久久| 亚州成人在线电影| 亚洲综合在线第一页| 亚洲三级在线播放| 国产精品免费看片| 2022国产精品视频| 欧美一区二区成人6969| 欧美日韩在线免费视频| 在线视频国内一区二区| 99免费精品在线观看| 国产精品羞羞答答xxdd| 精品在线免费观看| 蜜桃精品视频在线观看| 午夜精品久久一牛影视| 亚洲电影第三页| 亚洲丶国产丶欧美一区二区三区| 亚洲精品国产一区二区三区四区在线| 亚洲国产精品成人综合| 国产日韩精品一区二区浪潮av| 2019国产精品| 久久先锋资源网| 精品成人一区二区三区四区| 日韩欧美国产一二三区| 欧美白人最猛性xxxxx69交| 欧美大片拔萝卜| 久久久久久**毛片大全| 中文在线一区二区| 国产精品久久久久久福利一牛影视| 中文乱码免费一区二区| 亚洲欧洲美洲综合色网| 亚洲欧美日韩中文字幕一区二区三区 | 中文字幕一区二区三区不卡在线| 久久影院电视剧免费观看| 精品剧情在线观看| 国产女人水真多18毛片18精品视频| 国产日韩欧美综合在线| 国产精品久久久久三级| 国产精品第13页| 亚洲成人精品在线观看| 老色鬼精品视频在线观看播放| 国产中文字幕一区| 91一区二区在线观看| 欧美日韩视频在线观看一区二区三区 | 91美女在线看| 欧美日韩视频专区在线播放| 欧美成人综合网站| 欧美激情综合五月色丁香| 亚洲男人都懂的| 午夜欧美视频在线观看 | 欧美精品一区二区三区蜜臀| 中文字幕av不卡| 亚洲一区二区免费视频| 久久精品99久久久| aaa欧美大片| 宅男噜噜噜66一区二区66| 精品国内片67194| 日韩一区欧美小说| 香蕉久久夜色精品国产使用方法 | 国模套图日韩精品一区二区| 成人av影视在线观看| 色综合久久久网| 日韩欧美在线网站| 国产精品网站导航| 午夜视频在线观看一区| 国产精品一二一区| 在线观看亚洲精品视频| 亚洲精品在线观看视频| 亚洲美女在线国产| 国内精品视频666| 色婷婷激情综合| 欧美成人bangbros| 最新不卡av在线| 狠狠色狠狠色综合| 欧美日韩一区久久| 中文字幕巨乱亚洲| 美女mm1313爽爽久久久蜜臀| 色综合欧美在线| 国产亚洲美州欧州综合国| 亚洲电影视频在线| 99久久综合色| 久久久久久久久久久久久久久99 | 亚洲va欧美va人人爽午夜| 国产.欧美.日韩| 日韩一区二区免费在线电影| 一级女性全黄久久生活片免费| 国产精品99久久久久久有的能看 | 丁香一区二区三区| 日韩精品最新网址| 亚洲国产精品久久人人爱蜜臀| 国产成人av资源| 久久亚洲综合色一区二区三区| 亚洲电影中文字幕在线观看| 99视频国产精品| 欧美国产精品一区二区三区| 狠狠色综合日日| 日韩美女主播在线视频一区二区三区| 亚洲精品国产一区二区三区四区在线| 国产精品自产自拍| 日韩欧美的一区二区| 五月天亚洲精品| 欧美日韩成人综合在线一区二区| 亚洲天堂成人在线观看| av影院午夜一区| 国产精品久久久久四虎| 成人精品电影在线观看| 欧美国产日韩精品免费观看| 国产美女在线观看一区| 亚洲精品一区二区三区精华液| 久久精品国产99国产| 欧美大片在线观看一区二区| 男女性色大片免费观看一区二区 | 国产亚洲一区二区三区四区| 精品无人码麻豆乱码1区2区| 精品欧美乱码久久久久久| 免费看日韩a级影片| 日韩一区二区三区在线| 老司机精品视频线观看86| 欧美成人福利视频| 国产精品资源在线观看| 久久久高清一区二区三区| 国产剧情一区二区三区| 中文字幕精品在线不卡| 99精品视频一区| 一区二区三区四区高清精品免费观看| 色综合一个色综合| 亚洲综合成人网| 69精品人人人人| 国产综合色在线| 中文字幕一区二区三区不卡| 91丨九色丨黑人外教| 亚洲无线码一区二区三区| 91麻豆精品国产91久久久久久久久| 天堂在线亚洲视频| 精品久久久久久久久久久久久久久 | 久久久国产精品午夜一区ai换脸| 国产成+人+日韩+欧美+亚洲| 国产精品福利在线播放| 欧美色窝79yyyycom| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲欧洲精品天堂一级| 色婷婷综合激情| 蜜乳av一区二区| 国产精品网曝门| 欧美日韩国产综合视频在线观看| 激情久久久久久久久久久久久久久久| 国产精品久久久久久久久免费相片| 色天使久久综合网天天| 久久精品国产亚洲a| 日韩一区在线看|