• A
    relay: add global mode support for buffer-only channels · 59dbb2a0
    Akash Goel 提交于
    Commit 20d8b67c ("relay: add buffer-only channels; useful for early
    logging") added support to use channels with no associated files.
    
    This is useful when the exact location of relay file is not known or the
    the parent directory of relay file is not available, while creating the
    channel and the logging has to start right from the boot.
    
    But there was no provision to use global mode with buffer-only channels,
    which is added by this patch, without modifying the interface where
    initially there will be a dummy invocation of create_buf_file callback
    through which kernel client can convey the need of a global buffer.
    
    For the use case where drivers/kernel clients want a simple interface
    for the userspace, which enables them to capture data/logs from relay
    file inorder & without any post processing, support of Global buffer
    mode is warranted.
    
    Modules, like i915, using relay_open() in early init would have to later
    register their buffer-only relays, once debugfs is available, by calling
    relay_late_setup_files().  Hence relay_late_setup_files() symbol also
    needs to be exported.
    
    Link: http://lkml.kernel.org/r/1468404563-11653-1-git-send-email-akash.goel@intel.comSigned-off-by: NAkash Goel <akash.goel@intel.com>
    Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
    Cc: Tom Zanussi <tzanussi@gmail.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    59dbb2a0
relay.c 33.4 KB