* [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca @ 2021-05-03 16:46 Christophe Leroy 2021-05-03 16:46 ` [PATCH 2/2] powerpc/paca: Remove mm_ctx_id and mm_ctx_slb_addr_limit Christophe Leroy 2021-05-04 10:14 ` [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca Nicholas Piggin 0 siblings, 2 replies; 6+ messages in thread From: Christophe Leroy @ 2021-05-03 16:46 UTC (permalink / raw) To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin Cc: linuxppc-dev, linux-kernel PACA_SIZE, PACACONTEXTID, PACALOWSLICESPSIZE, PACAHIGHSLICEPSIZE, PACA_SLB_ADDR_LIMIT, MMUPSIZEDEFSIZE, PACASLBCACHE, PACASLBCACHEPTR, PACASTABRR, PACAVMALLOCSLLP, MMUPSIZESLLP, PACACONTEXTSLLP, PACALPPACAPTR, LPPACA_DTLIDX and PACA_DTL_RIDX are not used anymore by ASM code. Remove them. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- arch/powerpc/kernel/asm-offsets.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 28af4efb4587..419ab4a89114 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -197,7 +197,6 @@ int main(void) OFFSET(ICACHEL1LOGBLOCKSIZE, ppc64_caches, l1i.log_block_size); OFFSET(ICACHEL1BLOCKSPERPAGE, ppc64_caches, l1i.blocks_per_page); /* paca */ - DEFINE(PACA_SIZE, sizeof(struct paca_struct)); OFFSET(PACAPACAINDEX, paca_struct, paca_index); OFFSET(PACAPROCSTART, paca_struct, cpu_start); OFFSET(PACAKSAVE, paca_struct, kstack); @@ -212,15 +211,6 @@ int main(void) OFFSET(PACAIRQSOFTMASK, paca_struct, irq_soft_mask); OFFSET(PACAIRQHAPPENED, paca_struct, irq_happened); OFFSET(PACA_FTRACE_ENABLED, paca_struct, ftrace_enabled); -#ifdef CONFIG_PPC_BOOK3S - OFFSET(PACACONTEXTID, paca_struct, mm_ctx_id); -#ifdef CONFIG_PPC_MM_SLICES - OFFSET(PACALOWSLICESPSIZE, paca_struct, mm_ctx_low_slices_psize); - OFFSET(PACAHIGHSLICEPSIZE, paca_struct, mm_ctx_high_slices_psize); - OFFSET(PACA_SLB_ADDR_LIMIT, paca_struct, mm_ctx_slb_addr_limit); - DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def)); -#endif /* CONFIG_PPC_MM_SLICES */ -#endif #ifdef CONFIG_PPC_BOOK3E OFFSET(PACAPGD, paca_struct, pgd); @@ -241,21 +231,9 @@ int main(void) #endif /* CONFIG_PPC_BOOK3E */ #ifdef CONFIG_PPC_BOOK3S_64 - OFFSET(PACASLBCACHE, paca_struct, slb_cache); - OFFSET(PACASLBCACHEPTR, paca_struct, slb_cache_ptr); - OFFSET(PACASTABRR, paca_struct, stab_rr); - OFFSET(PACAVMALLOCSLLP, paca_struct, vmalloc_sllp); -#ifdef CONFIG_PPC_MM_SLICES - OFFSET(MMUPSIZESLLP, mmu_psize_def, sllp); -#else - OFFSET(PACACONTEXTSLLP, paca_struct, mm_ctx_sllp); -#endif /* CONFIG_PPC_MM_SLICES */ OFFSET(PACA_EXGEN, paca_struct, exgen); OFFSET(PACA_EXMC, paca_struct, exmc); OFFSET(PACA_EXNMI, paca_struct, exnmi); -#ifdef CONFIG_PPC_PSERIES - OFFSET(PACALPPACAPTR, paca_struct, lppaca_ptr); -#endif OFFSET(PACA_SLBSHADOWPTR, paca_struct, slb_shadow_ptr); OFFSET(SLBSHADOW_STACKVSID, slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid); OFFSET(SLBSHADOW_STACKESID, slb_shadow, save_area[SLB_NUM_BOLTED - 1].esid); @@ -264,9 +242,7 @@ int main(void) #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE OFFSET(PACA_PMCINUSE, paca_struct, pmcregs_in_use); #endif - OFFSET(LPPACA_DTLIDX, lppaca, dtl_idx); OFFSET(LPPACA_YIELDCOUNT, lppaca, yield_count); - OFFSET(PACA_DTL_RIDX, paca_struct, dtl_ridx); #endif /* CONFIG_PPC_BOOK3S_64 */ OFFSET(PACAEMERGSP, paca_struct, emergency_sp); #ifdef CONFIG_PPC_BOOK3S_64 -- 2.25.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] powerpc/paca: Remove mm_ctx_id and mm_ctx_slb_addr_limit 2021-05-03 16:46 [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca Christophe Leroy @ 2021-05-03 16:46 ` Christophe Leroy 2021-05-04 10:14 ` Nicholas Piggin 2021-05-04 10:14 ` [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca Nicholas Piggin 1 sibling, 1 reply; 6+ messages in thread From: Christophe Leroy @ 2021-05-03 16:46 UTC (permalink / raw) To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin Cc: linuxppc-dev, linux-kernel mm_ctx_id and mm_ctx_slb_addr_limit are not used anymore. Remove them. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- arch/powerpc/include/asm/paca.h | 2 -- arch/powerpc/kernel/paca.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index ec18ac818e3a..ecc8d792a431 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h @@ -149,11 +149,9 @@ struct paca_struct { #endif /* CONFIG_PPC_BOOK3E */ #ifdef CONFIG_PPC_BOOK3S - mm_context_id_t mm_ctx_id; #ifdef CONFIG_PPC_MM_SLICES unsigned char mm_ctx_low_slices_psize[BITS_PER_LONG / BITS_PER_BYTE]; unsigned char mm_ctx_high_slices_psize[SLICE_ARRAY_SIZE]; - unsigned long mm_ctx_slb_addr_limit; #else u16 mm_ctx_user_psize; u16 mm_ctx_sllp; diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 7f5aae3c387d..9bd30cac852b 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c @@ -346,10 +346,8 @@ void copy_mm_to_paca(struct mm_struct *mm) #ifdef CONFIG_PPC_BOOK3S mm_context_t *context = &mm->context; - get_paca()->mm_ctx_id = context->id; #ifdef CONFIG_PPC_MM_SLICES VM_BUG_ON(!mm_ctx_slb_addr_limit(context)); - get_paca()->mm_ctx_slb_addr_limit = mm_ctx_slb_addr_limit(context); memcpy(&get_paca()->mm_ctx_low_slices_psize, mm_ctx_low_slices(context), LOW_SLICE_ARRAY_SZ); memcpy(&get_paca()->mm_ctx_high_slices_psize, mm_ctx_high_slices(context), -- 2.25.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] powerpc/paca: Remove mm_ctx_id and mm_ctx_slb_addr_limit 2021-05-03 16:46 ` [PATCH 2/2] powerpc/paca: Remove mm_ctx_id and mm_ctx_slb_addr_limit Christophe Leroy @ 2021-05-04 10:14 ` Nicholas Piggin 0 siblings, 0 replies; 6+ messages in thread From: Nicholas Piggin @ 2021-05-04 10:14 UTC (permalink / raw) To: Benjamin Herrenschmidt, Christophe Leroy, Michael Ellerman, Paul Mackerras Cc: linuxppc-dev, linux-kernel Excerpts from Christophe Leroy's message of May 4, 2021 2:46 am: > mm_ctx_id and mm_ctx_slb_addr_limit are not used anymore. > > Remove them. > > Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> > --- > arch/powerpc/include/asm/paca.h | 2 -- > arch/powerpc/kernel/paca.c | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h > index ec18ac818e3a..ecc8d792a431 100644 > --- a/arch/powerpc/include/asm/paca.h > +++ b/arch/powerpc/include/asm/paca.h > @@ -149,11 +149,9 @@ struct paca_struct { > #endif /* CONFIG_PPC_BOOK3E */ > > #ifdef CONFIG_PPC_BOOK3S > - mm_context_id_t mm_ctx_id; > #ifdef CONFIG_PPC_MM_SLICES > unsigned char mm_ctx_low_slices_psize[BITS_PER_LONG / BITS_PER_BYTE]; > unsigned char mm_ctx_high_slices_psize[SLICE_ARRAY_SIZE]; > - unsigned long mm_ctx_slb_addr_limit; > #else > u16 mm_ctx_user_psize; > u16 mm_ctx_sllp; > diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c > index 7f5aae3c387d..9bd30cac852b 100644 > --- a/arch/powerpc/kernel/paca.c > +++ b/arch/powerpc/kernel/paca.c > @@ -346,10 +346,8 @@ void copy_mm_to_paca(struct mm_struct *mm) > #ifdef CONFIG_PPC_BOOK3S > mm_context_t *context = &mm->context; > > - get_paca()->mm_ctx_id = context->id; > #ifdef CONFIG_PPC_MM_SLICES > VM_BUG_ON(!mm_ctx_slb_addr_limit(context)); > - get_paca()->mm_ctx_slb_addr_limit = mm_ctx_slb_addr_limit(context); > memcpy(&get_paca()->mm_ctx_low_slices_psize, mm_ctx_low_slices(context), > LOW_SLICE_ARRAY_SZ); > memcpy(&get_paca()->mm_ctx_high_slices_psize, mm_ctx_high_slices(context), > -- > 2.25.0 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca 2021-05-03 16:46 [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca Christophe Leroy 2021-05-03 16:46 ` [PATCH 2/2] powerpc/paca: Remove mm_ctx_id and mm_ctx_slb_addr_limit Christophe Leroy @ 2021-05-04 10:14 ` Nicholas Piggin 2021-05-04 10:40 ` Christophe Leroy 1 sibling, 1 reply; 6+ messages in thread From: Nicholas Piggin @ 2021-05-04 10:14 UTC (permalink / raw) To: Benjamin Herrenschmidt, Christophe Leroy, Michael Ellerman, Paul Mackerras Cc: linuxppc-dev, linux-kernel Excerpts from Christophe Leroy's message of May 4, 2021 2:46 am: > PACA_SIZE, PACACONTEXTID, PACALOWSLICESPSIZE, PACAHIGHSLICEPSIZE, > PACA_SLB_ADDR_LIMIT, MMUPSIZEDEFSIZE, PACASLBCACHE, PACASLBCACHEPTR, > PACASTABRR, PACAVMALLOCSLLP, MMUPSIZESLLP, PACACONTEXTSLLP, > PACALPPACAPTR, LPPACA_DTLIDX and PACA_DTL_RIDX are not used anymore > by ASM code. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Also I think SIGSEGV, NMI_MASK, THREAD_DBCR0, KUAP?, TI_FLAGS, TI_PREEMPT, [ID]CACHEL1*, STACK_REGS_KUAP, EXC_LVL_SIZE, KVM_NEED_FLUSH, KVM_FWNMI, VCPU_DEC, VCPU_SPMC, HSTATE_XICS_PHYS, HSTATE_SAVED_XIRR, PPC_DBELL_MSGTYPE I think. While we're cleaning it up. > > Remove them. > > Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> > --- > arch/powerpc/kernel/asm-offsets.c | 24 ------------------------ > 1 file changed, 24 deletions(-) > > diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c > index 28af4efb4587..419ab4a89114 100644 > --- a/arch/powerpc/kernel/asm-offsets.c > +++ b/arch/powerpc/kernel/asm-offsets.c > @@ -197,7 +197,6 @@ int main(void) > OFFSET(ICACHEL1LOGBLOCKSIZE, ppc64_caches, l1i.log_block_size); > OFFSET(ICACHEL1BLOCKSPERPAGE, ppc64_caches, l1i.blocks_per_page); > /* paca */ > - DEFINE(PACA_SIZE, sizeof(struct paca_struct)); > OFFSET(PACAPACAINDEX, paca_struct, paca_index); > OFFSET(PACAPROCSTART, paca_struct, cpu_start); > OFFSET(PACAKSAVE, paca_struct, kstack); > @@ -212,15 +211,6 @@ int main(void) > OFFSET(PACAIRQSOFTMASK, paca_struct, irq_soft_mask); > OFFSET(PACAIRQHAPPENED, paca_struct, irq_happened); > OFFSET(PACA_FTRACE_ENABLED, paca_struct, ftrace_enabled); > -#ifdef CONFIG_PPC_BOOK3S > - OFFSET(PACACONTEXTID, paca_struct, mm_ctx_id); > -#ifdef CONFIG_PPC_MM_SLICES > - OFFSET(PACALOWSLICESPSIZE, paca_struct, mm_ctx_low_slices_psize); > - OFFSET(PACAHIGHSLICEPSIZE, paca_struct, mm_ctx_high_slices_psize); > - OFFSET(PACA_SLB_ADDR_LIMIT, paca_struct, mm_ctx_slb_addr_limit); > - DEFINE(MMUPSIZEDEFSIZE, sizeof(struct mmu_psize_def)); > -#endif /* CONFIG_PPC_MM_SLICES */ > -#endif > > #ifdef CONFIG_PPC_BOOK3E > OFFSET(PACAPGD, paca_struct, pgd); > @@ -241,21 +231,9 @@ int main(void) > #endif /* CONFIG_PPC_BOOK3E */ > > #ifdef CONFIG_PPC_BOOK3S_64 > - OFFSET(PACASLBCACHE, paca_struct, slb_cache); > - OFFSET(PACASLBCACHEPTR, paca_struct, slb_cache_ptr); > - OFFSET(PACASTABRR, paca_struct, stab_rr); > - OFFSET(PACAVMALLOCSLLP, paca_struct, vmalloc_sllp); > -#ifdef CONFIG_PPC_MM_SLICES > - OFFSET(MMUPSIZESLLP, mmu_psize_def, sllp); > -#else > - OFFSET(PACACONTEXTSLLP, paca_struct, mm_ctx_sllp); > -#endif /* CONFIG_PPC_MM_SLICES */ > OFFSET(PACA_EXGEN, paca_struct, exgen); > OFFSET(PACA_EXMC, paca_struct, exmc); > OFFSET(PACA_EXNMI, paca_struct, exnmi); > -#ifdef CONFIG_PPC_PSERIES > - OFFSET(PACALPPACAPTR, paca_struct, lppaca_ptr); > -#endif > OFFSET(PACA_SLBSHADOWPTR, paca_struct, slb_shadow_ptr); > OFFSET(SLBSHADOW_STACKVSID, slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid); > OFFSET(SLBSHADOW_STACKESID, slb_shadow, save_area[SLB_NUM_BOLTED - 1].esid); > @@ -264,9 +242,7 @@ int main(void) > #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE > OFFSET(PACA_PMCINUSE, paca_struct, pmcregs_in_use); > #endif > - OFFSET(LPPACA_DTLIDX, lppaca, dtl_idx); > OFFSET(LPPACA_YIELDCOUNT, lppaca, yield_count); > - OFFSET(PACA_DTL_RIDX, paca_struct, dtl_ridx); > #endif /* CONFIG_PPC_BOOK3S_64 */ > OFFSET(PACAEMERGSP, paca_struct, emergency_sp); > #ifdef CONFIG_PPC_BOOK3S_64 > -- > 2.25.0 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca 2021-05-04 10:14 ` [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca Nicholas Piggin @ 2021-05-04 10:40 ` Christophe Leroy 2021-05-05 4:49 ` Christophe Leroy 0 siblings, 1 reply; 6+ messages in thread From: Christophe Leroy @ 2021-05-04 10:40 UTC (permalink / raw) To: Nicholas Piggin, Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras Cc: linuxppc-dev, linux-kernel Le 04/05/2021 à 12:14, Nicholas Piggin a écrit : > Excerpts from Christophe Leroy's message of May 4, 2021 2:46 am: >> PACA_SIZE, PACACONTEXTID, PACALOWSLICESPSIZE, PACAHIGHSLICEPSIZE, >> PACA_SLB_ADDR_LIMIT, MMUPSIZEDEFSIZE, PACASLBCACHE, PACASLBCACHEPTR, >> PACASTABRR, PACAVMALLOCSLLP, MMUPSIZESLLP, PACACONTEXTSLLP, >> PACALPPACAPTR, LPPACA_DTLIDX and PACA_DTL_RIDX are not used anymore >> by ASM code. > > Reviewed-by: Nicholas Piggin <npiggin@gmail.com> > > Also I think SIGSEGV, NMI_MASK, THREAD_DBCR0, KUAP?, TI_FLAGS, > TI_PREEMPT, [ID]CACHEL1*, STACK_REGS_KUAP, EXC_LVL_SIZE, KVM_NEED_FLUSH, > KVM_FWNMI, VCPU_DEC, VCPU_SPMC, HSTATE_XICS_PHYS, HSTATE_SAVED_XIRR, > PPC_DBELL_MSGTYPE I think. While we're cleaning it up. Yes, thanks for checking. I think we can safely remove KUAP. But we can't remove EXC_LVL_SIZE, it is used in kernel/head_booke.h which is probably included in head_44x.S and head_fsl_booke.S Christophe ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca 2021-05-04 10:40 ` Christophe Leroy @ 2021-05-05 4:49 ` Christophe Leroy 0 siblings, 0 replies; 6+ messages in thread From: Christophe Leroy @ 2021-05-05 4:49 UTC (permalink / raw) To: Nicholas Piggin, Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras Cc: linuxppc-dev, linux-kernel Le 04/05/2021 à 12:40, Christophe Leroy a écrit : > > > Le 04/05/2021 à 12:14, Nicholas Piggin a écrit : >> Excerpts from Christophe Leroy's message of May 4, 2021 2:46 am: >>> PACA_SIZE, PACACONTEXTID, PACALOWSLICESPSIZE, PACAHIGHSLICEPSIZE, >>> PACA_SLB_ADDR_LIMIT, MMUPSIZEDEFSIZE, PACASLBCACHE, PACASLBCACHEPTR, >>> PACASTABRR, PACAVMALLOCSLLP, MMUPSIZESLLP, PACACONTEXTSLLP, >>> PACALPPACAPTR, LPPACA_DTLIDX and PACA_DTL_RIDX are not used anymore >>> by ASM code. >> >> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> >> >> Also I think SIGSEGV, NMI_MASK, THREAD_DBCR0, KUAP?, TI_FLAGS, >> TI_PREEMPT, [ID]CACHEL1*, STACK_REGS_KUAP, EXC_LVL_SIZE, KVM_NEED_FLUSH, >> KVM_FWNMI, VCPU_DEC, VCPU_SPMC, HSTATE_XICS_PHYS, HSTATE_SAVED_XIRR, >> PPC_DBELL_MSGTYPE I think. While we're cleaning it up. > > Yes, thanks for checking. > > I think we can safely remove KUAP. > > But we can't remove EXC_LVL_SIZE, it is used in kernel/head_booke.h which is probably included in > head_44x.S and head_fsl_booke.S DCACHEL1*BLOCKSIZE are also still used. Christophe > > Christophe ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-05 4:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-05-03 16:46 [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca Christophe Leroy 2021-05-03 16:46 ` [PATCH 2/2] powerpc/paca: Remove mm_ctx_id and mm_ctx_slb_addr_limit Christophe Leroy 2021-05-04 10:14 ` Nicholas Piggin 2021-05-04 10:14 ` [PATCH 1/2] powerpc/asm-offset: Remove unused items related to paca Nicholas Piggin 2021-05-04 10:40 ` Christophe Leroy 2021-05-05 4:49 ` Christophe Leroy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).