On (20/07/10 17:43), Sergey Senozhatsky wrote: > [..] > > > +void prb_init(struct printk_ringbuffer *rb, > > + char *text_buf, unsigned int textbits, > > + char *dict_buf, unsigned int dictbits, > > + struct prb_desc *descs, unsigned int descbits) > > +{ > > + memset(descs, 0, _DESCS_COUNT(descbits) * sizeof(descs[0])); > > + > > + rb->desc_ring.count_bits = descbits; > > + rb->desc_ring.descs = descs; > > + atomic_long_set(&rb->desc_ring.head_id, DESC0_ID(descbits)); > > + atomic_long_set(&rb->desc_ring.tail_id, DESC0_ID(descbits)); > > + > > + rb->text_data_ring.size_bits = textbits; > > + rb->text_data_ring.data = text_buf; > > + atomic_long_set(&rb->text_data_ring.head_lpos, BLK0_LPOS(textbits)); > > + atomic_long_set(&rb->text_data_ring.tail_lpos, BLK0_LPOS(textbits)); > > + > > + rb->dict_data_ring.size_bits = dictbits; > > + rb->dict_data_ring.data = dict_buf; > > + atomic_long_set(&rb->dict_data_ring.head_lpos, BLK0_LPOS(dictbits)); > > + atomic_long_set(&rb->dict_data_ring.tail_lpos, BLK0_LPOS(dictbits)); > > + > > Just a side note: some people want !CONFIG_PRINTK builds. I wonder > how many people will want !CONFIG_PRINTK_DICT. The core logbuf/dict > logbuf split is really cool. We also may be can add a dedicated logbuf for the user-space logs, as opposed to current "user space can write to the kernel logbuf". Some folks really dislike that systemd, for instance, can trash the core kernel logbuf doing a lot of /dev/kmsg writes. -ss _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec