/linux-4.4.14/arch/powerpc/sysdev/ |
H A D | mpic_msgr.c | 35 static inline void _mpic_msgr_mer_write(struct mpic_msgr *msgr, u32 value) _mpic_msgr_mer_write() argument 37 out_be32(msgr->mer, value); _mpic_msgr_mer_write() 40 static inline u32 _mpic_msgr_mer_read(struct mpic_msgr *msgr) _mpic_msgr_mer_read() argument 42 return in_be32(msgr->mer); _mpic_msgr_mer_read() 45 static inline void _mpic_msgr_disable(struct mpic_msgr *msgr) _mpic_msgr_disable() argument 47 u32 mer = _mpic_msgr_mer_read(msgr); _mpic_msgr_disable() 49 _mpic_msgr_mer_write(msgr, mer & ~(1 << msgr->num)); _mpic_msgr_disable() 55 struct mpic_msgr *msgr; mpic_msgr_get() local 58 msgr = ERR_PTR(-EBUSY); mpic_msgr_get() 64 msgr = mpic_msgrs[reg_num]; mpic_msgr_get() 65 if (msgr->in_use == MSGR_FREE) mpic_msgr_get() 66 msgr->in_use = MSGR_INUSE; mpic_msgr_get() 69 return msgr; mpic_msgr_get() 73 void mpic_msgr_put(struct mpic_msgr *msgr) mpic_msgr_put() argument 77 raw_spin_lock_irqsave(&msgr->lock, flags); mpic_msgr_put() 78 msgr->in_use = MSGR_FREE; mpic_msgr_put() 79 _mpic_msgr_disable(msgr); mpic_msgr_put() 80 raw_spin_unlock_irqrestore(&msgr->lock, flags); mpic_msgr_put() 84 void mpic_msgr_enable(struct mpic_msgr *msgr) mpic_msgr_enable() argument 89 raw_spin_lock_irqsave(&msgr->lock, flags); mpic_msgr_enable() 90 mer = _mpic_msgr_mer_read(msgr); mpic_msgr_enable() 91 _mpic_msgr_mer_write(msgr, mer | (1 << msgr->num)); mpic_msgr_enable() 92 raw_spin_unlock_irqrestore(&msgr->lock, flags); mpic_msgr_enable() 96 void mpic_msgr_disable(struct mpic_msgr *msgr) mpic_msgr_disable() argument 100 raw_spin_lock_irqsave(&msgr->lock, flags); mpic_msgr_disable() 101 _mpic_msgr_disable(msgr); mpic_msgr_disable() 102 raw_spin_unlock_irqrestore(&msgr->lock, flags); mpic_msgr_disable() 122 snprintf(buf, sizeof(buf), "mpic-msgr-block%d", count); mpic_msgr_number_of_blocks() 152 snprintf(buf, sizeof(buf), "mpic-msgr-block%d", index); mpic_msgr_block_number() 218 prop = of_get_property(np, "mpic-msgr-receive-mask", NULL); mpic_msgr_probe() 223 struct mpic_msgr *msgr; mpic_msgr_probe() local 226 msgr = kzalloc(sizeof(struct mpic_msgr), GFP_KERNEL); mpic_msgr_probe() 227 if (!msgr) { mpic_msgr_probe() 233 msgr->base = msgr_block_addr + i * MPIC_MSGR_STRIDE; mpic_msgr_probe() 234 msgr->mer = (u32 *)((u8 *)msgr->base + MPIC_MSGR_MER_OFFSET); mpic_msgr_probe() 235 msgr->in_use = MSGR_FREE; mpic_msgr_probe() 236 msgr->num = i; mpic_msgr_probe() 237 raw_spin_lock_init(&msgr->lock); mpic_msgr_probe() 240 msgr->irq = irq_of_parse_and_map(np, irq_index); mpic_msgr_probe() 241 if (msgr->irq == NO_IRQ) { mpic_msgr_probe() 244 kfree(msgr); mpic_msgr_probe() 249 msgr->irq = NO_IRQ; mpic_msgr_probe() 252 mpic_msgrs[reg_number] = msgr; mpic_msgr_probe() 253 mpic_msgr_disable(msgr); mpic_msgr_probe() 255 reg_number, msgr->irq); mpic_msgr_probe() 264 .compatible = "fsl,mpic-v3.1-msgr", 272 .name = "mpic-msgr",
|
/linux-4.4.14/arch/powerpc/include/asm/ |
H A D | mpic_msgr.h | 42 * @msgr: the message register to return 49 extern void mpic_msgr_put(struct mpic_msgr *msgr); 53 * @msgr: the message register to enable 58 extern void mpic_msgr_enable(struct mpic_msgr *msgr); 62 * @msgr: the message register to disable 67 extern void mpic_msgr_disable(struct mpic_msgr *msgr); 71 * @msgr: the message register to write to 78 static inline void mpic_msgr_write(struct mpic_msgr *msgr, u32 message) mpic_msgr_write() argument 80 out_be32(msgr->base, message); mpic_msgr_write() 85 * @msgr: the message register to read from 91 static inline u32 mpic_msgr_read(struct mpic_msgr *msgr) mpic_msgr_read() argument 93 return in_be32(msgr->base); mpic_msgr_read() 98 * @msgr: the message register to clear 102 static inline void mpic_msgr_clear(struct mpic_msgr *msgr) mpic_msgr_clear() argument 104 (void) mpic_msgr_read(msgr); mpic_msgr_clear() 109 * @msgr: the message register whose destination is to be set 115 static inline void mpic_msgr_set_destination(struct mpic_msgr *msgr, mpic_msgr_set_destination() argument 118 out_be32(msgr->base, 1 << get_hard_smp_processor_id(cpu_num)); mpic_msgr_set_destination() 122 * @msgr: the message register whose IRQ is to be returned 129 static inline int mpic_msgr_get_irq(struct mpic_msgr *msgr) mpic_msgr_get_irq() argument 131 return msgr->irq; mpic_msgr_get_irq()
|
/linux-4.4.14/net/ceph/ |
H A D | messenger.c | 227 static void encode_my_addr(struct ceph_messenger *msgr) encode_my_addr() argument 229 memcpy(&msgr->my_enc_addr, &msgr->inst.addr, sizeof(msgr->my_enc_addr)); encode_my_addr() 230 ceph_encode_addr(&msgr->my_enc_addr); encode_my_addr() 300 ceph_msgr_wq = alloc_workqueue("ceph-msgr", WQ_MEM_RECLAIM, 0); ceph_msgr_init() 395 if (atomic_read(&con->msgr->stopping)) { ceph_sock_data_ready() 484 ret = sock_create_kern(read_pnet(&con->msgr->net), paddr->ss_family, ceph_tcp_connect() 512 if (ceph_test_opt(from_msgr(con->msgr), TCP_NODELAY)) { ceph_tcp_connect() 738 struct ceph_messenger *msgr) ceph_con_init() 744 con->msgr = msgr; ceph_con_init() 762 static u32 get_global_seq(struct ceph_messenger *msgr, u32 gt) get_global_seq() argument 766 spin_lock(&msgr->global_seq_lock); get_global_seq() 767 if (msgr->global_seq < gt) get_global_seq() 768 msgr->global_seq = gt; get_global_seq() 769 ret = ++msgr->global_seq; get_global_seq() 770 spin_unlock(&msgr->global_seq_lock); get_global_seq() 1432 con_out_kvec_add(con, sizeof (con->msgr->my_enc_addr), prepare_write_banner() 1433 &con->msgr->my_enc_addr); prepare_write_banner() 1441 unsigned int global_seq = get_global_seq(con->msgr, 0); prepare_write_connect() 1464 cpu_to_le64(from_msgr(con->msgr)->supported_features); prepare_write_connect() 1558 bool do_datacrc = !ceph_test_opt(from_msgr(con->msgr), NOCRC); write_partial_message_data() 2020 if (addr_is_blank(&con->msgr->inst.addr.in_addr)) { process_banner() 2021 int port = addr_port(&con->msgr->inst.addr.in_addr); process_banner() 2023 memcpy(&con->msgr->inst.addr.in_addr, process_banner() 2026 addr_set_port(&con->msgr->inst.addr.in_addr, port); process_banner() 2027 encode_my_addr(con->msgr); process_banner() 2029 ceph_pr_addr(&con->msgr->inst.addr.in_addr)); process_banner() 2037 u64 sup_feat = from_msgr(con->msgr)->supported_features; process_connect() 2038 u64 req_feat = from_msgr(con->msgr)->required_features; process_connect() 2136 get_global_seq(con->msgr, process_connect() 2264 bool do_datacrc = !ceph_test_opt(from_msgr(con->msgr), NOCRC); read_partial_msg_data() 2309 bool do_datacrc = !ceph_test_opt(from_msgr(con->msgr), NOCRC); read_partial_message() 2977 void ceph_messenger_init(struct ceph_messenger *msgr, ceph_messenger_init() argument 2980 spin_lock_init(&msgr->global_seq_lock); ceph_messenger_init() 2983 msgr->inst.addr = *myaddr; ceph_messenger_init() 2986 msgr->inst.addr.type = 0; ceph_messenger_init() 2987 get_random_bytes(&msgr->inst.addr.nonce, sizeof(msgr->inst.addr.nonce)); ceph_messenger_init() 2988 encode_my_addr(msgr); ceph_messenger_init() 2990 atomic_set(&msgr->stopping, 0); ceph_messenger_init() 2991 write_pnet(&msgr->net, get_net(current->nsproxy->net_ns)); ceph_messenger_init() 2993 dout("%s %p\n", __func__, msgr); ceph_messenger_init() 2997 void ceph_messenger_fini(struct ceph_messenger *msgr) ceph_messenger_fini() argument 2999 put_net(read_pnet(&msgr->net)); ceph_messenger_fini() 3030 msg->hdr.src = con->msgr->inst.name; ceph_con_send() 736 ceph_con_init(struct ceph_connection *con, void *private, const struct ceph_connection_operations *ops, struct ceph_messenger *msgr) ceph_con_init() argument
|
H A D | ceph_common.c | 137 if (!net_eq(current->nsproxy->net_ns, read_pnet(&client->msgr.net))) ceph_compare_options() 607 /* msgr */ ceph_create_client() 611 ceph_messenger_init(&client->msgr, myaddr); ceph_create_client() 626 ceph_messenger_fini(&client->msgr); ceph_create_client() 636 atomic_set(&client->msgr.stopping, 1); ceph_destroy_client() 641 ceph_messenger_fini(&client->msgr); ceph_destroy_client()
|
H A D | mon_client.c | 856 &monc->client->msgr); ceph_monc_init() 899 * flush msgr queue before we destroy ourselves to ensure that: ceph_monc_stop() 940 monc->client->msgr.inst.name.type = CEPH_ENTITY_TYPE_CLIENT; handle_auth_reply() 941 monc->client->msgr.inst.name.num = handle_auth_reply()
|
H A D | auth_x.c | 702 if (ceph_test_opt(from_msgr(msg->con->msgr), NOMSGSIGN)) ceph_x_sign_message() 719 if (ceph_test_opt(from_msgr(msg->con->msgr), NOMSGSIGN)) ceph_x_check_message_signature()
|
H A D | osd_client.c | 1032 ceph_con_init(&osd->o_con, osd, &osd_con_ops, &osdc->client->msgr); create_osd() 1161 "letting msgr retry\n"); __reset_osd() 2111 &osdc->client->msgr); ceph_osdc_handle_map()
|
H A D | osdmap.c | 1199 struct ceph_messenger *msgr) osdmap_apply_incremental() 1197 osdmap_apply_incremental(void **p, void *end, struct ceph_osdmap *map, struct ceph_messenger *msgr) osdmap_apply_incremental() argument
|
/linux-4.4.14/include/linux/ceph/ |
H A D | messenger.h | 185 struct ceph_messenger *msgr; member in struct:ceph_connection 264 extern void ceph_messenger_init(struct ceph_messenger *msgr, 266 extern void ceph_messenger_fini(struct ceph_messenger *msgr); 270 struct ceph_messenger *msgr);
|
H A D | libceph.h | 129 struct ceph_messenger msgr; /* messenger instance */ member in struct:ceph_client 141 #define from_msgr(ms) container_of(ms, struct ceph_client, msgr)
|
H A D | osdmap.h | 198 struct ceph_messenger *msgr);
|
H A D | rados.h | 9 #include <linux/ceph/msgr.h>
|
H A D | ceph_fs.h | 15 #include <linux/ceph/msgr.h>
|
/linux-4.4.14/arch/s390/net/ |
H A D | bpf_jit_comp.c | 593 /* msgr %dst,%src */ bpf_jit_insn()
|
/linux-4.4.14/arch/s390/kernel/ |
H A D | dis.c | 1086 { "msgr", 0x0c, INSTR_RRE_RR },
|
/linux-4.4.14/fs/ceph/ |
H A D | mds_client.c | 443 ceph_con_init(&s->s_con, s, &mds_con_ops, &mdsc->fsc->client->msgr); register_session()
|