cregit-Linux how code gets into the kernel

Release 4.14 arch/sparc/kernel/reboot.c

// SPDX-License-Identifier: GPL-2.0
/* reboot.c: reboot/shutdown/halt/poweroff handling
 *
 * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
 */
#include <linux/kernel.h>
#include <linux/reboot.h>
#include <linux/export.h>
#include <linux/pm.h>

#include <asm/oplib.h>
#include <asm/prom.h>
#include <asm/setup.h>

/* sysctl - toggle power-off restriction for serial console
 * systems in machine_power_off()
 */

int scons_pwroff = 1;

/* This isn't actually used, it exists merely to satisfy the
 * reference in kernel/sys.c
 */

void (*pm_power_off)(void) = machine_power_off;

EXPORT_SYMBOL(pm_power_off);


void machine_power_off(void) { if (strcmp(of_console_device->type, "serial") || scons_pwroff) prom_halt_power_off(); prom_halt(); }

Contributors

PersonTokensPropCommitsCommitProp
David S. Miller26100.00%1100.00%
Total26100.00%1100.00%


void machine_halt(void) { prom_halt(); panic("Halt failed!"); }

Contributors

PersonTokensPropCommitsCommitProp
David S. Miller15100.00%1100.00%
Total15100.00%1100.00%


void machine_restart(char *cmd) { char *p; p = strchr(reboot_command, '\n'); if (p) *p = 0; if (cmd) prom_reboot(cmd); if (*reboot_command) prom_reboot(reboot_command); prom_reboot(""); panic("Reboot failed!"); }

Contributors

PersonTokensPropCommitsCommitProp
David S. Miller60100.00%1100.00%
Total60100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
David S. Miller14296.60%240.00%
David Howells32.04%120.00%
Paul Gortmaker10.68%120.00%
Greg Kroah-Hartman10.68%120.00%
Total147100.00%5100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.