/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | devlink_linecard.sh | 39 local lc=$1 41 devlink lc show $DEVLINK_DEV lc $lc -j | jq -e -r ".[][][].state" 46 local lc=$1 50 busywait "$timeout" until_lc_state_is_not "$state" lc_state_get "$lc" 55 local lc=$1 59 busywait "$timeout" until_lc_state_is "$state" lc_state_get "$lc" 73 local lc=$1 75 devlink port -j | jq -e -r ".[][] | select(.lc==$lc) | .port" | wc -l 80 local lc=$1 84 busywait "$timeout" until_lc_port_count_is "$port_count" lc_port_count_get "$lc" [all …]
|
/linux/lib/ |
H A D | lru_cache.c | 29 BUG_ON(!lc); \ 30 BUG_ON(!lc->nr_elements); \ 31 BUG_ON(test_and_set_bit(__LC_PARANOIA, &lc->flags)); \ 35 clear_bit_unlock(__LC_PARANOIA, &lc->flags); \ 39 #define PARANOIA_LC_ELEMENT(lc, e) do { \ argument 40 struct lru_cache *lc_ = (lc); \ 55 int lc_try_lock(struct lru_cache *lc) in lc_try_lock() argument 59 val = cmpxchg(&lc->flags, 0, LC_LOCKED); in lc_try_lock() 83 struct lru_cache *lc; in lc_create() local 104 lc = kzalloc(sizeof(*lc), GFP_KERNEL); in lc_create() [all …]
|
/linux/drivers/md/ |
H A D | dm-log.c | 299 static int rw_header(struct log_c *lc, enum req_op op) in rw_header() argument 301 lc->io_req.bi_opf = op; in rw_header() 303 return dm_io(&lc->io_req, 1, &lc->header_location, NULL, IOPRIO_DEFAULT); in rw_header() 306 static int flush_header(struct log_c *lc) in flush_header() argument 309 .bdev = lc->header_location.bdev, in flush_header() 314 lc->io_req.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH; in flush_header() 316 return dm_io(&lc->io_req, 1, &null_location, NULL, IOPRIO_DEFAULT); in flush_header() 374 struct log_c *lc; in create_log_context() local 405 lc = kmalloc(sizeof(*lc), GFP_KERNEL); in create_log_context() 406 if (!lc) { in create_log_context() [all …]
|
H A D | dm-log-userspace-base.c | 85 static int userspace_do_request(struct log_c *lc, const char *uuid, in userspace_do_request() argument 97 r = dm_consult_userspace(uuid, lc->luid, request_type, data, in userspace_do_request() 108 r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_CTR, in userspace_do_request() 109 lc->usr_argv_str, in userspace_do_request() 110 strlen(lc->usr_argv_str) + 1, in userspace_do_request() 116 r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_RESUME, NULL, in userspace_do_request() 160 struct log_c *lc = container_of(work, struct log_c, flush_log_work.work); in do_flush() local 162 atomic_set(&lc->sched_flush, 0); in do_flush() 164 r = userspace_do_request(lc, lc->uuid, DM_ULOG_FLUSH, NULL, 0, NULL, NULL); in do_flush() 167 dm_table_event(lc->ti->table); in do_flush() [all …]
|
H A D | dm-linear.c | 32 struct linear_c *lc; in linear_ctr() local 42 lc = kmalloc(sizeof(*lc), GFP_KERNEL); in linear_ctr() 43 if (lc == NULL) { in linear_ctr() 53 lc->start = tmp; in linear_ctr() 55 ret = dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), &lc->dev); in linear_ctr() 66 ti->private = lc; in linear_ctr() 70 kfree(lc); in linear_ctr() 76 struct linear_c *lc = ti->private; in linear_dtr() local 78 dm_put_device(ti, lc->dev); in linear_dtr() 79 kfree(lc); in linear_dtr() [all …]
|
/linux/arch/s390/include/asm/ |
H A D | vtime.h | 7 struct lowcore *lc = get_lowcore(); in update_timer_sys() local 9 lc->system_timer += lc->last_update_timer - lc->exit_timer; in update_timer_sys() 10 lc->user_timer += lc->exit_timer - lc->sys_enter_timer; in update_timer_sys() 11 lc->last_update_timer = lc->sys_enter_timer; in update_timer_sys() 16 struct lowcore *lc = get_lowcore(); in update_timer_mcck() local 18 lc->system_timer += lc->last_update_timer - lc->exit_timer; in update_timer_mcck() 19 lc->user_timer += lc->exit_timer - lc->mcck_enter_timer; in update_timer_mcck() 20 lc->last_update_timer = lc->mcck_enter_timer; in update_timer_mcck()
|
/linux/arch/s390/kernel/ |
H A D | smp.c | 195 struct lowcore *lc; in pcpu_alloc_lowcore() local 197 lc = (struct lowcore *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER); in pcpu_alloc_lowcore() 201 if (!lc || !nodat_stack || !async_stack || !mcck_stack) in pcpu_alloc_lowcore() 203 memcpy(lc, get_lowcore(), 512); in pcpu_alloc_lowcore() 204 memset((char *) lc + 512, 0, sizeof(*lc) - 512); in pcpu_alloc_lowcore() 205 lc->async_stack = async_stack + STACK_INIT_OFFSET; in pcpu_alloc_lowcore() 206 lc->nodat_stack = nodat_stack + STACK_INIT_OFFSET; in pcpu_alloc_lowcore() 207 lc->mcck_stack = mcck_stack + STACK_INIT_OFFSET; in pcpu_alloc_lowcore() 208 lc->cpu_nr = cpu; in pcpu_alloc_lowcore() 209 lc->spinlock_lockval = arch_spin_lockval(cpu); in pcpu_alloc_lowcore() [all …]
|
H A D | vtime.c | 38 struct lowcore *lc = get_lowcore(); in set_vtimer() local 45 lc->system_timer += lc->last_update_timer - timer; in set_vtimer() 46 lc->last_update_timer = expires; in set_vtimer() 121 struct lowcore *lc = get_lowcore(); in do_account_vtime() local 123 timer = lc->last_update_timer; in do_account_vtime() 124 clock = lc->last_update_clock; in do_account_vtime() 128 : "=Q" (lc->last_update_timer), in do_account_vtime() 129 "=Q" (lc->last_update_clock) in do_account_vtime() 131 clock = lc->last_update_clock - clock; in do_account_vtime() 132 timer -= lc->last_update_timer; in do_account_vtime() [all …]
|
H A D | setup.c | 397 struct lowcore *lc, *abs_lc; in setup_lowcore() local 403 lc = memblock_alloc_low(sizeof(*lc), sizeof(*lc)); in setup_lowcore() 404 if (!lc) in setup_lowcore() 406 __func__, sizeof(*lc), sizeof(*lc)); in setup_lowcore() 408 lc->pcpu = (unsigned long)per_cpu_ptr(&pcpu_devices, 0); in setup_lowcore() 409 lc->restart_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_DAT; in setup_lowcore() 410 lc->restart_psw.addr = __pa(restart_int_handler); in setup_lowcore() 411 lc->external_new_psw.mask = PSW_KERNEL_BITS; in setup_lowcore() 412 lc->external_new_psw.addr = (unsigned long) ext_int_handler; in setup_lowcore() 413 lc->svc_new_psw.mask = PSW_KERNEL_BITS; in setup_lowcore() [all …]
|
H A D | idle.c | 27 struct lowcore *lc = get_lowcore(); in account_idle_time_irq() local 38 idle_time = lc->int_clock - idle->clock_idle_enter; in account_idle_time_irq() 40 lc->steal_timer += idle->clock_idle_enter - lc->last_update_clock; in account_idle_time_irq() 41 lc->last_update_clock = lc->int_clock; in account_idle_time_irq() 43 lc->system_timer += lc->last_update_timer - idle->timer_idle_enter; in account_idle_time_irq() 44 lc->last_update_timer = lc->sys_enter_timer; in account_idle_time_irq()
|
H A D | traps.c | 297 struct lowcore *lc = get_lowcore(); in trap_init() local 303 psw_bits(lc->external_new_psw).mcheck = 1; in trap_init() 304 psw_bits(lc->program_new_psw).mcheck = 1; in trap_init() 305 psw_bits(lc->svc_new_psw).mcheck = 1; in trap_init() 306 psw_bits(lc->io_new_psw).mcheck = 1; in trap_init() 317 struct lowcore *lc = get_lowcore(); in __do_pgm_check() local 321 regs->int_code = lc->pgm_int_code; in __do_pgm_check() 322 regs->int_parm_long = lc->trans_exc_code; in __do_pgm_check() 335 if (lc->pgm_code & 0x0200) { in __do_pgm_check() 337 current->thread.trap_tdb = lc->pgm_tdb; in __do_pgm_check() [all …]
|
H A D | nmi.c | 120 struct lowcore *lc = get_lowcore(); in s390_handle_damage() local 129 u64_to_hex(ptr, lc->mcck_interruption_code); in s390_handle_damage() 139 psw_save = lc->mcck_new_psw; in s390_handle_damage() 140 psw_bits(lc->mcck_new_psw).io = 0; in s390_handle_damage() 141 psw_bits(lc->mcck_new_psw).ext = 0; in s390_handle_damage() 142 psw_bits(lc->mcck_new_psw).wait = 1; in s390_handle_damage() 149 lc->mcck_new_psw = psw_save; in s390_handle_damage() 305 struct lowcore *lc = get_lowcore(); in s390_do_machine_check() local 318 mci.val = lc->mcck_interruption_code; in s390_do_machine_check() 386 if (lc->external_damage_code & (1U << ED_STP_SYNC)) in s390_do_machine_check() [all …]
|
H A D | early.c | 181 struct lowcore *lc = get_lowcore(); in __do_early_pgm_check() local 184 regs->int_code = lc->pgm_int_code; in __do_early_pgm_check() 185 regs->int_parm_long = lc->trans_exc_code; in __do_early_pgm_check() 209 struct lowcore *lc = get_lowcore(); in setup_lowcore_early() local 214 lc->program_new_psw = psw; in setup_lowcore_early() 215 lc->preempt_count = INIT_PREEMPT_COUNT; in setup_lowcore_early() 216 lc->return_lpswe = gen_lpswe(__LC_RETURN_PSW); in setup_lowcore_early() 217 lc->return_mcck_lpswe = gen_lpswe(__LC_RETURN_MCCK_PSW); in setup_lowcore_early()
|
/linux/include/linux/ |
H A D | lru_cache.h | 241 extern void lc_reset(struct lru_cache *lc); 242 extern void lc_destroy(struct lru_cache *lc); 243 extern void lc_del(struct lru_cache *lc, struct lc_element *element); 245 extern struct lc_element *lc_get_cumulative(struct lru_cache *lc, unsigned int enr); 246 extern struct lc_element *lc_try_get(struct lru_cache *lc, unsigned int enr); 247 extern struct lc_element *lc_find(struct lru_cache *lc, unsigned int enr); 248 extern struct lc_element *lc_get(struct lru_cache *lc, unsigned int enr); 249 extern unsigned int lc_put(struct lru_cache *lc, struct lc_element *e); 250 extern void lc_committed(struct lru_cache *lc); 253 extern void lc_seq_printf_stats(struct seq_file *seq, struct lru_cache *lc); [all …]
|
/linux/net/rds/ |
H A D | loop.c | 137 struct rds_loop_connection *lc; in rds_loop_conn_alloc() local 140 lc = kzalloc(sizeof(struct rds_loop_connection), gfp); in rds_loop_conn_alloc() 141 if (!lc) in rds_loop_conn_alloc() 144 INIT_LIST_HEAD(&lc->loop_node); in rds_loop_conn_alloc() 145 lc->conn = conn; in rds_loop_conn_alloc() 146 conn->c_transport_data = lc; in rds_loop_conn_alloc() 149 list_add_tail(&lc->loop_node, &loop_conns); in rds_loop_conn_alloc() 157 struct rds_loop_connection *lc = arg; in rds_loop_conn_free() local 160 rdsdebug("lc %p\n", lc); in rds_loop_conn_free() 162 list_del(&lc->loop_node); in rds_loop_conn_free() [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | setget_sockopt.c | 141 static int bpf_test_socket_sockopt(__u32 i, struct loop_ctx *lc) in bpf_test_socket_sockopt() argument 153 return bpf_test_sockopt_flip(lc->ctx, lc->sk, t, SOL_SOCKET); in bpf_test_socket_sockopt() 155 return bpf_test_sockopt_int(lc->ctx, lc->sk, t, SOL_SOCKET); in bpf_test_socket_sockopt() 158 static int bpf_test_ip_sockopt(__u32 i, struct loop_ctx *lc) in bpf_test_ip_sockopt() argument 170 return bpf_test_sockopt_flip(lc->ctx, lc->sk, t, IPPROTO_IP); in bpf_test_ip_sockopt() 172 return bpf_test_sockopt_int(lc->ctx, lc->sk, t, IPPROTO_IP); in bpf_test_ip_sockopt() 175 static int bpf_test_ipv6_sockopt(__u32 i, struct loop_ctx *lc) in bpf_test_ipv6_sockopt() argument 187 return bpf_test_sockopt_flip(lc->ctx, lc->sk, t, IPPROTO_IPV6); in bpf_test_ipv6_sockopt() 189 return bpf_test_sockopt_int(lc->ctx, lc->sk, t, IPPROTO_IPV6); in bpf_test_ipv6_sockopt() 192 static int bpf_test_tcp_sockopt(__u32 i, struct loop_ctx *lc) in bpf_test_tcp_sockopt() argument [all …]
|
/linux/tools/testing/selftests/powerpc/papr_vpd/ |
H A D | papr_vpd.c | 32 struct papr_location_code lc = { .str = "", }; in dev_papr_vpd_get_handle_all() local 42 fd = ioctl(devfd, PAPR_VPD_IOC_CREATE_HANDLE, &lc); in dev_papr_vpd_get_handle_all() 71 struct papr_location_code lc = { .str = "", }; in dev_papr_vpd_get_handle_byte_at_a_time() local 80 fd = ioctl(devfd, PAPR_VPD_IOC_CREATE_HANDLE, &lc); in dev_papr_vpd_get_handle_byte_at_a_time() 112 struct papr_location_code lc = {}; in dev_papr_vpd_unterm_loc_code() local 124 memset(lc.str, 'x', ARRAY_SIZE(lc.str)); in dev_papr_vpd_unterm_loc_code() 127 fd = ioctl(devfd, PAPR_VPD_IOC_CREATE_HANDLE, &lc); in dev_papr_vpd_unterm_loc_code() 157 struct papr_location_code lc = { .str = "", }; in papr_vpd_close_handle_without_reading() local 166 fd = ioctl(devfd, PAPR_VPD_IOC_CREATE_HANDLE, &lc); in papr_vpd_close_handle_without_reading() 180 struct papr_location_code lc = { .str = "", }; in papr_vpd_reread() local [all …]
|
/linux/fs/ocfs2/ |
H A D | stack_user.c | 803 struct ocfs2_live_connection *lc = conn->cc_private; in sync_wait_cb() local 804 complete(&lc->oc_sync_wait); in sync_wait_cb() 811 struct ocfs2_live_connection *lc = conn->cc_private; in sync_unlock() local 820 wait_for_completion(&lc->oc_sync_wait); in sync_unlock() 835 struct ocfs2_live_connection *lc = conn->cc_private; in sync_lock() local 846 wait_for_completion(&lc->oc_sync_wait); in sync_lock() 862 struct ocfs2_live_connection *lc = conn->cc_private; in version_lock() local 864 &lc->oc_version_lksb, VERSION_LOCK); in version_lock() 869 struct ocfs2_live_connection *lc = conn->cc_private; in version_unlock() local 870 return sync_unlock(conn, &lc->oc_version_lksb, VERSION_LOCK); in version_unlock() [all …]
|
/linux/drivers/accessibility/speakup/ |
H A D | genmap.c | 74 lc++; in main() 129 for (lc = 1; lc <= max_key_used; lc++) { in main() 130 kp = key_data[lc]; in main() 150 for (lc = 1; lc <= max_key_used; lc++) { in main() 151 kp = key_data[lc]; in main() 154 printf("\n\t%d,", lc); in main()
|
/linux/drivers/net/ethernet/chelsio/cxgb/ |
H A D | subr.c | 145 struct link_config *lc = &adapter->port[port_id].link_config; in t1_link_changed() local 149 lc->speed = speed < 0 ? SPEED_INVALID : speed; in t1_link_changed() 150 lc->duplex = duplex < 0 ? DUPLEX_INVALID : duplex; in t1_link_changed() 151 if (!(lc->requested_fc & PAUSE_AUTONEG)) in t1_link_changed() 152 fc = lc->requested_fc & (PAUSE_RX | PAUSE_TX); in t1_link_changed() 154 if (link_ok && speed >= 0 && lc->autoneg == AUTONEG_ENABLE) { in t1_link_changed() 159 lc->fc = (unsigned char)fc; in t1_link_changed() 626 int t1_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc) in t1_link_start() argument 628 unsigned int fc = lc->requested_fc & (PAUSE_RX | PAUSE_TX); in t1_link_start() 630 if (lc->supported & SUPPORTED_Autoneg) { in t1_link_start() [all …]
|
/linux/fs/affs/ |
H A D | symlink.c | 22 char lc; in affs_symlink_read_folio() local 32 lc = 0; in affs_symlink_read_folio() 47 lc = '/'; in affs_symlink_read_folio() 50 if (c == '/' && lc == '/' && i < 1020) { /* parent dir */ in affs_symlink_read_folio() 55 lc = c; in affs_symlink_read_folio()
|
/linux/Documentation/networking/devlink/ |
H A D | devlink-linecard.rst | 112 $ devlink lc show [ DEV [ lc LC_INDEX ] ] 113 $ devlink lc set DEV lc LC_INDEX [ { type LC_TYPE | notype } ] 116 $ devlink lc 119 $ devlink lc set pci/0000:01:00.0 lc 8 type 16x100G 122 $ devlink lc set pci/0000:01:00.0 lc 8 notype
|
/linux/drivers/net/ethernet/chelsio/cxgb4vf/ |
H A D | t4vf_hw.c | 456 static void init_link_config(struct link_config *lc, in init_link_config() argument 460 lc->pcaps = pcaps; in init_link_config() 461 lc->lpacaps = 0; in init_link_config() 462 lc->speed_caps = 0; in init_link_config() 463 lc->speed = 0; in init_link_config() 464 lc->requested_fc = lc->fc = PAUSE_RX | PAUSE_TX; in init_link_config() 469 lc->auto_fec = fwcap_to_cc_fec(acaps); in init_link_config() 470 lc->requested_fec = FEC_AUTO; in init_link_config() 471 lc->fec = lc->auto_fec; in init_link_config() 480 if (lc->pcaps & FW_PORT_CAP32_ANEG) { in init_link_config() [all …]
|
/linux/arch/powerpc/kernel/ |
H A D | io.c | 126 u32 lc = c; in _memset_io() local 127 lc |= lc << 8; in _memset_io() 128 lc |= lc << 16; in _memset_io() 137 *((volatile u32 *)p) = lc; in _memset_io()
|
/linux/drivers/usb/serial/ |
H A D | xr_serial.c | 756 struct usb_cdc_line_coding *lc; in xr_cdc_set_line_coding() local 759 lc = kzalloc(sizeof(*lc), GFP_KERNEL); in xr_cdc_set_line_coding() 760 if (!lc) in xr_cdc_set_line_coding() 764 lc->dwDTERate = cpu_to_le32(tty->termios.c_ospeed); in xr_cdc_set_line_coding() 766 lc->dwDTERate = cpu_to_le32(9600); in xr_cdc_set_line_coding() 769 lc->bCharFormat = USB_CDC_2_STOP_BITS; in xr_cdc_set_line_coding() 771 lc->bCharFormat = USB_CDC_1_STOP_BITS; in xr_cdc_set_line_coding() 776 lc->bParityType = USB_CDC_MARK_PARITY; in xr_cdc_set_line_coding() 778 lc->bParityType = USB_CDC_SPACE_PARITY; in xr_cdc_set_line_coding() 781 lc->bParityType = USB_CDC_ODD_PARITY; in xr_cdc_set_line_coding() [all …]
|