mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
nds32 patches for 5.12
Here is the nds32 patchset based on 5.11 Contained in here are 1. code clean up 2. code refine -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEg/5FJnXYDncx50lsd8HSXRvYnEQFAmA3TskACgkQd8HSXRvY nETHig/6Aqd/PRc7I7rNFRM77R2xGJFtN+f+uU9UGyLRIo9JXTn+oP4IpGVsQ3ab zNgkaqPsaaDdRKppFM39KOrN8LfNdnsD2GMDbEUHp5gnCwkoBhzEIfnYVqkZARvb qtoSVgVbXrL+tJMXl5QO+BdIw3pTbqbfh06b6MAeusZgWLQP3HS/TUL9sRco6Qmq VTOz/469e6KyrcVQe67Yq+uMkSHpnyASEnjaPYPfFnGZh6EsaoydVEgHk6Pu0R2X NV/cw8MKdDV62CKHTjUzGHnpOegoWXP8E4sVkUGb+uWdBkCKlOrKNHaCMcZ4ZmLE CtoFBakUWDhtkTF+sG0bPj5sS6Bnxdm7N0MeOiA1lDiwRUY+q9jtfqCTRfDfP+30 ez+7Rb8DKBGZzewrrcKc6+cmQK5iDhee+4lHMSn0yPc0eQrWeDH3351g/TujpokA roT7vfXl5t0ZVXmEOiuWZq8YYBaUQVju/YhOEk0pru8GDQYUARLv8frRH2nsDELx E/9RfVwdS5TRTXf8qjn9Jrg+aUV8PppoH5jS3b38v6BQPlrjy5im8Tnq2HMKIxzl nLQkG4KxTbbZaOTsjlijaJcyynZFwfJ0YHCc9teBuYn4AD46Ew7lC8Xuahe2o5C4 cuPn8AKmLm0waZzAD1QUkbYcfZ5N4ox4ynV6ET0zW02/7diCUZo= =eb3f -----END PGP SIGNATURE----- Merge tag 'nds32-for-linux-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux Pull nds32 updates from Greentime Hu: "Code clean-up and refinement" * tag 'nds32-for-linux-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: nds32: Fix bogus reference to <asm/procinfo.h> nds32: use get_kernel_nofault in dump_mem nds32: remove dump_instr nds32: configs: Cleanup CONFIG_CROSS_COMPILE nds32: Replace <linux/clk-provider.h> by <linux/of_clk.h>
This commit is contained in:
commit
6c15f9e805
@ -1,4 +1,3 @@
|
||||
CONFIG_CROSS_COMPILE="nds32le-linux-"
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
|
@ -52,7 +52,7 @@ EXPORT_SYMBOL(elf_hwcap);
|
||||
|
||||
/*
|
||||
* The following string table, must sync with HWCAP_xx bitmask,
|
||||
* which is defined in <asm/procinfo.h>
|
||||
* which is defined above
|
||||
*/
|
||||
static const char *hwcap_str[] = {
|
||||
"mfusr_pc",
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Copyright (C) 2005-2017 Andes Technology Corporation
|
||||
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of_clk.h>
|
||||
|
||||
void __init time_init(void)
|
||||
{
|
||||
|
@ -25,17 +25,8 @@ extern void show_pte(struct mm_struct *mm, unsigned long addr);
|
||||
void dump_mem(const char *lvl, unsigned long bottom, unsigned long top)
|
||||
{
|
||||
unsigned long first;
|
||||
mm_segment_t fs;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* We need to switch to kernel mode so that we can use __get_user
|
||||
* to safely read from kernel space. Note that we now dump the
|
||||
* code first, just in case the backtrace kills us.
|
||||
*/
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
pr_emerg("%s(0x%08lx to 0x%08lx)\n", lvl, bottom, top);
|
||||
|
||||
for (first = bottom & ~31; first < top; first += 32) {
|
||||
@ -48,7 +39,9 @@ void dump_mem(const char *lvl, unsigned long bottom, unsigned long top)
|
||||
for (p = first, i = 0; i < 8 && p < top; i++, p += 4) {
|
||||
if (p >= bottom && p < top) {
|
||||
unsigned long val;
|
||||
if (__get_user(val, (unsigned long *)p) == 0)
|
||||
|
||||
if (get_kernel_nofault(val,
|
||||
(unsigned long *)p) == 0)
|
||||
sprintf(str + i * 9, " %08lx", val);
|
||||
else
|
||||
sprintf(str + i * 9, " ????????");
|
||||
@ -56,46 +49,10 @@ void dump_mem(const char *lvl, unsigned long bottom, unsigned long top)
|
||||
}
|
||||
pr_emerg("%s%04lx:%s\n", lvl, first & 0xffff, str);
|
||||
}
|
||||
|
||||
set_fs(fs);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(dump_mem);
|
||||
|
||||
static void dump_instr(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long addr = instruction_pointer(regs);
|
||||
mm_segment_t fs;
|
||||
char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str;
|
||||
int i;
|
||||
|
||||
return;
|
||||
/*
|
||||
* We need to switch to kernel mode so that we can use __get_user
|
||||
* to safely read from kernel space. Note that we now dump the
|
||||
* code first, just in case the backtrace kills us.
|
||||
*/
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
pr_emerg("Code: ");
|
||||
for (i = -4; i < 1; i++) {
|
||||
unsigned int val, bad;
|
||||
|
||||
bad = __get_user(val, &((u32 *) addr)[i]);
|
||||
|
||||
if (!bad) {
|
||||
p += sprintf(p, i == 0 ? "(%08x) " : "%08x ", val);
|
||||
} else {
|
||||
p += sprintf(p, "bad PC value");
|
||||
break;
|
||||
}
|
||||
}
|
||||
pr_emerg("Code: %s\n", str);
|
||||
|
||||
set_fs(fs);
|
||||
}
|
||||
|
||||
#define LOOP_TIMES (100)
|
||||
static void __dump(struct task_struct *tsk, unsigned long *base_reg,
|
||||
const char *loglvl)
|
||||
@ -179,7 +136,6 @@ void die(const char *str, struct pt_regs *regs, int err)
|
||||
|
||||
if (!user_mode(regs) || in_interrupt()) {
|
||||
dump_mem("Stack: ", regs->sp, (regs->sp + PAGE_SIZE) & PAGE_MASK);
|
||||
dump_instr(regs);
|
||||
dump_stack();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user