mbox series

[v2,0/5] Add uv_sysfs platform driver

Message ID 20201118164747.236259-1-justin.ernst@hpe.com (mailing list archive)
Headers show
Series Add uv_sysfs platform driver | expand

Message

Ernst, Justin Nov. 18, 2020, 4:47 p.m. UTC
Introduce a new platform driver to gather topology information from UV systems
and expose that information via a sysfs interface at /sys/firmware/sgi_uv/.

This is version 2 with these changes since version 1:

 * Re-introduced /sys/firmware/sgi_uv/coherence_id file in the new driver after
	removing it in Patch 1/5. This keeps the userspace API unbroken.

Justin Ernst (5):
  x86/platform/uv: Remove existing /sys/firmware/sgi_uv/ interface
  x86/platform/uv: Add and export uv_bios_* functions
  x86/platform/uv: Add new uv_sysfs platform driver
  x86/platform/uv: Update ABI documentation of /sys/firmware/sgi_uv/
  x86/platform/uv: Update MAINTAINERS for uv_sysfs driver

 .../ABI/testing/sysfs-firmware-sgi_uv         | 141 ++-
 MAINTAINERS                                   |   6 +
 arch/x86/include/asm/uv/bios.h                |  49 +
 arch/x86/include/asm/uv/uv_geo.h              | 103 +++
 arch/x86/platform/uv/Makefile                 |   2 +-
 arch/x86/platform/uv/bios_uv.c                |  54 ++
 arch/x86/platform/uv/uv_sysfs.c               |  63 --
 drivers/platform/x86/Kconfig                  |  11 +
 drivers/platform/x86/Makefile                 |   3 +
 drivers/platform/x86/uv_sysfs.c               | 862 ++++++++++++++++++
 10 files changed, 1216 insertions(+), 78 deletions(-)
 create mode 100644 arch/x86/include/asm/uv/uv_geo.h
 delete mode 100644 arch/x86/platform/uv/uv_sysfs.c
 create mode 100644 drivers/platform/x86/uv_sysfs.c


base-commit: 4ef8451b332662d004df269d4cdeb7d9f31419b5

Comments

Hans de Goede Nov. 24, 2020, 11:29 a.m. UTC | #1
Hi,

Quick self intro for the x86/tip maintainers: I have take over
drivers/platform/x86 maintainership from Andy.

On 11/18/20 5:47 PM, Justin Ernst wrote:
> Introduce a new platform driver to gather topology information from UV systems
> and expose that information via a sysfs interface at /sys/firmware/sgi_uv/.
> 
> This is version 2 with these changes since version 1:
> 
>  * Re-introduced /sys/firmware/sgi_uv/coherence_id file in the new driver after
> 	removing it in Patch 1/5. This keeps the userspace API unbroken.
> 
> Justin Ernst (5):
>   x86/platform/uv: Remove existing /sys/firmware/sgi_uv/ interface
>   x86/platform/uv: Add and export uv_bios_* functions
>   x86/platform/uv: Add new uv_sysfs platform driver
>   x86/platform/uv: Update ABI documentation of /sys/firmware/sgi_uv/
>   x86/platform/uv: Update MAINTAINERS for uv_sysfs driver> 
>  .../ABI/testing/sysfs-firmware-sgi_uv         | 141 ++-
>  MAINTAINERS                                   |   6 +
>  arch/x86/include/asm/uv/bios.h                |  49 +
>  arch/x86/include/asm/uv/uv_geo.h              | 103 +++
>  arch/x86/platform/uv/Makefile                 |   2 +-
>  arch/x86/platform/uv/bios_uv.c                |  54 ++
>  arch/x86/platform/uv/uv_sysfs.c               |  63 --
>  drivers/platform/x86/Kconfig                  |  11 +
>  drivers/platform/x86/Makefile                 |   3 +
>  drivers/platform/x86/uv_sysfs.c               | 862 ++++++++++++++++++
>  10 files changed, 1216 insertions(+), 78 deletions(-)
>  create mode 100644 arch/x86/include/asm/uv/uv_geo.h
>  delete mode 100644 arch/x86/platform/uv/uv_sysfs.c
>  create mode 100644 drivers/platform/x86/uv_sysfs.c

So this touches files under both arch/x86/ and drivers/platform/x86/ ,
I believe this is best merged through the x86/tip tree and I don't
expect conflicts for the drivers/platform/x86/{Kconfig,Makefile} changes.

