[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190820095918.GB14137@jagdpanzerIV>
Date: Tue, 20 Aug 2019 18:59:18 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrea Parri <andrea.parri@...rulasolutions.com>,
Thomas Gleixner <tglx@...utronix.de>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Brendan Higgins <brendanhiggins@...gle.com>
Subject: Re: [RFC PATCH v4 8/9] printk-rb: new functionality to support printk
On (08/08/19 00:32), John Ogness wrote:
[..]
> +void prb_init(struct printk_ringbuffer *rb, char *data, int data_size_bits,
> + struct prb_desc *descs, int desc_count_bits,
> + struct wait_queue_head *waitq)
> +{
> + struct dataring *dr = &rb->dr;
> + struct numlist *nl = &rb->nl;
> +
> + rb->desc_count_bits = desc_count_bits;
> + rb->descs = descs;
> + atomic_long_set(&descs[0].id, 0);
> + descs[0].desc.begin_lpos = 1;
> + descs[0].desc.next_lpos = 1;
dataring_desc_init(), perhaps?
> + atomic_set(&rb->desc_next_unused, 1);
> +
> + atomic_long_set(&nl->head_id, 0);
> + atomic_long_set(&nl->tail_id, 0);
> + nl->node = prb_desc_node;
> + nl->node_arg = rb;
> + nl->busy = prb_desc_busy;
> + nl->busy_arg = rb;
> +
> + dr->size_bits = data_size_bits;
> + dr->data = data;
> + atomic_long_set(&dr->head_lpos, -111 * sizeof(long));
> + atomic_long_set(&dr->tail_lpos, -111 * sizeof(long));
> + dr->getdesc = prb_getdesc;
> + dr->getdesc_arg = rb;
> +
> + atomic_long_set(&rb->fail, 0);
> +
> + rb->wq = waitq;
> +}
> +EXPORT_SYMBOL(prb_init);
-ss
Powered by blists - more mailing lists