cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/paravirt/serial.c

/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2013 Cavium, Inc.
 */

#include <linux/kernel.h>
#include <linux/virtio_console.h>
#include <linux/kvm_para.h>

/*
 * Emit one character to the boot console.
 */

int prom_putchar(char c) { kvm_hypercall3(KVM_HC_MIPS_CONSOLE_OUTPUT, 0 /* port 0 */, (unsigned long)&c, 1 /* len == 1 */); return 1; }

Contributors

PersonTokensPropCommitsCommitProp
David Daney29100.00%1100.00%
Total29100.00%1100.00%

#ifdef CONFIG_VIRTIO_CONSOLE
static int paravirt_put_chars(u32 vtermno, const char *buf, int count) { kvm_hypercall3(KVM_HC_MIPS_CONSOLE_OUTPUT, vtermno, (unsigned long)buf, count); return count; }

Contributors

PersonTokensPropCommitsCommitProp
David Daney35100.00%1100.00%
Total35100.00%1100.00%


static int __init paravirt_cons_init(void) { virtio_cons_early_init(paravirt_put_chars); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
David Daney17100.00%1100.00%
Total17100.00%1100.00%

core_initcall(paravirt_cons_init); #endif

Overall Contributors

PersonTokensPropCommitsCommitProp
David Daney102100.00%1100.00%
Total102100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.