extern void __VERIFIER_error() __attribute__ ((__noreturn__)); /* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef signed char __s8; typedef short __s16; typedef unsigned short __u16; typedef int __s32; typedef unsigned int __u32; typedef unsigned long long __u64; typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef unsigned short umode_t; typedef unsigned short __kernel_mode_t; typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef long __kernel_time_t; typedef int __kernel_clockid_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef long long __kernel_loff_t; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef __kernel_mode_t mode_t; typedef __kernel_clockid_t clockid_t; typedef _Bool bool; typedef __kernel_uid32_t uid_t; typedef __kernel_gid32_t gid_t; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef __kernel_time_t time_t; typedef u64 sector_t; typedef u64 blkcnt_t; typedef unsigned int gfp_t; typedef unsigned int fmode_t; typedef u32 phys_addr_t; typedef phys_addr_t resource_size_t; struct __anonstruct_atomic_t_6 { int counter ; }; typedef struct __anonstruct_atomic_t_6 atomic_t; struct list_head { struct list_head *next ; struct list_head *prev ; }; struct hlist_node; struct hlist_head { struct hlist_node *first ; }; struct hlist_node { struct hlist_node *next ; struct hlist_node **pprev ; }; struct outer_cache_fns { void (*inv_range)(unsigned long , unsigned long ) ; void (*clean_range)(unsigned long , unsigned long ) ; void (*flush_range)(unsigned long , unsigned long ) ; void (*flush_all)(void) ; void (*inv_all)(void) ; void (*disable)(void) ; void (*sync)(void) ; void (*set_debug)(unsigned long ) ; }; struct task_struct; typedef void (*ctor_fn_t)(void); struct completion; struct pid; struct timespec; struct __anonstruct_arch_spinlock_t_11 { unsigned int volatile slock ; }; typedef struct __anonstruct_arch_spinlock_t_11 arch_spinlock_t; struct __anonstruct_arch_rwlock_t_12 { }; typedef struct __anonstruct_arch_rwlock_t_12 arch_rwlock_t; struct lockdep_map; typedef atomic_t atomic_long_t; struct stack_trace { unsigned int nr_entries ; unsigned int max_entries ; unsigned long *entries ; int skip ; }; struct lockdep_subclass_key { char __one_byte ; }; struct lock_class_key { struct lockdep_subclass_key subkeys[8U] ; }; 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 ; char const *name ; int name_version ; unsigned long contention_point[4U] ; unsigned long contending_point[4U] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache[2U] ; char const *name ; int cpu ; unsigned long ip ; }; struct raw_spinlock { arch_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct raw_spinlock raw_spinlock_t; struct __anonstruct_ldv_2856_15 { u8 __padding[16U] ; struct lockdep_map dep_map ; }; union __anonunion_ldv_2857_14 { struct raw_spinlock rlock ; struct __anonstruct_ldv_2856_15 ldv_2856 ; }; struct spinlock { union __anonunion_ldv_2857_14 ldv_2857 ; }; typedef struct spinlock spinlock_t; struct __anonstruct_rwlock_t_16 { arch_rwlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_rwlock_t_16 rwlock_t; struct __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct seqcount { unsigned int sequence ; }; typedef struct seqcount seqcount_t; struct page; struct vm_area_struct; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct task_struct *owner ; char const *name ; void *magic ; struct lockdep_map dep_map ; }; struct rw_semaphore; struct rw_semaphore { __s32 activity ; spinlock_t wait_lock ; struct list_head wait_list ; struct lockdep_map dep_map ; }; struct timespec { __kernel_time_t tv_sec ; long tv_nsec ; }; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct tvec_base; struct timer_list { struct list_head entry ; unsigned long expires ; struct tvec_base *base ; void (*function)(unsigned long ) ; unsigned long data ; int slack ; int start_pid ; void *start_site ; char start_comm[16U] ; struct lockdep_map lockdep_map ; }; struct hrtimer; enum hrtimer_restart; struct work_struct; struct work_struct { atomic_long_t data ; struct list_head entry ; void (*func)(struct work_struct * ) ; struct lockdep_map lockdep_map ; }; struct sock; struct kobject; enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ; struct kobj_ns_type_operations { enum kobj_ns_type type ; void *(*grab_current_ns)(void) ; void const *(*netlink_ns)(struct sock * ) ; void const *(*initial_ns)(void) ; void (*drop_ns)(void * ) ; }; struct module; struct attribute { char const *name ; mode_t mode ; struct lock_class_key *key ; struct lock_class_key skey ; }; struct attribute_group { char const *name ; mode_t (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; }; struct file; 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 * ) ; }; struct sysfs_ops { ssize_t (*show)(struct kobject * , struct attribute * , char * ) ; ssize_t (*store)(struct kobject * , struct attribute * , char const * , size_t ) ; }; struct sysfs_dirent; struct kref { atomic_t refcount ; }; struct kset; struct kobj_type; struct kobject { char const *name ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct sysfs_dirent *sd ; struct kref kref ; unsigned char state_initialized : 1 ; unsigned char state_in_sysfs : 1 ; unsigned char state_add_uevent_sent : 1 ; unsigned char state_remove_uevent_sent : 1 ; unsigned char uevent_suppress : 1 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops const *sysfs_ops ; struct attribute **default_attrs ; struct kobj_ns_type_operations const *(*child_ns_type)(struct kobject * ) ; void const *(*namespace)(struct kobject * ) ; }; struct kobj_uevent_env { char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (* const filter)(struct kset * , struct kobject * ) ; char const *(* const name)(struct kset * , struct kobject * ) ; int (* const uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ; }; struct kset { struct list_head list ; spinlock_t list_lock ; struct kobject kobj ; struct kset_uevent_ops const *uevent_ops ; }; enum irqreturn { IRQ_NONE = 0, IRQ_HANDLED = 1, IRQ_WAKE_THREAD = 2 } ; typedef enum irqreturn irqreturn_t; struct platform_device; struct device; struct rtc_time; struct rtc_wkalrm; struct kstat { u64 ino ; dev_t dev ; umode_t mode ; unsigned int nlink ; uid_t uid ; gid_t gid ; dev_t rdev ; loff_t size ; struct timespec atime ; struct timespec mtime ; struct timespec ctime ; unsigned long blksize ; unsigned long long blocks ; }; struct completion { unsigned int done ; wait_queue_head_t wait ; }; struct rcu_head { struct rcu_head *next ; void (*func)(struct rcu_head * ) ; }; struct cred; typedef __u32 Elf32_Addr; typedef __u16 Elf32_Half; typedef __u32 Elf32_Word; struct elf32_sym { Elf32_Word st_name ; Elf32_Addr st_value ; Elf32_Word st_size ; unsigned char st_info ; unsigned char st_other ; Elf32_Half st_shndx ; }; typedef struct elf32_sym Elf32_Sym; struct kernel_param; struct kernel_param_ops { int (*set)(char const * , struct kernel_param const * ) ; int (*get)(char * , struct kernel_param const * ) ; void (*free)(void * ) ; }; struct kparam_string; struct kparam_array; union __anonunion_ldv_8098_24 { void *arg ; struct kparam_string const *str ; struct kparam_array const *arr ; }; struct kernel_param { char const *name ; struct kernel_param_ops const *ops ; u16 perm ; u16 flags ; union __anonunion_ldv_8098_24 ldv_8098 ; }; struct kparam_string { unsigned int maxlen ; char *string ; }; struct kparam_array { unsigned int max ; unsigned int elemsize ; unsigned int *num ; struct kernel_param_ops const *ops ; void *elem ; }; struct jump_label_key { atomic_t enabled ; }; struct tracepoint; struct tracepoint_func { void *func ; void *data ; }; struct tracepoint { char const *name ; struct jump_label_key key ; void (*regfunc)(void) ; void (*unregfunc)(void) ; struct tracepoint_func *funcs ; }; struct unwind_table; struct mod_arch_specific { struct unwind_table *unwind[5U] ; }; struct kernel_symbol { unsigned long value ; char const *name ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; struct module_param_attrs; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; struct module_param_attrs *mp ; }; struct exception_table_entry; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2 } ; struct module_ref { unsigned int incs ; unsigned int decs ; }; struct module_sect_attrs; struct module_notes_attrs; struct ftrace_event_call; struct module { enum module_state state ; struct list_head list ; char name[60U] ; struct module_kobject mkobj ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned long const *crcs ; unsigned int num_syms ; struct kernel_param *kp ; unsigned int num_kp ; unsigned int num_gpl_syms ; struct kernel_symbol const *gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned long const *unused_crcs ; unsigned int num_unused_syms ; unsigned int num_unused_gpl_syms ; struct kernel_symbol const *unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; struct kernel_symbol const *gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_gpl_future_syms ; unsigned int num_exentries ; struct exception_table_entry *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned int init_size ; unsigned int core_size ; unsigned int init_text_size ; unsigned int core_text_size ; unsigned int init_ro_size ; unsigned int core_ro_size ; struct mod_arch_specific arch ; unsigned int taints ; Elf32_Sym *symtab ; Elf32_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 ; unsigned int num_tracepoints ; struct tracepoint * const *tracepoints_ptrs ; unsigned int num_trace_bprintk_fmt ; char const **trace_bprintk_fmt_start ; struct ftrace_event_call **trace_events ; unsigned int num_trace_events ; struct list_head source_list ; struct list_head target_list ; struct task_struct *waiter ; void (*exit)(void) ; struct module_ref *refptr ; ctor_fn_t (**ctors)(void) ; unsigned int num_ctors ; }; struct seq_file; struct rtc_time { int tm_sec ; int tm_min ; int tm_hour ; int tm_mday ; int tm_mon ; int tm_year ; int tm_wday ; int tm_yday ; int tm_isdst ; }; struct rtc_wkalrm { unsigned char enabled ; unsigned char pending ; struct rtc_time time ; }; struct rb_node { unsigned long rb_parent_color ; struct rb_node *rb_right ; struct rb_node *rb_left ; }; struct rb_root { struct rb_node *rb_node ; }; struct timerqueue_node { struct rb_node node ; ktime_t expires ; }; struct timerqueue_head { struct rb_root head ; struct timerqueue_node *next ; }; struct hrtimer_clock_base; struct hrtimer_cpu_base; enum hrtimer_restart { HRTIMER_NORESTART = 0, HRTIMER_RESTART = 1 } ; 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] ; }; struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base ; int index ; clockid_t clockid ; struct timerqueue_head active ; ktime_t resolution ; ktime_t (*get_time)(void) ; ktime_t softirq_time ; ktime_t offset ; }; struct hrtimer_cpu_base { raw_spinlock_t lock ; unsigned long active_bases ; ktime_t expires_next ; int hres_active ; int hang_detected ; unsigned long nr_events ; unsigned long nr_retries ; unsigned long nr_hangs ; ktime_t max_hang_time ; struct hrtimer_clock_base clock_base[3U] ; }; struct resource { resource_size_t start ; resource_size_t end ; char const *name ; unsigned long flags ; struct resource *parent ; struct resource *sibling ; struct resource *child ; }; struct klist_node; struct klist_node { void *n_klist ; struct list_head n_node ; struct kref n_ref ; }; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; 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_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 * ) ; }; enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ; struct wakeup_source; struct dev_pm_info { pm_message_t power_state ; unsigned char can_wakeup : 1 ; unsigned char async_suspend : 1 ; bool is_prepared ; bool is_suspended ; spinlock_t lock ; struct list_head entry ; struct completion completion ; struct wakeup_source *wakeup ; struct timer_list suspend_timer ; unsigned long timer_expires ; struct work_struct work ; wait_queue_head_t wait_queue ; atomic_t usage_count ; atomic_t child_count ; unsigned char disable_depth : 3 ; unsigned char ignore_children : 1 ; unsigned char idle_notification : 1 ; unsigned char request_pending : 1 ; unsigned char deferred_resume : 1 ; unsigned char run_wake : 1 ; unsigned char runtime_auto : 1 ; unsigned char no_callbacks : 1 ; unsigned char irq_safe : 1 ; unsigned char use_autosuspend : 1 ; unsigned char timer_autosuspends : 1 ; 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 ; void *subsys_data ; }; struct dev_power_domain { struct dev_pm_ops ops ; }; struct dev_archdata { }; struct pdev_archdata { }; struct device_private; struct device_driver; struct driver_private; struct class; struct subsys_private; struct bus_type; struct device_node; struct bus_attribute { struct attribute attr ; ssize_t (*show)(struct bus_type * , char * ) ; ssize_t (*store)(struct bus_type * , char const * , size_t ) ; }; struct device_attribute; struct driver_attribute; struct bus_type { char const *name ; struct bus_attribute *bus_attrs ; struct device_attribute *dev_attrs ; struct driver_attribute *drv_attrs ; 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 (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct subsys_private *p ; }; struct of_device_id; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; bool suppress_bind_attrs ; struct of_device_id const *of_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 * ) ; struct attribute_group const **groups ; struct dev_pm_ops const *pm ; struct driver_private *p ; }; struct driver_attribute { struct attribute attr ; ssize_t (*show)(struct device_driver * , char * ) ; ssize_t (*store)(struct device_driver * , char const * , size_t ) ; }; struct class_attribute; struct class { char const *name ; struct module *owner ; struct class_attribute *class_attrs ; struct device_attribute *dev_attrs ; struct bin_attribute *dev_bin_attrs ; struct kobject *dev_kobj ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , mode_t * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct kobj_ns_type_operations const *ns_type ; void const *(*namespace)(struct device * ) ; struct dev_pm_ops const *pm ; struct subsys_private *p ; }; struct device_type; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , struct class_attribute * , char * ) ; ssize_t (*store)(struct class * , struct class_attribute * , char const * , size_t ) ; }; struct device_type { char const *name ; struct attribute_group const **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , mode_t * ) ; void (*release)(struct device * ) ; struct dev_pm_ops const *pm ; }; struct device_attribute { struct attribute attr ; ssize_t (*show)(struct device * , struct device_attribute * , char * ) ; ssize_t (*store)(struct device * , struct device_attribute * , char const * , size_t ) ; }; struct device_dma_parameters { unsigned int max_segment_size ; unsigned long segment_boundary_mask ; }; struct dma_coherent_mem; struct device { struct device *parent ; struct device_private *p ; struct kobject kobj ; char const *init_name ; struct device_type const *type ; struct mutex mutex ; struct bus_type *bus ; struct device_driver *driver ; void *platform_data ; struct dev_pm_info power ; struct dev_power_domain *pwr_domain ; u64 *dma_mask ; u64 coherent_dma_mask ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct dev_archdata archdata ; struct device_node *of_node ; dev_t devt ; spinlock_t devres_lock ; struct list_head devres_head ; struct klist_node knode_class ; struct class *class ; struct attribute_group const **groups ; void (*release)(struct device * ) ; }; struct wakeup_source { char *name ; struct list_head entry ; spinlock_t lock ; struct timer_list timer ; unsigned long timer_expires ; ktime_t total_time ; ktime_t max_time ; ktime_t last_time ; unsigned long event_count ; unsigned long active_count ; unsigned long relax_count ; unsigned long hit_count ; unsigned char active : 1 ; }; struct seq_operations; struct path; struct inode; struct dentry; struct seq_file { char *buf ; size_t size ; size_t from ; size_t count ; loff_t index ; loff_t read_pos ; u64 version ; struct mutex lock ; struct seq_operations const *op ; void *private ; }; 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 * ) ; }; struct file_operations; struct cdev { struct kobject kobj ; struct module *owner ; struct file_operations const *ops ; struct list_head list ; dev_t dev ; unsigned int count ; }; struct backing_dev_info; struct block_device; struct hlist_bl_node; struct hlist_bl_head { struct hlist_bl_node *first ; }; struct hlist_bl_node { struct hlist_bl_node *next ; struct hlist_bl_node **pprev ; }; struct nameidata; struct vfsmount; struct qstr { unsigned int hash ; unsigned int len ; unsigned char const *name ; }; struct dentry_operations; struct super_block; union __anonunion_d_u_26 { struct list_head d_child ; struct rcu_head d_rcu ; }; struct dentry { unsigned int d_flags ; seqcount_t d_seq ; struct hlist_bl_node d_hash ; struct dentry *d_parent ; struct qstr d_name ; struct inode *d_inode ; unsigned char d_iname[40U] ; unsigned int d_count ; spinlock_t d_lock ; struct dentry_operations const *d_op ; struct super_block *d_sb ; unsigned long d_time ; void *d_fsdata ; struct list_head d_lru ; union __anonunion_d_u_26 d_u ; struct list_head d_subdirs ; struct list_head d_alias ; }; struct dentry_operations { int (*d_revalidate)(struct dentry * , struct nameidata * ) ; int (*d_hash)(struct dentry const * , struct inode const * , struct qstr * ) ; int (*d_compare)(struct dentry const * , struct inode const * , struct dentry const * , struct inode const * , unsigned int , char const * , struct qstr const * ) ; int (*d_delete)(struct dentry const * ) ; void (*d_release)(struct dentry * ) ; void (*d_iput)(struct dentry * , struct inode * ) ; char *(*d_dname)(struct dentry * , char * , int ) ; struct vfsmount *(*d_automount)(struct path * ) ; int (*d_manage)(struct dentry * , bool ) ; }; struct path { struct vfsmount *mnt ; struct dentry *dentry ; }; struct radix_tree_node; struct radix_tree_root { unsigned int height ; gfp_t gfp_mask ; struct radix_tree_node *rnode ; }; struct prio_tree_node; struct prio_tree_node { struct prio_tree_node *left ; struct prio_tree_node *right ; struct prio_tree_node *parent ; unsigned long start ; unsigned long last ; }; struct prio_tree_root { struct prio_tree_node *prio_tree_node ; unsigned short index_bits ; unsigned short raw ; }; enum pid_type { PIDTYPE_PID = 0, PIDTYPE_PGID = 1, PIDTYPE_SID = 2, PIDTYPE_MAX = 3 } ; struct pid_namespace; struct upid { int nr ; struct pid_namespace *ns ; struct hlist_node pid_chain ; }; struct pid { atomic_t count ; unsigned int level ; struct hlist_head tasks[3U] ; struct rcu_head rcu ; struct upid numbers[1U] ; }; struct fiemap_extent { __u64 fe_logical ; __u64 fe_physical ; __u64 fe_length ; __u64 fe_reserved64[2U] ; __u32 fe_flags ; __u32 fe_reserved[3U] ; }; struct export_operations; struct iovec; struct kiocb; struct pipe_inode_info; struct poll_table_struct; struct kstatfs; struct iattr { unsigned int ia_valid ; umode_t ia_mode ; uid_t ia_uid ; gid_t ia_gid ; loff_t ia_size ; struct timespec ia_atime ; struct timespec ia_mtime ; struct timespec ia_ctime ; struct file *ia_file ; }; struct if_dqinfo { __u64 dqi_bgrace ; __u64 dqi_igrace ; __u32 dqi_flags ; __u32 dqi_valid ; }; struct fs_disk_quota { __s8 d_version ; __s8 d_flags ; __u16 d_fieldmask ; __u32 d_id ; __u64 d_blk_hardlimit ; __u64 d_blk_softlimit ; __u64 d_ino_hardlimit ; __u64 d_ino_softlimit ; __u64 d_bcount ; __u64 d_icount ; __s32 d_itimer ; __s32 d_btimer ; __u16 d_iwarns ; __u16 d_bwarns ; __s32 d_padding2 ; __u64 d_rtb_hardlimit ; __u64 d_rtb_softlimit ; __u64 d_rtbcount ; __s32 d_rtbtimer ; __u16 d_rtbwarns ; __s16 d_padding3 ; char d_padding4[8U] ; }; struct fs_qfilestat { __u64 qfs_ino ; __u64 qfs_nblks ; __u32 qfs_nextents ; }; typedef struct fs_qfilestat fs_qfilestat_t; struct fs_quota_stat { __s8 qs_version ; __u16 qs_flags ; __s8 qs_pad ; fs_qfilestat_t qs_uquota ; fs_qfilestat_t qs_gquota ; __u32 qs_incoredqs ; __s32 qs_btimelimit ; __s32 qs_itimelimit ; __s32 qs_rtbtimelimit ; __u16 qs_bwarnlimit ; __u16 qs_iwarnlimit ; }; struct dquot; typedef __kernel_uid32_t qid_t; typedef long long qsize_t; struct mem_dqblk { qsize_t dqb_bhardlimit ; qsize_t dqb_bsoftlimit ; qsize_t dqb_curspace ; qsize_t dqb_rsvspace ; qsize_t dqb_ihardlimit ; qsize_t dqb_isoftlimit ; qsize_t dqb_curinodes ; time_t dqb_btime ; time_t dqb_itime ; }; struct quota_format_type; struct mem_dqinfo { struct quota_format_type *dqi_format ; int dqi_fmt_id ; struct list_head dqi_dirty_list ; unsigned long dqi_flags ; unsigned int dqi_bgrace ; unsigned int dqi_igrace ; qsize_t dqi_maxblimit ; qsize_t dqi_maxilimit ; void *dqi_priv ; }; struct dquot { struct hlist_node dq_hash ; struct list_head dq_inuse ; struct list_head dq_free ; struct list_head dq_dirty ; struct mutex dq_lock ; atomic_t dq_count ; wait_queue_head_t dq_wait_unused ; struct super_block *dq_sb ; unsigned int dq_id ; loff_t dq_off ; unsigned long dq_flags ; short dq_type ; struct mem_dqblk dq_dqb ; }; struct quota_format_ops { int (*check_quota_file)(struct super_block * , int ) ; int (*read_file_info)(struct super_block * , int ) ; int (*write_file_info)(struct super_block * , int ) ; int (*free_file_info)(struct super_block * , int ) ; int (*read_dqblk)(struct dquot * ) ; int (*commit_dqblk)(struct dquot * ) ; int (*release_dqblk)(struct dquot * ) ; }; struct dquot_operations { int (*write_dquot)(struct dquot * ) ; struct dquot *(*alloc_dquot)(struct super_block * , int ) ; void (*destroy_dquot)(struct dquot * ) ; int (*acquire_dquot)(struct dquot * ) ; int (*release_dquot)(struct dquot * ) ; int (*mark_dirty)(struct dquot * ) ; int (*write_info)(struct super_block * , int ) ; qsize_t *(*get_reserved_space)(struct inode * ) ; }; struct quotactl_ops { int (*quota_on)(struct super_block * , int , int , struct path * ) ; int (*quota_on_meta)(struct super_block * , int , int ) ; int (*quota_off)(struct super_block * , int ) ; int (*quota_sync)(struct super_block * , int , int ) ; int (*get_info)(struct super_block * , int , struct if_dqinfo * ) ; int (*set_info)(struct super_block * , int , struct if_dqinfo * ) ; int (*get_dqblk)(struct super_block * , int , qid_t , struct fs_disk_quota * ) ; int (*set_dqblk)(struct super_block * , int , qid_t , struct fs_disk_quota * ) ; int (*get_xstate)(struct super_block * , struct fs_quota_stat * ) ; int (*set_xstate)(struct super_block * , unsigned int , int ) ; }; struct quota_format_type { int qf_fmt_id ; struct quota_format_ops const *qf_ops ; struct module *qf_owner ; struct quota_format_type *qf_next ; }; struct quota_info { unsigned int flags ; struct mutex dqio_mutex ; struct mutex dqonoff_mutex ; struct rw_semaphore dqptr_sem ; struct inode *files[2U] ; struct mem_dqinfo info[2U] ; struct quota_format_ops const *ops[2U] ; }; struct address_space; struct writeback_control; union __anonunion_arg_29 { char *buf ; void *data ; }; struct __anonstruct_read_descriptor_t_28 { size_t written ; size_t count ; union __anonunion_arg_29 arg ; int error ; }; typedef struct __anonstruct_read_descriptor_t_28 read_descriptor_t; struct address_space_operations { int (*writepage)(struct page * , struct writeback_control * ) ; int (*readpage)(struct file * , struct page * ) ; int (*writepages)(struct address_space * , struct writeback_control * ) ; int (*set_page_dirty)(struct page * ) ; int (*readpages)(struct file * , struct address_space * , struct list_head * , unsigned int ) ; int (*write_begin)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page ** , void ** ) ; int (*write_end)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page * , void * ) ; sector_t (*bmap)(struct address_space * , sector_t ) ; void (*invalidatepage)(struct page * , unsigned long ) ; int (*releasepage)(struct page * , gfp_t ) ; void (*freepage)(struct page * ) ; ssize_t (*direct_IO)(int , struct kiocb * , struct iovec const * , loff_t , unsigned long ) ; int (*get_xip_mem)(struct address_space * , unsigned long , int , void ** , unsigned long * ) ; int (*migratepage)(struct address_space * , struct page * , struct page * ) ; int (*launder_page)(struct page * ) ; int (*is_partially_uptodate)(struct page * , read_descriptor_t * , unsigned long ) ; int (*error_remove_page)(struct address_space * , struct page * ) ; }; struct address_space { struct inode *host ; struct radix_tree_root page_tree ; spinlock_t tree_lock ; unsigned int i_mmap_writable ; struct prio_tree_root i_mmap ; struct list_head i_mmap_nonlinear ; struct mutex i_mmap_mutex ; unsigned long nrpages ; unsigned long writeback_index ; struct address_space_operations const *a_ops ; unsigned long flags ; struct backing_dev_info *backing_dev_info ; spinlock_t private_lock ; struct list_head private_list ; struct address_space *assoc_mapping ; }; struct hd_struct; struct gendisk; struct block_device { dev_t bd_dev ; int bd_openers ; struct inode *bd_inode ; struct super_block *bd_super ; struct mutex bd_mutex ; struct list_head bd_inodes ; void *bd_claiming ; void *bd_holder ; int bd_holders ; bool bd_write_holder ; struct list_head bd_holder_disks ; struct block_device *bd_contains ; unsigned int bd_block_size ; struct hd_struct *bd_part ; unsigned int bd_part_count ; int bd_invalidated ; struct gendisk *bd_disk ; struct list_head bd_list ; unsigned long bd_private ; int bd_fsfreeze_count ; struct mutex bd_fsfreeze_mutex ; }; struct posix_acl; struct inode_operations; union __anonunion_ldv_13031_30 { struct list_head i_dentry ; struct rcu_head i_rcu ; }; struct file_lock; union __anonunion_ldv_13056_31 { struct pipe_inode_info *i_pipe ; struct block_device *i_bdev ; struct cdev *i_cdev ; }; struct inode { umode_t i_mode ; uid_t i_uid ; gid_t i_gid ; struct inode_operations const *i_op ; struct super_block *i_sb ; spinlock_t i_lock ; unsigned int i_flags ; unsigned long i_state ; void *i_security ; struct mutex i_mutex ; unsigned long dirtied_when ; struct hlist_node i_hash ; struct list_head i_wb_list ; struct list_head i_lru ; struct list_head i_sb_list ; union __anonunion_ldv_13031_30 ldv_13031 ; unsigned long i_ino ; atomic_t i_count ; unsigned int i_nlink ; dev_t i_rdev ; unsigned int i_blkbits ; u64 i_version ; loff_t i_size ; struct timespec i_atime ; struct timespec i_mtime ; struct timespec i_ctime ; blkcnt_t i_blocks ; unsigned short i_bytes ; struct rw_semaphore i_alloc_sem ; struct file_operations const *i_fop ; struct file_lock *i_flock ; struct address_space *i_mapping ; struct address_space i_data ; struct dquot *i_dquot[2U] ; struct list_head i_devices ; union __anonunion_ldv_13056_31 ldv_13056 ; __u32 i_generation ; __u32 i_fsnotify_mask ; struct hlist_head i_fsnotify_marks ; atomic_t i_readcount ; atomic_t i_writecount ; struct posix_acl *i_acl ; struct posix_acl *i_default_acl ; void *i_private ; }; struct fown_struct { rwlock_t lock ; struct pid *pid ; enum pid_type pid_type ; uid_t uid ; uid_t euid ; int signum ; }; struct file_ra_state { unsigned long start ; unsigned int size ; unsigned int async_size ; unsigned int ra_pages ; unsigned int mmap_miss ; loff_t prev_pos ; }; union __anonunion_f_u_32 { struct list_head fu_list ; struct rcu_head fu_rcuhead ; }; struct file { union __anonunion_f_u_32 f_u ; struct path f_path ; struct file_operations const *f_op ; spinlock_t f_lock ; atomic_long_t f_count ; unsigned int f_flags ; fmode_t f_mode ; loff_t f_pos ; struct fown_struct f_owner ; struct cred const *f_cred ; struct file_ra_state f_ra ; u64 f_version ; void *f_security ; void *private_data ; struct list_head f_ep_links ; struct address_space *f_mapping ; unsigned long f_mnt_write_state ; }; struct files_struct; typedef struct files_struct *fl_owner_t; struct file_lock_operations { void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ; void (*fl_release_private)(struct file_lock * ) ; }; struct lock_manager_operations { int (*fl_compare_owner)(struct file_lock * , struct file_lock * ) ; void (*fl_notify)(struct file_lock * ) ; int (*fl_grant)(struct file_lock * , struct file_lock * , int ) ; void (*fl_release_private)(struct file_lock * ) ; void (*fl_break)(struct file_lock * ) ; int (*fl_change)(struct file_lock ** , int ) ; }; struct nlm_lockowner; struct nfs_lock_info { u32 state ; struct nlm_lockowner *owner ; struct list_head list ; }; struct nfs4_lock_state; struct nfs4_lock_info { struct nfs4_lock_state *owner ; }; struct fasync_struct; struct __anonstruct_afs_34 { struct list_head link ; int state ; }; union __anonunion_fl_u_33 { struct nfs_lock_info nfs_fl ; struct nfs4_lock_info nfs4_fl ; struct __anonstruct_afs_34 afs ; }; struct file_lock { struct file_lock *fl_next ; struct list_head fl_link ; struct list_head fl_block ; fl_owner_t fl_owner ; unsigned char fl_flags ; unsigned char fl_type ; unsigned int fl_pid ; struct pid *fl_nspid ; wait_queue_head_t fl_wait ; struct file *fl_file ; loff_t fl_start ; loff_t fl_end ; struct fasync_struct *fl_fasync ; unsigned long fl_break_time ; struct file_lock_operations const *fl_ops ; struct lock_manager_operations const *fl_lmops ; union __anonunion_fl_u_33 fl_u ; }; struct fasync_struct { spinlock_t fa_lock ; int magic ; int fa_fd ; struct fasync_struct *fa_next ; struct file *fa_file ; struct rcu_head fa_rcu ; }; struct file_system_type; struct super_operations; struct xattr_handler; struct mtd_info; struct super_block { struct list_head s_list ; dev_t s_dev ; unsigned char s_dirt ; unsigned char s_blocksize_bits ; unsigned long s_blocksize ; loff_t s_maxbytes ; struct file_system_type *s_type ; struct super_operations const *s_op ; struct dquot_operations const *dq_op ; struct quotactl_ops const *s_qcop ; struct export_operations const *s_export_op ; unsigned long s_flags ; unsigned long s_magic ; struct dentry *s_root ; struct rw_semaphore s_umount ; struct mutex s_lock ; int s_count ; atomic_t s_active ; void *s_security ; struct xattr_handler const **s_xattr ; struct list_head s_inodes ; struct hlist_bl_head s_anon ; struct list_head s_files ; struct list_head s_dentry_lru ; int s_nr_dentry_unused ; struct block_device *s_bdev ; struct backing_dev_info *s_bdi ; struct mtd_info *s_mtd ; struct list_head s_instances ; struct quota_info s_dquot ; int s_frozen ; wait_queue_head_t s_wait_unfrozen ; char s_id[32U] ; u8 s_uuid[16U] ; void *s_fs_info ; fmode_t s_mode ; u32 s_time_gran ; struct mutex s_vfs_rename_mutex ; char *s_subtype ; char *s_options ; struct dentry_operations const *s_d_op ; int cleancache_poolid ; }; struct fiemap_extent_info { unsigned int fi_flags ; unsigned int fi_extents_mapped ; unsigned int fi_extents_max ; struct fiemap_extent *fi_extents_start ; }; struct file_operations { struct module *owner ; loff_t (*llseek)(struct file * , loff_t , int ) ; ssize_t (*read)(struct file * , char * , size_t , loff_t * ) ; ssize_t (*write)(struct file * , char const * , size_t , loff_t * ) ; ssize_t (*aio_read)(struct kiocb * , struct iovec const * , unsigned long , loff_t ) ; ssize_t (*aio_write)(struct kiocb * , struct iovec const * , unsigned long , loff_t ) ; int (*readdir)(struct file * , void * , int (*)(void * , char const * , int , loff_t , u64 , unsigned int ) ) ; unsigned int (*poll)(struct file * , struct poll_table_struct * ) ; long (*unlocked_ioctl)(struct file * , unsigned int , unsigned long ) ; long (*compat_ioctl)(struct file * , unsigned int , unsigned long ) ; int (*mmap)(struct file * , struct vm_area_struct * ) ; int (*open)(struct inode * , struct file * ) ; int (*flush)(struct file * , fl_owner_t ) ; int (*release)(struct inode * , struct file * ) ; int (*fsync)(struct file * , int ) ; int (*aio_fsync)(struct kiocb * , int ) ; int (*fasync)(int , struct file * , int ) ; int (*lock)(struct file * , int , struct file_lock * ) ; ssize_t (*sendpage)(struct file * , struct page * , int , size_t , loff_t * , int ) ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; int (*check_flags)(int ) ; int (*flock)(struct file * , int , struct file_lock * ) ; ssize_t (*splice_write)(struct pipe_inode_info * , struct file * , loff_t * , size_t , unsigned int ) ; ssize_t (*splice_read)(struct file * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*setlease)(struct file * , long , struct file_lock ** ) ; long (*fallocate)(struct file * , int , loff_t , loff_t ) ; }; struct inode_operations { struct dentry *(*lookup)(struct inode * , struct dentry * , struct nameidata * ) ; void *(*follow_link)(struct dentry * , struct nameidata * ) ; int (*permission)(struct inode * , int , unsigned int ) ; int (*check_acl)(struct inode * , int , unsigned int ) ; int (*readlink)(struct dentry * , char * , int ) ; void (*put_link)(struct dentry * , struct nameidata * , void * ) ; int (*create)(struct inode * , struct dentry * , int , struct nameidata * ) ; int (*link)(struct dentry * , struct inode * , struct dentry * ) ; int (*unlink)(struct inode * , struct dentry * ) ; int (*symlink)(struct inode * , struct dentry * , char const * ) ; int (*mkdir)(struct inode * , struct dentry * , int ) ; int (*rmdir)(struct inode * , struct dentry * ) ; int (*mknod)(struct inode * , struct dentry * , int , dev_t ) ; int (*rename)(struct inode * , struct dentry * , struct inode * , struct dentry * ) ; void (*truncate)(struct inode * ) ; int (*setattr)(struct dentry * , struct iattr * ) ; int (*getattr)(struct vfsmount * , struct dentry * , struct kstat * ) ; int (*setxattr)(struct dentry * , char const * , void const * , size_t , int ) ; ssize_t (*getxattr)(struct dentry * , char const * , void * , size_t ) ; ssize_t (*listxattr)(struct dentry * , char * , size_t ) ; int (*removexattr)(struct dentry * , char const * ) ; void (*truncate_range)(struct inode * , loff_t , loff_t ) ; int (*fiemap)(struct inode * , struct fiemap_extent_info * , u64 , u64 ) ; }; struct super_operations { struct inode *(*alloc_inode)(struct super_block * ) ; void (*destroy_inode)(struct inode * ) ; void (*dirty_inode)(struct inode * , int ) ; int (*write_inode)(struct inode * , struct writeback_control * ) ; int (*drop_inode)(struct inode * ) ; void (*evict_inode)(struct inode * ) ; void (*put_super)(struct super_block * ) ; void (*write_super)(struct super_block * ) ; int (*sync_fs)(struct super_block * , int ) ; int (*freeze_fs)(struct super_block * ) ; int (*unfreeze_fs)(struct super_block * ) ; int (*statfs)(struct dentry * , struct kstatfs * ) ; int (*remount_fs)(struct super_block * , int * , char * ) ; void (*umount_begin)(struct super_block * ) ; int (*show_options)(struct seq_file * , struct vfsmount * ) ; int (*show_devname)(struct seq_file * , struct vfsmount * ) ; int (*show_path)(struct seq_file * , struct vfsmount * ) ; int (*show_stats)(struct seq_file * , struct vfsmount * ) ; ssize_t (*quota_read)(struct super_block * , int , char * , size_t , loff_t ) ; ssize_t (*quota_write)(struct super_block * , int , char const * , size_t , loff_t ) ; int (*bdev_try_to_free_page)(struct super_block * , struct page * , gfp_t ) ; }; struct file_system_type { char const *name ; int fs_flags ; struct dentry *(*mount)(struct file_system_type * , int , char const * , void * ) ; void (*kill_sb)(struct super_block * ) ; struct module *owner ; struct file_system_type *next ; struct list_head fs_supers ; struct lock_class_key s_lock_key ; struct lock_class_key s_umount_key ; struct lock_class_key s_vfs_rename_key ; struct lock_class_key i_lock_key ; struct lock_class_key i_mutex_key ; struct lock_class_key i_mutex_dir_key ; struct lock_class_key i_alloc_sem_key ; }; struct exception_table_entry { unsigned long insn ; unsigned long fixup ; }; struct poll_table_struct { void (*qproc)(struct file * , wait_queue_head_t * , struct poll_table_struct * ) ; unsigned long key ; }; struct rtc_class_ops { int (*open)(struct device * ) ; void (*release)(struct device * ) ; int (*ioctl)(struct device * , unsigned int , unsigned long ) ; int (*read_time)(struct device * , struct rtc_time * ) ; int (*set_time)(struct device * , struct rtc_time * ) ; int (*read_alarm)(struct device * , struct rtc_wkalrm * ) ; int (*set_alarm)(struct device * , struct rtc_wkalrm * ) ; int (*proc)(struct device * , struct seq_file * ) ; int (*set_mmss)(struct device * , unsigned long ) ; int (*read_callback)(struct device * , int ) ; int (*alarm_irq_enable)(struct device * , unsigned int ) ; }; struct rtc_task { void (*func)(void * ) ; void *private_data ; }; struct rtc_timer { struct rtc_task task ; struct timerqueue_node node ; ktime_t period ; int enabled ; }; struct rtc_device { struct device dev ; struct module *owner ; int id ; char name[20U] ; struct rtc_class_ops const *ops ; struct mutex ops_lock ; struct cdev char_dev ; unsigned long flags ; unsigned long irq_data ; spinlock_t irq_lock ; wait_queue_head_t irq_queue ; struct fasync_struct *async_queue ; struct rtc_task *irq_task ; spinlock_t irq_task_lock ; int irq_freq ; int max_user_freq ; struct timerqueue_head timerqueue ; struct rtc_timer aie_timer ; struct rtc_timer uie_rtctimer ; struct hrtimer pie_timer ; int pie_enabled ; struct work_struct irqwork ; struct work_struct uie_task ; struct timer_list uie_timer ; unsigned int oldsecs ; unsigned char uie_irq_active : 1 ; unsigned char stop_uie_polling : 1 ; unsigned char uie_task_active : 1 ; unsigned char uie_timer_active : 1 ; }; typedef unsigned long kernel_ulong_t; struct of_device_id { char name[32U] ; char type[32U] ; char compatible[128U] ; void *data ; }; struct platform_device_id { char name[20U] ; kernel_ulong_t driver_data ; }; struct mfd_cell; struct platform_device { char const *name ; int id ; struct device dev ; u32 num_resources ; struct resource *resource ; struct platform_device_id const *id_entry ; struct mfd_cell *mfd_cell ; struct pdev_archdata archdata ; }; struct platform_driver { int (*probe)(struct platform_device * ) ; int (*remove)(struct platform_device * ) ; void (*shutdown)(struct platform_device * ) ; int (*suspend)(struct platform_device * , pm_message_t ) ; int (*resume)(struct platform_device * ) ; struct device_driver driver ; struct platform_device_id const *id_table ; }; struct tegra_rtc_info { struct platform_device *pdev ; struct rtc_device *rtc_dev ; void *rtc_base ; int tegra_rtc_irq ; spinlock_t tegra_rtc_lock ; }; typedef struct rtc_device *ldv_func_ret_type; typedef int ldv_func_ret_type___0; long ldv__builtin_expect(long exp , long c ) ; long ldv_is_err(void const *ptr ) ; long ldv_ptr_err(void const *ptr ) ; extern struct outer_cache_fns outer_cache ; __inline static void outer_sync(void) { { if ((unsigned long )outer_cache.sync != (unsigned long )((void (*)(void))0)) { (*(outer_cache.sync))(); } else { } return; } } void *ldv_malloc(size_t size ) ; void *ldv_zalloc(size_t size ) ; extern void *memset(void * , int , size_t ) ; extern void _raw_spin_unlock_irqrestore(raw_spinlock_t * , unsigned long ) ; __inline static void ldv_spin_unlock_irqrestore_9(spinlock_t *lock , unsigned long flags ) { { _raw_spin_unlock_irqrestore(& lock->ldv_2857.rlock, flags); return; } } __inline static void spin_unlock_irqrestore(spinlock_t *lock , unsigned long flags ) ; void ldv_spin_lock_check(void) ; extern void kfree(void const * ) ; __inline static char const *kobject_name(struct kobject const *kobj ) { { return ((char const *)kobj->name); } } __inline static void *ldv_kzalloc_22(size_t size , gfp_t flags ) ; extern void *malloc(size_t size ) ; extern void *calloc(size_t nmemb , size_t size ) ; extern int __VERIFIER_nondet_int(void) ; extern unsigned int __VERIFIER_nondet_uint(void) ; extern unsigned long __VERIFIER_nondet_ulong(void) ; extern void *__VERIFIER_nondet_pointer(void) ; extern void __VERIFIER_assume(int expression ) ; void *ldv_malloc(size_t size ) { void *p ; void *tmp ; int tmp___0 ; { tmp___0 = __VERIFIER_nondet_int(); if (tmp___0 != 0) { return (0); } else { tmp = malloc(size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } } void *ldv_zalloc(size_t size ) { void *p ; void *tmp ; int tmp___0 ; { tmp___0 = __VERIFIER_nondet_int(); if (tmp___0 != 0) { return (0); } else { tmp = calloc(1U, size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } } int ldv_undef_int(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); return (tmp); } } void *ldv_undef_ptr(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); return (tmp); } } unsigned long ldv_undef_ulong(void) { unsigned long tmp ; { tmp = __VERIFIER_nondet_ulong(); return (tmp); } } __inline static void ldv_error(void) { { ERROR: ; __VERIFIER_error(); } } __inline static void ldv_stop(void) { { LDV_STOP: ; goto LDV_STOP; } } long ldv__builtin_expect(long exp , long c ) { { return (exp); } } void ldv__builtin_trap(void) { { ldv_error(); return; } } int ldv_irq_1_2 = 0; int LDV_IN_INTERRUPT = 1; int ldv_irq_1_3 = 0; struct platform_device *tegra_rtc_driver_group0 ; void *ldv_irq_data_1_1 ; int ldv_irq_1_1 = 0; int ldv_irq_1_0 = 0; int ldv_irq_line_1_3 ; void *ldv_irq_data_1_0 ; int ldv_state_variable_0 ; struct device *tegra_rtc_ops_group1 ; int ldv_state_variable_3 ; int ldv_irq_line_1_0 ; int ldv_state_variable_2 ; void *ldv_irq_data_1_3 ; int ref_cnt ; int ldv_irq_line_1_1 ; struct rtc_time *tegra_rtc_ops_group0 ; void *ldv_irq_data_1_2 ; int ldv_state_variable_1 ; int ldv_irq_line_1_2 ; struct rtc_wkalrm *tegra_rtc_ops_group2 ; int ldv_irq_1(int state , int line , void *data ) ; void activate_suitable_irq_1(int line , void *data ) ; int reg_check_1(irqreturn_t (*handler)(int , void * ) ) ; void choose_interrupt_1(void) ; void ldv_initialize_rtc_class_ops_3(void) ; void ldv_initialize_platform_driver_2(void) ; void disable_suitable_irq_1(int line , void *data ) ; extern struct module __this_module ; extern void *tegra_ioremap(unsigned long , size_t , unsigned int ) ; extern void tegra_iounmap(void volatile * ) ; extern void __const_udelay(unsigned long ) ; extern int request_threaded_irq(unsigned int , irqreturn_t (*)(int , void * ) , irqreturn_t (*)(int , void * ) , unsigned long , char const * , void * ) ; __inline static int request_irq(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { int tmp ; { tmp = request_threaded_irq(irq, handler, 0, flags, name, dev); return (tmp); } } __inline static int ldv_request_irq_24(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) ; extern void free_irq(unsigned int , void * ) ; void ldv_free_irq_26(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) ; extern int irq_set_irq_wake(unsigned int , unsigned int ) ; __inline static int enable_irq_wake(unsigned int irq ) { int tmp ; { tmp = irq_set_irq_wake(irq, 1U); return (tmp); } } __inline static int disable_irq_wake(unsigned int irq ) { int tmp ; { tmp = irq_set_irq_wake(irq, 0U); return (tmp); } } extern int rtc_valid_tm(struct rtc_time * ) ; extern int rtc_tm_to_time(struct rtc_time * , unsigned long * ) ; extern void rtc_time_to_tm(unsigned long , struct rtc_time * ) ; extern struct resource iomem_resource ; __inline static resource_size_t resource_size(struct resource const *res ) { { return (((unsigned int )res->end - (unsigned int )res->start) + 1U); } } extern struct resource *__request_region(struct resource * , resource_size_t , resource_size_t , char const * , int ) ; extern void __release_region(struct resource * , resource_size_t , resource_size_t ) ; __inline static bool device_may_wakeup(struct device *dev ) { { return ((bool )((unsigned int )*((unsigned char *)dev + 156UL) != 0U && (unsigned long )dev->power.wakeup != (unsigned long )((struct wakeup_source *)0))); } } extern int device_init_wakeup(struct device * , bool ) ; __inline static char const *dev_name(struct device const *dev ) { char const *tmp ; { if ((unsigned long )dev->init_name != (unsigned long )((char const */* const */)0)) { return ((char const *)dev->init_name); } else { } tmp = kobject_name(& dev->kobj); return (tmp); } } extern void *dev_get_drvdata(struct device const * ) ; extern int dev_set_drvdata(struct device * , void * ) ; extern int dev_err(struct device const * , char const * , ...) ; extern int dev_notice(struct device const * , char const * , ...) ; extern int seq_printf(struct seq_file * , char const * , ...) ; __inline static long PTR_ERR(void const *ptr ) ; __inline static long IS_ERR(void const *ptr ) ; extern struct rtc_device *rtc_device_register(char const * , struct device * , struct rtc_class_ops const * , struct module * ) ; struct rtc_device *ldv_rtc_device_register_23(char const *ldv_func_arg1 , struct device *ldv_func_arg2 , struct rtc_class_ops const *ldv_func_arg3 , struct module *ldv_func_arg4 ) ; extern void rtc_device_unregister(struct rtc_device * ) ; void ldv_rtc_device_unregister_25(struct rtc_device *rtc ) ; void ldv_rtc_device_unregister_27(struct rtc_device *rtc ) ; extern void rtc_update_irq(struct rtc_device * , unsigned long , unsigned long ) ; extern struct resource *platform_get_resource(struct platform_device * , unsigned int , unsigned int ) ; extern int platform_get_irq(struct platform_device * , unsigned int ) ; extern void platform_driver_unregister(struct platform_driver * ) ; extern int platform_driver_probe(struct platform_driver * , int (*)(struct platform_device * ) ) ; __inline static void *platform_get_drvdata(struct platform_device const *pdev ) { void *tmp ; { tmp = dev_get_drvdata(& pdev->dev); return (tmp); } } __inline static void platform_set_drvdata(struct platform_device *pdev , void *data ) { { dev_set_drvdata(& pdev->dev, data); return; } } __inline static u32 tegra_rtc_check_busy(struct tegra_rtc_info *info ) { u32 __v ; u32 __v___0 ; { __v___0 = *((unsigned int volatile *)info->rtc_base + 4U); __v = __v___0; //__asm__ volatile ("dsb": : : "memory"); return (__v & 1U); } } static int tegra_rtc_wait_while_busy(struct device *dev ) { struct tegra_rtc_info *info ; void *tmp ; int retries ; int tmp___0 ; u32 tmp___1 ; { tmp = dev_get_drvdata((struct device const *)dev); info = (struct tegra_rtc_info *)tmp; retries = 500; goto ldv_15813; ldv_15812: tmp___0 = retries; retries = retries - 1; if (tmp___0 == 0) { goto retry_failed; } else { } __const_udelay(107374UL); ldv_15813: tmp___1 = tegra_rtc_check_busy(info); if (tmp___1 != 0U) { goto ldv_15812; } else { } return (0); retry_failed: dev_err((struct device const *)dev, "write failed:retry count exceeded.\n"); return (-110); } } static int tegra_rtc_read_time(struct device *dev , struct rtc_time *tm ) { struct tegra_rtc_info *info ; void *tmp ; unsigned long sec ; unsigned long msec ; unsigned long sl_irq_flags ; u32 __v ; u32 __v___0 ; u32 __v___1 ; u32 __v___2 ; { tmp = dev_get_drvdata((struct device const *)dev); info = (struct tegra_rtc_info *)tmp; ldv_spin_lock_check(); __v___0 = *((unsigned int volatile *)info->rtc_base + 16U); __v = __v___0; //__asm__ volatile ("dsb": : : "memory"); msec = (unsigned long )__v; __v___2 = *((unsigned int volatile *)info->rtc_base + 12U); __v___1 = __v___2; //__asm__ volatile ("dsb": : : "memory"); sec = (unsigned long )__v___1; spin_unlock_irqrestore(& info->tegra_rtc_lock, sl_irq_flags); rtc_time_to_tm(sec, tm); return (0); } } static int tegra_rtc_set_time(struct device *dev , struct rtc_time *tm ) { struct tegra_rtc_info *info ; void *tmp ; unsigned long sec ; int ret ; { tmp = dev_get_drvdata((struct device const *)dev); info = (struct tegra_rtc_info *)tmp; ret = rtc_valid_tm(tm); if (ret != 0) { return (ret); } else { } rtc_tm_to_time(tm, & sec); ret = tegra_rtc_wait_while_busy(dev); if (ret == 0) { //__asm__ volatile ("dsb": : : "memory"); outer_sync(); *((unsigned int volatile *)info->rtc_base + 8U) = (unsigned int )sec; } else { } return (ret); } } static int tegra_rtc_read_alarm(struct device *dev , struct rtc_wkalrm *alarm ) { struct tegra_rtc_info *info ; void *tmp ; unsigned long sec ; unsigned int tmp___0 ; u32 __v ; u32 __v___0 ; u32 __v___1 ; u32 __v___2 ; { tmp = dev_get_drvdata((struct device const *)dev); info = (struct tegra_rtc_info *)tmp; __v___0 = *((unsigned int volatile *)info->rtc_base + 20U); __v = __v___0; //__asm__ volatile ("dsb": : : "memory"); sec = (unsigned long )__v; if (sec == 0UL) { alarm->enabled = 0U; alarm->time.tm_mon = -1; alarm->time.tm_mday = -1; alarm->time.tm_year = -1; alarm->time.tm_hour = -1; alarm->time.tm_min = -1; alarm->time.tm_sec = -1; } else { alarm->enabled = 1U; rtc_time_to_tm(sec, & alarm->time); } __v___2 = *((unsigned int volatile *)info->rtc_base + 44U); __v___1 = __v___2; //__asm__ volatile ("dsb": : : "memory"); tmp___0 = __v___1; alarm->pending = (unsigned int )((unsigned char )tmp___0) & 1U; return (0); } } static int tegra_rtc_alarm_irq_enable(struct device *dev , unsigned int enabled ) { struct tegra_rtc_info *info ; void *tmp ; unsigned int status ; unsigned long sl_irq_flags ; u32 __v ; u32 __v___0 ; { tmp = dev_get_drvdata((struct device const *)dev); info = (struct tegra_rtc_info *)tmp; tegra_rtc_wait_while_busy(dev); ldv_spin_lock_check(); __v___0 = *((unsigned int volatile *)info->rtc_base + 40U); __v = __v___0; //__asm__ volatile ("dsb": : : "memory"); status = __v; if (enabled != 0U) { status = status | 1U; } else { status = status & 4294967294U; } //__asm__ volatile ("dsb": : : "memory"); outer_sync(); *((unsigned int volatile *)info->rtc_base + 40U) = status; spin_unlock_irqrestore(& info->tegra_rtc_lock, sl_irq_flags); return (0); } } static int tegra_rtc_set_alarm(struct device *dev , struct rtc_wkalrm *alarm ) { struct tegra_rtc_info *info ; void *tmp ; unsigned long sec ; { tmp = dev_get_drvdata((struct device const *)dev); info = (struct tegra_rtc_info *)tmp; if ((unsigned int )alarm->enabled != 0U) { rtc_tm_to_time(& alarm->time, & sec); } else { sec = 0UL; } tegra_rtc_wait_while_busy(dev); //__asm__ volatile ("dsb": : : "memory"); //outer_sync(); *((unsigned int volatile *)info->rtc_base + 20U) = (unsigned int )sec; if (sec != 0UL) { tegra_rtc_alarm_irq_enable(dev, 1U); } else { tegra_rtc_alarm_irq_enable(dev, 0U); } return (0); } } static int tegra_rtc_proc(struct device *dev , struct seq_file *seq ) { char const *tmp ; int tmp___0 ; { if ((unsigned long )dev == (unsigned long )((struct device *)0) || (unsigned long )dev->driver == (unsigned long )((struct device_driver *)0)) { return (0); } else { } tmp = dev_name((struct device const *)dev); tmp___0 = seq_printf(seq, "name\t\t: %s\n", tmp); return (tmp___0); } } static irqreturn_t tegra_rtc_irq_handler(int irq , void *data ) { struct device *dev ; struct tegra_rtc_info *info ; void *tmp ; unsigned long events ; unsigned int status ; unsigned long sl_irq_flags ; u32 __v ; u32 __v___0 ; { dev = (struct device *)data; tmp = dev_get_drvdata((struct device const *)dev); info = (struct tegra_rtc_info *)tmp; events = 0UL; __v___0 = *((unsigned int volatile *)info->rtc_base + 44U); __v = __v___0; //__asm__ volatile ("dsb": : : "memory"); status = __v; if (status != 0U) { tegra_rtc_wait_while_busy(dev); ldv_spin_lock_check(); // __asm__ volatile ("dsb": : : "memory"); //outer_sync(); //*((unsigned int volatile *)info->rtc_base + 40U) = 0U; //__asm__ volatile ("dsb": : : "memory"); //outer_sync(); //*((unsigned int volatile *)info->rtc_base + 44U) = status; spin_unlock_irqrestore(& info->tegra_rtc_lock, sl_irq_flags); } else { } if ((int )status & 1) { events = events | 160UL; } else { } if ((status & 8U) != 0U) { events = events | 192UL; } else { } rtc_update_irq(info->rtc_dev, 1UL, events); return (1); } } static struct rtc_class_ops tegra_rtc_ops = {0, 0, 0, & tegra_rtc_read_time, & tegra_rtc_set_time, & tegra_rtc_read_alarm, & tegra_rtc_set_alarm, & tegra_rtc_proc, 0, 0, & tegra_rtc_alarm_irq_enable}; static int tegra_rtc_probe(struct platform_device *pdev ) { struct tegra_rtc_info *info ; struct resource *res ; int ret ; void *tmp ; resource_size_t tmp___0 ; struct resource *tmp___1 ; resource_size_t tmp___2 ; spinlock_t __constr_expr_0 ; long tmp___3 ; long tmp___4 ; resource_size_t tmp___5 ; { tmp = ldv_kzalloc_22(56U, 208U); info = (struct tegra_rtc_info *)tmp; if ((unsigned long )info == (unsigned long )((struct tegra_rtc_info *)0)) { return (-12); } else { } res = platform_get_resource(pdev, 512U, 0U); if ((unsigned long )res == (unsigned long )((struct resource *)0)) { dev_err((struct device const *)(& pdev->dev), "Unable to allocate resources for device.\n"); ret = -16; goto err_free_info; } else { } tmp___0 = resource_size((struct resource const *)res); tmp___1 = __request_region(& iomem_resource, res->start, tmp___0, pdev->name, 0); if ((unsigned long )tmp___1 == (unsigned long )((struct resource *)0)) { dev_err((struct device const *)(& pdev->dev), "Unable to request mem region for device.\n"); ret = -16; goto err_free_info; } else { } info->tegra_rtc_irq = platform_get_irq(pdev, 0U); if (info->tegra_rtc_irq <= 0) { ret = -16; goto err_release_mem_region; } else { } tmp___2 = resource_size((struct resource const *)res); info->rtc_base = tegra_ioremap((unsigned long )res->start, tmp___2, 0U); if ((unsigned long )info->rtc_base == (unsigned long )((void *)0)) { dev_err((struct device const *)(& pdev->dev), "Unable to grab IOs for device.\n"); ret = -16; goto err_release_mem_region; } else { } info->pdev = pdev; __constr_expr_0.ldv_2857.rlock.raw_lock.slock = 1U; __constr_expr_0.ldv_2857.rlock.magic = 3735899821U; __constr_expr_0.ldv_2857.rlock.owner_cpu = 4294967295U; __constr_expr_0.ldv_2857.rlock.owner = 4294967295L; __constr_expr_0.ldv_2857.rlock.dep_map.key = 0; __constr_expr_0.ldv_2857.rlock.dep_map.class_cache[0] = 0; __constr_expr_0.ldv_2857.rlock.dep_map.class_cache[1] = 0; __constr_expr_0.ldv_2857.rlock.dep_map.name = "info->tegra_rtc_lock"; __constr_expr_0.ldv_2857.rlock.dep_map.cpu = 0; __constr_expr_0.ldv_2857.rlock.dep_map.ip = 0UL; info->tegra_rtc_lock = __constr_expr_0; platform_set_drvdata(pdev, (void *)info); //__asm__ volatile ("dsb": : : "memory"); //outer_sync(); //*((unsigned int volatile *)info->rtc_base + 20U) = 0U; //__asm__ volatile ("dsb": : : "memory"); //outer_sync(); //*((unsigned int volatile *)info->rtc_base + 44U) = 4294967295U; //__asm__ volatile ("dsb": : : "memory"); //outer_sync(); //*((unsigned int volatile *)info->rtc_base + 40U) = 0U; device_init_wakeup(& pdev->dev, 1); info->rtc_dev = ldv_rtc_device_register_23(pdev->name, & pdev->dev, (struct rtc_class_ops const *)(& tegra_rtc_ops), & __this_module); tmp___4 = IS_ERR((void const *)info->rtc_dev); if (tmp___4 != 0L) { tmp___3 = PTR_ERR((void const *)info->rtc_dev); ret = (int )tmp___3; info->rtc_dev = 0; dev_err((struct device const *)(& pdev->dev), "Unable to register device (err=%d).\n", ret); goto err_iounmap; } else { } ret = ldv_request_irq_24((unsigned int )info->tegra_rtc_irq, & tegra_rtc_irq_handler, 4UL, "rtc alarm", (void *)(& pdev->dev)); if (ret != 0) { dev_err((struct device const *)(& pdev->dev), "Unable to request interrupt for device (err=%d).\n", ret); goto err_dev_unreg; } else { } dev_notice((struct device const *)(& pdev->dev), "Tegra internal Real Time Clock\n"); return (0); err_dev_unreg: ldv_rtc_device_unregister_25(info->rtc_dev); err_iounmap: tegra_iounmap((void volatile *)info->rtc_base); err_release_mem_region: tmp___5 = resource_size((struct resource const *)res); __release_region(& iomem_resource, res->start, tmp___5); err_free_info: kfree((void const *)info); return (ret); } } static int tegra_rtc_remove(struct platform_device *pdev ) { struct tegra_rtc_info *info ; void *tmp ; struct resource *res ; resource_size_t tmp___0 ; { tmp = platform_get_drvdata((struct platform_device const *)pdev); info = (struct tegra_rtc_info *)tmp; res = platform_get_resource(pdev, 512U, 0U); if ((unsigned long )res == (unsigned long )((struct resource *)0)) { return (-16); } else { } ldv_free_irq_26((unsigned int )info->tegra_rtc_irq, (void *)(& pdev->dev)); ldv_rtc_device_unregister_27(info->rtc_dev); tegra_iounmap((void volatile *)info->rtc_base); tmp___0 = resource_size((struct resource const *)res); __release_region(& iomem_resource, res->start, tmp___0); kfree((void const *)info); platform_set_drvdata(pdev, 0); return (0); } } static int tegra_rtc_suspend(struct platform_device *pdev , pm_message_t state ) { struct device *dev ; struct tegra_rtc_info *info ; void *tmp ; bool tmp___1 ; { dev = & pdev->dev; tmp = platform_get_drvdata((struct platform_device const *)pdev); info = (struct tegra_rtc_info *)tmp; tegra_rtc_wait_while_busy(dev); //__asm__ volatile ("dsb": : : "memory"); //outer_sync(); //*((unsigned int volatile *)info->rtc_base + 44U) = 4294967295U; //__asm__ volatile ("dsb": : : "memory"); //outer_sync(); //*((unsigned int volatile *)info->rtc_base + 40U) = 1U; tmp___1 = device_may_wakeup(dev); if ((int )tmp___1) { enable_irq_wake((unsigned int )info->tegra_rtc_irq); } else { } return (0); } } static int tegra_rtc_resume(struct platform_device *pdev ) { struct device *dev ; struct tegra_rtc_info *info ; void *tmp ; bool tmp___1 ; { dev = & pdev->dev; tmp = platform_get_drvdata((struct platform_device const *)pdev); info = (struct tegra_rtc_info *)tmp; tmp___1 = device_may_wakeup(dev); if ((int )tmp___1) { disable_irq_wake((unsigned int )info->tegra_rtc_irq); } else { } return (0); } } static void tegra_rtc_shutdown(struct platform_device *pdev ) { { tegra_rtc_alarm_irq_enable(& pdev->dev, 0U); return; } } static struct platform_driver tegra_rtc_driver = {0, & tegra_rtc_remove, & tegra_rtc_shutdown, & tegra_rtc_suspend, & tegra_rtc_resume, {"tegra_rtc", 0, & __this_module, 0, (_Bool)0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0}; static int tegra_rtc_init(void) { int tmp ; { tmp = platform_driver_probe(& tegra_rtc_driver, & tegra_rtc_probe); return (tmp); } } static void tegra_rtc_exit(void) { { platform_driver_unregister(& tegra_rtc_driver); return; } } int ldv_retval_2 ; int ldv_retval_0 ; extern void ldv_initialize(void) ; int ldv_retval_1 ; extern void ldv_check_final_state(void) ; extern int ldv_probe_2(void) ; extern int ldv_probe_3(void) ; extern int ldv_release_3(void) ; int ldv_irq_1(int state , int line , void *data ) { irqreturn_t irq_retval ; int tmp ; { if (state != 0) { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (state == 1) { LDV_IN_INTERRUPT = 2; irq_retval = tegra_rtc_irq_handler(line, data); LDV_IN_INTERRUPT = 1; return (state); } else { } goto ldv_15981; default: ldv_stop(); } ldv_15981: ; } else { } return (state); } } void activate_suitable_irq_1(int line , void *data ) { { if (ldv_irq_1_0 == 0) { ldv_irq_line_1_0 = line; ldv_irq_data_1_0 = data; ldv_irq_1_0 = 1; return; } else { } if (ldv_irq_1_1 == 0) { ldv_irq_line_1_1 = line; ldv_irq_data_1_1 = data; ldv_irq_1_1 = 1; return; } else { } if (ldv_irq_1_2 == 0) { ldv_irq_line_1_2 = line; ldv_irq_data_1_2 = data; ldv_irq_1_2 = 1; return; } else { } if (ldv_irq_1_3 == 0) { ldv_irq_line_1_3 = line; ldv_irq_data_1_3 = data; ldv_irq_1_3 = 1; return; } else { } return; } } int reg_check_1(irqreturn_t (*handler)(int , void * ) ) { { if ((unsigned long )handler == (unsigned long )(& tegra_rtc_irq_handler)) { return (1); } else { } return (0); } } void choose_interrupt_1(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_0, ldv_irq_line_1_0, ldv_irq_data_1_0); goto ldv_15998; case 1: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_1, ldv_irq_line_1_1, ldv_irq_data_1_1); goto ldv_15998; case 2: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_2, ldv_irq_line_1_2, ldv_irq_data_1_2); goto ldv_15998; case 3: ldv_irq_1_0 = ldv_irq_1(ldv_irq_1_3, ldv_irq_line_1_3, ldv_irq_data_1_3); goto ldv_15998; default: ldv_stop(); } ldv_15998: ; return; } } void ldv_initialize_rtc_class_ops_3(void) { void *tmp ; void *tmp___0 ; void *tmp___1 ; { tmp = ldv_zalloc(36U); tegra_rtc_ops_group0 = (struct rtc_time *)tmp; tmp___0 = ldv_zalloc(600U); tegra_rtc_ops_group1 = (struct device *)tmp___0; tmp___1 = ldv_zalloc(40U); tegra_rtc_ops_group2 = (struct rtc_wkalrm *)tmp___1; return; } } void ldv_initialize_platform_driver_2(void) { void *tmp ; { tmp = ldv_zalloc(624U); tegra_rtc_driver_group0 = (struct platform_device *)tmp; return; } } void disable_suitable_irq_1(int line , void *data ) { { if (ldv_irq_1_0 != 0 && line == ldv_irq_line_1_0) { ldv_irq_1_0 = 0; return; } else { } if (ldv_irq_1_1 != 0 && line == ldv_irq_line_1_1) { ldv_irq_1_1 = 0; return; } else { } if (ldv_irq_1_2 != 0 && line == ldv_irq_line_1_2) { ldv_irq_1_2 = 0; return; } else { } if (ldv_irq_1_3 != 0 && line == ldv_irq_line_1_3) { ldv_irq_1_3 = 0; return; } else { } return; } } int main(void) { struct seq_file *ldvarg1 ; void *tmp ; unsigned int ldvarg0 ; unsigned int tmp___0 ; pm_message_t ldvarg2 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; { tmp = ldv_zalloc(136U); ldvarg1 = (struct seq_file *)tmp; tmp___0 = __VERIFIER_nondet_uint(); ldvarg0 = tmp___0; ldv_initialize(); memset((void *)(& ldvarg2), 0, 4U); ldv_state_variable_1 = 1; ref_cnt = 0; ldv_state_variable_0 = 1; ldv_state_variable_3 = 0; ldv_state_variable_2 = 0; ldv_16053: tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_1 != 0) { choose_interrupt_1(); } else { } goto ldv_16026; case 1: ; if (ldv_state_variable_0 != 0) { tmp___2 = __VERIFIER_nondet_int(); switch (tmp___2) { case 0: ; if (ldv_state_variable_0 == 3 && ref_cnt == 0) { tegra_rtc_exit(); ldv_state_variable_0 = 2; goto ldv_final; } else { } goto ldv_16030; case 1: ; if (ldv_state_variable_0 == 1) { ldv_retval_0 = tegra_rtc_init(); if (ldv_retval_0 == 0) { ldv_state_variable_0 = 3; ldv_state_variable_2 = 1; ldv_initialize_platform_driver_2(); } else { } if (ldv_retval_0 != 0) { ldv_state_variable_0 = 2; goto ldv_final; } else { } } else { } goto ldv_16030; default: ldv_stop(); } ldv_16030: ; } else { } goto ldv_16026; case 2: ; if (ldv_state_variable_3 != 0) { tmp___3 = __VERIFIER_nondet_int(); switch (tmp___3) { case 0: ; if (ldv_state_variable_3 == 2) { tegra_rtc_read_alarm(tegra_rtc_ops_group1, tegra_rtc_ops_group2); ldv_state_variable_3 = 2; } else { } goto ldv_16035; case 1: ; if (ldv_state_variable_3 == 1) { tegra_rtc_set_alarm(tegra_rtc_ops_group1, tegra_rtc_ops_group2); ldv_state_variable_3 = 1; } else { } if (ldv_state_variable_3 == 2) { tegra_rtc_set_alarm(tegra_rtc_ops_group1, tegra_rtc_ops_group2); ldv_state_variable_3 = 2; } else { } goto ldv_16035; case 2: ; if (ldv_state_variable_3 == 1) { tegra_rtc_set_time(tegra_rtc_ops_group1, tegra_rtc_ops_group0); ldv_state_variable_3 = 1; } else { } if (ldv_state_variable_3 == 2) { tegra_rtc_set_time(tegra_rtc_ops_group1, tegra_rtc_ops_group0); ldv_state_variable_3 = 2; } else { } goto ldv_16035; case 3: ; if (ldv_state_variable_3 == 1) { tegra_rtc_read_time(tegra_rtc_ops_group1, tegra_rtc_ops_group0); ldv_state_variable_3 = 1; } else { } if (ldv_state_variable_3 == 2) { tegra_rtc_read_time(tegra_rtc_ops_group1, tegra_rtc_ops_group0); ldv_state_variable_3 = 2; } else { } goto ldv_16035; case 4: ; if (ldv_state_variable_3 == 1) { tegra_rtc_proc(tegra_rtc_ops_group1, ldvarg1); ldv_state_variable_3 = 1; } else { } if (ldv_state_variable_3 == 2) { tegra_rtc_proc(tegra_rtc_ops_group1, ldvarg1); ldv_state_variable_3 = 2; } else { } goto ldv_16035; case 5: ; if (ldv_state_variable_3 == 1) { tegra_rtc_alarm_irq_enable(tegra_rtc_ops_group1, ldvarg0); ldv_state_variable_3 = 1; } else { } if (ldv_state_variable_3 == 2) { tegra_rtc_alarm_irq_enable(tegra_rtc_ops_group1, ldvarg0); ldv_state_variable_3 = 2; } else { } goto ldv_16035; case 6: ; if (ldv_state_variable_3 == 2) { ldv_release_3(); ldv_state_variable_3 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_16035; case 7: ; if (ldv_state_variable_3 == 1) { ldv_probe_3(); ldv_state_variable_3 = 2; ref_cnt = ref_cnt + 1; } else { } goto ldv_16035; default: ldv_stop(); } ldv_16035: ; } else { } goto ldv_16026; case 3: ; if (ldv_state_variable_2 != 0) { tmp___4 = __VERIFIER_nondet_int(); switch (tmp___4) { case 0: ; if (ldv_state_variable_2 == 4) { tegra_rtc_shutdown(tegra_rtc_driver_group0); ldv_state_variable_2 = 3; } else { } if (ldv_state_variable_2 == 2) { tegra_rtc_shutdown(tegra_rtc_driver_group0); ldv_state_variable_2 = 3; } else { } goto ldv_16046; case 1: ; if (ldv_state_variable_2 == 2) { ldv_retval_2 = tegra_rtc_suspend(tegra_rtc_driver_group0, ldvarg2); if (ldv_retval_2 == 0) { ldv_state_variable_2 = 4; } else { } } else { } goto ldv_16046; case 2: ; if (ldv_state_variable_2 == 4) { tegra_rtc_remove(tegra_rtc_driver_group0); ldv_state_variable_2 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_2 == 3) { tegra_rtc_remove(tegra_rtc_driver_group0); ldv_state_variable_2 = 1; ref_cnt = ref_cnt - 1; } else { } if (ldv_state_variable_2 == 2) { tegra_rtc_remove(tegra_rtc_driver_group0); ldv_state_variable_2 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_16046; case 3: ; if (ldv_state_variable_2 == 4) { ldv_retval_1 = tegra_rtc_resume(tegra_rtc_driver_group0); if (ldv_retval_1 == 0) { ldv_state_variable_2 = 2; } else { } } else { } goto ldv_16046; case 4: ; if (ldv_state_variable_2 == 1) { ldv_probe_2(); ldv_state_variable_2 = 2; ref_cnt = ref_cnt + 1; } else { } goto ldv_16046; default: ldv_stop(); } ldv_16046: ; } else { } goto ldv_16026; default: ldv_stop(); } ldv_16026: ; goto ldv_16053; ldv_final: ldv_check_final_state(); return 0; } } __inline static void spin_unlock_irqrestore(spinlock_t *lock , unsigned long flags ) { { ldv_spin_lock_check(); ldv_spin_unlock_irqrestore_9(lock, flags); return; } } __inline static long PTR_ERR(void const *ptr ) { long tmp ; { tmp = ldv_ptr_err(ptr); return (tmp); } } __inline static long IS_ERR(void const *ptr ) { long tmp ; { tmp = ldv_is_err(ptr); return (tmp); } } __inline static void *ldv_kzalloc_22(size_t size , gfp_t flags ) { void *tmp ; { tmp = ldv_zalloc(size); return (tmp); } } struct rtc_device *ldv_rtc_device_register_23(char const *ldv_func_arg1 , struct device *ldv_func_arg2 , struct rtc_class_ops const *ldv_func_arg3 , struct module *ldv_func_arg4 ) { ldv_func_ret_type ldv_func_res ; struct rtc_device *tmp ; long tmp___0 ; { tmp = rtc_device_register(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; tmp___0 = IS_ERR((void const *)ldv_func_res); if (tmp___0 == 0L) { ldv_state_variable_3 = 1; ldv_initialize_rtc_class_ops_3(); } else { } return (ldv_func_res); } } __inline static int ldv_request_irq_24(unsigned int irq , irqreturn_t (*handler)(int , void * ) , unsigned long flags , char const *name , void *dev ) { ldv_func_ret_type___0 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = request_irq(irq, handler, flags, name, dev); ldv_func_res = tmp; tmp___0 = reg_check_1(handler); if (tmp___0 != 0 && ldv_func_res == 0) { activate_suitable_irq_1((int )irq, dev); } else { } return (ldv_func_res); } } void ldv_rtc_device_unregister_25(struct rtc_device *rtc ) { { rtc_device_unregister(rtc); ldv_state_variable_3 = 0; return; } } void ldv_free_irq_26(unsigned int ldv_func_arg1 , void *ldv_func_arg2 ) { { free_irq(ldv_func_arg1, ldv_func_arg2); disable_suitable_irq_1((int )ldv_func_arg1, ldv_func_arg2); return; } } void ldv_rtc_device_unregister_27(struct rtc_device *rtc ) { { rtc_device_unregister(rtc); ldv_state_variable_3 = 0; return; } } long ldv_is_err(void const *ptr ) { { return ((unsigned long )ptr > 2012UL); } } void *ldv_err_ptr(long error ) { { return ((void *)(2012L - error)); } } long ldv_ptr_err(void const *ptr ) { { return ((long )(2012UL - (unsigned long )ptr)); } } long ldv_is_err_or_null(void const *ptr ) { long tmp ; int tmp___0 ; { if (! ptr) { tmp___0 = 1; } else { tmp = ldv_is_err((unsigned long )ptr); if (tmp) { tmp___0 = 1; } else { tmp___0 = 0; } } return (tmp___0); } } int ldv_init = 0; void ldv_spin_lock_init(void) { { if (ldv_init == 0) { ldv_init = 1; } else { } return; } } void ldv_spin_lock_check(void) { { if (ldv_init == 1) { } else { ldv_error(); } return; } }