Home
last modified time | relevance | path

Searched refs:rs (Results 1 – 25 of 242) sorted by relevance

12345678910

/linux/drivers/md/
H A Ddm-raid.c261 static void rs_config_backup(struct raid_set *rs, struct rs_layout *l) in rs_config_backup() argument
263 struct mddev *mddev = &rs->md; in rs_config_backup()
270 static void rs_config_restore(struct raid_set *rs, struct rs_layout *l) in rs_config_restore() argument
272 struct mddev *mddev = &rs->md; in rs_config_restore()
401 static bool rs_is_raid0(struct raid_set *rs) in rs_is_raid0() argument
403 return !rs->md.level; in rs_is_raid0()
407 static bool rs_is_raid1(struct raid_set *rs) in rs_is_raid1() argument
409 return rs->md.level == 1; in rs_is_raid1()
413 static bool rs_is_raid10(struct raid_set *rs) in rs_is_raid10() argument
415 return rs->md.level == 10; in rs_is_raid10()
[all …]
/linux/drivers/spi/
H A Dspi-rockchip.c201 static inline void spi_enable_chip(struct rockchip_spi *rs, bool enable) in spi_enable_chip() argument
203 writel_relaxed((enable ? 1U : 0U), rs->regs + ROCKCHIP_SPI_SSIENR); in spi_enable_chip()
206 static inline void wait_for_tx_idle(struct rockchip_spi *rs, bool target_mode) in wait_for_tx_idle() argument
212 if (!(readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_TARGET_TX_BUSY) && in wait_for_tx_idle()
213 !((readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY))) in wait_for_tx_idle()
216 if (!(readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)) in wait_for_tx_idle()
221 dev_warn(rs->dev, "spi controller is in busy state!\n"); in wait_for_tx_idle()
224 static u32 get_fifo_len(struct rockchip_spi *rs) in get_fifo_len() argument
228 ver = readl_relaxed(rs->regs + ROCKCHIP_SPI_VERSION); in get_fifo_len()
242 struct rockchip_spi *rs = spi_controller_get_devdata(ctlr); in rockchip_spi_set_cs() local
[all …]
H A Dspi-mt7621.c70 static inline u32 mt7621_spi_read(struct mt7621_spi *rs, u32 reg) in mt7621_spi_read() argument
72 return ioread32(rs->base + reg); in mt7621_spi_read()
75 static inline void mt7621_spi_write(struct mt7621_spi *rs, u32 reg, u32 val) in mt7621_spi_write() argument
77 iowrite32(val, rs->base + reg); in mt7621_spi_write()
82 struct mt7621_spi *rs = spidev_to_mt7621_spi(spi); in mt7621_spi_set_native_cs() local
93 host = mt7621_spi_read(rs, MT7621_SPI_MASTER); in mt7621_spi_set_native_cs()
96 mt7621_spi_write(rs, MT7621_SPI_MASTER, host); in mt7621_spi_set_native_cs()
98 rs->pending_write = 0; in mt7621_spi_set_native_cs()
102 mt7621_spi_write(rs, MT7621_SPI_POLAR, polar); in mt7621_spi_set_native_cs()
107 struct mt7621_spi *rs = spidev_to_mt7621_spi(spi); in mt7621_spi_prepare() local
[all …]
/linux/lib/reed_solomon/
H A Dreed_solomon.c74 struct rs_codec *rs; in codec_init() local
76 rs = kzalloc(sizeof(*rs), gfp); in codec_init()
77 if (!rs) in codec_init()
80 INIT_LIST_HEAD(&rs->list); in codec_init()
82 rs->mm = symsize; in codec_init()
83 rs->nn = (1 << symsize) - 1; in codec_init()
84 rs->fcr = fcr; in codec_init()
85 rs->prim = prim; in codec_init()
86 rs->nroots = nroots; in codec_init()
87 rs->gfpoly = gfpoly; in codec_init()
[all …]
H A Dtest_rslib.c108 static struct wspace *alloc_ws(struct rs_codec *rs) in alloc_ws() argument
110 int nroots = rs->nroots; in alloc_ws()
112 int nn = rs->nn; in alloc_ws()
151 static int get_rcw_we(struct rs_control *rs, struct wspace *ws, in get_rcw_we() argument
154 int nroots = rs->codec->nroots; in get_rcw_we()
158 int nn = rs->codec->nn; in get_rcw_we()
170 encode_rs16(rs, c, dlen, c + dlen, 0); in get_rcw_we()
232 struct rs_codec *rs = rsc->codec; in compute_syndrome() local
233 uint16_t *alpha_to = rs->alpha_to; in compute_syndrome()
234 uint16_t *index_of = rs->index_of; in compute_syndrome()
[all …]
H A Ddecode_rs.c13 struct rs_codec *rs = rsc->codec; variable
16 int nn = rs->nn;
17 int nroots = rs->nroots;
18 int fcr = rs->fcr;
19 int prim = rs->prim;
20 int iprim = rs->iprim;
21 uint16_t *alpha_to = rs->alpha_to;
22 uint16_t *index_of = rs->index_of;
26 uint16_t msk = (uint16_t) rs->nn;
72 alpha_to[rs_modnn(rs, index_of[syn[i]] +
[all …]
H A Dencode_rs.c13 struct rs_codec *rs = rsc->codec; variable
15 int nn = rs->nn;
16 int nroots = rs->nroots;
17 uint16_t *alpha_to = rs->alpha_to;
18 uint16_t *index_of = rs->index_of;
19 uint16_t *genpoly = rs->genpoly;
21 uint16_t msk = (uint16_t) rs->nn;
33 par[j] ^= alpha_to[rs_modnn(rs, fb +
40 par[nroots - 1] = alpha_to[rs_modnn(rs,
/linux/fs/jffs2/
H A Dcompr_rubin.c88 static void init_rubin(struct rubin_state *rs, int div, int *bits) in init_rubin() argument
92 rs->q = 0; in init_rubin()
93 rs->p = (long) (2 * UPPER_BIT_RUBIN); in init_rubin()
94 rs->bit_number = (long) 0; in init_rubin()
95 rs->bit_divider = div; in init_rubin()
98 rs->bits[c] = bits[c]; in init_rubin()
102 static int encode(struct rubin_state *rs, long A, long B, int symbol) in encode() argument
108 while ((rs->q >= UPPER_BIT_RUBIN) || in encode()
109 ((rs->p + rs->q) <= UPPER_BIT_RUBIN)) { in encode()
110 rs->bit_number++; in encode()
[all …]
/linux/fs/xfs/scrub/
H A Dreap.c169 static inline bool xreap_is_dirty(const struct xreap_state *rs) in xreap_is_dirty() argument
171 return rs->nr_binval > 0 || rs->nr_deferred > 0; in xreap_is_dirty()
178 static inline bool xreap_want_binval_roll(const struct xreap_state *rs) in xreap_want_binval_roll() argument
180 return rs->nr_binval >= rs->max_binval; in xreap_want_binval_roll()
184 static inline void xreap_binval_reset(struct xreap_state *rs) in xreap_binval_reset() argument
186 rs->nr_binval = 0; in xreap_binval_reset()
193 static inline bool xreap_inc_binval(struct xreap_state *rs) in xreap_inc_binval() argument
195 rs->nr_binval++; in xreap_inc_binval()
196 return rs->nr_binval < rs->max_binval; in xreap_inc_binval()
206 static inline bool xreap_want_defer_finish(const struct xreap_state *rs) in xreap_want_defer_finish() argument
[all …]
/linux/fs/isofs/
H A Drock.c54 struct inode *inode, struct rock_state *rs) in setup_rock_ridge() argument
56 rs->len = sizeof(struct iso_directory_record) + de->name_len[0]; in setup_rock_ridge()
57 if (rs->len & 1) in setup_rock_ridge()
58 (rs->len)++; in setup_rock_ridge()
59 rs->chr = (unsigned char *)de + rs->len; in setup_rock_ridge()
60 rs->len = *((unsigned char *)de) - rs->len; in setup_rock_ridge()
61 if (rs->len < 0) in setup_rock_ridge()
62 rs->len = 0; in setup_rock_ridge()
65 rs->len -= ISOFS_SB(inode->i_sb)->s_rock_offset; in setup_rock_ridge()
66 rs->chr += ISOFS_SB(inode->i_sb)->s_rock_offset; in setup_rock_ridge()
[all …]
/linux/net/ipv4/
H A Dtcp_rate.c81 struct rate_sample *rs) in tcp_rate_skb_delivered() argument
91 if (!rs->prior_delivered || in tcp_rate_skb_delivered()
93 scb->end_seq, rs->last_end_seq)) { in tcp_rate_skb_delivered()
94 rs->prior_delivered_ce = scb->tx.delivered_ce; in tcp_rate_skb_delivered()
95 rs->prior_delivered = scb->tx.delivered; in tcp_rate_skb_delivered()
96 rs->prior_mstamp = scb->tx.delivered_mstamp; in tcp_rate_skb_delivered()
97 rs->is_app_limited = scb->tx.is_app_limited; in tcp_rate_skb_delivered()
98 rs->is_retrans = scb->sacked & TCPCB_RETRANS; in tcp_rate_skb_delivered()
99 rs->last_end_seq = scb->end_seq; in tcp_rate_skb_delivered()
104 rs->interval_us = tcp_stamp_us_delta(tp->first_tx_mstamp, in tcp_rate_skb_delivered()
[all …]
/linux/include/linux/
H A Dratelimit.h9 static inline void ratelimit_state_init(struct ratelimit_state *rs, in ratelimit_state_init() argument
12 memset(rs, 0, sizeof(*rs)); in ratelimit_state_init()
14 raw_spin_lock_init(&rs->lock); in ratelimit_state_init()
15 rs->interval = interval; in ratelimit_state_init()
16 rs->burst = burst; in ratelimit_state_init()
19 static inline void ratelimit_default_init(struct ratelimit_state *rs) in ratelimit_default_init() argument
21 return ratelimit_state_init(rs, DEFAULT_RATELIMIT_INTERVAL, in ratelimit_default_init()
25 static inline void ratelimit_state_inc_miss(struct ratelimit_state *rs) in ratelimit_state_inc_miss() argument
27 atomic_inc(&rs->missed); in ratelimit_state_inc_miss()
30 static inline int ratelimit_state_get_miss(struct ratelimit_state *rs) in ratelimit_state_get_miss() argument
[all …]
/linux/lib/
H A Dratelimit.c27 int ___ratelimit(struct ratelimit_state *rs, const char *func) in ___ratelimit() argument
33 int interval = READ_ONCE(rs->interval); in ___ratelimit()
34 int burst = READ_ONCE(rs->burst); in ___ratelimit()
45 if (!(READ_ONCE(rs->flags) & RATELIMIT_INITIALIZED) || (!interval && !burst) || in ___ratelimit()
46 !raw_spin_trylock_irqsave(&rs->lock, flags)) in ___ratelimit()
50 rs->flags &= ~RATELIMIT_INITIALIZED; in ___ratelimit()
60 if (!raw_spin_trylock_irqsave(&rs->lock, flags)) { in ___ratelimit()
61 if (READ_ONCE(rs->flags) & RATELIMIT_INITIALIZED && in ___ratelimit()
62 atomic_read(&rs->rs_n_left) > 0 && atomic_dec_return(&rs->rs_n_left) >= 0) in ___ratelimit()
67 if (!(rs->flags & RATELIMIT_INITIALIZED)) { in ___ratelimit()
[all …]
H A Dtest_hexdump.c74 int gs = groupsize, rs = rowsize; in test_hexdump_prepare_test() local
78 if (rs != 16 && rs != 32) in test_hexdump_prepare_test()
79 rs = 16; in test_hexdump_prepare_test()
81 if (l > rs) in test_hexdump_prepare_test()
82 l = rs; in test_hexdump_prepare_test()
114 } while (p < test + rs * 2 + rs / gs + 1); in test_hexdump_prepare_test()
166 int rs = rowsize, gs = groupsize; in test_hexdump_overflow() local
174 r = hex_dump_to_buffer(data_b, len, rs, gs, buf, buflen, ascii); in test_hexdump_overflow()
180 ae = rs * 2 /* hex */ + rs / gs /* spaces */ + 1 /* space */ + len /* ascii */; in test_hexdump_overflow()
190 test_hexdump_prepare_test(len, rs, gs, test, sizeof(test), ascii); in test_hexdump_overflow()
[all …]
/linux/lib/crypto/
H A Ddes.c64 static const u8 rs[256] = { variable
633 pe[15 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; in des_ekey()
634 pe[14 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
635 pe[13 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
636 pe[12 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
637 pe[11 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
638 pe[10 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
639 pe[ 9 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
640 pe[ 8 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; in des_ekey()
641 pe[ 7 * 2 + 0] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a]; in des_ekey()
[all …]
/linux/net/rds/
H A Dbind.c70 * marked this socket and don't return a rs ref to the rx path.
76 struct rds_sock *rs; in rds_find_bound() local
80 rs = rhashtable_lookup(&bind_hash_table, key, ht_parms); in rds_find_bound()
81 if (rs && (sock_flag(rds_rs_to_sk(rs), SOCK_DEAD) || in rds_find_bound()
82 !refcount_inc_not_zero(&rds_rs_to_sk(rs)->sk_refcnt))) in rds_find_bound()
83 rs = NULL; in rds_find_bound()
87 rdsdebug("returning rs %p for %pI6c:%u\n", rs, addr, in rds_find_bound()
90 return rs; in rds_find_bound()
94 rds_add_bound(struct rds_sock * rs,const struct in6_addr * addr,__be16 * port,__u32 scope_id) rds_add_bound() argument
148 rds_remove_bound(struct rds_sock * rs) rds_remove_bound() argument
166 struct rds_sock *rs = rds_sk_to_rs(sk); rds_bind() local
[all...]
H A Drdma.c97 struct rds_sock *rs = mr->r_sock; in rds_destroy_mr() local
104 spin_lock_irqsave(&rs->rs_rdma_lock, flags); in rds_destroy_mr()
106 rb_erase(&mr->r_rb_node, &rs->rs_rdma_keys); in rds_destroy_mr()
109 spin_unlock_irqrestore(&rs->rs_rdma_lock, flags); in rds_destroy_mr()
127 void rds_rdma_drop_keys(struct rds_sock *rs) in rds_rdma_drop_keys() argument
134 spin_lock_irqsave(&rs->rs_rdma_lock, flags); in rds_rdma_drop_keys()
135 while ((node = rb_first(&rs->rs_rdma_keys))) { in rds_rdma_drop_keys()
137 if (mr->r_trans == rs->rs_transport) in rds_rdma_drop_keys()
139 rb_erase(&mr->r_rb_node, &rs->rs_rdma_keys); in rds_rdma_drop_keys()
141 spin_unlock_irqrestore(&rs->rs_rdma_lock, flags); in rds_rdma_drop_keys()
[all …]
H A Dcong.c266 struct rds_sock *rs; in rds_cong_map_updated() local
269 list_for_each_entry(rs, &rds_cong_monitor, rs_cong_list) { in rds_cong_map_updated()
270 spin_lock(&rs->rs_lock); in rds_cong_map_updated()
271 rs->rs_cong_notify |= (rs->rs_cong_mask & portmask); in rds_cong_map_updated()
272 rs->rs_cong_mask &= ~portmask; in rds_cong_map_updated()
273 spin_unlock(&rs->rs_lock); in rds_cong_map_updated()
274 if (rs->rs_cong_notify) in rds_cong_map_updated()
275 rds_wake_sk_sleep(rs); in rds_cong_map_updated()
338 void rds_cong_add_socket(struct rds_sock *rs) in rds_cong_add_socket() argument
343 if (list_empty(&rs->rs_cong_list)) in rds_cong_add_socket()
[all …]
/linux/arch/mips/include/asm/
H A Duasm.h199 void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr);
200 void UASM_i_LA(u32 **buf, unsigned int rs, long addr);
210 # define UASM_i_ADDIU(buf, rs, rt, val) uasm_i_daddiu(buf, rs, rt, val) argument
211 # define UASM_i_ADDU(buf, rs, rt, rd) uasm_i_daddu(buf, rs, rt, rd) argument
212 # define UASM_i_LL(buf, rs, rt, off) uasm_i_lld(buf, rs, rt, off) argument
213 # define UASM_i_LW(buf, rs, rt, off) uasm_i_ld(buf, rs, rt, off) argument
214 # define UASM_i_LWX(buf, rs, rt, rd) uasm_i_ldx(buf, rs, rt, rd) argument
217 # define UASM_i_ROTR(buf, rs, rt, sh) uasm_i_drotr(buf, rs, rt, sh) argument
218 # define UASM_i_SC(buf, rs, rt, off) uasm_i_scd(buf, rs, rt, off) argument
219 # define UASM_i_SLL(buf, rs, rt, sh) uasm_i_dsll(buf, rs, rt, sh) argument
[all …]
/linux/drivers/net/ethernet/intel/ice/
H A Dice_ptp_consts.h97 .rs = 4
106 .rs = 4
110 .rs = 1
114 .rs = 1
123 .rs = 0x8100, /* 64.5 */
131 .rs = 0xfffff8cd, /* -3.6 */
177 .rs = 0x5400, /* 42 */
183 .rs = 0xfffff994, /* -3.21 */
190 .rs = 2
199 .rs = 1
[all …]
/linux/arch/mips/kernel/
H A Dmips-r2-to-r6-emul.c405 s32 rt, rs; in mult_func() local
408 rs = regs->regs[MIPSInst_RS(ir)]; in mult_func()
409 res = (s64)rt * (s64)rs; in mult_func()
411 rs = res; in mult_func()
412 regs->lo = (s64)rs; in mult_func()
432 u32 rt, rs; in multu_func() local
435 rs = regs->regs[MIPSInst_RS(ir)]; in multu_func()
436 res = (u64)rt * (u64)rs; in multu_func()
455 s32 rt, rs; in div_func() local
458 rs = regs->regs[MIPSInst_RS(ir)]; in div_func()
[all …]
/linux/drivers/platform/chrome/wilco_ec/
H A Dproperties.c36 struct ec_property_response *rs) in send_property_msg() argument
45 ec_msg.response_data = rs; in send_property_msg()
46 ec_msg.response_size = sizeof(*rs); in send_property_msg()
51 if (rs->op != rq->op) in send_property_msg()
53 if (memcmp(rq->property_id, rs->property_id, sizeof(rs->property_id))) in send_property_msg()
63 struct ec_property_response rs; in wilco_ec_get_property() local
70 ret = send_property_msg(ec, &rq, &rs); in wilco_ec_get_property()
74 prop_msg->length = rs.length; in wilco_ec_get_property()
75 memcpy(prop_msg->data, rs.data, rs.length); in wilco_ec_get_property()
85 struct ec_property_response rs; in wilco_ec_set_property() local
[all …]
H A Dmailbox.c119 struct wilco_ec_response *rs; in wilco_ec_transfer() local
155 rs = ec->data_buffer; in wilco_ec_transfer()
157 sizeof(*rs) + EC_MAILBOX_DATA_SIZE, in wilco_ec_transfer()
158 (u8 *)rs); in wilco_ec_transfer()
162 dev_dbg(ec->dev, "bad packet checksum 0x%02x\n", rs->checksum); in wilco_ec_transfer()
166 if (rs->result) { in wilco_ec_transfer()
167 dev_dbg(ec->dev, "EC reported failure: 0x%02x\n", rs->result); in wilco_ec_transfer()
171 if (rs->data_size != EC_MAILBOX_DATA_SIZE) { in wilco_ec_transfer()
173 rs->data_size, EC_MAILBOX_DATA_SIZE); in wilco_ec_transfer()
177 if (rs->data_size < msg->response_size) { in wilco_ec_transfer()
[all …]
/linux/drivers/net/wireless/ath/ath5k/
H A Ddesc.c603 struct ath5k_rx_status *rs) in ath5k_hw_proc_5210_rx_status() argument
614 memset(rs, 0, sizeof(struct ath5k_rx_status)); in ath5k_hw_proc_5210_rx_status()
619 rs->rs_datalen = rx_status->rx_status_0 & in ath5k_hw_proc_5210_rx_status()
621 rs->rs_rssi = AR5K_REG_MS(rx_status->rx_status_0, in ath5k_hw_proc_5210_rx_status()
623 rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0, in ath5k_hw_proc_5210_rx_status()
625 rs->rs_more = !!(rx_status->rx_status_0 & in ath5k_hw_proc_5210_rx_status()
632 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, in ath5k_hw_proc_5210_rx_status()
636 rs->rs_antenna = AR5K_REG_MS(rx_status->rx_status_0, in ath5k_hw_proc_5210_rx_status()
639 rs->rs_antenna = (rx_status->rx_status_0 & in ath5k_hw_proc_5210_rx_status()
647 rs->rs_keyix = AR5K_REG_MS(rx_status->rx_status_1, in ath5k_hw_proc_5210_rx_status()
[all …]
/linux/tools/testing/selftests/kvm/x86/
H A Dxen_shinfo_test.c191 struct vcpu_runstate_info *rs = (void *)RUNSTATE_VADDR; in guest_code() local
203 GUEST_ASSERT(rs->time[RUNSTATE_runnable] != 0); in guest_code()
204 GUEST_ASSERT(rs->state == 0); in guest_code()
207 GUEST_ASSERT(rs->time[RUNSTATE_blocked] != 0); in guest_code()
208 GUEST_ASSERT(rs->state == 0); in guest_code()
211 GUEST_ASSERT(rs->time[RUNSTATE_offline] != 0); in guest_code()
212 GUEST_ASSERT(rs->state == 0); in guest_code()
216 GUEST_ASSERT(rs->time[RUNSTATE_blocked] == 0x5a); in guest_code()
217 GUEST_ASSERT(rs->time[RUNSTATE_offline] == 0x6b6b); in guest_code()
221 GUEST_ASSERT(rs->state_entry_time >= 0x8000); in guest_code()
[all …]

12345678910