LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation
From: Naveen N. Rao @ 2021-02-03  9:49 UTC (permalink / raw)
  To: Sandipan Das; +Cc: ravi.bangoria, ananth, jniethe5, paulus, linuxppc-dev, dja
In-Reply-To: <20210203063841.431063-1-sandipan@linux.ibm.com>

On 2021/02/03 12:08PM, Sandipan Das wrote:
> The Power ISA says that the fixed-point load and update
> instructions must neither use R0 for the base address (RA)
> nor have the destination (RT) and the base address (RA) as
> the same register. In these cases, the instruction is
> invalid. This applies to the following instructions.
>   * Load Byte and Zero with Update (lbzu)
>   * Load Byte and Zero with Update Indexed (lbzux)
>   * Load Halfword and Zero with Update (lhzu)
>   * Load Halfword and Zero with Update Indexed (lhzux)
>   * Load Halfword Algebraic with Update (lhau)
>   * Load Halfword Algebraic with Update Indexed (lhaux)
>   * Load Word and Zero with Update (lwzu)
>   * Load Word and Zero with Update Indexed (lwzux)
>   * Load Word Algebraic with Update Indexed (lwaux)
>   * Load Doubleword with Update (ldu)
>   * Load Doubleword with Update Indexed (ldux)
> 
> However, the following behaviour is observed using some
> invalid opcodes where RA = RT.
> 
> An userspace program using an invalid instruction word like
> 0xe9ce0001, i.e. "ldu r14, 0(r14)", runs and exits without
> getting terminated abruptly. The instruction performs the
> load operation but does not write the effective address to
> the base address register. 

While the processor (p8 in my test) doesn't seem to be throwing an 
exception, I don't think it is necessarily loading the value. Qemu 
throws an exception though. It's probably best to term the behavior as 
being undefined.

> Attaching an uprobe at that
> instruction's address results in emulation which writes the
> effective address to the base register. Thus, the final value
> of the base address register is different.
> 
> To remove any inconsistencies, this adds an additional check
> for the aforementioned instructions to make sure that they
> are treated as unknown by the emulation infrastructure when
> RA = 0 or RA = RT. The kernel will then fallback to executing
> the instruction on hardware.
> 
> Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()")
> Reviewed-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
> Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
> ---
> Previous versions can be found at:
> v1: https://lore.kernel.org/linuxppc-dev/20201119054139.244083-1-sandipan@linux.ibm.com/
> 
> Changes in v2:
> - Jump to unknown_opcode instead of returning -1 for invalid
>   instruction forms.
> 
> ---
>  arch/powerpc/lib/sstep.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)

Wouldn't it be easier to just do the below at the end? Or, am I missing something?

diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index ede093e9623472..a2d726d2a5e9d1 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -2980,6 +2980,10 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
        }
 #endif /* CONFIG_VSX */

+       if (GETTYPE(op->type) == LOAD && (op->type & UPDATE) &&
+                       (ra == 0 || ra == rd))
+               goto unknown_opcode;
+
        return 0;

  logical_done:


- Naveen


^ permalink raw reply related

* [PATCH] mm/memory.c: Remove pte_sw_mkyoung()
From: Christophe Leroy @ 2021-02-03 10:19 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Andrew Morton, Bibo Mao, Jia He
  Cc: linux-arch, linux-mm, linuxppc-dev, linux-kernel, linux-mips

Commit 83d116c53058 ("mm: fix double page fault on arm64 if PTE_AF
is cleared") introduced arch_faults_on_old_pte() helper to identify
platforms that don't set page access bit in HW and require a page
fault to set it.

Commit 44bf431b47b4 ("mm/memory.c: Add memory read privilege on page
fault handling") added pte_sw_mkyoung() which is yet another way to
manage platforms that don't set page access bit in HW and require a
page fault to set it.

Remove that pte_sw_mkyoung() helper and use the already existing
arch_faults_on_old_pte() helper together with pte_mkyoung() instead.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/mips/include/asm/pgtable.h |  2 --
 include/linux/pgtable.h         | 16 ----------------
 mm/memory.c                     |  9 ++++++---
 3 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 4f9c37616d42..3275495adccb 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -406,8 +406,6 @@ static inline pte_t pte_mkyoung(pte_t pte)
 	return pte;
 }
 
-#define pte_sw_mkyoung	pte_mkyoung
-
 #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
 static inline int pte_huge(pte_t pte)	{ return pte_val(pte) & _PAGE_HUGE; }
 
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 8fcdfa52eb4b..70d04931dff4 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -424,22 +424,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
 }
 #endif
 
