| /OK3568_Linux_fs/kernel/tools/testing/selftests/memfd/ |
| H A D | memfd_test.c | 39 int r, fd; in mfd_assert_new() local 41 fd = sys_memfd_create(name, flags); in mfd_assert_new() 42 if (fd < 0) { in mfd_assert_new() 48 r = ftruncate(fd, sz); in mfd_assert_new() 54 return fd; in mfd_assert_new() 59 int r, fd; in mfd_assert_reopen_fd() local 64 fd = open(path, O_RDWR); in mfd_assert_reopen_fd() 65 if (fd < 0) { in mfd_assert_reopen_fd() 70 return fd; in mfd_assert_reopen_fd() 86 static unsigned int mfd_assert_get_seals(int fd) in mfd_assert_get_seals() argument [all …]
|
| /OK3568_Linux_fs/kernel/drivers/clk/ |
| H A D | clk-fractional-divider.c | 17 static inline u32 clk_fd_readl(struct clk_fractional_divider *fd) in clk_fd_readl() argument 19 if (fd->flags & CLK_FRAC_DIVIDER_BIG_ENDIAN) in clk_fd_readl() 20 return ioread32be(fd->reg); in clk_fd_readl() 22 return readl(fd->reg); in clk_fd_readl() 25 static inline void clk_fd_writel(struct clk_fractional_divider *fd, u32 val) in clk_fd_writel() argument 27 if (fd->flags & CLK_FRAC_DIVIDER_BIG_ENDIAN) in clk_fd_writel() 28 iowrite32be(val, fd->reg); in clk_fd_writel() 30 writel(val, fd->reg); in clk_fd_writel() 36 struct clk_fractional_divider *fd = to_clk_fd(hw); in clk_fd_recalc_rate() local 42 if (fd->lock) in clk_fd_recalc_rate() [all …]
|
| /OK3568_Linux_fs/kernel/fs/hfsplus/ |
| H A D | bfind.c | 15 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) in hfs_find_init() argument 19 fd->tree = tree; in hfs_find_init() 20 fd->bnode = NULL; in hfs_find_init() 24 fd->search_key = ptr; in hfs_find_init() 25 fd->key = ptr + tree->max_key_len + 2; in hfs_find_init() 44 void hfs_find_exit(struct hfs_find_data *fd) in hfs_find_exit() argument 46 hfs_bnode_put(fd->bnode); in hfs_find_exit() 47 kfree(fd->search_key); in hfs_find_exit() 49 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit() 50 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit() [all …]
|
| /OK3568_Linux_fs/kernel/fs/hfs/ |
| H A D | bfind.c | 15 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) in hfs_find_init() argument 19 fd->tree = tree; in hfs_find_init() 20 fd->bnode = NULL; in hfs_find_init() 24 fd->search_key = ptr; in hfs_find_init() 25 fd->key = ptr + tree->max_key_len + 2; in hfs_find_init() 44 void hfs_find_exit(struct hfs_find_data *fd) in hfs_find_exit() argument 46 hfs_bnode_put(fd->bnode); in hfs_find_exit() 47 kfree(fd->search_key); in hfs_find_exit() 49 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit() 50 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/scsi/ |
| H A D | fdomain.c | 118 static inline void fdomain_make_bus_idle(struct fdomain *fd) in fdomain_make_bus_idle() argument 120 outb(0, fd->base + REG_BCTL); in fdomain_make_bus_idle() 121 outb(0, fd->base + REG_MCTL); in fdomain_make_bus_idle() 122 if (fd->chip == tmc18c50 || fd->chip == tmc18c30) in fdomain_make_bus_idle() 125 fd->base + REG_ACTL); in fdomain_make_bus_idle() 127 outb(ACTL_RESET | PARITY_MASK, fd->base + REG_ACTL); in fdomain_make_bus_idle() 181 struct fdomain *fd = shost_priv(sh); in fdomain_select() local 183 outb(BCTL_BUSEN | BCTL_SEL, fd->base + REG_BCTL); in fdomain_select() 184 outb(BIT(sh->this_id) | BIT(target), fd->base + REG_SCSI_DATA_NOACK); in fdomain_select() 187 outb(PARITY_MASK, fd->base + REG_ACTL); in fdomain_select() [all …]
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/wireguard/qemu/ |
| H A D | init.c | 59 int fd; in seed_rng() local 72 fd = open("/dev/urandom", O_WRONLY); in seed_rng() 73 if (fd < 0) in seed_rng() 76 if (ioctl(fd, RNDADDENTROPY, &entropy) < 0) in seed_rng() 79 close(fd); in seed_rng() 111 int fd; in enable_logging() local 113 fd = open("/proc/sys/kernel/printk", O_WRONLY); in enable_logging() 114 if (fd >= 0) { in enable_logging() 115 if (write(fd, "9\n", 2) != 2) in enable_logging() 117 close(fd); in enable_logging() [all …]
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkisp_demo/demo/include/ |
| H A D | xf86drm.h | 128 int fd; member 133 extern int drmIoctl(int fd, unsigned long request, void *arg); 135 extern drmHashEntry *drmGetEntry(int fd); 521 #define DRM_LIGHT_LOCK(fd,lock,context) \ argument 525 if (__ret) drmGetLock(fd,context,0); \ 530 #define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count) \ argument 534 if (__ret) drmGetLock(fd,context,0); \ 538 #define DRM_LOCK(fd,lock,context,flags) \ argument 540 if (flags) drmGetLock(fd,context,flags); \ 541 else DRM_LIGHT_LOCK(fd,lock,context); \ [all …]
|
| /OK3568_Linux_fs/external/linux-rga/samples/im2d_slt/third-party/libdrm/include/ |
| H A D | xf86drm.h | 128 int fd; member 133 extern int drmIoctl(int fd, unsigned long request, void *arg); 135 extern drmHashEntry *drmGetEntry(int fd); 521 #define DRM_LIGHT_LOCK(fd,lock,context) \ argument 525 if (__ret) drmGetLock(fd,context,0); \ 530 #define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count) \ argument 534 if (__ret) drmGetLock(fd,context,0); \ 538 #define DRM_LOCK(fd,lock,context,flags) \ argument 540 if (flags) drmGetLock(fd,context,flags); \ 541 else DRM_LIGHT_LOCK(fd,lock,context); \ [all …]
|
| /OK3568_Linux_fs/external/linux-rga/samples/utils/3rdparty/libdrm/include/ |
| H A D | xf86drm.h | 128 int fd; member 133 extern int drmIoctl(int fd, unsigned long request, void *arg); 135 extern drmHashEntry *drmGetEntry(int fd); 521 #define DRM_LIGHT_LOCK(fd,lock,context) \ argument 525 if (__ret) drmGetLock(fd,context,0); \ 530 #define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count) \ argument 534 if (__ret) drmGetLock(fd,context,0); \ 538 #define DRM_LOCK(fd,lock,context,flags) \ argument 540 if (flags) drmGetLock(fd,context,flags); \ 541 else DRM_LIGHT_LOCK(fd,lock,context); \ [all …]
|
| /OK3568_Linux_fs/kernel/drivers/clk/rockchip/regmap/ |
| H A D | clk-regmap-fractional-divider.c | 20 struct clk_regmap_fractional_divider *fd = in clk_regmap_fractional_divider_recalc_rate() local 26 regmap_read(fd->regmap, fd->reg, &val); in clk_regmap_fractional_divider_recalc_rate() 28 m = (val & fd->mmask) >> fd->mshift; in clk_regmap_fractional_divider_recalc_rate() 29 n = (val & fd->nmask) >> fd->nshift; in clk_regmap_fractional_divider_recalc_rate() 44 struct clk_regmap_fractional_divider *fd = in clk_regmap_fractional_divider_approximation() local 63 if (scale > fd->nwidth) in clk_regmap_fractional_divider_approximation() 64 rate <<= scale - fd->nwidth; in clk_regmap_fractional_divider_approximation() 67 GENMASK(fd->mwidth - 1, 0), in clk_regmap_fractional_divider_approximation() 68 GENMASK(fd->nwidth - 1, 0), in clk_regmap_fractional_divider_approximation() 98 struct clk_regmap_fractional_divider *fd = in clk_regmap_fractional_divider_set_rate() local [all …]
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/bpf/ |
| H A D | test_maps.c | 40 int fd; in test_hashmap() local 42 fd = bpf_create_map(BPF_MAP_TYPE_HASH, sizeof(key), sizeof(value), in test_hashmap() 44 if (fd < 0) { in test_hashmap() 52 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap() 56 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == -1 && in test_hashmap() 61 assert(bpf_map_update_elem(fd, &key, &value, -1) == -1 && in test_hashmap() 65 assert(bpf_map_lookup_elem(fd, &key, &value) == 0 && value == 1234); in test_hashmap() 69 assert(bpf_map_lookup_elem(fd, &key, &value) == -1 && errno == ENOENT); in test_hashmap() 72 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) == -1 && in test_hashmap() 77 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == 0); in test_hashmap() [all …]
|
| /OK3568_Linux_fs/kernel/fs/ |
| H A D | file.c | 36 kvfree(fdt->fd); in __free_fdtable() 84 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable() 85 memset((char *)nfdt->fd + cpy, 0, set); in copy_fdtable() 139 fdt->fd = data; in alloc_fdtable() 155 kvfree(fdt->fd); in alloc_fdtable() 249 static inline void __set_close_on_exec(unsigned int fd, struct fdtable *fdt) in __set_close_on_exec() argument 251 __set_bit(fd, fdt->close_on_exec); in __set_close_on_exec() 254 static inline void __clear_close_on_exec(unsigned int fd, struct fdtable *fdt) in __clear_close_on_exec() argument 256 if (test_bit(fd, fdt->close_on_exec)) in __clear_close_on_exec() 257 __clear_bit(fd, fdt->close_on_exec); in __clear_close_on_exec() [all …]
|
| /OK3568_Linux_fs/external/security/librkcrypto/third_party/libdrm/include/ |
| H A D | xf86drm.h | 128 int fd; member 133 extern int drmIoctl(int fd, unsigned long request, void *arg); 135 extern drmHashEntry *drmGetEntry(int fd); 522 #define DRM_LIGHT_LOCK(fd,lock,context) \ argument 526 if (__ret) drmGetLock(fd,context,0); \ 531 #define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count) \ argument 535 if (__ret) drmGetLock(fd,context,0); \ 539 #define DRM_LOCK(fd,lock,context,flags) \ argument 541 if (flags) drmGetLock(fd,context,flags); \ 542 else DRM_LIGHT_LOCK(fd,lock,context); \ [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | file.h | 36 struct fd { struct 43 static inline void fdput(struct fd fd) in fdput() argument 45 if (fd.flags & FDPUT_FPUT) in fdput() 46 fput(fd.file); in fdput() 49 extern struct file *fget(unsigned int fd); 50 extern struct file *fget_many(unsigned int fd, unsigned int refs); 51 extern struct file *fget_raw(unsigned int fd); 52 extern struct file *fget_task(struct task_struct *task, unsigned int fd); 53 extern unsigned long __fdget(unsigned int fd); 54 extern unsigned long __fdget_raw(unsigned int fd); [all …]
|
| /OK3568_Linux_fs/kernel/tools/perf/tests/ |
| H A D | wp.c | 14 #define WP_TEST_ASSERT_VAL(fd, text, val) \ argument 17 wp_read(fd, &count, sizeof(long long)); \ 24 static int wp_read(int fd, long long *count, int size) in wp_read() argument 26 int ret = read(fd, count, size); in wp_read() 53 int fd; in __event() local 57 fd = sys_perf_event_open(&attr, 0, -1, -1, in __event() 59 if (fd < 0) in __event() 62 return fd; in __event() 67 int fd; in wp_ro_test() local 70 fd = __event(HW_BREAKPOINT_R, (void *)&data1, sizeof(data1)); in wp_ro_test() [all …]
|
| /OK3568_Linux_fs/kernel/tools/testing/vsock/ |
| H A D | vsock_test.c | 35 int fd; in test_stream_connection_reset() local 37 fd = socket(AF_VSOCK, SOCK_STREAM, 0); in test_stream_connection_reset() 41 ret = connect(fd, &addr.sa, sizeof(addr.svm)); in test_stream_connection_reset() 55 close(fd); in test_stream_connection_reset() 71 int fd; in test_stream_bind_only_client() local 76 fd = socket(AF_VSOCK, SOCK_STREAM, 0); in test_stream_bind_only_client() 80 ret = connect(fd, &addr.sa, sizeof(addr.svm)); in test_stream_bind_only_client() 97 close(fd); in test_stream_bind_only_client() 112 int fd; in test_stream_bind_only_server() local 114 fd = socket(AF_VSOCK, SOCK_STREAM, 0); in test_stream_bind_only_server() [all …]
|
| /OK3568_Linux_fs/external/xserver/hw/xfree86/os-support/shared/ |
| H A D | posix_tty.c | 119 int fd, i; in xf86OpenSerial() local 128 fd = xf86CheckIntOption(options, "fd", -1); in xf86OpenSerial() 130 if (fd == -1) in xf86OpenSerial() 131 SYSCALL(fd = open(dev, O_RDWR | O_NONBLOCK)); in xf86OpenSerial() 133 if (fd == -1) { in xf86OpenSerial() 141 if (!isatty(fd)) { in xf86OpenSerial() 144 return fd; in xf86OpenSerial() 148 SYSCALL(tcgetattr(fd, &t)); in xf86OpenSerial() 161 SYSCALL(tcsetattr(fd, TCSANOW, &t)); in xf86OpenSerial() 163 if (xf86SetSerial(fd, options) == -1) { in xf86OpenSerial() [all …]
|
| /OK3568_Linux_fs/kernel/fs/jffs2/ |
| H A D | build.c | 56 struct jffs2_full_dirent *fd; in jffs2_build_inode_pass1() local 61 for(fd = ic->scan_dents; fd; fd = fd->next) { in jffs2_build_inode_pass1() 63 if (!fd->ino) in jffs2_build_inode_pass1() 68 child_ic = jffs2_get_ino_cache(c, fd->ino); in jffs2_build_inode_pass1() 71 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1() 72 jffs2_mark_node_obsolete(c, fd->raw); in jffs2_build_inode_pass1() 74 fd->ic = NULL; in jffs2_build_inode_pass1() 79 fd->ic = child_ic; in jffs2_build_inode_pass1() 83 if (fd->type == DT_DIR) { in jffs2_build_inode_pass1() 89 dbg_fsbuild("increased nlink for child \"%s\" (ino #%u)\n", fd->name, fd->ino); in jffs2_build_inode_pass1() [all …]
|
| /OK3568_Linux_fs/buildroot/dl/unixbench/git/UnixBench/src/ |
| H A D | time-polling.c | 183 int fd, count, nready; in time_select() local 215 for (fd = find_first_set_bit (&e_fds, sizeof e_fds * 8); fd <= max_fd; in time_select() 216 fd = find_next_set_bit (&e_fds, sizeof e_fds * 8, fd) ) in time_select() 218 (*callbacks[fd].exception_func) (callbacks[fd].info); in time_select() 220 for (fd = find_first_set_bit (&i_fds, sizeof i_fds * 8); fd <= max_fd; in time_select() 221 fd = find_next_set_bit (&i_fds, sizeof i_fds * 8, fd) ) in time_select() 223 (*callbacks[fd].input_func) (callbacks[fd].info); in time_select() 225 for (fd = find_first_set_bit (&o_fds, sizeof o_fds * 8); fd <= max_fd; in time_select() 226 fd = find_next_set_bit (&o_fds, sizeof o_fds * 8, fd) ) in time_select() 228 (*callbacks[fd].output_func) (callbacks[fd].info); in time_select() [all …]
|
| /OK3568_Linux_fs/kernel/arch/um/os-Linux/ |
| H A D | file.c | 43 int os_stat_fd(const int fd, struct uml_stat *ubuf) in os_stat_fd() argument 48 CATCH_EINTR(err = fstat64(fd, &sbuf)); in os_stat_fd() 88 int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) in os_ioctl_generic() argument 92 err = ioctl(fd, cmd, arg); in os_ioctl_generic() 100 int os_get_ifname(int fd, char* namebuf) in os_get_ifname() argument 102 if (ioctl(fd, SIOCGIFNAME, namebuf) < 0) in os_get_ifname() 108 int os_set_slip(int fd) in os_set_slip() argument 113 if (ioctl(fd, TIOCSETD, &disc) < 0) in os_set_slip() 117 if (ioctl(fd, SIOCSIFENCAP, &sencap) < 0) in os_set_slip() 123 int os_mode_fd(int fd, int mode) in os_mode_fd() argument [all …]
|
| /OK3568_Linux_fs/kernel/drivers/clk/ti/ |
| H A D | fapll.c | 78 struct fapll_data *fd; member 86 static bool ti_fapll_clock_is_bypass(struct fapll_data *fd) in ti_fapll_clock_is_bypass() argument 88 u32 v = readl_relaxed(fd->base); in ti_fapll_clock_is_bypass() 90 if (fd->bypass_bit_inverted) in ti_fapll_clock_is_bypass() 96 static void ti_fapll_set_bypass(struct fapll_data *fd) in ti_fapll_set_bypass() argument 98 u32 v = readl_relaxed(fd->base); in ti_fapll_set_bypass() 100 if (fd->bypass_bit_inverted) in ti_fapll_set_bypass() 104 writel_relaxed(v, fd->base); in ti_fapll_set_bypass() 107 static void ti_fapll_clear_bypass(struct fapll_data *fd) in ti_fapll_clear_bypass() argument 109 u32 v = readl_relaxed(fd->base); in ti_fapll_clear_bypass() [all …]
|
| /OK3568_Linux_fs/device/rockchip/common/data/ |
| H A D | kmsgrab.c | 13 static void *map_fb(int fd, int handle, size_t size) { in map_fb() argument 21 ret = drmIoctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &arg); in map_fb() 27 ptr = mmap(0, size, PROT_READ, MAP_SHARED, arg.fd, 0); in map_fb() 36 static int get_fb_dmafd(int fd, int handle) in get_fb_dmafd() argument 42 args.fd = -1; in get_fb_dmafd() 45 ret = drmIoctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); in get_fb_dmafd() 49 return args.fd; in get_fb_dmafd() 52 static void destroy_dumb(int fd, int handle) { in destroy_dumb() argument 57 drmIoctl(fd, DRM_IOCTL_MODE_DESTROY_DUMB, &arg); in destroy_dumb() 60 static int dump_fb(int fd, int fb_id) { in dump_fb() argument [all …]
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/net/ |
| H A D | ipv6_flowlabel_mgr.c | 48 static int flowlabel_get(int fd, uint32_t label, uint8_t share, uint16_t flags) in flowlabel_get() argument 61 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_get() 64 static int flowlabel_put(int fd, uint32_t label) in flowlabel_put() argument 71 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_put() 74 static void run_tests(int fd) in run_tests() argument 80 expect_fail(flowlabel_get(fd, 1, IPV6_FL_S_ANY, 0)); in run_tests() 83 expect_fail(flowlabel_put(fd, 1)); in run_tests() 86 expect_fail(flowlabel_get(fd, 0x1FFFFF, IPV6_FL_S_ANY, in run_tests() 90 expect_pass(flowlabel_get(fd, 1, IPV6_FL_S_ANY, IPV6_FL_F_CREATE)); in run_tests() 92 expect_pass(flowlabel_get(fd, 1, IPV6_FL_S_ANY, 0)); in run_tests() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/infiniband/hw/hfi1/ |
| H A D | user_exp_rcv.c | 57 struct hfi1_filedata *fd); 59 static int set_rcvarray_entry(struct hfi1_filedata *fd, 68 static int program_rcvarray(struct hfi1_filedata *fd, struct tid_user_buf *, 73 static int unprogram_rcvarray(struct hfi1_filedata *fd, u32 tidinfo, 75 static void clear_tid_node(struct hfi1_filedata *fd, struct tid_rb_node *node); 86 int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd, in hfi1_user_exp_rcv_init() argument 91 fd->entry_to_rb = kcalloc(uctxt->expected_count, in hfi1_user_exp_rcv_init() 94 if (!fd->entry_to_rb) in hfi1_user_exp_rcv_init() 98 fd->invalid_tid_idx = 0; in hfi1_user_exp_rcv_init() 99 fd->invalid_tids = kcalloc(uctxt->expected_count, in hfi1_user_exp_rcv_init() [all …]
|
| /OK3568_Linux_fs/u-boot/common/ |
| H A D | rbsb.c | 180 rdchk(int fd) in rdchk() argument 184 ioctl(fd, FIONREAD, &lf); in rdchk() 195 rdchk(int fd) in rdchk() argument 199 savestat = fcntl(fd, F_GETFL) ; in rdchk() 203 if (-1==fcntl(fd, F_SETFL, savestat | O_NDELAY)) in rdchk() 205 lf = read(fd, &checked, 1) ; in rdchk() 206 if (-1==fcntl(fd, F_SETFL, savestat)) { in rdchk() 217 canit(fd); in rdchk() 221 fcntl(fd, F_SETFL, savestat | O_NDELAY); in rdchk() 222 lf = read(fd, &checked, 1) ; in rdchk() [all …]
|