linux/arch/arm/kernel/traps.c
<<
valu22./spa v2 22./formv2 22.a valu22 href="../linux+v3.2.1/arch/arm/kernel/traps.c">valu22.img src="../.static/gfx/right.png" alt=">>">va./spa v2va.spa class="lxr_search">valu ="+search" method="post" onsubmit="return do_search(this);">valu22.input typ hidden" nam navtarget" ion> ">valu22.input typ text" nam search" id search">valu22.buttopttyp submit">Searchvalu22Prefs2 22./a>va./spa v2lu22 2./divv2lu22 2.form ac> ="ajax+*" method="post" onsubmit="return false;">va.input typ hidden" nam ajax_lookup" id ajax_lookup" ion> ">vlu22 2./formv2vlu22 2.div class="headingbottom">2 .div id file_contents"v
2 21./a>.spa  class="comment">/*./spa v22 22./a>.spa  class="comment"> *  linux/arch/arm/kernel/traps.c./spa v22 23./a>.spa  class="comment"> *./spa v22 24./a>.spa  class="comment"> *  Copyright (C) 1995-2009 Russell King./spa v22 25./a>.spa  class="comment"> *  Fragments that appear the sam
 as linux/arch/i386/kernel/traps.c (C) Linus Torionds./spa v22 26./a>.spa  class="comment"> *./spa v22 27./a>.spa  class="comment"> * This program is free software; you ca  redistribute it and/or modify./spa v22 28./a>.spa  class="comment"> * it under the terms of the GNU General Public License vers/opt2 as./spa v22 29./a>.spa  class="comment"> * published by the Free Software Founda>
  ../spa v22 
	  a>.spa  class="comment"> *./spa v22 11./a>.spa  class="comment"> *  'traps.c' handles hardware exce >
  s after we have saved som
 state in./spa v22 12./a>.spa  class="comment"> *  'linux/arch/arm/lib/traps.S'.  Mostly a debugging aid, but will probably./spa v22 13./a>.spa  class="comment"> *  kill the offending process../spa v22 14./a>.spa  class="comment"> */./spa v22 15./a>#include <linux/signal.h./a>>22 16./a>#include <linux/personality.h./a>>22 17./a>#include <linux/kallsyms.h./a>>22 18./a>#include <linux/spinlock.h./a>>22 19./a>#include <linux/uaccess.h./a>>22 20./a>#include <linux/hardirq.h./a>>22 21./a>#include <linux/kdebug.h./a>>22 22./a>#include <linux/module.h./a>>22 23./a>#include <linux/kexec.h./a>>22 24./a>#include <linux/delay.h./a>>22 25./a>#include <linux/init.h./a>>22 26./a>#include <linux/sched.h./a>>22 27./a>22 28./a>#include <linux/atomic.h./a>>22 29./a>#include <asm/cacheflush.h./a>>22 30./a>#include <asm/system.h./a>>22 31./a>#include <asm/unistd.h./a>>22 32./a>#include <asm/traps.h./a>>22 33./a>#include <asm/unwind.h./a>>22 34./a>#include <asm/tls.h./a>>22 35./a>22 36./a>#include "signal.h./a>"22 37./a>22 38./a>static c  st char *.a href="+code=handler" class="sref">handler./a>[]= { .spa  class="string">"prefetch abort""data abort""address exce >
  ""interrupt"2 39./a>22 40./a>void *.a href="+code=vectors_page" class="sref">vectors_page./a>;22 41./a>22 42./a>#ifdef .a href="+code=CONFIG_DEBUG_USER" class="sref">CONFIG_DEBUG_USER./a>22 43./a>unsigned int .a href="+code=user_debug" class="sref">user_debug./a>;22 44./a>22 45./a>static int .a href="+code=__init" class="sref">__init./a> .a href="+code=user_debug_setup" class="sref">user_debug_setup./a>(char *.a href="+code=str" class="sref">str./a>)22 46./a>{22 47./a>        .a href="+code=get_  >
  " class="sref">get_  >
  ./a>(&.a href="+code=str" class="sref">str./a>, &.a href="+code=user_debug" class="sref">user_debug./a>);22 48./a>        return 1;22 49./a>}22 5	  a>.a href="+code=__setup" class="sref">__setup./a>(.spa  class="string">"user_debug="user_debug_setup./a>);22 51./a>#endif22 52./a>22 53./a>static void .a href="+code=dump_mem" class="sref">dump_mem./a>(c  st char *, c  st char *, unsigned long, unsigned long);22 54./a>22 55./a>void .a href="+code=dump_backtrace_entry" class="sref">dump_backtrace_entry./a>(unsigned long .a href="+code=where" class="sref">where./a>, unsigned long .a href="+code=from" class="sref">from./a>, unsigned long .a href="+code=fram
