Merge branches 'x86-asm-for-linus', 'x86-cleanups-for-linus', 'x86-cpu-for-linus', 'x86-debug-for-linus' and 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull initial trivial x86 stuff from Ingo Molnar. Various random cleanups and trivial fixes. * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86-64: Eliminate dead ia32 syscall handlers * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage x86: Don't continue booting if we can't load the specified initrd x86: kernel/dumpstack.c simple_strtoul cleanup x86: kernel/check.c simple_strtoul cleanup debug: Add CONFIG_READABLE_ASM x86: spinlock.h: Remove REG_PTR_MODE * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cache_info: Fix setup of l2/l3 ids * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Avoid double stack traces with show_regs() * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, microcode: microcode_core.c simple_strtoul cleanup
This commit is contained in:
@@ -27,21 +27,29 @@ static int num_scan_areas;
|
||||
|
||||
static __init int set_corruption_check(char *arg)
|
||||
{
|
||||
char *end;
|
||||
ssize_t ret;
|
||||
unsigned long val;
|
||||
|
||||
memory_corruption_check = simple_strtol(arg, &end, 10);
|
||||
ret = kstrtoul(arg, 10, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return (*end == 0) ? 0 : -EINVAL;
|
||||
memory_corruption_check = val;
|
||||
return 0;
|
||||
}
|
||||
early_param("memory_corruption_check", set_corruption_check);
|
||||
|
||||
static __init int set_corruption_check_period(char *arg)
|
||||
{
|
||||
char *end;
|
||||
ssize_t ret;
|
||||
unsigned long val;
|
||||
|
||||
corruption_check_period = simple_strtoul(arg, &end, 10);
|
||||
ret = kstrtoul(arg, 10, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return (*end == 0) ? 0 : -EINVAL;
|
||||
corruption_check_period = val;
|
||||
return 0;
|
||||
}
|
||||
early_param("memory_corruption_check_period", set_corruption_check_period);
|
||||
|
||||
|
@@ -615,14 +615,14 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c)
|
||||
new_l2 = this_leaf.size/1024;
|
||||
num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing;
|
||||
index_msb = get_count_order(num_threads_sharing);
|
||||
l2_id = c->apicid >> index_msb;
|
||||
l2_id = c->apicid & ~((1 << index_msb) - 1);
|
||||
break;
|
||||
case 3:
|
||||
new_l3 = this_leaf.size/1024;
|
||||
num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing;
|
||||
index_msb = get_count_order(
|
||||
num_threads_sharing);
|
||||
l3_id = c->apicid >> index_msb;
|
||||
l3_id = c->apicid & ~((1 << index_msb) - 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@@ -271,7 +271,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
|
||||
current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP)
|
||||
return 1;
|
||||
|
||||
show_registers(regs);
|
||||
show_regs(regs);
|
||||
#ifdef CONFIG_X86_32
|
||||
if (user_mode_vm(regs)) {
|
||||
sp = regs->sp;
|
||||
@@ -311,16 +311,33 @@ void die(const char *str, struct pt_regs *regs, long err)
|
||||
|
||||
static int __init kstack_setup(char *s)
|
||||
{
|
||||
ssize_t ret;
|
||||
unsigned long val;
|
||||
|
||||
if (!s)
|
||||
return -EINVAL;
|
||||
kstack_depth_to_print = simple_strtoul(s, NULL, 0);
|
||||
|
||||
ret = kstrtoul(s, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
kstack_depth_to_print = val;
|
||||
return 0;
|
||||
}
|
||||
early_param("kstack", kstack_setup);
|
||||
|
||||
static int __init code_bytes_setup(char *s)
|
||||
{
|
||||
code_bytes = simple_strtoul(s, NULL, 0);
|
||||
ssize_t ret;
|
||||
unsigned long val;
|
||||
|
||||
if (!s)
|
||||
return -EINVAL;
|
||||
|
||||
ret = kstrtoul(s, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
code_bytes = val;
|
||||
if (code_bytes > 8192)
|
||||
code_bytes = 8192;
|
||||
|
||||
|
@@ -82,7 +82,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
|
||||
}
|
||||
|
||||
|
||||
void show_registers(struct pt_regs *regs)
|
||||
void show_regs(struct pt_regs *regs)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@@ -245,7 +245,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
|
||||
show_trace_log_lvl(task, regs, sp, bp, log_lvl);
|
||||
}
|
||||
|
||||
void show_registers(struct pt_regs *regs)
|
||||
void show_regs(struct pt_regs *regs)
|
||||
{
|
||||
int i;
|
||||
unsigned long sp;
|
||||
|
@@ -1037,9 +1037,9 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
|
||||
"current sp %p does not match saved sp %p\n",
|
||||
stack_addr(regs), kcb->jprobe_saved_sp);
|
||||
printk(KERN_ERR "Saved registers for jprobe %p\n", jp);
|
||||
show_registers(saved_regs);
|
||||
show_regs(saved_regs);
|
||||
printk(KERN_ERR "Current registers\n");
|
||||
show_registers(regs);
|
||||
show_regs(regs);
|
||||
BUG();
|
||||
}
|
||||
*regs = kcb->jprobe_saved_regs;
|
||||
|
@@ -299,12 +299,11 @@ static ssize_t reload_store(struct device *dev,
|
||||
{
|
||||
unsigned long val;
|
||||
int cpu = dev->id;
|
||||
int ret = 0;
|
||||
char *end;
|
||||
ssize_t ret = 0;
|
||||
|
||||
val = simple_strtoul(buf, &end, 0);
|
||||
if (end == buf)
|
||||
return -EINVAL;
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (val == 1) {
|
||||
get_online_cpus();
|
||||
|
@@ -209,7 +209,7 @@ io_check_error(unsigned char reason, struct pt_regs *regs)
|
||||
pr_emerg(
|
||||
"NMI: IOCK error (debug interrupt?) for reason %02x on CPU %d.\n",
|
||||
reason, smp_processor_id());
|
||||
show_registers(regs);
|
||||
show_regs(regs);
|
||||
|
||||
if (panic_on_io_nmi)
|
||||
panic("NMI IOCK error: Not continuing");
|
||||
|
@@ -1480,8 +1480,9 @@ cleanup:
|
||||
static int __init calgary_parse_options(char *p)
|
||||
{
|
||||
unsigned int bridge;
|
||||
unsigned long val;
|
||||
size_t len;
|
||||
char* endp;
|
||||
ssize_t ret;
|
||||
|
||||
while (*p) {
|
||||
if (!strncmp(p, "64k", 3))
|
||||
@@ -1512,10 +1513,11 @@ static int __init calgary_parse_options(char *p)
|
||||
++p;
|
||||
if (*p == '\0')
|
||||
break;
|
||||
bridge = simple_strtoul(p, &endp, 0);
|
||||
if (p == endp)
|
||||
ret = kstrtoul(p, 0, &val);
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
bridge = val;
|
||||
if (bridge < MAX_PHB_BUS_NUM) {
|
||||
printk(KERN_INFO "Calgary: disabling "
|
||||
"translation for PHB %#x\n", bridge);
|
||||
|
@@ -113,12 +113,6 @@ void exit_thread(void)
|
||||
}
|
||||
}
|
||||
|
||||
void show_regs(struct pt_regs *regs)
|
||||
{
|
||||
show_registers(regs);
|
||||
show_trace(NULL, regs, (unsigned long *)kernel_stack_pointer(regs), 0);
|
||||
}
|
||||
|
||||
void show_regs_common(void)
|
||||
{
|
||||
const char *vendor, *product, *board;
|
||||
|
@@ -393,10 +393,9 @@ static void __init reserve_initrd(void)
|
||||
initrd_start = 0;
|
||||
|
||||
if (ramdisk_size >= (end_of_lowmem>>1)) {
|
||||
memblock_free(ramdisk_image, ramdisk_end - ramdisk_image);
|
||||
printk(KERN_ERR "initrd too large to handle, "
|
||||
"disabling initrd\n");
|
||||
return;
|
||||
panic("initrd too large to handle, "
|
||||
"disabling initrd (%lld needed, %lld available)\n",
|
||||
ramdisk_size, end_of_lowmem>>1);
|
||||
}
|
||||
|
||||
printk(KERN_INFO "RAMDISK: %08llx - %08llx\n", ramdisk_image,
|
||||
|
Reference in New Issue
Block a user