cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/kernel/sysrq.c

Directory: arch/mips/kernel
// SPDX-License-Identifier: GPL-2.0
/*
 * MIPS specific sysrq operations.
 *
 * Copyright (C) 2015 Imagination Technologies Ltd.
 */
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/spinlock.h>
#include <linux/sysrq.h>
#include <linux/workqueue.h>

#include <asm/cpu-features.h>
#include <asm/mipsregs.h>
#include <asm/tlbdebug.h>

/*
 * Dump TLB entries on all CPUs.
 */

static DEFINE_SPINLOCK(show_lock);


static void sysrq_tlbdump_single(void *dummy) { unsigned long flags; spin_lock_irqsave(&show_lock, flags); pr_info("CPU%d:\n", smp_processor_id()); dump_tlb_regs(); pr_info("\n"); dump_tlb_all(); pr_info("\n"); spin_unlock_irqrestore(&show_lock, flags); }

Contributors

PersonTokensPropCommitsCommitProp
James Hogan54100.00%2100.00%
Total54100.00%2100.00%

#ifdef CONFIG_SMP
static void sysrq_tlbdump_othercpus(struct work_struct *dummy) { smp_call_function(sysrq_tlbdump_single, NULL, 0); }

Contributors

PersonTokensPropCommitsCommitProp
James Hogan20100.00%1100.00%
Total20100.00%1100.00%

static DECLARE_WORK(sysrq_tlbdump, sysrq_tlbdump_othercpus); #endif
static void sysrq_handle_tlbdump(int key) { sysrq_tlbdump_single(NULL); #ifdef CONFIG_SMP schedule_work(&sysrq_tlbdump); #endif }

Contributors

PersonTokensPropCommitsCommitProp
James Hogan25100.00%1100.00%
Total25100.00%1100.00%

static struct sysrq_key_op sysrq_tlbdump_op = { .handler = sysrq_handle_tlbdump, .help_msg = "show-tlbs(x)", .action_msg = "Show TLB entries", .enable_mask = SYSRQ_ENABLE_DUMP, };
static int __init mips_sysrq_init(void) { return register_sysrq_key('x', &sysrq_tlbdump_op); }

Contributors

PersonTokensPropCommitsCommitProp
James Hogan18100.00%1100.00%
Total18100.00%1100.00%

arch_initcall(mips_sysrq_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
James Hogan19499.49%266.67%
Greg Kroah-Hartman10.51%133.33%
Total195100.00%3100.00%
Directory: arch/mips/kernel
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.