linux/drivers/edac/edac_stub.c
<<
tion1" /spav3. 1" /form3. 1" a tion1" href="../linux+v3.7.2/drivers/edac/edac_stub.c">tion1" img src="../.static/gfx/right.png" alt=">>">ti /spav3.ti spav class="lxr_search">tiontion1" input typ4.1hidden" nam4.1navtarget" v3.14.1">tion1" input typ4.1text" nam4.1search" id.1search">tion1" butt typ4.1submit">Searchtion1"Prefs. 1" /a>ti /spav3.on1" " /div3.on1" " form ace="v="ajax+*" method="post" onsubmit="return false;">ti input typ4.1hidden" nam4.1ajax_lookup" id.1ajax_lookup" v3.14.1">ton1" " /form3.ton1" " div class="headingbott m">. div id.1file_contents"3
" "1
/a>
spav class="comment">/*
/spav3." "2
/a>
spav class="comment"> * comm
  EDAC components that must be in kernel
/spav3." "3
/a>
spav class="comment"> *
/spav3." "4
/a>
spav class="comment"> * Author: Dave Jiang <djiang@mvista.com>
/spav3." "5
/a>
spav class="comment"> *
/spav3." "6
/a>
spav class="comment"> * 2007 (c) MontaVista Software, Inc.
/spav3." "7
/a>
spav class="comment"> * 2010 (c) Advanced Micro Devices Inc.
/spav3." "8
/a>
spav class="comment"> *          Borislav Petkov <bp@alien8.de>
/spav3." "9
/a>
spav class="comment"> *
/spav3." "v3.a>
spav class="comment"> * This file is licensed under the terms of the GNU General Public
/spav3." 11
/a>
spav class="comment"> * License vers>
  2. This program is licensed "as is" without any
/spav3." 12
/a>
spav class="comment"> * warranty of any kind, whether express or implied.
/spav3." 13
/a>
spav class="comment"> *
/spav3." 14
/a>
spav class="comment"> */
/spav3." 15
/a>#include <linux/module.h
/a>>." 16
/a>#include <linux/edac.h
/a>>." 17
/a>#include <linux/at
mic.h
/a>>." 18
/a>#include <linux/device.h
/a>>." 19
/a>#include <asm/edac.h
/a>>." 2v3.a>." 21
/a>int"
a href="+code=edac_op_state" class="sref">edac_op_state
/a> ="
a href="+code=EDAC_OPSTATE_INVAL" class="sref">EDAC_OPSTATE_INVAL
/a>;." 22
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_op_state" class="sref">edac_op_state
/a>);." 233.a>." 24
/a>
a href="+code=at
mic_t" class="sref">at
mic_t
/a> 
a href="+code=edac_handlers" class="sref">edac_handlers
/a> ="
a href="+code=ATOMIC_INIT" class="sref">ATOMIC_INIT
/a>(0);." 25
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_handlers" class="sref">edac_handlers
/a>);." 263.a>." 27
/a>int"
a href="+code=edac_err_assert" class="sref">edac_err_assert
/a> ="0;." 28
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_err_assert" class="sref">edac_err_assert
/a>);." 293.a>." 3v3.a>static"
a href="+code=at
mic_t" class="sref">at
mic_t
/a> 
a href="+code=edac_subsys_valid" class="sref">edac_subsys_valid
/a> ="
a href="+code=ATOMIC_INIT" class="sref">ATOMIC_INIT
/a>(0);." 313.a>." 32
/a>
spav class="comment">/*
/spav3." 33
/a>
spav class="comment"> * called to determine if there is a  EDAC driver interested in
/spav3." 34
/a>
spav class="comment"> * knowing a  event (such as NMI) occurred
/spav3." 35
/a>
spav class="comment"> */
/spav3." 36
/a>int"
a href="+code=edac_handler_set" class="sref">edac_handler_set
/a>(void)." 37
/a>{." 38
/a>        if (
a href="+code=edac_op_state" class="sref">edac_op_state
/a> =="
a href="+code=EDAC_OPSTATE_POLL" class="sref">EDAC_OPSTATE_POLL
/a>)." 39
/a>                return 0;." 4v3.a>." 41
/a>        return 
a href="+code=at
mic_read" class="sref">at
mic_read
/a>(&
a href="+code=edac_handlers" class="sref">edac_handlers
/a>);." 42
/a>}." 43
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_handler_set" class="sref">edac_handler_set
/a>);." 443.a>." 45
/a>
spav class="comment">/*
/spav3." 46
/a>
spav class="comment"> * handler for NMI typ4 of interrupts to assert error
/spav3." 47
/a>
spav class="comment"> */
/spav3." 48
/a>void"
a href="+code=edac_at
mic_assert_error" class="sref">edac_at
mic_assert_error
/a>(void)." 49
/a>{." 50
/a>        
a href="+code=edac_err_assert" class="sref">edac_err_assert
/a>++;." 51
/a>}." 52
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_at
mic_assert_error" class="sref">edac_at
mic_assert_error
/a>);." 533.a>." 54
/a>
spav class="comment">/*
/spav3." 55
/a>
spav class="comment"> * sysfs object: /sys/devices/system/edac
/spav3." 56
/a>
spav class="comment"> *      need to export to other files
/spav3." 57
/a>
spav class="comment"> */
/spav3." 583.a>struct"
a href="+code=bus_typ4" class="sref">bus_typ4
/a> 
a href="+code=edac_subsys" class="sref">edac_subsys
/a> ="{." 59
/a>        .
a href="+code=nam4" class="sref">nam4
/a> ="
spav class="string">"edac"
/spav3,." 60
/a>        .
a href="+code=dev_nam4" class="sref">dev_nam4
/a> ="
spav class="string">"edac"
/spav3,." 61
/a>};." 62
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_subsys" class="sref">edac_subsys
/a>);." 633.a>." 64
/a>
spav class="comment">/* return pointer to the 'edac' node in sysfs */
/spav3." 653.a>struct"
a href="+code=bus_typ4" class="sref">bus_typ4
/a> *
a href="+code=edac_get_sysfs_subsys" class="sref">edac_get_sysfs_subsys
/a>(void)." 66
/a>{." 67
/a>        int"
a href="+code=err" class="sref">err
/a> ="0;." 683.a>." 69
/a>        if (
a href="+code=at
mic_read" class="sref">at
mic_read
/a>(&
a href="+code=edac_subsys_valid" class="sref">edac_subsys_valid
/a>))." 70
/a>                goto 
a href="+code=out" class="sref">out
/a>;." 713.a>." 72
/a>        
spav class="comment">/* create the /sys/devices/system/edac directory */
/spav3." 73
/a>        
a href="+code=err" class="sref">err
/a> ="
a href="+code=subsys_system_register" class="sref">subsys_system_register
/a>(&
a href="+code=edac_subsys" class="sref">edac_subsys
/a>,"
a href="+code=NULL" class="sref">NULL
/a>);." 74
/a>        if (
a href="+code=err" class="sref">err
/a>)"{." 75
/a>                
a href="+code=printk" class="sref">printk
/a>(
a href="+code=KERN_ERR" class="sref">KERN_ERR
/a> 
spav class="string">"Error registering toplevel EDAC sysfs dir\n"
/spav3);." 76
/a>                return 
a href="+code=NULL" class="sref">NULL
/a>;." 77
/a>        }." 783.a>." 79
/a>
a href="+code=out" class="sref">out
/a>:." 80
/a>        
a href="+code=at
mic_inc" class="sref">at
mic_inc
/a>(&
a href="+code=edac_subsys_valid" class="sref">edac_subsys_valid
/a>);." 81
/a>        return &
a href="+code=edac_subsys" class="sref">edac_subsys
/a>;." 82
/a>}." 83
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_get_sysfs_subsys" class="sref">edac_get_sysfs_subsys
/a>);." 843.a>." 85
/a>void"
a href="+code=edac_put_sysfs_subsys" class="sref">edac_put_sysfs_subsys
/a>(void)." 86
/a>{." 87
/a>        
spav class="comment">/* last user unregisters it */
/spav3." 88
/a>        if (
a href="+code=at
mic_dec_and_test" class="sref">at
mic_dec_and_test
/a>(&
a href="+code=edac_subsys_valid" class="sref">edac_subsys_valid
/a>))." 89
/a>                
a href="+code=bus_unregister" class="sref">bus_unregister
/a>(&
a href="+code=edac_subsys" class="sref">edac_subsys
/a>);." 90
/a>}." 91
/a>
a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL
/a>(
a href="+code=edac_put_sysfs_subsys" class="sref">edac_put_sysfs_subsys
/a>);." 92
/a>
/pre>
The original LXR software by the LXR community
/a>,"this experimental vers>
  by lxr@linux.no
/a>.

/div3.
div class="subfooter">
lxr.linux.no kindly hosted by Redpill Linpro AS
/a>,"provider of Linux consulting a d operae="vs services since 1995.

/div3.

/body3.
/html3.