-/*
- * On some architectures hardware does not set page access bit when accessing
- * memory page, it is responsibilty of software setting this bit. It brings
- * out extra page fault penalty to track page access bit. For optimization page
- * access bit can be set during all page fault flow on these arches.
- * To be differentiate with macro pte_mkyoung, this macro is used on platforms
- * where software maintains page access bit.
- */
-#ifndef pte_sw_mkyoung
-static inline pte_t pte_sw_mkyoung(pte_t pte)
-{
-	return pte;
-}
-#define pte_sw_mkyoung	pte_sw_mkyoung
-#endif
-
 #ifndef pte_savedwrite
 #define pte_savedwrite pte_write
 #endif
diff --git a/mm/memory.c b/mm/memory.c
index feff48e1465a..46fab785f7b3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2890,7 +2890,8 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf)
 		}
 		flush_cache_page(vma, vmf->address, pte_pfn(vmf->orig_pte));
 		entry = mk_pte(new_page, vma->vm_page_prot);
-		entry = pte_sw_mkyoung(entry);
+		if (arch_faults_on_old_pte())
+			entry = pte_mkyoung(entry);
 		entry = maybe_mkwrite(pte_mkdirty(entry), vma);
 
 		/*
@@ -3548,7 +3549,8 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf)
 	__SetPageUptodate(page);
 
 	entry = mk_pte(page, vma->vm_page_prot);
-	entry = pte_sw_mkyoung(entry);
+	if (arch_faults_on_old_pte())
+		entry = pte_mkyoung(entry);
 	if (vma->vm_flags & VM_WRITE)
 		entry = pte_mkwrite(pte_mkdirty(entry));
 
@@ -3824,7 +3826,8 @@ vm_fault_t alloc_set_pte(struct vm_fault *vmf, struct page *page)
 
 	flush_icache_page(vma, page);
 	entry = mk_pte(page, vma->vm_page_prot);
-	entry = pte_sw_mkyoung(entry);
+	if (arch_faults_on_old_pte())
+		entry = pte_mkyoung(entry);
 	if (write)
 		entry = maybe_mkwrite(pte_mkdirty(entry), vma);
 	/* copy-on-write page */
-- 
2.25.0


^ permalink raw reply related

* Re: [PATCH 02/13] drm: remove drm_fb_helper_modinit
From: Daniel Vetter @ 2021-02-03 10:34 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Petr Mladek, Jiri Kosina, Andrew Donnellan, linux-kbuild,
	David Airlie, Masahiro Yamada, Josh Poimboeuf, Maarten Lankhorst,
	linux-kernel, Maxime Ripard, live-patching, Michal Marek,
	Joe Lawrence, dri-devel, Thomas Zimmermann, Jessica Yu,
	Frederic Barrat, Daniel Vetter, Miroslav Benes, linuxppc-dev
In-Reply-To: <20210128181421.2279-3-hch@lst.de>

