Skip to content

Commit 356948f

Browse files
committed
Merge branch '3.11-fixes' into mips-for-linux-next
2 parents 4d85419 + c2882b7 commit 356948f

File tree

5 files changed

+61
-56
lines changed

5 files changed

+61
-56
lines changed

arch/mips/dec/time.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,13 @@ int rtc_mips_set_mmss(unsigned long nowtime)
126126
void __init plat_time_init(void)
127127
{
128128
u32 start, end;
129-
int i = HZ / 10;
129+
int i = HZ / 8;
130130

131131
/* Set up the rate of periodic DS1287 interrupts. */
132132
ds1287_set_base_clock(HZ);
133133

134134
if (cpu_has_counter) {
135+
ds1287_timer_state();
135136
while (!ds1287_timer_state())
136137
;
137138

@@ -143,7 +144,7 @@ void __init plat_time_init(void)
143144

144145
end = read_c0_count();
145146

146-
mips_hpt_frequency = (end - start) * 10;
147+
mips_hpt_frequency = (end - start) * 8;
147148
printk(KERN_INFO "MIPS counter frequency %dHz\n",
148149
mips_hpt_frequency);
149150
} else if (IOASIC)

arch/mips/kernel/csrc-ioasic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ void __init dec_ioasic_clocksource_init(void)
4141
{
4242
unsigned int freq;
4343
u32 start, end;
44-
int i = HZ / 10;
45-
44+
int i = HZ / 8;
4645

46+
ds1287_timer_state();
4747
while (!ds1287_timer_state())
4848
;
4949

@@ -55,7 +55,7 @@ void __init dec_ioasic_clocksource_init(void)
5555

5656
end = dec_ioasic_hpt_read(&clocksource_dec);
5757

58-
freq = (end - start) * 10;
58+
freq = (end - start) * 8;
5959
printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq);
6060

6161
clocksource_dec.rating = 200 + freq / 10000000;

arch/mips/kernel/relocate_kernel.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ process_entry:
2626
PTR_L s2, (s0)
2727
PTR_ADD s0, s0, SZREG
2828

29+
/*
30+
* In case of a kdump/crash kernel, the indirection page is not
31+
* populated as the kernel is directly copied to a reserved location
32+
*/
33+
beqz s2, done
34+
2935
/* destination page */
3036
and s3, s2, 0x1
3137
beq s3, zero, 1f

arch/mips/kernel/setup.c

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,52 @@ static void __init arch_mem_addpart(phys_t mem, phys_t end, int type)
552552
add_memory_region(mem, size, type);
553553
}
554554

555+
#ifdef CONFIG_KEXEC
556+
static inline unsigned long long get_total_mem(void)
557+
{
558+
unsigned long long total;
559+
560+
total = max_pfn - min_low_pfn;
561+
return total << PAGE_SHIFT;
562+
}
563+
564+
static void __init mips_parse_crashkernel(void)
565+
{
566+
unsigned long long total_mem;
567+
unsigned long long crash_size, crash_base;
568+
int ret;
569+
570+
total_mem = get_total_mem();
571+
ret = parse_crashkernel(boot_command_line, total_mem,
572+
&crash_size, &crash_base);
573+
if (ret != 0 || crash_size <= 0)
574+
return;
575+
576+
crashk_res.start = crash_base;
577+
crashk_res.end = crash_base + crash_size - 1;
578+
}
579+
580+
static void __init request_crashkernel(struct resource *res)
581+
{
582+
int ret;
583+
584+
ret = request_resource(res, &crashk_res);
585+
if (!ret)
586+
pr_info("Reserving %ldMB of memory at %ldMB for crashkernel\n",
587+
(unsigned long)((crashk_res.end -
588+
crashk_res.start + 1) >> 20),
589+
(unsigned long)(crashk_res.start >> 20));
590+
}
591+
#else /* !defined(CONFIG_KEXEC) */
592+
static void __init mips_parse_crashkernel(void)
593+
{
594+
}
595+
596+
static void __init request_crashkernel(struct resource *res)
597+
{
598+
}
599+
#endif /* !defined(CONFIG_KEXEC) */
600+
555601
static void __init arch_mem_init(char **cmdline_p)
556602
{
557603
extern void plat_mem_setup(void);
@@ -608,6 +654,8 @@ static void __init arch_mem_init(char **cmdline_p)
608654
BOOTMEM_DEFAULT);
609655
}
610656
#endif
657+
658+
mips_parse_crashkernel();
611659
#ifdef CONFIG_KEXEC
612660
if (crashk_res.start != crashk_res.end)
613661
reserve_bootmem(crashk_res.start,
@@ -620,52 +668,6 @@ static void __init arch_mem_init(char **cmdline_p)
620668
paging_init();
621669
}
622670

623-
#ifdef CONFIG_KEXEC
624-
static inline unsigned long long get_total_mem(void)
625-
{
626-
unsigned long long total;
627-
628-
total = max_pfn - min_low_pfn;
629-
return total << PAGE_SHIFT;
630-
}
631-
632-
static void __init mips_parse_crashkernel(void)
633-
{
634-
unsigned long long total_mem;
635-
unsigned long long crash_size, crash_base;
636-
int ret;
637-
638-
total_mem = get_total_mem();
639-
ret = parse_crashkernel(boot_command_line, total_mem,
640-
&crash_size, &crash_base);
641-
if (ret != 0 || crash_size <= 0)
642-
return;
643-
644-
crashk_res.start = crash_base;
645-
crashk_res.end = crash_base + crash_size - 1;
646-
}
647-
648-
static void __init request_crashkernel(struct resource *res)
649-
{
650-
int ret;
651-
652-
ret = request_resource(res, &crashk_res);
653-
if (!ret)
654-
pr_info("Reserving %ldMB of memory at %ldMB for crashkernel\n",
655-
(unsigned long)((crashk_res.end -
656-
crashk_res.start + 1) >> 20),
657-
(unsigned long)(crashk_res.start >> 20));
658-
}
659-
#else /* !defined(CONFIG_KEXEC) */
660-
static void __init mips_parse_crashkernel(void)
661-
{
662-
}
663-
664-
static void __init request_crashkernel(struct resource *res)
665-
{
666-
}
667-
#endif /* !defined(CONFIG_KEXEC) */
668-
669671
static void __init resource_init(void)
670672
{
671673
int i;
@@ -678,11 +680,6 @@ static void __init resource_init(void)
678680
data_resource.start = __pa_symbol(&_etext);
679681
data_resource.end = __pa_symbol(&_edata) - 1;
680682

681-
/*
682-
* Request address space for all standard RAM.
683-
*/
684-
mips_parse_crashkernel();
685-
686683
for (i = 0; i < boot_mem_map.nr_map; i++) {
687684
struct resource *res;
688685
unsigned long start, end;

arch/mips/mm/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ void copy_from_user_page(struct vm_area_struct *vma,
254254
SetPageDcacheDirty(page);
255255
}
256256
}
257+
EXPORT_SYMBOL_GPL(copy_from_user_page);
257258

258259
void __init fixrange_init(unsigned long start, unsigned long end,
259260
pgd_t *pgd_base)

0 commit comments

Comments
 (0)