So here is my ack for merging this series through the x86/tip tree:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans
Ernst, Justin Nov. 25, 2020, 5:33 p.m. UTC | #2
Hans,
Thank you for your Ack of my patch set.

I've found a couple bugs that need fixing:

1. In my re-introduction of /sys/firmware/sgi_uv/coherence_id, I failed to export the associated sn_coherency_id variable, causing the build to fail when UV_SYSFS=m

2. A null pointer dereference in drivers/platform/x86/uv_sysfs.c:uv_ports_exit() caused by calling kobject_put() on an out of range index value.

I will be resubmitting the patch series shortly as v3.

I apologize for the hiccup.

Thanks,
Justin

> -----Original Message-----
> From: Hans de Goede [mailto:hdegoede@redhat.com]
> Sent: Tuesday, November 24, 2020 5:30 AM
> To: Ernst, Justin <justin.ernst@hpe.com>; Borislav Petkov <bp@alien8.de>; Ingo Molnar
> <mingo@redhat.com>; Mark Gross <mgross@linux.intel.com>; Thomas Gleixner <tglx@linutronix.de>; Wahl,
> Steve <steve.wahl@hpe.com>; x86@kernel.org
> Cc: Andy Shevchenko <andy@infradead.org>; Darren Hart <dvhart@infradead.org>; Sivanich, Dimitri
> <dimitri.sivanich@hpe.com>; H . Peter Anvin <hpa@zytor.com>; Anderson, Russ <russ.anderson@hpe.com>;
> linux-kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; Cezary Rojewski
> <cezary.rojewski@intel.com>; Ilya Dryomov <idryomov@gmail.com>; Jonathan Cameron
> <Jonathan.Cameron@huawei.com>; Mauro Carvalho Chehab <mchehab+huawei@kernel.org>; Vaibhav Jain
> <vaibhav@linux.ibm.com>
> Subject: Re: [PATCH v2 0/5] Add uv_sysfs platform driver
> 
> Hi,
> 
> Quick self intro for the x86/tip maintainers: I have take over
> drivers/platform/x86 maintainership from Andy.
> 
> On 11/18/20 5:47 PM, Justin Ernst wrote:
> > Introduce a new platform driver to gather topology information from UV systems
> > and expose that information via a sysfs interface at /sys/firmware/sgi_uv/.
> >
> > This is version 2 with these changes since version 1:
> >
> >  * Re-introduced /sys/firmware/sgi_uv/coherence_id file in the new driver after
> > 	removing it in Patch 1/5. This keeps the userspace API unbroken.
> >
> > Justin Ernst (5):
> >   x86/platform/uv: Remove existing /sys/firmware/sgi_uv/ interface
> >   x86/platform/uv: Add and export uv_bios_* functions
> >   x86/platform/uv: Add new uv_sysfs platform driver
> >   x86/platform/uv: Update ABI documentation of /sys/firmware/sgi_uv/
> >   x86/platform/uv: Update MAINTAINERS for uv_sysfs driver>
> >  .../ABI/testing/sysfs-firmware-sgi_uv         | 141 ++-
> >  MAINTAINERS                                   |   6 +
> >  arch/x86/include/asm/uv/bios.h                |  49 +
> >  arch/x86/include/asm/uv/uv_geo.h              | 103 +++
> >  arch/x86/platform/uv/Makefile                 |   2 +-
> >  arch/x86/platform/uv/bios_uv.c                |  54 ++
> >  arch/x86/platform/uv/uv_sysfs.c               |  63 --
> >  drivers/platform/x86/Kconfig                  |  11 +
> >  drivers/platform/x86/Makefile                 |   3 +
> >  drivers/platform/x86/uv_sysfs.c               | 862 ++++++++++++++++++
> >  10 files changed, 1216 insertions(+), 78 deletions(-)
> >  create mode 100644 arch/x86/include/asm/uv/uv_geo.h
> >  delete mode 100644 arch/x86/platform/uv/uv_sysfs.c
> >  create mode 100644 drivers/platform/x86/uv_sysfs.c
> 
> So this touches files under both arch/x86/ and drivers/platform/x86/ ,
> I believe this is best merged through the x86/tip tree and I don't
> expect conflicts for the drivers/platform/x86/{Kconfig,Makefile} changes.
> 
> So here is my ack for merging this series through the x86/tip tree:
> 
> Acked-by: Hans de Goede <hdegoede@redhat.com>
> 
> Regards,
> 
> Hans
>