" class="sref">fram
./a>)22 56./a>{22 57./a>#ifdef .a href="+code=CONFIG_KALLSYMS" class="sref">CONFIG_KALLSYMS./a>22 58./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"[<%08lx>] (%pS) from [<%08lx>] (%pS)\ "where./a>, (void *).a href="+code=where" class="sref">where./a>, .a href="+code=from" class="sref">from./a>, (void *).a href="+code=from" class="sref">from./a>);22 59./a>#else22 60./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"Func>
   entered at [<%08lx>] from [<%08lx>]\ "where./a>, .a href="+code=from" class="sref">from./a>);22 61./a>#endif22 62./a>22 63./a>        if (.a href="+code=in_exce >
  _text" class="sref">in_exce >
  _text./a>(.a href="+code=where" class="sref">where./a>))22 64./a>                .a href="+code=dump_mem" class="sref">dump_mem./a>(.spa  class="string">"""Exce >
   stack"fram
./a> + 4, .a href="+code=fram
" class="sref">fram
./a> + 4 + sizeof(struct .a href="+code=pt_regs" class="sref">pt_regs./a>));22 65./a>}22 66./a>22 67./a>#ifndef .a href="+code=CONFIG_ARM_UNWIND" class="sref">CONFIG_ARM_UNWIND./a>22 68./a>.spa  class="comment">/*./spa v22 69./a>.spa  class="comment"> * Stack pointers should always be within the kernels view of./spa v22 7	  a>.spa  class="comment"> * physical memory.  If it is not there, then we can't dump./spa v22 71./a>.spa  class="comment"> * out any informa>
   rela>
ng to the stack../spa v22 72./a>.spa  class="comment"> */./spa v22 73./a>static int .a href="+code=verify_stack" class="sref">verify_stack./a>(unsigned long .a href="+code=sp" class="sref">sp./a>)22 74./a>{22 75./a>        if (.a href="+code=sp" class="sref">sp./a> < .a href="+code=PAGE_OFFSET" class="sref">PAGE_OFFSET./a> ||22 76./a>            (.a href="+code=sp" class="sref">sp./a> > (unsigned long).a href="+code=high_memory" class="sref">high_memory./a> && .a href="+code=high_memory" class="sref">high_memory./a> != .a href="+code=NULL" class="sref">NULL./a>))22 77./a>                return -.a href="+code=EFAULT" class="sref">EFAULT./a>;22 78./a>22 79./a>        return 0;22 80./a>}22 81./a>#endif22 82./a>22 83./a>.spa  class="comment">/*./spa v22 84./a>.spa  class="comment"> * Dump out the contents of som
 memory nicely..../spa v22 85./a>.spa  class="comment"> */./spa v22 86./a>static void .a href="+code=dump_mem" class="sref">dump_mem./a>(c  st char *.a href="+code=lvl" class="sref">lvl./a>, c  st char *.a href="+code=str" class="sref">str./a>, unsigned long .a href="+code=bottom" class="sref">bottom./a>,22 87./a>                     unsigned long .a href="+code=top" class="sref">top./a>)22 88./a>{22 89./a>        unsigned long .a href="+code=first" class="sref">first./a>;22 90./a>        .a href="+code=mm_segment_t" class="sref">mm_segment_t./a> .a href="+code=fs" class="sref">fs./a>;22 91./a>        int .a href="+code=i" class="sref">i./a>;22 92./a>22 93./a>        .spa  class="comment">/*./spa v22 94./a>.spa  class="comment">         * We need to switch to kernel mode so that we can use __get_user./spa v22 95./a>.spa  class="comment">         * to safely read from kernel space.  Note that we now dump the./spa v22 96./a>.spa  class="comment">         * code first, just in case the backtrace kills us../spa v22 97./a>.spa  class="comment">         */./spa v22 98./a>        .a href="+code=fs" class="sref">fs./a> = .a href="+code=get_fs" class="sref">get_fs./a>();22 99./a>        .a href="+code=set_fs" class="sref">set_fs./a>(.a href="+code=KERNEL_DS" class="sref">KERNEL_DS./a>);22100./a>22101./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"%s%s(0x%08lx to 0x%08lx)\ "lvl./a>, .a href="+code=str" class="sref">str./a>, .a href="+code=bottom" class="sref">bottom./a>, .a href="+code=top" class="sref">top./a>);22102./a>22103./a>        for (.a href="+code=first" class="sref">first./a> = .a href="+code=bottom" class="sref">bottom./a> & ~31; .a href="+code=first" class="sref">first./a> < .a href="+code=top" class="sref">top./a>; .a href="+code=first" class="sref">first./a> += 32) {22104./a>                unsigned long .a href="+code=p" class="sref">p./a>;22105./a>                char .a href="+code=str" class="sref">str./a>[sizeof(.spa  class="string">" 12345678"2106./a>22107./a>                .a href="+code=memset" class="sref">memset./a>(.a href="+code=str" class="sref">str./a>, .spa  class="string">' 'str./a>));22108./a>                .a href="+code=str" class="sref">str./a>[sizeof(.a href="+code=str" class="sref">str./a>) - 1] = .spa  class="string">'\0'2109./a>22110./a>                for (.a href="+code=p" class="sref">p./a> = .a href="+code=first" class="sref">first./a>, .a href="+code=i" class="sref">i./a> = 0; .a href="+code=i" class="sref">i./a> < 8 && .a href="+code=p" class="sref">p./a> < .a href="+code=top" class="sref">top./a>; .a href="+code=i" class="sref">i./a>++, .a href="+code=p" class="sref">p./a> += 4) {22111./a>                        if (.a href="+code=p" class="sref">p./a> >= .a href="+code=bottom" class="sref">bottom./a> && .a href="+code=p" class="sref">p./a> < .a href="+code=top" class="sref">top./a>) {22112./a>                                unsigned long .a href="+code=val" class="sref">val./a>;22113./a>                                if (.a href="+code=__get_user" class="sref">__get_user./a>(.a href="+code=val" class="sref">val./a>, (unsigned long *).a href="+code=p" class="sref">p./a>) == 0)22114./a>                                        .a href="+code=sprintf" class="sref">sprintf./a>(.a href="+code=str" class="sref">str./a> + .a href="+code=i" class="sref">i./a> * 9, .spa  class="string">" %08lx"val./a>);22115./a>                                else22116./a>                                        .a href="+code=sprintf" class="sref">sprintf./a>(.a href="+code=str" class="sref">str./a> + .a href="+code=i" class="sref">i./a> * 9, .spa  class="string">" ????????"2117./a>                        }22118./a>                }22119./a>                .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"%s%04lx:%s\ "lvl./a>, .a href="+code=first" class="sref">first./a> & 0xffff, .a href="+code=str" class="sref">str./a>);22120./a>        }22121./a>22122./a>        .a href="+code=set_fs" class="sref">set_fs./a>(.a href="+code=fs" class="sref">fs./a>);22123./a>}22124./a>22125./a>static void .a href="+code=dump_instr" class="sref">dump_instr./a>(c  st char *.a href="+code=lvl" class="sref">lvl./a>, struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>)22126./a>{22127./a>        unsigned long .a href="+code=addr" class="sref">addr./a> = .a href="+code=instruc>
  _pointer" class="sref">instruc>
  _pointer./a>(.a href="+code=regs" class="sref">regs./a>);22128./a>        c  st int .a href="+code=thumb" class="sref">thumb./a> = .a href="+code=thumb_mode" class="sref">thumb_mode./a>(.a href="+code=regs" class="sref">regs./a>);22129./a>        c  st int .a href="+code=width" class="sref">width./a> = .a href="+code=thumb" class="sref">thumb./a> ? 4 : 8;22130./a>        .a href="+code=mm_segment_t" class="sref">mm_segment_t./a> .a href="+code=fs" class="sref">fs./a>;22131./a>        char .a href="+code=str" class="sref">str./a>[sizeof(.spa  class="string">"00000000 "p./a> = .a href="+code=str" class="sref">str./a>;22132./a>        int .a href="+code=i" class="sref">i./a>;22133./a>22134./a>        .spa  class="comment">/*./spa v22135./a>.spa  class="comment">         * We need to switch to kernel mode so that we can use __get_user./spa v22136./a>.spa  class="comment">         * to safely read from kernel space.  Note that we now dump the./spa v22137./a>.spa  class="comment">         * code first, just in case the backtrace kills us../spa v22138./a>.spa  class="comment">         */./spa v22139./a>        .a href="+code=fs" class="sref">fs./a> = .a href="+code=get_fs" class="sref">get_fs./a>();22140./a>        .a href="+code=set_fs" class="sref">set_fs./a>(.a href="+code=KERNEL_DS" class="sref">KERNEL_DS./a>);22141./a>22142./a>        for (.a href="+code=i" class="sref">i./a> = -4; .a href="+code=i" class="sref">i./a> < 1 + !!.a href="+code=thumb" class="sref">thumb./a>; .a href="+code=i" class="sref">i./a>++) {22143./a>                unsigned int .a href="+code=val" class="sref">val./a>, .a href="+code=bad" class="sref">bad./a>;22144./a>22145./a>                if (.a href="+code=thumb" class="sref">thumb./a>)22146./a>                        .a href="+code=bad" class="sref">bad./a> = .a href="+code=__get_user" class="sref">__get_user./a>(.a href="+code=val" class="sref">val./a>, &((.a href="+code=u16" class="sref">u16./a> *).a href="+code=addr" class="sref">addr./a>)[.a href="+code=i" class="sref">i./a>]);22147./a>                else22148./a>                        .a href="+code=bad" class="sref">bad./a> = .a href="+code=__get_user" class="sref">__get_user./a>(.a href="+code=val" class="sref">val./a>, &((.a href="+code=u32" class="sref">u32./a> *).a href="+code=addr" class="sref">addr./a>)[.a href="+code=i" class="sref">i./a>]);22149./a>22150./a>                if (!.a href="+code=bad" class="sref">bad./a>)22151./a>                        .a href="+code=p" class="sref">p./a> += .a href="+code=sprintf" class="sref">sprintf./a>(.a href="+code=p" class="sref">p./a>, .a href="+code=i" class="sref">i./a> == 0 ? .spa  class="string">"(%0*x) ""%0*x "2152./a>                                        .a href="+code=width" class="sref">width./a>, .a href="+code=val" class="sref">val./a>);22153./a>                else {22154./a>                        .a href="+code=p" class="sref">p./a> += .a href="+code=sprintf" class="sref">sprintf./a>(.a href="+code=p" class="sref">p./a>, .spa  class="string">"bad PC ion>
"2155./a>                        break;22156./a>                }22157./a>        }22158./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"%sCode: %s\ "lvl./a>, .a href="+code=str" class="sref">str./a>);22159./a>22160./a>        .a href="+code=set_fs" class="sref">set_fs./a>(.a href="+code=fs" class="sref">fs./a>);22161./a>}22162./a>22163./a>#ifdef .a href="+code=CONFIG_ARM_UNWIND" class="sref">CONFIG_ARM_UNWIND./a>22164./a>static .a href="+code=inline" class="sref">inline./a> void .a href="+code=dump_backtrace" class="sref">dump_backtrace./a>(struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>, struct .a href="+code=task_struct" class="sref">task_struct./a> *.a href="+code=tsk" class="sref">tsk./a>)22165./a>{22166./a>        .a href="+code=unwind_backtrace" class="sref">unwind_backtrace./a>(.a href="+code=regs" class="sref">regs./a>, .a href="+code=tsk" class="sref">tsk./a>);22167./a>}22168./a>#else22169./a>static void .a href="+code=dump_backtrace" class="sref">dump_backtrace./a>(struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>, struct .a href="+code=task_struct" class="sref">task_struct./a> *.a href="+code=tsk" class="sref">tsk./a>)2217	  a>{22171./a>        unsigned int .a href="+code=fp" class="sref">fp./a>, .a href="+code=mode" class="sref">mode./a>;22172./a>        int .a href="+code=ok" class="sref">ok./a> = 1;22173./a>22174./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"Backtrace: "2175./a>22176./a>        if (!.a href="+code=tsk" class="sref">tsk./a>)22177./a>                .a href="+code=tsk" class="sref">tsk./a> = .a href="+code=current" class="sref">current./a>;22178./a>22179./a>        if (.a href="+code=regs" class="sref">regs./a>) {22180./a>                .a href="+code=fp" class="sref">fp./a> = .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_fp" class="sref">ARM_fp./a>;22181./a>                .a href="+code=mode" class="sref">mode./a> = .a href="+code=processor_mode" class="sref">processor_mode./a>(.a href="+code=regs" class="sref">regs./a>);22182./a>        } else if (.a href="+code=tsk" class="sref">tsk./a> != .a href="+code=current" class="sref">current./a>) {22183./a>                .a href="+code=fp" class="sref">fp./a> = .a href="+code=thread_saved_fp" class="sref">thread_saved_fp./a>(.a href="+code=tsk" class="sref">tsk./a>);22184./a>                .a href="+code=mode" class="sref">mode./a> = 0x10;22185./a>        } else {22186./a>                asm(.spa  class="string">"mov %0, fp""=r"fp./a>) : : .spa  class="string">"cc"2187./a>                .a href="+code=mode" class="sref">mode./a> = 0x10;22188./a>        }22189./a>22190./a>        if (!.a href="+code=fp" class="sref">fp./a>) {22191./a>                .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"no fram
 pointer"2192./a>                .a href="+code=ok" class="sref">ok./a> = 0;22193./a>        } else if (.a href="+code=verify_stack" class="sref">verify_stack./a>(.a href="+code=fp" class="sref">fp./a>)) {22194./a>                .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"invalid fram
 pointer 0x%08x"fp./a>);22195./a>                .a href="+code=ok" class="sref">ok./a> = 0;22196./a>        } else if (.a href="+code=fp" class="sref">fp./a> < (unsigned long).a href="+code=end_of_stack" class="sref">end_of_stack./a>(.a href="+code=tsk" class="sref">tsk./a>))22197./a>                .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"fram
 pointer underflow"2198./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"\ "2199./a>22200./a>        if (.a href="+code=ok" class="sref">ok./a>)22201./a>                .a href="+code=c_backtrace" class="sref">c_backtrace./a>(.a href="+code=fp" class="sref">fp./a>, .a href="+code=mode" class="sref">mode./a>);22202./a>}22203./a>#endif22204./a>22205./a>void .a href="+code=dump_stack" class="sref">dump_stack./a>(void)22206./a>{22207./a>        .a href="+code=dump_backtrace" class="sref">dump_backtrace./a>(.a href="+code=NULL" class="sref">NULL./a>, .a href="+code=NULL" class="sref">NULL./a>);22208./a>}22209./a>2221	  a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=dump_stack" class="sref">dump_stack./a>);22211./a>22212./a>void .a href="+code=show_stack" class="sref">show_stack./a>(struct .a href="+code=task_struct" class="sref">task_struct./a> *.a href="+code=tsk" class="sref">tsk./a>, unsigned long *.a href="+code=sp" class="sref">sp./a>)22213./a>{22214./a>        .a href="+code=dump_backtrace" class="sref">dump_backtrace./a>(.a href="+code=NULL" class="sref">NULL./a>, .a href="+code=tsk" class="sref">tsk./a>);22215./a>        .a href="+code=barrier" class="sref">barrier./a>();22216./a>}22217./a>22218./a>#ifdef .a href="+code=CONFIG_PREEMPT" class="sref">CONFIG_PREEMPT./a>22219./a>#define .a href="+code=S_PREEMPT" class="sref">S_PREEMPT./a> .spa  class="string">" PREEMPT"2220./a>#else22221./a>#define .a href="+code=S_PREEMPT" class="sref">S_PREEMPT./a> .spa  class="string">""2222./a>#endif22223./a>#ifdef .a href="+code=CONFIG_SMP" class="sref">CONFIG_SMP./a>22224./a>#define .a href="+code=S_SMP" class="sref">S_SMP./a> .spa  class="string">" SMP"2225./a>#else22226./a>#define .a href="+code=S_SMP" class="sref">S_SMP./a> .spa  class="string">""2227./a>#endif22228./a>22229./a>static int .a href="+code=__die" class="sref">__die./a>(c  st char *.a href="+code=str" class="sref">str./a>, int .a href="+code=err" class="sref">err./a>, struct .a href="+code=thread_info" class="sref">thread_info./a> *.a href="+code=thread" class="sref">thread./a>, struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>)2223	  a>{22231./a>        struct .a href="+code=task_struct" class="sref">task_struct./a> *.a href="+code=tsk" class="sref">tsk./a> = .a href="+code=thread" class="sref">thread./a>->.a href="+code=task" class="sref">task./a>;22232./a>        static int .a href="+code=die_counter" class="sref">die_counter./a>;22233./a>        int .a href="+code=ret" class="sref">ret./a>;22234./a>22235./a>        .a href="+code=printk" class="sref">printk./a>(.a href="+code=KERN_EMERG" class="sref">KERN_EMERG./a> .spa  class="string">"Internal error: %s: %x [#%d]"S_PREEMPT./a> .a href="+code=S_SMP" class="sref">S_SMP./a> .spa  class="string">"\ "2236./a>               .a href="+code=str" class="sref">str./a>, .a href="+code=err" class="sref">err./a>, ++.a href="+code=die_counter" class="sref">die_counter./a>);22237./a>22238./a>        .spa  class="comment">/* trap and error numbers are mostly meaningless on ARM */./spa v22239./a>        .a href="+code=ret" class="sref">ret./a> = .a href="+code=notify_die" class="sref">notify_die./a>(.a href="+code=DIE_OOPS" class="sref">DIE_OOPS./a>, .a href="+code=str" class="sref">str./a>, .a href="+code=regs" class="sref">regs./a>, .a href="+code=err" class="sref">err./a>, .a href="+code=tsk" class="sref">tsk./a>->.a href="+code=thread" class="sref">thread./a>..a href="+code=trap_no" class="sref">trap_no./a>, .a href="+code=SIGSEGV" class="sref">SIGSEGV./a>);22240./a>        if (.a href="+code=ret" class="sref">ret./a> == .a href="+code=NOTIFY_STOP" class="sref">NOTIFY_STOP./a>)22241./a>                return .a href="+code=ret" class="sref">ret./a>;22242./a>22243./a>        .a href="+code=print_modules" class="sref">print_modules./a>();22244./a>        .a href="+code=__show_regs" class="sref">__show_regs./a>(.a href="+code=regs" class="sref">regs./a>);22245./a>        .a href="+code=printk" class="sref">printk./a>(.a href="+code=KERN_EMERG" class="sref">KERN_EMERG./a> .spa  class="string">"Process %.*s (pid: %d, stack limit = 0x%p)\ "2246./a>                .a href="+code=TASK_COMM_LEN" class="sref">TASK_COMM_LEN./a>, .a href="+code=tsk" class="sref">tsk./a>->.a href="+code=comm" class="sref">comm./a>, .a href="+code=task_pid_nr" class="sref">task_pid_nr./a>(.a href="+code=tsk" class="sref">tsk./a>), .a href="+code=thread" class="sref">thread./a> + 1);22247./a>22248./a>        if (!.a href="+code=user_mode" class="sref">user_mode./a>(.a href="+code=regs" class="sref">regs./a>) || .a href="+code=in_interrupt" class="sref">in_interrupt./a>()) {22249./a>                .a href="+code=dump_mem" class="sref">dump_mem./a>(.a href="+code=KERN_EMERG" class="sref">KERN_EMERG./a>, .spa  class="string">"Stack: "regs./a>->.a href="+code=ARM_sp" class="sref">ARM_sp./a>,22250./a>                         .a href="+code=THREAD_SIZE" class="sref">THREAD_SIZE./a> + (unsigned long).a href="+code=task_stack_page" class="sref">task_stack_page./a>(.a href="+code=tsk" class="sref">tsk./a>));22251./a>                .a href="+code=dump_backtrace" class="sref">dump_backtrace./a>(.a href="+code=regs" class="sref">regs./a>, .a href="+code=tsk" class="sref">tsk./a>);22252./a>                .a href="+code=dump_instr" class="sref">dump_instr./a>(.a href="+code=KERN_EMERG" class="sref">KERN_EMERG./a>, .a href="+code=regs" class="sref">regs./a>);22253./a>        }22254./a>22255./a>        return .a href="+code=ret" class="sref">ret./a>;22256./a>}22257./a>22258./a>static .a href="+code=DEFINE_SPINLOCK" class="sref">DEFINE_SPINLOCK./a>(.a href="+code=die_lock" class="sref">die_lock./a>);22259./a>22260./a>.spa  class="comment">/*./spa v22261./a>.spa  class="comment"> * This func>
   is protected against re-entrancy../spa v22262./a>.spa  class="comment"> */./spa v22263./a>void .a href="+code=die" class="sref">die./a>(c  st char *.a href="+code=str" class="sref">str./a>, struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>, int .a href="+code=err" class="sref">err./a>)22264./a>{22265./a>        struct .a href="+code=thread_info" class="sref">thread_info./a> *.a href="+code=thread" class="sref">thread./a> = .a href="+code=current_thread_info" class="sref">current_thread_info./a>();22266./a>        int .a href="+code=ret" class="sref">ret./a>;22267./a>22268./a>        .a href="+code=oops_enter" class="sref">oops_enter./a>();22269./a>22270./a>        .a href="+code=spin_lock_irq" class="sref">spin_lock_irq./a>(&.a href="+code=die_lock" class="sref">die_lock./a>);22271./a>        .a href="+code=c  sole_verbose" class="sref">c  sole_verbose./a>();22272./a>        .a href="+code=bust_spinlocks" class="sref">bust_spinlocks./a>(1);22273./a>        .a href="+code=ret" class="sref">ret./a> = .a href="+code=__die" class="sref">__die./a>(.a href="+code=str" class="sref">str./a>, .a href="+code=err" class="sref">err./a>, .a href="+code=thread" class="sref">thread./a>, .a href="+code=regs" class="sref">regs./a>);22274./a>22275./a>        if (.a href="+code=regs" class="sref">regs./a> && .a href="+code=kexec_should_crash" class="sref">kexec_should_crash./a>(.a href="+code=thread" class="sref">thread./a>->.a href="+code=task" class="sref">task./a>))22276./a>                .a href="+code=crash_kexec" class="sref">crash_kexec./a>(.a href="+code=regs" class="sref">regs./a>);22277./a>22278./a>        .a href="+code=bust_spinlocks" class="sref">bust_spinlocks./a>(0);22279./a>        .a href="+code=add_taint" class="sref">add_taint./a>(.a href="+code=TAINT_DIE" class="sref">TAINT_DIE./a>);22280./a>        .a href="+code=spin_unlock_irq" class="sref">spin_unlock_irq./a>(&.a href="+code=die_lock" class="sref">die_lock./a>);22281./a>        .a href="+code=oops_exit" class="sref">oops_exit./a>();22282./a>22283./a>        if (.a href="+code=in_interrupt" class="sref">in_interrupt./a>())22284./a>                .a href="+code=pa ic" class="sref">pa ic./a>(.spa  class="string">"Fatal excep>
   i  i terrupt"2285./a>        if (.a href="+code=pa ic_on_oops" class="sref">pa ic_on_oops./a>)22286./a>                .a href="+code=pa ic" class="sref">pa ic./a>(.spa  class="string">"Fatal excep>
  "2287./a>        if (.a href="+code=ret" class="sref">ret./a> != .a href="+code=NOTIFY_STOP" class="sref">NOTIFY_STOP./a>)22288./a>                .a href="+code=do_exit" class="sref">do_exit./a>(.a href="+code=SIGSEGV" class="sref">SIGSEGV./a>);22289./a>}22290./a>22291./a>void .a href="+code=arm_notify_die" class="sref">arm_notify_die./a>(c  st char *.a href="+code=str" class="sref">str./a>, struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>,22292./a>                struct .a href="+code=siginfo" class="sref">siginfo./a> *.a href="+code=info" class="sref">info./a>, unsigned long .a href="+code=err" class="sref">err./a>, unsigned long .a href="+code=trap" class="sref">trap./a>)22293./a>{22294./a>        if (.a href="+code=user_mode" class="sref">user_mode./a>(.a href="+code=regs" class="sref">regs./a>)) {22295./a>                .a href="+code=current" class="sref">current./a>->.a href="+code=thread" class="sref">thread./a>..a href="+code=error_code" class="sref">error_code./a> = .a href="+code=err" class="sref">err./a>;22296./a>                .a href="+code=current" class="sref">current./a>->.a href="+code=thread" class="sref">thread./a>..a href="+code=trap_no" class="sref">trap_no./a> = .a href="+code=trap" class="sref">trap./a>;22297./a>22298./a>                .a href="+code=force_sig_info" class="sref">force_sig_info./a>(.a href="+code=info" class="sref">info./a>->.a href="+code=si_signo" class="sref">si_signo./a>, .a href="+code=info" class="sref">info./a>, .a href="+code=current" class="sref">current./a>);22299./a>        } else {22300./a>                .a href="+code=die" class="sref">die./a>(.a href="+code=str" class="sref">str./a>, .a href="+code=regs" class="sref">regs./a>, .a href="+code=err" class="sref">err./a>);22301./a>        }22302./a>}22303./a>22304./a>static .a href="+code=LIST_HEAD" class="sref">LIST_HEAD./a>(.a href="+code=undef_hook" class="sref">undef_hook./a>);22305./a>static .a href="+code=DEFINE_SPINLOCK" class="sref">DEFINE_SPINLOCK./a>(.a href="+code=undef_lock" class="sref">undef_lock./a>);22306./a>22307./a>void .a href="+code=register_undef_hook" class="sref">register_undef_hook./a>(struct .a href="+code=undef_hook" class="sref">undef_hook./a> *.a href="+code=hook" class="sref">hook./a>)22308./a>{22309./a>        unsigned long .a href="+code=flags" class="sref">flags./a>;22310./a>22311./a>        .a href="+code=spin_lock_irqsave" class="sref">spin_lock_irqsave./a>(&.a href="+code=undef_lock" class="sref">undef_lock./a>, .a href="+code=flags" class="sref">flags./a>);22312./a>        .a href="+code=list_add" class="sref">list_add./a>(&.a href="+code=hook" class="sref">hook./a>->.a href="+code=node" class="sref">node./a>, &.a href="+code=undef_hook" class="sref">undef_hook./a>);22313./a>        .a href="+code=spin_unlock_irqrestore" class="sref">spin_unlock_irqrestore./a>(&.a href="+code=undef_lock" class="sref">undef_lock./a>, .a href="+code=flags" class="sref">flags./a>);22314./a>}22315./a>22316./a>void .a href="+code=unregister_undef_hook" class="sref">unregister_undef_hook./a>(struct .a href="+code=undef_hook" class="sref">undef_hook./a> *.a href="+code=hook" class="sref">hook./a>)22317./a>{22318./a>        unsigned long .a href="+code=flags" class="sref">flags./a>;22319./a>22320./a>        .a href="+code=spin_lock_irqsave" class="sref">spin_lock_irqsave./a>(&.a href="+code=undef_lock" class="sref">undef_lock./a>, .a href="+code=flags" class="sref">flags./a>);22321./a>        .a href="+code=list_del" class="sref">list_del./a>(&.a href="+code=hook" class="sref">hook./a>->.a href="+code=node" class="sref">node./a>);22322./a>        .a href="+code=spin_unlock_irqrestore" class="sref">spin_unlock_irqrestore./a>(&.a href="+code=undef_lock" class="sref">undef_lock./a>, .a href="+code=flags" class="sref">flags./a>);22323./a>}22324./a>22325./a>static int .a href="+code=call_undef_hook" class="sref">call_undef_hook./a>(struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>, unsigned int .a href="+code=instr" class="sref">instr./a>)22326./a>{22327./a>        struct .a href="+code=undef_hook" class="sref">undef_hook./a> *.a href="+code=hook" class="sref">hook./a>;22328./a>        unsigned long .a href="+code=flags" class="sref">flags./a>;22329./a>        int (*.a href="+code=fn" class="sref">fn./a>)(struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>, unsigned int .a href="+code=instr" class="sref">instr./a>) = .a href="+code=NULL" class="sref">NULL./a>;22330./a>22331./a>        .a href="+code=spin_lock_irqsave" class="sref">spin_lock_irqsave./a>(&.a href="+code=undef_lock" class="sref">undef_lock./a>, .a href="+code=flags" class="sref">flags./a>);22332./a>        .a href="+code=list_for_each_entry" class="sref">list_for_each_entry./a>(.a href="+code=hook" class="sref">hook./a>, &.a href="+code=undef_hook" class="sref">undef_hook./a>, .a href="+code=node" class="sref">node./a>)22333./a>                if ((.a href="+code=instr" class="sref">instr./a> & .a href="+code=hook" class="sref">hook./a>->.a href="+code=instr_mask" class="sref">instr_mask./a>) == .a href="+code=hook" class="sref">hook./a>->.a href="+code=instr_val" class="sref">instr_val./a> &&22334./a>                    (.a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_cpsr" class="sref">ARM_cpsr./a> & .a href="+code=hook" class="sref">hook./a>->.a href="+code=cpsr_mask" class="sref">cpsr_mask./a>) == .a href="+code=hook" class="sref">hook./a>->.a href="+code=cpsr_val" class="sref">cpsr_val./a>)22335./a>                        .a href="+code=fn" class="sref">fn./a> = .a href="+code=hook" class="sref">hook./a>->.a href="+code=fn" class="sref">fn./a>;22336./a>        .a href="+code=spin_unlock_irqrestore" class="sref">spin_unlock_irqrestore./a>(&.a href="+code=undef_lock" class="sref">undef_lock./a>, .a href="+code=flags" class="sref">flags./a>);22337./a>22338./a>        return .a href="+code=fn" class="sref">fn./a> ? .a href="+code=fn" class="sref">fn./a>(.a href="+code=regs" class="sref">regs./a>, .a href="+code=instr" class="sref">instr./a>) : 1;22339./a>}22340./a>22341./a>.a href="+code=asmlinkage" class="sref">asmlinkage./a> void .a href="+code=__excep>
  " class="sref">__excep>
  ./a> .a href="+code=do_undefinstr" class="sref">do_undefinstr./a>(struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>)22342./a>{22343./a>        unsigned int .a href="+code=correc>
  " class="sref">correc>
  ./a> = .a href="+code=thumb_mode" class="sref">thumb_mode./a>(.a href="+code=regs" class="sref">regs./a>) ? 2 : 4;22344./a>        unsigned int .a href="+code=instr" class="sref">instr./a>;22345./a>        .a href="+code=siginfo_t" class="sref">siginfo_t./a> .a href="+code=info" class="sref">info./a>;22346./a>        void .a href="+code=__user" class="sref">__user./a> *.a href="+code=pc" class="sref">pc./a>;22347./a>22348./a>        .spa  class="comment">/*./spa v22349./a>.spa  class="comment">         * According to the ARM ARM, PC is 2 or 4 bytes ahead,./spa v22350./a>.spa  class="comment">         * depending whether we're i  Thumb mode or not../spa v22351./a>.spa  class="comment">         * Correc> this offset../spa v22352./a>.spa  class="comment">         */./spa v22353./a>        .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_pc" class="sref">ARM_pc./a> -= .a href="+code=correc>
  " class="sref">correc>
  ./a>;22354./a>22355./a>        .a href="+code=pc" class="sref">pc./a> = (void .a href="+code=__user" class="sref">__user./a> *).a href="+code=instruc>
  _pointer" class="sref">instruc>
  _pointer./a>(.a href="+code=regs" class="sref">regs./a>);22356./a>22357./a>        if (.a href="+code=processor_mode" class="sref">processor_mode./a>(.a href="+code=regs" class="sref">regs./a>) == .a href="+code=SVC_MODE" class="sref">SVC_MODE./a>) {22358./a>#ifdef .a href="+code=CONFIG_THUMB2_KERNEL" class="sref">CONFIG_THUMB2_KERNEL./a>22359./a>                if (.a href="+code=thumb_mode" class="sref">thumb_mode./a>(.a href="+code=regs" class="sref">regs./a>)) {22360./a>                        .a href="+code=instr" class="sref">instr./a> = ((.a href="+code=u16" class="sref">u16./a> *).a href="+code=pc" class="sref">pc./a>)[0];22361./a>                        if (.a href="+code=is_wide_instruc>
  " class="sref">is_wide_instruc>
  ./a>(.a href="+code=instr" class="sref">instr./a>)) {22362./a>                                .a href="+code=instr" class="sref">instr./a> <<= 16;22363./a>                                .a href="+code=instr" class="sref">instr./a> |= ((.a href="+code=u16" class="sref">u16./a> *).a href="+code=pc" class="sref">pc./a>)[1];22364./a>                        }22365./a>                } else22366./a>#endif22367./a>                        .a href="+code=instr" class="sref">instr./a> = *(.a href="+code=u32" class="sref">u32./a> *) .a href="+code=pc" class="sref">pc./a>;22368./a>        } else if (.a href="+code=thumb_mode" class="sref">thumb_mode./a>(.a href="+code=regs" class="sref">regs./a>)) {22369./a>                .a href="+code=get_user" class="sref">get_user./a>(.a href="+code=instr" class="sref">instr./a>, (.a href="+code=u16" class="sref">u16./a> .a href="+code=__user" class="sref">__user./a> *).a href="+code=pc" class="sref">pc./a>);22370./a>                if (.a href="+code=is_wide_instruc>
  " class="sref">is_wide_instruc>
  ./a>(.a href="+code=instr" class="sref">instr./a>)) {22371./a>                        unsigned int .a href="+code=instr2" class="sref">instr2./a>;22372./a>                        .a href="+code=get_user" class="sref">get_user./a>(.a href="+code=instr2" class="sref">instr2./a>, (.a href="+code=u16" class="sref">u16./a> .a href="+code=__user" class="sref">__user./a> *).a href="+code=pc" class="sref">pc./a>+1);22373./a>                        .a href="+code=instr" class="sref">instr./a> <<= 16;22374./a>                        .a href="+code=instr" class="sref">instr./a> |= .a href="+code=instr2" class="sref">instr2./a>;22375./a>                }22376./a>        } else {22377./a>                .a href="+code=get_user" class="sref">get_user./a>(.a href="+code=instr" class="sref">instr./a>, (.a href="+code=u32" class="sref">u32./a> .a href="+code=__user" class="sref">__user./a> *).a href="+code=pc" class="sref">pc./a>);22378./a>        }22379./a>22380./a>        if (.a href="+code=call_undef_hook" class="sref">call_undef_hook./a>(.a href="+code=regs" class="sref">regs./a>, .a href="+code=instr" class="sref">instr./a>) == 0)22381./a>                return;22382./a>22383./a>#ifdef .a href="+code=CONFIG_DEBUG_USER" class="sref">CONFIG_DEBUG_USER./a>22384./a>        if (.a href="+code=user_debug" class="sref">user_debug./a> & .a href="+code=UDBG_UNDEFINED" class="sref">UDBG_UNDEFINED./a>) {22385./a>                .a href="+code=printk" class="sref">printk./a>(.a href="+code=KERN_INFO" class="sref">KERN_INFO./a> .spa  class="string">"%s (%d): undefined instruc>
  : pc=%p\ "2386./a>                        .a href="+code=current" class="sref">current./a>->.a href="+code=comm" class="sref">comm./a>, .a href="+code=task_pid_nr" class="sref">task_pid_nr./a>(.a href="+code=current" class="sref">current./a>), .a href="+code=pc" class="sref">pc./a>);22387./a>                .a href="+code=dump_instr" class="sref">dump_instr./a>(.a href="+code=KERN_INFO" class="sref">KERN_INFO./a>, .a href="+code=regs" class="sref">regs./a>);22388./a>        }22389./a>#endif22390./a>22391./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_signo" class="sref">si_signo./a> = .a href="+code=SIGILL" class="sref">SIGILL./a>;22392./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_errno" class="sref">si_errno./a> = 0;22393./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_code" class="sref">si_code./a>  = .a href="+code=ILL_ILLOPC" class="sref">ILL_ILLOPC./a>;22394./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_addr" class="sref">si_addr./a>  = .a href="+code=pc" class="sref">pc./a>;22395./a>22396./a>        .a href="+code=arm_notify_die" class="sref">arm_notify_die./a>(.spa  class="string">"Oops - undefined instruc>
  "regs./a>, &.a href="+code=info" class="sref">info./a>, 0, 6);22397./a>}22398./a>22399./a>.a href="+code=asmlinkage" class="sref">asmlinkage./a> void .a href="+code=do_unexp_fiq" class="sref">do_unexp_fiq./a> (struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>)2240	  a>{22401./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"Hmm.  Unexpected FIQ received, but trying to continue\ "2402./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"You may have a hardware problem...\ "2403./a>}22404./a>22405./a>.spa  class="comment">/*./spa v22406./a>.spa  class="comment"> * bad_mode handles the impossible case i  the vectors.  If you see one of./spa v22407./a>.spa  class="comment"> * these, then it's extremely serious, and could mean you have buggy hardware../spa v22408./a>.spa  class="comment"> * It never returns, and never tries to sync.  We hope that we can at least./spa v22409./a>.spa  class="comment"> * dump out some state i forma>
  ..../spa v22410./a>.spa  class="comment"> */./spa v22411./a>.a href="+code=asmlinkage" class="sref">asmlinkage./a> void .a href="+code=bad_mode" class="sref">bad_mode./a>(struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>, int .a href="+code=reas  " class="sref">reas  ./a>)22412./a>{22413./a>        .a href="+code=c  sole_verbose" class="sref">c  sole_verbose./a>();22414./a>22415./a>        .a href="+code=printk" class="sref">printk./a>(.a href="+code=KERN_CRIT" class="sref">KERN_CRIT./a> .spa  class="string">"Bad mode i  %s handler detected\ "handler./a>[.a href="+code=reas  " class="sref">reas  ./a>]);22416./a>22417./a>        .a href="+code=die" class="sref">die./a>(.spa  class="string">"Oops - bad mode"regs./a>, 0);22418./a>        .a href="+code=local_irq_disable" class="sref">local_irq_disable./a>();22419./a>        .a href="+code=pa ic" class="sref">pa ic./a>(.spa  class="string">"bad mode"2420./a>}22421./a>22422./a>static int .a href="+code=bad_syscall" class="sref">bad_syscall./a>(int .a href="+code= " class="sref">n./a>, struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>)22423./a>{22424./a>        struct .a href="+code=thread_info" class="sref">thread_info./a> *.a href="+code=thread" class="sref">thread./a> = .a href="+code=current_thread_info" class="sref">current_thread_info./a>();22425./a>        .a href="+code=siginfo_t" class="sref">siginfo_t./a> .a href="+code=info" class="sref">info./a>;22426./a>22427./a>        if ((.a href="+code=current" class="sref">current./a>->.a href="+code=pers  ality" class="sref">pers  ality./a> & .a href="+code=PER_MASK" class="sref">PER_MASK./a>) != .a href="+code=PER_LINUX" class="sref">PER_LINUX./a> &&22428./a>            .a href="+code=thread" class="sref">thread./a>->.a href="+code=exec_domai " class="sref">exec_domai ./a>->.a href="+code=handler" class="sref">handler./a>) {22429./a>                .a href="+code=thread" class="sref">thread./a>->.a href="+code=exec_domai " class="sref">exec_domai ./a>->.a href="+code=handler" class="sref">handler./a>(.a href="+code= " class="sref">n./a>, .a href="+code=regs" class="sref">regs./a>);22430./a>                return .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22431./a>        }22432./a>22433./a>#ifdef .a href="+code=CONFIG_DEBUG_USER" class="sref">CONFIG_DEBUG_USER./a>22434./a>        if (.a href="+code=user_debug" class="sref">user_debug./a> & .a href="+code=UDBG_SYSCALL" class="sref">UDBG_SYSCALL./a>) {22435./a>                .a href="+code=printk" class="sref">printk./a>(.a href="+code=KERN_ERR" class="sref">KERN_ERR./a> .spa  class="string">"[%d] %s: obsolete system call %08x.\ "2436./a>                        .a href="+code=task_pid_nr" class="sref">task_pid_nr./a>(.a href="+code=current" class="sref">current./a>), .a href="+code=current" class="sref">current./a>->.a href="+code=comm" class="sref">comm./a>, .a href="+code= " class="sref">n./a>);22437./a>                .a href="+code=dump_instr" class="sref">dump_instr./a>(.a href="+code=KERN_ERR" class="sref">KERN_ERR./a>, .a href="+code=regs" class="sref">regs./a>);22438./a>        }22439./a>#endif22440./a>22441./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_signo" class="sref">si_signo./a> = .a href="+code=SIGILL" class="sref">SIGILL./a>;22442./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_errno" class="sref">si_errno./a> = 0;22443./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_code" class="sref">si_code./a>  = .a href="+code=ILL_ILLTRP" class="sref">ILL_ILLTRP./a>;22444./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_addr" class="sref">si_addr./a>  = (void .a href="+code=__user" class="sref">__user./a> *).a href="+code=instruc>
  _pointer" class="sref">instruc>
  _pointer./a>(.a href="+code=regs" class="sref">regs./a>) -22445./a>                         (.a href="+code=thumb_mode" class="sref">thumb_mode./a>(.a href="+code=regs" class="sref">regs./a>) ? 2 : 4);22446./a>22447./a>        .a href="+code=arm_notify_die" class="sref">arm_notify_die./a>(.spa  class="string">"Oops - bad syscall"regs./a>, &.a href="+code=info" class="sref">info./a>, .a href="+code= " class="sref">n./a>, 0);22448./a>22449./a>        return .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22450./a>}22451./a>22452./a>static .a href="+code=inline" class="sref">inline./a> void22453./a>.a href="+code=do_cache_op" class="sref">do_cache_op./a>(unsigned long .a href="+code=start" class="sref">start./a>, unsigned long .a href="+code=end" class="sref">end./a>, int .a href="+code=flags" class="sref">flags./a>)22454./a>{22455./a>        struct .a href="+code=mm_struct" class="sref">mm_struct./a> *.a href="+code=mm" class="sref">mm./a> = .a href="+code=current" class="sref">current./a>->.a href="+code=ac>
ve_mm" class="sref">ac>
ve_mm./a>;22456./a>        struct .a href="+code=vm_area_struct" class="sref">vm_area_struct./a> *.a href="+code=vma" class="sref">vma./a>;22457./a>22458./a>        if (.a href="+code=end" class="sref">end./a> < .a href="+code=start" class="sref">start./a> || .a href="+code=flags" class="sref">flags./a>)22459./a>                return;22460./a>22461./a>        .a href="+code=down_read" class="sref">down_read./a>(&.a href="+code=mm" class="sref">mm./a>->.a href="+code=mmap_sem" class="sref">mmap_sem./a>);22462./a>        .a href="+code=vma" class="sref">vma./a> = .a href="+code=find_vma" class="sref">find_vma./a>(.a href="+code=mm" class="sref">mm./a>, .a href="+code=start" class="sref">start./a>);22463./a>        if (.a href="+code=vma" class="sref">vma./a> && .a href="+code=vma" class="sref">vma./a>->.a href="+code=vm_start" class="sref">vm_start./a> < .a href="+code=end" class="sref">end./a>) {22464./a>                if (.a href="+code=start" class="sref">start./a> < .a href="+code=vma" class="sref">vma./a>->.a href="+code=vm_start" class="sref">vm_start./a>)22465./a>                        .a href="+code=start" class="sref">start./a> = .a href="+code=vma" class="sref">vma./a>->.a href="+code=vm_start" class="sref">vm_start./a>;22466./a>                if (.a href="+code=end" class="sref">end./a> > .a href="+code=vma" class="sref">vma./a>->.a href="+code=vm_end" class="sref">vm_end./a>)22467./a>                        .a href="+code=end" class="sref">end./a> = .a href="+code=vma" class="sref">vma./a>->.a href="+code=vm_end" class="sref">vm_end./a>;22468./a>22469./a>                .a href="+code=flush_cache_user_range" class="sref">flush_cache_user_range./a>(.a href="+code=vma" class="sref">vma./a>, .a href="+code=start" class="sref">start./a>, .a href="+code=end" class="sref">end./a>);22470./a>        }22471./a>        .a href="+code=up_read" class="sref">up_read./a>(&.a href="+code=mm" class="sref">mm./a>->.a href="+code=mmap_sem" class="sref">mmap_sem./a>);22472./a>}22473./a>22474./a>.spa  class="comment">/*./spa v22475./a>.spa  class="comment"> * Handle all unrecognised system calls../spa v22476./a>.spa  class="comment"> *  0x9f0000 - 0x9fffff are some more esoteric system calls./spa v22477./a>.spa  class="comment"> */./spa v22478./a>#define .a href="+code=NR" class="sref">NR./a>(.a href="+code=x" class="sref">x./a>) ((.a href="+code=__ARM_NR_" class="sref">__ARM_NR_./a>##x) - .a href="+code=__ARM_NR_BASE" class="sref">__ARM_NR_BASE./a>)22479./a>.a href="+code=asmlinkage" class="sref">asmlinkage./a> int .a href="+code=arm_syscall" class="sref">arm_syscall./a>(int .a href="+code= o" class="sref">no./a>, struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>)2248	  a>{22481./a>        struct .a href="+code=thread_info" class="sref">thread_info./a> *.a href="+code=thread" class="sref">thread./a> = .a href="+code=current_thread_info" class="sref">current_thread_info./a>();22482./a>        .a href="+code=siginfo_t" class="sref">siginfo_t./a> .a href="+code=info" class="sref">info./a>;22483./a>22484./a>        if ((.a href="+code= o" class="sref">no./a> >> 16) != (.a href="+code=__ARM_NR_BASE" class="sref">__ARM_NR_BASE./a>>> 16))22485./a>                return .a href="+code=bad_syscall" class="sref">bad_syscall./a>(.a href="+code= o" class="sref">no./a>, .a href="+code=regs" class="sref">regs./a>);22486./a>22487./a>        switch (.a href="+code= o" class="sref">no./a> & 0xffff) {22488./a>        case 0: .spa  class="comment">/* branch through 0 */./spa v22489./a>                .a href="+code=info" class="sref">info./a>..a href="+code=si_signo" class="sref">si_signo./a> = .a href="+code=SIGSEGV" class="sref">SIGSEGV./a>;22490./a>                .a href="+code=info" class="sref">info./a>..a href="+code=si_errno" class="sref">si_errno./a> = 0;22491./a>                .a href="+code=info" class="sref">info./a>..a href="+code=si_code" class="sref">si_code./a>  = .a href="+code=SEGV_MAPERR" class="sref">SEGV_MAPERR./a>;22492./a>                .a href="+code=info" class="sref">info./a>..a href="+code=si_addr" class="sref">si_addr./a>  = .a href="+code=NULL" class="sref">NULL./a>;22493./a>22494./a>                .a href="+code=arm_notify_die" class="sref">arm_notify_die./a>(.spa  class="string">"branch through zero"regs./a>, &.a href="+code=info" class="sref">info./a>, 0, 0);22495./a>                return 0;22496./a>22497./a>        case .a href="+code=NR" class="sref">NR./a>(.a href="+code=breakpoint" class="sref">breakpoint./a>): .spa  class="comment">/* SWI BREAK_POINT */./spa v22498./a>                .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_pc" class="sref">ARM_pc./a> -= .a href="+code=thumb_mode" class="sref">thumb_mode./a>(.a href="+code=regs" class="sref">regs./a>) ? 2 : 4;22499./a>                .a href="+code=ptrace_break" class="sref">ptrace_break./a>(.a href="+code=current" class="sref">current./a>, .a href="+code=regs" class="sref">regs./a>);22500./a>                return .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22501./a>22502./a>        .spa  class="comment">/*./spa v22503./a>.spa  class="comment">         * Flush a region from virtual address 'r0' to virtual address 'r1'./spa v22504./a>.spa  class="comment">         * _exclus
ve_.  There is no alignment requirement on either address;./spa v22505./a>.spa  class="comment">         * user space does not need to know the hardware cache layout../spa v22506./a>.spa  class="comment">         *./spa v22507./a>.spa  class="comment">         * r2 contains flags.  It should ALWAYS be passed as ZERO until it./spa v22508./a>.spa  class="comment">         * is defined to be something else.  For now we ignore it, but may./spa v22509./a>.spa  class="comment">         * the fires of hell burn in your belly if you break this rule. ;)./spa v22510./a>.spa  class="comment">         *./spa v22511./a>.spa  class="comment">         * (at a later date, we may want to allow this call to not flush./spa v22512./a>.spa  class="comment">         * various aspects of the cache.  Passing '0' will guarantee that./spa v22513./a>.spa  class="comment">         * everything necessary gets flushed to mai tain consistency in./spa v22514./a>.spa  class="comment">         * the specified region)../spa v22515./a>.spa  class="comment">         */./spa v22516./a>        case .a href="+code=NR" class="sref">NR./a>(.a href="+code=cacheflush" class="sref">cacheflush./a>):22517./a>                .a href="+code=do_cache_op" class="sref">do_cache_op./a>(.a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>, .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r1" class="sref">ARM_r1./a>, .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r2" class="sref">ARM_r2./a>);22518./a>                return 0;22519./a>22520./a>        case .a href="+code=NR" class="sref">NR./a>(.a href="+code=usr26" class="sref">usr26./a>):22521./a>                if (!(.a href="+code=elf_hwcap" class="sref">elf_hwcap./a> & .a href="+code=HWCAP_26BIT" class="sref">HWCAP_26BIT./a>))22522./a>                        break;22523./a>                .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_cpsr" class="sref">ARM_cpsr./a> &= ~.a href="+code=MODE32_BIT" class="sref">MODE32_BIT./a>;22524./a>                return .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22525./a>22526./a>        case .a href="+code=NR" class="sref">NR./a>(.a href="+code=usr32" class="sref">usr32./a>):22527./a>                if (!(.a href="+code=elf_hwcap" class="sref">elf_hwcap./a> & .a href="+code=HWCAP_26BIT" class="sref">HWCAP_26BIT./a>))22528./a>                        break;22529./a>                .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_cpsr" class="sref">ARM_cpsr./a> |= .a href="+code=MODE32_BIT" class="sref">MODE32_BIT./a>;22530./a>                return .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22531./a>22532./a>        case .a href="+code=NR" class="sref">NR./a>(.a href="+code=set_tls" class="sref">set_tls./a>):22533./a>                .a href="+code=thread" class="sref">thread./a>->.a href="+code=tp_value" class="sref">tp_value./a> = .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22534./a>                if (.a href="+code=tls_emu" class="sref">tls_emu./a>)22535./a>                        return 0;22536./a>                if (.a href="+code=has_tls_reg" class="sref">has_tls_reg./a>) {22537./a>                        asm (.spa  class="string">"mcr p15, 0, %0, c13, c0, 3"2538./a>                                : : .spa  class="string">"r"regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>));22539./a>                } else {22540./a>                        .spa  class="comment">/*./spa v22541./a>.spa  class="comment">                         * User space must never try to access this directly../spa v22542./a>.spa  class="comment">                         * Expect your app to break eventually if you do so../spa v22543./a>.spa  class="comment">                         * The user helper at 0xffff0fe0 must be used instead../spa v22544./a>.spa  class="comment">                         * (see entry-armv.S for details)./spa v22545./a>.spa  class="comment">                         */./spa v22546./a>                        *((unsigned int *)0xffff0ff0) = .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22547./a>                }22548./a>                return 0;22549./a>22550./a>#ifdef .a href="+code=CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG" class="sref">CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG./a>22551./a>        .spa  class="comment">/*./spa v22552./a>.spa  class="comment">         * Atomically store r1 in *r2 if *r2 is equal to r0 for user space../spa v22553./a>.spa  class="comment">         * Return zero in r0 if *MEM was changed or non-zero if no exchange./spa v22554./a>.spa  class="comment">         * happened.  Also set the user C flag accordingly../spa v22555./a>.spa  class="comment">         * If access permissions have to be fixed up then non-zero is./spa v22556./a>.spa  class="comment">         * returned and the opera>
   has to be re-attempted../spa v22557./a>.spa  class="comment">         *./spa v22558./a>.spa  class="comment">         * *NOTE*: This is a ghost syscall private to the kernel.  Only the./spa v22559./a>.spa  class="comment">         * __kuser_cmpxchg code in entry-armv.S should be aware of its./spa v22560./a>.spa  class="comment">         * existence.  Don't ever use this from user code../spa v22561./a>.spa  class="comment">         */./spa v22562./a>        case .a href="+code=NR" class="sref">NR./a>(.a href="+code=cmpxchg" class="sref">cmpxchg./a>):22563./a>        for (;;) {22564./a>                extern void .a href="+code=do_DataAbort" class="sref">do_DataAbort./a>(unsigned long .a href="+code=addr" class="sref">addr./a>, unsigned int .a href="+code=fsr" class="sref">fsr./a>,22565./a>                                         struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>);22566./a>                unsigned long .a href="+code=val" class="sref">val./a>;22567./a>                unsigned long .a href="+code=addr" class="sref">addr./a> = .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r2" class="sref">ARM_r2./a>;22568./a>                struct .a href="+code=mm_struct" class="sref">mm_struct./a> *.a href="+code=mm" class="sref">mm./a> = .a href="+code=current" class="sref">current./a>->.a href="+code=mm" class="sref">mm./a>;22569./a>                .a href="+code=pgd_t" class="sref">pgd_t./a> *.a href="+code=pgd" class="sref">pgd./a>; .a href="+code=pmd_t" class="sref">pmd_t./a> *.a href="+code=pmd" class="sref">pmd./a>; .a href="+code=pte_t" class="sref">pte_t./a> *.a href="+code=pte" class="sref">pte./a>;22570./a>                .a href="+code=spinlock_t" class="sref">spinlock_t./a> *.a href="+code=ptl" class="sref">ptl./a>;22571./a>22572./a>                .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_cpsr" class="sref">ARM_cpsr./a> &= ~.a href="+code=PSR_C_BIT" class="sref">PSR_C_BIT./a>;22573./a>                .a href="+code=down_read" class="sref">down_read./a>(&.a href="+code=mm" class="sref">mm./a>->.a href="+code=mmap_sem" class="sref">mmap_sem./a>);22574./a>                .a href="+code=pgd" class="sref">pgd./a> = .a href="+code=pgd_offset" class="sref">pgd_offset./a>(.a href="+code=mm" class="sref">mm./a>, .a href="+code=addr" class="sref">addr./a>);22575./a>                if (!.a href="+code=pgd_present" class="sref">pgd_present./a>(*.a href="+code=pgd" class="sref">pgd./a>))22576./a>                        goto .a href="+code=bad_access" class="sref">bad_access./a>;22577./a>                .a href="+code=pmd" class="sref">pmd./a> = .a href="+code=pmd_offset" class="sref">pmd_offset./a>(.a href="+code=pgd" class="sref">pgd./a>, .a href="+code=addr" class="sref">addr./a>);22578./a>                if (!.a href="+code=pmd_present" class="sref">pmd_present./a>(*.a href="+code=pmd" class="sref">pmd./a>))22579./a>                        goto .a href="+code=bad_access" class="sref">bad_access./a>;22580./a>                .a href="+code=pte" class="sref">pte./a> = .a href="+code=pte_offset_map_lock" class="sref">pte_offset_map_lock./a>(.a href="+code=mm" class="sref">mm./a>, .a href="+code=pmd" class="sref">pmd./a>, .a href="+code=addr" class="sref">addr./a>, &.a href="+code=ptl" class="sref">ptl./a>);22581./a>                if (!.a href="+code=pte_present" class="sref">pte_present./a>(*.a href="+code=pte" class="sref">pte./a>) || !.a href="+code=pte_write" class="sref">pte_write./a>(*.a href="+code=pte" class="sref">pte./a>) || !.a href="+code=pte_dirty" class="sref">pte_dirty./a>(*.a href="+code=pte" class="sref">pte./a>)) {22582./a>                        .a href="+code=pte_unmap_unlock" class="sref">pte_unmap_unlock./a>(.a href="+code=pte" class="sref">pte./a>, .a href="+code=ptl" class="sref">ptl./a>);22583./a>                        goto .a href="+code=bad_access" class="sref">bad_access./a>;22584./a>                }22585./a>                .a href="+code=val" class="sref">val./a> = *(unsigned long *).a href="+code=addr" class="sref">addr./a>;22586./a>                .a href="+code=val" class="sref">val./a> -= .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r0" class="sref">ARM_r0./a>;22587./a>                if (.a href="+code=val" class="sref">val./a> == 0) {22588./a>                        *(unsigned long *).a href="+code=addr" class="sref">addr./a> = .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_r1" class="sref">ARM_r1./a>;22589./a>                        .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_cpsr" class="sref">ARM_cpsr./a> |= .a href="+code=PSR_C_BIT" class="sref">PSR_C_BIT./a>;22590./a>                }22591./a>                .a href="+code=pte_unmap_unlock" class="sref">pte_unmap_unlock./a>(.a href="+code=pte" class="sref">pte./a>, .a href="+code=ptl" class="sref">ptl./a>);22592./a>                .a href="+code=up_read" class="sref">up_read./a>(&.a href="+code=mm" class="sref">mm./a>->.a href="+code=mmap_sem" class="sref">mmap_sem./a>);22593./a>                return .a href="+code=val" class="sref">val./a>;22594./a>22595./a>                .a href="+code=bad_access" class="sref">bad_access./a>:22596./a>                .a href="+code=up_read" class="sref">up_read./a>(&.a href="+code=mm" class="sref">mm./a>->.a href="+code=mmap_sem" class="sref">mmap_sem./a>);22597./a>                .spa  class="comment">/* simulate a write access fault */./spa v22598./a>                .a href="+code=do_DataAbort" class="sref">do_DataAbort./a>(.a href="+code=addr" class="sref">addr./a>, 15 + (1 << 11), .a href="+code=regs" class="sref">regs./a>);22599./a>        }22600./a>#endif22601./a>22602./a>        default:22603./a>                .spa  class="comment">/* Calls 9f00xx..9f07ff are defined to return -ENOSYS./spa v22604./a>.spa  class="comment">                   if not implemented, rather tha  raising SIGILL.  This./spa v22605./a>.spa  class="comment">                   way the calling program can gracefully determine whether./spa v22606./a>.spa  class="comment">                   a feature is supported.  */./spa v22607./a>                if ((.a href="+code= o" class="sref">no./a> & 0xffff) <= 0x7ff)22608./a>                        return -.a href="+code=ENOSYS" class="sref">ENOSYS./a>;22609./a>                break;22610./a>        }22611./a>#ifdef .a href="+code=CONFIG_DEBUG_USER" class="sref">CONFIG_DEBUG_USER./a>22612./a>        .spa  class="comment">/*./spa v22613./a>.spa  class="comment">         * experience shows that these seem to indicate that./spa v22614./a>.spa  class="comment">         * something catastrophic has happened./spa v22615./a>.spa  class="comment">         */./spa v22616./a>        if (.a href="+code=user_debug" class="sref">user_debug./a> & .a href="+code=UDBG_SYSCALL" class="sref">UDBG_SYSCALL./a>) {22617./a>                .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"[%d] %s: arm syscall %d\n"2618./a>                       .a href="+code=task_pid_nr" class="sref">task_pid_nr./a>(.a href="+code=current" class="sref">current./a>), .a href="+code=current" class="sref">current./a>->.a href="+code=comm" class="sref">comm./a>, .a href="+code= o" class="sref">no./a>);22619./a>                .a href="+code=dump_instr" class="sref">dump_instr./a>(.spa  class="string">""regs./a>);22620./a>                if (.a href="+code=user_mode" class="sref">user_mode./a>(.a href="+code=regs" class="sref">regs./a>)) {22621./a>                        .a href="+code=__show_regs" class="sref">__show_regs./a>(.a href="+code=regs" class="sref">regs./a>);22622./a>                        .a href="+code=c_backtrace" class="sref">c_backtrace./a>(.a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_fp" class="sref">ARM_fp./a>, .a href="+code=processor_mode" class="sref">processor_mode./a>(.a href="+code=regs" class="sref">regs./a>));22623./a>                }22624./a>        }22625./a>#endif22626./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_signo" class="sref">si_signo./a> = .a href="+code=SIGILL" class="sref">SIGILL./a>;22627./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_errno" class="sref">si_errno./a> = 0;22628./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_code" class="sref">si_code./a>  = .a href="+code=ILL_ILLTRP" class="sref">ILL_ILLTRP./a>;22629./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_addr" class="sref">si_addr./a>  = (void .a href="+code=__user" class="sref">__user./a> *).a href="+code=instruc>
  _pointer" class="sref">instruc>
  _pointer./a>(.a href="+code=regs" class="sref">regs./a>) -22630./a>                         (.a href="+code=thumb_mode" class="sref">thumb_mode./a>(.a href="+code=regs" class="sref">regs./a>) ? 2 : 4);22631./a>22632./a>        .a href="+code=arm_notify_die" class="sref">arm_notify_die./a>(.spa  class="string">"Oops - bad syscall(2)"regs./a>, &.a href="+code=info" class="sref">info./a>, .a href="+code= o" class="sref">no./a>, 0);22633./a>        return 0;22634./a>}22635./a>22636./a>#ifdef .a href="+code=CONFIG_TLS_REG_EMUL" class="sref">CONFIG_TLS_REG_EMUL./a>22637./a>22638./a>.spa  class="comment">/*./spa v22639./a>.spa  class="comment"> * We might be running on a  ARMv6+ processor which should have the TLS./spa v22640./a>.spa  class="comment"> * register but for some reason we can't use it, or maybe an SMP system./spa v22641./a>.spa  class="comment"> * using a pre-ARMv6 processor (there are apparently a few prototypes like./spa v22642./a>.spa  class="comment"> * that in existence) and therefore access to that register must be./spa v22643./a>.spa  class="comment"> * emulated../spa v22644./a>.spa  class="comment"> */./spa v22645./a>22646./a>static int .a href="+code=get_tp_trap" class="sref">get_tp_trap./a>(struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>, unsigned int .a href="+code=instr" class="sref">instr./a>)22647./a>{22648./a>        int .a href="+code=reg" class="sref">reg./a> = (.a href="+code=instr" class="sref">instr./a> >> 12) & 15;22649./a>        if (.a href="+code=reg" class="sref">reg./a> == 15)22650./a>                return 1;22651./a>        .a href="+code=regs" class="sref">regs./a>->.a href="+code=uregs" class="sref">uregs./a>[.a href="+code=reg" class="sref">reg./a>] = .a href="+code=current_thread_info" class="sref">current_thread_info./a>()->.a href="+code=tp_value" class="sref">tp_value./a>;22652./a>        .a href="+code=regs" class="sref">regs./a>->.a href="+code=ARM_pc" class="sref">ARM_pc./a> += 4;22653./a>        return 0;22654./a>}22655./a>22656./a>static struct .a href="+code=undef_hook" class="sref">undef_hook./a> .a href="+code=arm_mrc_hook" class="sref">arm_mrc_hook./a> = {22657./a>        ..a href="+code=instr_mask" class="sref">instr_mask./a>     = 0x0fff0fff,22658./a>        ..a href="+code=instr_val" class="sref">instr_val./a>      = 0x0e1d0f70,22659./a>        ..a href="+code=cpsr_mask" class="sref">cpsr_mask./a>      = .a href="+code=PSR_T_BIT" class="sref">PSR_T_BIT./a>,22660./a>        ..a href="+code=cpsr_val" class="sref">cpsr_val./a>       = 0,22661./a>        ..a href="+code=fn" class="sref">fn./a>             = .a href="+code=get_tp_trap" class="sref">get_tp_trap./a>,22662./a>};22663./a>22664./a>static int .a href="+code=__init" class="sref">__init./a> .a href="+code=arm_mrc_hook_init" class="sref">arm_mrc_hook_init./a>(void)22665./a>{22666./a>        .a href="+code=register_undef_hook" class="sref">register_undef_hook./a>(&.a href="+code=arm_mrc_hook" class="sref">arm_mrc_hook./a>);22667./a>        return 0;22668./a>}22669./a>22670./a>.a href="+code=late_initcall" class="sref">late_initcall./a>(.a href="+code=arm_mrc_hook_init" class="sref">arm_mrc_hook_init./a>);22671./a>22672./a>#endif22673./a>22674./a>void .a href="+code=__bad_xchg" class="sref">__bad_xchg./a>(volatile void *.a href="+code=ptr" class="sref">ptr./a>, int .a href="+code=size" class="sref">size./a>)22675./a>{22676./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n"2677./a>                .a href="+code=__builtin_return_address" class="sref">__builtin_return_address./a>(0), .a href="+code=ptr" class="sref">ptr./a>, .a href="+code=size" class="sref">size./a>);22678./a>        .a href="+code=BUG" class="sref">BUG./a>();22679./a>}22680./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=__bad_xchg" class="sref">__bad_xchg./a>);22681./a>22682./a>.spa  class="comment">/*./spa v22683./a>.spa  class="comment"> * A data abort trap was taken, but we did not handle the instruc>
  ../spa v22684./a>.spa  class="comment"> * Try to abort the user program, or pa ic if it was the kernel../spa v22685./a>.spa  class="comment"> */./spa v22686./a>.a href="+code=asmlinkage" class="sref">asmlinkage./a> void22687./a>.a href="+code=baddataabort" class="sref">baddataabort./a>(int .a href="+code=code" class="sref">code./a>, unsigned long .a href="+code=instr" class="sref">instr./a>, struct .a href="+code=pt_regs" class="sref">pt_regs./a> *.a href="+code=regs" class="sref">regs./a>)22688./a>{22689./a>        unsigned long .a href="+code=addr" class="sref">addr./a> = .a href="+code=instruc>
  _pointer" class="sref">instruc>
  _pointer./a>(.a href="+code=regs" class="sref">regs./a>);22690./a>        .a href="+code=siginfo_t" class="sref">siginfo_t./a> .a href="+code=info" class="sref">info./a>;22691./a>22692./a>#ifdef .a href="+code=CONFIG_DEBUG_USER" class="sref">CONFIG_DEBUG_USER./a>22693./a>        if (.a href="+code=user_debug" class="sref">user_debug./a> & .a href="+code=UDBG_BADABORT" class="sref">UDBG_BADABORT./a>) {22694./a>                .a href="+code=printk" class="sref">printk./a>(.a href="+code=KERN_ERR" class="sref">KERN_ERR./a> .spa  class="string">"[%d] %s: bad data abort: code %d instr 0x%08lx\n"2695./a>                        .a href="+code=task_pid_nr" class="sref">task_pid_nr./a>(.a href="+code=current" class="sref">current./a>), .a href="+code=current" class="sref">current./a>->.a href="+code=comm" class="sref">comm./a>, .a href="+code=code" class="sref">code./a>, .a href="+code=instr" class="sref">instr./a>);22696./a>                .a href="+code=dump_instr" class="sref">dump_instr./a>(.a href="+code=KERN_ERR" class="sref">KERN_ERR./a>, .a href="+code=regs" class="sref">regs./a>);22697./a>                .a href="+code=show_pte" class="sref">show_pte./a>(.a href="+code=current" class="sref">current./a>->.a href="+code=mm" class="sref">mm./a>, .a href="+code=addr" class="sref">addr./a>);22698./a>        }22699./a>#endif22700./a>22701./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_signo" class="sref">si_signo./a> = .a href="+code=SIGILL" class="sref">SIGILL./a>;22702./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_errno" class="sref">si_errno./a> = 0;22703./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_code" class="sref">si_code./a>  = .a href="+code=ILL_ILLOPC" class="sref">ILL_ILLOPC./a>;22704./a>        .a href="+code=info" class="sref">info./a>..a href="+code=si_addr" class="sref">si_addr./a>  = (void .a href="+code=__user" class="sref">__user./a> *).a href="+code=addr" class="sref">addr./a>;22705./a>22706./a>        .a href="+code=arm_notify_die" class="sref">arm_notify_die./a>(.spa  class="string">"unknown data abort code"regs./a>, &.a href="+code=info" class="sref">info./a>, .a href="+code=instr" class="sref">instr./a>, 0);22707./a>}22708./a>22709./a>void .a href="+code=__attribute__" class="sref">__attribute__./a>((.a href="+code= oreturn" class="sref"> oreturn./a>)) .a href="+code=__bug" class="sref">__bug./a>(const char *.a href="+code=file" class="sref">file./a>, int .a href="+code=line" class="sref">line./a>)22710./a>{22711./a>        .a href="+code=printk" class="sref">printk./a>(.a href="+code=KERN_CRIT" class="sref">KERN_CRIT./a>.spa  class="string">"kernel BUG at %s:%d!\n"file./a>, .a href="+code=line" class="sref">line./a>);22712./a>        *(int *)0 = 0;22713./a>22714./a>        .spa  class="comment">/* Avoid " oreturn func>
   does return" */./spa v22715./a>        for (;;);22716./a>}22717./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=__bug" class="sref">__bug./a>);22718./a>22719./a>void .a href="+code=__readwrite_bug" class="sref">__readwrite_bug./a>(const char *.a href="+code=fn" class="sref">fn./a>)22720./a>{22721./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"%s called, but not implemented\n"fn./a>);22722./a>        .a href="+code=BUG" class="sref">BUG./a>();22723./a>}22724./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=__readwrite_bug" class="sref">__readwrite_bug./a>);22725./a>22726./a>void .a href="+code=__pte_error" class="sref">__pte_error./a>(const char *.a href="+code=file" class="sref">file./a>, int .a href="+code=line" class="sref">line./a>, .a href="+code=pte_t" class="sref">pte_t./a> .a href="+code=pte" class="sref">pte./a>)22727./a>{22728./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"%s:%d: bad pte %08llx.\n"file./a>, .a href="+code=line" class="sref">line./a>, (long long).a href="+code=pte_val" class="sref">pte_val./a>(.a href="+code=pte" class="sref">pte./a>));22729./a>}22730./a>22731./a>void .a href="+code=__pmd_error" class="sref">__pmd_error./a>(const char *.a href="+code=file" class="sref">file./a>, int .a href="+code=line" class="sref">line./a>, .a href="+code=pmd_t" class="sref">pmd_t./a> .a href="+code=pmd" class="sref">pmd./a>)22732./a>{22733./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"%s:%d: bad pmd %08llx.\n"file./a>, .a href="+code=line" class="sref">line./a>, (long long).a href="+code=pmd_val" class="sref">pmd_val./a>(.a href="+code=pmd" class="sref">pmd./a>));22734./a>}22735./a>22736./a>void .a href="+code=__pgd_error" class="sref">__pgd_error./a>(const char *.a href="+code=file" class="sref">file./a>, int .a href="+code=line" class="sref">line./a>, .a href="+code=pgd_t" class="sref">pgd_t./a> .a href="+code=pgd" class="sref">pgd./a>)22737./a>{22738./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"%s:%d: bad pgd %08llx.\n"file./a>, .a href="+code=line" class="sref">line./a>, (long long).a href="+code=pgd_val" class="sref">pgd_val./a>(.a href="+code=pgd" class="sref">pgd./a>));22739./a>}22740./a>22741./a>.a href="+code=asmlinkage" class="sref">asmlinkage./a> void .a href="+code=__div0" class="sref">__div0./a>(void)22742./a>{22743./a>        .a href="+code=printk" class="sref">printk./a>(.spa  class="string">"Divis
   by zero in kernel.\n"2744./a>        .a href="+code=dump_stack" class="sref">dump_stack./a>();22745./a>}22746./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=__div0" class="sref">__div0./a>);22747./a>22748./a>void .a href="+code=abort" class="sref">abort./a>(void)22749./a>{22750./a>        .a href="+code=BUG" class="sref">BUG./a>();22751./a>22752./a>        .spa  class="comment">/* if that doesn't kill us, halt */./spa v22753./a>        .a href="+code=pa ic" class="sref">pa ic./a>(.spa  class="string">"Oops failed to kill thread"2754./a>}22755./a>.a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL./a>(.a href="+code=abort" class="sref">abort./a>);22756./a>22757./a>void .a href="+code=__init" class="sref">__init./a> .a href="+code=trap_init" class="sref">trap_init./a>(void)22758./a>{22759./a>        return;22760./a>}22761./a>22762./a>static void .a href="+code=__init" class="sref">__init./a> .a href="+code=kuser_get_tls_init" class="sref">kuser_get_tls_init./a>(unsigned long .a href="+code=vectors" class="sref">vectors./a>)22763./a>{22764./a>        .spa  class="comment">/*./spa v22765./a>.spa  class="comment">         * vectors + 0xfe0 = __kuser_get_tls./spa v22766./a>.spa  class="comment">         * vectors + 0xfe8 = hardware TLS instruc>
   at 0xffff0fe8./spa v22767./a>.spa  class="comment">         */./spa v22768./a>        if (.a href="+code=tls_emu" class="sref">tls_emu./a> || .a href="+code=has_tls_reg" class="sref">has_tls_reg./a>)22769./a>                .a href="+code=memcpy" class="sref">memcpy./a>((void *).a href="+code=vectors" class="sref">vectors./a> + 0xfe0, (void *).a href="+code=vectors" class="sref">vectors./a> + 0xfe8, 4);22770./a>}22771./a>22772./a>void .a href="+code=__init" class="sref">__init./a> .a href="+code=early_trap_init" class="sref">early_trap_init./a>(void)22773./a>{22774./a>#if .a href="+code=defined" class="sref">defined./a>(.a href="+code=CONFIG_CPU_USE_DOMAINS" class="sref">CONFIG_CPU_USE_DOMAINS./a>)22775./a>        unsigned long .a href="+code=vectors" class="sref">vectors./a> = .a href="+code=CONFIG_VECTORS_BASE" class="sref">CONFIG_VECTORS_BASE./a>;22776./a>#else22777./a>        unsigned long .a href="+code=vectors" class="sref">vectors./a> = (unsigned long).a href="+code=vectors_page" class="sref">vectors_page./a>;22778./a>#endif22779./a>        extern char .a href="+code=__stubs_start" class="sref">__stubs_start./a>[], .a href="+code=__stubs_end" class="sref">__stubs_end./a>[];22780./a>        extern char .a href="+code=__vectors_start" class="sref">__vectors_start./a>[], .a href="+code=__vectors_end" class="sref">__vectors_end./a>[];22781./a>        extern char .a href="+code=__kuser_helper_start" class="sref">__kuser_helper_start./a>[], .a href="+code=__kuser_helper_end" class="sref">__kuser_helper_end./a>[];22782./a>        int .a href="+code=kuser_sz" class="sref">kuser_sz./a> = .a href="+code=__kuser_helper_end" class="sref">__kuser_helper_end./a> - .a href="+code=__kuser_helper_start" class="sref">__kuser_helper_start./a>;22783./a>22784./a>        .spa  class="comment">/*./spa v22785./a>.spa  class="comment">         * Copy the vectors, stubs and kuser helpers (in entry-armv.S)./spa v22786./a>.spa  class="comment">         * into the vector page, mapped at 0xffff0000, and ensure these./spa v22787./a>.spa  class="comment">         * are vis
ble to the instruc>
   stream../spa v22788./a>.spa  class="comment">         */./spa v22789./a>        .a href="+code=memcpy" class="sref">memcpy./a>((void *).a href="+code=vectors" class="sref">vectors./a>, .a href="+code=__vectors_start" class="sref">__vectors_start./a>, .a href="+code=__vectors_end" class="sref">__vectors_end./a> - .a href="+code=__vectors_start" class="sref">__vectors_start./a>);22790./a>        .a href="+code=memcpy" class="sref">memcpy./a>((void *).a href="+code=vectors" class="sref">vectors./a> + 0x200, .a href="+code=__stubs_start" class="sref">__stubs_start./a>, .a href="+code=__stubs_end" class="sref">__stubs_end./a> - .a href="+code=__stubs_start" class="sref">__stubs_start./a>);22791./a>        .a href="+code=memcpy" class="sref">memcpy./a>((void *).a href="+code=vectors" class="sref">vectors./a> + 0x1000 - .a href="+code=kuser_sz" class="sref">kuser_sz./a>, .a href="+code=__kuser_helper_start" class="sref">__kuser_helper_start./a>, .a href="+code=kuser_sz" class="sref">kuser_sz./a>);22792./a>22793./a>        .spa  class="comment">/*./spa v22794./a>.spa  class="comment">         * Do processor specific fixups for the kuser helpers./spa v22795./a>.spa  class="comment">         */./spa v22796./a>        .a href="+code=kuser_get_tls_init" class="sref">kuser_get_tls_init./a>(.a href="+code=vectors" class="sref">vectors./a>);22797./a>22798./a>        .spa  class="comment">/*./spa v22799./a>.spa  class="comment">         * Copy signal return handlers into the vector page, and./spa v22800./a>.spa  class="comment">         * set sigreturn to be a pointer to these../spa v22801./a>.spa  class="comment">         */./spa v22802./a>        .a href="+code=memcpy" class="sref">memcpy./a>((void *)(.a href="+code=vectors" class="sref">vectors./a> + .a href="+code=KERN_SIGRETURN_CODE" class="sref">KERN_SIGRETURN_CODE./a> - .a href="+code=CONFIG_VECTORS_BASE" class="sref">CONFIG_VECTORS_BASE./a>),22803./a>               .a href="+code=sigreturn_codes" class="sref">sigreturn_codes./a>, sizeof(.a href="+code=sigreturn_codes" class="sref">sigreturn_codes./a>));22804./a>        .a href="+code=memcpy" class="sref">memcpy./a>((void *)(.a href="+code=vectors" class="sref">vectors./a> + .a href="+code=KERN_RESTART_CODE" class="sref">KERN_RESTART_CODE./a> - .a href="+code=CONFIG_VECTORS_BASE" class="sref">CONFIG_VECTORS_BASE./a>),22805./a>               .a href="+code=syscall_restart_code" class="sref">syscall_restart_code./a>, sizeof(.a href="+code=syscall_restart_code" class="sref">syscall_restart_code./a>));22806./a>22807./a>        .a href="+code=flush_icache_range" class="sref">flush_icache_range./a>(.a href="+code=vectors" class="sref">vectors./a>, .a href="+code=vectors" class="sref">vectors./a> + .a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE./a>);22808./a>        .a href="+code=modify_domain" class="sref">modify_domain./a>(.a href="+code=DOMAIN_USER" class="sref">DOMAIN_USER./a>, .a href="+code=DOMAIN_CLIENT" class="sref">DOMAIN_CLIENT./a>);22809./a>}22810./a>
lxr.linux.no kindly hosted by Redpill Linpro AS./a>, provider of Linux consulting and opera> s services since 1995.