/kernel/linux/linux-5.10/tools/perf/util/ |
H A D | strbuf.h | 11 * 1. the ->buf member is always malloc-ed, hence strbuf's can be used to 20 * member to be a valid C-string. Every strbuf function ensure this 35 * missing API to the strbuf module is the way to go. 50 struct strbuf { struct 58 /*----- strbuf life cycle -----*/ 59 int strbuf_init(struct strbuf *buf, ssize_t hint); 60 void strbuf_release(struct strbuf *buf); 61 char *strbuf_detach(struct strbuf *buf, size_t *); 63 /*----- strbuf size related -----*/ 64 static inline ssize_t strbuf_avail(const struct strbuf *s [all...] |
H A D | strbuf.c | 4 #include "strbuf.h" 16 * initialized strbuf. 20 int strbuf_init(struct strbuf *sb, ssize_t hint) in strbuf_init() 29 void strbuf_release(struct strbuf *sb) in strbuf_release() 37 char *strbuf_detach(struct strbuf *sb, size_t *sz) in strbuf_detach() 46 int strbuf_grow(struct strbuf *sb, size_t extra) in strbuf_grow() 73 int strbuf_addch(struct strbuf *sb, int c) in strbuf_addch() 84 int strbuf_add(struct strbuf *sb, const void *data, size_t len) in strbuf_add() 94 static int strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap) in strbuf_addv() 128 int strbuf_addf(struct strbuf *s [all...] |
H A D | dwarf-aux.h | 13 struct strbuf; 117 int die_get_typename(Dwarf_Die *vr_die, struct strbuf *buf); 120 int die_get_varname(Dwarf_Die *vr_die, struct strbuf *buf); 121 int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf *buf);
|
/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | strbuf.h | 11 * 1. the ->buf member is always malloc-ed, hence strbuf's can be used to 20 * member to be a valid C-string. Every strbuf function ensure this 35 * missing API to the strbuf module is the way to go. 50 struct strbuf { struct 58 /*----- strbuf life cycle -----*/ 59 int strbuf_init(struct strbuf *buf, ssize_t hint); 60 void strbuf_release(struct strbuf *buf); 61 char *strbuf_detach(struct strbuf *buf, size_t *); 63 /*----- strbuf size related -----*/ 64 static inline ssize_t strbuf_avail(const struct strbuf *s [all...] |
H A D | strbuf.c | 4 #include "strbuf.h" 16 * initialized strbuf. 20 int strbuf_init(struct strbuf *sb, ssize_t hint) in strbuf_init() 29 void strbuf_release(struct strbuf *sb) in strbuf_release() 37 char *strbuf_detach(struct strbuf *sb, size_t *sz) in strbuf_detach() 46 int strbuf_grow(struct strbuf *sb, size_t extra) in strbuf_grow() 73 int strbuf_addch(struct strbuf *sb, int c) in strbuf_addch() 84 int strbuf_add(struct strbuf *sb, const void *data, size_t len) in strbuf_add() 94 static int strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap) in strbuf_addv() 128 int strbuf_addf(struct strbuf *s [all...] |
H A D | dwarf-aux.h | 13 struct strbuf; 120 int die_get_typename(Dwarf_Die *vr_die, struct strbuf *buf); 123 int die_get_varname(Dwarf_Die *vr_die, struct strbuf *buf); 124 int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf *buf);
|
/kernel/linux/linux-5.10/arch/sparc/kernel/ |
H A D | iommu.c | 269 struct strbuf *strbuf; in dma_4u_map_page() local 277 strbuf = dev->archdata.stc; in dma_4u_map_page() 300 if (strbuf->strbuf_enabled) in dma_4u_map_page() 320 static void strbuf_flush(struct strbuf *strbuf, struct iommu *iommu, in strbuf_flush() argument 326 if (strbuf->strbuf_ctxflush && in strbuf_flush() 331 flushreg = strbuf->strbuf_ctxflush; in strbuf_flush() 332 matchreg = STC_CTXMATCH_ADDR(strbuf, ctx); in strbuf_flush() 357 iommu_write(strbuf in strbuf_flush() 391 struct strbuf *strbuf; dma_4u_unmap_page() local 442 struct strbuf *strbuf; dma_4u_map_sg() local 613 struct strbuf *strbuf; dma_4u_unmap_sg() local 664 struct strbuf *strbuf; dma_4u_sync_single_for_cpu() local 702 struct strbuf *strbuf; dma_4u_sync_sg_for_cpu() local [all...] |
H A D | sbus.c | 480 /* XXX check iommu/strbuf for further error status XXX */ in sysio_sbus_error_handler() 545 struct strbuf *strbuf; in sbus_iommu_init() local 559 strbuf = kzalloc(sizeof(*strbuf), GFP_ATOMIC); in sbus_iommu_init() 560 if (!iommu || !strbuf) in sbus_iommu_init() 564 op->dev.archdata.stc = strbuf; in sbus_iommu_init() 575 strbuf->strbuf_control = reg_base + STRBUF_CONTROL; in sbus_iommu_init() 576 strbuf->strbuf_pflush = reg_base + STRBUF_PFLUSH; in sbus_iommu_init() 577 strbuf in sbus_iommu_init() [all...] |
H A D | psycho_common.c | 38 struct strbuf *strbuf = &pbm->stc; in psycho_check_stc_error() local 42 if (!strbuf->strbuf_control) in psycho_check_stc_error() 45 err_base = strbuf->strbuf_err_stat; in psycho_check_stc_error() 46 tag_base = strbuf->strbuf_tag_diag; in psycho_check_stc_error() 47 line_base = strbuf->strbuf_line_diag; in psycho_check_stc_error() 59 control = upa_readq(strbuf->strbuf_control); in psycho_check_stc_error() 60 upa_writeq(control | PSYCHO_STRBUF_CTRL_DENAB, strbuf->strbuf_control); in psycho_check_stc_error() 76 upa_writeq(control, strbuf->strbuf_control); in psycho_check_stc_error()
|
/kernel/linux/linux-6.6/arch/sparc/kernel/ |
H A D | iommu.c | 269 struct strbuf *strbuf; in dma_4u_map_page() local 277 strbuf = dev->archdata.stc; in dma_4u_map_page() 300 if (strbuf->strbuf_enabled) in dma_4u_map_page() 320 static void strbuf_flush(struct strbuf *strbuf, struct iommu *iommu, in strbuf_flush() argument 326 if (strbuf->strbuf_ctxflush && in strbuf_flush() 331 flushreg = strbuf->strbuf_ctxflush; in strbuf_flush() 332 matchreg = STC_CTXMATCH_ADDR(strbuf, ctx); in strbuf_flush() 357 iommu_write(strbuf in strbuf_flush() 391 struct strbuf *strbuf; dma_4u_unmap_page() local 442 struct strbuf *strbuf; dma_4u_map_sg() local 611 struct strbuf *strbuf; dma_4u_unmap_sg() local 662 struct strbuf *strbuf; dma_4u_sync_single_for_cpu() local 700 struct strbuf *strbuf; dma_4u_sync_sg_for_cpu() local [all...] |
H A D | sbus.c | 481 /* XXX check iommu/strbuf for further error status XXX */ in sysio_sbus_error_handler() 546 struct strbuf *strbuf; in sbus_iommu_init() local 560 strbuf = kzalloc(sizeof(*strbuf), GFP_ATOMIC); in sbus_iommu_init() 561 if (!iommu || !strbuf) in sbus_iommu_init() 565 op->dev.archdata.stc = strbuf; in sbus_iommu_init() 576 strbuf->strbuf_control = reg_base + STRBUF_CONTROL; in sbus_iommu_init() 577 strbuf->strbuf_pflush = reg_base + STRBUF_PFLUSH; in sbus_iommu_init() 578 strbuf in sbus_iommu_init() [all...] |
H A D | psycho_common.c | 39 struct strbuf *strbuf = &pbm->stc; in psycho_check_stc_error() local 43 if (!strbuf->strbuf_control) in psycho_check_stc_error() 46 err_base = strbuf->strbuf_err_stat; in psycho_check_stc_error() 47 tag_base = strbuf->strbuf_tag_diag; in psycho_check_stc_error() 48 line_base = strbuf->strbuf_line_diag; in psycho_check_stc_error() 60 control = upa_readq(strbuf->strbuf_control); in psycho_check_stc_error() 61 upa_writeq(control | PSYCHO_STRBUF_CTRL_DENAB, strbuf->strbuf_control); in psycho_check_stc_error() 77 upa_writeq(control, strbuf->strbuf_control); in psycho_check_stc_error()
|
/kernel/linux/linux-5.10/scripts/dtc/ |
H A D | flattree.c | 236 void *etarget, struct data *strbuf, in flatten_tree() 261 nameoff = stringtable_insert(strbuf, prop->name); in flatten_tree() 277 emit->cell(etarget, stringtable_insert(strbuf, "name")); in flatten_tree() 287 flatten_tree(child, emit, etarget, strbuf, vi); in flatten_tree() 352 struct data strbuf = empty_data; in dt_to_blob() local 363 flatten_tree(dti->dt, &bin_emitter, &dtbuf, &strbuf, vi); in dt_to_blob() 369 make_fdt_header(&fdt, vi, reservebuf.len, dtbuf.len, strbuf.len, in dt_to_blob() 409 blob = data_merge(blob, strbuf); in dt_to_blob() 432 static void dump_stringtable_asm(FILE *f, struct data strbuf) in dump_stringtable_asm() argument 437 p = strbuf in dump_stringtable_asm() 235 flatten_tree(struct node *tree, struct emitter *emit, void *etarget, struct data *strbuf, struct version_info *vi) flatten_tree() argument 450 struct data strbuf = empty_data; dt_to_asm() local 663 flat_read_property(struct inbuf *dtbuf, struct inbuf *strbuf, int flags) flat_read_property() argument 730 unflatten_tree(struct inbuf *dtbuf, struct inbuf *strbuf, const char *parent_flatname, int flags) unflatten_tree() argument 805 struct inbuf dtbuf, strbuf; dt_from_blob() local [all...] |
/kernel/linux/linux-6.6/scripts/dtc/ |
H A D | flattree.c | 237 void *etarget, struct data *strbuf, in flatten_tree() 262 nameoff = stringtable_insert(strbuf, prop->name); in flatten_tree() 278 emit->cell(etarget, stringtable_insert(strbuf, "name")); in flatten_tree() 288 flatten_tree(child, emit, etarget, strbuf, vi); in flatten_tree() 353 struct data strbuf = empty_data; in dt_to_blob() local 364 flatten_tree(dti->dt, &bin_emitter, &dtbuf, &strbuf, vi); in dt_to_blob() 370 make_fdt_header(&fdt, vi, reservebuf.len, dtbuf.len, strbuf.len, in dt_to_blob() 410 blob = data_merge(blob, strbuf); in dt_to_blob() 433 static void dump_stringtable_asm(FILE *f, struct data strbuf) in dump_stringtable_asm() argument 438 p = strbuf in dump_stringtable_asm() 236 flatten_tree(struct node *tree, struct emitter *emit, void *etarget, struct data *strbuf, struct version_info *vi) flatten_tree() argument 451 struct data strbuf = empty_data; dt_to_asm() local 664 flat_read_property(struct inbuf *dtbuf, struct inbuf *strbuf, int flags) flat_read_property() argument 731 unflatten_tree(struct inbuf *dtbuf, struct inbuf *strbuf, const char *parent_flatname, int flags) unflatten_tree() argument 806 struct inbuf dtbuf, strbuf; dt_from_blob() local [all...] |
/kernel/linux/linux-5.10/drivers/ntb/hw/idt/ |
H A D | ntb_hw_idt.c | 2343 char *strbuf; in idt_dbgfs_info_read() local 2351 strbuf = kmalloc(size, GFP_KERNEL); in idt_dbgfs_info_read() 2352 if (strbuf == NULL) in idt_dbgfs_info_read() 2356 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2360 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2364 off += scnprintf(strbuf + off, size - off, "Peers:\n"); in idt_dbgfs_info_read() 2366 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2373 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2375 off += scnprintf(strbuf + off, size - off, "PCIe Gen %d x%d lanes\n", in idt_dbgfs_info_read() 2379 off += scnprintf(strbuf in idt_dbgfs_info_read() [all...] |
/kernel/linux/linux-6.6/drivers/ntb/hw/idt/ |
H A D | ntb_hw_idt.c | 2343 char *strbuf; in idt_dbgfs_info_read() local 2351 strbuf = kmalloc(size, GFP_KERNEL); in idt_dbgfs_info_read() 2352 if (strbuf == NULL) in idt_dbgfs_info_read() 2356 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2360 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2364 off += scnprintf(strbuf + off, size - off, "Peers:\n"); in idt_dbgfs_info_read() 2366 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2373 off += scnprintf(strbuf + off, size - off, in idt_dbgfs_info_read() 2375 off += scnprintf(strbuf + off, size - off, "PCIe Gen %d x%d lanes\n", in idt_dbgfs_info_read() 2379 off += scnprintf(strbuf in idt_dbgfs_info_read() [all...] |
/kernel/linux/linux-5.10/drivers/acpi/ |
H A D | proc.c | 95 char strbuf[5]; in acpi_system_write_wakeup_device() local 101 if (copy_from_user(strbuf, buffer, count)) in acpi_system_write_wakeup_device() 103 strbuf[count] = '\0'; in acpi_system_write_wakeup_device() 104 sscanf(strbuf, "%s", str); in acpi_system_write_wakeup_device()
|
/kernel/linux/linux-6.6/drivers/acpi/ |
H A D | proc.c | 95 char strbuf[5]; in acpi_system_write_wakeup_device() local 101 if (copy_from_user(strbuf, buffer, count)) in acpi_system_write_wakeup_device() 103 strbuf[count] = '\0'; in acpi_system_write_wakeup_device() 104 sscanf(strbuf, "%s", str); in acpi_system_write_wakeup_device()
|
/kernel/linux/linux-5.10/net/tipc/ |
H A D | eth_media.c | 42 char *strbuf, int bufsz) in tipc_eth_addr2str() 47 sprintf(strbuf, "%pM", addr->value); in tipc_eth_addr2str() 41 tipc_eth_addr2str(struct tipc_media_addr *addr, char *strbuf, int bufsz) tipc_eth_addr2str() argument
|
/kernel/linux/linux-6.6/net/tipc/ |
H A D | eth_media.c | 42 char *strbuf, int bufsz) in tipc_eth_addr2str() 47 sprintf(strbuf, "%pM", addr->value); in tipc_eth_addr2str() 41 tipc_eth_addr2str(struct tipc_media_addr *addr, char *strbuf, int bufsz) tipc_eth_addr2str() argument
|
/kernel/linux/linux-5.10/fs/hfsplus/ |
H A D | xattr.c | 683 char *strbuf; in hfsplus_listxattr() local 703 strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + in hfsplus_listxattr() 705 if (!strbuf) { in hfsplus_listxattr() 739 strbuf, &xattr_name_len)) { in hfsplus_listxattr() 746 if (can_list(strbuf)) in hfsplus_listxattr() 747 res += name_len(strbuf, xattr_name_len); in hfsplus_listxattr() 748 } else if (can_list(strbuf)) { in hfsplus_listxattr() 749 if (size < (res + name_len(strbuf, xattr_name_len))) { in hfsplus_listxattr() 754 strbuf, xattr_name_len); in hfsplus_listxattr() 762 kfree(strbuf); in hfsplus_listxattr() [all...] |
H A D | dir.c | 135 char *strbuf; in hfsplus_readdir() local 147 strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_MAX_STRLEN + 1, GFP_KERNEL); in hfsplus_readdir() 148 if (!strbuf) { in hfsplus_readdir() 207 err = hfsplus_uni2asc(sb, &fd.key->cat.name, strbuf, &len); in hfsplus_readdir() 221 if (!dir_emit(ctx, strbuf, len, in hfsplus_readdir() 248 if (!dir_emit(ctx, strbuf, len, in hfsplus_readdir() 283 kfree(strbuf); in hfsplus_readdir()
|
/kernel/linux/linux-6.6/fs/hfsplus/ |
H A D | xattr.c | 681 char *strbuf; in hfsplus_listxattr() local 701 strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + in hfsplus_listxattr() 703 if (!strbuf) { in hfsplus_listxattr() 738 strbuf, &xattr_name_len)) { in hfsplus_listxattr() 745 if (can_list(strbuf)) in hfsplus_listxattr() 746 res += name_len(strbuf, xattr_name_len); in hfsplus_listxattr() 747 } else if (can_list(strbuf)) { in hfsplus_listxattr() 748 if (size < (res + name_len(strbuf, xattr_name_len))) { in hfsplus_listxattr() 753 strbuf, xattr_name_len); in hfsplus_listxattr() 761 kfree(strbuf); in hfsplus_listxattr() [all...] |
H A D | dir.c | 135 char *strbuf; in hfsplus_readdir() local 147 strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_MAX_STRLEN + 1, GFP_KERNEL); in hfsplus_readdir() 148 if (!strbuf) { in hfsplus_readdir() 207 err = hfsplus_uni2asc(sb, &fd.key->cat.name, strbuf, &len); in hfsplus_readdir() 221 if (!dir_emit(ctx, strbuf, len, in hfsplus_readdir() 248 if (!dir_emit(ctx, strbuf, len, in hfsplus_readdir() 283 kfree(strbuf); in hfsplus_readdir()
|
/kernel/linux/linux-5.10/fs/hfs/ |
H A D | dir.c | 53 char strbuf[HFS_MAX_NAMELEN]; in hfs_readdir() local 118 len = hfs_mac2asc(sb, strbuf, &fd.key->cat.CName); in hfs_readdir() 125 if (!dir_emit(ctx, strbuf, len, in hfs_readdir() 134 if (!dir_emit(ctx, strbuf, len, in hfs_readdir()
|