Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3834135ybl; Tue, 20 Aug 2019 03:02:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGThcjsZME0mpw5N0X7vGHyuTBmn0C/9UYIX+NUJ3qB+K8fLclJuAAQSyus16im5wuRU3H X-Received: by 2002:a17:902:441:: with SMTP id 59mr27854021ple.62.1566295331873; Tue, 20 Aug 2019 03:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566295331; cv=none; d=google.com; s=arc-20160816; b=fdK8OTd7WaJefqtwjReoykDYdWSRJY6K3wWE0aSbVskZJUX2Oq/gzHQhdGdV+WSprT VwgVq+2v4h2iDkjxnXMnmw/FWhsvkLqE3Qh+wPLOXRzeoFX6hERAXLjwLtfFEIUFC4fX DFa0gs7CeoKHjCT87sOaFjNZ8AGxQ4oJDahU0NmOSxbqLGvqLkmRVI4g2jFqlMToHbWh otLfoSG6p+wZymMKuhhGee/RbDJQeg+CehPiMcS6IUoPein/DW0ihOvy9Iql4nuVTeHd NS5r4lMBxp8VI5zPj7BoK0UwK1K8YYw425cr+emtvGQg6gDYsXMv33FSLpWMd180mDgj 1G3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o15KXmaxH2/gADXZDmhPtBesd8g7XYX73k5yCjzHx6M=; b=c/3o2vy13zgw4cW6rhAT+QWR0amWtUx+uVhZv1AFHU172ixt9TVtp+F3ztoCxQJu34 TLt/lTgb7IXt/Gq1ZTnLlUAI+I41SYEUxa6t65AtNJ/e/Ur/ht1wVxbwh99EkImgCiAU c7bvDv0CvybtHNAHYXQq50up0UME4yin2KZSjjTlhn/e2uW41VFFWbOKP/Y59BfMNvIi M/CIzHGZ/bwLCtlGqfh7bod+VzFUBATUhqOQdx52KYftdAh9TAI1EJvPe6fIx6UbTIvb JPvMOj5iF1RNmcuch3GPDB3dEbB52QhhPzpOB9H9X1ijp+fF+UMiRez1MqZOexUfM0hv nMFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=enLo1ZcG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si11817121pgi.324.2019.08.20.03.01.54; Tue, 20 Aug 2019 03:02:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=enLo1ZcG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729751AbfHTJ7Y (ORCPT + 99 others); Tue, 20 Aug 2019 05:59:24 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46649 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728842AbfHTJ7X (ORCPT ); Tue, 20 Aug 2019 05:59:23 -0400 Received: by mail-pf1-f194.google.com with SMTP id q139so3063398pfc.13 for ; Tue, 20 Aug 2019 02:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=o15KXmaxH2/gADXZDmhPtBesd8g7XYX73k5yCjzHx6M=; b=enLo1ZcGWwnOPUuiZD1xPDHEHOCaQJ/wuly1Ay535TGqIBB5rOYa0nu84CQQT8PaoN L8uJBHSHjTFJeEZZFkL8X4qLodujcvy0HHBiobgB2a36bVzBRZEKC52P6shMuNSBSQY6 45LKtzViEKzFB86Lh76VxFAREt409VWIJGofHgXSwuPyWOgreovZZcTA48a8QxmPGEzW Bcf2uLR/1S7wxCMyW9OqGYOW3doiG1ls42Y3PttMa77GQ08BpTRT3hyMweh+2INAqXvU C9MJ3unl2DAABtNIXYQ5s0OZ1B60aZ0iZ20H1RrS1zYWDPG+8MGQEG8C3f79Xfgsml8G xjGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=o15KXmaxH2/gADXZDmhPtBesd8g7XYX73k5yCjzHx6M=; b=R/XkjRgKPDMazRrQnGCTNssL8YKuZIO0FVxHxawEvfSRBPVdKkdNo6lDAuR+ISEv0G Cjly7UK0MYXQo/SRcxm600Fkz1GMg7L6t3mMRj7ivu4J21peYdFEwHzSerkVvGPxgI89 n4J4BTEuhKQ08+rtNFrzGaDWi56cFr8/qZ0l9jCaxI8djBRTksCzn5sNDEIVlEiZcWcO MI7tH2WnIXRo8LeqOBzdH/Pjsnmv5jvAQCovO3OpPZaAGe/DOB0O7PmpKFIEm/URrjP+ YMUVFHqlXD2aELeBVhzLqRpxcsJTMQhCwdfEeY4hfrBojH51fsBlSWN2JJkk/bSgSNcR TCuw== X-Gm-Message-State: APjAAAXXEFGSvnM2umNnMHIJIDrOrragcxI9G1eevFu/5Rv9ynBUheXt 0B/P+NjZrMy6a+8YrQlwmgU= X-Received: by 2002:a63:7e17:: with SMTP id z23mr24101863pgc.14.1566295163014; Tue, 20 Aug 2019 02:59:23 -0700 (PDT) Received: from localhost ([175.223.16.125]) by smtp.gmail.com with ESMTPSA id y188sm22045896pfb.115.2019.08.20.02.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 02:59:22 -0700 (PDT) Date: Tue, 20 Aug 2019 18:59:18 +0900 From: Sergey Senozhatsky To: John Ogness Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , Sergey Senozhatsky , Brendan Higgins Subject: Re: [RFC PATCH v4 8/9] printk-rb: new functionality to support printk Message-ID: <20190820095918.GB14137@jagdpanzerIV> References: <20190807222634.1723-1-john.ogness@linutronix.de> <20190807222634.1723-9-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190807222634.1723-9-john.ogness@linutronix.de> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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