*/ static void __exit tcmi_ctlfs_exit(void) { minfo(INFO3, "Unregistering TCMI control filesystem"); destroy_inodecache(); unregister_filesystem(&self.fs_type); } /** \<\<singleton\>\> instance initialization */ static struct tcmi_ctlfs self = { /** Root directory of the TCMI control filesystem. */ .root_dir = NULL, /** This semaphore protects the vfs_mount value */ .vfs_mnt_sem = __SEMAPHORE_INITIALIZER( self.vfs_mnt_sem, 1 ), /** Filesystem mount object */ .vfs_mnt = NULL, /** Filesystem super block object */ .sb = NULL, /** File system type descriptor, only get_sb method is needed * to be customized */ .fs_type = { .owner = THIS_MODULE, .name = "tcmi_ctlfs", .get_sb = tcmi_ctlfs_get_super, .kill_sb = kill_litter_super, }, };
.nulls_base = (3U << RHT_BASE_SHIFT), }; static struct rhashtable_params test_rht_params_dup = { .head_offset = offsetof(struct test_obj_rhl, list_node), .key_offset = offsetof(struct test_obj_rhl, value), .key_len = sizeof(struct test_obj_val), .hashfn = jhash, .obj_hashfn = my_hashfn, .obj_cmpfn = my_cmpfn, .nelem_hint = 128, .automatic_shrinking = false, }; static struct semaphore prestart_sem; static struct semaphore startup_sem = __SEMAPHORE_INITIALIZER(startup_sem, 0); static int insert_retry(struct rhashtable *ht, struct test_obj *obj, const struct rhashtable_params params) { int err, retries = -1, enomem_retries = 0; do { retries++; cond_resched(); err = rhashtable_insert_fast(ht, &obj->node, params); if (err == -ENOMEM && enomem_retry) { enomem_retries++; err = -EBUSY; } } while (err == -EBUSY);
struct dcam_module { uint32_t dcam_mode; uint32_t module_addr; struct dcam_cap_desc dcam_cap; struct dcam_path_desc dcam_path1; struct dcam_path_desc dcam_path2; dcam_isr_func user_func[USER_IRQ_NUMBER]; void *user_data[USER_IRQ_NUMBER]; }; static struct dcam_frame s_path1_frame[DCAM_FRM_CNT_MAX]; static struct dcam_frame s_path2_frame[DCAM_FRM_CNT_MAX]; static atomic_t s_dcam_users = ATOMIC_INIT(0); static atomic_t s_resize_flag = ATOMIC_INIT(0); static struct semaphore s_done_sema = __SEMAPHORE_INITIALIZER(s_done_sema, 0); static uint32_t s_resize_wait = 0; static uint32_t s_path1_wait = 0; static struct dcam_module s_dcam_mod = {0}; static uint32_t g_dcam_irq = 0x5A0000A5; static struct clk *s_dcam_clk = NULL; static struct clk *s_ccir_clk = NULL; static struct clk *s_dcam_mipi_clk = NULL; static DEFINE_MUTEX(dcam_sem); static DEFINE_SPINLOCK(dcam_lock); static void _dcam_frm_clear(void); static void _dcam_link_frm(uint32_t base_id); static int32_t _dcam_path_set_next_frm(uint32_t path_index, uint32_t is_1st_frm);
const struct meta mars_timespec_meta[] = { META_INI(tv_sec, struct timespec, FIELD_INT), META_INI(tv_nsec, struct timespec, FIELD_INT), {} }; EXPORT_SYMBOL_GPL(mars_timespec_meta); ////////////////////////////////////////////////////////////// // crypto stuff #include <linux/crypto.h> static struct crypto_hash *mars_tfm = NULL; static struct semaphore tfm_sem = __SEMAPHORE_INITIALIZER(tfm_sem, 1); int mars_digest_size = 0; EXPORT_SYMBOL_GPL(mars_digest_size); void mars_digest(unsigned char *digest, void *data, int len) { struct hash_desc desc = { .tfm = mars_tfm, .flags = 0, }; struct scatterlist sg; memset(digest, 0, mars_digest_size); // TODO: use per-thread instance, omit locking down(&tfm_sem);
#include "soc_ao_sctrl_interface.h" #include "soc_media_sctrl_interface.h" #include "soc_pmctrl_interface.h" #include "soc_peri_sctrl_interface.h" #include "soc_baseaddr_interface.h" #include "video_reg_ops.h" static struct regulator *media_pd_vdd = NULL; static video_harden_vote video_harden_regulator_vote = {0,0,0,0}; static video_harden_vote video_harden_rst_iso_clk_vote = {0,0,0,0}; static video_harden_vote video_harden_video_noc_vote = {0,0,0,0}; static struct semaphore video_harden_busy_lock = __SEMAPHORE_INITIALIZER(video_harden_busy_lock, 1); static int video_harden_device_id_check(video_harden_dev_id_enum dev_id) { switch (dev_id) { printk(KERN_INFO "dev_id=%d.\n", dev_id); case VIDEO_HARDEN_DEV_ID_VCODEC: /* VCODEC */ case VIDEO_HARDEN_DEV_ID_JPEG: /* JPEG */ case VIDEO_HARDEN_DEV_ID_ISP: /* ISP */ { return 0; } default: {
static bool blanked; #define NUM_TILER1D_SLOTS 2 static struct tiler1d_slot { struct list_head q; tiler_blk_handle slot; u32 phys; u32 size; u32 *page_map; } slots[NUM_TILER1D_SLOTS]; static struct list_head free_slots; static struct dsscomp_dev *cdev; static DEFINE_MUTEX(mtx); static struct semaphore free_slots_sem = __SEMAPHORE_INITIALIZER(free_slots_sem, 0); /* gralloc composition sync object */ struct dsscomp_gralloc_t { void (*cb_fn)(void *, int); void *cb_arg; struct list_head q; struct list_head slots; atomic_t refs; bool early_callback; bool programmed; #if defined(CONFIG_MACH_LGE_SU870_3D_DISPLAY) //##hwcho_20120522 #ifdef CONFIG_DSSCOMP_ADAPT struct dsscomp_adapt_info *adapt_info; #endif #endif //##