On Thu, Jan 28, 2021 at 07:14:10PM +0100, Christoph Hellwig wrote:
> drm_fb_helper_modinit has a lot of boilerplate for what is not very
> simple functionality.  Just open code it in the only caller using
> IS_ENABLED and IS_MODULE, and skip the find_module check as a
> request_module is harmless if the module is already loaded (and not
> other caller has this find_module check either).
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Hm I thought I've acked this one already somewhere for merging through
your tree.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_crtc_helper_internal.h | 10 ---------
>  drivers/gpu/drm/drm_fb_helper.c            | 21 ------------------
>  drivers/gpu/drm/drm_kms_helper_common.c    | 25 +++++++++++-----------
>  3 files changed, 12 insertions(+), 44 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h
> index 25ce42e799952c..61e09f8a8d0ff0 100644
> --- a/drivers/gpu/drm/drm_crtc_helper_internal.h
> +++ b/drivers/gpu/drm/drm_crtc_helper_internal.h
> @@ -32,16 +32,6 @@
>  #include <drm/drm_encoder.h>
>  #include <drm/drm_modes.h>
>  
> -/* drm_fb_helper.c */
> -#ifdef CONFIG_DRM_FBDEV_EMULATION
> -int drm_fb_helper_modinit(void);
> -#else
> -static inline int drm_fb_helper_modinit(void)
> -{
> -	return 0;
> -}
> -#endif
> -
>  /* drm_dp_aux_dev.c */
>  #ifdef CONFIG_DRM_DP_AUX_CHARDEV
>  int drm_dp_aux_dev_init(void);
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 4b81195106875d..0b9f1ae1b7864c 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -2499,24 +2499,3 @@ void drm_fbdev_generic_setup(struct drm_device *dev,
>  	drm_client_register(&fb_helper->client);
>  }
>  EXPORT_SYMBOL(drm_fbdev_generic_setup);
> -
> -/* The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EXPERT)
> - * but the module doesn't depend on any fb console symbols.  At least
> - * attempt to load fbcon to avoid leaving the system without a usable console.
> - */
> -int __init drm_fb_helper_modinit(void)
> -{
> -#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EXPERT)
> -	const char name[] = "fbcon";
> -	struct module *fbcon;
> -
> -	mutex_lock(&module_mutex);
> -	fbcon = find_module(name);
> -	mutex_unlock(&module_mutex);
> -
> -	if (!fbcon)
> -		request_module_nowait(name);
> -#endif
> -	return 0;
> -}
> -EXPORT_SYMBOL(drm_fb_helper_modinit);
> diff --git a/drivers/gpu/drm/drm_kms_helper_common.c b/drivers/gpu/drm/drm_kms_helper_common.c
> index 221a8528c9937a..f933da1656eb52 100644
> --- a/drivers/gpu/drm/drm_kms_helper_common.c
> +++ b/drivers/gpu/drm/drm_kms_helper_common.c
> @@ -64,19 +64,18 @@ MODULE_PARM_DESC(edid_firmware,
>  
>  static int __init drm_kms_helper_init(void)
>  {
> -	int ret;
> -
> -	/* Call init functions from specific kms helpers here */
> -	ret = drm_fb_helper_modinit();
> -	if (ret < 0)
> -		goto out;
> -
> -	ret = drm_dp_aux_dev_init();
> -	if (ret < 0)
> -		goto out;
> -
> -out:
> -	return ret;
> +	/*
> +	 * The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EXPERT)
> +	 * but the module doesn't depend on any fb console symbols.  At least
> +	 * attempt to load fbcon to avoid leaving the system without a usable
> +	 * console.
> +	 */
> +	if (IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) &&
> +	    IS_MODULE(CONFIG_FRAMEBUFFER_CONSOLE) &&
> +	    !IS_ENABLED(CONFIG_EXPERT))
> +		request_module_nowait("fbcon");
> +
> +	return drm_dp_aux_dev_init();
>  }
>  
>  static void __exit drm_kms_helper_exit(void)
> -- 
> 2.29.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply

* Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation
From: Sandipan Das @ 2021-02-03 10:35 UTC (permalink / raw)
  To: Naveen N. Rao; +Cc: ravi.bangoria, ananth, jniethe5, paulus, linuxppc-dev, dja
In-Reply-To: <20210203094909.GD210@DESKTOP-TDPLP67.localdomain>

On 03/02/21 3:19 pm, Naveen N. Rao wrote:
> [...]
> 
> Wouldn't it be easier to just do the below at the end? Or, am I missing something?
> 
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index ede093e9623472..a2d726d2a5e9d1 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b/arch/powerpc/lib/sstep.c
> @@ -2980,6 +2980,10 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
>         }
>  #endif /* CONFIG_VSX */
> 
> +       if (GETTYPE(op->type) == LOAD && (op->type & UPDATE) &&
> +                       (ra == 0 || ra == rd))
> +               goto unknown_opcode;
> +
>         return 0;
> 
>   logical_done:
> 

Thanks that's much cleaner! We might need something similar for
the FP load/store and update instructions where an instruction is
invalid if RA is 0. I'll send a new revision with these changes.

- Sandipan

^ permalink raw reply

* Re: [PATCH 02/13] drm: remove drm_fb_helper_modinit
From: Christoph Hellwig @ 2021-02-03 10:49 UTC (permalink / raw)
  To: Christoph Hellwig, Frederic Barrat, Andrew Donnellan,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Jessica Yu, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence, Masahiro Yamada, Michal Marek,
	linux-kernel, linuxppc-dev, dri-devel, live-patching,
	linux-kbuild
In-Reply-To: <YBp8ShiKbQSPCcRx@phenom.ffwll.local>

On Wed, Feb 03, 2021 at 11:34:50AM +0100, Daniel Vetter wrote:
> On Thu, Jan 28, 2021 at 07:14:10PM +0100, Christoph Hellwig wrote:
> > drm_fb_helper_modinit has a lot of boilerplate for what is not very
> > simple functionality.  Just open code it in the only caller using
> > IS_ENABLED and IS_MODULE, and skip the find_module check as a
> > request_module is harmless if the module is already loaded (and not
> > other caller has this find_module check either).
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Hm I thought I've acked this one already somewhere for merging through
> your tree.
> 
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

The difference is that this new version loses the find_module entirely,
while the previous one replaced it with the module_loaded helper that
didn't make it to the second version of the series.

^ permalink raw reply

* Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation
From: Sandipan Das @ 2021-02-03 11:37 UTC (permalink / raw)
  To: Naveen N. Rao; +Cc: ravi.bangoria, ananth, jniethe5, paulus, linuxppc-dev, dja
