コード例 #1
0
/*
 * Check for command-line options that affect what MMU_init will do.
 */
void __init MMU_setup(void)
{
	/* Check for nobats option (used in mapin_ram). */
	if (strstr(boot_command_line, "nobats")) {
		__map_without_bats = 1;
	}

	if (strstr(boot_command_line, "noltlbs")) {
		__map_without_ltlbs = 1;
	}
	if (debug_pagealloc_enabled()) {
		__map_without_bats = 1;
		__map_without_ltlbs = 1;
	}
}
コード例 #2
0
ファイル: page_poison.c プロジェクト: 513855417/linux
static void init_page_poisoning(void)
{
	/*
	 * page poisoning is debug page alloc for some arches. If either
	 * of those options are enabled, enable poisoning
	 */
	if (!IS_ENABLED(CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC)) {
		if (!want_page_poisoning && !debug_pagealloc_enabled())
			return;
	} else {
		if (!want_page_poisoning)
			return;
	}

	__page_poisoning_enabled = true;
}
コード例 #3
0
/*
 * Check for command-line options that affect what MMU_init will do.
 */
static void __init MMU_setup(void)
{
	/* Check for nobats option (used in mapin_ram). */
	if (strstr(boot_command_line, "nobats")) {
		__map_without_bats = 1;
	}

	if (strstr(boot_command_line, "noltlbs")) {
		__map_without_ltlbs = 1;
	}
	if (debug_pagealloc_enabled()) {
		__map_without_bats = 1;
		__map_without_ltlbs = 1;
	}
	if (strict_kernel_rwx_enabled() && !IS_ENABLED(CONFIG_PPC_8xx))
		__map_without_ltlbs = 1;
}
コード例 #4
0
ファイル: pcsp.c プロジェクト: 020gzh/linux
static int alsa_card_pcsp_init(struct device *dev)
{
	int err;

	err = snd_card_pcsp_probe(0, dev);
	if (err) {
		printk(KERN_ERR "PC-Speaker initialization failed.\n");
		return err;
	}

	/* Well, CONFIG_DEBUG_PAGEALLOC makes the sound horrible. Lets alert */
	if (debug_pagealloc_enabled()) {
		printk(KERN_WARNING "PCSP: CONFIG_DEBUG_PAGEALLOC is enabled, "
		       "which may make the sound noisy.\n");
	}

	return 0;
}
コード例 #5
0
ファイル: dumpstack.c プロジェクト: linux-next/linux-next
int __die(const char *str, struct pt_regs *regs, long err)
{
#ifdef CONFIG_X86_32
    unsigned short ss;
    unsigned long sp;
#endif
    printk(KERN_DEFAULT
           "%s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff, ++die_counter,
           IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT"         : "",
           IS_ENABLED(CONFIG_SMP)     ? " SMP"             : "",
           debug_pagealloc_enabled()  ? " DEBUG_PAGEALLOC" : "",
           IS_ENABLED(CONFIG_KASAN)   ? " KASAN"           : "");

    if (notify_die(DIE_OOPS, str, regs, err,
                   current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP)
        return 1;

    print_modules();
    show_regs(regs);
#ifdef CONFIG_X86_32
    if (user_mode(regs)) {
        sp = regs->sp;
        ss = regs->ss & 0xffff;
    } else {
        sp = kernel_stack_pointer(regs);
        savesegment(ss, ss);
    }
    printk(KERN_EMERG "EIP: [<%08lx>] ", regs->ip);
    print_symbol("%s", regs->ip);
    printk(" SS:ESP %04x:%08lx\n", ss, sp);
#else
    /* Executive summary in case the oops scrolled away */
    printk(KERN_ALERT "RIP ");
    printk_address(regs->ip);
    printk(" RSP <%016lx>\n", regs->sp);
#endif
    return 0;
}