tile: Use the more common pr_warn instead of pr_warning
And other message logging neatening. Other miscellanea: o coalesce formats o realign arguments o standardize a couple of macros o use __func__ instead of embedding the function name Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
This commit is contained in:

committed by
Chris Metcalf

parent
ebd25caf7d
commit
f47436734d
@@ -169,8 +169,7 @@ static void wait_for_migration(pte_t *pte)
|
||||
while (pte_migrating(*pte)) {
|
||||
barrier();
|
||||
if (++retries > bound)
|
||||
panic("Hit migrating PTE (%#llx) and"
|
||||
" page PFN %#lx still migrating",
|
||||
panic("Hit migrating PTE (%#llx) and page PFN %#lx still migrating",
|
||||
pte->val, pte_pfn(*pte));
|
||||
}
|
||||
}
|
||||
@@ -292,11 +291,10 @@ static int handle_page_fault(struct pt_regs *regs,
|
||||
*/
|
||||
stack_offset = stack_pointer & (THREAD_SIZE-1);
|
||||
if (stack_offset < THREAD_SIZE / 8) {
|
||||
pr_alert("Potential stack overrun: sp %#lx\n",
|
||||
stack_pointer);
|
||||
pr_alert("Potential stack overrun: sp %#lx\n", stack_pointer);
|
||||
show_regs(regs);
|
||||
pr_alert("Killing current process %d/%s\n",
|
||||
tsk->pid, tsk->comm);
|
||||
tsk->pid, tsk->comm);
|
||||
do_group_exit(SIGKILL);
|
||||
}
|
||||
|
||||
@@ -421,7 +419,7 @@ good_area:
|
||||
} else if (write) {
|
||||
#ifdef TEST_VERIFY_AREA
|
||||
if (!is_page_fault && regs->cs == KERNEL_CS)
|
||||
pr_err("WP fault at "REGFMT"\n", regs->eip);
|
||||
pr_err("WP fault at " REGFMT "\n", regs->eip);
|
||||
#endif
|
||||
if (!(vma->vm_flags & VM_WRITE))
|
||||
goto bad_area;
|
||||
@@ -519,16 +517,15 @@ no_context:
|
||||
pte_t *pte = lookup_address(address);
|
||||
|
||||
if (pte && pte_present(*pte) && !pte_exec_kernel(*pte))
|
||||
pr_crit("kernel tried to execute"
|
||||
" non-executable page - exploit attempt?"
|
||||
" (uid: %d)\n", current->uid);
|
||||
pr_crit("kernel tried to execute non-executable page - exploit attempt? (uid: %d)\n",
|
||||
current->uid);
|
||||
}
|
||||
#endif
|
||||
if (address < PAGE_SIZE)
|
||||
pr_alert("Unable to handle kernel NULL pointer dereference\n");
|
||||
else
|
||||
pr_alert("Unable to handle kernel paging request\n");
|
||||
pr_alert(" at virtual address "REGFMT", pc "REGFMT"\n",
|
||||
pr_alert(" at virtual address " REGFMT ", pc " REGFMT "\n",
|
||||
address, regs->pc);
|
||||
|
||||
show_regs(regs);
|
||||
@@ -575,9 +572,10 @@ do_sigbus:
|
||||
#ifndef __tilegx__
|
||||
|
||||
/* We must release ICS before panicking or we won't get anywhere. */
|
||||
#define ics_panic(fmt, ...) do { \
|
||||
__insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0); \
|
||||
panic(fmt, __VA_ARGS__); \
|
||||
#define ics_panic(fmt, ...) \
|
||||
do { \
|
||||
__insn_mtspr(SPR_INTERRUPT_CRITICAL_SECTION, 0); \
|
||||
panic(fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
@@ -615,8 +613,7 @@ struct intvec_state do_page_fault_ics(struct pt_regs *regs, int fault_num,
|
||||
fault_num != INT_DTLB_ACCESS)) {
|
||||
unsigned long old_pc = regs->pc;
|
||||
regs->pc = pc;
|
||||
ics_panic("Bad ICS page fault args:"
|
||||
" old PC %#lx, fault %d/%d at %#lx\n",
|
||||
ics_panic("Bad ICS page fault args: old PC %#lx, fault %d/%d at %#lx",
|
||||
old_pc, fault_num, write, address);
|
||||
}
|
||||
|
||||
@@ -669,8 +666,8 @@ struct intvec_state do_page_fault_ics(struct pt_regs *regs, int fault_num,
|
||||
#endif
|
||||
fixup = search_exception_tables(pc);
|
||||
if (!fixup)
|
||||
ics_panic("ICS atomic fault not in table:"
|
||||
" PC %#lx, fault %d", pc, fault_num);
|
||||
ics_panic("ICS atomic fault not in table: PC %#lx, fault %d",
|
||||
pc, fault_num);
|
||||
regs->pc = fixup->fixup;
|
||||
regs->ex1 = PL_ICS_EX1(KERNEL_PL, 0);
|
||||
}
|
||||
@@ -826,8 +823,7 @@ void do_page_fault(struct pt_regs *regs, int fault_num,
|
||||
|
||||
set_thread_flag(TIF_ASYNC_TLB);
|
||||
if (async->fault_num != 0) {
|
||||
panic("Second async fault %d;"
|
||||
" old fault was %d (%#lx/%ld)",
|
||||
panic("Second async fault %d; old fault was %d (%#lx/%ld)",
|
||||
fault_num, async->fault_num,
|
||||
address, write);
|
||||
}
|
||||
|
Reference in New Issue
Block a user