In-Reply-To: <20210203094909.GD210@DESKTOP-TDPLP67.localdomain>


On 03/02/21 3:19 pm, Naveen N. Rao wrote:
> [...]
> 
> Wouldn't it be easier to just do the below at the end? Or, am I missing something?
> 
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index ede093e9623472..a2d726d2a5e9d1 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b/arch/powerpc/lib/sstep.c
> @@ -2980,6 +2980,10 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
>         }
>  #endif /* CONFIG_VSX */
> 
> +       if (GETTYPE(op->type) == LOAD && (op->type & UPDATE) &&
> +                       (ra == 0 || ra == rd))
> +               goto unknown_opcode;
> +
>         return 0;
> 
>   logical_done:
> 

This looks good?

diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index e96cff845ef7..a9c149bfd2f5 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -3017,6 +3017,21 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
 
        }
 
+       if (op->type & UPDATE) {
+               if (ra == rd && GETTYPE(op->type) == LOAD)
+                       goto unknown_opcode;
+               else if (ra == 0)
+                       switch(GETTYPE(op->type)) {
+                       case LOAD:
+                       case STORE:
+#ifdef CONFIG_PPC_FPU
+                       case LOAD_FP:
+                       case STORE_FP:
+#endif
+                               goto unknown_opcode;
+                       }
+       }
+
 #ifdef CONFIG_VSX
        if ((GETTYPE(op->type) == LOAD_VSX ||
             GETTYPE(op->type) == STORE_VSX) &&


- Sandipan

^ permalink raw reply related

* Re: [PATCH kernel] powerpc/iommu/debug: Add debugfs entries for IOMMU tables
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Alexey Kardashevskiy
In-Reply-To: <20210113102014.124452-1-aik@ozlabs.ru>

On Wed, 13 Jan 2021 21:20:14 +1100, Alexey Kardashevskiy wrote:
> This adds a folder per LIOBN under /sys/kernel/debug/iommu with IOMMU
> table parameters.
> 
> This is enabled by CONFIG_IOMMU_DEBUGFS.

Applied to powerpc/next.

[1/1] powerpc/iommu/debug: Add debugfs entries for IOMMU tables
      https://git.kernel.org/powerpc/c/691602aab9c3cce31d3ff9529c09b7922a5f6224

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/mm/book3s64/iommu: fix some RCU-list locks
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: mpe, Qian Cai; +Cc: aik, paulus, linuxppc-dev, linux-kernel, paulmck
In-Reply-To: <20200510051559.1959-1-cai@lca.pw>

On Sun, 10 May 2020 01:15:59 -0400, Qian Cai wrote:
> It is safe to traverse mm->context.iommu_group_mem_list with either
> mem_list_mutex or the RCU read lock held. Silence a few RCU-list false
> positive warnings and fix a few missing RCU read locks.
> 
>  arch/powerpc/mm/book3s64/iommu_api.c:330 RCU-list traversed in non-reader section!!
> 
>  other info that might help us debug this:
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/mm/book3s64/iommu: fix some RCU-list locks
      https://git.kernel.org/powerpc/c/b5952f8125ae512420d5fc569adce591bea73bf5

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/powernv/pci: fix a RCU-list lock
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: mpe, Qian Cai; +Cc: aik, paulus, linuxppc-dev, linux-kernel, paulmck
In-Reply-To: <20200510051347.1906-1-cai@lca.pw>

On Sun, 10 May 2020 01:13:47 -0400, Qian Cai wrote:
> It is unsafe to traverse tbl->it_group_list without the RCU read lock.
> 
>  WARNING: suspicious RCU usage
>  5.7.0-rc4-next-20200508 #1 Not tainted
>  -----------------------------
>  arch/powerpc/platforms/powernv/pci-ioda-tce.c:355 RCU-list traversed in non-reader section!!
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/powernv/pci: fix a RCU-list lock
      https://git.kernel.org/powerpc/c/c9790fb5df461c91d3fff1d864c1acb8baf5ad5c

cheers

^ permalink raw reply

* Re: [PATCH 1/2] powerpc/47x: Disable 256k page size
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Christophe Leroy,
	Paul Mackerras
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <2fed79b1154c872194f98bac4422c23918325e61.1611128938.git.christophe.leroy@csgroup.eu>

On Wed, 20 Jan 2021 07:49:13 +0000 (UTC), Christophe Leroy wrote:
> PPC47x_TLBE_SIZE isn't defined for 256k pages, so
> this size of page shall not be selected for 47x.

Applied to powerpc/next.

[1/2] powerpc/47x: Disable 256k page size
      https://git.kernel.org/powerpc/c/910a0cb6d259736a0c86e795d4c2f42af8d0d775
[2/2] powerpc/44x: Remove STDBINUTILS kconfig option
      https://git.kernel.org/powerpc/c/4eeef098b43242ed145c83fba9989d586d707589

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/47x: Disable 256k page size
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: Michael Ellerman, Paul Mackerras, Benjamin Herrenschmidt,
	Christophe Leroy
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <2fed79b1154c872194f98bac4422c23918325e61.1611039590.git.christophe.leroy@csgroup.eu>

On Tue, 19 Jan 2021 07:00:00 +0000 (UTC), Christophe Leroy wrote:
> PPC47x_TLBE_SIZE isn't defined for 256k pages, so
> this size of page shall not be selected for 47x.

Applied to powerpc/next.

[1/1] powerpc/47x: Disable 256k page size
      https://git.kernel.org/powerpc/c/910a0cb6d259736a0c86e795d4c2f42af8d0d775

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/kvm: Force selection of CONFIG_PPC_FPU
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Christophe Leroy,
	Paul Mackerras
  Cc: linuxppc-dev, linux-kernel, kvm-ppc
In-Reply-To: <74461a99fa1466f361532ca794ca0753be3d9f86.1611038044.git.christophe.leroy@csgroup.eu>

On Tue, 19 Jan 2021 06:36:52 +0000 (UTC), Christophe Leroy wrote:
> book3s/32 kvm is designed with the assumption that
> an FPU is always present.
> 
> Force selection of FPU support in the kernel when
> build KVM.

Applied to powerpc/next.

[1/1] powerpc/kvm: Force selection of CONFIG_PPC_FPU
      https://git.kernel.org/powerpc/c/27f699579b64dbf27caf31e5c0eac567ec0aa8b8

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/xmon: Enable breakpoints on 8xx
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Christophe Leroy,
	Paul Mackerras
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <b0607f1113d1558e73476bb06db0ee16d31a6e5b.1608716197.git.christophe.leroy@csgroup.eu>

On Wed, 23 Dec 2020 09:38:48 +0000 (UTC), Christophe Leroy wrote:
> Since commit 4ad8622dc548 ("powerpc/8xx: Implement hw_breakpoint"),
> 8xx has breakpoints so there is no reason to opt breakpoint logic
> out of xmon for the 8xx.

Applied to powerpc/next.

[1/1] powerpc/xmon: Enable breakpoints on 8xx
      https://git.kernel.org/powerpc/c/30662217885d7341161924acf1665924d7d37d64

cheers

^ permalink raw reply

* Re: [PATCH v2] powerpc/32s: Only build hash code when CONFIG_PPC_BOOK3S_604 is selected
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Christophe Leroy,
	Paul Mackerras
  Cc: linuxppc-dev, linux-kernel
In-Reply-To: <62df436454ef06e104cc334a0859a2878d7888d5.1608274548.git.christophe.leroy@csgroup.eu>

On Fri, 18 Dec 2020 06:56:05 +0000 (UTC), Christophe Leroy wrote:
> It is now possible to only build book3s/32 kernel for
> CPUs without hash table.
> 
> Opt out hash related code when CONFIG_PPC_BOOK3S_604 is not selected.

Applied to powerpc/next.

[1/1] powerpc/32s: Only build hash code when CONFIG_PPC_BOOK3S_604 is selected
      https://git.kernel.org/powerpc/c/259149cf7c3c6195e6199e045ca988c31d081cab

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/prom: Fix "ibm,arch-vec-5-platform-support" scan
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Cédric Le Goater; +Cc: stable
In-Reply-To: <20210122075029.797013-1-clg@kaod.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

On Fri, 22 Jan 2021 08:50:29 +0100, Cédric Le Goater wrote:
> The "ibm,arch-vec-5-platform-support" property is a list of pairs of
> bytes representing the options and values supported by the platform
> firmware. At boot time, Linux scans this list and activates the
> available features it recognizes : Radix and XIVE.
> 
> A recent change modified the number of entries to loop on and 8 bytes,
> 4 pairs of { options, values } entries are always scanned. This is
> fine on KVM but not on PowerVM which can advertises less. As a
> consequence on this platform, Linux reads extra entries pointing to
> random data, interprets these as available features and tries to
> activate them, leading to a firmware crash in
> ibm,client-architecture-support.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/prom: Fix "ibm,arch-vec-5-platform-support" scan
      https://git.kernel.org/powerpc/c/ed5b00a05c2ae95b59adc3442f45944ec632e794

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/vas: Fix IRQ name allocation
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Cédric Le Goater; +Cc: Sukadev Bhattiprolu, Haren Myneni
In-Reply-To: <20201212142707.2102141-1-clg@kaod.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

On Sat, 12 Dec 2020 15:27:07 +0100, Cédric Le Goater wrote:
> The VAS device allocates a generic interrupt to handle page faults but
> the IRQ name doesn't show under /proc. This is because it's on
> stack. Allocate the name.

Applied to powerpc/next.

[1/1] powerpc/vas: Fix IRQ name allocation
      https://git.kernel.org/powerpc/c/9dd31b11370380c488c8f2d347058617cd3fff99

cheers

^ permalink raw reply

* Re: [PATCH v2 00/23] powerpc: Fix W=1 compile errors
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Cédric Le Goater; +Cc: Christophe Leroy
In-Reply-To: <20210104143206.695198-1-clg@kaod.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3887 bytes --]

