Commit d3e76a1a authored by Michael Ellerman's avatar Michael Ellerman

Merge branch 'fixes' into next

Merge our fixes branch. In particular the radix segment exception
handling fix is necessary to avoid odd crashes.
parents 79a3aaa7 cf7cf697
...@@ -352,7 +352,7 @@ static inline bool strict_kernel_rwx_enabled(void) ...@@ -352,7 +352,7 @@ static inline bool strict_kernel_rwx_enabled(void)
#if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME) && \ #if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME) && \
defined (CONFIG_PPC_64K_PAGES) defined (CONFIG_PPC_64K_PAGES)
#define MAX_PHYSMEM_BITS 51 #define MAX_PHYSMEM_BITS 51
#elif defined(CONFIG_SPARSEMEM) #elif defined(CONFIG_PPC64)
#define MAX_PHYSMEM_BITS 46 #define MAX_PHYSMEM_BITS 46
#endif #endif
......
...@@ -656,11 +656,17 @@ EXC_COMMON_BEGIN(data_access_slb_common) ...@@ -656,11 +656,17 @@ EXC_COMMON_BEGIN(data_access_slb_common)
ld r4,PACA_EXSLB+EX_DAR(r13) ld r4,PACA_EXSLB+EX_DAR(r13)
std r4,_DAR(r1) std r4,_DAR(r1)
addi r3,r1,STACK_FRAME_OVERHEAD addi r3,r1,STACK_FRAME_OVERHEAD
BEGIN_MMU_FTR_SECTION
/* HPT case, do SLB fault */
bl do_slb_fault bl do_slb_fault
cmpdi r3,0 cmpdi r3,0
bne- 1f bne- 1f
b fast_exception_return b fast_exception_return
1: /* Error case */ 1: /* Error case */
MMU_FTR_SECTION_ELSE
/* Radix case, access is outside page table range */
li r3,-EFAULT
ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX)
std r3,RESULT(r1) std r3,RESULT(r1)
bl save_nvgprs bl save_nvgprs
RECONCILE_IRQ_STATE(r10, r11) RECONCILE_IRQ_STATE(r10, r11)
...@@ -705,11 +711,17 @@ EXC_COMMON_BEGIN(instruction_access_slb_common) ...@@ -705,11 +711,17 @@ EXC_COMMON_BEGIN(instruction_access_slb_common)
EXCEPTION_PROLOG_COMMON(0x480, PACA_EXSLB) EXCEPTION_PROLOG_COMMON(0x480, PACA_EXSLB)
ld r4,_NIP(r1) ld r4,_NIP(r1)
addi r3,r1,STACK_FRAME_OVERHEAD addi r3,r1,STACK_FRAME_OVERHEAD
BEGIN_MMU_FTR_SECTION
/* HPT case, do SLB fault */
bl do_slb_fault bl do_slb_fault
cmpdi r3,0 cmpdi r3,0
bne- 1f bne- 1f
b fast_exception_return b fast_exception_return
1: /* Error case */ 1: /* Error case */
MMU_FTR_SECTION_ELSE
/* Radix case, access is outside page table range */
li r3,-EFAULT
ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX)
std r3,RESULT(r1) std r3,RESULT(r1)
bl save_nvgprs bl save_nvgprs
RECONCILE_IRQ_STATE(r10, r11) RECONCILE_IRQ_STATE(r10, r11)
......
...@@ -851,10 +851,6 @@ __secondary_start: ...@@ -851,10 +851,6 @@ __secondary_start:
tophys(r4,r2) tophys(r4,r2)
addi r4,r4,THREAD /* phys address of our thread_struct */ addi r4,r4,THREAD /* phys address of our thread_struct */
mtspr SPRN_SPRG_THREAD,r4 mtspr SPRN_SPRG_THREAD,r4
#ifdef CONFIG_PPC_RTAS
li r3,0
stw r3, RTAS_SP(r4) /* 0 => not in RTAS */
#endif
lis r4, (swapper_pg_dir - PAGE_OFFSET)@h lis r4, (swapper_pg_dir - PAGE_OFFSET)@h
ori r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l ori r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
mtspr SPRN_SPRG_PGDIR, r4 mtspr SPRN_SPRG_PGDIR, r4
...@@ -941,10 +937,6 @@ start_here: ...@@ -941,10 +937,6 @@ start_here:
tophys(r4,r2) tophys(r4,r2)
addi r4,r4,THREAD /* init task's THREAD */ addi r4,r4,THREAD /* init task's THREAD */
mtspr SPRN_SPRG_THREAD,r4 mtspr SPRN_SPRG_THREAD,r4
#ifdef CONFIG_PPC_RTAS
li r3,0
stw r3, RTAS_SP(r4) /* 0 => not in RTAS */
#endif
lis r4, (swapper_pg_dir - PAGE_OFFSET)@h lis r4, (swapper_pg_dir - PAGE_OFFSET)@h
ori r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l ori r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l
mtspr SPRN_SPRG_PGDIR, r4 mtspr SPRN_SPRG_PGDIR, r4
......
...@@ -98,7 +98,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) ...@@ -98,7 +98,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
* can be used, r7 contains NSEC_PER_SEC. * can be used, r7 contains NSEC_PER_SEC.
*/ */
lwz r5,WTOM_CLOCK_SEC(r9) lwz r5,(WTOM_CLOCK_SEC+LOPART)(r9)
lwz r6,WTOM_CLOCK_NSEC(r9) lwz r6,WTOM_CLOCK_NSEC(r9)
/* We now have our offset in r5,r6. We create a fake dependency /* We now have our offset in r5,r6. We create a fake dependency
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment