Bug
        
                          [В начало]
Ошибка # 87
Показать/спрятать трассу ошибок|            Error trace     
         {    20     typedef unsigned char __u8;    23     typedef unsigned short __u16;    25     typedef int __s32;    26     typedef unsigned int __u32;    30     typedef unsigned long long __u64;    15     typedef signed char s8;    16     typedef unsigned char u8;    19     typedef unsigned short u16;    21     typedef int s32;    22     typedef unsigned int u32;    24     typedef long long s64;    25     typedef unsigned long long u64;    14     typedef long __kernel_long_t;    15     typedef unsigned long __kernel_ulong_t;    27     typedef int __kernel_pid_t;    48     typedef unsigned int __kernel_uid32_t;    49     typedef unsigned int __kernel_gid32_t;    71     typedef __kernel_ulong_t __kernel_size_t;    72     typedef __kernel_long_t __kernel_ssize_t;    87     typedef long long __kernel_loff_t;    88     typedef __kernel_long_t __kernel_time_t;    89     typedef __kernel_long_t __kernel_clock_t;    90     typedef int __kernel_timer_t;    91     typedef int __kernel_clockid_t;    12     typedef __u32 __kernel_dev_t;    15     typedef __kernel_dev_t dev_t;    18     typedef unsigned short umode_t;    21     typedef __kernel_pid_t pid_t;    26     typedef __kernel_clockid_t clockid_t;    29     typedef _Bool bool;    31     typedef __kernel_uid32_t uid_t;    32     typedef __kernel_gid32_t gid_t;    45     typedef __kernel_loff_t loff_t;    54     typedef __kernel_size_t size_t;    59     typedef __kernel_ssize_t ssize_t;    69     typedef __kernel_time_t time_t;    83     typedef unsigned char u_char;    86     typedef unsigned long u_long;   102     typedef __s32 int32_t;   106     typedef __u8 uint8_t;   108     typedef __u32 uint32_t;   111     typedef __u64 uint64_t;   157     typedef unsigned int gfp_t;   159     typedef unsigned int oom_flags_t;   162     typedef u64 phys_addr_t;   167     typedef phys_addr_t resource_size_t;   177     struct __anonstruct_atomic_t_6 {   int counter; } ;   177     typedef struct __anonstruct_atomic_t_6 atomic_t;   182     struct __anonstruct_atomic64_t_7 {   long counter; } ;   182     typedef struct __anonstruct_atomic64_t_7 atomic64_t;   183     struct list_head {   struct list_head *next;   struct list_head *prev; } ;   188     struct hlist_node ;   188     struct hlist_head {   struct hlist_node *first; } ;   192     struct hlist_node {   struct hlist_node *next;   struct hlist_node **pprev; } ;   203     struct callback_head {   struct callback_head *next;   void (*func)(struct callback_head *); } ;    39     struct page ;    31     struct kernel_symbol {   unsigned long value;   const char *name; } ;    33     struct module ;   247     struct pt_regs {   unsigned long r15;   unsigned long r14;   unsigned long r13;   unsigned long r12;   unsigned long bp;   unsigned long bx;   unsigned long r11;   unsigned long r10;   unsigned long r9;   unsigned long r8;   unsigned long ax;   unsigned long cx;   unsigned long dx;   unsigned long si;   unsigned long di;   unsigned long orig_ax;   unsigned long ip;   unsigned long cs;   unsigned long flags;   unsigned long sp;   unsigned long ss; } ;    66     struct __anonstruct____missing_field_name_9 {   unsigned int a;   unsigned int b; } ;    66     struct __anonstruct____missing_field_name_10 {   u16 limit0;   u16 base0;   unsigned char base1;   unsigned char type;   unsigned char s;   unsigned char dpl;   unsigned char p;   unsigned char limit;   unsigned char avl;   unsigned char l;   unsigned char d;   unsigned char g;   unsigned char base2; } ;    66     union __anonunion____missing_field_name_8 {   struct __anonstruct____missing_field_name_9 __annonCompField4;   struct __anonstruct____missing_field_name_10 __annonCompField5; } ;    66     struct desc_struct {   union __anonunion____missing_field_name_8 __annonCompField6; } ;    15     typedef unsigned long pgdval_t;    16     typedef unsigned long pgprotval_t;    20     struct pgprot {   pgprotval_t pgprot; } ;   218     typedef struct pgprot pgprot_t;   220     struct __anonstruct_pgd_t_12 {   pgdval_t pgd; } ;   220     typedef struct __anonstruct_pgd_t_12 pgd_t;   361     typedef struct page *pgtable_t;   372     struct file ;   385     struct seq_file ;   423     struct thread_struct ;   425     struct mm_struct ;   426     struct task_struct ;   427     struct cpumask ;    20     struct qspinlock {   atomic_t val; } ;    33     typedef struct qspinlock arch_spinlock_t;   131     typedef void (*ctor_fn_t)();    48     struct device ;   432     struct completion ;   689     struct bug_entry {   int bug_addr_disp;   int file_disp;   unsigned short line;   unsigned short flags; } ;   328     struct cpumask {   unsigned long bits[128U]; } ;    15     typedef struct cpumask cpumask_t;   652     typedef struct cpumask *cpumask_var_t;   127     struct kernel_vm86_regs {   struct pt_regs pt;   unsigned short es;   unsigned short __esh;   unsigned short ds;   unsigned short __dsh;   unsigned short fs;   unsigned short __fsh;   unsigned short gs;   unsigned short __gsh; } ;    79     union __anonunion____missing_field_name_37 {   struct pt_regs *regs;   struct kernel_vm86_regs *vm86; } ;    79     struct math_emu_info {   long ___orig_eip;   union __anonunion____missing_field_name_37 __annonCompField17; } ;   260     struct fregs_state {   u32 cwd;   u32 swd;   u32 twd;   u32 fip;   u32 fcs;   u32 foo;   u32 fos;   u32 st_space[20U];   u32 status; } ;    26     struct __anonstruct____missing_field_name_47 {   u64 rip;   u64 rdp; } ;    26     struct __anonstruct____missing_field_name_48 {   u32 fip;   u32 fcs;   u32 foo;   u32 fos; } ;    26     union __anonunion____missing_field_name_46 {   struct __anonstruct____missing_field_name_47 __annonCompField21;   struct __anonstruct____missing_field_name_48 __annonCompField22; } ;    26     union __anonunion____missing_field_name_49 {   u32 padding1[12U];   u32 sw_reserved[12U]; } ;    26     struct fxregs_state {   u16 cwd;   u16 swd;   u16 twd;   u16 fop;   union __anonunion____missing_field_name_46 __annonCompField23;   u32 mxcsr;   u32 mxcsr_mask;   u32 st_space[32U];   u32 xmm_space[64U];   u32 padding[12U];   union __anonunion____missing_field_name_49 __annonCompField24; } ;    66     struct swregs_state {   u32 cwd;   u32 swd;   u32 twd;   u32 fip;   u32 fcs;   u32 foo;   u32 fos;   u32 st_space[20U];   u8 ftop;   u8 changed;   u8 lookahead;   u8 no_update;   u8 rm;   u8 alimit;   struct math_emu_info *info;   u32 entry_eip; } ;   155     struct xstate_header {   u64 xfeatures;   u64 xcomp_bv;   u64 reserved[6U]; } ;   161     struct xregs_state {   struct fxregs_state i387;   struct xstate_header header;   u8 __reserved[464U]; } ;   179     union fpregs_state {   struct fregs_state fsave;   struct fxregs_state fxsave;   struct swregs_state soft;   struct xregs_state xsave; } ;   193     struct fpu {   union fpregs_state state;   unsigned int last_cpu;   unsigned char fpstate_active;   unsigned char fpregs_active;   unsigned char counter; } ;   170     struct seq_operations ;   369     struct perf_event ;   370     struct thread_struct {   struct desc_struct tls_array[3U];   unsigned long sp0;   unsigned long sp;   unsigned short es;   unsigned short ds;   unsigned short fsindex;   unsigned short gsindex;   unsigned long fs;   unsigned long gs;   struct fpu fpu;   struct perf_event *ptrace_bps[4U];   unsigned long debugreg6;   unsigned long ptrace_dr7;   unsigned long cr2;   unsigned long trap_nr;   unsigned long error_code;   unsigned long *io_bitmap_ptr;   unsigned long iopl;   unsigned int io_bitmap_max; } ;    38     typedef int Set;   135     struct timespec ;   136     struct compat_timespec ;   137     struct __anonstruct_futex_53 {   u32 *uaddr;   u32 val;   u32 flags;   u32 bitset;   u64 time;   u32 *uaddr2; } ;   137     struct __anonstruct_nanosleep_54 {   clockid_t clockid;   struct timespec *rmtp;   struct compat_timespec *compat_rmtp;   u64 expires; } ;   137     struct pollfd ;   137     struct __anonstruct_poll_55 {   struct pollfd *ufds;   int nfds;   int has_timeout;   unsigned long tv_sec;   unsigned long tv_nsec; } ;   137     union __anonunion____missing_field_name_52 {   struct __anonstruct_futex_53 futex;   struct __anonstruct_nanosleep_54 nanosleep;   struct __anonstruct_poll_55 poll; } ;   137     struct restart_block {   long int (*fn)(struct restart_block *);   union __anonunion____missing_field_name_52 __annonCompField26; } ;    23     typedef atomic64_t atomic_long_t;    33     struct lockdep_map ;    55     struct stack_trace {   unsigned int nr_entries;   unsigned int max_entries;   unsigned long *entries;   int skip; } ;    28     struct lockdep_subclass_key {   char __one_byte; } ;    53     struct lock_class_key {   struct lockdep_subclass_key subkeys[8U]; } ;    59     struct lock_class {   struct list_head hash_entry;   struct list_head lock_entry;   struct lockdep_subclass_key *key;   unsigned int subclass;   unsigned int dep_gen_id;   unsigned long usage_mask;   struct stack_trace usage_traces[13U];   struct list_head locks_after;   struct list_head locks_before;   unsigned int version;   unsigned long ops;   const char *name;   int name_version;   unsigned long contention_point[4U];   unsigned long contending_point[4U]; } ;   144     struct lockdep_map {   struct lock_class_key *key;   struct lock_class *class_cache[2U];   const char *name;   int cpu;   unsigned long ip; } ;   205     struct held_lock {   u64 prev_chain_key;   unsigned long acquire_ip;   struct lockdep_map *instance;   struct lockdep_map *nest_lock;   u64 waittime_stamp;   u64 holdtime_stamp;   unsigned short class_idx;   unsigned char irq_context;   unsigned char trylock;   unsigned char read;   unsigned char check;   unsigned char hardirqs_off;   unsigned short references;   unsigned int pin_count; } ;   546     struct raw_spinlock {   arch_spinlock_t raw_lock;   unsigned int magic;   unsigned int owner_cpu;   void *owner;   struct lockdep_map dep_map; } ;    32     typedef struct raw_spinlock raw_spinlock_t;    33     struct __anonstruct____missing_field_name_57 {   u8 __padding[24U];   struct lockdep_map dep_map; } ;    33     union __anonunion____missing_field_name_56 {   struct raw_spinlock rlock;   struct __anonstruct____missing_field_name_57 __annonCompField27; } ;    33     struct spinlock {   union __anonunion____missing_field_name_56 __annonCompField28; } ;    76     typedef struct spinlock spinlock_t;   426     struct seqcount {   unsigned int sequence;   struct lockdep_map dep_map; } ;    52     typedef struct seqcount seqcount_t;   404     struct __anonstruct_seqlock_t_67 {   struct seqcount seqcount;   spinlock_t lock; } ;   404     typedef struct __anonstruct_seqlock_t_67 seqlock_t;   598     struct timespec {   __kernel_time_t tv_sec;   long tv_nsec; } ;    83     struct user_namespace ;    22     struct __anonstruct_kuid_t_68 {   uid_t val; } ;    22     typedef struct __anonstruct_kuid_t_68 kuid_t;    27     struct __anonstruct_kgid_t_69 {   gid_t val; } ;    27     typedef struct __anonstruct_kgid_t_69 kgid_t;    36     struct vm_area_struct ;    38     struct __wait_queue_head {   spinlock_t lock;   struct list_head task_list; } ;    43     typedef struct __wait_queue_head wait_queue_head_t;    95     struct __anonstruct_nodemask_t_70 {   unsigned long bits[16U]; } ;    95     typedef struct __anonstruct_nodemask_t_70 nodemask_t;    13     struct optimistic_spin_queue {   atomic_t tail; } ;    39     struct mutex {   atomic_t count;   spinlock_t wait_lock;   struct list_head wait_list;   struct task_struct *owner;   void *magic;   struct lockdep_map dep_map; } ;    67     struct mutex_waiter {   struct list_head list;   struct task_struct *task;   void *magic; } ;   177     struct rw_semaphore ;   178     struct rw_semaphore {   long count;   struct list_head wait_list;   raw_spinlock_t wait_lock;   struct optimistic_spin_queue osq;   struct task_struct *owner;   struct lockdep_map dep_map; } ;   172     struct completion {   unsigned int done;   wait_queue_head_t wait; } ;   437     union ktime {   s64 tv64; } ;    41     typedef union ktime ktime_t;   296     struct notifier_block ;  1121     struct timer_list {   struct hlist_node entry;   unsigned long expires;   void (*function)(unsigned long);   unsigned long data;   u32 flags;   int slack;   int start_pid;   void *start_site;   char start_comm[16U];   struct lockdep_map lockdep_map; } ;   238     struct hrtimer ;   239     enum hrtimer_restart ;   240     struct rb_node {   unsigned long __rb_parent_color;   struct rb_node *rb_right;   struct rb_node *rb_left; } ;    41     struct rb_root {   struct rb_node *rb_node; } ;   838     struct nsproxy ;   259     struct workqueue_struct ;   260     struct work_struct ;    54     struct work_struct {   atomic_long_t data;   struct list_head entry;   void (*func)(struct work_struct *);   struct lockdep_map lockdep_map; } ;   107     struct delayed_work {   struct work_struct work;   struct timer_list timer;   struct workqueue_struct *wq;   int cpu; } ;    51     struct notifier_block {   int (*notifier_call)(struct notifier_block *, unsigned long, void *);   struct notifier_block *next;   int priority; } ;    58     struct pm_message {   int event; } ;    64     typedef struct pm_message pm_message_t;    65     struct dev_pm_ops {   int (*prepare)(struct device *);   void (*complete)(struct device *);   int (*suspend)(struct device *);   int (*resume)(struct device *);   int (*freeze)(struct device *);   int (*thaw)(struct device *);   int (*poweroff)(struct device *);   int (*restore)(struct device *);   int (*suspend_late)(struct device *);   int (*resume_early)(struct device *);   int (*freeze_late)(struct device *);   int (*thaw_early)(struct device *);   int (*poweroff_late)(struct device *);   int (*restore_early)(struct device *);   int (*suspend_noirq)(struct device *);   int (*resume_noirq)(struct device *);   int (*freeze_noirq)(struct device *);   int (*thaw_noirq)(struct device *);   int (*poweroff_noirq)(struct device *);   int (*restore_noirq)(struct device *);   int (*runtime_suspend)(struct device *);   int (*runtime_resume)(struct device *);   int (*runtime_idle)(struct device *); } ;   320     enum rpm_status {   RPM_ACTIVE = 0,   RPM_RESUMING = 1,   RPM_SUSPENDED = 2,   RPM_SUSPENDING = 3 } ;   327     enum rpm_request {   RPM_REQ_NONE = 0,   RPM_REQ_IDLE = 1,   RPM_REQ_SUSPEND = 2,   RPM_REQ_AUTOSUSPEND = 3,   RPM_REQ_RESUME = 4 } ;   335     struct wakeup_source ;   336     struct wake_irq ;   338     struct pm_subsys_data {   spinlock_t lock;   unsigned int refcount;   struct list_head clock_list; } ;   553     struct dev_pm_qos ;   553     struct dev_pm_info {   pm_message_t power_state;   unsigned char can_wakeup;   unsigned char async_suspend;   bool is_prepared;   bool is_suspended;   bool is_noirq_suspended;   bool is_late_suspended;   bool ignore_children;   bool early_init;   bool direct_complete;   spinlock_t lock;   struct list_head entry;   struct completion completion;   struct wakeup_source *wakeup;   bool wakeup_path;   bool syscore;   struct timer_list suspend_timer;   unsigned long timer_expires;   struct work_struct work;   wait_queue_head_t wait_queue;   struct wake_irq *wakeirq;   atomic_t usage_count;   atomic_t child_count;   unsigned char disable_depth;   unsigned char idle_notification;   unsigned char request_pending;   unsigned char deferred_resume;   unsigned char run_wake;   unsigned char runtime_auto;   unsigned char no_callbacks;   unsigned char irq_safe;   unsigned char use_autosuspend;   unsigned char timer_autosuspends;   unsigned char memalloc_noio;   enum rpm_request request;   enum rpm_status runtime_status;   int runtime_error;   int autosuspend_delay;   unsigned long last_busy;   unsigned long active_jiffies;   unsigned long suspended_jiffies;   unsigned long accounting_timestamp;   struct pm_subsys_data *subsys_data;   void (*set_latency_tolerance)(struct device *, s32 );   struct dev_pm_qos *qos; } ;   615     struct dev_pm_domain {   struct dev_pm_ops ops;   void (*detach)(struct device *, bool );   int (*activate)(struct device *);   void (*sync)(struct device *);   void (*dismiss)(struct device *); } ;    24     struct __anonstruct_mm_context_t_137 {   void *ldt;   int size;   unsigned short ia32_compat;   struct mutex lock;   void *vdso;   atomic_t perf_rdpmc_allowed; } ;    24     typedef struct __anonstruct_mm_context_t_137 mm_context_t;  1281     struct llist_node ;    64     struct llist_node {   struct llist_node *next; } ;    37     struct cred ;    58     struct arch_uprobe_task {   unsigned long saved_scratch_register;   unsigned int saved_trap_nr;   unsigned int saved_tf; } ;    66     enum uprobe_task_state {   UTASK_RUNNING = 0,   UTASK_SSTEP = 1,   UTASK_SSTEP_ACK = 2,   UTASK_SSTEP_TRAPPED = 3 } ;    73     struct __anonstruct____missing_field_name_148 {   struct arch_uprobe_task autask;   unsigned long vaddr; } ;    73     struct __anonstruct____missing_field_name_149 {   struct callback_head dup_xol_work;   unsigned long dup_xol_addr; } ;    73     union __anonunion____missing_field_name_147 {   struct __anonstruct____missing_field_name_148 __annonCompField33;   struct __anonstruct____missing_field_name_149 __annonCompField34; } ;    73     struct uprobe ;    73     struct return_instance ;    73     struct uprobe_task {   enum uprobe_task_state state;   union __anonunion____missing_field_name_147 __annonCompField35;   struct uprobe *active_uprobe;   unsigned long xol_vaddr;   struct return_instance *return_instances;   unsigned int depth; } ;    94     struct xol_area ;    95     struct uprobes_state {   struct xol_area *xol_area; } ;   133     struct address_space ;   134     struct mem_cgroup ;    31     typedef void compound_page_dtor(struct page *);    32     union __anonunion____missing_field_name_150 {   struct address_space *mapping;   void *s_mem; } ;    32     union __anonunion____missing_field_name_152 {   unsigned long index;   void *freelist;   bool pfmemalloc; } ;    32     struct __anonstruct____missing_field_name_156 {   unsigned short inuse;   unsigned short objects;   unsigned char frozen; } ;    32     union __anonunion____missing_field_name_155 {   atomic_t _mapcount;   struct __anonstruct____missing_field_name_156 __annonCompField38;   int units; } ;    32     struct __anonstruct____missing_field_name_154 {   union __anonunion____missing_field_name_155 __annonCompField39;   atomic_t _count; } ;    32     union __anonunion____missing_field_name_153 {   unsigned long counters;   struct __anonstruct____missing_field_name_154 __annonCompField40;   unsigned int active; } ;    32     struct __anonstruct____missing_field_name_151 {   union __anonunion____missing_field_name_152 __annonCompField37;   union __anonunion____missing_field_name_153 __annonCompField41; } ;    32     struct __anonstruct____missing_field_name_158 {   struct page *next;   int pages;   int pobjects; } ;    32     struct slab ;    32     struct __anonstruct____missing_field_name_159 {   compound_page_dtor *compound_dtor;   unsigned long compound_order; } ;    32     union __anonunion____missing_field_name_157 {   struct list_head lru;   struct __anonstruct____missing_field_name_158 __annonCompField43;   struct slab *slab_page;   struct callback_head callback_head;   struct __anonstruct____missing_field_name_159 __annonCompField44;   pgtable_t pmd_huge_pte; } ;    32     struct kmem_cache ;    32     union __anonunion____missing_field_name_160 {   unsigned long private;   spinlock_t *ptl;   struct kmem_cache *slab_cache;   struct page *first_page; } ;    32     struct page {   unsigned long flags;   union __anonunion____missing_field_name_150 __annonCompField36;   struct __anonstruct____missing_field_name_151 __annonCompField42;   union __anonunion____missing_field_name_157 __annonCompField45;   union __anonunion____missing_field_name_160 __annonCompField46;   struct mem_cgroup *mem_cgroup; } ;   181     struct page_frag {   struct page *page;   __u32 offset;   __u32 size; } ;   266     struct __anonstruct_shared_161 {   struct rb_node rb;   unsigned long rb_subtree_last; } ;   266     struct anon_vma ;   266     struct vm_operations_struct ;   266     struct mempolicy ;   266     struct vm_area_struct {   unsigned long vm_start;   unsigned long vm_end;   struct vm_area_struct *vm_next;   struct vm_area_struct *vm_prev;   struct rb_node vm_rb;   unsigned long rb_subtree_gap;   struct mm_struct *vm_mm;   pgprot_t vm_page_prot;   unsigned long vm_flags;   struct __anonstruct_shared_161 shared;   struct list_head anon_vma_chain;   struct anon_vma *anon_vma;   const struct vm_operations_struct *vm_ops;   unsigned long vm_pgoff;   struct file *vm_file;   void *vm_private_data;   struct mempolicy *vm_policy; } ;   334     struct core_thread {   struct task_struct *task;   struct core_thread *next; } ;   340     struct core_state {   atomic_t nr_threads;   struct core_thread dumper;   struct completion startup; } ;   353     struct task_rss_stat {   int events;   int count[3U]; } ;   361     struct mm_rss_stat {   atomic_long_t count[3U]; } ;   366     struct kioctx_table ;   367     struct linux_binfmt ;   367     struct mmu_notifier_mm ;   367     struct mm_struct {   struct vm_area_struct *mmap;   struct rb_root mm_rb;   u32 vmacache_seqnum;   unsigned long int (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);   unsigned long mmap_base;   unsigned long mmap_legacy_base;   unsigned long task_size;   unsigned long highest_vm_end;   pgd_t *pgd;   atomic_t mm_users;   atomic_t mm_count;   atomic_long_t nr_ptes;   atomic_long_t nr_pmds;   int map_count;   spinlock_t page_table_lock;   struct rw_semaphore mmap_sem;   struct list_head mmlist;   unsigned long hiwater_rss;   unsigned long hiwater_vm;   unsigned long total_vm;   unsigned long locked_vm;   unsigned long pinned_vm;   unsigned long shared_vm;   unsigned long exec_vm;   unsigned long stack_vm;   unsigned long def_flags;   unsigned long start_code;   unsigned long end_code;   unsigned long start_data;   unsigned long end_data;   unsigned long start_brk;   unsigned long brk;   unsigned long start_stack;   unsigned long arg_start;   unsigned long arg_end;   unsigned long env_start;   unsigned long env_end;   unsigned long saved_auxv[46U];   struct mm_rss_stat rss_stat;   struct linux_binfmt *binfmt;   cpumask_var_t cpu_vm_mask_var;   mm_context_t context;   unsigned long flags;   struct core_state *core_state;   spinlock_t ioctx_lock;   struct kioctx_table *ioctx_table;   struct task_struct *owner;   struct file *exe_file;   struct mmu_notifier_mm *mmu_notifier_mm;   struct cpumask cpumask_allocation;   unsigned long numa_next_scan;   unsigned long numa_scan_offset;   int numa_scan_seq;   bool tlb_flush_pending;   struct uprobes_state uprobes_state;   void *bd_addr; } ;    15     typedef __u64 Elf64_Addr;    16     typedef __u16 Elf64_Half;    20     typedef __u32 Elf64_Word;    21     typedef __u64 Elf64_Xword;   190     struct elf64_sym {   Elf64_Word st_name;   unsigned char st_info;   unsigned char st_other;   Elf64_Half st_shndx;   Elf64_Addr st_value;   Elf64_Xword st_size; } ;   198     typedef struct elf64_sym Elf64_Sym;    53     union __anonunion____missing_field_name_166 {   unsigned long bitmap[4U];   struct callback_head callback_head; } ;    53     struct idr_layer {   int prefix;   int layer;   struct idr_layer *ary[256U];   int count;   union __anonunion____missing_field_name_166 __annonCompField47; } ;    41     struct idr {   struct idr_layer *hint;   struct idr_layer *top;   int layers;   int cur;   spinlock_t lock;   int id_free_cnt;   struct idr_layer *id_free; } ;   124     struct ida_bitmap {   long nr_busy;   unsigned long bitmap[15U]; } ;   153     struct ida {   struct idr idr;   struct ida_bitmap *free_bitmap; } ;   189     struct kernfs_open_node ;   190     struct kernfs_iattrs ;   213     struct kernfs_root ;   213     struct kernfs_elem_dir {   unsigned long subdirs;   struct rb_root children;   struct kernfs_root *root; } ;    85     struct kernfs_node ;    85     struct kernfs_elem_symlink {   struct kernfs_node *target_kn; } ;    89     struct kernfs_ops ;    89     struct kernfs_elem_attr {   const struct kernfs_ops *ops;   struct kernfs_open_node *open;   loff_t size;   struct kernfs_node *notify_next; } ;    96     union __anonunion____missing_field_name_171 {   struct kernfs_elem_dir dir;   struct kernfs_elem_symlink symlink;   struct kernfs_elem_attr attr; } ;    96     struct kernfs_node {   atomic_t count;   atomic_t active;   struct lockdep_map dep_map;   struct kernfs_node *parent;   const char *name;   struct rb_node rb;   const void *ns;   unsigned int hash;   union __anonunion____missing_field_name_171 __annonCompField48;   void *priv;   unsigned short flags;   umode_t mode;   unsigned int ino;   struct kernfs_iattrs *iattr; } ;   138     struct kernfs_syscall_ops {   int (*remount_fs)(struct kernfs_root *, int *, char *);   int (*show_options)(struct seq_file *, struct kernfs_root *);   int (*mkdir)(struct kernfs_node *, const char *, umode_t );   int (*rmdir)(struct kernfs_node *);   int (*rename)(struct kernfs_node *, struct kernfs_node *, const char *); } ;   155     struct kernfs_root {   struct kernfs_node *kn;   unsigned int flags;   struct ida ino_ida;   struct kernfs_syscall_ops *syscall_ops;   struct list_head supers;   wait_queue_head_t deactivate_waitq; } ;   171     struct kernfs_open_file {   struct kernfs_node *kn;   struct file *file;   void *priv;   struct mutex mutex;   int event;   struct list_head list;   char *prealloc_buf;   size_t atomic_write_len;   bool mmapped;   const struct vm_operations_struct *vm_ops; } ;   188     struct kernfs_ops {   int (*seq_show)(struct seq_file *, void *);   void * (*seq_start)(struct seq_file *, loff_t *);   void * (*seq_next)(struct seq_file *, void *, loff_t *);   void (*seq_stop)(struct seq_file *, void *);   ssize_t  (*read)(struct kernfs_open_file *, char *, size_t , loff_t );   size_t atomic_write_len;   bool prealloc;   ssize_t  (*write)(struct kernfs_open_file *, char *, size_t , loff_t );   int (*mmap)(struct kernfs_open_file *, struct vm_area_struct *);   struct lock_class_key lockdep_key; } ;   477     struct sock ;   478     struct kobject ;   479     enum kobj_ns_type {   KOBJ_NS_TYPE_NONE = 0,   KOBJ_NS_TYPE_NET = 1,   KOBJ_NS_TYPES = 2 } ;   485     struct kobj_ns_type_operations {   enum kobj_ns_type type;   bool  (*current_may_mount)();   void * (*grab_current_ns)();   const void * (*netlink_ns)(struct sock *);   const void * (*initial_ns)();   void (*drop_ns)(void *); } ;    59     struct bin_attribute ;    60     struct attribute {   const char *name;   umode_t mode;   bool ignore_lockdep;   struct lock_class_key *key;   struct lock_class_key skey; } ;    37     struct attribute_group {   const char *name;   umode_t  (*is_visible)(struct kobject *, struct attribute *, int);   struct attribute **attrs;   struct bin_attribute **bin_attrs; } ;    82     struct bin_attribute {   struct attribute attr;   size_t size;   void *private;   ssize_t  (*read)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t , size_t );   ssize_t  (*write)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t , size_t );   int (*mmap)(struct file *, struct kobject *, struct bin_attribute *, struct vm_area_struct *); } ;   155     struct sysfs_ops {   ssize_t  (*show)(struct kobject *, struct attribute *, char *);   ssize_t  (*store)(struct kobject *, struct attribute *, const char *, size_t ); } ;   509     struct kref {   atomic_t refcount; } ;    52     struct kset ;    52     struct kobj_type ;    52     struct kobject {   const char *name;   struct list_head entry;   struct kobject *parent;   struct kset *kset;   struct kobj_type *ktype;   struct kernfs_node *sd;   struct kref kref;   struct delayed_work release;   unsigned char state_initialized;   unsigned char state_in_sysfs;   unsigned char state_add_uevent_sent;   unsigned char state_remove_uevent_sent;   unsigned char uevent_suppress; } ;   114     struct kobj_type {   void (*release)(struct kobject *);   const struct sysfs_ops *sysfs_ops;   struct attribute **default_attrs;   const struct kobj_ns_type_operations * (*child_ns_type)(struct kobject *);   const void * (*namespace)(struct kobject *); } ;   122     struct kobj_uevent_env {   char *argv[3U];   char *envp[32U];   int envp_idx;   char buf[2048U];   int buflen; } ;   130     struct kset_uevent_ops {   const int (*filter)(struct kset *, struct kobject *);   const const char * (*name)(struct kset *, struct kobject *);   const int (*uevent)(struct kset *, struct kobject *, struct kobj_uevent_env *); } ;   147     struct kset {   struct list_head list;   spinlock_t list_lock;   struct kobject kobj;   const struct kset_uevent_ops *uevent_ops; } ;   222     struct kernel_param ;   227     struct kernel_param_ops {   unsigned int flags;   int (*set)(const char *, const struct kernel_param *);   int (*get)(char *, const struct kernel_param *);   void (*free)(void *); } ;    62     struct kparam_string ;    62     struct kparam_array ;    62     union __anonunion____missing_field_name_172 {   void *arg;   const struct kparam_string *str;   const struct kparam_array *arr; } ;    62     struct kernel_param {   const char *name;   struct module *mod;   const struct kernel_param_ops *ops;   const u16 perm;   s8 level;   u8 flags;   union __anonunion____missing_field_name_172 __annonCompField49; } ;    83     struct kparam_string {   unsigned int maxlen;   char *string; } ;    89     struct kparam_array {   unsigned int max;   unsigned int elemsize;   unsigned int *num;   const struct kernel_param_ops *ops;   void *elem; } ;   469     struct latch_tree_node {   struct rb_node node[2U]; } ;   211     struct mod_arch_specific { } ;    37     struct module_param_attrs ;    37     struct module_kobject {   struct kobject kobj;   struct module *mod;   struct kobject *drivers_dir;   struct module_param_attrs *mp;   struct completion *kobj_completion; } ;    47     struct module_attribute {   struct attribute attr;   ssize_t  (*show)(struct module_attribute *, struct module_kobject *, char *);   ssize_t  (*store)(struct module_attribute *, struct module_kobject *, const char *, size_t );   void (*setup)(struct module *, const char *);   int (*test)(struct module *);   void (*free)(struct module *); } ;    73     struct exception_table_entry ;   206     enum module_state {   MODULE_STATE_LIVE = 0,   MODULE_STATE_COMING = 1,   MODULE_STATE_GOING = 2,   MODULE_STATE_UNFORMED = 3 } ;   213     struct mod_tree_node {   struct module *mod;   struct latch_tree_node node; } ;   220     struct module_sect_attrs ;   220     struct module_notes_attrs ;   220     struct tracepoint ;   220     struct trace_event_call ;   220     struct trace_enum_map ;   220     struct module {   enum module_state state;   struct list_head list;   char name[56U];   struct module_kobject mkobj;   struct module_attribute *modinfo_attrs;   const char *version;   const char *srcversion;   struct kobject *holders_dir;   const struct kernel_symbol *syms;   const unsigned long *crcs;   unsigned int num_syms;   struct mutex param_lock;   struct kernel_param *kp;   unsigned int num_kp;   unsigned int num_gpl_syms;   const struct kernel_symbol *gpl_syms;   const unsigned long *gpl_crcs;   const struct kernel_symbol *unused_syms;   const unsigned long *unused_crcs;   unsigned int num_unused_syms;   unsigned int num_unused_gpl_syms;   const struct kernel_symbol *unused_gpl_syms;   const unsigned long *unused_gpl_crcs;   bool sig_ok;   bool async_probe_requested;   const struct kernel_symbol *gpl_future_syms;   const unsigned long *gpl_future_crcs;   unsigned int num_gpl_future_syms;   unsigned int num_exentries;   struct exception_table_entry *extable;   int (*init)();   void *module_init;   void *module_core;   unsigned int init_size;   unsigned int core_size;   unsigned int init_text_size;   unsigned int core_text_size;   struct mod_tree_node mtn_core;   struct mod_tree_node mtn_init;   unsigned int init_ro_size;   unsigned int core_ro_size;   struct mod_arch_specific arch;   unsigned int taints;   unsigned int num_bugs;   struct list_head bug_list;   struct bug_entry *bug_table;   Elf64_Sym *symtab;   Elf64_Sym *core_symtab;   unsigned int num_symtab;   unsigned int core_num_syms;   char *strtab;   char *core_strtab;   struct module_sect_attrs *sect_attrs;   struct module_notes_attrs *notes_attrs;   char *args;   void *percpu;   unsigned int percpu_size;   unsigned int num_tracepoints;   const struct tracepoint **tracepoints_ptrs;   unsigned int num_trace_bprintk_fmt;   const char **trace_bprintk_fmt_start;   struct trace_event_call **trace_events;   unsigned int num_trace_events;   struct trace_enum_map **trace_enums;   unsigned int num_trace_enums;   bool klp_alive;   struct list_head source_list;   struct list_head target_list;   void (*exit)();   atomic_t refcnt;   ctor_fn_t  (**ctors)();   unsigned int num_ctors; } ;    21     struct kvec {   void *iov_base;   size_t iov_len; } ;   163     struct klist_node ;    37     struct klist_node {   void *n_klist;   struct list_head n_node;   struct kref n_ref; } ;    68     struct seq_file {   char *buf;   size_t size;   size_t from;   size_t count;   size_t pad_until;   loff_t index;   loff_t read_pos;   u64 version;   struct mutex lock;   const struct seq_operations *op;   int poll_event;   struct user_namespace *user_ns;   void *private; } ;    35     struct seq_operations {   void * (*start)(struct seq_file *, loff_t *);   void (*stop)(struct seq_file *, void *);   void * (*next)(struct seq_file *, void *, loff_t *);   int (*show)(struct seq_file *, void *); } ;   187     struct pinctrl ;   188     struct pinctrl_state ;   194     struct dev_pin_info {   struct pinctrl *p;   struct pinctrl_state *default_state;   struct pinctrl_state *sleep_state;   struct pinctrl_state *idle_state; } ;    48     struct dma_map_ops ;    48     struct dev_archdata {   struct dma_map_ops *dma_ops;   void *iommu; } ;    14     struct device_private ;    15     struct device_driver ;    16     struct driver_private ;    17     struct class ;    18     struct subsys_private ;    19     struct bus_type ;    20     struct device_node ;    21     struct fwnode_handle ;    22     struct iommu_ops ;    23     struct iommu_group ;    61     struct device_attribute ;    61     struct bus_type {   const char *name;   const char *dev_name;   struct device *dev_root;   struct device_attribute *dev_attrs;   const struct attribute_group **bus_groups;   const struct attribute_group **dev_groups;   const struct attribute_group **drv_groups;   int (*match)(struct device *, struct device_driver *);   int (*uevent)(struct device *, struct kobj_uevent_env *);   int (*probe)(struct device *);   int (*remove)(struct device *);   void (*shutdown)(struct device *);   int (*online)(struct device *);   int (*offline)(struct device *);   int (*suspend)(struct device *, pm_message_t );   int (*resume)(struct device *);   const struct dev_pm_ops *pm;   const struct iommu_ops *iommu_ops;   struct subsys_private *p;   struct lock_class_key lock_key; } ;   139     struct device_type ;   197     enum probe_type {   PROBE_DEFAULT_STRATEGY = 0,   PROBE_PREFER_ASYNCHRONOUS = 1,   PROBE_FORCE_SYNCHRONOUS = 2 } ;   203     struct of_device_id ;   203     struct acpi_device_id ;   203     struct device_driver {   const char *name;   struct bus_type *bus;   struct module *owner;   const char *mod_name;   bool suppress_bind_attrs;   enum probe_type probe_type;   const struct of_device_id *of_match_table;   const struct acpi_device_id *acpi_match_table;   int (*probe)(struct device *);   int (*remove)(struct device *);   void (*shutdown)(struct device *);   int (*suspend)(struct device *, pm_message_t );   int (*resume)(struct device *);   const struct attribute_group **groups;   const struct dev_pm_ops *pm;   struct driver_private *p; } ;   353     struct class_attribute ;   353     struct class {   const char *name;   struct module *owner;   struct class_attribute *class_attrs;   const struct attribute_group **dev_groups;   struct kobject *dev_kobj;   int (*dev_uevent)(struct device *, struct kobj_uevent_env *);   char * (*devnode)(struct device *, umode_t *);   void (*class_release)(struct class *);   void (*dev_release)(struct device *);   int (*suspend)(struct device *, pm_message_t );   int (*resume)(struct device *);   const struct kobj_ns_type_operations *ns_type;   const void * (*namespace)(struct device *);   const struct dev_pm_ops *pm;   struct subsys_private *p; } ;   446     struct class_attribute {   struct attribute attr;   ssize_t  (*show)(struct class *, struct class_attribute *, char *);   ssize_t  (*store)(struct class *, struct class_attribute *, const char *, size_t ); } ;   514     struct device_type {   const char *name;   const struct attribute_group **groups;   int (*uevent)(struct device *, struct kobj_uevent_env *);   char * (*devnode)(struct device *, umode_t *, kuid_t *, kgid_t *);   void (*release)(struct device *);   const struct dev_pm_ops *pm; } ;   542     struct device_attribute {   struct attribute attr;   ssize_t  (*show)(struct device *, struct device_attribute *, char *);   ssize_t  (*store)(struct device *, struct device_attribute *, const char *, size_t ); } ;   674     struct device_dma_parameters {   unsigned int max_segment_size;   unsigned long segment_boundary_mask; } ;   683     struct dma_coherent_mem ;   683     struct cma ;   683     struct device {   struct device *parent;   struct device_private *p;   struct kobject kobj;   const char *init_name;   const struct device_type *type;   struct mutex mutex;   struct bus_type *bus;   struct device_driver *driver;   void *platform_data;   void *driver_data;   struct dev_pm_info power;   struct dev_pm_domain *pm_domain;   struct dev_pin_info *pins;   int numa_node;   u64 *dma_mask;   u64 coherent_dma_mask;   unsigned long dma_pfn_offset;   struct device_dma_parameters *dma_parms;   struct list_head dma_pools;   struct dma_coherent_mem *dma_mem;   struct cma *cma_area;   struct dev_archdata archdata;   struct device_node *of_node;   struct fwnode_handle *fwnode;   dev_t devt;   u32 id;   spinlock_t devres_lock;   struct list_head devres_head;   struct klist_node knode_class;   struct class *class;   const struct attribute_group **groups;   void (*release)(struct device *);   struct iommu_group *iommu_group;   bool offline_disabled;   bool offline; } ;   829     struct wakeup_source {   const char *name;   struct list_head entry;   spinlock_t lock;   struct wake_irq *wakeirq;   struct timer_list timer;   unsigned long timer_expires;   ktime_t total_time;   ktime_t max_time;   ktime_t last_time;   ktime_t start_prevent_time;   ktime_t prevent_sleep_time;   unsigned long event_count;   unsigned long active_count;   unsigned long relax_count;   unsigned long expire_count;   unsigned long wakeup_count;   bool active;   bool autosleep_enabled; } ;   143     struct otp_info {   __u32 start;   __u32 length;   __u32 locked; } ;   217     struct nand_oobfree {   __u32 offset;   __u32 length; } ;   239     struct mtd_ecc_stats {   __u32 corrected;   __u32 failed;   __u32 badblocks;   __u32 bbtblocks; } ;   283     struct mtd_info ;   283     struct erase_info {   struct mtd_info *mtd;   uint64_t addr;   uint64_t len;   uint64_t fail_addr;   u_long time;   u_long retries;   unsigned int dev;   unsigned int cell;   void (*callback)(struct erase_info *);   u_long priv;   u_char state;   struct erase_info *next; } ;    59     struct mtd_erase_region_info {   uint64_t offset;   uint32_t erasesize;   uint32_t numblocks;   unsigned long *lockmap; } ;    66     struct mtd_oob_ops {   unsigned int mode;   size_t len;   size_t retlen;   size_t ooblen;   size_t oobretlen;   uint32_t ooboffs;   uint8_t *datbuf;   uint8_t *oobbuf; } ;    96     struct nand_ecclayout {   __u32 eccbytes;   __u32 eccpos[640U];   __u32 oobavail;   struct nand_oobfree oobfree[32U]; } ;   111     struct backing_dev_info ;   111     struct mtd_info {   u_char type;   uint32_t flags;   uint64_t size;   uint32_t erasesize;   uint32_t writesize;   uint32_t writebufsize;   uint32_t oobsize;   uint32_t oobavail;   unsigned int erasesize_shift;   unsigned int writesize_shift;   unsigned int erasesize_mask;   unsigned int writesize_mask;   unsigned int bitflip_threshold;   const char *name;   int index;   struct nand_ecclayout *ecclayout;   unsigned int ecc_step_size;   unsigned int ecc_strength;   int numeraseregions;   struct mtd_erase_region_info *eraseregions;   int (*_erase)(struct mtd_info *, struct erase_info *);   int (*_point)(struct mtd_info *, loff_t , size_t , size_t *, void **, resource_size_t *);   int (*_unpoint)(struct mtd_info *, loff_t , size_t );   unsigned long int (*_get_unmapped_area)(struct mtd_info *, unsigned long, unsigned long, unsigned long);   int (*_read)(struct mtd_info *, loff_t , size_t , size_t *, u_char *);   int (*_write)(struct mtd_info *, loff_t , size_t , size_t *, const u_char *);   int (*_panic_write)(struct mtd_info *, loff_t , size_t , size_t *, const u_char *);   int (*_read_oob)(struct mtd_info *, loff_t , struct mtd_oob_ops *);   int (*_write_oob)(struct mtd_info *, loff_t , struct mtd_oob_ops *);   int (*_get_fact_prot_info)(struct mtd_info *, size_t , size_t *, struct otp_info *);   int (*_read_fact_prot_reg)(struct mtd_info *, loff_t , size_t , size_t *, u_char *);   int (*_get_user_prot_info)(struct mtd_info *, size_t , size_t *, struct otp_info *);   int (*_read_user_prot_reg)(struct mtd_info *, loff_t , size_t , size_t *, u_char *);   int (*_write_user_prot_reg)(struct mtd_info *, loff_t , size_t , size_t *, u_char *);   int (*_lock_user_prot_reg)(struct mtd_info *, loff_t , size_t );   int (*_writev)(struct mtd_info *, const struct kvec *, unsigned long, loff_t , size_t *);   void (*_sync)(struct mtd_info *);   int (*_lock)(struct mtd_info *, loff_t , uint64_t );   int (*_unlock)(struct mtd_info *, loff_t , uint64_t );   int (*_is_locked)(struct mtd_info *, loff_t , uint64_t );   int (*_block_isreserved)(struct mtd_info *, loff_t );   int (*_block_isbad)(struct mtd_info *, loff_t );   int (*_block_markbad)(struct mtd_info *, loff_t );   int (*_suspend)(struct mtd_info *);   void (*_resume)(struct mtd_info *);   void (*_reboot)(struct mtd_info *);   int (*_get_device)(struct mtd_info *);   void (*_put_device)(struct mtd_info *);   struct backing_dev_info *backing_dev_info;   struct notifier_block reboot_notifier;   struct mtd_ecc_stats ecc_stats;   int subpage_sft;   void *priv;   struct module *owner;   struct device dev;   int usecount; } ;   366     struct mtd_partition ;   367     struct mtd_part_parser_data ;   188     union __anonunion_map_word_180 {   unsigned long x[4U]; } ;   188     typedef union __anonunion_map_word_180 map_word;   189     struct mtd_chip_driver ;   189     struct map_info {   const char *name;   unsigned long size;   resource_size_t phys;   void *virt;   void *cached;   int swap;   int bankwidth;   map_word  (*read)(struct map_info *, unsigned long);   void (*copy_from)(struct map_info *, void *, unsigned long, ssize_t );   void (*write)(struct map_info *, const map_word , unsigned long);   void (*copy_to)(struct map_info *, unsigned long, const void *, ssize_t );   void (*inval_cache)(struct map_info *, unsigned long, ssize_t );   void (*set_vpp)(struct map_info *, int);   unsigned long pfow_base;   unsigned long map_priv_1;   unsigned long map_priv_2;   struct device_node *device_node;   void *fldrv_priv;   struct mtd_chip_driver *fldrv; } ;   252     struct mtd_chip_driver {   struct mtd_info * (*probe)(struct map_info *);   void (*destroy)(struct mtd_info *);   struct module *module;   char *name;   struct list_head list; } ;   472     struct mtd_partition {   const char *name;   uint64_t size;   uint64_t offset;   uint32_t mask_flags;   struct nand_ecclayout *ecclayout; } ;    46     struct mtd_part_parser_data {   unsigned long origin;   struct device_node *of_node; } ;    62     struct exception_table_entry {   int insn;   int fixup; } ;    61     struct timerqueue_node {   struct rb_node node;   ktime_t expires; } ;    12     struct timerqueue_head {   struct rb_root head;   struct timerqueue_node *next; } ;    50     struct hrtimer_clock_base ;    51     struct hrtimer_cpu_base ;    60     enum hrtimer_restart {   HRTIMER_NORESTART = 0,   HRTIMER_RESTART = 1 } ;    65     struct hrtimer {   struct timerqueue_node node;   ktime_t _softexpires;   enum hrtimer_restart  (*function)(struct hrtimer *);   struct hrtimer_clock_base *base;   unsigned long state;   int start_pid;   void *start_site;   char start_comm[16U]; } ;   123     struct hrtimer_clock_base {   struct hrtimer_cpu_base *cpu_base;   int index;   clockid_t clockid;   struct timerqueue_head active;   ktime_t  (*get_time)();   ktime_t offset; } ;   156     struct hrtimer_cpu_base {   raw_spinlock_t lock;   seqcount_t seq;   struct hrtimer *running;   unsigned int cpu;   unsigned int active_bases;   unsigned int clock_was_set_seq;   bool migration_enabled;   bool nohz_active;   unsigned char in_hrtirq;   unsigned char hres_active;   unsigned char hang_detected;   ktime_t expires_next;   struct hrtimer *next_timer;   unsigned int nr_events;   unsigned int nr_retries;   unsigned int nr_hangs;   unsigned int max_hang_time;   struct hrtimer_clock_base clock_base[4U]; } ;    22     struct kernel_cap_struct {   __u32 cap[2U]; } ;    25     typedef struct kernel_cap_struct kernel_cap_t;    84     struct plist_node {   int prio;   struct list_head prio_list;   struct list_head node_list; } ;     4     typedef unsigned long cputime_t;    25     struct sem_undo_list ;    25     struct sysv_sem {   struct sem_undo_list *undo_list; } ;    78     struct user_struct ;    26     struct sysv_shm {   struct list_head shm_clist; } ;    24     struct __anonstruct_sigset_t_190 {   unsigned long sig[1U]; } ;    24     typedef struct __anonstruct_sigset_t_190 sigset_t;    25     struct siginfo ;    17     typedef void __signalfn_t(int);    18     typedef __signalfn_t *__sighandler_t;    20     typedef void __restorefn_t();    21     typedef __restorefn_t *__sigrestore_t;    34     union sigval {   int sival_int;   void *sival_ptr; } ;    10     typedef union sigval sigval_t;    11     struct __anonstruct__kill_192 {   __kernel_pid_t _pid;   __kernel_uid32_t _uid; } ;    11     struct __anonstruct__timer_193 {   __kernel_timer_t _tid;   int _overrun;   char _pad[0U];   sigval_t _sigval;   int _sys_private; } ;    11     struct __anonstruct__rt_194 {   __kernel_pid_t _pid;   __kernel_uid32_t _uid;   sigval_t _sigval; } ;    11     struct __anonstruct__sigchld_195 {   __kernel_pid_t _pid;   __kernel_uid32_t _uid;   int _status;   __kernel_clock_t _utime;   __kernel_clock_t _stime; } ;    11     struct __anonstruct__addr_bnd_197 {   void *_lower;   void *_upper; } ;    11     struct __anonstruct__sigfault_196 {   void *_addr;   short _addr_lsb;   struct __anonstruct__addr_bnd_197 _addr_bnd; } ;    11     struct __anonstruct__sigpoll_198 {   long _band;   int _fd; } ;    11     struct __anonstruct__sigsys_199 {   void *_call_addr;   int _syscall;   unsigned int _arch; } ;    11     union __anonunion__sifields_191 {   int _pad[28U];   struct __anonstruct__kill_192 _kill;   struct __anonstruct__timer_193 _timer;   struct __anonstruct__rt_194 _rt;   struct __anonstruct__sigchld_195 _sigchld;   struct __anonstruct__sigfault_196 _sigfault;   struct __anonstruct__sigpoll_198 _sigpoll;   struct __anonstruct__sigsys_199 _sigsys; } ;    11     struct siginfo {   int si_signo;   int si_errno;   int si_code;   union __anonunion__sifields_191 _sifields; } ;   113     typedef struct siginfo siginfo_t;    22     struct sigpending {   struct list_head list;   sigset_t signal; } ;   243     struct sigaction {   __sighandler_t sa_handler;   unsigned long sa_flags;   __sigrestore_t sa_restorer;   sigset_t sa_mask; } ;   257     struct k_sigaction {   struct sigaction sa; } ;   450     struct pid_namespace ;   450     struct upid {   int nr;   struct pid_namespace *ns;   struct hlist_node pid_chain; } ;    56     struct pid {   atomic_t count;   unsigned int level;   struct hlist_head tasks[3U];   struct callback_head rcu;   struct upid numbers[1U]; } ;    68     struct pid_link {   struct hlist_node node;   struct pid *pid; } ;    53     struct seccomp_filter ;    54     struct seccomp {   int mode;   struct seccomp_filter *filter; } ;    40     struct rt_mutex_waiter ;    41     struct rlimit {   __kernel_ulong_t rlim_cur;   __kernel_ulong_t rlim_max; } ;    11     struct task_io_accounting {   u64 rchar;   u64 wchar;   u64 syscr;   u64 syscw;   u64 read_bytes;   u64 write_bytes;   u64 cancelled_write_bytes; } ;    45     struct latency_record {   unsigned long backtrace[12U];   unsigned int count;   unsigned long time;   unsigned long max; } ;    39     struct assoc_array_ptr ;    39     struct assoc_array {   struct assoc_array_ptr *root;   unsigned long nr_leaves_on_tree; } ;    31     typedef int32_t key_serial_t;    34     typedef uint32_t key_perm_t;    35     struct key ;    36     struct signal_struct ;    37     struct key_type ;    41     struct keyring_index_key {   struct key_type *type;   const char *description;   size_t desc_len; } ;   123     union __anonunion____missing_field_name_206 {   struct list_head graveyard_link;   struct rb_node serial_node; } ;   123     struct key_user ;   123     union __anonunion____missing_field_name_207 {   time_t expiry;   time_t revoked_at; } ;   123     struct __anonstruct____missing_field_name_209 {   struct key_type *type;   char *description; } ;   123     union __anonunion____missing_field_name_208 {   struct keyring_index_key index_key;   struct __anonstruct____missing_field_name_209 __annonCompField60; } ;   123     union __anonunion_type_data_210 {   struct list_head link;   unsigned long x[2U];   void *p[2U];   int reject_error; } ;   123     union __anonunion_payload_212 {   unsigned long value;   void *rcudata;   void *data;   void *data2[2U]; } ;   123     union __anonunion____missing_field_name_211 {   union __anonunion_payload_212 payload;   struct assoc_array keys; } ;   123     struct key {   atomic_t usage;   key_serial_t serial;   union __anonunion____missing_field_name_206 __annonCompField58;   struct rw_semaphore sem;   struct key_user *user;   void *security;   union __anonunion____missing_field_name_207 __annonCompField59;   time_t last_used_at;   kuid_t uid;   kgid_t gid;   key_perm_t perm;   unsigned short quotalen;   unsigned short datalen;   unsigned long flags;   union __anonunion____missing_field_name_208 __annonCompField61;   union __anonunion_type_data_210 type_data;   union __anonunion____missing_field_name_211 __annonCompField62; } ;   358     struct audit_context ;    27     struct group_info {   atomic_t usage;   int ngroups;   int nblocks;   kgid_t small_block[32U];   kgid_t *blocks[0U]; } ;    90     struct cred {   atomic_t usage;   atomic_t subscribers;   void *put_addr;   unsigned int magic;   kuid_t uid;   kgid_t gid;   kuid_t suid;   kgid_t sgid;   kuid_t euid;   kgid_t egid;   kuid_t fsuid;   kgid_t fsgid;   unsigned int securebits;   kernel_cap_t cap_inheritable;   kernel_cap_t cap_permitted;   kernel_cap_t cap_effective;   kernel_cap_t cap_bset;   unsigned char jit_keyring;   struct key *session_keyring;   struct key *process_keyring;   struct key *thread_keyring;   struct key *request_key_auth;   void *security;   struct user_struct *user;   struct user_namespace *user_ns;   struct group_info *group_info;   struct callback_head rcu; } ;   369     struct percpu_ref ;    55     typedef void percpu_ref_func_t(struct percpu_ref *);    68     struct percpu_ref {   atomic_long_t count;   unsigned long percpu_count_ptr;   percpu_ref_func_t *release;   percpu_ref_func_t *confirm_switch;   bool force_atomic;   struct callback_head rcu; } ;    27     struct cgroup ;    28     struct cgroup_root ;    29     struct cgroup_subsys ;    30     struct cgroup_taskset ;    72     struct cgroup_subsys_state {   struct cgroup *cgroup;   struct cgroup_subsys *ss;   struct percpu_ref refcnt;   struct cgroup_subsys_state *parent;   struct list_head sibling;   struct list_head children;   int id;   unsigned int flags;   u64 serial_nr;   struct callback_head callback_head;   struct work_struct destroy_work; } ;   124     struct css_set {   atomic_t refcount;   struct hlist_node hlist;   struct list_head tasks;   struct list_head mg_tasks;   struct list_head cgrp_links;   struct cgroup *dfl_cgrp;   struct cgroup_subsys_state *subsys[12U];   struct list_head mg_preload_node;   struct list_head mg_node;   struct cgroup *mg_src_cgrp;   struct css_set *mg_dst_cset;   struct list_head e_cset_node[12U];   struct callback_head callback_head; } ;   197     struct cgroup {   struct cgroup_subsys_state self;   unsigned long flags;   int id;   int populated_cnt;   struct kernfs_node *kn;   struct kernfs_node *procs_kn;   struct kernfs_node *populated_kn;   unsigned int subtree_control;   unsigned int child_subsys_mask;   struct cgroup_subsys_state *subsys[12U];   struct cgroup_root *root;   struct list_head cset_links;   struct list_head e_csets[12U];   struct list_head pidlists;   struct mutex pidlist_mutex;   wait_queue_head_t offline_waitq;   struct work_struct release_agent_work; } ;   270     struct cgroup_root {   struct kernfs_root *kf_root;   unsigned int subsys_mask;   int hierarchy_id;   struct cgroup cgrp;   atomic_t nr_cgrps;   struct list_head root_list;   unsigned int flags;   struct idr cgroup_idr;   char release_agent_path[4096U];   char name[64U]; } ;   306     struct cftype {   char name[64U];   int private;   umode_t mode;   size_t max_write_len;   unsigned int flags;   struct cgroup_subsys *ss;   struct list_head node;   struct kernfs_ops *kf_ops;   u64  (*read_u64)(struct cgroup_subsys_state *, struct cftype *);   s64  (*read_s64)(struct cgroup_subsys_state *, struct cftype *);   int (*seq_show)(struct seq_file *, void *);   void * (*seq_start)(struct seq_file *, loff_t *);   void * (*seq_next)(struct seq_file *, void *, loff_t *);   void (*seq_stop)(struct seq_file *, void *);   int (*write_u64)(struct cgroup_subsys_state *, struct cftype *, u64 );   int (*write_s64)(struct cgroup_subsys_state *, struct cftype *, s64 );   ssize_t  (*write)(struct kernfs_open_file *, char *, size_t , loff_t );   struct lock_class_key lockdep_key; } ;   388     struct cgroup_subsys {   struct cgroup_subsys_state * (*css_alloc)(struct cgroup_subsys_state *);   int (*css_online)(struct cgroup_subsys_state *);   void (*css_offline)(struct cgroup_subsys_state *);   void (*css_released)(struct cgroup_subsys_state *);   void (*css_free)(struct cgroup_subsys_state *);   void (*css_reset)(struct cgroup_subsys_state *);   void (*css_e_css_changed)(struct cgroup_subsys_state *);   int (*can_attach)(struct cgroup_subsys_state *, struct cgroup_taskset *);   void (*cancel_attach)(struct cgroup_subsys_state *, struct cgroup_taskset *);   void (*attach)(struct cgroup_subsys_state *, struct cgroup_taskset *);   void (*fork)(struct task_struct *);   void (*exit)(struct cgroup_subsys_state *, struct cgroup_subsys_state *, struct task_struct *);   void (*bind)(struct cgroup_subsys_state *);   int disabled;   int early_init;   bool broken_hierarchy;   bool warned_broken_hierarchy;   int id;   const char *name;   struct cgroup_root *root;   struct idr css_idr;   struct list_head cfts;   struct cftype *dfl_cftypes;   struct cftype *legacy_cftypes;   unsigned int depends_on; } ;   128     struct futex_pi_state ;   129     struct robust_list_head ;   130     struct bio_list ;   131     struct fs_struct ;   132     struct perf_event_context ;   133     struct blk_plug ;   135     struct nameidata ;   188     struct cfs_rq ;   189     struct task_group ;   477     struct sighand_struct {   atomic_t count;   struct k_sigaction action[64U];   spinlock_t siglock;   wait_queue_head_t signalfd_wqh; } ;   516     struct pacct_struct {   int ac_flag;   long ac_exitcode;   unsigned long ac_mem;   cputime_t ac_utime;   cputime_t ac_stime;   unsigned long ac_minflt;   unsigned long ac_majflt; } ;   524     struct cpu_itimer {   cputime_t expires;   cputime_t incr;   u32 error;   u32 incr_error; } ;   531     struct cputime {   cputime_t utime;   cputime_t stime; } ;   543     struct task_cputime {   cputime_t utime;   cputime_t stime;   unsigned long long sum_exec_runtime; } ;   563     struct task_cputime_atomic {   atomic64_t utime;   atomic64_t stime;   atomic64_t sum_exec_runtime; } ;   584     struct thread_group_cputimer {   struct task_cputime_atomic cputime_atomic;   int running; } ;   620     struct autogroup ;   621     struct tty_struct ;   621     struct taskstats ;   621     struct tty_audit_buf ;   621     struct signal_struct {   atomic_t sigcnt;   atomic_t live;   int nr_threads;   struct list_head thread_head;   wait_queue_head_t wait_chldexit;   struct task_struct *curr_target;   struct sigpending shared_pending;   int group_exit_code;   int notify_count;   struct task_struct *group_exit_task;   int group_stop_count;   unsigned int flags;   unsigned char is_child_subreaper;   unsigned char has_child_subreaper;   int posix_timer_id;   struct list_head posix_timers;   struct hrtimer real_timer;   struct pid *leader_pid;   ktime_t it_real_incr;   struct cpu_itimer it[2U];   struct thread_group_cputimer cputimer;   struct task_cputime cputime_expires;   struct list_head cpu_timers[3U];   struct pid *tty_old_pgrp;   int leader;   struct tty_struct *tty;   struct autogroup *autogroup;   seqlock_t stats_lock;   cputime_t utime;   cputime_t stime;   cputime_t cutime;   cputime_t cstime;   cputime_t gtime;   cputime_t cgtime;   struct cputime prev_cputime;   unsigned long nvcsw;   unsigned long nivcsw;   unsigned long cnvcsw;   unsigned long cnivcsw;   unsigned long min_flt;   unsigned long maj_flt;   unsigned long cmin_flt;   unsigned long cmaj_flt;   unsigned long inblock;   unsigned long oublock;   unsigned long cinblock;   unsigned long coublock;   unsigned long maxrss;   unsigned long cmaxrss;   struct task_io_accounting ioac;   unsigned long long sum_sched_runtime;   struct rlimit rlim[16U];   struct pacct_struct pacct;   struct taskstats *stats;   unsigned int audit_tty;   unsigned int audit_tty_log_passwd;   struct tty_audit_buf *tty_audit_buf;   oom_flags_t oom_flags;   short oom_score_adj;   short oom_score_adj_min;   struct mutex cred_guard_mutex; } ;   790     struct user_struct {   atomic_t __count;   atomic_t processes;   atomic_t sigpending;   atomic_t inotify_watches;   atomic_t inotify_devs;   atomic_t fanotify_listeners;   atomic_long_t epoll_watches;   unsigned long mq_bytes;   unsigned long locked_shm;   struct key *uid_keyring;   struct key *session_keyring;   struct hlist_node uidhash_node;   kuid_t uid;   atomic_long_t locked_vm; } ;   833     struct reclaim_state ;   834     struct sched_info {   unsigned long pcount;   unsigned long long run_delay;   unsigned long long last_arrival;   unsigned long long last_queued; } ;   849     struct task_delay_info {   spinlock_t lock;   unsigned int flags;   u64 blkio_start;   u64 blkio_delay;   u64 swapin_delay;   u32 blkio_count;   u32 swapin_count;   u64 freepages_start;   u64 freepages_delay;   u32 freepages_count; } ;   897     struct wake_q_node {   struct wake_q_node *next; } ;  1126     struct io_context ;  1160     struct pipe_inode_info ;  1162     struct load_weight {   unsigned long weight;   u32 inv_weight; } ;  1169     struct sched_avg {   u64 last_runnable_update;   s64 decay_count;   unsigned long load_avg_contrib;   unsigned long utilization_avg_contrib;   u32 runnable_avg_sum;   u32 avg_period;   u32 running_avg_sum; } ;  1194     struct sched_statistics {   u64 wait_start;   u64 wait_max;   u64 wait_count;   u64 wait_sum;   u64 iowait_count;   u64 iowait_sum;   u64 sleep_start;   u64 sleep_max;   s64 sum_sleep_runtime;   u64 block_start;   u64 block_max;   u64 exec_max;   u64 slice_max;   u64 nr_migrations_cold;   u64 nr_failed_migrations_affine;   u64 nr_failed_migrations_running;   u64 nr_failed_migrations_hot;   u64 nr_forced_migrations;   u64 nr_wakeups;   u64 nr_wakeups_sync;   u64 nr_wakeups_migrate;   u64 nr_wakeups_local;   u64 nr_wakeups_remote;   u64 nr_wakeups_affine;   u64 nr_wakeups_affine_attempts;   u64 nr_wakeups_passive;   u64 nr_wakeups_idle; } ;  1229     struct sched_entity {   struct load_weight load;   struct rb_node run_node;   struct list_head group_node;   unsigned int on_rq;   u64 exec_start;   u64 sum_exec_runtime;   u64 vruntime;   u64 prev_sum_exec_runtime;   u64 nr_migrations;   struct sched_statistics statistics;   int depth;   struct sched_entity *parent;   struct cfs_rq *cfs_rq;   struct cfs_rq *my_q;   struct sched_avg avg; } ;  1261     struct rt_rq ;  1261     struct sched_rt_entity {   struct list_head run_list;   unsigned long timeout;   unsigned long watchdog_stamp;   unsigned int time_slice;   struct sched_rt_entity *back;   struct sched_rt_entity *parent;   struct rt_rq *rt_rq;   struct rt_rq *my_q; } ;  1277     struct sched_dl_entity {   struct rb_node rb_node;   u64 dl_runtime;   u64 dl_deadline;   u64 dl_period;   u64 dl_bw;   s64 runtime;   u64 deadline;   unsigned int flags;   int dl_throttled;   int dl_new;   int dl_boosted;   int dl_yielded;   struct hrtimer dl_timer; } ;  1343     struct memcg_oom_info {   struct mem_cgroup *memcg;   gfp_t gfp_mask;   int order;   unsigned char may_oom; } ;  1769     struct sched_class ;  1769     struct files_struct ;  1769     struct compat_robust_list_head ;  1769     struct numa_group ;  1769     struct task_struct {   volatile long state;   void *stack;   atomic_t usage;   unsigned int flags;   unsigned int ptrace;   struct llist_node wake_entry;   int on_cpu;   struct task_struct *last_wakee;   unsigned long wakee_flips;   unsigned long wakee_flip_decay_ts;   int wake_cpu;   int on_rq;   int prio;   int static_prio;   int normal_prio;   unsigned int rt_priority;   const struct sched_class *sched_class;   struct sched_entity se;   struct sched_rt_entity rt;   struct task_group *sched_task_group;   struct sched_dl_entity dl;   struct hlist_head preempt_notifiers;   unsigned int policy;   int nr_cpus_allowed;   cpumask_t cpus_allowed;   unsigned long rcu_tasks_nvcsw;   bool rcu_tasks_holdout;   struct list_head rcu_tasks_holdout_list;   int rcu_tasks_idle_cpu;   struct sched_info sched_info;   struct list_head tasks;   struct plist_node pushable_tasks;   struct rb_node pushable_dl_tasks;   struct mm_struct *mm;   struct mm_struct *active_mm;   u32 vmacache_seqnum;   struct vm_area_struct *vmacache[4U];   struct task_rss_stat rss_stat;   int exit_state;   int exit_code;   int exit_signal;   int pdeath_signal;   unsigned long jobctl;   unsigned int personality;   unsigned char in_execve;   unsigned char in_iowait;   unsigned char sched_reset_on_fork;   unsigned char sched_contributes_to_load;   unsigned char sched_migrated;   unsigned char memcg_kmem_skip_account;   unsigned char brk_randomized;   unsigned long atomic_flags;   struct restart_block restart_block;   pid_t pid;   pid_t tgid;   struct task_struct *real_parent;   struct task_struct *parent;   struct list_head children;   struct list_head sibling;   struct task_struct *group_leader;   struct list_head ptraced;   struct list_head ptrace_entry;   struct pid_link pids[3U];   struct list_head thread_group;   struct list_head thread_node;   struct completion *vfork_done;   int *set_child_tid;   int *clear_child_tid;   cputime_t utime;   cputime_t stime;   cputime_t utimescaled;   cputime_t stimescaled;   cputime_t gtime;   struct cputime prev_cputime;   unsigned long nvcsw;   unsigned long nivcsw;   u64 start_time;   u64 real_start_time;   unsigned long min_flt;   unsigned long maj_flt;   struct task_cputime cputime_expires;   struct list_head cpu_timers[3U];   const struct cred *real_cred;   const struct cred *cred;   char comm[16U];   struct nameidata *nameidata;   struct sysv_sem sysvsem;   struct sysv_shm sysvshm;   unsigned long last_switch_count;   struct thread_struct thread;   struct fs_struct *fs;   struct files_struct *files;   struct nsproxy *nsproxy;   struct signal_struct *signal;   struct sighand_struct *sighand;   sigset_t blocked;   sigset_t real_blocked;   sigset_t saved_sigmask;   struct sigpending pending;   unsigned long sas_ss_sp;   size_t sas_ss_size;   int (*notifier)(void *);   void *notifier_data;   sigset_t *notifier_mask;   struct callback_head *task_works;   struct audit_context *audit_context;   kuid_t loginuid;   unsigned int sessionid;   struct seccomp seccomp;   u32 parent_exec_id;   u32 self_exec_id;   spinlock_t alloc_lock;   raw_spinlock_t pi_lock;   struct wake_q_node wake_q;   struct rb_root pi_waiters;   struct rb_node *pi_waiters_leftmost;   struct rt_mutex_waiter *pi_blocked_on;   struct mutex_waiter *blocked_on;   unsigned int irq_events;   unsigned long hardirq_enable_ip;   unsigned long hardirq_disable_ip;   unsigned int hardirq_enable_event;   unsigned int hardirq_disable_event;   int hardirqs_enabled;   int hardirq_context;   unsigned long softirq_disable_ip;   unsigned long softirq_enable_ip;   unsigned int softirq_disable_event;   unsigned int softirq_enable_event;   int softirqs_enabled;   int softirq_context;   u64 curr_chain_key;   int lockdep_depth;   unsigned int lockdep_recursion;   struct held_lock held_locks[48U];   gfp_t lockdep_reclaim_gfp;   void *journal_info;   struct bio_list *bio_list;   struct blk_plug *plug;   struct reclaim_state *reclaim_state;   struct backing_dev_info *backing_dev_info;   struct io_context *io_context;   unsigned long ptrace_message;   siginfo_t *last_siginfo;   struct task_io_accounting ioac;   u64 acct_rss_mem1;   u64 acct_vm_mem1;   cputime_t acct_timexpd;   nodemask_t mems_allowed;   seqcount_t mems_allowed_seq;   int cpuset_mem_spread_rotor;   int cpuset_slab_spread_rotor;   struct css_set *cgroups;   struct list_head cg_list;   struct robust_list_head *robust_list;   struct compat_robust_list_head *compat_robust_list;   struct list_head pi_state_list;   struct futex_pi_state *pi_state_cache;   struct perf_event_context *perf_event_ctxp[2U];   struct mutex perf_event_mutex;   struct list_head perf_event_list;   struct mempolicy *mempolicy;   short il_next;   short pref_node_fork;   int numa_scan_seq;   unsigned int numa_scan_period;   unsigned int numa_scan_period_max;   int numa_preferred_nid;   unsigned long numa_migrate_retry;   u64 node_stamp;   u64 last_task_numa_placement;   u64 last_sum_exec_runtime;   struct callback_head numa_work;   struct list_head numa_entry;   struct numa_group *numa_group;   unsigned long *numa_faults;   unsigned long total_numa_faults;   unsigned long numa_faults_locality[3U];   unsigned long numa_pages_migrated;   struct callback_head rcu;   struct pipe_inode_info *splice_pipe;   struct page_frag task_frag;   struct task_delay_info *delays;   int make_it_fail;   int nr_dirtied;   int nr_dirtied_pause;   unsigned long dirty_paused_when;   int latency_record_count;   struct latency_record latency_record[32U];   unsigned long timer_slack_ns;   unsigned long default_timer_slack_ns;   unsigned int kasan_depth;   unsigned long trace;   unsigned long trace_recursion;   struct memcg_oom_info memcg_oom;   struct uprobe_task *utask;   unsigned int sequential_io;   unsigned int sequential_io_avg;   unsigned long task_state_change;   int pagefault_disabled; } ;    33     extern struct module __this_module;   184     void * ldv_ioremap_nocache_1(resource_size_t ldv_func_arg1, unsigned long ldv_func_arg2);   188     void * ldv_ioremap_nocache_3(resource_size_t ldv_func_arg1, unsigned long ldv_func_arg2);   192     void * ldv_ioremap_nocache_4(resource_size_t ldv_func_arg1, unsigned long ldv_func_arg2);   198     void * ldv_ioremap_cache_2(resource_size_t ldv_func_arg1, unsigned long ldv_func_arg2);   214     void ldv_iounmap_5(volatile void *addr);   218     void ldv_iounmap_6(volatile void *addr);   222     void ldv_iounmap_7(volatile void *addr);   226     void ldv_iounmap_8(volatile void *addr);   230     void ldv_iounmap_9(volatile void *addr);   142     int printk(const char *, ...);    10     void ldv_error();    26     void * ldv_undef_ptr();     7     int LDV_IO_MEMS = 0;    11     void * ldv_io_mem_remap(void *addr);    23     void ldv_io_mem_unmap(const volatile void *addr);    29     void ldv_check_final_state();   372     int mtd_device_parse_register(struct mtd_info *, const const char **, struct mtd_part_parser_data *, const struct mtd_partition *, int);   379     int mtd_device_unregister(struct mtd_info *);   264     struct mtd_info * do_map_probe(const char *, struct map_info *);   265     void map_destroy(struct mtd_info *);   471     void simple_map_init(struct map_info *);    55     void *nettel_mmcrp = (void *)0;    60     struct mtd_info *amd_mtd = 0;   105     struct map_info nettel_amd_map = { "SnapGear AMD", 2097152UL, 0ULL, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0UL, 0UL, 0UL, 0, 0, 0 };   111     struct mtd_partition nettel_amd_partitions[4U] = { { "SnapGear BIOS config", 65536ULL, 917504ULL, 0U, 0 }, { "SnapGear BIOS", 65536ULL, 983040ULL, 0U, 0 }, { "SnapGear AMD", 0ULL, 0ULL, 0U, 0 }, { "SnapGear high BIOS", 65536ULL, 2031616ULL, 0U, 0 } };   164     int nettel_init();   417     void nettel_cleanup();   482     void ldv_initialize();   485     void ldv_handler_precall();   488     int nondet_int();   491     int LDV_IN_INTERRUPT = 0;   494     void ldv_main0_sequence_infinite_withcheck_stateful();           return ;         }        {       496     int tmp;   497     int tmp___0;   498     int tmp___1;   506     LDV_IN_INTERRUPT = 1;   515     ldv_initialize() { /* Function call is skipped due to function is undefined */}   547     ldv_handler_precall() { /* Function call is skipped due to function is undefined */}           {   166       volatile unsigned long *amdpar;   167       unsigned long amdaddr;   168       unsigned long maxsize;   169       int num_amd_partitions;   170       int rc;   168       num_amd_partitions = 0;   177       rc = 0;             {    47         void *tmp;               {             }   13           void *ptr;    14           void *tmp;    14           tmp = ldv_undef_ptr() { /* Function call is skipped due to function is undefined */}    14           ptr = tmp;    16           LDV_IO_MEMS = LDV_IO_MEMS + 1;               }  186       *(((unsigned char *)nettel_mmcrp) + 3172U) = 1U;   188       amdpar = ((volatile unsigned long *)nettel_mmcrp) + 196U;   213       amdaddr = 536870912UL;   214       maxsize = 2097152UL;   216       *amdpar = ((((maxsize - 65536UL) >> 2) & 33538048UL) | ((amdaddr >> 16) & 16383UL)) | 2315255808UL;   217       Ignored inline assembler code  219       nettel_amd_map.phys = (resource_size_t )amdaddr;             {    53         void *tmp;               {             }   13           void *ptr;    14           void *tmp;    14           tmp = ldv_undef_ptr() { /* Function call is skipped due to function is undefined */}    14           ptr = tmp;    16           LDV_IO_MEMS = LDV_IO_MEMS + 1;               }  226       simple_map_init(&nettel_amd_map) { /* Function call is skipped due to function is undefined */}   228       amd_mtd = do_map_probe("jedec_probe", &nettel_amd_map) { /* Function call is skipped due to function is undefined */}   229       printk("\rSNAPGEAR: AMD flash device size = %dK\n", (int)((amd_mtd->size) >> 10)) { /* Function call is skipped due to function is undefined */}   232       amd_mtd->owner = &__this_module;   235       num_amd_partitions = 4;   237       num_amd_partitions = num_amd_partitions - 1;   392       rc = mtd_device_parse_register(amd_mtd, (const const char **)0, (struct mtd_part_parser_data *)0, (const struct mtd_partition *)(&nettel_amd_partitions), num_amd_partitions) { /* Function call is skipped due to function is undefined */}           }  549     goto ldv_final;         } |              Source code             1 
    2 /****************************************************************************/
    3 
    4 /*
    5  *      nettel.c -- mappings for NETtel/SecureEdge/SnapGear (x86) boards.
    6  *
    7  *      (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
    8  *      (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
    9  */
   10 
   11 /****************************************************************************/
   12 
   13 #include <linux/module.h>
   14 #include <linux/init.h>
   15 #include <linux/types.h>
   16 #include <linux/kernel.h>
   17 #include <linux/mtd/mtd.h>
   18 #include <linux/mtd/map.h>
   19 #include <linux/mtd/partitions.h>
   20 #include <linux/mtd/cfi.h>
   21 #include <linux/reboot.h>
   22 #include <linux/err.h>
   23 #include <linux/kdev_t.h>
   24 #include <linux/root_dev.h>
   25 #include <asm/io.h>
   26 
   27 /****************************************************************************/
   28 
   29 #define INTEL_BUSWIDTH		1
   30 #define AMD_WINDOW_MAXSIZE	0x00200000
   31 #define AMD_BUSWIDTH	 	1
   32 
   33 /*
   34  *	PAR masks and shifts, assuming 64K pages.
   35  */
   36 #define SC520_PAR_ADDR_MASK	0x00003fff
   37 #define SC520_PAR_ADDR_SHIFT	16
   38 #define SC520_PAR_TO_ADDR(par) \
   39 	(((par)&SC520_PAR_ADDR_MASK) << SC520_PAR_ADDR_SHIFT)
   40 
   41 #define SC520_PAR_SIZE_MASK	0x01ffc000
   42 #define SC520_PAR_SIZE_SHIFT	2
   43 #define SC520_PAR_TO_SIZE(par) \
   44 	((((par)&SC520_PAR_SIZE_MASK) << SC520_PAR_SIZE_SHIFT) + (64*1024))
   45 
   46 #define SC520_PAR(cs, addr, size) \
   47 	((cs) | \
   48 	((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \
   49 	(((addr) >> SC520_PAR_ADDR_SHIFT) & SC520_PAR_ADDR_MASK))
   50 
   51 #define SC520_PAR_BOOTCS	0x8a000000
   52 #define	SC520_PAR_ROMCS1	0xaa000000
   53 #define SC520_PAR_ROMCS2	0xca000000	/* Cache disabled, 64K page */
   54 
   55 static void *nettel_mmcrp = NULL;
   56 
   57 #ifdef CONFIG_MTD_CFI_INTELEXT
   58 static struct mtd_info *intel_mtd;
   59 #endif
   60 static struct mtd_info *amd_mtd;
   61 
   62 /****************************************************************************/
   63 
   64 /****************************************************************************/
   65 
   66 #ifdef CONFIG_MTD_CFI_INTELEXT
   67 static struct map_info nettel_intel_map = {
   68 	.name = "SnapGear Intel",
   69 	.size = 0,
   70 	.bankwidth = INTEL_BUSWIDTH,
   71 };
   72 
   73 static struct mtd_partition nettel_intel_partitions[] = {
   74 	{
   75 		.name = "SnapGear kernel",
   76 		.offset = 0,
   77 		.size = 0x000e0000
   78 	},
   79 	{
   80 		.name = "SnapGear filesystem",
   81 		.offset = 0x00100000,
   82 	},
   83 	{
   84 		.name = "SnapGear config",
   85 		.offset = 0x000e0000,
   86 		.size = 0x00020000
   87 	},
   88 	{
   89 		.name = "SnapGear Intel",
   90 		.offset = 0
   91 	},
   92 	{
   93 		.name = "SnapGear BIOS Config",
   94 		.offset = 0x007e0000,
   95 		.size = 0x00020000
   96 	},
   97 	{
   98 		.name = "SnapGear BIOS",
   99 		.offset = 0x007e0000,
  100 		.size = 0x00020000
  101 	},
  102 };
  103 #endif
  104 
  105 static struct map_info nettel_amd_map = {
  106 	.name = "SnapGear AMD",
  107 	.size = AMD_WINDOW_MAXSIZE,
  108 	.bankwidth = AMD_BUSWIDTH,
  109 };
  110 
  111 static struct mtd_partition nettel_amd_partitions[] = {
  112 	{
  113 		.name = "SnapGear BIOS config",
  114 		.offset = 0x000e0000,
  115 		.size = 0x00010000
  116 	},
  117 	{
  118 		.name = "SnapGear BIOS",
  119 		.offset = 0x000f0000,
  120 		.size = 0x00010000
  121 	},
  122 	{
  123 		.name = "SnapGear AMD",
  124 		.offset = 0
  125 	},
  126 	{
  127 		.name = "SnapGear high BIOS",
  128 		.offset = 0x001f0000,
  129 		.size = 0x00010000
  130 	}
  131 };
  132 
  133 #define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
  134 
  135 /****************************************************************************/
  136 
  137 #ifdef CONFIG_MTD_CFI_INTELEXT
  138 
  139 /*
  140  *	Set the Intel flash back to read mode since some old boot
  141  *	loaders don't.
  142  */
  143 static int nettel_reboot_notifier(struct notifier_block *nb, unsigned long val, void *v)
  144 {
  145 	struct cfi_private *cfi = nettel_intel_map.fldrv_priv;
  146 	unsigned long b;
  147 
  148 	/* Make sure all FLASH chips are put back into read mode */
  149 	for (b = 0; (b < nettel_intel_partitions[3].size); b += 0x100000) {
  150 		cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi,
  151 			cfi->device_type, NULL);
  152 	}
  153 	return(NOTIFY_OK);
  154 }
  155 
  156 static struct notifier_block nettel_notifier_block = {
  157 	nettel_reboot_notifier, NULL, 0
  158 };
  159 
  160 #endif
  161 
  162 /****************************************************************************/
  163 
  164 static int __init nettel_init(void)
  165 {
  166 	volatile unsigned long *amdpar;
  167 	unsigned long amdaddr, maxsize;
  168 	int num_amd_partitions=0;
  169 #ifdef CONFIG_MTD_CFI_INTELEXT
  170 	volatile unsigned long *intel0par, *intel1par;
  171 	unsigned long orig_bootcspar, orig_romcs1par;
  172 	unsigned long intel0addr, intel0size;
  173 	unsigned long intel1addr, intel1size;
  174 	int intelboot, intel0cs, intel1cs;
  175 	int num_intel_partitions;
  176 #endif
  177 	int rc = 0;
  178 
  179 	nettel_mmcrp = (void *) ioremap_nocache(0xfffef000, 4096);
  180 	if (nettel_mmcrp == NULL) {
  181 		printk("SNAPGEAR: failed to disable MMCR cache??\n");
  182 		return(-EIO);
  183 	}
  184 
  185 	/* Set CPU clock to be 33.000MHz */
  186 	*((unsigned char *) (nettel_mmcrp + 0xc64)) = 0x01;
  187 
  188 	amdpar = (volatile unsigned long *) (nettel_mmcrp + 0xc4);
  189 
  190 #ifdef CONFIG_MTD_CFI_INTELEXT
  191 	intelboot = 0;
  192 	intel0cs = SC520_PAR_ROMCS1;
  193 	intel0par = (volatile unsigned long *) (nettel_mmcrp + 0xc0);
  194 	intel1cs = SC520_PAR_ROMCS2;
  195 	intel1par = (volatile unsigned long *) (nettel_mmcrp + 0xbc);
  196 
  197 	/*
  198 	 *	Save the CS settings then ensure ROMCS1 and ROMCS2 are off,
  199 	 *	otherwise they might clash with where we try to map BOOTCS.
  200 	 */
  201 	orig_bootcspar = *amdpar;
  202 	orig_romcs1par = *intel0par;
  203 	*intel0par = 0;
  204 	*intel1par = 0;
  205 #endif
  206 
  207 	/*
  208 	 *	The first thing to do is determine if we have a separate
  209 	 *	boot FLASH device. Typically this is a small (1 to 2MB)
  210 	 *	AMD FLASH part. It seems that device size is about the
  211 	 *	only way to tell if this is the case...
  212 	 */
  213 	amdaddr = 0x20000000;
  214 	maxsize = AMD_WINDOW_MAXSIZE;
  215 
  216 	*amdpar = SC520_PAR(SC520_PAR_BOOTCS, amdaddr, maxsize);
  217 	__asm__ ("wbinvd");
  218 
  219 	nettel_amd_map.phys = amdaddr;
  220 	nettel_amd_map.virt = ioremap_nocache(amdaddr, maxsize);
  221 	if (!nettel_amd_map.virt) {
  222 		printk("SNAPGEAR: failed to ioremap() BOOTCS\n");
  223 		iounmap(nettel_mmcrp);
  224 		return(-EIO);
  225 	}
  226 	simple_map_init(&nettel_amd_map);
  227 
  228 	if ((amd_mtd = do_map_probe("jedec_probe", &nettel_amd_map))) {
  229 		printk(KERN_NOTICE "SNAPGEAR: AMD flash device size = %dK\n",
  230 			(int)(amd_mtd->size>>10));
  231 
  232 		amd_mtd->owner = THIS_MODULE;
  233 
  234 		/* The high BIOS partition is only present for 2MB units */
  235 		num_amd_partitions = NUM_AMD_PARTITIONS;
  236 		if (amd_mtd->size < AMD_WINDOW_MAXSIZE)
  237 			num_amd_partitions--;
  238 		/* Don't add the partition until after the primary INTEL's */
  239 
  240 #ifdef CONFIG_MTD_CFI_INTELEXT
  241 		/*
  242 		 *	Map the Intel flash into memory after the AMD
  243 		 *	It has to start on a multiple of maxsize.
  244 		 */
  245 		maxsize = SC520_PAR_TO_SIZE(orig_romcs1par);
  246 		if (maxsize < (32 * 1024 * 1024))
  247 			maxsize = (32 * 1024 * 1024);
  248 		intel0addr = amdaddr + maxsize;
  249 #endif
  250 	} else {
  251 #ifdef CONFIG_MTD_CFI_INTELEXT
  252 		/* INTEL boot FLASH */
  253 		intelboot++;
  254 
  255 		if (!orig_romcs1par) {
  256 			intel0cs = SC520_PAR_BOOTCS;
  257 			intel0par = (volatile unsigned long *)
  258 				(nettel_mmcrp + 0xc4);
  259 			intel1cs = SC520_PAR_ROMCS1;
  260 			intel1par = (volatile unsigned long *)
  261 				(nettel_mmcrp + 0xc0);
  262 
  263 			intel0addr = SC520_PAR_TO_ADDR(orig_bootcspar);
  264 			maxsize = SC520_PAR_TO_SIZE(orig_bootcspar);
  265 		} else {
  266 			/* Kernel base is on ROMCS1, not BOOTCS */
  267 			intel0cs = SC520_PAR_ROMCS1;
  268 			intel0par = (volatile unsigned long *)
  269 				(nettel_mmcrp + 0xc0);
  270 			intel1cs = SC520_PAR_BOOTCS;
  271 			intel1par = (volatile unsigned long *)
  272 				(nettel_mmcrp + 0xc4);
  273 
  274 			intel0addr = SC520_PAR_TO_ADDR(orig_romcs1par);
  275 			maxsize = SC520_PAR_TO_SIZE(orig_romcs1par);
  276 		}
  277 
  278 		/* Destroy useless AMD MTD mapping */
  279 		amd_mtd = NULL;
  280 		iounmap(nettel_amd_map.virt);
  281 		nettel_amd_map.virt = NULL;
  282 #else
  283 		/* Only AMD flash supported */
  284 		rc = -ENXIO;
  285 		goto out_unmap2;
  286 #endif
  287 	}
  288 
  289 #ifdef CONFIG_MTD_CFI_INTELEXT
  290 	/*
  291 	 *	We have determined the INTEL FLASH configuration, so lets
  292 	 *	go ahead and probe for them now.
  293 	 */
  294 
  295 	/* Set PAR to the maximum size */
  296 	if (maxsize < (32 * 1024 * 1024))
  297 		maxsize = (32 * 1024 * 1024);
  298 	*intel0par = SC520_PAR(intel0cs, intel0addr, maxsize);
  299 
  300 	/* Turn other PAR off so the first probe doesn't find it */
  301 	*intel1par = 0;
  302 
  303 	/* Probe for the size of the first Intel flash */
  304 	nettel_intel_map.size = maxsize;
  305 	nettel_intel_map.phys = intel0addr;
  306 	nettel_intel_map.virt = ioremap_nocache(intel0addr, maxsize);
  307 	if (!nettel_intel_map.virt) {
  308 		printk("SNAPGEAR: failed to ioremap() ROMCS1\n");
  309 		rc = -EIO;
  310 		goto out_unmap2;
  311 	}
  312 	simple_map_init(&nettel_intel_map);
  313 
  314 	intel_mtd = do_map_probe("cfi_probe", &nettel_intel_map);
  315 	if (!intel_mtd) {
  316 		rc = -ENXIO;
  317 		goto out_unmap1;
  318 	}
  319 
  320 	/* Set PAR to the detected size */
  321 	intel0size = intel_mtd->size;
  322 	*intel0par = SC520_PAR(intel0cs, intel0addr, intel0size);
  323 
  324 	/*
  325 	 *	Map second Intel FLASH right after first. Set its size to the
  326 	 *	same maxsize used for the first Intel FLASH.
  327 	 */
  328 	intel1addr = intel0addr + intel0size;
  329 	*intel1par = SC520_PAR(intel1cs, intel1addr, maxsize);
  330 	__asm__ ("wbinvd");
  331 
  332 	maxsize += intel0size;
  333 
  334 	/* Delete the old map and probe again to do both chips */
  335 	map_destroy(intel_mtd);
  336 	intel_mtd = NULL;
  337 	iounmap(nettel_intel_map.virt);
  338 
  339 	nettel_intel_map.size = maxsize;
  340 	nettel_intel_map.virt = ioremap_nocache(intel0addr, maxsize);
  341 	if (!nettel_intel_map.virt) {
  342 		printk("SNAPGEAR: failed to ioremap() ROMCS1/2\n");
  343 		rc = -EIO;
  344 		goto out_unmap2;
  345 	}
  346 
  347 	intel_mtd = do_map_probe("cfi_probe", &nettel_intel_map);
  348 	if (! intel_mtd) {
  349 		rc = -ENXIO;
  350 		goto out_unmap1;
  351 	}
  352 
  353 	intel1size = intel_mtd->size - intel0size;
  354 	if (intel1size > 0) {
  355 		*intel1par = SC520_PAR(intel1cs, intel1addr, intel1size);
  356 		__asm__ ("wbinvd");
  357 	} else {
  358 		*intel1par = 0;
  359 	}
  360 
  361 	printk(KERN_NOTICE "SNAPGEAR: Intel flash device size = %lldKiB\n",
  362 	       (unsigned long long)(intel_mtd->size >> 10));
  363 
  364 	intel_mtd->owner = THIS_MODULE;
  365 
  366 	num_intel_partitions = ARRAY_SIZE(nettel_intel_partitions);
  367 
  368 	if (intelboot) {
  369 		/*
  370 		 *	Adjust offset and size of last boot partition.
  371 		 *	Must allow for BIOS region at end of FLASH.
  372 		 */
  373 		nettel_intel_partitions[1].size = (intel0size + intel1size) -
  374 			(1024*1024 + intel_mtd->erasesize);
  375 		nettel_intel_partitions[3].size = intel0size + intel1size;
  376 		nettel_intel_partitions[4].offset =
  377 			(intel0size + intel1size) - intel_mtd->erasesize;
  378 		nettel_intel_partitions[4].size = intel_mtd->erasesize;
  379 		nettel_intel_partitions[5].offset =
  380 			nettel_intel_partitions[4].offset;
  381 		nettel_intel_partitions[5].size =
  382 			nettel_intel_partitions[4].size;
  383 	} else {
  384 		/* No BIOS regions when AMD boot */
  385 		num_intel_partitions -= 2;
  386 	}
  387 	rc = mtd_device_register(intel_mtd, nettel_intel_partitions,
  388 				 num_intel_partitions);
  389 #endif
  390 
  391 	if (amd_mtd) {
  392 		rc = mtd_device_register(amd_mtd, nettel_amd_partitions,
  393 					 num_amd_partitions);
  394 	}
  395 
  396 #ifdef CONFIG_MTD_CFI_INTELEXT
  397 	register_reboot_notifier(&nettel_notifier_block);
  398 #endif
  399 
  400 	return(rc);
  401 
  402 #ifdef CONFIG_MTD_CFI_INTELEXT
  403 out_unmap1:
  404 	iounmap(nettel_intel_map.virt);
  405 #endif
  406 
  407 out_unmap2:
  408 	iounmap(nettel_mmcrp);
  409 	iounmap(nettel_amd_map.virt);
  410 
  411 	return(rc);
  412 
  413 }
  414 
  415 /****************************************************************************/
  416 
  417 static void __exit nettel_cleanup(void)
  418 {
  419 #ifdef CONFIG_MTD_CFI_INTELEXT
  420 	unregister_reboot_notifier(&nettel_notifier_block);
  421 #endif
  422 	if (amd_mtd) {
  423 		mtd_device_unregister(amd_mtd);
  424 		map_destroy(amd_mtd);
  425 	}
  426 	if (nettel_mmcrp) {
  427 		iounmap(nettel_mmcrp);
  428 		nettel_mmcrp = NULL;
  429 	}
  430 	if (nettel_amd_map.virt) {
  431 		iounmap(nettel_amd_map.virt);
  432 		nettel_amd_map.virt = NULL;
  433 	}
  434 #ifdef CONFIG_MTD_CFI_INTELEXT
  435 	if (intel_mtd) {
  436 		mtd_device_unregister(intel_mtd);
  437 		map_destroy(intel_mtd);
  438 	}
  439 	if (nettel_intel_map.virt) {
  440 		iounmap(nettel_intel_map.virt);
  441 		nettel_intel_map.virt = NULL;
  442 	}
  443 #endif
  444 }
  445 
  446 /****************************************************************************/
  447 
  448 module_init(nettel_init);
  449 module_exit(nettel_cleanup);
  450 
  451 MODULE_LICENSE("GPL");
  452 MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>");
  453 MODULE_DESCRIPTION("SnapGear/SecureEdge FLASH support");
  454 
  455 /****************************************************************************/
  456 
  457 
  458 
  459 
  460 
  461 /* LDV_COMMENT_BEGIN_MAIN */
  462 #ifdef LDV_MAIN0_sequence_infinite_withcheck_stateful
  463 
  464 /*###########################################################################*/
  465 
  466 /*############## Driver Environment Generator 0.2 output ####################*/
  467 
  468 /*###########################################################################*/
  469 
  470 
  471 
  472 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test if all kernel resources are correctly released by driver before driver will be unloaded. */
  473 void ldv_check_final_state(void);
  474 
  475 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result. */
  476 void ldv_check_return_value(int res);
  477 
  478 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result of probe() function. */
  479 void ldv_check_return_value_probe(int res);
  480 
  481 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Initializes the model. */
  482 void ldv_initialize(void);
  483 
  484 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Reinitializes the model between distinct model function calls. */
  485 void ldv_handler_precall(void);
  486 
  487 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Returns arbitrary interger value. */
  488 int nondet_int(void);
  489 
  490 /* LDV_COMMENT_VAR_DECLARE_LDV Special variable for LDV verifier. */
  491 int LDV_IN_INTERRUPT;
  492 
  493 /* LDV_COMMENT_FUNCTION_MAIN Main function for LDV verifier. */
  494 void ldv_main0_sequence_infinite_withcheck_stateful(void) {
  495 
  496 
  497 
  498 	/* LDV_COMMENT_BEGIN_VARIABLE_DECLARATION_PART */
  499 	/*============================= VARIABLE DECLARATION PART   =============================*/
  500 
  501 
  502 
  503 	/* LDV_COMMENT_END_VARIABLE_DECLARATION_PART */
  504 	/* LDV_COMMENT_BEGIN_VARIABLE_INITIALIZING_PART */
  505 	/*============================= VARIABLE INITIALIZING PART  =============================*/
  506 	LDV_IN_INTERRUPT=1;
  507 
  508 
  509 
  510 
  511 	/* LDV_COMMENT_END_VARIABLE_INITIALIZING_PART */
  512 	/* LDV_COMMENT_BEGIN_FUNCTION_CALL_SECTION */
  513 	/*============================= FUNCTION CALL SECTION       =============================*/
  514 	/* LDV_COMMENT_FUNCTION_CALL Initialize LDV model. */
  515 	ldv_initialize();
  516 
  517 	/** INIT: init_type: ST_MODULE_INIT **/
  518 	/* content: static int __init nettel_init(void)*/
  519 	/* LDV_COMMENT_BEGIN_PREP */
  520 	#define INTEL_BUSWIDTH		1
  521 	#define AMD_WINDOW_MAXSIZE	0x00200000
  522 	#define AMD_BUSWIDTH	 	1
  523 	#define SC520_PAR_ADDR_MASK	0x00003fff
  524 	#define SC520_PAR_ADDR_SHIFT	16
  525 	#define SC520_PAR_TO_ADDR(par) \
  526 	(((par)&SC520_PAR_ADDR_MASK) << SC520_PAR_ADDR_SHIFT)
  527 	#define SC520_PAR_SIZE_MASK	0x01ffc000
  528 	#define SC520_PAR_SIZE_SHIFT	2
  529 	#define SC520_PAR_TO_SIZE(par) \
  530 	((((par)&SC520_PAR_SIZE_MASK) << SC520_PAR_SIZE_SHIFT) + (64*1024))
  531 	#define SC520_PAR(cs, addr, size) \
  532 	((cs) | \
  533 	((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \
  534 	(((addr) >> SC520_PAR_ADDR_SHIFT) & SC520_PAR_ADDR_MASK))
  535 	#define SC520_PAR_BOOTCS	0x8a000000
  536 	#define	SC520_PAR_ROMCS1	0xaa000000
  537 	#define SC520_PAR_ROMCS2	0xca000000	
  538 	#ifdef CONFIG_MTD_CFI_INTELEXT
  539 	#endif
  540 	#ifdef CONFIG_MTD_CFI_INTELEXT
  541 	#endif
  542 	#define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
  543 	#ifdef CONFIG_MTD_CFI_INTELEXT
  544 	#endif
  545 	/* LDV_COMMENT_END_PREP */
  546 	/* LDV_COMMENT_FUNCTION_CALL Kernel calls driver init function after driver loading to kernel. This function declared as "MODULE_INIT(function name)". */
  547 	ldv_handler_precall();
  548 	 if(nettel_init()) 
  549 		goto ldv_final;
  550 	/* LDV_COMMENT_BEGIN_PREP */
  551 	#ifdef CONFIG_MTD_CFI_INTELEXT
  552 	#endif
  553 	#ifdef CONFIG_MTD_CFI_INTELEXT
  554 	#endif
  555 	/* LDV_COMMENT_END_PREP */
  556 
  557 	while(  nondet_int()
  558 	) {
  559 
  560 		switch(nondet_int()) {
  561 
  562 			default: break;
  563 
  564 		}
  565 
  566 	}
  567 
  568 	ldv_module_exit: 
  569 
  570 	/** INIT: init_type: ST_MODULE_EXIT **/
  571 	/* content: static void __exit nettel_cleanup(void)*/
  572 	/* LDV_COMMENT_BEGIN_PREP */
  573 	#define INTEL_BUSWIDTH		1
  574 	#define AMD_WINDOW_MAXSIZE	0x00200000
  575 	#define AMD_BUSWIDTH	 	1
  576 	#define SC520_PAR_ADDR_MASK	0x00003fff
  577 	#define SC520_PAR_ADDR_SHIFT	16
  578 	#define SC520_PAR_TO_ADDR(par) \
  579 	(((par)&SC520_PAR_ADDR_MASK) << SC520_PAR_ADDR_SHIFT)
  580 	#define SC520_PAR_SIZE_MASK	0x01ffc000
  581 	#define SC520_PAR_SIZE_SHIFT	2
  582 	#define SC520_PAR_TO_SIZE(par) \
  583 	((((par)&SC520_PAR_SIZE_MASK) << SC520_PAR_SIZE_SHIFT) + (64*1024))
  584 	#define SC520_PAR(cs, addr, size) \
  585 	((cs) | \
  586 	((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \
  587 	(((addr) >> SC520_PAR_ADDR_SHIFT) & SC520_PAR_ADDR_MASK))
  588 	#define SC520_PAR_BOOTCS	0x8a000000
  589 	#define	SC520_PAR_ROMCS1	0xaa000000
  590 	#define SC520_PAR_ROMCS2	0xca000000	
  591 	#ifdef CONFIG_MTD_CFI_INTELEXT
  592 	#endif
  593 	#ifdef CONFIG_MTD_CFI_INTELEXT
  594 	#endif
  595 	#define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
  596 	#ifdef CONFIG_MTD_CFI_INTELEXT
  597 	#endif
  598 	#ifdef CONFIG_MTD_CFI_INTELEXT
  599 	#endif
  600 	#ifdef CONFIG_MTD_CFI_INTELEXT
  601 	#endif
  602 	#ifdef CONFIG_MTD_CFI_INTELEXT
  603 	#endif
  604 	#ifdef CONFIG_MTD_CFI_INTELEXT
  605 	#else
  606 	#endif
  607 	#ifdef CONFIG_MTD_CFI_INTELEXT
  608 	#endif
  609 	#ifdef CONFIG_MTD_CFI_INTELEXT
  610 	#endif
  611 	#ifdef CONFIG_MTD_CFI_INTELEXT
  612 	#endif
  613 	/* LDV_COMMENT_END_PREP */
  614 	/* LDV_COMMENT_FUNCTION_CALL Kernel calls driver release function before driver will be uploaded from kernel. This function declared as "MODULE_EXIT(function name)". */
  615 	ldv_handler_precall();
  616 	nettel_cleanup();
  617 
  618 	/* LDV_COMMENT_FUNCTION_CALL Checks that all resources and locks are correctly released before the driver will be unloaded. */
  619 	ldv_final: ldv_check_final_state();
  620 
  621 	/* LDV_COMMENT_END_FUNCTION_CALL_SECTION */
  622 	return;
  623 
  624 }
  625 #endif
  626 
  627 /* LDV_COMMENT_END_MAIN */                 1 
    2 #include <asm/io.h>
    3 #include <verifier/rcv.h>
    4 #include <verifier/set.h>
    5 
    6 
    7 Set LDV_IO_MEMS = 0;
    8 
    9 
   10 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_io_mem_remap') Create some io-memory map for specified address */
   11 void *ldv_io_mem_remap(void *addr) {
   12     ldv_assert(ldv_set_not_contains(LDV_IO_MEMS, addr));
   13 
   14     void *ptr = ldv_undef_ptr();
   15     if (ptr != NULL) {
   16         ldv_set_add(LDV_IO_MEMS, addr);
   17         return ptr;
   18     }
   19     return NULL;
   20 }
   21 
   22 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_io_mem_unmap') Delete some io-memory map for specified address */
   23 void ldv_io_mem_unmap(const volatile void *addr) {
   24     ldv_assert(ldv_set_contains(LDV_IO_MEMS, addr));
   25     ldv_set_remove(LDV_IO_MEMS, addr);
   26 }
   27 
   28 /* LDV_COMMENT_MODEL_FUNCTION_DEFINITION(name='ldv_check_final_state') Check that all io-memory map are unmapped properly */
   29 void ldv_check_final_state(void) {
   30     ldv_assert(ldv_set_is_empty(LDV_IO_MEMS));
   31 }
   32 #line 1 "/home/ldvuser/ref_launch/work/current--X--drivers--X--defaultlinux-4.2-rc1.tar.xz--X--152_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/12873/dscv_tempdir/dscv/ri/152_1a/drivers/mtd/maps/nettel.c"
   33 
   34 /****************************************************************************/
   35 
   36 /*
   37  *      nettel.c -- mappings for NETtel/SecureEdge/SnapGear (x86) boards.
   38  *
   39  *      (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
   40  *      (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
   41  */
   42 
   43 /****************************************************************************/
   44 
   45 #include <linux/module.h>
   46 #include <linux/init.h>
   47 #include <linux/types.h>
   48 #include <linux/kernel.h>
   49 #include <linux/mtd/mtd.h>
   50 #include <linux/mtd/map.h>
   51 #include <linux/mtd/partitions.h>
   52 #include <linux/mtd/cfi.h>
   53 #include <linux/reboot.h>
   54 #include <linux/err.h>
   55 #include <linux/kdev_t.h>
   56 #include <linux/root_dev.h>
   57 #include <asm/io.h>
   58 
   59 /****************************************************************************/
   60 
   61 #define INTEL_BUSWIDTH		1
   62 #define AMD_WINDOW_MAXSIZE	0x00200000
   63 #define AMD_BUSWIDTH	 	1
   64 
   65 /*
   66  *	PAR masks and shifts, assuming 64K pages.
   67  */
   68 #define SC520_PAR_ADDR_MASK	0x00003fff
   69 #define SC520_PAR_ADDR_SHIFT	16
   70 #define SC520_PAR_TO_ADDR(par) \
   71 	(((par)&SC520_PAR_ADDR_MASK) << SC520_PAR_ADDR_SHIFT)
   72 
   73 #define SC520_PAR_SIZE_MASK	0x01ffc000
   74 #define SC520_PAR_SIZE_SHIFT	2
   75 #define SC520_PAR_TO_SIZE(par) \
   76 	((((par)&SC520_PAR_SIZE_MASK) << SC520_PAR_SIZE_SHIFT) + (64*1024))
   77 
   78 #define SC520_PAR(cs, addr, size) \
   79 	((cs) | \
   80 	((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \
   81 	(((addr) >> SC520_PAR_ADDR_SHIFT) & SC520_PAR_ADDR_MASK))
   82 
   83 #define SC520_PAR_BOOTCS	0x8a000000
   84 #define	SC520_PAR_ROMCS1	0xaa000000
   85 #define SC520_PAR_ROMCS2	0xca000000	/* Cache disabled, 64K page */
   86 
   87 static void *nettel_mmcrp = NULL;
   88 
   89 #ifdef CONFIG_MTD_CFI_INTELEXT
   90 static struct mtd_info *intel_mtd;
   91 #endif
   92 static struct mtd_info *amd_mtd;
   93 
   94 /****************************************************************************/
   95 
   96 /****************************************************************************/
   97 
   98 #ifdef CONFIG_MTD_CFI_INTELEXT
   99 static struct map_info nettel_intel_map = {
  100 	.name = "SnapGear Intel",
  101 	.size = 0,
  102 	.bankwidth = INTEL_BUSWIDTH,
  103 };
  104 
  105 static struct mtd_partition nettel_intel_partitions[] = {
  106 	{
  107 		.name = "SnapGear kernel",
  108 		.offset = 0,
  109 		.size = 0x000e0000
  110 	},
  111 	{
  112 		.name = "SnapGear filesystem",
  113 		.offset = 0x00100000,
  114 	},
  115 	{
  116 		.name = "SnapGear config",
  117 		.offset = 0x000e0000,
  118 		.size = 0x00020000
  119 	},
  120 	{
  121 		.name = "SnapGear Intel",
  122 		.offset = 0
  123 	},
  124 	{
  125 		.name = "SnapGear BIOS Config",
  126 		.offset = 0x007e0000,
  127 		.size = 0x00020000
  128 	},
  129 	{
  130 		.name = "SnapGear BIOS",
  131 		.offset = 0x007e0000,
  132 		.size = 0x00020000
  133 	},
  134 };
  135 #endif
  136 
  137 static struct map_info nettel_amd_map = {
  138 	.name = "SnapGear AMD",
  139 	.size = AMD_WINDOW_MAXSIZE,
  140 	.bankwidth = AMD_BUSWIDTH,
  141 };
  142 
  143 static struct mtd_partition nettel_amd_partitions[] = {
  144 	{
  145 		.name = "SnapGear BIOS config",
  146 		.offset = 0x000e0000,
  147 		.size = 0x00010000
  148 	},
  149 	{
  150 		.name = "SnapGear BIOS",
  151 		.offset = 0x000f0000,
  152 		.size = 0x00010000
  153 	},
  154 	{
  155 		.name = "SnapGear AMD",
  156 		.offset = 0
  157 	},
  158 	{
  159 		.name = "SnapGear high BIOS",
  160 		.offset = 0x001f0000,
  161 		.size = 0x00010000
  162 	}
  163 };
  164 
  165 #define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
  166 
  167 /****************************************************************************/
  168 
  169 #ifdef CONFIG_MTD_CFI_INTELEXT
  170 
  171 /*
  172  *	Set the Intel flash back to read mode since some old boot
  173  *	loaders don't.
  174  */
  175 static int nettel_reboot_notifier(struct notifier_block *nb, unsigned long val, void *v)
  176 {
  177 	struct cfi_private *cfi = nettel_intel_map.fldrv_priv;
  178 	unsigned long b;
  179 
  180 	/* Make sure all FLASH chips are put back into read mode */
  181 	for (b = 0; (b < nettel_intel_partitions[3].size); b += 0x100000) {
  182 		cfi_send_gen_cmd(0xff, 0x55, b, &nettel_intel_map, cfi,
  183 			cfi->device_type, NULL);
  184 	}
  185 	return(NOTIFY_OK);
  186 }
  187 
  188 static struct notifier_block nettel_notifier_block = {
  189 	nettel_reboot_notifier, NULL, 0
  190 };
  191 
  192 #endif
  193 
  194 /****************************************************************************/
  195 
  196 static int __init nettel_init(void)
  197 {
  198 	volatile unsigned long *amdpar;
  199 	unsigned long amdaddr, maxsize;
  200 	int num_amd_partitions=0;
  201 #ifdef CONFIG_MTD_CFI_INTELEXT
  202 	volatile unsigned long *intel0par, *intel1par;
  203 	unsigned long orig_bootcspar, orig_romcs1par;
  204 	unsigned long intel0addr, intel0size;
  205 	unsigned long intel1addr, intel1size;
  206 	int intelboot, intel0cs, intel1cs;
  207 	int num_intel_partitions;
  208 #endif
  209 	int rc = 0;
  210 
  211 	nettel_mmcrp = (void *) ioremap_nocache(0xfffef000, 4096);
  212 	if (nettel_mmcrp == NULL) {
  213 		printk("SNAPGEAR: failed to disable MMCR cache??\n");
  214 		return(-EIO);
  215 	}
  216 
  217 	/* Set CPU clock to be 33.000MHz */
  218 	*((unsigned char *) (nettel_mmcrp + 0xc64)) = 0x01;
  219 
  220 	amdpar = (volatile unsigned long *) (nettel_mmcrp + 0xc4);
  221 
  222 #ifdef CONFIG_MTD_CFI_INTELEXT
  223 	intelboot = 0;
  224 	intel0cs = SC520_PAR_ROMCS1;
  225 	intel0par = (volatile unsigned long *) (nettel_mmcrp + 0xc0);
  226 	intel1cs = SC520_PAR_ROMCS2;
  227 	intel1par = (volatile unsigned long *) (nettel_mmcrp + 0xbc);
  228 
  229 	/*
  230 	 *	Save the CS settings then ensure ROMCS1 and ROMCS2 are off,
  231 	 *	otherwise they might clash with where we try to map BOOTCS.
  232 	 */
  233 	orig_bootcspar = *amdpar;
  234 	orig_romcs1par = *intel0par;
  235 	*intel0par = 0;
  236 	*intel1par = 0;
  237 #endif
  238 
  239 	/*
  240 	 *	The first thing to do is determine if we have a separate
  241 	 *	boot FLASH device. Typically this is a small (1 to 2MB)
  242 	 *	AMD FLASH part. It seems that device size is about the
  243 	 *	only way to tell if this is the case...
  244 	 */
  245 	amdaddr = 0x20000000;
  246 	maxsize = AMD_WINDOW_MAXSIZE;
  247 
  248 	*amdpar = SC520_PAR(SC520_PAR_BOOTCS, amdaddr, maxsize);
  249 	__asm__ ("wbinvd");
  250 
  251 	nettel_amd_map.phys = amdaddr;
  252 	nettel_amd_map.virt = ioremap_nocache(amdaddr, maxsize);
  253 	if (!nettel_amd_map.virt) {
  254 		printk("SNAPGEAR: failed to ioremap() BOOTCS\n");
  255 		iounmap(nettel_mmcrp);
  256 		return(-EIO);
  257 	}
  258 	simple_map_init(&nettel_amd_map);
  259 
  260 	if ((amd_mtd = do_map_probe("jedec_probe", &nettel_amd_map))) {
  261 		printk(KERN_NOTICE "SNAPGEAR: AMD flash device size = %dK\n",
  262 			(int)(amd_mtd->size>>10));
  263 
  264 		amd_mtd->owner = THIS_MODULE;
  265 
  266 		/* The high BIOS partition is only present for 2MB units */
  267 		num_amd_partitions = NUM_AMD_PARTITIONS;
  268 		if (amd_mtd->size < AMD_WINDOW_MAXSIZE)
  269 			num_amd_partitions--;
  270 		/* Don't add the partition until after the primary INTEL's */
  271 
  272 #ifdef CONFIG_MTD_CFI_INTELEXT
  273 		/*
  274 		 *	Map the Intel flash into memory after the AMD
  275 		 *	It has to start on a multiple of maxsize.
  276 		 */
  277 		maxsize = SC520_PAR_TO_SIZE(orig_romcs1par);
  278 		if (maxsize < (32 * 1024 * 1024))
  279 			maxsize = (32 * 1024 * 1024);
  280 		intel0addr = amdaddr + maxsize;
  281 #endif
  282 	} else {
  283 #ifdef CONFIG_MTD_CFI_INTELEXT
  284 		/* INTEL boot FLASH */
  285 		intelboot++;
  286 
  287 		if (!orig_romcs1par) {
  288 			intel0cs = SC520_PAR_BOOTCS;
  289 			intel0par = (volatile unsigned long *)
  290 				(nettel_mmcrp + 0xc4);
  291 			intel1cs = SC520_PAR_ROMCS1;
  292 			intel1par = (volatile unsigned long *)
  293 				(nettel_mmcrp + 0xc0);
  294 
  295 			intel0addr = SC520_PAR_TO_ADDR(orig_bootcspar);
  296 			maxsize = SC520_PAR_TO_SIZE(orig_bootcspar);
  297 		} else {
  298 			/* Kernel base is on ROMCS1, not BOOTCS */
  299 			intel0cs = SC520_PAR_ROMCS1;
  300 			intel0par = (volatile unsigned long *)
  301 				(nettel_mmcrp + 0xc0);
  302 			intel1cs = SC520_PAR_BOOTCS;
  303 			intel1par = (volatile unsigned long *)
  304 				(nettel_mmcrp + 0xc4);
  305 
  306 			intel0addr = SC520_PAR_TO_ADDR(orig_romcs1par);
  307 			maxsize = SC520_PAR_TO_SIZE(orig_romcs1par);
  308 		}
  309 
  310 		/* Destroy useless AMD MTD mapping */
  311 		amd_mtd = NULL;
  312 		iounmap(nettel_amd_map.virt);
  313 		nettel_amd_map.virt = NULL;
  314 #else
  315 		/* Only AMD flash supported */
  316 		rc = -ENXIO;
  317 		goto out_unmap2;
  318 #endif
  319 	}
  320 
  321 #ifdef CONFIG_MTD_CFI_INTELEXT
  322 	/*
  323 	 *	We have determined the INTEL FLASH configuration, so lets
  324 	 *	go ahead and probe for them now.
  325 	 */
  326 
  327 	/* Set PAR to the maximum size */
  328 	if (maxsize < (32 * 1024 * 1024))
  329 		maxsize = (32 * 1024 * 1024);
  330 	*intel0par = SC520_PAR(intel0cs, intel0addr, maxsize);
  331 
  332 	/* Turn other PAR off so the first probe doesn't find it */
  333 	*intel1par = 0;
  334 
  335 	/* Probe for the size of the first Intel flash */
  336 	nettel_intel_map.size = maxsize;
  337 	nettel_intel_map.phys = intel0addr;
  338 	nettel_intel_map.virt = ioremap_nocache(intel0addr, maxsize);
  339 	if (!nettel_intel_map.virt) {
  340 		printk("SNAPGEAR: failed to ioremap() ROMCS1\n");
  341 		rc = -EIO;
  342 		goto out_unmap2;
  343 	}
  344 	simple_map_init(&nettel_intel_map);
  345 
  346 	intel_mtd = do_map_probe("cfi_probe", &nettel_intel_map);
  347 	if (!intel_mtd) {
  348 		rc = -ENXIO;
  349 		goto out_unmap1;
  350 	}
  351 
  352 	/* Set PAR to the detected size */
  353 	intel0size = intel_mtd->size;
  354 	*intel0par = SC520_PAR(intel0cs, intel0addr, intel0size);
  355 
  356 	/*
  357 	 *	Map second Intel FLASH right after first. Set its size to the
  358 	 *	same maxsize used for the first Intel FLASH.
  359 	 */
  360 	intel1addr = intel0addr + intel0size;
  361 	*intel1par = SC520_PAR(intel1cs, intel1addr, maxsize);
  362 	__asm__ ("wbinvd");
  363 
  364 	maxsize += intel0size;
  365 
  366 	/* Delete the old map and probe again to do both chips */
  367 	map_destroy(intel_mtd);
  368 	intel_mtd = NULL;
  369 	iounmap(nettel_intel_map.virt);
  370 
  371 	nettel_intel_map.size = maxsize;
  372 	nettel_intel_map.virt = ioremap_nocache(intel0addr, maxsize);
  373 	if (!nettel_intel_map.virt) {
  374 		printk("SNAPGEAR: failed to ioremap() ROMCS1/2\n");
  375 		rc = -EIO;
  376 		goto out_unmap2;
  377 	}
  378 
  379 	intel_mtd = do_map_probe("cfi_probe", &nettel_intel_map);
  380 	if (! intel_mtd) {
  381 		rc = -ENXIO;
  382 		goto out_unmap1;
  383 	}
  384 
  385 	intel1size = intel_mtd->size - intel0size;
  386 	if (intel1size > 0) {
  387 		*intel1par = SC520_PAR(intel1cs, intel1addr, intel1size);
  388 		__asm__ ("wbinvd");
  389 	} else {
  390 		*intel1par = 0;
  391 	}
  392 
  393 	printk(KERN_NOTICE "SNAPGEAR: Intel flash device size = %lldKiB\n",
  394 	       (unsigned long long)(intel_mtd->size >> 10));
  395 
  396 	intel_mtd->owner = THIS_MODULE;
  397 
  398 	num_intel_partitions = ARRAY_SIZE(nettel_intel_partitions);
  399 
  400 	if (intelboot) {
  401 		/*
  402 		 *	Adjust offset and size of last boot partition.
  403 		 *	Must allow for BIOS region at end of FLASH.
  404 		 */
  405 		nettel_intel_partitions[1].size = (intel0size + intel1size) -
  406 			(1024*1024 + intel_mtd->erasesize);
  407 		nettel_intel_partitions[3].size = intel0size + intel1size;
  408 		nettel_intel_partitions[4].offset =
  409 			(intel0size + intel1size) - intel_mtd->erasesize;
  410 		nettel_intel_partitions[4].size = intel_mtd->erasesize;
  411 		nettel_intel_partitions[5].offset =
  412 			nettel_intel_partitions[4].offset;
  413 		nettel_intel_partitions[5].size =
  414 			nettel_intel_partitions[4].size;
  415 	} else {
  416 		/* No BIOS regions when AMD boot */
  417 		num_intel_partitions -= 2;
  418 	}
  419 	rc = mtd_device_register(intel_mtd, nettel_intel_partitions,
  420 				 num_intel_partitions);
  421 #endif
  422 
  423 	if (amd_mtd) {
  424 		rc = mtd_device_register(amd_mtd, nettel_amd_partitions,
  425 					 num_amd_partitions);
  426 	}
  427 
  428 #ifdef CONFIG_MTD_CFI_INTELEXT
  429 	register_reboot_notifier(&nettel_notifier_block);
  430 #endif
  431 
  432 	return(rc);
  433 
  434 #ifdef CONFIG_MTD_CFI_INTELEXT
  435 out_unmap1:
  436 	iounmap(nettel_intel_map.virt);
  437 #endif
  438 
  439 out_unmap2:
  440 	iounmap(nettel_mmcrp);
  441 	iounmap(nettel_amd_map.virt);
  442 
  443 	return(rc);
  444 
  445 }
  446 
  447 /****************************************************************************/
  448 
  449 static void __exit nettel_cleanup(void)
  450 {
  451 #ifdef CONFIG_MTD_CFI_INTELEXT
  452 	unregister_reboot_notifier(&nettel_notifier_block);
  453 #endif
  454 	if (amd_mtd) {
  455 		mtd_device_unregister(amd_mtd);
  456 		map_destroy(amd_mtd);
  457 	}
  458 	if (nettel_mmcrp) {
  459 		iounmap(nettel_mmcrp);
  460 		nettel_mmcrp = NULL;
  461 	}
  462 	if (nettel_amd_map.virt) {
  463 		iounmap(nettel_amd_map.virt);
  464 		nettel_amd_map.virt = NULL;
  465 	}
  466 #ifdef CONFIG_MTD_CFI_INTELEXT
  467 	if (intel_mtd) {
  468 		mtd_device_unregister(intel_mtd);
  469 		map_destroy(intel_mtd);
  470 	}
  471 	if (nettel_intel_map.virt) {
  472 		iounmap(nettel_intel_map.virt);
  473 		nettel_intel_map.virt = NULL;
  474 	}
  475 #endif
  476 }
  477 
  478 /****************************************************************************/
  479 
  480 module_init(nettel_init);
  481 module_exit(nettel_cleanup);
  482 
  483 MODULE_LICENSE("GPL");
  484 MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>");
  485 MODULE_DESCRIPTION("SnapGear/SecureEdge FLASH support");
  486 
  487 /****************************************************************************/
  488 
  489 
  490 
  491 
  492 
  493 /* LDV_COMMENT_BEGIN_MAIN */
  494 #ifdef LDV_MAIN0_sequence_infinite_withcheck_stateful
  495 
  496 /*###########################################################################*/
  497 
  498 /*############## Driver Environment Generator 0.2 output ####################*/
  499 
  500 /*###########################################################################*/
  501 
  502 
  503 
  504 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test if all kernel resources are correctly released by driver before driver will be unloaded. */
  505 void ldv_check_final_state(void);
  506 
  507 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result. */
  508 void ldv_check_return_value(int res);
  509 
  510 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Test correct return result of probe() function. */
  511 void ldv_check_return_value_probe(int res);
  512 
  513 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Initializes the model. */
  514 void ldv_initialize(void);
  515 
  516 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Reinitializes the model between distinct model function calls. */
  517 void ldv_handler_precall(void);
  518 
  519 /* LDV_COMMENT_FUNCTION_DECLARE_LDV Special function for LDV verifier. Returns arbitrary interger value. */
  520 int nondet_int(void);
  521 
  522 /* LDV_COMMENT_VAR_DECLARE_LDV Special variable for LDV verifier. */
  523 int LDV_IN_INTERRUPT;
  524 
  525 /* LDV_COMMENT_FUNCTION_MAIN Main function for LDV verifier. */
  526 void ldv_main0_sequence_infinite_withcheck_stateful(void) {
  527 
  528 
  529 
  530 	/* LDV_COMMENT_BEGIN_VARIABLE_DECLARATION_PART */
  531 	/*============================= VARIABLE DECLARATION PART   =============================*/
  532 
  533 
  534 
  535 	/* LDV_COMMENT_END_VARIABLE_DECLARATION_PART */
  536 	/* LDV_COMMENT_BEGIN_VARIABLE_INITIALIZING_PART */
  537 	/*============================= VARIABLE INITIALIZING PART  =============================*/
  538 	LDV_IN_INTERRUPT=1;
  539 
  540 
  541 
  542 
  543 	/* LDV_COMMENT_END_VARIABLE_INITIALIZING_PART */
  544 	/* LDV_COMMENT_BEGIN_FUNCTION_CALL_SECTION */
  545 	/*============================= FUNCTION CALL SECTION       =============================*/
  546 	/* LDV_COMMENT_FUNCTION_CALL Initialize LDV model. */
  547 	ldv_initialize();
  548 
  549 	/** INIT: init_type: ST_MODULE_INIT **/
  550 	/* content: static int __init nettel_init(void)*/
  551 	/* LDV_COMMENT_BEGIN_PREP */
  552 	#define INTEL_BUSWIDTH		1
  553 	#define AMD_WINDOW_MAXSIZE	0x00200000
  554 	#define AMD_BUSWIDTH	 	1
  555 	#define SC520_PAR_ADDR_MASK	0x00003fff
  556 	#define SC520_PAR_ADDR_SHIFT	16
  557 	#define SC520_PAR_TO_ADDR(par) \
  558 	(((par)&SC520_PAR_ADDR_MASK) << SC520_PAR_ADDR_SHIFT)
  559 	#define SC520_PAR_SIZE_MASK	0x01ffc000
  560 	#define SC520_PAR_SIZE_SHIFT	2
  561 	#define SC520_PAR_TO_SIZE(par) \
  562 	((((par)&SC520_PAR_SIZE_MASK) << SC520_PAR_SIZE_SHIFT) + (64*1024))
  563 	#define SC520_PAR(cs, addr, size) \
  564 	((cs) | \
  565 	((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \
  566 	(((addr) >> SC520_PAR_ADDR_SHIFT) & SC520_PAR_ADDR_MASK))
  567 	#define SC520_PAR_BOOTCS	0x8a000000
  568 	#define	SC520_PAR_ROMCS1	0xaa000000
  569 	#define SC520_PAR_ROMCS2	0xca000000	
  570 	#ifdef CONFIG_MTD_CFI_INTELEXT
  571 	#endif
  572 	#ifdef CONFIG_MTD_CFI_INTELEXT
  573 	#endif
  574 	#define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
  575 	#ifdef CONFIG_MTD_CFI_INTELEXT
  576 	#endif
  577 	/* LDV_COMMENT_END_PREP */
  578 	/* LDV_COMMENT_FUNCTION_CALL Kernel calls driver init function after driver loading to kernel. This function declared as "MODULE_INIT(function name)". */
  579 	ldv_handler_precall();
  580 	 if(nettel_init()) 
  581 		goto ldv_final;
  582 	/* LDV_COMMENT_BEGIN_PREP */
  583 	#ifdef CONFIG_MTD_CFI_INTELEXT
  584 	#endif
  585 	#ifdef CONFIG_MTD_CFI_INTELEXT
  586 	#endif
  587 	/* LDV_COMMENT_END_PREP */
  588 
  589 	while(  nondet_int()
  590 	) {
  591 
  592 		switch(nondet_int()) {
  593 
  594 			default: break;
  595 
  596 		}
  597 
  598 	}
  599 
  600 	ldv_module_exit: 
  601 
  602 	/** INIT: init_type: ST_MODULE_EXIT **/
  603 	/* content: static void __exit nettel_cleanup(void)*/
  604 	/* LDV_COMMENT_BEGIN_PREP */
  605 	#define INTEL_BUSWIDTH		1
  606 	#define AMD_WINDOW_MAXSIZE	0x00200000
  607 	#define AMD_BUSWIDTH	 	1
  608 	#define SC520_PAR_ADDR_MASK	0x00003fff
  609 	#define SC520_PAR_ADDR_SHIFT	16
  610 	#define SC520_PAR_TO_ADDR(par) \
  611 	(((par)&SC520_PAR_ADDR_MASK) << SC520_PAR_ADDR_SHIFT)
  612 	#define SC520_PAR_SIZE_MASK	0x01ffc000
  613 	#define SC520_PAR_SIZE_SHIFT	2
  614 	#define SC520_PAR_TO_SIZE(par) \
  615 	((((par)&SC520_PAR_SIZE_MASK) << SC520_PAR_SIZE_SHIFT) + (64*1024))
  616 	#define SC520_PAR(cs, addr, size) \
  617 	((cs) | \
  618 	((((size)-(64*1024)) >> SC520_PAR_SIZE_SHIFT) & SC520_PAR_SIZE_MASK) | \
  619 	(((addr) >> SC520_PAR_ADDR_SHIFT) & SC520_PAR_ADDR_MASK))
  620 	#define SC520_PAR_BOOTCS	0x8a000000
  621 	#define	SC520_PAR_ROMCS1	0xaa000000
  622 	#define SC520_PAR_ROMCS2	0xca000000	
  623 	#ifdef CONFIG_MTD_CFI_INTELEXT
  624 	#endif
  625 	#ifdef CONFIG_MTD_CFI_INTELEXT
  626 	#endif
  627 	#define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
  628 	#ifdef CONFIG_MTD_CFI_INTELEXT
  629 	#endif
  630 	#ifdef CONFIG_MTD_CFI_INTELEXT
  631 	#endif
  632 	#ifdef CONFIG_MTD_CFI_INTELEXT
  633 	#endif
  634 	#ifdef CONFIG_MTD_CFI_INTELEXT
  635 	#endif
  636 	#ifdef CONFIG_MTD_CFI_INTELEXT
  637 	#else
  638 	#endif
  639 	#ifdef CONFIG_MTD_CFI_INTELEXT
  640 	#endif
  641 	#ifdef CONFIG_MTD_CFI_INTELEXT
  642 	#endif
  643 	#ifdef CONFIG_MTD_CFI_INTELEXT
  644 	#endif
  645 	/* LDV_COMMENT_END_PREP */
  646 	/* LDV_COMMENT_FUNCTION_CALL Kernel calls driver release function before driver will be uploaded from kernel. This function declared as "MODULE_EXIT(function name)". */
  647 	ldv_handler_precall();
  648 	nettel_cleanup();
  649 
  650 	/* LDV_COMMENT_FUNCTION_CALL Checks that all resources and locks are correctly released before the driver will be unloaded. */
  651 	ldv_final: ldv_check_final_state();
  652 
  653 	/* LDV_COMMENT_END_FUNCTION_CALL_SECTION */
  654 	return;
  655 
  656 }
  657 #endif
  658 
  659 /* LDV_COMMENT_END_MAIN */
  660 
  661 #line 32 "/home/ldvuser/ref_launch/work/current--X--drivers--X--defaultlinux-4.2-rc1.tar.xz--X--152_1a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/12873/dscv_tempdir/dscv/ri/152_1a/drivers/mtd/maps/nettel.o.c.prepared"                 1 #ifndef _LDV_RCV_H_
    2 #define _LDV_RCV_H_
    3 
    4 /* If expr evaluates to zero, ldv_assert() causes a program to reach the error
    5    label like the standard assert(). */
    6 #define ldv_assert(expr) ((expr) ? 0 : ldv_error())
    7 
    8 /* The error label wrapper. It is used because of some static verifiers (like
    9    BLAST) don't accept multiple error labels through a program. */
   10 static inline void ldv_error(void)
   11 {
   12   LDV_ERROR: goto LDV_ERROR;
   13 }
   14 
   15 /* If expr evaluates to zero, ldv_assume() causes an infinite loop that is
   16    avoided by verifiers. */
   17 #define ldv_assume(expr) ((expr) ? 0 : ldv_stop())
   18 
   19 /* Infinite loop, that causes verifiers to skip such paths. */
   20 static inline void ldv_stop(void) {
   21   LDV_STOP: goto LDV_STOP;
   22 }
   23 
   24 /* Special nondeterministic functions. */
   25 int ldv_undef_int(void);
   26 void *ldv_undef_ptr(void);
   27 unsigned long ldv_undef_ulong(void);
   28 long ldv_undef_long(void);
   29 /* Return nondeterministic negative integer number. */
   30 static inline int ldv_undef_int_negative(void)
   31 {
   32   int ret = ldv_undef_int();
   33 
   34   ldv_assume(ret < 0);
   35 
   36   return ret;
   37 }
   38 /* Return nondeterministic nonpositive integer number. */
   39 static inline int ldv_undef_int_nonpositive(void)
   40 {
   41   int ret = ldv_undef_int();
   42 
   43   ldv_assume(ret <= 0);
   44 
   45   return ret;
   46 }
   47 
   48 /* Add explicit model for __builin_expect GCC function. Without the model a
   49    return value will be treated as nondetermined by verifiers. */
   50 static inline long __builtin_expect(long exp, long c)
   51 {
   52   return exp;
   53 }
   54 
   55 /* This function causes the program to exit abnormally. GCC implements this
   56 function by using a target-dependent mechanism (such as intentionally executing
   57 an illegal instruction) or by calling abort. The mechanism used may vary from
   58 release to release so you should not rely on any particular implementation.
   59 http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */
   60 static inline void __builtin_trap(void)
   61 {
   62   ldv_assert(0);
   63 }
   64 
   65 /* The constant is for simulating an error of ldv_undef_ptr() function. */
   66 #define LDV_PTR_MAX 2012
   67 
   68 #endif /* _LDV_RCV_H_ */            | 
Here is an explanation of a rule violation arisen while checking your driver against a corresponding kernel.
Note that it may be false positive, i.e. there isn't a real error indeed. Please analyze a given error trace and related source code to understand whether there is an error in your driver.
Error trace column contains a path on which the given rule is violated. You can expand/collapse some entity classes by clicking on corresponding checkboxes in a main menu or in an advanced Others menu. Also you can expand/collapse each particular entity by clicking on +/-. In hovering on some entities you can see some tips. Also the error trace is bound with related source code. Line numbers may be shown as links on the left. You can click on them to open corresponding lines in source code.
Source code column contains a content of files related with the error trace. There is source code of your driver (note that there are some LDV modifications at the end), kernel headers and rule model. Tabs show a currently opened file and other available files. In hovering on them you can see full file names. On clicking a corresponding file content will be shown.
| Ядро | Модуль | Правило | Верификатор | Вердикт | Статус | Время создания | Описание проблемы | 
| linux-4.2-rc1.tar.xz | drivers/mtd/maps/nettel.ko | 152_1a | CPAchecker | Bug | Fixed | 2015-08-14 23:15:32 | L0203 | 
Комментарий
reported: 14 Aug 2015
[В начало]