On Mon, 4 Jan 2021 15:31:43 +0100, Cédric Le Goater wrote:
> Here is an assorted collection of fixes for W=1.
> 
> After this series, only a few errors are left, some missing declarations
> in arch/powerpc/kernel/sys_ppc32.c, panic_smp_self_stop() declaration
> and a few of these which I don't know how to fix :
> 
>   ./arch/powerpc/xmon/xmon.c: In function ‘xmon_print_symbol’:
>   ./arch/powerpc/xmon/xmon.c:3656:14: error: variable ‘name’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
>    3656 |  const char *name = NULL;
>         |              ^~~~
> 
> [...]

Applied to powerpc/next.

[01/23] powerpc/mm: Include __find_linux_pte() prototype
        https://git.kernel.org/powerpc/c/d25da505c3f567a8667adb0118de1400468172ac
[02/23] powerpc/pseries/ras: Remove unused variable 'status'
        https://git.kernel.org/powerpc/c/aa23ea0c5f7f9a46e6aa3be0a4cfdfb80fabca6d
[03/23] powerpc/pseries/eeh: Make pseries_pcibios_bus_add_device() static
        https://git.kernel.org/powerpc/c/44159329e0ad160af7cc7e84fa6d97531c8ed78f
[04/23] powerpc/pseries/ras: Make init_ras_hotplug_IRQ() static
        https://git.kernel.org/powerpc/c/90db8bf24d133654032a1c7dd46aa5096627b9ff
