All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Donnellan <ajd@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/5] powerpc/powernv: Move SCOM access code into powernv platform
Date: Tue, 4 Jun 2019 12:01:22 +1000	[thread overview]
Message-ID: <166d8f54-50b8-648d-f839-bee788e68abf@linux.ibm.com> (raw)
In-Reply-To: <20190509051119.7694-1-ajd@linux.ibm.com>

On 9/5/19 3:11 pm, Andrew Donnellan wrote:
> The powernv platform is the only one that directly accesses SCOMs. Move the
> support code to platforms/powernv, and get rid of the PPC_SCOM Kconfig
> option, as SCOM support is always selected when compiling for powernv.
> 
> This also means that the Kconfig item for CONFIG_SCOM_DEBUGFS will actually
> show up in menuconfig, as previously it was the only labelled option in
> sysdev/Kconfig and wasn't actually in a menu.

As I've just realised, this isn't actually correct - the option does 
indeed show up... in the root menu, where I've just been trained to 
ignore it, and where you won't get a menu location if you try to search 
for it using / in menuconfig.

I think moving it to the platform menu is obviously a better location. 
mpe would you be able to fix up the commit message in merge?


Andrew


> 
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
> ---
> v1->v2:
> - move scom.h as well (mpe)
> - add all the other patches in this series
> ---
>   arch/powerpc/platforms/powernv/Kconfig              |  5 ++++-
>   arch/powerpc/platforms/powernv/Makefile             |  2 +-
>   arch/powerpc/platforms/powernv/opal-xscom.c         |  3 ++-
>   arch/powerpc/{sysdev => platforms/powernv}/scom.c   |  3 ++-
>   .../{include/asm => platforms/powernv}/scom.h       | 13 +++----------
>   arch/powerpc/sysdev/Kconfig                         |  7 -------
>   arch/powerpc/sysdev/Makefile                        |  2 --
>   7 files changed, 12 insertions(+), 23 deletions(-)
>   rename arch/powerpc/{sysdev => platforms/powernv}/scom.c (99%)
>   rename arch/powerpc/{include/asm => platforms/powernv}/scom.h (95%)
> 
> diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/platforms/powernv/Kconfig
> index 850eee860cf2..938803eab0ad 100644
> --- a/arch/powerpc/platforms/powernv/Kconfig
> +++ b/arch/powerpc/platforms/powernv/Kconfig
> @@ -12,7 +12,6 @@ config PPC_POWERNV
>   	select EPAPR_BOOT
>   	select PPC_INDIRECT_PIO
>   	select PPC_UDBG_16550
> -	select PPC_SCOM
>   	select ARCH_RANDOM
>   	select CPU_FREQ
>   	select PPC_DOORBELL
> @@ -47,3 +46,7 @@ config PPC_VAS
>   	  VAS adapters are found in POWER9 based systems.
>   
>   	  If unsure, say N.
> +
> +config SCOM_DEBUGFS
> +	bool "Expose SCOM controllers via debugfs"
> +	depends on DEBUG_FS
> diff --git a/arch/powerpc/platforms/powernv/Makefile b/arch/powerpc/platforms/powernv/Makefile
> index da2e99efbd04..4b1644150135 100644
> --- a/arch/powerpc/platforms/powernv/Makefile
> +++ b/arch/powerpc/platforms/powernv/Makefile
> @@ -4,12 +4,12 @@ obj-y			+= idle.o opal-rtc.o opal-nvram.o opal-lpc.o opal-flash.o
>   obj-y			+= rng.o opal-elog.o opal-dump.o opal-sysparam.o opal-sensor.o
>   obj-y			+= opal-msglog.o opal-hmi.o opal-power.o opal-irqchip.o
>   obj-y			+= opal-kmsg.o opal-powercap.o opal-psr.o opal-sensor-groups.o
> +obj-y			+= opal-xscom.o scom.o
>   
>   obj-$(CONFIG_SMP)	+= smp.o subcore.o subcore-asm.o
>   obj-$(CONFIG_PCI)	+= pci.o pci-ioda.o npu-dma.o pci-ioda-tce.o
>   obj-$(CONFIG_CXL_BASE)	+= pci-cxl.o
>   obj-$(CONFIG_EEH)	+= eeh-powernv.o
> -obj-$(CONFIG_PPC_SCOM)	+= opal-xscom.o
>   obj-$(CONFIG_MEMORY_FAILURE)	+= opal-memory-errors.o
>   obj-$(CONFIG_OPAL_PRD)	+= opal-prd.o
>   obj-$(CONFIG_PERF_EVENTS) += opal-imc.o
> diff --git a/arch/powerpc/platforms/powernv/opal-xscom.c b/arch/powerpc/platforms/powernv/opal-xscom.c
> index 22d5e1110dbb..66337d92cb63 100644
> --- a/arch/powerpc/platforms/powernv/opal-xscom.c
> +++ b/arch/powerpc/platforms/powernv/opal-xscom.c
> @@ -18,7 +18,8 @@
>   #include <asm/machdep.h>
>   #include <asm/firmware.h>
>   #include <asm/opal.h>
> -#include <asm/scom.h>
> +
> +#include "scom.h"
>   
>   /*
>    * We could probably fit that inside the scom_map_t
> diff --git a/arch/powerpc/sysdev/scom.c b/arch/powerpc/platforms/powernv/scom.c
> similarity index 99%
> rename from arch/powerpc/sysdev/scom.c
> rename to arch/powerpc/platforms/powernv/scom.c
> index a707b24a7ddb..50c019d2ef45 100644
> --- a/arch/powerpc/sysdev/scom.c
> +++ b/arch/powerpc/platforms/powernv/scom.c
> @@ -23,9 +23,10 @@
>   #include <linux/export.h>
>   #include <asm/debugfs.h>
>   #include <asm/prom.h>
> -#include <asm/scom.h>
>   #include <linux/uaccess.h>
>   
> +#include "scom.h"
> +
>   const struct scom_controller *scom_controller;
>   EXPORT_SYMBOL_GPL(scom_controller);
>   
> diff --git a/arch/powerpc/include/asm/scom.h b/arch/powerpc/platforms/powernv/scom.h
> similarity index 95%
> rename from arch/powerpc/include/asm/scom.h
> rename to arch/powerpc/platforms/powernv/scom.h
> index f5cde45b1161..b14fe0edf95b 100644
> --- a/arch/powerpc/include/asm/scom.h
> +++ b/arch/powerpc/platforms/powernv/scom.h
> @@ -18,12 +18,8 @@
>    *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
>    */
>   
> -#ifndef _ASM_POWERPC_SCOM_H
> -#define _ASM_POWERPC_SCOM_H
> -
> -#ifdef __KERNEL__
> -#ifndef __ASSEMBLY__
> -#ifdef CONFIG_PPC_SCOM
> +#ifndef _SCOM_H
> +#define _SCOM_H
>   
>   /*
>    * The SCOM bus is a sideband bus used for accessing various internal
> @@ -161,7 +157,4 @@ static inline int scom_write(scom_map_t map, u64 reg, u64 value)
>   }
>   
>   
> -#endif /* CONFIG_PPC_SCOM */
> -#endif /* __ASSEMBLY__ */
> -#endif /* __KERNEL__ */
> -#endif /* _ASM_POWERPC_SCOM_H */
> +#endif /* _SCOM_H */
> diff --git a/arch/powerpc/sysdev/Kconfig b/arch/powerpc/sysdev/Kconfig
> index e0dbec780fe9..7808d279ff1d 100644
> --- a/arch/powerpc/sysdev/Kconfig
> +++ b/arch/powerpc/sysdev/Kconfig
> @@ -28,13 +28,6 @@ config PPC_MSI_BITMAP
>   source "arch/powerpc/sysdev/xics/Kconfig"
>   source "arch/powerpc/sysdev/xive/Kconfig"
>   
> -config PPC_SCOM
> -	bool
> -
> -config SCOM_DEBUGFS
> -	bool "Expose SCOM controllers via debugfs"
> -	depends on PPC_SCOM && DEBUG_FS
> -
>   config GE_FPGA
>   	bool
>   
> diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
> index aaf23283ba0c..35d52d1d2fc0 100644
> --- a/arch/powerpc/sysdev/Makefile
> +++ b/arch/powerpc/sysdev/Makefile
> @@ -51,8 +51,6 @@ ifdef CONFIG_SUSPEND
>   obj-$(CONFIG_PPC_BOOK3S_32)	+= 6xx-suspend.o
>   endif
>   
> -obj-$(CONFIG_PPC_SCOM)		+= scom.o
> -
>   obj-$(CONFIG_PPC_EARLY_DEBUG_MEMCONS)	+= udbg_memcons.o
>   
>   obj-$(CONFIG_PPC_XICS)		+= xics/
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd@linux.ibm.com             IBM Australia Limited


  parent reply	other threads:[~2019-06-04  2:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09  5:11 [PATCH v2 1/5] powerpc/powernv: Move SCOM access code into powernv platform Andrew Donnellan
2019-05-09  5:11 ` [PATCH v2 2/5] powerpc/powernv: Remove dead SCOM access code Andrew Donnellan
2019-05-09  5:11 ` [PATCH v2 3/5] powerpc/powernv: Get rid of old scom_controller abstraction Andrew Donnellan
2019-05-09  5:11 ` [PATCH v2 4/5] powerpc/powernv: Fix checkpatch warnings in opal-xscom.c Andrew Donnellan
2019-05-09  5:11 ` [PATCH v2 5/5] powerpc/configs: Disable SCOM_DEBUGFS in powernv_defconfig Andrew Donnellan
2019-05-09  5:37   ` Nicholas Piggin
2019-05-09  5:53     ` Oliver
2019-05-09  5:54     ` Andrew Donnellan
2019-07-31  1:45       ` Andrew Donnellan
2019-07-31 12:00         ` Michael Ellerman
2019-06-04  2:01 ` Andrew Donnellan [this message]
2019-07-31 11:37   ` [PATCH v2 1/5] powerpc/powernv: Move SCOM access code into powernv platform Michael Ellerman
2019-08-10 10:20 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166d8f54-50b8-648d-f839-bee788e68abf@linux.ibm.com \
    --to=ajd@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.