[05/23] powerpc/pmem: Include pmem prototypes
        https://git.kernel.org/powerpc/c/d03f210e6ed8f5d64b00f0f07b03db74aa5b95a1
[06/23] powerpc/setup_64: Make some routines static
        https://git.kernel.org/powerpc/c/692e592895266bafb1e0d688e960b4bdd8e165a8
[07/23] powerpc/mce: Include prototypes
        https://git.kernel.org/powerpc/c/1cc2fd75934454be024cd7609b6d7890de6e724b
[08/23] powerpc/smp: Include tick_broadcast() prototype
        https://git.kernel.org/powerpc/c/cd7aa5d2fae11794a00ea34b10ee58434d718bc3
[09/23] powerpc/smp: Make debugger_ipi_callback() static
        https://git.kernel.org/powerpc/c/157c9f409d11fe79f09c69e78bfc7f8fe7410744
[10/23] powerpc/optprobes: Remove unused routine patch_imm32_load_insns()
        https://git.kernel.org/powerpc/c/d47d307f1049be545d45cf0f2332495ec9a89cc0
[11/23] powerpc/optprobes: Make patch_imm64_load_insns() static
        https://git.kernel.org/powerpc/c/bb21e1b6c5352d62d866e9236ed427f632cd537b
[12/23] powerpc/mm: Declare some prototypes
        https://git.kernel.org/powerpc/c/cccaf1a10abf03d91321d29ff333d6d5d4cef542
[13/23] powerpc/mm: Move hpte_insert_repeating() prototype
        https://git.kernel.org/powerpc/c/11f9c1d2fb497f69f83d4fab6fb7fc8a6884eded
[14/23] powerpc/mm: Declare preload_new_slb_context() prototype
        https://git.kernel.org/powerpc/c/1f55aefea3c1431f662aafa02ef9ac18d8880751
[15/23] powerpc/mm/hugetlb: Make pseries_alloc_bootmem_huge_page() static
        https://git.kernel.org/powerpc/c/94b87d72fc852b6995702d74541136a65f88624a
[16/23] powerpc/mm: Declare arch_report_meminfo() prototype.
        https://git.kernel.org/powerpc/c/1429ff51480fe5a21a3d17158d259a4b4b04808f
[17/23] powerpc/watchdog: Declare soft_nmi_interrupt() prototype
        https://git.kernel.org/powerpc/c/9ae440fb3d7d1c91ada7d6b13e009bd9f4f00e6c
[18/23] KVM: PPC: Make the VMX instruction emulation routines static
        https://git.kernel.org/powerpc/c/9236f57a9e51c72ce426ccd2e53e123de7196a0f
[19/23] KVM: PPC: Book3S HV: Include prototypes
        https://git.kernel.org/powerpc/c/d834915e8ee28884f1180dc566ba77c8768ec00a
[20/23] KVM: PPC: Book3S HV: Declare some prototypes
        https://git.kernel.org/powerpc/c/ce275179b6c98032361271927b7458884e9708b1
[21/23] powerpc/pseries: Make IOV setup routines static
        https://git.kernel.org/powerpc/c/42c1f400d1da50dd1cd9f874df72dc827f9fe2d2
[22/23] powerpc/pcidn: Make IOV setup routines static
        https://git.kernel.org/powerpc/c/53137a9b51e49e0399ad322e4a39bc5f9bf0a1de
[23/23] powerpc/pseries/eeh: Make pseries_send_allow_unfreeze() static
        https://git.kernel.org/powerpc/c/22f1de2e13b066921dedf6a00d2cc414f3cbab05

cheers

^ permalink raw reply

* Re: [PATCH v5 1/2] powerpc/mce: Reduce the size of event arrays
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Ganesh Goudar, mpe; +Cc: mahesh, npiggin
In-Reply-To: <20210128104143.70668-1-ganeshgr@linux.ibm.com>

On Thu, 28 Jan 2021 16:11:42 +0530, Ganesh Goudar wrote:
> Maximum recursive depth of MCE is 4, Considering the maximum depth
> allowed reduce the size of event to 10 from 100. This saves us ~19kB
> of memory and has no fatal consequences.

Applied to powerpc/next.

[1/2] powerpc/mce: Reduce the size of event arrays
      https://git.kernel.org/powerpc/c/17c5cf0fb993e219bda4f53aa9ec90d3cfcf92ab
[2/2] powerpc/mce: Remove per cpu variables from MCE handlers
      https://git.kernel.org/powerpc/c/923b3cf00b3ffc896543bac99affc0fa8553e41a

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/time: enable sched clock for irqtime
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Pingfan Liu; +Cc: Christophe Leroy, Nicholas Piggin
In-Reply-To: <1603349479-26185-1-git-send-email-kernelfans@gmail.com>

On Thu, 22 Oct 2020 14:51:19 +0800, Pingfan Liu wrote:
> When CONFIG_IRQ_TIME_ACCOUNTING and CONFIG_VIRT_CPU_ACCOUNTING_GEN, powerpc
> does not enable "sched_clock_irqtime" and can not utilize irq time
> accounting.
> 
> Like x86, powerpc does not use the sched_clock_register() interface. So it
> needs an dedicated call to enable_sched_clock_irqtime() to enable irq time
> accounting.

Applied to powerpc/next.

[1/1] powerpc/time: Enable sched clock for irqtime
      https://git.kernel.org/powerpc/c/b709e32ef570b8b91dfbcb63cffac4324c87799f

cheers

^ permalink raw reply

* Re: [PATCH v3] powerpc/perf/hv-24x7: Dont create sysfs event files for dummy events
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Kajol Jain, mpe; +Cc: suka, atrajeev, maddy
In-Reply-To: <20201228085204.18026-1-kjain@linux.ibm.com>

On Mon, 28 Dec 2020 14:22:04 +0530, Kajol Jain wrote:
> hv_24x7 performance monitoring unit creates list of supported events
> from the event catalog obtained via HCALL. hv_24x7 catalog could also
> contain invalid or dummy events with names like RESERVED*.
> These events does not have any hardware counters backing them.
> So patch adds a check to string compare the event names
> to filter out them.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/perf/hv-24x7: Dont create sysfs event files for dummy events
      https://git.kernel.org/powerpc/c/e5f9d8858612c192a4326f39ed16c91c3a9e0893

cheers

^ permalink raw reply

* Re: [PATCH 0/2] powerpc/82xx: Adjustments for pq2ads_pci_init_irq()
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Benjamin Herrenschmidt, Kate Stewart,
	Thomas Gleixner, Michael Ellerman, Markus Elfring,
	Greg Kroah-Hartman, Paul Mackerras, Enrico Weigelt
  Cc: kernel-janitors, LKML
In-Reply-To: <6dc7d70e-8a40-46ab-897b-d2eaf9a87d77@web.de>

On Tue, 27 Aug 2019 10:23:29 +0200, Markus Elfring wrote:
> Two update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (2):
>   Delete an unnecessary of_node_put() call
>   Use common error handling code
> 
> [...]

Applied to powerpc/next.

[1/2] powerpc/82xx: Delete an unnecessary of_node_put() call in pq2ads_pci_init_irq()
      https://git.kernel.org/powerpc/c/60aece416483fdf7e51728a3518438e0458bdabb
[2/2] powerpc/82xx: Use common error handling code in pq2ads_pci_init_irq()
      https://git.kernel.org/powerpc/c/c0cff7a17781f8b02b4837a9fc434a7eed322a14

cheers

^ permalink raw reply

* Re: [PATCH 0/2] PowerPC-pSeries: Adjustments for dlpar_store()
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Benjamin Herrenschmidt, Frank Rowand,
	Michael Ellerman, Allison Randal, Markus Elfring,
	Oliver O'Halloran, Nathan Lynch, Greg Kroah-Hartman,
	Paul Mackerras, Gen Zhang, Nathan Fontenot, Thomas Gleixner
  Cc: kernel-janitors, LKML
In-Reply-To: <db28c84d-ac07-6d9a-a371-c97ab72bf763@web.de>

On Tue, 27 Aug 2019 14:40:42 +0200, Markus Elfring wrote:
> Two update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (2):
>   Delete an unnecessary kfree() call
>   Delete an error message for a failed string duplication
> 
> [...]

Applied to powerpc/next.

[1/2] powerpc/pseries: Delete an unnecessary kfree() call in dlpar_store()
      https://git.kernel.org/powerpc/c/de060ac83e5c1fe5fb8c505a4e99c1fe4f70ff94
[2/2] powerpc/pseries: Delete an error message for a failed string duplication in dlpar_store()
      https://git.kernel.org/powerpc/c/6e7a4da754f3087fa1f0839c1128aac233c21442

cheers

^ permalink raw reply

* Re: [PATCH] cxl: Reduce scope for the variable “mm” in cxllib_get_PE_attributes()
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Andrew Donnellan, Arnd Bergmann, Markus Elfring,
	Frederic Barrat, Greg Kroah-Hartman
  Cc: kernel-janitors, LKML
In-Reply-To: <5cee2b25-71e0-15aa-fba6-12211b8308aa@web.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

On Thu, 10 Dec 2020 15:35:38 +0100, Markus Elfring wrote:
> A local variable was used only within an if branch.
> Thus move the definition for the variable “mm” into the corresponding
> code block.
> 
> This issue was detected by using the Coccinelle software.

Applied to powerpc/next.

[1/1] cxl: Reduce scope for the variable “mm” in cxllib_get_PE_attributes()
      https://git.kernel.org/powerpc/c/245a389c6ded15a7d308dbe988aec8a96e8aa8cf

cheers

^ permalink raw reply

* Re: [PATCH] powerpc/setup: Adjust six seq_printf() calls in show_cpuinfo()
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Andrew Morton, Benjamin Herrenschmidt,
	Mike Rapoport, Aneesh Kumar K.V, Michael Ellerman, Markus Elfring,
	Christophe Leroy, Paul Mackerras
  Cc: kernel-janitors, LKML
In-Reply-To: <5b62379e-a35f-4f56-f1b5-6350f76007e7@web.de>

On Tue, 2 Jul 2019 14:56:46 +0200, Markus Elfring wrote:
> A bit of information should be put into a sequence.
> Thus improve the execution speed for this data output by better usage
> of corresponding functions.
> 
> This issue was detected by using the Coccinelle software.

Applied to powerpc/next.

[1/1] powerpc/setup: Adjust six seq_printf() calls in show_cpuinfo()
      https://git.kernel.org/powerpc/c/675b963e2b6007818fe1b0a64b47be40c125246e

cheers

^ permalink raw reply

* Re: [PATCH] powerpc: Fix build error in paravirt.h
From: Michael Ellerman @ 2021-02-03 11:40 UTC (permalink / raw)
  To: linuxppc-dev, Michal Suchanek
  Cc: Juergen Gross, Srikar Dronamraju, Deep Shah, VMware, Inc.,
	linux-kernel, virtualization, Paul Mackerras, Waiman Long
In-Reply-To: <20210120132838.15589-1-msuchanek@suse.de>

On Wed, 20 Jan 2021 14:28:38 +0100, Michal Suchanek wrote:
> ./arch/powerpc/include/asm/paravirt.h:83:44: error: implicit declaration
> of function 'smp_processor_id'; did you mean 'raw_smp_processor_id'?
> 
> smp_processor_id is defined in linux/smp.h but it is not included.
> 
> The build error happens only when the patch is applied to 5.3 kernel but
> it only works by chance in mainline.

Applied to powerpc/next.

[1/1] powerpc: Fix build error in paravirt.h
      https://git.kernel.org/powerpc/c/9899a56f1eca964cd0de21008a9fa1523a571231

cheers

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox