LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MAINTAINERS: Update remaining @linux.vnet.ibm.com addresses
From: Lukas Bulwahn @ 2019-04-11  4:27 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: linux-pci, Paul E . McKenney, linuxppc-dev, linux-kernel,
	Lukas Bulwahn

Paul McKenney attempted to update all email addresses @linux.vnet.ibm.com
to @linux.ibm.com in commit 1dfddcdb95c4
("MAINTAINERS: Update from @linux.vnet.ibm.com to @linux.ibm.com"), but
some still remained.

We update the remaining email addresses in MAINTAINERS, hopefully finally
catching all cases for good.

Fixes: 1dfddcdb95c4 ("MAINTAINERS: Update from @linux.vnet.ibm.com to @linux.ibm.com")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---

Tyrel, please take this patch. Thanks.

 MAINTAINERS | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 2359e12e4c41..454b3cf36aa4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7439,14 +7439,14 @@ F:	drivers/crypto/vmx/ghash*
 F:	drivers/crypto/vmx/ppc-xlate.pl
 
 IBM Power PCI Hotplug Driver for RPA-compliant PPC64 platform
-M:	Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
+M:	Tyrel Datwyler <tyreld@linux.ibm.com>
 L:	linux-pci@vger.kernel.org
 L:	linuxppc-dev@lists.ozlabs.org
 S:	Supported
 F:	drivers/pci/hotplug/rpaphp*
 
 IBM Power IO DLPAR Driver for RPA-compliant PPC64 platform
-M:	Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
+M:	Tyrel Datwyler <tyreld@linux.ibm.com>
 L:	linux-pci@vger.kernel.org
 L:	linuxppc-dev@lists.ozlabs.org
 S:	Supported
@@ -10388,7 +10388,7 @@ F:	arch/arm/mach-mmp/
 
 MMU GATHER AND TLB INVALIDATION
 M:	Will Deacon <will.deacon@arm.com>
-M:	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
+M:	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
 M:	Andrew Morton <akpm@linux-foundation.org>
 M:	Nick Piggin <npiggin@gmail.com>
 M:	Peter Zijlstra <peterz@infradead.org>
-- 
2.17.1


^ permalink raw reply related

* Re: [PATCH v5 16/16] KVM: PPC: Book3S HV: XIVE: introduce a 'release' device operation
From: David Gibson @ 2019-04-11  4:38 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: kvm, kvm-ppc, Cédric Le Goater, Paolo Bonzini, linuxppc-dev
In-Reply-To: <20190411031625.GA21252@blackberry>

[-- Attachment #1: Type: text/plain, Size: 2689 bytes --]

On Thu, Apr 11, 2019 at 01:16:25PM +1000, Paul Mackerras wrote:
> On Wed, Apr 10, 2019 at 07:04:48PM +0200, Cédric Le Goater wrote:
> > When a P9 sPAPR VM boots, the CAS negotiation process determines which
> > interrupt mode to use (XICS legacy or XIVE native) and invokes a
> > machine reset to activate the chosen mode.
> > 
> > To be able to switch from one mode to another, we introduce the
> > capability to release a KVM device without destroying the VM. The KVM
> > device interface is extended with a new 'release' operation which is
> > called when the file descriptor of the device is closed.
> 
> I believe the release operation is not called until all of the mmaps
> using the fd are unmapped - which is a good thing for us, since it
> means the guest can't possibly be accessing the XIVE directly.
> You might want to reword that last paragraph to mention that.
> 
> > Such operations are defined for the XICS-on-XIVE and the XIVE native
> > KVM devices. They clear the vCPU interrupt presenters that could be
> > attached and then destroy the device.
> > 
> > This is not considered as a safe operation as the vCPUs are still
> > running and could be referencing the KVM device through their
> > presenters. To protect the system from any breakage, the kvmppc_xive
> > objects representing both KVM devices are now stored in an array under
> > the VM. Allocation is performed on first usage and memory is freed
> > only when the VM exits.
> 
> One quick comment below:
> 
> > diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c
> > index 480a3fc6b9fd..064a9f2ae678 100644
> > --- a/arch/powerpc/kvm/book3s_xive.c
> > +++ b/arch/powerpc/kvm/book3s_xive.c
> > @@ -1100,11 +1100,19 @@ void kvmppc_xive_disable_vcpu_interrupts(struct kvm_vcpu *vcpu)
> >  void kvmppc_xive_cleanup_vcpu(struct kvm_vcpu *vcpu)
> >  {
> >  	struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
> > -	struct kvmppc_xive *xive = xc->xive;
> > +	struct kvmppc_xive *xive;
> >  	int i;
> >  
> > +	if (!kvmppc_xics_enabled(vcpu))
> > +		return;
> 
> Should that be kvmppc_xive_enabled() rather than xics?

I think I asked that on an earlier iteration, and the answer is no.
The names are confusing, but this file is all about xics-on-xive
rather than xive native.  So here we're checking what's available from
the guest's point of view, so "xics", but most of the surrounding
functions are named "xive" because that's the backend.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* Re: [PATCH 1/6] mm: change locked_vm's type from unsigned long to atomic64_t
From: Alexey Kardashevskiy @ 2019-04-11  4:22 UTC (permalink / raw)
  To: Daniel Jordan, akpm
  Cc: Davidlohr Bueso, kvm, Alan Tull, linux-fpga, linux-kernel,
	kvm-ppc, linux-mm, Alex Williamson, Moritz Fischer,
	Christoph Lameter, linuxppc-dev, Wu Hao
In-Reply-To: <20190402204158.27582-2-daniel.m.jordan@oracle.com>



On 03/04/2019 07:41, Daniel Jordan wrote:
> Taking and dropping mmap_sem to modify a single counter, locked_vm, is
> overkill when the counter could be synchronized separately.
> 
> Make mmap_sem a little less coarse by changing locked_vm to an atomic,
> the 64-bit variety to avoid issues with overflow on 32-bit systems.
> 
> Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
> Cc: Alan Tull <atull@kernel.org>
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Christoph Lameter <cl@linux.com>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Moritz Fischer <mdf@kernel.org>
> Cc: Paul Mackerras <paulus@ozlabs.org>
> Cc: Wu Hao <hao.wu@intel.com>
> Cc: <linux-mm@kvack.org>
> Cc: <kvm@vger.kernel.org>
> Cc: <kvm-ppc@vger.kernel.org>
> Cc: <linuxppc-dev@lists.ozlabs.org>
> Cc: <linux-fpga@vger.kernel.org>
> Cc: <linux-kernel@vger.kernel.org>
> ---
>  arch/powerpc/kvm/book3s_64_vio.c    | 14 ++++++++------
>  arch/powerpc/mm/mmu_context_iommu.c | 15 ++++++++-------
>  drivers/fpga/dfl-afu-dma-region.c   | 18 ++++++++++--------
>  drivers/vfio/vfio_iommu_spapr_tce.c | 17 +++++++++--------
>  drivers/vfio/vfio_iommu_type1.c     | 10 ++++++----
>  fs/proc/task_mmu.c                  |  2 +-
>  include/linux/mm_types.h            |  2 +-
>  kernel/fork.c                       |  2 +-
>  mm/debug.c                          |  5 +++--
>  mm/mlock.c                          |  4 ++--
>  mm/mmap.c                           | 18 +++++++++---------
>  mm/mremap.c                         |  6 +++---
>  12 files changed, 61 insertions(+), 52 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
> index f02b04973710..e7fdb6d10eeb 100644
> --- a/arch/powerpc/kvm/book3s_64_vio.c
> +++ b/arch/powerpc/kvm/book3s_64_vio.c
> @@ -59,32 +59,34 @@ static unsigned long kvmppc_stt_pages(unsigned long tce_pages)
>  static long kvmppc_account_memlimit(unsigned long stt_pages, bool inc)
>  {
>  	long ret = 0;
> +	s64 locked_vm;
>  
>  	if (!current || !current->mm)
>  		return ret; /* process exited */
>  
>  	down_write(&current->mm->mmap_sem);
>  
> +	locked_vm = atomic64_read(&current->mm->locked_vm);
>  	if (inc) {
>  		unsigned long locked, lock_limit;
>  
> -		locked = current->mm->locked_vm + stt_pages;
> +		locked = locked_vm + stt_pages;
>  		lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
>  		if (locked > lock_limit && !capable(CAP_IPC_LOCK))
>  			ret = -ENOMEM;
>  		else
> -			current->mm->locked_vm += stt_pages;
> +			atomic64_add(stt_pages, &current->mm->locked_vm);
>  	} else {
> -		if (WARN_ON_ONCE(stt_pages > current->mm->locked_vm))
> -			stt_pages = current->mm->locked_vm;
> +		if (WARN_ON_ONCE(stt_pages > locked_vm))
> +			stt_pages = locked_vm;
>  
> -		current->mm->locked_vm -= stt_pages;
> +		atomic64_sub(stt_pages, &current->mm->locked_vm);
>  	}
>  
>  	pr_debug("[%d] RLIMIT_MEMLOCK KVM %c%ld %ld/%ld%s\n", current->pid,
>  			inc ? '+' : '-',
>  			stt_pages << PAGE_SHIFT,
> -			current->mm->locked_vm << PAGE_SHIFT,
> +			atomic64_read(&current->mm->locked_vm) << PAGE_SHIFT,
>  			rlimit(RLIMIT_MEMLOCK),
>  			ret ? " - exceeded" : "");
>  
> diff --git a/arch/powerpc/mm/mmu_context_iommu.c b/arch/powerpc/mm/mmu_context_iommu.c
> index e7a9c4f6bfca..8038ac24a312 100644
> --- a/arch/powerpc/mm/mmu_context_iommu.c
> +++ b/arch/powerpc/mm/mmu_context_iommu.c
> @@ -55,30 +55,31 @@ static long mm_iommu_adjust_locked_vm(struct mm_struct *mm,
>  		unsigned long npages, bool incr)
>  {
>  	long ret = 0, locked, lock_limit;
> +	s64 locked_vm;
>  
>  	if (!npages)
>  		return 0;
>  
>  	down_write(&mm->mmap_sem);
> -
> +	locked_vm = atomic64_read(&mm->locked_vm);
>  	if (incr) {
> -		locked = mm->locked_vm + npages;
> +		locked = locked_vm + npages;
>  		lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
>  		if (locked > lock_limit && !capable(CAP_IPC_LOCK))
>  			ret = -ENOMEM;
>  		else
> -			mm->locked_vm += npages;
> +			atomic64_add(npages, &mm->locked_vm);
>  	} else {
> -		if (WARN_ON_ONCE(npages > mm->locked_vm))
> -			npages = mm->locked_vm;
> -		mm->locked_vm -= npages;
> +		if (WARN_ON_ONCE(npages > locked_vm))
> +			npages = locked_vm;
> +		atomic64_sub(npages, &mm->locked_vm);
>  	}
>  
>  	pr_debug("[%d] RLIMIT_MEMLOCK HASH64 %c%ld %ld/%ld\n",
>  			current ? current->pid : 0,
>  			incr ? '+' : '-',
>  			npages << PAGE_SHIFT,
> -			mm->locked_vm << PAGE_SHIFT,
> +			atomic64_read(&mm->locked_vm) << PAGE_SHIFT,
>  			rlimit(RLIMIT_MEMLOCK));
>  	up_write(&mm->mmap_sem);
>  
> diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl-afu-dma-region.c
> index e18a786fc943..08132fd9b6b7 100644
> --- a/drivers/fpga/dfl-afu-dma-region.c
> +++ b/drivers/fpga/dfl-afu-dma-region.c
> @@ -45,6 +45,7 @@ void afu_dma_region_init(struct dfl_feature_platform_data *pdata)
>  static int afu_dma_adjust_locked_vm(struct device *dev, long npages, bool incr)
>  {
>  	unsigned long locked, lock_limit;
> +	s64 locked_vm;
>  	int ret = 0;
>  
>  	/* the task is exiting. */
> @@ -53,24 +54,25 @@ static int afu_dma_adjust_locked_vm(struct device *dev, long npages, bool incr)
>  
>  	down_write(&current->mm->mmap_sem);
>  
> +	locked_vm = atomic64_read(&current->mm->locked_vm);
>  	if (incr) {
> -		locked = current->mm->locked_vm + npages;
> +		locked = locked_vm + npages;
>  		lock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;
>  
>  		if (locked > lock_limit && !capable(CAP_IPC_LOCK))
>  			ret = -ENOMEM;
>  		else
> -			current->mm->locked_vm += npages;
> +			atomic64_add(npages, &current->mm->locked_vm);
>  	} else {
> -		if (WARN_ON_ONCE(npages > current->mm->locked_vm))
> -			npages = current->mm->locked_vm;
> -		current->mm->locked_vm -= npages;
> +		if (WARN_ON_ONCE(npages > locked_vm))
> +			npages = locked_vm;
> +		atomic64_sub(npages, &current->mm->locked_vm);
>  	}
>  
> -	dev_dbg(dev, "[%d] RLIMIT_MEMLOCK %c%ld %ld/%ld%s\n", current->pid,
> +	dev_dbg(dev, "[%d] RLIMIT_MEMLOCK %c%ld %lld/%lu%s\n", current->pid,
>  		incr ? '+' : '-', npages << PAGE_SHIFT,
> -		current->mm->locked_vm << PAGE_SHIFT, rlimit(RLIMIT_MEMLOCK),
> -		ret ? "- exceeded" : "");
> +		(s64)atomic64_read(&current->mm->locked_vm) << PAGE_SHIFT,
> +		rlimit(RLIMIT_MEMLOCK), ret ? "- exceeded" : "");



atomic64_read() returns "long" which matches "%ld", why this change (and
similar below)? You did not do this in the two pr_debug()s above anyway.


-- 
Alexey

^ permalink raw reply

* Re: [PATCH RFC 3/5] powerpc/speculation: Add support for 'cpu_spec_mitigations=' cmdline options
From: Josh Poimboeuf @ 2019-04-11  4:02 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Peter Zijlstra, Heiko Carstens, Paul Mackerras, H . Peter Anvin,
	Ingo Molnar, Andrea Arcangeli, linux-s390, x86, Will Deacon,
	Linus Torvalds, Catalin Marinas, Waiman Long, linux-arch,
	Jon Masters, Jiri Kosina, Borislav Petkov, Andy Lutomirski,
	Thomas Gleixner, linux-arm-kernel, Greg Kroah-Hartman,
	linux-kernel, Tyler Hicks, Martin Schwidefsky, linuxppc-dev
In-Reply-To: <87pnpuwg05.fsf@concordia.ellerman.id.au>

On Wed, Apr 10, 2019 at 04:06:50PM +1000, Michael Ellerman wrote:
> Josh Poimboeuf <jpoimboe@redhat.com> writes:
> > Configure powerpc CPU runtime speculation bug mitigations in accordance
> > with the 'cpu_spec_mitigations=' cmdline options.  This affects
> > Meltdown, Spectre v1, Spectre v2, and Speculative Store Bypass.
> >
> > The default behavior is unchanged.
> >
> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > ---
> >  Documentation/admin-guide/kernel-parameters.txt | 9 +++++----
> >  arch/powerpc/kernel/security.c                  | 6 +++---
> >  arch/powerpc/kernel/setup_64.c                  | 2 +-
> >  3 files changed, 9 insertions(+), 8 deletions(-)
> >
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index 29dc03971630..0e8eae1e8a25 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -2552,10 +2552,11 @@
> >  
> >  			off
> >  				Disable all speculative CPU mitigations.
> > -				Equivalent to: nopti [x86]
> > +				Equivalent to: nopti [x86, powerpc]
> > +					       nospectre_v1 [powerpc]
> >  					       nospectre_v2 [x86]
> 
> Not sure if you meant to omit powerpc from nospectre_v2?
> 
> You have patched it in the code below.

Oops.  I'll update the documentation.

> >  					       spectre_v2_user=off [x86]
> > -					       spec_store_bypass_disable=off [x86]
> > +					       spec_store_bypass_disable=off [x86, powerpc]
> >  					       l1tf=off [x86]
> >  
> >  			auto (default)
> > @@ -2568,7 +2569,7 @@
> >  				Equivalent to: pti=auto [x86]
> >  					       spectre_v2=auto [x86]
> >  					       spectre_v2_user=auto [x86]
> > -					       spec_store_bypass_disable=auto [x86]
> > +					       spec_store_bypass_disable=auto [x86, powerpc]
> >  					       l1tf=flush [x86]
> >  
> >  			auto,nosmt
> > @@ -2579,7 +2580,7 @@
> >  				Equivalent to: pti=auto [x86]
> >  					       spectre_v2=auto [x86]
> >  					       spectre_v2_user=auto [x86]
> > -					       spec_store_bypass_disable=auto [x86]
> > +					       spec_store_bypass_disable=auto [x86, powerpc]
> >  					       l1tf=flush,nosmt [x86]
> >  
> >  	mminit_loglevel=
> > diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
> > index b33bafb8fcea..5aed4ad729ba 100644
> > --- a/arch/powerpc/kernel/security.c
> > +++ b/arch/powerpc/kernel/security.c
> > @@ -57,7 +57,7 @@ void setup_barrier_nospec(void)
> >  	enable = security_ftr_enabled(SEC_FTR_FAVOUR_SECURITY) &&
> >  		 security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR);
> >  
> > -	if (!no_nospec)
> > +	if (!no_nospec && cpu_spec_mitigations != CPU_SPEC_MITIGATIONS_OFF)
> >  		enable_barrier_nospec(enable);
> 
> Adding a wrapper func that checks for CPU_SPEC_MITIGATIONS_OFF would
> make these a little less verbose, eg:
> 
> 	if (!no_nospec && !cpu_spec_mitigations_off())
>   		enable_barrier_nospec(enable);
> 
> But that's a nitpick.

Yes, that would be much nicer.  I'll probably do something like that in
the next version.  Thanks.

-- 
Josh

^ permalink raw reply

* [PATCH V3] powernv: sensor-groups: Add debugfs file to enable/disable sensor groups
From: Shilpasri G Bhat @ 2019-04-11  3:54 UTC (permalink / raw)
  To: mpe; +Cc: ego, linuxppc-dev, linux-kernel, Shilpasri G Bhat

This patch provides support to disable and enable platform specific
sensor groups like performance, utilization and frequency which are
not supported in hwmon.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
---
Changes from V2:
- Rebase on master

Changes from V1:
- As per Michael Ellerman's suggestion, adding the "enable" files to debugfs.
  The original code had been written in mind to accomodate the "enable" file
  in the same path as "clear" attribute. As this is not required anymore
  the code is cleaned up to bifurcate the functions adding "enable" and
  "clear" attribute.

 .../powerpc/platforms/powernv/opal-sensor-groups.c | 292 ++++++++++++++-------
 1 file changed, 194 insertions(+), 98 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal-sensor-groups.c b/arch/powerpc/platforms/powernv/opal-sensor-groups.c
index 1796092..1208538 100644
--- a/arch/powerpc/platforms/powernv/opal-sensor-groups.c
+++ b/arch/powerpc/platforms/powernv/opal-sensor-groups.c
@@ -15,22 +15,21 @@
 #include <linux/kobject.h>
 #include <linux/slab.h>
 
+#include <asm/debugfs.h>
 #include <asm/opal.h>
 
-DEFINE_MUTEX(sg_mutex);
+#define SENSOR_GROUPS_DIR_STR	"sensor_groups"
 
 static struct kobject *sg_kobj;
 
-struct sg_attr {
-	u32 handle;
-	struct kobj_attribute attr;
-};
-
 static struct sensor_group {
-	char name[20];
+	struct kobj_attribute sattr;
 	struct attribute_group sg;
-	struct sg_attr *sgattrs;
-} *sgs;
+	struct mutex mutex;
+	char name[20];
+	u32 handle;
+	u32 enable;
+} *sgroups;
 
 int sensor_group_enable(u32 handle, bool enable)
 {
@@ -60,10 +59,12 @@ int sensor_group_enable(u32 handle, bool enable)
 }
 EXPORT_SYMBOL_GPL(sensor_group_enable);
 
-static ssize_t sg_store(struct kobject *kobj, struct kobj_attribute *attr,
-			const char *buf, size_t count)
+static ssize_t sgroup_clear_store(struct kobject *kobj,
+				  struct kobj_attribute *attr,
+				  const char *buf, size_t count)
 {
-	struct sg_attr *sattr = container_of(attr, struct sg_attr, attr);
+	struct sensor_group *sgroup = container_of(attr, struct sensor_group,
+						   sattr);
 	struct opal_msg msg;
 	u32 data;
 	int ret, token;
@@ -81,11 +82,11 @@ static ssize_t sg_store(struct kobject *kobj, struct kobj_attribute *attr,
 		return token;
 	}
 
-	ret = mutex_lock_interruptible(&sg_mutex);
+	ret = mutex_lock_interruptible(&sgroup->mutex);
 	if (ret)
 		goto out_token;
 
-	ret = opal_sensor_group_clear(sattr->handle, token);
+	ret = opal_sensor_group_clear(sgroup->handle, token);
 	switch (ret) {
 	case OPAL_ASYNC_COMPLETION:
 		ret = opal_async_wait_response(token, &msg);
@@ -106,135 +107,230 @@ static ssize_t sg_store(struct kobject *kobj, struct kobj_attribute *attr,
 	}
 
 out:
-	mutex_unlock(&sg_mutex);
+	mutex_unlock(&sgroup->mutex);
 out_token:
 	opal_async_release_token(token);
 	return ret;
 }
 
-static struct sg_ops_info {
-	int opal_no;
-	const char *attr_name;
-	ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
-			const char *buf, size_t count);
-} ops_info[] = {
-	{ OPAL_SENSOR_GROUP_CLEAR, "clear", sg_store },
-};
+static int find_nr_groups(struct device_node *sensor_group_node, int opal_no)
+{
+	struct device_node *node;
+	int count = 0;
+
+	for_each_child_of_node(sensor_group_node, node) {
+		u32 sgid, op;
+
+		if (of_device_is_compatible(node, "ibm,opal-sensor"))
+			continue;
+
+		if (of_property_read_u32(node, "ops", &op))
+			continue;
+
+		if (op != opal_no)
+			continue;
+
+		if (of_property_read_u32(node, "sensor-group-id", &sgid))
+			continue;
+		count++;
+	}
 
-static void add_attr(int handle, struct sg_attr *attr, int index)
+	return count;
+}
+
+#ifdef CONFIG_DEBUG_FS
+static int sgroup_enable_get(void *data, u64 *val)
 {
-	attr->handle = handle;
-	sysfs_attr_init(&attr->attr.attr);
-	attr->attr.attr.name = ops_info[index].attr_name;
-	attr->attr.attr.mode = 0220;
-	attr->attr.store = ops_info[index].store;
+	struct sensor_group *sgroup = (struct sensor_group *)data;
+	int rc;
+
+	rc = mutex_lock_interruptible(&sgroup->mutex);
+	if (rc)
+		return rc;
+
+	*val = sgroup->enable;
+	mutex_unlock(&sgroup->mutex);
+
+	return 0;
 }
 
-static int add_attr_group(const __be32 *ops, int len, struct sensor_group *sg,
-			   u32 handle)
+static int sgroup_enable_set(void *data, u64 val)
 {
-	int i, j;
-	int count = 0;
+	struct sensor_group *sgroup = (struct sensor_group *)data;
+	int rc;
+
+	if (val != 0 && val != 1)
+		return -EINVAL;
 
-	for (i = 0; i < len; i++)
-		for (j = 0; j < ARRAY_SIZE(ops_info); j++)
-			if (be32_to_cpu(ops[i]) == ops_info[j].opal_no) {
-				add_attr(handle, &sg->sgattrs[count], j);
-				sg->sg.attrs[count] =
-					&sg->sgattrs[count].attr.attr;
-				count++;
-			}
+	rc = mutex_lock_interruptible(&sgroup->mutex);
+	if (rc)
+		return rc;
 
-	return sysfs_create_group(sg_kobj, &sg->sg);
+	if (val != sgroup->enable) {
+		rc = sensor_group_enable(sgroup->handle, val);
+		if (!rc)
+			sgroup->enable = val;
+	}
+
+	mutex_unlock(&sgroup->mutex);
+	return rc;
 }
 
-static int get_nr_attrs(const __be32 *ops, int len)
+DEFINE_DEBUGFS_ATTRIBUTE(sensor_debugfs_ops, sgroup_enable_get,
+			 sgroup_enable_set, "%llx\n");
+static struct dentry *sensor_debugfs_parent;
+static struct sensor_group *dgroups;
+
+static void add_debugfs_attrs(struct device_node *sensor_group_node)
 {
-	int i, j;
-	int nr_attrs = 0;
+	struct device_node *node;
+	int i = 0, count;
+
+	count = find_nr_groups(sensor_group_node, OPAL_SENSOR_GROUP_ENABLE);
+	if (!count)
+		return;
+
+	dgroups = kcalloc(count, sizeof(*dgroups), GFP_KERNEL);
+	if (!dgroups)
+		return;
+
+	sensor_debugfs_parent = debugfs_create_dir(SENSOR_GROUPS_DIR_STR,
+						   powerpc_debugfs_root);
 
-	for (i = 0; i < len; i++)
-		for (j = 0; j < ARRAY_SIZE(ops_info); j++)
-			if (be32_to_cpu(ops[i]) == ops_info[j].opal_no)
-				nr_attrs++;
+	if (!sensor_debugfs_parent)
+		goto out_dgroups;
 
-	return nr_attrs;
+	for_each_child_of_node(sensor_group_node, node) {
+		struct dentry *group;
+		u32 op, sgid, chipid;
+
+		if (of_device_is_compatible(node, "ibm,opal-sensor"))
+			continue;
+
+		if (of_property_read_u32(node, "ops", &op))
+			continue;
+
+		if (op != OPAL_SENSOR_GROUP_ENABLE)
+			continue;
+
+		if (of_property_read_u32(node, "sensor-group-id", &sgid))
+			continue;
+
+		if (!of_property_read_u32(node, "ibm,chip-id", &chipid))
+			sprintf(dgroups[i].name, "%s%d", node->name, chipid);
+		else
+			sprintf(dgroups[i].name, "%s", node->name);
+
+		dgroups[i].handle = sgid;
+		dgroups[i].enable = 1;
+		mutex_init(&dgroups[i].mutex);
+		group = debugfs_create_dir(dgroups[i].name,
+					   sensor_debugfs_parent);
+		if (!group) {
+			of_node_put(node);
+			goto out_debugfs;
+		}
+
+		if (!debugfs_create_file("enable", 0664, group, &dgroups[i],
+					 &sensor_debugfs_ops)) {
+			of_node_put(node);
+			goto out_debugfs;
+		}
+		i++;
+	}
+
+	return;
+
+out_debugfs:
+	debugfs_remove_recursive(sensor_debugfs_parent);
+out_dgroups:
+	kfree(dgroups);
 }
+#endif /* CONFIG_DEBUG_FS */
 
 void __init opal_sensor_groups_init(void)
 {
-	struct device_node *sg, *node;
-	int i = 0;
+	struct device_node *sensor_group_node, *node;
+	int i = 0, count;
 
-	sg = of_find_compatible_node(NULL, NULL, "ibm,opal-sensor-group");
-	if (!sg) {
+	sensor_group_node = of_find_compatible_node(NULL, NULL,
+						    "ibm,opal-sensor-group");
+	if (!sensor_group_node) {
 		pr_devel("Sensor groups node not found\n");
 		return;
 	}
 
-	sgs = kcalloc(of_get_child_count(sg), sizeof(*sgs), GFP_KERNEL);
-	if (!sgs)
-		return;
+	count = find_nr_groups(sensor_group_node, OPAL_SENSOR_GROUP_CLEAR);
+	if (!count)
+		goto out_node_put;
+
+	sgroups = kcalloc(count, sizeof(*sgroups), GFP_KERNEL);
+	if (!sgroups)
+		goto out_node_put;
 
-	sg_kobj = kobject_create_and_add("sensor_groups", opal_kobj);
+	sg_kobj = kobject_create_and_add(SENSOR_GROUPS_DIR_STR, opal_kobj);
 	if (!sg_kobj) {
 		pr_warn("Failed to create sensor group kobject\n");
-		goto out_sgs;
+		goto out_sgroups;
 	}
 
-	for_each_child_of_node(sg, node) {
-		const __be32 *ops;
-		u32 sgid, len, nr_attrs, chipid;
+	for_each_child_of_node(sensor_group_node, node) {
+		u32 sgid, chipid, op;
 
-		ops = of_get_property(node, "ops", &len);
-		if (!ops)
+		if (of_property_read_u32(node, "ops", &op))
 			continue;
 
-		nr_attrs = get_nr_attrs(ops, len);
-		if (!nr_attrs)
+		if (op != OPAL_SENSOR_GROUP_CLEAR)
 			continue;
 
-		sgs[i].sgattrs = kcalloc(nr_attrs, sizeof(*sgs[i].sgattrs),
-					 GFP_KERNEL);
-		if (!sgs[i].sgattrs)
-			goto out_sgs_sgattrs;
-
-		sgs[i].sg.attrs = kcalloc(nr_attrs + 1,
-					  sizeof(*sgs[i].sg.attrs),
-					  GFP_KERNEL);
-
-		if (!sgs[i].sg.attrs) {
-			kfree(sgs[i].sgattrs);
-			goto out_sgs_sgattrs;
-		}
-
-		if (of_property_read_u32(node, "sensor-group-id", &sgid)) {
-			pr_warn("sensor-group-id property not found\n");
-			goto out_sgs_sgattrs;
-		}
+		if (of_property_read_u32(node, "sensor-group-id", &sgid))
+			continue;
 
 		if (!of_property_read_u32(node, "ibm,chip-id", &chipid))
-			sprintf(sgs[i].name, "%pOFn%d", node, chipid);
+			sprintf(sgroups[i].name, "%pOFn%d", node, chipid);
 		else
-			sprintf(sgs[i].name, "%pOFn", node);
+			sprintf(sgroups[i].name, "%pOFn", node);
+
+		sgroups[i].sg.attrs = kzalloc(sizeof(struct attribute *) * 2,
+					      GFP_KERNEL);
+		if (!sgroups[i].sg.attrs) {
+			of_node_put(node);
+			goto out_sg_attrs;
+		}
 
-		sgs[i].sg.name = sgs[i].name;
-		if (add_attr_group(ops, len, &sgs[i], sgid)) {
+		sgroups[i].sg.name = sgroups[i].name;
+		sgroups[i].handle = sgid;
+		sysfs_attr_init(sgroups[i].sattr.attr);
+		sgroups[i].sattr.attr.name = "clear";
+		sgroups[i].sattr.attr.mode = 0220;
+		sgroups[i].sattr.store = sgroup_clear_store;
+		sgroups[i].sg.attrs[0] = &sgroups[i].sattr.attr;
+		sgroups[i].sg.attrs[1] = NULL;
+		mutex_init(&sgroups[i].mutex);
+
+		if (sysfs_create_group(sg_kobj, &sgroups[i].sg)) {
 			pr_warn("Failed to create sensor attribute group %s\n",
-				sgs[i].sg.name);
-			goto out_sgs_sgattrs;
+				sgroups[i].sg.name);
+			kfree(sgroups[i].sg.attrs);
+			of_node_put(node);
+			goto out_sg_attrs;
 		}
+
 		i++;
 	}
 
-	return;
+#ifdef CONFIG_DEBUG_FS
+	add_debugfs_attrs(sensor_group_node);
+#endif /* CONFIG_DEBUG_FS */
 
-out_sgs_sgattrs:
-	while (--i >= 0) {
-		kfree(sgs[i].sgattrs);
-		kfree(sgs[i].sg.attrs);
-	}
+	goto out_node_put;
+
+out_sg_attrs:
+	while (i-- > 0)
+		kfree(sgroups[i].sg.attrs);
 	kobject_put(sg_kobj);
-out_sgs:
-	kfree(sgs);
+out_sgroups:
+	kfree(sgroups);
+out_node_put:
+	of_node_put(sensor_group_node);
 }
-- 
1.8.3.1


^ permalink raw reply related

* Re: [PATCH V4] ASoC: fsl_esai: Fix missing break in switch statement
From: Gustavo A. R. Silva @ 2019-04-11  3:32 UTC (permalink / raw)
  To: S.j. Wang, timur@kernel.org, nicoleotsuka@gmail.com,
	Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org
  Cc: linuxppc-dev@lists.ozlabs.org, Linux Kernel Mailing List
In-Reply-To: <d211785c-1b0f-45ea-ae08-e5d92424ba1f@embeddedor.com>



On 4/10/19 10:24 PM, Gustavo A. R. Silva wrote:
> [+cc lkml]
> 
> On 4/10/19 10:05 PM, S.j. Wang wrote:
>> case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be
>> independent of each other, so replace fall-through with break.
>>
>> Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver")
>>
>> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
>> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
>> Cc: <stable@vger.kernel.org>
>> ---
>> Change in v4
>> - Add Acked-by and cc stable
>> - change the subject
>>
> 
> You should preserve the changelog of what has changed in each version, not only
> the last changes, so that there is a logical flow and the maintainers do not
> have to dig up previous versions:
> 
> Changes in v3:
> - Update subject line.
> 
> Changes in v2:
> - Fix "Fixes" tag.
> 
> 
> Also, for this type of fixes, make sure to always Cc lkml: linux-kernel@vger.kernel.org
> 

See, these are all the people and lists you should Cc:

$ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback -f sound/soc/fsl/fsl_esai.c
Timur Tabi <timur@kernel.org> (maintainer:FREESCALE SOC SOUND DRIVERS)
Nicolin Chen <nicoleotsuka@gmail.com> (maintainer:FREESCALE SOC SOUND DRIVERS)
Xiubo Li <Xiubo.Lee@gmail.com> (maintainer:FREESCALE SOC SOUND DRIVERS)
Fabio Estevam <festevam@gmail.com> (reviewer:FREESCALE SOC SOUND DRIVERS)
Liam Girdwood <lgirdwood@gmail.com> (supporter:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...)
Mark Brown <broonie@kernel.org> (supporter:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...)
Jaroslav Kysela <perex@perex.cz> (maintainer:SOUND)
Takashi Iwai <tiwai@suse.com> (maintainer:SOUND)
alsa-devel@alsa-project.org (moderated list:FREESCALE SOC SOUND DRIVERS)
linuxppc-dev@lists.ozlabs.org (open list:FREESCALE SOC SOUND DRIVERS)
linux-kernel@vger.kernel.org (open list)

Thanks
--
Gustavo

> 
>>  sound/soc/fsl/fsl_esai.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
>> index 3623aa9a6f2e..15202a637197 100644
>> --- a/sound/soc/fsl/fsl_esai.c
>> +++ b/sound/soc/fsl/fsl_esai.c
>> @@ -251,7 +251,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
>>  		break;
>>  	case ESAI_HCKT_EXTAL:
>>  		ecr |= ESAI_ECR_ETI;
>> -		/* fall through */
>> +		break;
>>  	case ESAI_HCKR_EXTAL:
>>  		ecr |= ESAI_ECR_ERI;
>>  		break;
>>

^ permalink raw reply

* Re: [PATCH V4] ASoC: fsl_esai: Fix missing break in switch statement
From: Gustavo A. R. Silva @ 2019-04-11  3:24 UTC (permalink / raw)
  To: S.j. Wang, timur@kernel.org, nicoleotsuka@gmail.com,
	Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org
  Cc: linuxppc-dev@lists.ozlabs.org, Linux Kernel Mailing List
In-Reply-To: <6b953e991b303a26791facbb680efe25d3cc33c3.1554951841.git.shengjiu.wang@nxp.com>

[+cc lkml]

On 4/10/19 10:05 PM, S.j. Wang wrote:
> case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be
> independent of each other, so replace fall-through with break.
> 
> Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver")
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
> Cc: <stable@vger.kernel.org>
> ---
> Change in v4
> - Add Acked-by and cc stable
> - change the subject
> 

You should preserve the changelog of what has changed in each version, not only
the last changes, so that there is a logical flow and the maintainers do not
have to dig up previous versions:

Changes in v3:
- Update subject line.

Changes in v2:
- Fix "Fixes" tag.


Also, for this type of fixes, make sure to always Cc lkml: linux-kernel@vger.kernel.org

Thanks
--
Gustavo

>  sound/soc/fsl/fsl_esai.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
> index 3623aa9a6f2e..15202a637197 100644
> --- a/sound/soc/fsl/fsl_esai.c
> +++ b/sound/soc/fsl/fsl_esai.c
> @@ -251,7 +251,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
>  		break;
>  	case ESAI_HCKT_EXTAL:
>  		ecr |= ESAI_ECR_ETI;
> -		/* fall through */
> +		break;
>  	case ESAI_HCKR_EXTAL:
>  		ecr |= ESAI_ECR_ERI;
>  		break;
> 

^ permalink raw reply

* [PATCH v2 5/5] nohz_full: Allow the boot CPU to be nohz_full
From: Nicholas Piggin @ 2019-04-11  3:34 UTC (permalink / raw)
  To: Thomas Gleixner, Frederic Weisbecker
  Cc: linux-arch, Peter Zijlstra, Rafael J . Wysocki, linux-kernel,
	Nicholas Piggin, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190411033448.20842-1-npiggin@gmail.com>

Allow the boot CPU / CPU0 to be nohz_full. Have the boot CPU take the
do_timer duty during boot until a housekeeping CPU can take over.

This is supported when CONFIG_PM_SLEEP_SMP is not configured, or when
it is configured and the arch allows suspend on non-zero CPUs.

nohz_full has been trialed at a large supercomputer site and found to
significantly reduce jitter. In order to deploy it in production, they
need CPU0 to be nohz_full because their job control system requires
the application CPUs to start from 0, and the housekeeping CPUs are
placed higher. An equivalent job scheduling that uses CPU0 for
housekeeping could be achieved by modifying their system, but it is
preferable if nohz_full can support their environment without
modification.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 kernel/time/tick-common.c | 50 +++++++++++++++++++++++++++++++++++----
 kernel/time/tick-sched.c  | 34 ++++++++++++++++++--------
 2 files changed, 70 insertions(+), 14 deletions(-)

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 529143b4c8d2..31146c13226e 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -46,6 +46,14 @@ ktime_t tick_period;
  *    procedure also covers cpu hotplug.
  */
 int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT;
+#ifdef CONFIG_NO_HZ_FULL
+/*
+ * tick_do_timer_boot_cpu indicates the boot CPU temporarily owns
+ * tick_do_timer_cpu and it should be taken over by an eligible secondary
+ * when one comes online.
+ */
+static int tick_do_timer_boot_cpu __read_mostly = -1;
+#endif
 
 /*
  * Debugging: see timer_list.c
@@ -167,6 +175,26 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast)
 	}
 }
 
+#ifdef CONFIG_NO_HZ_FULL
+static void giveup_do_timer(void *info)
+{
+	int cpu = *(unsigned int *)info;
+
+	WARN_ON(tick_do_timer_cpu != smp_processor_id());
+
+	tick_do_timer_cpu = cpu;
+}
+
+static void tick_take_do_timer_from_boot(void)
+{
+	int cpu = smp_processor_id();
+	int from = tick_do_timer_boot_cpu;
+
+	if (from >= 0 && from != cpu)
+		smp_call_function_single(from, giveup_do_timer, &cpu, 1);
+}
+#endif
+
 /*
  * Setup the tick device
  */
@@ -186,12 +214,26 @@ static void tick_setup_device(struct tick_device *td,
 		 * this cpu:
 		 */
 		if (tick_do_timer_cpu == TICK_DO_TIMER_BOOT) {
-			if (!tick_nohz_full_cpu(cpu))
-				tick_do_timer_cpu = cpu;
-			else
-				tick_do_timer_cpu = TICK_DO_TIMER_NONE;
+			tick_do_timer_cpu = cpu;
+
 			tick_next_period = ktime_get();
 			tick_period = NSEC_PER_SEC / HZ;
+#ifdef CONFIG_NO_HZ_FULL
+			/*
+			 * The boot CPU may be nohz_full, in which case set
+			 * tick_do_timer_boot_cpu so the first housekeeping
+			 * secondary that comes up will take do_timer from
+			 * us.
+			 */
+			if (tick_nohz_full_cpu(cpu))
+				tick_do_timer_boot_cpu = cpu;
+
+		} else if (tick_do_timer_boot_cpu != -1 &&
+						!tick_nohz_full_cpu(cpu)) {
+			tick_take_do_timer_from_boot();
+			tick_do_timer_boot_cpu = -1;
+			WARN_ON(tick_do_timer_cpu != cpu);
+#endif
 		}
 
 		/*
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 6fa52cd6df0b..4aa917acbe1c 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -121,10 +121,16 @@ static void tick_sched_do_timer(struct tick_sched *ts, ktime_t now)
 	 * into a long sleep. If two CPUs happen to assign themselves to
 	 * this duty, then the jiffies update is still serialized by
 	 * jiffies_lock.
+	 *
+	 * If nohz_full is enabled, this should not happen because the
+	 * tick_do_timer_cpu never relinquishes.
 	 */
-	if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)
-	    && !tick_nohz_full_cpu(cpu))
+	if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) {
+#ifdef CONFIG_NO_HZ_FULL
+		WARN_ON(tick_nohz_full_running);
+#endif
 		tick_do_timer_cpu = cpu;
+	}
 #endif
 
 	/* Check, if the jiffies need an update */
@@ -395,8 +401,8 @@ void __init tick_nohz_full_setup(cpumask_var_t cpumask)
 static int tick_nohz_cpu_down(unsigned int cpu)
 {
 	/*
-	 * The boot CPU handles housekeeping duty (unbound timers,
-	 * workqueues, timekeeping, ...) on behalf of full dynticks
+	 * The tick_do_timer_cpu CPU handles housekeeping duty (unbound
+	 * timers, workqueues, timekeeping, ...) on behalf of full dynticks
 	 * CPUs. It must remain online when nohz full is enabled.
 	 */
 	if (tick_nohz_full_running && tick_do_timer_cpu == cpu)
@@ -423,12 +429,15 @@ void __init tick_nohz_init(void)
 		return;
 	}
 
-	cpu = smp_processor_id();
+	if (IS_ENABLED(CONFIG_PM_SLEEP_SMP) &&
+			!IS_ENABLED(CONFIG_PM_SLEEP_SMP_NONZERO_CPU)) {
+		cpu = smp_processor_id();
 
-	if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) {
-		pr_warn("NO_HZ: Clearing %d from nohz_full range for timekeeping\n",
-			cpu);
-		cpumask_clear_cpu(cpu, tick_nohz_full_mask);
+		if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) {
+			pr_warn("NO_HZ: Clearing %d from nohz_full range "
+				"for timekeeping\n", cpu);
+			cpumask_clear_cpu(cpu, tick_nohz_full_mask);
+		}
 	}
 
 	for_each_cpu(cpu, tick_nohz_full_mask)
@@ -904,8 +913,13 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
 		/*
 		 * Boot safety: make sure the timekeeping duty has been
 		 * assigned before entering dyntick-idle mode,
+		 * tick_do_timer_cpu is TICK_DO_TIMER_BOOT
 		 */
-		if (tick_do_timer_cpu == TICK_DO_TIMER_NONE)
+		if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_BOOT))
+			return false;
+
+		/* Should not happen for nohz-full */
+		if (WARN_ON_ONCE(tick_do_timer_cpu == TICK_DO_TIMER_NONE))
 			return false;
 	}
 
-- 
2.20.1


^ permalink raw reply related

* [PATCH v2 4/5] kernel/sched/isolation: require a present CPU in housekeeping mask
From: Nicholas Piggin @ 2019-04-11  3:34 UTC (permalink / raw)
  To: Thomas Gleixner, Frederic Weisbecker
  Cc: linux-arch, Peter Zijlstra, Rafael J . Wysocki, linux-kernel,
	Nicholas Piggin, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190411033448.20842-1-npiggin@gmail.com>

During housekeeping mask setup, currently a possible CPU is required.
That does not guarantee the CPU would be available at boot time, so
check to ensure that at least one present CPU is in the mask.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 kernel/sched/isolation.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
index b02d148e7672..687302051a27 100644
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -65,6 +65,7 @@ void __init housekeeping_init(void)
 static int __init housekeeping_setup(char *str, enum hk_flags flags)
 {
 	cpumask_var_t non_housekeeping_mask;
+	cpumask_var_t tmp;
 	int err;
 
 	alloc_bootmem_cpumask_var(&non_housekeeping_mask);
@@ -75,16 +76,23 @@ static int __init housekeeping_setup(char *str, enum hk_flags flags)
 		return 0;
 	}
 
+	alloc_bootmem_cpumask_var(&tmp);
 	if (!housekeeping_flags) {
 		alloc_bootmem_cpumask_var(&housekeeping_mask);
 		cpumask_andnot(housekeeping_mask,
 			       cpu_possible_mask, non_housekeeping_mask);
-		if (cpumask_empty(housekeeping_mask))
+
+		cpumask_andnot(tmp, cpu_present_mask, non_housekeeping_mask);
+		if (cpumask_empty(tmp)) {
+			pr_warn("Housekeeping: must include one present CPU, "
+				"using boot CPU:%d\n", smp_processor_id());
 			__cpumask_set_cpu(smp_processor_id(), housekeeping_mask);
+			__cpumask_clear_cpu(smp_processor_id(), non_housekeeping_mask);
+		}
 	} else {
-		cpumask_var_t tmp;
-
-		alloc_bootmem_cpumask_var(&tmp);
+		cpumask_andnot(tmp, cpu_present_mask, non_housekeeping_mask);
+		if (cpumask_empty(tmp))
+			__cpumask_clear_cpu(smp_processor_id(), non_housekeeping_mask);
 		cpumask_andnot(tmp, cpu_possible_mask, non_housekeeping_mask);
 		if (!cpumask_equal(tmp, housekeeping_mask)) {
 			pr_warn("Housekeeping: nohz_full= must match isolcpus=\n");
@@ -92,8 +100,8 @@ static int __init housekeeping_setup(char *str, enum hk_flags flags)
 			free_bootmem_cpumask_var(non_housekeeping_mask);
 			return 0;
 		}
-		free_bootmem_cpumask_var(tmp);
 	}
+	free_bootmem_cpumask_var(tmp);
 
 	if ((flags & HK_FLAG_TICK) && !(housekeeping_flags & HK_FLAG_TICK)) {
 		if (IS_ENABLED(CONFIG_NO_HZ_FULL)) {
-- 
2.20.1


^ permalink raw reply related

* [PATCH v2 3/5] kernel/cpu: Allow non-zero CPU to be primary for suspend / kexec freeze
From: Nicholas Piggin @ 2019-04-11  3:34 UTC (permalink / raw)
  To: Thomas Gleixner, Frederic Weisbecker
  Cc: linux-arch, Peter Zijlstra, Rafael J . Wysocki, linux-kernel,
	Nicholas Piggin, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190411033448.20842-1-npiggin@gmail.com>

This patch provides an arch option, ARCH_SUSPEND_NONZERO_CPU, to
opt-in to allowing suspend to occur on one of the housekeeping CPUs
rather than hardcoded CPU0.

This will allow CPU0 to be a nohz_full CPU with a later change.

It may be possible for platforms with hardware/firmware restrictions
on suspend/wake effectively support this by handing off the final
stage to CPU0 when kernel housekeeping is no longer required. Another
option is to make housekeeping / nohz_full mask dynamic at runtime,
but the complexity could not be justified at this time.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/Kconfig |  4 ++++
 include/linux/cpu.h  |  7 ++++++-
 kernel/cpu.c         | 10 +++++++++-
 kernel/power/Kconfig |  9 +++++++++
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 2d0be82c3061..bc98b0e37a10 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -318,6 +318,10 @@ config ARCH_SUSPEND_POSSIBLE
 		   (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
 		   || 44x || 40x
 
+config ARCH_SUSPEND_NONZERO_CPU
+	def_bool y
+	depends on PPC_POWERNV || PPC_PSERIES
+
 config PPC_DCR_NATIVE
 	bool
 
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 563e697e7779..dd3813959d62 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -140,7 +140,12 @@ extern void enable_nonboot_cpus(void);
 
 static inline int suspend_disable_secondary_cpus(void)
 {
-	return freeze_secondary_cpus(0);
+	int cpu = 0;
+
+	if (IS_ENABLED(CONFIG_PM_SLEEP_SMP_NONZERO_CPU))
+		cpu = -1;
+
+	return freeze_secondary_cpus(cpu);
 }
 static inline void suspend_enable_secondary_cpus(void)
 {
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 6754f3ecfd94..d1bf6e2b4752 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -9,6 +9,7 @@
 #include <linux/notifier.h>
 #include <linux/sched/signal.h>
 #include <linux/sched/hotplug.h>
+#include <linux/sched/isolation.h>
 #include <linux/sched/task.h>
 #include <linux/sched/smt.h>
 #include <linux/unistd.h>
@@ -1199,8 +1200,15 @@ int freeze_secondary_cpus(int primary)
 	int cpu, error = 0;
 
 	cpu_maps_update_begin();
-	if (!cpu_online(primary))
+	if (primary == -1) {
 		primary = cpumask_first(cpu_online_mask);
+		if (!housekeeping_cpu(primary, HK_FLAG_TIMER))
+			primary = housekeeping_any_cpu(HK_FLAG_TIMER);
+	} else {
+		if (!cpu_online(primary))
+			primary = cpumask_first(cpu_online_mask);
+	}
+
 	/*
 	 * We take down all of the non-boot CPUs in one shot to avoid races
 	 * with the userspace trying to use the CPU hotplug at the same time
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index f8fe57d1022e..9bbaaab14b36 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -114,6 +114,15 @@ config PM_SLEEP_SMP
 	depends on PM_SLEEP
 	select HOTPLUG_CPU
 
+config PM_SLEEP_SMP_NONZERO_CPU
+	def_bool y
+	depends on PM_SLEEP_SMP
+	depends on ARCH_SUSPEND_NONZERO_CPU
+	---help---
+	If an arch can suspend (for suspend, hibernate, kexec, etc) on a
+	non-zero numbered CPU, it may define ARCH_SUSPEND_NONZERO_CPU. This
+	will allow nohz_full mask to include CPU0.
+
 config PM_AUTOSLEEP
 	bool "Opportunistic sleep"
 	depends on PM_SLEEP
-- 
2.20.1


^ permalink raw reply related

* [PATCH v2 2/5] PM / suspend: add function to disable secondaries for suspend
From: Nicholas Piggin @ 2019-04-11  3:34 UTC (permalink / raw)
  To: Thomas Gleixner, Frederic Weisbecker
  Cc: linux-arch, Peter Zijlstra, Rafael J . Wysocki, linux-kernel,
	Nicholas Piggin, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190411033448.20842-1-npiggin@gmail.com>

This adds a function to disable secondary CPUs for suspend that are
not necessarily non-zero / non-boot CPUs. Platforms will be able to
use this to suspend using non-zero CPUs.

Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 include/linux/cpu.h      | 10 ++++++++++
 kernel/kexec_core.c      |  4 ++--
 kernel/power/hibernate.c | 12 ++++++------
 kernel/power/suspend.c   |  4 ++--
 4 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 5041357d0297..563e697e7779 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -137,6 +137,16 @@ static inline int disable_nonboot_cpus(void)
 	return freeze_secondary_cpus(0);
 }
 extern void enable_nonboot_cpus(void);
+
+static inline int suspend_disable_secondary_cpus(void)
+{
+	return freeze_secondary_cpus(0);
+}
+static inline void suspend_enable_secondary_cpus(void)
+{
+	return enable_nonboot_cpus();
+}
+
 #else /* !CONFIG_PM_SLEEP_SMP */
 static inline int disable_nonboot_cpus(void) { return 0; }
 static inline void enable_nonboot_cpus(void) {}
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index d7140447be75..fd5c95ff9251 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1150,7 +1150,7 @@ int kernel_kexec(void)
 		error = dpm_suspend_end(PMSG_FREEZE);
 		if (error)
 			goto Resume_devices;
-		error = disable_nonboot_cpus();
+		error = suspend_disable_secondary_cpus();
 		if (error)
 			goto Enable_cpus;
 		local_irq_disable();
@@ -1183,7 +1183,7 @@ int kernel_kexec(void)
  Enable_irqs:
 		local_irq_enable();
  Enable_cpus:
-		enable_nonboot_cpus();
+		suspend_enable_secondary_cpus();
 		dpm_resume_start(PMSG_RESTORE);
  Resume_devices:
 		dpm_resume_end(PMSG_RESTORE);
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index abef759de7c8..cfc7a57049e4 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -281,7 +281,7 @@ static int create_image(int platform_mode)
 	if (error || hibernation_test(TEST_PLATFORM))
 		goto Platform_finish;
 
-	error = disable_nonboot_cpus();
+	error = suspend_disable_secondary_cpus();
 	if (error || hibernation_test(TEST_CPUS))
 		goto Enable_cpus;
 
@@ -323,7 +323,7 @@ static int create_image(int platform_mode)
 	local_irq_enable();
 
  Enable_cpus:
-	enable_nonboot_cpus();
+	suspend_enable_secondary_cpus();
 
  Platform_finish:
 	platform_finish(platform_mode);
@@ -417,7 +417,7 @@ int hibernation_snapshot(int platform_mode)
 
 int __weak hibernate_resume_nonboot_cpu_disable(void)
 {
-	return disable_nonboot_cpus();
+	return suspend_disable_secondary_cpus();
 }
 
 /**
@@ -486,7 +486,7 @@ static int resume_target_kernel(bool platform_mode)
 	local_irq_enable();
 
  Enable_cpus:
-	enable_nonboot_cpus();
+	suspend_enable_secondary_cpus();
 
  Cleanup:
 	platform_restore_cleanup(platform_mode);
@@ -564,7 +564,7 @@ int hibernation_platform_enter(void)
 	if (error)
 		goto Platform_finish;
 
-	error = disable_nonboot_cpus();
+	error = suspend_disable_secondary_cpus();
 	if (error)
 		goto Enable_cpus;
 
@@ -586,7 +586,7 @@ int hibernation_platform_enter(void)
 	local_irq_enable();
 
  Enable_cpus:
-	enable_nonboot_cpus();
+	suspend_enable_secondary_cpus();
 
  Platform_finish:
 	hibernation_ops->finish();
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 0bd595a0b610..59b6def23046 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -428,7 +428,7 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
 	if (suspend_test(TEST_PLATFORM))
 		goto Platform_wake;
 
-	error = disable_nonboot_cpus();
+	error = suspend_disable_secondary_cpus();
 	if (error || suspend_test(TEST_CPUS))
 		goto Enable_cpus;
 
@@ -458,7 +458,7 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
 	BUG_ON(irqs_disabled());
 
  Enable_cpus:
-	enable_nonboot_cpus();
+	suspend_enable_secondary_cpus();
 
  Platform_wake:
 	platform_resume_noirq(state);
-- 
2.20.1


^ permalink raw reply related

* [PATCH v2 1/5] sched/core: allow the remote scheduler tick to be started on CPU0
From: Nicholas Piggin @ 2019-04-11  3:34 UTC (permalink / raw)
  To: Thomas Gleixner, Frederic Weisbecker
  Cc: linux-arch, Peter Zijlstra, Rafael J . Wysocki, linux-kernel,
	Nicholas Piggin, Ingo Molnar, linuxppc-dev
In-Reply-To: <20190411033448.20842-1-npiggin@gmail.com>

This has no effect yet because CPU0 will always be a housekeeping CPU
until a later change.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4778c48a7fda..10e05ec049b6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5918,7 +5918,7 @@ void __init sched_init_smp(void)
 
 static int __init migration_init(void)
 {
-	sched_rq_cpu_starting(smp_processor_id());
+	sched_cpu_starting(smp_processor_id());
 	return 0;
 }
 early_initcall(migration_init);
-- 
2.20.1


^ permalink raw reply related

* [PATCH v2 0/5] Allow CPU0 to be nohz full
From: Nicholas Piggin @ 2019-04-11  3:34 UTC (permalink / raw)
  To: Thomas Gleixner, Frederic Weisbecker
  Cc: linux-arch, Peter Zijlstra, Rafael J . Wysocki, linux-kernel,
	Nicholas Piggin, Ingo Molnar, linuxppc-dev

Since last time, I added a compile time option to opt-out of this
if the platform does not support suspend on non-zero, and tried to
improve legibility of changelogs and explain the justification
better.

I have been testing this on powerpc/pseries and it seems to work
fine (the firmware call to suspend can be called on any CPU and
resumes where it left off), but not included here because the
code has some bitrot unrelated to this series which I hacked to
fix. I will discuss it and either send an acked patch to go with
this series if it is small, or fix it in powerpc tree.

Thanks,
Nick

Nicholas Piggin (5):
  sched/core: allow the remote scheduler tick to be started on CPU0
  PM / suspend: add function to disable secondaries for suspend
  kernel/cpu: Allow non-zero CPU to be primary for suspend / kexec
    freeze
  kernel/sched/isolation: require a present CPU in housekeeping mask
  nohz_full: Allow the boot CPU to be nohz_full

 include/linux/cpu.h       | 15 ++++++++++++
 kernel/cpu.c              | 10 +++++++-
 kernel/kexec_core.c       |  4 ++--
 kernel/power/Kconfig      |  9 +++++++
 kernel/power/hibernate.c  | 12 +++++-----
 kernel/power/suspend.c    |  4 ++--
 kernel/sched/core.c       |  2 +-
 kernel/sched/isolation.c  | 18 ++++++++++----
 kernel/time/tick-common.c | 50 +++++++++++++++++++++++++++++++++++----
 kernel/time/tick-sched.c  | 34 ++++++++++++++++++--------
 11 files changed, 131 insertions(+), 31 deletions(-)

-- 
2.20.1


^ permalink raw reply

* Re: [PATCH v2] powerpc/watchdog: Use hrtimers for per-CPU heartbeat
From: Ravi Bangoria @ 2019-04-11  3:23 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: Gautham R . Shenoy, Ravikumar Bangoria, linuxppc-dev
In-Reply-To: <20190409044005.26446-1-npiggin@gmail.com>



On 4/9/19 10:10 AM, Nicholas Piggin wrote:
> Using a jiffies timer creates a dependency on the tick_do_timer_cpu
> incrementing jiffies. If that CPU has locked up and jiffies is not
> incrementing, the watchdog heartbeat timer for all CPUs stops and
> creates false positives and confusing warnings on local CPUs, and
> also causes the SMP detector to stop, so the root cause is never
> detected.
> 
> Fix this by using hrtimer based timers for the watchdog heartbeat,
> like the generic kernel hardlockup detector.
> 
> Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Reported-by: Ravikumar Bangoria <ravi.bangoria@in.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

This one is giving me a proper backtrace when hardlockup happens
with perf_fuzzer so,
Tested-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>

Neat:
Reported-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>


^ permalink raw reply

* Re: [PATCH v5 16/16] KVM: PPC: Book3S HV: XIVE: introduce a 'release' device operation
From: Paul Mackerras @ 2019-04-11  3:16 UTC (permalink / raw)
  To: Cédric Le Goater
  Cc: kvm, kvm-ppc, Paolo Bonzini, linuxppc-dev, David Gibson
In-Reply-To: <20190410170448.3923-17-clg@kaod.org>

On Wed, Apr 10, 2019 at 07:04:48PM +0200, Cédric Le Goater wrote:
> When a P9 sPAPR VM boots, the CAS negotiation process determines which
> interrupt mode to use (XICS legacy or XIVE native) and invokes a
> machine reset to activate the chosen mode.
> 
> To be able to switch from one mode to another, we introduce the
> capability to release a KVM device without destroying the VM. The KVM
> device interface is extended with a new 'release' operation which is
> called when the file descriptor of the device is closed.

I believe the release operation is not called until all of the mmaps
using the fd are unmapped - which is a good thing for us, since it
means the guest can't possibly be accessing the XIVE directly.
You might want to reword that last paragraph to mention that.

> Such operations are defined for the XICS-on-XIVE and the XIVE native
> KVM devices. They clear the vCPU interrupt presenters that could be
> attached and then destroy the device.
> 
> This is not considered as a safe operation as the vCPUs are still
> running and could be referencing the KVM device through their
> presenters. To protect the system from any breakage, the kvmppc_xive
> objects representing both KVM devices are now stored in an array under
> the VM. Allocation is performed on first usage and memory is freed
> only when the VM exits.

One quick comment below:

> diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c
> index 480a3fc6b9fd..064a9f2ae678 100644
> --- a/arch/powerpc/kvm/book3s_xive.c
> +++ b/arch/powerpc/kvm/book3s_xive.c
> @@ -1100,11 +1100,19 @@ void kvmppc_xive_disable_vcpu_interrupts(struct kvm_vcpu *vcpu)
>  void kvmppc_xive_cleanup_vcpu(struct kvm_vcpu *vcpu)
>  {
>  	struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
> -	struct kvmppc_xive *xive = xc->xive;
> +	struct kvmppc_xive *xive;
>  	int i;
>  
> +	if (!kvmppc_xics_enabled(vcpu))
> +		return;

Should that be kvmppc_xive_enabled() rather than xics?

Paul.

^ permalink raw reply

* RE: [EXT] Re: [PATCH V2] ASoC: fsl_esai: replace fall-through with break
From: S.j. Wang @ 2019-04-11  3:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel@alsa-project.org, timur@kernel.org,
	gustavo@embeddedor.com, linuxppc-dev@lists.ozlabs.org,
	Xiubo.Lee@gmail.com, nicoleotsuka@gmail.com, festevam@gmail.com
In-Reply-To: <20190410112813.GL6106@sirena.org.uk>

Hi Mark

> 
> On Wed, Apr 10, 2019 at 02:42:45AM +0000, S.j. Wang wrote:
> > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be independent
> of
> > each other, so replace fall-through with break.
> 
> This doesn't apply against current code, please check and resend.

Thanks, have sent v4 for update subject according to Gustavo's comments.

[PATCH V4] ASoC: fsl_esai: Fix missing break in switch statement

Best regards
Wang shengjiu

^ permalink raw reply

* [PATCH V4] ASoC: fsl_esai: Fix missing break in switch statement
From: S.j. Wang @ 2019-04-11  3:05 UTC (permalink / raw)
  To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com,
	festevam@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org, gustavo@embeddedor.com
  Cc: linuxppc-dev@lists.ozlabs.org

case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be
independent of each other, so replace fall-through with break.

Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver")

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: <stable@vger.kernel.org>
---
Change in v4
- Add Acked-by and cc stable
- change the subject

 sound/soc/fsl/fsl_esai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 3623aa9a6f2e..15202a637197 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -251,7 +251,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
 		break;
 	case ESAI_HCKT_EXTAL:
 		ecr |= ESAI_ECR_ETI;
-		/* fall through */
+		break;
 	case ESAI_HCKR_EXTAL:
 		ecr |= ESAI_ECR_ERI;
 		break;
-- 
1.9.1


^ permalink raw reply related

* RE: [EXT] [alsa-devel] [PATCH V3] ASoC: fsl_esai: Fix missing break in switch statement
From: S.j. Wang @ 2019-04-11  3:01 UTC (permalink / raw)
  To: S.j. Wang, timur@kernel.org, nicoleotsuka@gmail.com,
	Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org, gustavo@embeddedor.com
  Cc: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <f1b910498324783f39b66a229c4abb80738097de.1554951087.git.shengjiu.wang@nxp.com>

Hi
> 
> 
> case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be independent
> of each other, so replace fall-through with break.
> 
> Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver")
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> Cc: <stable@vger.kernel.org>

Forget to add Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> , will send v4, sorry.

> ---
> changes in v3
> - add cc stable
> - change the subject
> 
>  sound/soc/fsl/fsl_esai.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index
> 3623aa9a6f2e..15202a637197 100644
> --- a/sound/soc/fsl/fsl_esai.c
> +++ b/sound/soc/fsl/fsl_esai.c
> @@ -251,7 +251,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai
> *dai, int clk_id,
>                 break;
>         case ESAI_HCKT_EXTAL:
>                 ecr |= ESAI_ECR_ETI;
> -               /* fall through */
> +               break;
>         case ESAI_HCKR_EXTAL:
>                 ecr |= ESAI_ECR_ERI;
>                 break;
> --

^ permalink raw reply

* [PATCH V3] ASoC: fsl_esai: Fix missing break in switch statement
From: S.j. Wang @ 2019-04-11  2:53 UTC (permalink / raw)
  To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com,
	festevam@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org, gustavo@embeddedor.com
  Cc: linuxppc-dev@lists.ozlabs.org

case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be
independent of each other, so replace fall-through with break.

Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver")

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Cc: <stable@vger.kernel.org>
---
changes in v3
- add cc stable
- change the subject

 sound/soc/fsl/fsl_esai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 3623aa9a6f2e..15202a637197 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -251,7 +251,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
 		break;
 	case ESAI_HCKT_EXTAL:
 		ecr |= ESAI_ECR_ETI;
-		/* fall through */
+		break;
 	case ESAI_HCKR_EXTAL:
 		ecr |= ESAI_ECR_ERI;
 		break;
-- 
1.9.1


^ permalink raw reply related

* RE: [EXT] Re: [PATCH V2] ASoC: fsl_esai: replace fall-through with break
From: S.j. Wang @ 2019-04-11  2:48 UTC (permalink / raw)
  To: Gustavo A. R. Silva, timur@kernel.org, nicoleotsuka@gmail.com,
	Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org
  Cc: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <b68a4e3a-8568-0c6e-aa3a-947e62e4f0f5@embeddedor.com>

Hi

> 
> 
> On 4/9/19 9:42 PM, S.j. Wang wrote:
> > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be independent
> of
> > each other, so replace fall-through with break.
> >
> I think you should change the subject line to:
> 
> fix missing break in switch statement
> 
> ...because you are fixing a bug, and it's important to put emphasis on that in
> the subject line.
> 
> Also, notice that this bug has been out there for more than 5 years now, so
> you should also tag this for stable.
> 
> Thanks
> --
> Gustavo
>

Ok, will send v3.

 
> 
> > Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver")
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> > Changes in v2
> > - fix the fixes tag.
> >
> >  sound/soc/fsl/fsl_esai.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index
> > c7410bbfd2af..bad0dfed6b68 100644
> > --- a/sound/soc/fsl/fsl_esai.c
> > +++ b/sound/soc/fsl/fsl_esai.c
> > @@ -251,7 +251,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai
> *dai, int clk_id,
> >               break;
> >       case ESAI_HCKT_EXTAL:
> >               ecr |= ESAI_ECR_ETI;
> > -             /* fall through */
> > +             break;
> >       case ESAI_HCKR_EXTAL:
> >               ecr |= esai_priv->synchronous ? ESAI_ECR_ETI : ESAI_ECR_ERI;
> >               break;
> >

^ permalink raw reply

* MAINTAINERS: Remove non-existent VAS file
From: Sukadev Bhattiprolu @ 2019-04-11  1:38 UTC (permalink / raw)
  To: mpe; +Cc: Joe Perches, linuxppc-dev, linux-kernel


The file arch/powerpc/include/uapi/asm/vas.h was considered but
never merged and should be removed from the MAINTAINERS file.

While here, add missing email address.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
---
 MAINTAINERS | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 3671fde..e3bf3d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7386,13 +7386,12 @@ S:	Supported
 F:	drivers/net/ethernet/ibm/ibmvnic.*
 
 IBM Power Virtual Accelerator Switchboard
-M:	Sukadev Bhattiprolu
+M:	Sukadev Bhattiprolu <sukadev@linux.ibm.com>
 L:	linuxppc-dev@lists.ozlabs.org
 S:	Supported
 F:	arch/powerpc/platforms/powernv/vas*
 F:	arch/powerpc/platforms/powernv/copy-paste.h
 F:	arch/powerpc/include/asm/vas.h
-F:	arch/powerpc/include/uapi/asm/vas.h
 
 IBM Power Virtual Ethernet Device Driver
 M:	Thomas Falcon <tlfalcon@linux.ibm.com>
-- 
1.8.3.1


^ permalink raw reply related

* Re: [RFC PATCH v2 10/14] kernel/watchdog: Add a function to obtain the watchdog_allowed_mask
From: Ricardo Neri @ 2019-04-11  1:15 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Rafael J. Wysocki, Alexei Starovoitov, Kai-Heng Feng,
	Paul Mackerras, H. Peter Anvin, sparclinux, Ingo Molnar,
	Christoffer Dall, Davidlohr Bueso, Ashok Raj, x86, David Rientjes,
	Andi Kleen, Waiman Long, Borislav Petkov, Don Zickus,
	Ravi V. Shankar, Konrad Rzeszutek Wilk, Marc Zyngier,
	Frederic Weisbecker, Nicholas Piggin, Ricardo Neri,
	Byungchul Park, Mathieu Desnoyers, Josh Poimboeuf,
	Paul E. McKenney, Thomas Gleixner, Tony Luck, Babu Moger,
	Randy Dunlap, linux-kernel, Luis R. Rodriguez, Masami Hiramatsu,
	Philippe Ombredanne, Colin Ian King, Andrew Morton, linuxppc-dev,
	David S. Miller
In-Reply-To: <20190409113421.GU4038@hirez.programming.kicks-ass.net>

On Tue, Apr 09, 2019 at 01:34:21PM +0200, Peter Zijlstra wrote:
> On Wed, Feb 27, 2019 at 08:05:14AM -0800, Ricardo Neri wrote:
> > diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> > index 8fbfda94a67b..367aa81294ef 100644
> > --- a/kernel/watchdog.c
> > +++ b/kernel/watchdog.c
> > @@ -44,7 +44,7 @@ int __read_mostly soft_watchdog_user_enabled = 1;
> >  int __read_mostly watchdog_thresh = 10;
> >  int __read_mostly nmi_watchdog_available;
> >  
> > -struct cpumask watchdog_allowed_mask __read_mostly;
> > +static struct cpumask watchdog_allowed_mask __read_mostly;
> >  
> >  struct cpumask watchdog_cpumask __read_mostly;
> >  unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdog_cpumask);
> 
> Hurmph, more struct cpumask, ideally this would get converted to
> cpumask_var_t, I don't think we need this before the allocators work, do
> we?

I see mm_init() is called before lockup_detector_init(); both from start_kernel().
Thus, IMHO, kzalloc should work at this point.

Thanks and BR,
Ricardo

^ permalink raw reply

* Re: [PATCH v3] powerpc/pseries: Only wait for dying CPU after call to rtas_stop_self()
From: Thiago Jung Bauermann @ 2019-04-10 23:08 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Gautham R Shenoy, Michael Bringmann, linux-kernel, Tyrel Datwyler
In-Reply-To: <20190311193517.23756-1-bauerman@linux.ibm.com>


Hello,

Ping?

-- 
Thiago Jung Bauermann
IBM Linux Technology Center


Thiago Jung Bauermann <bauerman@linux.ibm.com> writes:

> When testing DLPAR CPU add/remove on a system under stress,
> pseries_cpu_die() doesn't wait long enough for a CPU to die:
>
> [  446.983944] cpu 148 (hwid 148) Ready to die...
> [  446.984062] cpu 149 (hwid 149) Ready to die...
> [  446.993518] cpu 150 (hwid 150) Ready to die...
> [  446.993543] Querying DEAD? cpu 150 (150) shows 2
> [  446.994098] cpu 151 (hwid 151) Ready to die...
> [  447.133726] cpu 136 (hwid 136) Ready to die...
> [  447.403532] cpu 137 (hwid 137) Ready to die...
> [  447.403772] cpu 138 (hwid 138) Ready to die...
> [  447.403839] cpu 139 (hwid 139) Ready to die...
> [  447.403887] cpu 140 (hwid 140) Ready to die...
> [  447.403937] cpu 141 (hwid 141) Ready to die...
> [  447.403979] cpu 142 (hwid 142) Ready to die...
> [  447.404038] cpu 143 (hwid 143) Ready to die...
> [  447.513546] cpu 128 (hwid 128) Ready to die...
> [  447.693533] cpu 129 (hwid 129) Ready to die...
> [  447.693999] cpu 130 (hwid 130) Ready to die...
> [  447.703530] cpu 131 (hwid 131) Ready to die...
> [  447.704087] Querying DEAD? cpu 132 (132) shows 2
> [  447.704102] cpu 132 (hwid 132) Ready to die...
> [  447.713534] cpu 133 (hwid 133) Ready to die...
> [  447.714064] Querying DEAD? cpu 134 (134) shows 2
>
> This is a race between one CPU stopping and another one calling
> pseries_cpu_die() to wait for it to stop. That function does a short busy
> loop calling RTAS query-cpu-stopped-state on the stopping CPU to verify
> that it is stopped, but I think there's a lot for the stopping CPU to do
> which may take longer than this loop allows.
>
> As can be seen in the dmesg right before or after the "Querying DEAD?"
> messages, if pseries_cpu_die() waited a little longer it would have seen
> the CPU in the stopped state.
>
> What I think is going on is that CPU 134 was inactive at the time it was
> unplugged. In that case, dlpar_offline_cpu() calls H_PROD on that CPU and
> immediately calls pseries_cpu_die(). Meanwhile, the prodded CPU activates
> and start the process of stopping itself. The busy loop is not long enough
> to allow for the CPU to wake up and complete the stopping process.
>
> This can be a problem because if the busy loop finishes too early, then the
> kernel may offline another CPU before the previous one finished dying,
> which would lead to two concurrent calls to rtas-stop-self, which is
> prohibited by the PAPR.
>
> We can make the race a lot more even if we only start querying if the CPU
> is stopped when the stopping CPU is close to call rtas_stop_self(). Since
> pseries_mach_cpu_die() sets the CPU current state to offline almost
> immediately before calling rtas_stop_self(), we use that as a signal that
> it is either already stopped or very close to that point, and we can start
> the busy loop.
>
> As suggested by Michael Ellerman, this patch also changes the busy loop to
> wait for a fixed amount of wall time. Based on the measurements that
> Gautham did on a POWER9 system, in successful cases of
> smp_query_cpu_stopped(cpu) returning affirmative, the maximum time spent
> inside the loop was was 10 ms. This patch loops for 20 ms just be sure.
>
> Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> Analyzed-by: Gautham R Shenoy <ego@linux.vnet.ibm.com>
> ---
>  arch/powerpc/platforms/pseries/hotplug-cpu.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> I have seen this problem since v4.8. Should this patch go to stable as
> well?
>
> Changes since v2:
> - Increaded busy loop to 200 iterations so that it can last up to 20 ms
>   (suggested by Gautham).
> - Changed commit message to include Gautham's remarks.
>
> diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> index 97feb6e79f1a..ac6dc35ab829 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> @@ -214,13 +214,22 @@ static void pseries_cpu_die(unsigned int cpu)
>  			msleep(1);
>  		}
>  	} else if (get_preferred_offline_state(cpu) == CPU_STATE_OFFLINE) {
> +		/*
> +		 * If the current state is not offline yet, it means that the
> +		 * dying CPU (which is either in pseries_mach_cpu_die() or in
> +		 * the process of getting there) didn't have a chance yet to
> +		 * call rtas_stop_self() and therefore it's too early to query
> +		 * if the CPU is stopped.
> +		 */
> +		spin_event_timeout(get_cpu_current_state(cpu) == CPU_STATE_OFFLINE,
> +				   100000, 100);
>  
> -		for (tries = 0; tries < 25; tries++) {
> +		for (tries = 0; tries < 200; tries++) {
>  			cpu_status = smp_query_cpu_stopped(pcpu);
>  			if (cpu_status == QCSS_STOPPED ||
>  			    cpu_status == QCSS_HARDWARE_ERROR)
>  				break;
> -			cpu_relax();
> +			udelay(100);
>  		}
>  	}
>  


^ permalink raw reply

* Re: [PATCH] Linux: Define struct termios2 in <termios.h> under _GNU_SOURCE [BZ #10339]
From: Adhemerval Zanella @ 2019-04-10 20:24 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha; +Cc: linux-api, linuxppc-dev, hpa
In-Reply-To: <875zrnlakd.fsf@oldenburg2.str.redhat.com>



On 09/04/2019 07:47, Florian Weimer wrote:
> struct termios2 is required for setting arbitrary baud rates on serial
> ports.  <sys/ioctl.h> and <linux/termios.h> have conflicting
> definitions in the existing termios definitions, which means that it
> is currently very difficult to use TCGETS2/TCSETS2 and struct termios2
> with glibc.  Providing a definition within glibc resolves this problem.
> 
> This does not completely address bug 10339, but it at least exposes
> the current kernel functionality in this area.
> 
> Support for struct termios2 is architecture-specific in the kernel.
> Support on alpha was only added in Linux 4.20.  POWER support is
> currently missing.  The expectation is that the kernel will eventually
> use the generic UAPI definition for struct termios2.

I still think the better strategy, from both BZ#10339 and recent thread
discussion about the issue on libc-alpha, is rather to:

  1. Start to use termios2 ioctl kabi instead of termios1.  The only
     missing spot is alpha pre linux 4.20.

  2. Adjust sparc and mips to add c_ispeed and c_ospeed along with
     compat symbols to use termios1.  This will allow also some cleanup
     to remove _HAVE_STRUCT_TERMIOS_C_{O,I}SPEED.

  3. Use the compat symbols for alpha pre-4.20.

  4. With termios Linux ABI being essentially the same for all supported
     architectures (with support for c_ospeed and c_ispeed) we can move 
     forward to adapt the current cfgetospeed, cfgetispeed, cfsetospeed,
     cfsetispeed to work with arbitrary values.

     The POSIX and Linux extended BXX values will need to be handled 
     exceptionally.  It means their integers values will be reserved and
     mapped to the termios2 values.  The code resulting code for cfsetospeed,
     for instance, would be:

     ---
     static inline speed_t
     c_ispeed (tcflag_t c_cflag)
     {
       return (c_cflag >> IBSHIFT) & CBAUD;
     }

     /*
      * The top four bits in speed_t are reserved for future use, and *currently*
      * the equivalent values are the only valid baud_t values.
      */
     static inline bool         
     invalid_speed (speed_t x)
     {
       return x > 0x0fffffff;
     } 

     /* Set the output baud rate stored in *TERMIOS_P to the symbol SPEED */
     int
     cfsetospeed (struct termios *termios_p, speed_t speed)
     {
       if (invalid_speed (speed))
         {
           __set_errno (EINVAL); 
           return -1;
         }

       termios_p->c_ospeed = speed_kernel_from_user (speed);
       if ( c_ispeed (termios_p->c_cflag) == B0 )
         termios_p->c_ispeed = termios_p->c_ospeed;
  
       if ( (speed & ~CBAUD) != 0 || speed > _MAX_BAUD )
         speed = BOTHER;

       /*
        * Don't set the input flags here; the B0 in c_cflag indicates that
        * the input speed is tied to the output speed.
        */
       termios_p->c_cflag = (termios_p->c_cflag & ~CBAUD) | speed;
       return 0;
     } 
     ---

This allows us to adjust the baud rates to non-standard values using termios
interfaces without to resorting to add new headers and use a different API
(ioctl).

As Peter Anvin has indicated, he create a POC [1] with the aforementioned
new interfaces.  It has not been rebased against master, more specially against
my termios refactor to simplify the multiple architecture header definitions,
but I intend to use as a base.

> 
> 2019-04-09  Florian Weimer  <fweimer@redhat.com>
> 
> 	[BZ #10339]
> 	Linux: Define struct termios2 in <termios.h> under _GNU_SOURCE.
> 	* sysdeps/unix/sysv/linux/Makefile [$(subdir) == termios] (tests):
> 	Add tst-termios2.
> 	* sysdeps/unix/sysv/linux/tst-termios2.c: New file.
> 	* sysdeps/unix/sysv/linux/bits/termios2-struct.h: Likewise.
> 	* sysdeps/unix/sysv/linux/bits/termios.h [__USE_GNU]: Include it.
> 	* sysdeps/unix/sysv/linux/alpha/bits/termios2-struct.h: New file.
> 	* sysdeps/unix/sysv/linux/sparc/bits/termios2-struct.h: Likewise.
> 
> diff --git a/NEWS b/NEWS
> index b58e2469d4..5e6ecb9c7d 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -18,6 +18,9 @@ Major new features:
>  
>  * On Linux, the gettid function has been added.
>  
> +* On Linux, <termios.h> now provides a definition of struct termios2 with
> +  the _GNU_SOURCE feature test macro.
> +
>  * Minguo (Republic of China) calendar support has been added as an
>    alternative calendar for the following locales: zh_TW, cmn_TW, hak_TW,
>    nan_TW, lzh_TW.
> diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
> index 52ac6ad484..4cb5e4f0d2 100644
> --- a/sysdeps/unix/sysv/linux/Makefile
> +++ b/sysdeps/unix/sysv/linux/Makefile
> @@ -156,6 +156,7 @@ endif
>  
>  ifeq ($(subdir),termios)
>  sysdep_headers += termio.h
> +tests += tst-termios2
>  endif
>  
>  ifeq ($(subdir),posix)
> diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios2-struct.h b/sysdeps/unix/sysv/linux/alpha/bits/termios2-struct.h
> new file mode 100644
> index 0000000000..5f09445e23
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios2-struct.h
> @@ -0,0 +1,33 @@
> +/* struct termios2 definition.  Linux/alpha version.
> +   Copyright (C) 2019 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library.  If not, see
> +   <http://www.gnu.org/licenses/>.  */
> +
> +#ifndef _TERMIOS_H
> +# error "Never include <bits/termios2-struct.h> directly; use <termios.h> instead."
> +#endif
> +
> +struct termios2
> +{
> +  tcflag_t c_iflag;
> +  tcflag_t c_oflag;
> +  tcflag_t c_cflag;
> +  tcflag_t c_lflag;
> +  cc_t c_cc[NCCS];
> +  cc_t c_line;
> +  speed_t c_ispeed;
> +  speed_t c_ospeed;
> +};
> diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
> index 997231cd03..45ac7affdf 100644
> --- a/sysdeps/unix/sysv/linux/bits/termios.h
> +++ b/sysdeps/unix/sysv/linux/bits/termios.h
> @@ -25,6 +25,10 @@ typedef unsigned int	speed_t;
>  typedef unsigned int	tcflag_t;
>  
>  #include <bits/termios-struct.h>
> +#ifdef __USE_GNU
> +# include <bits/termios2-struct.h>
> +#endif
> +
>  #include <bits/termios-c_cc.h>
>  #include <bits/termios-c_iflag.h>
>  #include <bits/termios-c_oflag.h>
> diff --git a/sysdeps/unix/sysv/linux/bits/termios2-struct.h b/sysdeps/unix/sysv/linux/bits/termios2-struct.h
> new file mode 100644
> index 0000000000..5a48e45ef3
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/bits/termios2-struct.h
> @@ -0,0 +1,33 @@
> +/* struct termios2 definition.  Linux/generic version.
> +   Copyright (C) 2019 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library.  If not, see
> +   <http://www.gnu.org/licenses/>.  */
> +
> +#ifndef _TERMIOS_H
> +# error "Never include <bits/termios2-struct.h> directly; use <termios.h> instead."
> +#endif
> +
> +struct termios2
> +{
> +  tcflag_t c_iflag;
> +  tcflag_t c_oflag;
> +  tcflag_t c_cflag;
> +  tcflag_t c_lflag;
> +  cc_t c_line;
> +  cc_t c_cc[NCCS];
> +  speed_t c_ispeed;
> +  speed_t c_ospeed;
> +};
> diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios2-struct.h b/sysdeps/unix/sysv/linux/sparc/bits/termios2-struct.h
> new file mode 100644
> index 0000000000..7c889e575c
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/sparc/bits/termios2-struct.h
> @@ -0,0 +1,33 @@
> +/* struct termios2 definition.  Linux/sparc version.
> +   Copyright (C) 2019 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library.  If not, see
> +   <http://www.gnu.org/licenses/>.  */
> +
> +#ifndef _TERMIOS_H
> +# error "Never include <bits/termios2-struct.h> directly; use <termios.h> instead."
> +#endif
> +
> +struct termios2
> +{
> +  tcflag_t c_iflag;
> +  tcflag_t c_oflag;
> +  tcflag_t c_cflag;
> +  tcflag_t c_lflag;
> +  cc_t c_line;
> +  cc_t c_cc[NCCS + 2];
> +  speed_t c_ispeed;
> +  speed_t c_ospeed;
> +};
> diff --git a/sysdeps/unix/sysv/linux/tst-termios2.c b/sysdeps/unix/sysv/linux/tst-termios2.c
> new file mode 100644
> index 0000000000..82326a1288
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/tst-termios2.c
> @@ -0,0 +1,48 @@
> +/* Minimal test of struct termios2 definition.
> +   Copyright (C) 2019 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library.  If not, see
> +   <http://www.gnu.org/licenses/>.  */
> +
> +#include <termios.h>
> +#include <sys/ioctl.h>
> +
> +/* This function is never executed, but must be compiled successfully.
> +   Accessing serial ports in the test suite is problematic because
> +   they likely correspond with low-level system functionality.  */
> +void
> +not_executed (int fd)
> +{
> +  /* Avoid a compilation failure if TCGETS2, TCSETS2 are not
> +     defined.  */
> +#if defined (TCGETS2) && defined (TCSETS2)
> +  struct termios2 ti;
> +  ioctl (fd, TCGETS2, &ti);
> +  ioctl (fd, TCSETS2, &ti);
> +#endif
> +}
> +
> +static int
> +do_test (void)
> +{
> +  /* Fail at run time if TCGETS2 or TCSETS2 is not defined.  */
> +#if defined (TCGETS2) && defined (TCSETS2)
> +  return 0;
> +#else
> +  return 1;
> +#endif
> +}
> +
> +#include <support/test-driver.c>
> 

^ permalink raw reply

* [PATCH v2 21/21] docs: hwmon: Add an index file and rename docs to *.rst
From: Mauro Carvalho Chehab @ 2019-04-10 19:22 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mark Rutland, Dirk Eibach, linux-aspeed, devicetree,
	Clemens Ladisch, Kamil Debski, Marc Hulsman, Huang Rui,
	Paul Mackerras, Mauro Carvalho Chehab, Jim Cromie,
	Lorenzo Pieralisi, Jonathan Corbet, Joel Stanley, Guenter Roeck,
	Steve Glendinning, Fenghua Yu, Jean Delvare,
	Bartlomiej Zolnierkiewicz, Liviu Dudau, Mauro Carvalho Chehab,
	Hans de Goede, Rob Herring, Rudolf Marek, linux-arm-kernel,
	linux-hwmon, Support Opensource, George Joseph, Andreas Werner,
	Andrew Jeffery, patches, linux-kernel, Juerg Haefliger,
	Sudeep Holla, linuxppc-dev
In-Reply-To: <cover.1554923967.git.mchehab+samsung@kernel.org>

Now that all files were converted to ReST format, rename them
and add an index.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 .../devicetree/bindings/hwmon/g762.txt        |   2 +-
 Documentation/hwmon/{ab8500 => ab8500.rst}    |   2 +-
 ...guru-datasheet => abituguru-datasheet.rst} |   0
 .../hwmon/{abituguru => abituguru.rst}        |   0
 .../hwmon/{abituguru3 => abituguru3.rst}      |   0
 Documentation/hwmon/{abx500 => abx500.rst}    |   0
 ...{acpi_power_meter => acpi_power_meter.rst} |   2 +-
 Documentation/hwmon/{ad7314 => ad7314.rst}    |   0
 .../hwmon/{adc128d818 => adc128d818.rst}      |   0
 Documentation/hwmon/{adm1021 => adm1021.rst}  |   0
 Documentation/hwmon/{adm1025 => adm1025.rst}  |   0
 Documentation/hwmon/{adm1026 => adm1026.rst}  |   0
 Documentation/hwmon/{adm1031 => adm1031.rst}  |   0
 Documentation/hwmon/{adm1275 => adm1275.rst}  |   4 +-
 Documentation/hwmon/{adm9240 => adm9240.rst}  |   0
 Documentation/hwmon/{ads1015 => ads1015.rst}  |   0
 Documentation/hwmon/{ads7828 => ads7828.rst}  |   0
 Documentation/hwmon/{adt7410 => adt7410.rst}  |   0
 Documentation/hwmon/{adt7411 => adt7411.rst}  |   0
 Documentation/hwmon/{adt7462 => adt7462.rst}  |   0
 Documentation/hwmon/{adt7470 => adt7470.rst}  |   0
 Documentation/hwmon/{adt7475 => adt7475.rst}  |   0
 Documentation/hwmon/{amc6821 => amc6821.rst}  |   0
 Documentation/hwmon/{asb100 => asb100.rst}    |   0
 Documentation/hwmon/{asc7621 => asc7621.rst}  |   0
 ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} |   0
 .../hwmon/{coretemp => coretemp.rst}          |   0
 Documentation/hwmon/{da9052 => da9052.rst}    |   0
 Documentation/hwmon/{da9055 => da9055.rst}    |   0
 Documentation/hwmon/{dme1737 => dme1737.rst}  |   0
 Documentation/hwmon/{ds1621 => ds1621.rst}    |   0
 Documentation/hwmon/{ds620 => ds620.rst}      |   0
 Documentation/hwmon/{emc1403 => emc1403.rst}  |   0
 Documentation/hwmon/{emc2103 => emc2103.rst}  |   0
 .../hwmon/{emc6w201 => emc6w201.rst}          |   0
 Documentation/hwmon/{f71805f => f71805f.rst}  |   0
 .../hwmon/{f71882fg => f71882fg.rst}          |   0
 .../hwmon/{fam15h_power => fam15h_power.rst}  |   0
 .../hwmon/{ftsteutates => ftsteutates.rst}    |   0
 Documentation/hwmon/{g760a => g760a.rst}      |   0
 Documentation/hwmon/{g762 => g762.rst}        |   2 +-
 Documentation/hwmon/{gl518sm => gl518sm.rst}  |   0
 Documentation/hwmon/{hih6130 => hih6130.rst}  |   0
 ...on-kernel-api.txt => hwmon-kernel-api.rst} |   4 +-
 .../hwmon/{ibm-cffps => ibm-cffps.rst}        |   0
 Documentation/hwmon/{ibmaem => ibmaem.rst}    |   0
 .../hwmon/{ibmpowernv => ibmpowernv.rst}      |   0
 Documentation/hwmon/{ina209 => ina209.rst}    |   0
 Documentation/hwmon/{ina2xx => ina2xx.rst}    |   2 +-
 Documentation/hwmon/{ina3221 => ina3221.rst}  |   0
 Documentation/hwmon/index.rst                 | 179 ++++++++++++++++++
 Documentation/hwmon/{ir35221 => ir35221.rst}  |   0
 Documentation/hwmon/{it87 => it87.rst}        |   0
 Documentation/hwmon/{jc42 => jc42.rst}        |   0
 Documentation/hwmon/{k10temp => k10temp.rst}  |   0
 Documentation/hwmon/{k8temp => k8temp.rst}    |   0
 .../hwmon/{lineage-pem => lineage-pem.rst}    |   0
 Documentation/hwmon/{lm25066 => lm25066.rst}  |   2 +-
 Documentation/hwmon/{lm63 => lm63.rst}        |   0
 Documentation/hwmon/{lm70 => lm70.rst}        |   0
 Documentation/hwmon/{lm73 => lm73.rst}        |   0
 Documentation/hwmon/{lm75 => lm75.rst}        |   0
 Documentation/hwmon/{lm77 => lm77.rst}        |   0
 Documentation/hwmon/{lm78 => lm78.rst}        |   0
 Documentation/hwmon/{lm80 => lm80.rst}        |   0
 Documentation/hwmon/{lm83 => lm83.rst}        |   0
 Documentation/hwmon/{lm85 => lm85.rst}        |   0
 Documentation/hwmon/{lm87 => lm87.rst}        |   0
 Documentation/hwmon/{lm90 => lm90.rst}        |   0
 Documentation/hwmon/{lm92 => lm92.rst}        |   0
 Documentation/hwmon/{lm93 => lm93.rst}        |   0
 Documentation/hwmon/{lm95234 => lm95234.rst}  |   0
 Documentation/hwmon/{lm95245 => lm95245.rst}  |   0
 Documentation/hwmon/{ltc2945 => ltc2945.rst}  |   0
 Documentation/hwmon/{ltc2978 => ltc2978.rst}  |   0
 Documentation/hwmon/{ltc2990 => ltc2990.rst}  |   0
 Documentation/hwmon/{ltc3815 => ltc3815.rst}  |   0
 Documentation/hwmon/{ltc4151 => ltc4151.rst}  |   0
 Documentation/hwmon/{ltc4215 => ltc4215.rst}  |   0
 Documentation/hwmon/{ltc4245 => ltc4245.rst}  |   0
 Documentation/hwmon/{ltc4260 => ltc4260.rst}  |   0
 Documentation/hwmon/{ltc4261 => ltc4261.rst}  |   0
 .../hwmon/{max16064 => max16064.rst}          |   2 +-
 .../hwmon/{max16065 => max16065.rst}          |   0
 Documentation/hwmon/{max1619 => max1619.rst}  |   0
 Documentation/hwmon/{max1668 => max1668.rst}  |   0
 Documentation/hwmon/{max197 => max197.rst}    |   0
 .../hwmon/{max20751 => max20751.rst}          |   2 +-
 .../hwmon/{max31722 => max31722.rst}          |   0
 .../hwmon/{max31785 => max31785.rst}          |   0
 .../hwmon/{max31790 => max31790.rst}          |   0
 .../hwmon/{max34440 => max34440.rst}          |   2 +-
 Documentation/hwmon/{max6639 => max6639.rst}  |   0
 Documentation/hwmon/{max6642 => max6642.rst}  |   0
 Documentation/hwmon/{max6650 => max6650.rst}  |   0
 Documentation/hwmon/{max6697 => max6697.rst}  |   0
 Documentation/hwmon/{max8688 => max8688.rst}  |   2 +-
 .../hwmon/{mc13783-adc => mc13783-adc.rst}    |   0
 Documentation/hwmon/{mcp3021 => mcp3021.rst}  |   0
 .../hwmon/{menf21bmc => menf21bmc.rst}        |   0
 .../hwmon/{mlxreg-fan => mlxreg-fan.rst}      |   0
 Documentation/hwmon/{nct6683 => nct6683.rst}  |   0
 Documentation/hwmon/{nct6775 => nct6775.rst}  |   0
 Documentation/hwmon/{nct7802 => nct7802.rst}  |   0
 Documentation/hwmon/{nct7904 => nct7904.rst}  |   0
 .../{npcm750-pwm-fan => npcm750-pwm-fan.rst}  |   0
 Documentation/hwmon/{nsa320 => nsa320.rst}    |   0
 .../{ntc_thermistor => ntc_thermistor.rst}    |   0
 Documentation/hwmon/{occ => occ.rst}          |   0
 Documentation/hwmon/{pc87360 => pc87360.rst}  |   0
 Documentation/hwmon/{pc87427 => pc87427.rst}  |   0
 Documentation/hwmon/{pcf8591 => pcf8591.rst}  |   0
 .../hwmon/{pmbus-core => pmbus-core.rst}      |   0
 Documentation/hwmon/{pmbus => pmbus.rst}      |   0
 .../hwmon/{powr1220 => powr1220.rst}          |   0
 Documentation/hwmon/{pwm-fan => pwm-fan.rst}  |   0
 ...aspberrypi-hwmon => raspberrypi-hwmon.rst} |   0
 Documentation/hwmon/{sch5627 => sch5627.rst}  |   0
 Documentation/hwmon/{sch5636 => sch5636.rst}  |   0
 .../hwmon/{scpi-hwmon => scpi-hwmon.rst}      |   0
 Documentation/hwmon/{sht15 => sht15.rst}      |   0
 Documentation/hwmon/{sht21 => sht21.rst}      |   0
 Documentation/hwmon/{sht3x => sht3x.rst}      |   0
 Documentation/hwmon/{shtc1 => shtc1.rst}      |   0
 Documentation/hwmon/{sis5595 => sis5595.rst}  |   0
 Documentation/hwmon/{smm665 => smm665.rst}    |   0
 .../hwmon/{smsc47b397 => smsc47b397.rst}      |   0
 .../hwmon/{smsc47m1 => smsc47m1.rst}          |   0
 .../hwmon/{smsc47m192 => smsc47m192.rst}      |   0
 ...mitting-patches => submitting-patches.rst} |   6 +-
 .../{sysfs-interface => sysfs-interface.rst}  |   0
 Documentation/hwmon/{tc654 => tc654.rst}      |   0
 Documentation/hwmon/{tc74 => tc74.rst}        |   0
 Documentation/hwmon/{thmc50 => thmc50.rst}    |   0
 Documentation/hwmon/{tmp102 => tmp102.rst}    |   2 +-
 Documentation/hwmon/{tmp103 => tmp103.rst}    |   2 +-
 Documentation/hwmon/{tmp108 => tmp108.rst}    |   2 +-
 Documentation/hwmon/{tmp401 => tmp401.rst}    |   2 +-
 Documentation/hwmon/{tmp421 => tmp421.rst}    |   0
 .../hwmon/{tps40422 => tps40422.rst}          |   2 +-
 ...4030-madc-hwmon => twl4030-madc-hwmon.rst} |   0
 Documentation/hwmon/{ucd9000 => ucd9000.rst}  |   4 +-
 Documentation/hwmon/{ucd9200 => ucd9200.rst}  |   4 +-
 .../{userspace-tools => userspace-tools.rst}  |   0
 .../hwmon/{vexpress => vexpress.rst}          |   0
 Documentation/hwmon/{via686a => via686a.rst}  |   0
 Documentation/hwmon/{vt1211 => vt1211.rst}    |   0
 .../hwmon/{w83627ehf => w83627ehf.rst}        |   0
 .../hwmon/{w83627hf => w83627hf.rst}          |   0
 Documentation/hwmon/{w83773g => w83773g.rst}  |   0
 Documentation/hwmon/{w83781d => w83781d.rst}  |   0
 Documentation/hwmon/{w83791d => w83791d.rst}  |   2 +-
 Documentation/hwmon/{w83792d => w83792d.rst}  |   0
 Documentation/hwmon/{w83793 => w83793.rst}    |   0
 Documentation/hwmon/{w83795 => w83795.rst}    |   0
 .../hwmon/{w83l785ts => w83l785ts.rst}        |   0
 .../hwmon/{w83l786ng => w83l786ng.rst}        |   0
 Documentation/hwmon/{wm831x => wm831x.rst}    |   0
 Documentation/hwmon/{wm8350 => wm8350.rst}    |   0
 .../hwmon/{xgene-hwmon => xgene-hwmon.rst}    |   0
 Documentation/hwmon/{zl6100 => zl6100.rst}    |   2 +-
 Documentation/index.rst                       |   1 +
 Documentation/thermal/sysfs-api.txt           |   2 +-
 MAINTAINERS                                   | 108 +++++------
 drivers/hwmon/Kconfig                         |   8 +-
 drivers/hwmon/ads7828.c                       |   2 +-
 drivers/hwmon/max197.c                        |   2 +-
 drivers/hwmon/sht15.c                         |   2 +-
 include/linux/platform_data/ads7828.h         |   2 +-
 include/linux/platform_data/ds620.h           |   2 +-
 include/linux/platform_data/ina2xx.h          |   2 +-
 include/linux/platform_data/max197.h          |   2 +-
 include/linux/platform_data/ntc_thermistor.h  |   2 +-
 173 files changed, 275 insertions(+), 95 deletions(-)
 rename Documentation/hwmon/{ab8500 => ab8500.rst} (86%)
 rename Documentation/hwmon/{abituguru-datasheet => abituguru-datasheet.rst} (100%)
 rename Documentation/hwmon/{abituguru => abituguru.rst} (100%)
 rename Documentation/hwmon/{abituguru3 => abituguru3.rst} (100%)
 rename Documentation/hwmon/{abx500 => abx500.rst} (100%)
 rename Documentation/hwmon/{acpi_power_meter => acpi_power_meter.rst} (97%)
 rename Documentation/hwmon/{ad7314 => ad7314.rst} (100%)
 rename Documentation/hwmon/{adc128d818 => adc128d818.rst} (100%)
 rename Documentation/hwmon/{adm1021 => adm1021.rst} (100%)
 rename Documentation/hwmon/{adm1025 => adm1025.rst} (100%)
 rename Documentation/hwmon/{adm1026 => adm1026.rst} (100%)
 rename Documentation/hwmon/{adm1031 => adm1031.rst} (100%)
 rename Documentation/hwmon/{adm1275 => adm1275.rst} (97%)
 rename Documentation/hwmon/{adm9240 => adm9240.rst} (100%)
 rename Documentation/hwmon/{ads1015 => ads1015.rst} (100%)
 rename Documentation/hwmon/{ads7828 => ads7828.rst} (100%)
 rename Documentation/hwmon/{adt7410 => adt7410.rst} (100%)
 rename Documentation/hwmon/{adt7411 => adt7411.rst} (100%)
 rename Documentation/hwmon/{adt7462 => adt7462.rst} (100%)
 rename Documentation/hwmon/{adt7470 => adt7470.rst} (100%)
 rename Documentation/hwmon/{adt7475 => adt7475.rst} (100%)
 rename Documentation/hwmon/{amc6821 => amc6821.rst} (100%)
 rename Documentation/hwmon/{asb100 => asb100.rst} (100%)
 rename Documentation/hwmon/{asc7621 => asc7621.rst} (100%)
 rename Documentation/hwmon/{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} (100%)
 rename Documentation/hwmon/{coretemp => coretemp.rst} (100%)
 rename Documentation/hwmon/{da9052 => da9052.rst} (100%)
 rename Documentation/hwmon/{da9055 => da9055.rst} (100%)
 rename Documentation/hwmon/{dme1737 => dme1737.rst} (100%)
 rename Documentation/hwmon/{ds1621 => ds1621.rst} (100%)
 rename Documentation/hwmon/{ds620 => ds620.rst} (100%)
 rename Documentation/hwmon/{emc1403 => emc1403.rst} (100%)
 rename Documentation/hwmon/{emc2103 => emc2103.rst} (100%)
 rename Documentation/hwmon/{emc6w201 => emc6w201.rst} (100%)
 rename Documentation/hwmon/{f71805f => f71805f.rst} (100%)
 rename Documentation/hwmon/{f71882fg => f71882fg.rst} (100%)
 rename Documentation/hwmon/{fam15h_power => fam15h_power.rst} (100%)
 rename Documentation/hwmon/{ftsteutates => ftsteutates.rst} (100%)
 rename Documentation/hwmon/{g760a => g760a.rst} (100%)
 rename Documentation/hwmon/{g762 => g762.rst} (97%)
 rename Documentation/hwmon/{gl518sm => gl518sm.rst} (100%)
 rename Documentation/hwmon/{hih6130 => hih6130.rst} (100%)
 rename Documentation/hwmon/{hwmon-kernel-api.txt => hwmon-kernel-api.rst} (99%)
 rename Documentation/hwmon/{ibm-cffps => ibm-cffps.rst} (100%)
 rename Documentation/hwmon/{ibmaem => ibmaem.rst} (100%)
 rename Documentation/hwmon/{ibmpowernv => ibmpowernv.rst} (100%)
 rename Documentation/hwmon/{ina209 => ina209.rst} (100%)
 rename Documentation/hwmon/{ina2xx => ina2xx.rst} (97%)
 rename Documentation/hwmon/{ina3221 => ina3221.rst} (100%)
 create mode 100644 Documentation/hwmon/index.rst
 rename Documentation/hwmon/{ir35221 => ir35221.rst} (100%)
 rename Documentation/hwmon/{it87 => it87.rst} (100%)
 rename Documentation/hwmon/{jc42 => jc42.rst} (100%)
 rename Documentation/hwmon/{k10temp => k10temp.rst} (100%)
 rename Documentation/hwmon/{k8temp => k8temp.rst} (100%)
 rename Documentation/hwmon/{lineage-pem => lineage-pem.rst} (100%)
 rename Documentation/hwmon/{lm25066 => lm25066.rst} (97%)
 rename Documentation/hwmon/{lm63 => lm63.rst} (100%)
 rename Documentation/hwmon/{lm70 => lm70.rst} (100%)
 rename Documentation/hwmon/{lm73 => lm73.rst} (100%)
 rename Documentation/hwmon/{lm75 => lm75.rst} (100%)
 rename Documentation/hwmon/{lm77 => lm77.rst} (100%)
 rename Documentation/hwmon/{lm78 => lm78.rst} (100%)
 rename Documentation/hwmon/{lm80 => lm80.rst} (100%)
 rename Documentation/hwmon/{lm83 => lm83.rst} (100%)
 rename Documentation/hwmon/{lm85 => lm85.rst} (100%)
 rename Documentation/hwmon/{lm87 => lm87.rst} (100%)
 rename Documentation/hwmon/{lm90 => lm90.rst} (100%)
 rename Documentation/hwmon/{lm92 => lm92.rst} (100%)
 rename Documentation/hwmon/{lm93 => lm93.rst} (100%)
 rename Documentation/hwmon/{lm95234 => lm95234.rst} (100%)
 rename Documentation/hwmon/{lm95245 => lm95245.rst} (100%)
 rename Documentation/hwmon/{ltc2945 => ltc2945.rst} (100%)
 rename Documentation/hwmon/{ltc2978 => ltc2978.rst} (100%)
 rename Documentation/hwmon/{ltc2990 => ltc2990.rst} (100%)
 rename Documentation/hwmon/{ltc3815 => ltc3815.rst} (100%)
 rename Documentation/hwmon/{ltc4151 => ltc4151.rst} (100%)
 rename Documentation/hwmon/{ltc4215 => ltc4215.rst} (100%)
 rename Documentation/hwmon/{ltc4245 => ltc4245.rst} (100%)
 rename Documentation/hwmon/{ltc4260 => ltc4260.rst} (100%)
 rename Documentation/hwmon/{ltc4261 => ltc4261.rst} (100%)
 rename Documentation/hwmon/{max16064 => max16064.rst} (96%)
 rename Documentation/hwmon/{max16065 => max16065.rst} (100%)
 rename Documentation/hwmon/{max1619 => max1619.rst} (100%)
 rename Documentation/hwmon/{max1668 => max1668.rst} (100%)
 rename Documentation/hwmon/{max197 => max197.rst} (100%)
 rename Documentation/hwmon/{max20751 => max20751.rst} (96%)
 rename Documentation/hwmon/{max31722 => max31722.rst} (100%)
 rename Documentation/hwmon/{max31785 => max31785.rst} (100%)
 rename Documentation/hwmon/{max31790 => max31790.rst} (100%)
 rename Documentation/hwmon/{max34440 => max34440.rst} (98%)
 rename Documentation/hwmon/{max6639 => max6639.rst} (100%)
 rename Documentation/hwmon/{max6642 => max6642.rst} (100%)
 rename Documentation/hwmon/{max6650 => max6650.rst} (100%)
 rename Documentation/hwmon/{max6697 => max6697.rst} (100%)
 rename Documentation/hwmon/{max8688 => max8688.rst} (97%)
 rename Documentation/hwmon/{mc13783-adc => mc13783-adc.rst} (100%)
 rename Documentation/hwmon/{mcp3021 => mcp3021.rst} (100%)
 rename Documentation/hwmon/{menf21bmc => menf21bmc.rst} (100%)
 rename Documentation/hwmon/{mlxreg-fan => mlxreg-fan.rst} (100%)
 rename Documentation/hwmon/{nct6683 => nct6683.rst} (100%)
 rename Documentation/hwmon/{nct6775 => nct6775.rst} (100%)
 rename Documentation/hwmon/{nct7802 => nct7802.rst} (100%)
 rename Documentation/hwmon/{nct7904 => nct7904.rst} (100%)
 rename Documentation/hwmon/{npcm750-pwm-fan => npcm750-pwm-fan.rst} (100%)
 rename Documentation/hwmon/{nsa320 => nsa320.rst} (100%)
 rename Documentation/hwmon/{ntc_thermistor => ntc_thermistor.rst} (100%)
 rename Documentation/hwmon/{occ => occ.rst} (100%)
 rename Documentation/hwmon/{pc87360 => pc87360.rst} (100%)
 rename Documentation/hwmon/{pc87427 => pc87427.rst} (100%)
 rename Documentation/hwmon/{pcf8591 => pcf8591.rst} (100%)
 rename Documentation/hwmon/{pmbus-core => pmbus-core.rst} (100%)
 rename Documentation/hwmon/{pmbus => pmbus.rst} (100%)
 rename Documentation/hwmon/{powr1220 => powr1220.rst} (100%)
 rename Documentation/hwmon/{pwm-fan => pwm-fan.rst} (100%)
 rename Documentation/hwmon/{raspberrypi-hwmon => raspberrypi-hwmon.rst} (100%)
 rename Documentation/hwmon/{sch5627 => sch5627.rst} (100%)
 rename Documentation/hwmon/{sch5636 => sch5636.rst} (100%)
 rename Documentation/hwmon/{scpi-hwmon => scpi-hwmon.rst} (100%)
 rename Documentation/hwmon/{sht15 => sht15.rst} (100%)
 rename Documentation/hwmon/{sht21 => sht21.rst} (100%)
 rename Documentation/hwmon/{sht3x => sht3x.rst} (100%)
 rename Documentation/hwmon/{shtc1 => shtc1.rst} (100%)
 rename Documentation/hwmon/{sis5595 => sis5595.rst} (100%)
 rename Documentation/hwmon/{smm665 => smm665.rst} (100%)
 rename Documentation/hwmon/{smsc47b397 => smsc47b397.rst} (100%)
 rename Documentation/hwmon/{smsc47m1 => smsc47m1.rst} (100%)
 rename Documentation/hwmon/{smsc47m192 => smsc47m192.rst} (100%)
 rename Documentation/hwmon/{submitting-patches => submitting-patches.rst} (98%)
 rename Documentation/hwmon/{sysfs-interface => sysfs-interface.rst} (100%)
 rename Documentation/hwmon/{tc654 => tc654.rst} (100%)
 rename Documentation/hwmon/{tc74 => tc74.rst} (100%)
 rename Documentation/hwmon/{thmc50 => thmc50.rst} (100%)
 rename Documentation/hwmon/{tmp102 => tmp102.rst} (93%)
 rename Documentation/hwmon/{tmp103 => tmp103.rst} (92%)
 rename Documentation/hwmon/{tmp108 => tmp108.rst} (95%)
 rename Documentation/hwmon/{tmp401 => tmp401.rst} (97%)
 rename Documentation/hwmon/{tmp421 => tmp421.rst} (100%)
 rename Documentation/hwmon/{tps40422 => tps40422.rst} (96%)
 rename Documentation/hwmon/{twl4030-madc-hwmon => twl4030-madc-hwmon.rst} (100%)
 rename Documentation/hwmon/{ucd9000 => ucd9000.rst} (97%)
 rename Documentation/hwmon/{ucd9200 => ucd9200.rst} (97%)
 rename Documentation/hwmon/{userspace-tools => userspace-tools.rst} (100%)
 rename Documentation/hwmon/{vexpress => vexpress.rst} (100%)
 rename Documentation/hwmon/{via686a => via686a.rst} (100%)
 rename Documentation/hwmon/{vt1211 => vt1211.rst} (100%)
 rename Documentation/hwmon/{w83627ehf => w83627ehf.rst} (100%)
 rename Documentation/hwmon/{w83627hf => w83627hf.rst} (100%)
 rename Documentation/hwmon/{w83773g => w83773g.rst} (100%)
 rename Documentation/hwmon/{w83781d => w83781d.rst} (100%)
 rename Documentation/hwmon/{w83791d => w83791d.rst} (99%)
 rename Documentation/hwmon/{w83792d => w83792d.rst} (100%)
 rename Documentation/hwmon/{w83793 => w83793.rst} (100%)
 rename Documentation/hwmon/{w83795 => w83795.rst} (100%)
 rename Documentation/hwmon/{w83l785ts => w83l785ts.rst} (100%)
 rename Documentation/hwmon/{w83l786ng => w83l786ng.rst} (100%)
 rename Documentation/hwmon/{wm831x => wm831x.rst} (100%)
 rename Documentation/hwmon/{wm8350 => wm8350.rst} (100%)
 rename Documentation/hwmon/{xgene-hwmon => xgene-hwmon.rst} (100%)
 rename Documentation/hwmon/{zl6100 => zl6100.rst} (98%)

diff --git a/Documentation/devicetree/bindings/hwmon/g762.txt b/Documentation/devicetree/bindings/hwmon/g762.txt
index 25cc6d8ee575..6d154c4923de 100644
--- a/Documentation/devicetree/bindings/hwmon/g762.txt
+++ b/Documentation/devicetree/bindings/hwmon/g762.txt
@@ -21,7 +21,7 @@ If an optional property is not set in .dts file, then current value is kept
 unmodified (e.g. u-boot installed value).
 
 Additional information on operational parameters for the device is available
-in Documentation/hwmon/g762. A detailed datasheet for the device is available
+in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available
 at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf.
 
 Example g762 node:
diff --git a/Documentation/hwmon/ab8500 b/Documentation/hwmon/ab8500.rst
similarity index 86%
rename from Documentation/hwmon/ab8500
rename to Documentation/hwmon/ab8500.rst
index d87c61151239..33f93a9cec04 100644
--- a/Documentation/hwmon/ab8500
+++ b/Documentation/hwmon/ab8500.rst
@@ -18,7 +18,7 @@ Authors:
 Description
 -----------
 
-See also Documentation/hwmon/abx500. This is the ST-Ericsson AB8500 specific
+See also Documentation/hwmon/abx500.rst. This is the ST-Ericsson AB8500 specific
 driver.
 
 Currently only the AB8500 internal sensor and one external sensor for battery
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet.rst
similarity index 100%
rename from Documentation/hwmon/abituguru-datasheet
rename to Documentation/hwmon/abituguru-datasheet.rst
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru.rst
similarity index 100%
rename from Documentation/hwmon/abituguru
rename to Documentation/hwmon/abituguru.rst
diff --git a/Documentation/hwmon/abituguru3 b/Documentation/hwmon/abituguru3.rst
similarity index 100%
rename from Documentation/hwmon/abituguru3
rename to Documentation/hwmon/abituguru3.rst
diff --git a/Documentation/hwmon/abx500 b/Documentation/hwmon/abx500.rst
similarity index 100%
rename from Documentation/hwmon/abx500
rename to Documentation/hwmon/abx500.rst
diff --git a/Documentation/hwmon/acpi_power_meter b/Documentation/hwmon/acpi_power_meter.rst
similarity index 97%
rename from Documentation/hwmon/acpi_power_meter
rename to Documentation/hwmon/acpi_power_meter.rst
index 7665ca6ba957..4a0941ade0ca 100644
--- a/Documentation/hwmon/acpi_power_meter
+++ b/Documentation/hwmon/acpi_power_meter.rst
@@ -21,7 +21,7 @@ the ACPI 4.0 spec (Chapter 10.4).  These devices have a simple set of
 features--a power meter that returns average power use over a configurable
 interval, an optional capping mechanism, and a couple of trip points.  The
 sysfs interface conforms with the specification outlined in the "Power" section
-of Documentation/hwmon/sysfs-interface.
+of Documentation/hwmon/sysfs-interface.rst.
 
 Special Features
 ----------------
diff --git a/Documentation/hwmon/ad7314 b/Documentation/hwmon/ad7314.rst
similarity index 100%
rename from Documentation/hwmon/ad7314
rename to Documentation/hwmon/ad7314.rst
diff --git a/Documentation/hwmon/adc128d818 b/Documentation/hwmon/adc128d818.rst
similarity index 100%
rename from Documentation/hwmon/adc128d818
rename to Documentation/hwmon/adc128d818.rst
diff --git a/Documentation/hwmon/adm1021 b/Documentation/hwmon/adm1021.rst
similarity index 100%
rename from Documentation/hwmon/adm1021
rename to Documentation/hwmon/adm1021.rst
diff --git a/Documentation/hwmon/adm1025 b/Documentation/hwmon/adm1025.rst
similarity index 100%
rename from Documentation/hwmon/adm1025
rename to Documentation/hwmon/adm1025.rst
diff --git a/Documentation/hwmon/adm1026 b/Documentation/hwmon/adm1026.rst
similarity index 100%
rename from Documentation/hwmon/adm1026
rename to Documentation/hwmon/adm1026.rst
diff --git a/Documentation/hwmon/adm1031 b/Documentation/hwmon/adm1031.rst
similarity index 100%
rename from Documentation/hwmon/adm1031
rename to Documentation/hwmon/adm1031.rst
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275.rst
similarity index 97%
rename from Documentation/hwmon/adm1275
rename to Documentation/hwmon/adm1275.rst
index 5c5860011d6e..9a1913e5b4d9 100644
--- a/Documentation/hwmon/adm1275
+++ b/Documentation/hwmon/adm1275.rst
@@ -68,7 +68,7 @@ integrated 12 bit analog-to-digital converter (ADC), accessed using a
 PMBus interface.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -90,7 +90,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/adm9240 b/Documentation/hwmon/adm9240.rst
similarity index 100%
rename from Documentation/hwmon/adm9240
rename to Documentation/hwmon/adm9240.rst
diff --git a/Documentation/hwmon/ads1015 b/Documentation/hwmon/ads1015.rst
similarity index 100%
rename from Documentation/hwmon/ads1015
rename to Documentation/hwmon/ads1015.rst
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828.rst
similarity index 100%
rename from Documentation/hwmon/ads7828
rename to Documentation/hwmon/ads7828.rst
diff --git a/Documentation/hwmon/adt7410 b/Documentation/hwmon/adt7410.rst
similarity index 100%
rename from Documentation/hwmon/adt7410
rename to Documentation/hwmon/adt7410.rst
diff --git a/Documentation/hwmon/adt7411 b/Documentation/hwmon/adt7411.rst
similarity index 100%
rename from Documentation/hwmon/adt7411
rename to Documentation/hwmon/adt7411.rst
diff --git a/Documentation/hwmon/adt7462 b/Documentation/hwmon/adt7462.rst
similarity index 100%
rename from Documentation/hwmon/adt7462
rename to Documentation/hwmon/adt7462.rst
diff --git a/Documentation/hwmon/adt7470 b/Documentation/hwmon/adt7470.rst
similarity index 100%
rename from Documentation/hwmon/adt7470
rename to Documentation/hwmon/adt7470.rst
diff --git a/Documentation/hwmon/adt7475 b/Documentation/hwmon/adt7475.rst
similarity index 100%
rename from Documentation/hwmon/adt7475
rename to Documentation/hwmon/adt7475.rst
diff --git a/Documentation/hwmon/amc6821 b/Documentation/hwmon/amc6821.rst
similarity index 100%
rename from Documentation/hwmon/amc6821
rename to Documentation/hwmon/amc6821.rst
diff --git a/Documentation/hwmon/asb100 b/Documentation/hwmon/asb100.rst
similarity index 100%
rename from Documentation/hwmon/asb100
rename to Documentation/hwmon/asb100.rst
diff --git a/Documentation/hwmon/asc7621 b/Documentation/hwmon/asc7621.rst
similarity index 100%
rename from Documentation/hwmon/asc7621
rename to Documentation/hwmon/asc7621.rst
diff --git a/Documentation/hwmon/aspeed-pwm-tacho b/Documentation/hwmon/aspeed-pwm-tacho.rst
similarity index 100%
rename from Documentation/hwmon/aspeed-pwm-tacho
rename to Documentation/hwmon/aspeed-pwm-tacho.rst
diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp.rst
similarity index 100%
rename from Documentation/hwmon/coretemp
rename to Documentation/hwmon/coretemp.rst
diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052.rst
similarity index 100%
rename from Documentation/hwmon/da9052
rename to Documentation/hwmon/da9052.rst
diff --git a/Documentation/hwmon/da9055 b/Documentation/hwmon/da9055.rst
similarity index 100%
rename from Documentation/hwmon/da9055
rename to Documentation/hwmon/da9055.rst
diff --git a/Documentation/hwmon/dme1737 b/Documentation/hwmon/dme1737.rst
similarity index 100%
rename from Documentation/hwmon/dme1737
rename to Documentation/hwmon/dme1737.rst
diff --git a/Documentation/hwmon/ds1621 b/Documentation/hwmon/ds1621.rst
similarity index 100%
rename from Documentation/hwmon/ds1621
rename to Documentation/hwmon/ds1621.rst
diff --git a/Documentation/hwmon/ds620 b/Documentation/hwmon/ds620.rst
similarity index 100%
rename from Documentation/hwmon/ds620
rename to Documentation/hwmon/ds620.rst
diff --git a/Documentation/hwmon/emc1403 b/Documentation/hwmon/emc1403.rst
similarity index 100%
rename from Documentation/hwmon/emc1403
rename to Documentation/hwmon/emc1403.rst
diff --git a/Documentation/hwmon/emc2103 b/Documentation/hwmon/emc2103.rst
similarity index 100%
rename from Documentation/hwmon/emc2103
rename to Documentation/hwmon/emc2103.rst
diff --git a/Documentation/hwmon/emc6w201 b/Documentation/hwmon/emc6w201.rst
similarity index 100%
rename from Documentation/hwmon/emc6w201
rename to Documentation/hwmon/emc6w201.rst
diff --git a/Documentation/hwmon/f71805f b/Documentation/hwmon/f71805f.rst
similarity index 100%
rename from Documentation/hwmon/f71805f
rename to Documentation/hwmon/f71805f.rst
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg.rst
similarity index 100%
rename from Documentation/hwmon/f71882fg
rename to Documentation/hwmon/f71882fg.rst
diff --git a/Documentation/hwmon/fam15h_power b/Documentation/hwmon/fam15h_power.rst
similarity index 100%
rename from Documentation/hwmon/fam15h_power
rename to Documentation/hwmon/fam15h_power.rst
diff --git a/Documentation/hwmon/ftsteutates b/Documentation/hwmon/ftsteutates.rst
similarity index 100%
rename from Documentation/hwmon/ftsteutates
rename to Documentation/hwmon/ftsteutates.rst
diff --git a/Documentation/hwmon/g760a b/Documentation/hwmon/g760a.rst
similarity index 100%
rename from Documentation/hwmon/g760a
rename to Documentation/hwmon/g760a.rst
diff --git a/Documentation/hwmon/g762 b/Documentation/hwmon/g762.rst
similarity index 97%
rename from Documentation/hwmon/g762
rename to Documentation/hwmon/g762.rst
index 54574e26df21..0371b3365c48 100644
--- a/Documentation/hwmon/g762
+++ b/Documentation/hwmon/g762.rst
@@ -7,7 +7,7 @@ modes - PWM or DC - are supported by the device.
 
 For additional information, a detailed datasheet is available at
 http://natisbad.org/NAS/ref/GMT_EDS-762_763-080710-0.2.pdf. sysfs
-bindings are described in Documentation/hwmon/sysfs-interface.
+bindings are described in Documentation/hwmon/sysfs-interface.rst.
 
 The following entries are available to the user in a subdirectory of
 /sys/bus/i2c/drivers/g762/ to control the operation of the device.
diff --git a/Documentation/hwmon/gl518sm b/Documentation/hwmon/gl518sm.rst
similarity index 100%
rename from Documentation/hwmon/gl518sm
rename to Documentation/hwmon/gl518sm.rst
diff --git a/Documentation/hwmon/hih6130 b/Documentation/hwmon/hih6130.rst
similarity index 100%
rename from Documentation/hwmon/hih6130
rename to Documentation/hwmon/hih6130.rst
diff --git a/Documentation/hwmon/hwmon-kernel-api.txt b/Documentation/hwmon/hwmon-kernel-api.rst
similarity index 99%
rename from Documentation/hwmon/hwmon-kernel-api.txt
rename to Documentation/hwmon/hwmon-kernel-api.rst
index b56343f5c2c4..5766bee64153 100644
--- a/Documentation/hwmon/hwmon-kernel-api.txt
+++ b/Documentation/hwmon/hwmon-kernel-api.rst
@@ -12,10 +12,10 @@ drivers that want to use the hardware monitoring framework.
 This document does not describe what a hardware monitoring (hwmon) Driver or
 Device is. It also does not describe the API which can be used by user space
 to communicate with a hardware monitoring device. If you want to know this
-then please read the following file: Documentation/hwmon/sysfs-interface.
+then please read the following file: Documentation/hwmon/sysfs-interface.rst.
 
 For additional guidelines on how to write and improve hwmon drivers, please
-also read Documentation/hwmon/submitting-patches.
+also read Documentation/hwmon/submitting-patches.rst.
 
 The API
 -------
diff --git a/Documentation/hwmon/ibm-cffps b/Documentation/hwmon/ibm-cffps.rst
similarity index 100%
rename from Documentation/hwmon/ibm-cffps
rename to Documentation/hwmon/ibm-cffps.rst
diff --git a/Documentation/hwmon/ibmaem b/Documentation/hwmon/ibmaem.rst
similarity index 100%
rename from Documentation/hwmon/ibmaem
rename to Documentation/hwmon/ibmaem.rst
diff --git a/Documentation/hwmon/ibmpowernv b/Documentation/hwmon/ibmpowernv.rst
similarity index 100%
rename from Documentation/hwmon/ibmpowernv
rename to Documentation/hwmon/ibmpowernv.rst
diff --git a/Documentation/hwmon/ina209 b/Documentation/hwmon/ina209.rst
similarity index 100%
rename from Documentation/hwmon/ina209
rename to Documentation/hwmon/ina209.rst
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx.rst
similarity index 97%
rename from Documentation/hwmon/ina2xx
rename to Documentation/hwmon/ina2xx.rst
index 95badf9c396f..94b9a260c518 100644
--- a/Documentation/hwmon/ina2xx
+++ b/Documentation/hwmon/ina2xx.rst
@@ -78,7 +78,7 @@ refer to the Documentation/devicetree/bindings/hwmon/ina2xx.txt for bindings
 if the device tree is used.
 
 Additionally ina226 supports update_interval attribute as described in
-Documentation/hwmon/sysfs-interface. Internally the interval is the sum of
+Documentation/hwmon/sysfs-interface.rst. Internally the interval is the sum of
 bus and shunt voltage conversion times multiplied by the averaging rate. We
 don't touch the conversion times and only modify the number of averages. The
 lower limit of the update_interval is 2 ms, the upper limit is 2253 ms.
diff --git a/Documentation/hwmon/ina3221 b/Documentation/hwmon/ina3221.rst
similarity index 100%
rename from Documentation/hwmon/ina3221
rename to Documentation/hwmon/ina3221.rst
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
new file mode 100644
index 000000000000..893804414510
--- /dev/null
+++ b/Documentation/hwmon/index.rst
@@ -0,0 +1,179 @@
+=========================
+Linux Hardware Monitoring
+=========================
+
+.. toctree::
+   :maxdepth: 1
+
+   hwmon-kernel-api.rst
+   pmbus-core.rst
+   submitting-patches.rst
+   sysfs-interface.rst
+   userspace-tools.rst
+
+Hardware Monitoring Kernel Drivers
+==================================
+
+.. toctree::
+   :maxdepth: 1
+
+   ab8500.rst
+   abituguru.rst
+   abituguru3.rst
+   abx500.rst
+   acpi_power_meter.rst
+   ad7314.rst
+   adc128d818.rst
+   adm1021.rst
+   adm1025.rst
+   adm1026.rst
+   adm1031.rst
+   adm1275.rst
+   adm9240.rst
+   ads1015.rst
+   ads7828.rst
+   adt7410.rst
+   adt7411.rst
+   adt7462.rst
+   adt7470.rst
+   adt7475.rst
+   amc6821.rst
+   asb100.rst
+   asc7621.rst
+   aspeed-pwm-tacho.rst
+   coretemp.rst
+   da9052.rst
+   da9055.rst
+   dme1737.rst
+   ds1621.rst
+   ds620.rst
+   emc1403.rst
+   emc2103.rst
+   emc6w201.rst
+   f71805f.rst
+   f71882fg.rst
+   fam15h_power.rst
+   ftsteutates.rst
+   g760a.rst
+   g762.rst
+   gl518sm.rst
+   hih6130.rst
+   ibmaem.rst
+   ibm-cffps.rst
+   ibmpowernv.rst
+   ina209.rst
+   ina2xx.rst
+   ina3221.rst
+   ir35221.rst
+   it87.rst
+   jc42.rst
+   k10temp.rst
+   k8temp.rst
+   lineage-pem.rst
+   lm25066.rst
+   lm63.rst
+   lm70.rst
+   lm73.rst
+   lm75.rst
+   lm77.rst
+   lm78.rst
+   lm80.rst
+   lm83.rst
+   lm85.rst
+   lm87.rst
+   lm90.rst
+   lm92.rst
+   lm93.rst
+   lm95234.rst
+   lm95245.rst
+   ltc2945.rst
+   ltc2978.rst
+   ltc2990.rst
+   ltc3815.rst
+   ltc4151.rst
+   ltc4215.rst
+   ltc4245.rst
+   ltc4260.rst
+   ltc4261.rst
+   max16064.rst
+   max16065.rst
+   max1619.rst
+   max1668.rst
+   max197.rst
+   max20751.rst
+   max31722.rst
+   max31785.rst
+   max31790.rst
+   max34440.rst
+   max6639.rst
+   max6642.rst
+   max6650.rst
+   max6697.rst
+   max8688.rst
+   mc13783-adc.rst
+   mcp3021.rst
+   menf21bmc.rst
+   mlxreg-fan.rst
+   nct6683.rst
+   nct6775.rst
+   nct7802.rst
+   nct7904.rst
+   npcm750-pwm-fan.rst
+   nsa320.rst
+   ntc_thermistor.rst
+   occ.rst
+   pc87360.rst
+   pc87427.rst
+   pcf8591.rst
+   pmbus.rst
+   powr1220.rst
+   pwm-fan.rst
+   raspberrypi-hwmon.rst
+   sch5627.rst
+   sch5636.rst
+   scpi-hwmon.rst
+   sht15.rst
+   sht21.rst
+   sht3x.rst
+   shtc1.rst
+   sis5595.rst
+   smm665.rst
+   smsc47b397.rst
+   smsc47m192.rst
+   smsc47m1.rst
+   tc654.rst
+   tc74.rst
+   thmc50.rst
+   tmp102.rst
+   tmp103.rst
+   tmp108.rst
+   tmp401.rst
+   tmp421.rst
+   tps40422.rst
+   twl4030-madc-hwmon.rst
+   ucd9000.rst
+   ucd9200.rst
+   vexpress.rst
+   via686a.rst
+   vt1211.rst
+   w83627ehf.rst
+   w83627hf.rst
+   w83773g.rst
+   w83781d.rst
+   w83791d.rst
+   w83792d.rst
+   w83793.rst
+   w83795.rst
+   w83l785ts.rst
+   w83l786ng.rst
+   wm831x.rst
+   wm8350.rst
+   xgene-hwmon.rst
+   zl6100.rst
+
+.. only::  subproject and html
+
+   Indices
+   =======
+
+   * :ref:`genindex`
diff --git a/Documentation/hwmon/ir35221 b/Documentation/hwmon/ir35221.rst
similarity index 100%
rename from Documentation/hwmon/ir35221
rename to Documentation/hwmon/ir35221.rst
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87.rst
similarity index 100%
rename from Documentation/hwmon/it87
rename to Documentation/hwmon/it87.rst
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42.rst
similarity index 100%
rename from Documentation/hwmon/jc42
rename to Documentation/hwmon/jc42.rst
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp.rst
similarity index 100%
rename from Documentation/hwmon/k10temp
rename to Documentation/hwmon/k10temp.rst
diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp.rst
similarity index 100%
rename from Documentation/hwmon/k8temp
rename to Documentation/hwmon/k8temp.rst
diff --git a/Documentation/hwmon/lineage-pem b/Documentation/hwmon/lineage-pem.rst
similarity index 100%
rename from Documentation/hwmon/lineage-pem
rename to Documentation/hwmon/lineage-pem.rst
diff --git a/Documentation/hwmon/lm25066 b/Documentation/hwmon/lm25066.rst
similarity index 97%
rename from Documentation/hwmon/lm25066
rename to Documentation/hwmon/lm25066.rst
index 60b7f2722931..da15e3094c8c 100644
--- a/Documentation/hwmon/lm25066
+++ b/Documentation/hwmon/lm25066.rst
@@ -69,7 +69,7 @@ LM25066, LM5064, and LM5066/LM5066I Power Management, Monitoring,
 Control, and Protection ICs.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/lm63 b/Documentation/hwmon/lm63.rst
similarity index 100%
rename from Documentation/hwmon/lm63
rename to Documentation/hwmon/lm63.rst
diff --git a/Documentation/hwmon/lm70 b/Documentation/hwmon/lm70.rst
similarity index 100%
rename from Documentation/hwmon/lm70
rename to Documentation/hwmon/lm70.rst
diff --git a/Documentation/hwmon/lm73 b/Documentation/hwmon/lm73.rst
similarity index 100%
rename from Documentation/hwmon/lm73
rename to Documentation/hwmon/lm73.rst
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75.rst
similarity index 100%
rename from Documentation/hwmon/lm75
rename to Documentation/hwmon/lm75.rst
diff --git a/Documentation/hwmon/lm77 b/Documentation/hwmon/lm77.rst
similarity index 100%
rename from Documentation/hwmon/lm77
rename to Documentation/hwmon/lm77.rst
diff --git a/Documentation/hwmon/lm78 b/Documentation/hwmon/lm78.rst
similarity index 100%
rename from Documentation/hwmon/lm78
rename to Documentation/hwmon/lm78.rst
diff --git a/Documentation/hwmon/lm80 b/Documentation/hwmon/lm80.rst
similarity index 100%
rename from Documentation/hwmon/lm80
rename to Documentation/hwmon/lm80.rst
diff --git a/Documentation/hwmon/lm83 b/Documentation/hwmon/lm83.rst
similarity index 100%
rename from Documentation/hwmon/lm83
rename to Documentation/hwmon/lm83.rst
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85.rst
similarity index 100%
rename from Documentation/hwmon/lm85
rename to Documentation/hwmon/lm85.rst
diff --git a/Documentation/hwmon/lm87 b/Documentation/hwmon/lm87.rst
similarity index 100%
rename from Documentation/hwmon/lm87
rename to Documentation/hwmon/lm87.rst
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90.rst
similarity index 100%
rename from Documentation/hwmon/lm90
rename to Documentation/hwmon/lm90.rst
diff --git a/Documentation/hwmon/lm92 b/Documentation/hwmon/lm92.rst
similarity index 100%
rename from Documentation/hwmon/lm92
rename to Documentation/hwmon/lm92.rst
diff --git a/Documentation/hwmon/lm93 b/Documentation/hwmon/lm93.rst
similarity index 100%
rename from Documentation/hwmon/lm93
rename to Documentation/hwmon/lm93.rst
diff --git a/Documentation/hwmon/lm95234 b/Documentation/hwmon/lm95234.rst
similarity index 100%
rename from Documentation/hwmon/lm95234
rename to Documentation/hwmon/lm95234.rst
diff --git a/Documentation/hwmon/lm95245 b/Documentation/hwmon/lm95245.rst
similarity index 100%
rename from Documentation/hwmon/lm95245
rename to Documentation/hwmon/lm95245.rst
diff --git a/Documentation/hwmon/ltc2945 b/Documentation/hwmon/ltc2945.rst
similarity index 100%
rename from Documentation/hwmon/ltc2945
rename to Documentation/hwmon/ltc2945.rst
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978.rst
similarity index 100%
rename from Documentation/hwmon/ltc2978
rename to Documentation/hwmon/ltc2978.rst
diff --git a/Documentation/hwmon/ltc2990 b/Documentation/hwmon/ltc2990.rst
similarity index 100%
rename from Documentation/hwmon/ltc2990
rename to Documentation/hwmon/ltc2990.rst
diff --git a/Documentation/hwmon/ltc3815 b/Documentation/hwmon/ltc3815.rst
similarity index 100%
rename from Documentation/hwmon/ltc3815
rename to Documentation/hwmon/ltc3815.rst
diff --git a/Documentation/hwmon/ltc4151 b/Documentation/hwmon/ltc4151.rst
similarity index 100%
rename from Documentation/hwmon/ltc4151
rename to Documentation/hwmon/ltc4151.rst
diff --git a/Documentation/hwmon/ltc4215 b/Documentation/hwmon/ltc4215.rst
similarity index 100%
rename from Documentation/hwmon/ltc4215
rename to Documentation/hwmon/ltc4215.rst
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245.rst
similarity index 100%
rename from Documentation/hwmon/ltc4245
rename to Documentation/hwmon/ltc4245.rst
diff --git a/Documentation/hwmon/ltc4260 b/Documentation/hwmon/ltc4260.rst
similarity index 100%
rename from Documentation/hwmon/ltc4260
rename to Documentation/hwmon/ltc4260.rst
diff --git a/Documentation/hwmon/ltc4261 b/Documentation/hwmon/ltc4261.rst
similarity index 100%
rename from Documentation/hwmon/ltc4261
rename to Documentation/hwmon/ltc4261.rst
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064.rst
similarity index 96%
rename from Documentation/hwmon/max16064
rename to Documentation/hwmon/max16064.rst
index 61ec679dc477..6d5e9538991f 100644
--- a/Documentation/hwmon/max16064
+++ b/Documentation/hwmon/max16064.rst
@@ -21,7 +21,7 @@ This driver supports hardware monitoring for Maxim MAX16064 Quad Power-Supply
 Controller with Active-Voltage Output Control and PMBus Interface.
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max16065 b/Documentation/hwmon/max16065.rst
similarity index 100%
rename from Documentation/hwmon/max16065
rename to Documentation/hwmon/max16065.rst
diff --git a/Documentation/hwmon/max1619 b/Documentation/hwmon/max1619.rst
similarity index 100%
rename from Documentation/hwmon/max1619
rename to Documentation/hwmon/max1619.rst
diff --git a/Documentation/hwmon/max1668 b/Documentation/hwmon/max1668.rst
similarity index 100%
rename from Documentation/hwmon/max1668
rename to Documentation/hwmon/max1668.rst
diff --git a/Documentation/hwmon/max197 b/Documentation/hwmon/max197.rst
similarity index 100%
rename from Documentation/hwmon/max197
rename to Documentation/hwmon/max197.rst
diff --git a/Documentation/hwmon/max20751 b/Documentation/hwmon/max20751.rst
similarity index 96%
rename from Documentation/hwmon/max20751
rename to Documentation/hwmon/max20751.rst
index d546695900ef..aa4469be6674 100644
--- a/Documentation/hwmon/max20751
+++ b/Documentation/hwmon/max20751.rst
@@ -23,7 +23,7 @@ This driver supports MAX20751 Multiphase Master with PMBus Interface
 and Internal Buck Converter.
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max31722 b/Documentation/hwmon/max31722.rst
similarity index 100%
rename from Documentation/hwmon/max31722
rename to Documentation/hwmon/max31722.rst
diff --git a/Documentation/hwmon/max31785 b/Documentation/hwmon/max31785.rst
similarity index 100%
rename from Documentation/hwmon/max31785
rename to Documentation/hwmon/max31785.rst
diff --git a/Documentation/hwmon/max31790 b/Documentation/hwmon/max31790.rst
similarity index 100%
rename from Documentation/hwmon/max31790
rename to Documentation/hwmon/max31790.rst
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440.rst
similarity index 98%
rename from Documentation/hwmon/max34440
rename to Documentation/hwmon/max34440.rst
index 639838ef29fd..939138e12b02 100644
--- a/Documentation/hwmon/max34440
+++ b/Documentation/hwmon/max34440.rst
@@ -76,7 +76,7 @@ based on GIN pins. The MAX34460 supports 12 voltage channels, and the MAX34461
 supports 16 voltage channels.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max6639 b/Documentation/hwmon/max6639.rst
similarity index 100%
rename from Documentation/hwmon/max6639
rename to Documentation/hwmon/max6639.rst
diff --git a/Documentation/hwmon/max6642 b/Documentation/hwmon/max6642.rst
similarity index 100%
rename from Documentation/hwmon/max6642
rename to Documentation/hwmon/max6642.rst
diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650.rst
similarity index 100%
rename from Documentation/hwmon/max6650
rename to Documentation/hwmon/max6650.rst
diff --git a/Documentation/hwmon/max6697 b/Documentation/hwmon/max6697.rst
similarity index 100%
rename from Documentation/hwmon/max6697
rename to Documentation/hwmon/max6697.rst
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688.rst
similarity index 97%
rename from Documentation/hwmon/max8688
rename to Documentation/hwmon/max8688.rst
index 43da139234c1..009487759c61 100644
--- a/Documentation/hwmon/max8688
+++ b/Documentation/hwmon/max8688.rst
@@ -21,7 +21,7 @@ This driver supports hardware monitoring for Maxim MAX8688 Digital Power-Supply
 Controller/Monitor with PMBus Interface.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc.rst
similarity index 100%
rename from Documentation/hwmon/mc13783-adc
rename to Documentation/hwmon/mc13783-adc.rst
diff --git a/Documentation/hwmon/mcp3021 b/Documentation/hwmon/mcp3021.rst
similarity index 100%
rename from Documentation/hwmon/mcp3021
rename to Documentation/hwmon/mcp3021.rst
diff --git a/Documentation/hwmon/menf21bmc b/Documentation/hwmon/menf21bmc.rst
similarity index 100%
rename from Documentation/hwmon/menf21bmc
rename to Documentation/hwmon/menf21bmc.rst
diff --git a/Documentation/hwmon/mlxreg-fan b/Documentation/hwmon/mlxreg-fan.rst
similarity index 100%
rename from Documentation/hwmon/mlxreg-fan
rename to Documentation/hwmon/mlxreg-fan.rst
diff --git a/Documentation/hwmon/nct6683 b/Documentation/hwmon/nct6683.rst
similarity index 100%
rename from Documentation/hwmon/nct6683
rename to Documentation/hwmon/nct6683.rst
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775.rst
similarity index 100%
rename from Documentation/hwmon/nct6775
rename to Documentation/hwmon/nct6775.rst
diff --git a/Documentation/hwmon/nct7802 b/Documentation/hwmon/nct7802.rst
similarity index 100%
rename from Documentation/hwmon/nct7802
rename to Documentation/hwmon/nct7802.rst
diff --git a/Documentation/hwmon/nct7904 b/Documentation/hwmon/nct7904.rst
similarity index 100%
rename from Documentation/hwmon/nct7904
rename to Documentation/hwmon/nct7904.rst
diff --git a/Documentation/hwmon/npcm750-pwm-fan b/Documentation/hwmon/npcm750-pwm-fan.rst
similarity index 100%
rename from Documentation/hwmon/npcm750-pwm-fan
rename to Documentation/hwmon/npcm750-pwm-fan.rst
diff --git a/Documentation/hwmon/nsa320 b/Documentation/hwmon/nsa320.rst
similarity index 100%
rename from Documentation/hwmon/nsa320
rename to Documentation/hwmon/nsa320.rst
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor.rst
similarity index 100%
rename from Documentation/hwmon/ntc_thermistor
rename to Documentation/hwmon/ntc_thermistor.rst
diff --git a/Documentation/hwmon/occ b/Documentation/hwmon/occ.rst
similarity index 100%
rename from Documentation/hwmon/occ
rename to Documentation/hwmon/occ.rst
diff --git a/Documentation/hwmon/pc87360 b/Documentation/hwmon/pc87360.rst
similarity index 100%
rename from Documentation/hwmon/pc87360
rename to Documentation/hwmon/pc87360.rst
diff --git a/Documentation/hwmon/pc87427 b/Documentation/hwmon/pc87427.rst
similarity index 100%
rename from Documentation/hwmon/pc87427
rename to Documentation/hwmon/pc87427.rst
diff --git a/Documentation/hwmon/pcf8591 b/Documentation/hwmon/pcf8591.rst
similarity index 100%
rename from Documentation/hwmon/pcf8591
rename to Documentation/hwmon/pcf8591.rst
diff --git a/Documentation/hwmon/pmbus-core b/Documentation/hwmon/pmbus-core.rst
similarity index 100%
rename from Documentation/hwmon/pmbus-core
rename to Documentation/hwmon/pmbus-core.rst
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus.rst
similarity index 100%
rename from Documentation/hwmon/pmbus
rename to Documentation/hwmon/pmbus.rst
diff --git a/Documentation/hwmon/powr1220 b/Documentation/hwmon/powr1220.rst
similarity index 100%
rename from Documentation/hwmon/powr1220
rename to Documentation/hwmon/powr1220.rst
diff --git a/Documentation/hwmon/pwm-fan b/Documentation/hwmon/pwm-fan.rst
similarity index 100%
rename from Documentation/hwmon/pwm-fan
rename to Documentation/hwmon/pwm-fan.rst
diff --git a/Documentation/hwmon/raspberrypi-hwmon b/Documentation/hwmon/raspberrypi-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/raspberrypi-hwmon
rename to Documentation/hwmon/raspberrypi-hwmon.rst
diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627.rst
similarity index 100%
rename from Documentation/hwmon/sch5627
rename to Documentation/hwmon/sch5627.rst
diff --git a/Documentation/hwmon/sch5636 b/Documentation/hwmon/sch5636.rst
similarity index 100%
rename from Documentation/hwmon/sch5636
rename to Documentation/hwmon/sch5636.rst
diff --git a/Documentation/hwmon/scpi-hwmon b/Documentation/hwmon/scpi-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/scpi-hwmon
rename to Documentation/hwmon/scpi-hwmon.rst
diff --git a/Documentation/hwmon/sht15 b/Documentation/hwmon/sht15.rst
similarity index 100%
rename from Documentation/hwmon/sht15
rename to Documentation/hwmon/sht15.rst
diff --git a/Documentation/hwmon/sht21 b/Documentation/hwmon/sht21.rst
similarity index 100%
rename from Documentation/hwmon/sht21
rename to Documentation/hwmon/sht21.rst
diff --git a/Documentation/hwmon/sht3x b/Documentation/hwmon/sht3x.rst
similarity index 100%
rename from Documentation/hwmon/sht3x
rename to Documentation/hwmon/sht3x.rst
diff --git a/Documentation/hwmon/shtc1 b/Documentation/hwmon/shtc1.rst
similarity index 100%
rename from Documentation/hwmon/shtc1
rename to Documentation/hwmon/shtc1.rst
diff --git a/Documentation/hwmon/sis5595 b/Documentation/hwmon/sis5595.rst
similarity index 100%
rename from Documentation/hwmon/sis5595
rename to Documentation/hwmon/sis5595.rst
diff --git a/Documentation/hwmon/smm665 b/Documentation/hwmon/smm665.rst
similarity index 100%
rename from Documentation/hwmon/smm665
rename to Documentation/hwmon/smm665.rst
diff --git a/Documentation/hwmon/smsc47b397 b/Documentation/hwmon/smsc47b397.rst
similarity index 100%
rename from Documentation/hwmon/smsc47b397
rename to Documentation/hwmon/smsc47b397.rst
diff --git a/Documentation/hwmon/smsc47m1 b/Documentation/hwmon/smsc47m1.rst
similarity index 100%
rename from Documentation/hwmon/smsc47m1
rename to Documentation/hwmon/smsc47m1.rst
diff --git a/Documentation/hwmon/smsc47m192 b/Documentation/hwmon/smsc47m192.rst
similarity index 100%
rename from Documentation/hwmon/smsc47m192
rename to Documentation/hwmon/smsc47m192.rst
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches.rst
similarity index 98%
rename from Documentation/hwmon/submitting-patches
rename to Documentation/hwmon/submitting-patches.rst
index 12540b7d9b50..f9796b9d9db6 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches.rst
@@ -39,7 +39,7 @@ increase the chances of your change being accepted.
 2. Adding functionality to existing drivers
 -------------------------------------------
 
-* Make sure the documentation in Documentation/hwmon/<driver_name> is up to
+* Make sure the documentation in Documentation/hwmon/<driver_name>.rst is up to
   date.
 
 * Make sure the information in Kconfig is up to date.
@@ -61,7 +61,7 @@ increase the chances of your change being accepted.
 
 * Consider adding yourself to MAINTAINERS.
 
-* Document the driver in Documentation/hwmon/<driver_name>.
+* Document the driver in Documentation/hwmon/<driver_name>.rst.
 
 * Add the driver to Kconfig and Makefile in alphabetical order.
 
@@ -134,7 +134,7 @@ increase the chances of your change being accepted.
   non-standard attributes, or you believe you do, discuss it on the mailing list
   first. Either case, provide a detailed explanation why you need the
   non-standard attribute(s).
-  Standard attributes are specified in Documentation/hwmon/sysfs-interface.
+  Standard attributes are specified in Documentation/hwmon/sysfs-interface.rst.
 
 * When deciding which sysfs attributes to support, look at the chip's
   capabilities. While we do not expect your driver to support everything the
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface.rst
similarity index 100%
rename from Documentation/hwmon/sysfs-interface
rename to Documentation/hwmon/sysfs-interface.rst
diff --git a/Documentation/hwmon/tc654 b/Documentation/hwmon/tc654.rst
similarity index 100%
rename from Documentation/hwmon/tc654
rename to Documentation/hwmon/tc654.rst
diff --git a/Documentation/hwmon/tc74 b/Documentation/hwmon/tc74.rst
similarity index 100%
rename from Documentation/hwmon/tc74
rename to Documentation/hwmon/tc74.rst
diff --git a/Documentation/hwmon/thmc50 b/Documentation/hwmon/thmc50.rst
similarity index 100%
rename from Documentation/hwmon/thmc50
rename to Documentation/hwmon/thmc50.rst
diff --git a/Documentation/hwmon/tmp102 b/Documentation/hwmon/tmp102.rst
similarity index 93%
rename from Documentation/hwmon/tmp102
rename to Documentation/hwmon/tmp102.rst
index 5e34821df4ab..b1f585531a88 100644
--- a/Documentation/hwmon/tmp102
+++ b/Documentation/hwmon/tmp102.rst
@@ -28,4 +28,4 @@ The TMP102 has a programmable update rate that can select between 8, 4, 1, and
 0.5 Hz. (Currently the driver only supports the default of 4 Hz).
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
diff --git a/Documentation/hwmon/tmp103 b/Documentation/hwmon/tmp103.rst
similarity index 92%
rename from Documentation/hwmon/tmp103
rename to Documentation/hwmon/tmp103.rst
index 7682a795e38c..15d25806d585 100644
--- a/Documentation/hwmon/tmp103
+++ b/Documentation/hwmon/tmp103.rst
@@ -27,7 +27,7 @@ Resolution: 8 Bits
 Accuracy: ±1°C Typ (–10°C to +100°C)
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
 
 Please refer how to instantiate this driver:
 Documentation/i2c/instantiating-devices
diff --git a/Documentation/hwmon/tmp108 b/Documentation/hwmon/tmp108.rst
similarity index 95%
rename from Documentation/hwmon/tmp108
rename to Documentation/hwmon/tmp108.rst
index 7e08b7ef1e2f..5f4266a16cb2 100644
--- a/Documentation/hwmon/tmp108
+++ b/Documentation/hwmon/tmp108.rst
@@ -38,4 +38,4 @@ and then the device is shut down automatically. (This driver only supports
 continuous mode.)
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
diff --git a/Documentation/hwmon/tmp401 b/Documentation/hwmon/tmp401.rst
similarity index 97%
rename from Documentation/hwmon/tmp401
rename to Documentation/hwmon/tmp401.rst
index bd865bbdb38d..6a05a0719bc7 100644
--- a/Documentation/hwmon/tmp401
+++ b/Documentation/hwmon/tmp401.rst
@@ -68,7 +68,7 @@ supported by the driver so far, so using the default resolution of 0.5
 degree).
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
 
 The TMP411 and TMP431 chips are compatible with TMP401. TMP411 provides
 some additional features.
diff --git a/Documentation/hwmon/tmp421 b/Documentation/hwmon/tmp421.rst
similarity index 100%
rename from Documentation/hwmon/tmp421
rename to Documentation/hwmon/tmp421.rst
diff --git a/Documentation/hwmon/tps40422 b/Documentation/hwmon/tps40422.rst
similarity index 96%
rename from Documentation/hwmon/tps40422
rename to Documentation/hwmon/tps40422.rst
index 359751eb5ed4..b691e30479dd 100644
--- a/Documentation/hwmon/tps40422
+++ b/Documentation/hwmon/tps40422.rst
@@ -21,7 +21,7 @@ This driver supports TI TPS40422 Dual-Output or Two-Phase Synchronous Buck
 Controller with PMBus
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/twl4030-madc-hwmon b/Documentation/hwmon/twl4030-madc-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/twl4030-madc-hwmon
rename to Documentation/hwmon/twl4030-madc-hwmon.rst
diff --git a/Documentation/hwmon/ucd9000 b/Documentation/hwmon/ucd9000.rst
similarity index 97%
rename from Documentation/hwmon/ucd9000
rename to Documentation/hwmon/ucd9000.rst
index d69061b7312c..ebc4f2b3bfea 100644
--- a/Documentation/hwmon/ucd9000
+++ b/Documentation/hwmon/ucd9000.rst
@@ -57,7 +57,7 @@ system-health monitor. The device integrates a 12-bit ADC for monitoring up to
 13 power-supply voltage, current, or temperature inputs.
 
 This driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -72,7 +72,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/ucd9200 b/Documentation/hwmon/ucd9200.rst
similarity index 97%
rename from Documentation/hwmon/ucd9200
rename to Documentation/hwmon/ucd9200.rst
index 44eda4a579b6..b819dfd75f71 100644
--- a/Documentation/hwmon/ucd9200
+++ b/Documentation/hwmon/ucd9200.rst
@@ -33,7 +33,7 @@ dedicated circuitry for DC/DC loop management with flash memory and a serial
 interface to support configuration, monitoring and management.
 
 This driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -48,7 +48,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/userspace-tools b/Documentation/hwmon/userspace-tools.rst
similarity index 100%
rename from Documentation/hwmon/userspace-tools
rename to Documentation/hwmon/userspace-tools.rst
diff --git a/Documentation/hwmon/vexpress b/Documentation/hwmon/vexpress.rst
similarity index 100%
rename from Documentation/hwmon/vexpress
rename to Documentation/hwmon/vexpress.rst
diff --git a/Documentation/hwmon/via686a b/Documentation/hwmon/via686a.rst
similarity index 100%
rename from Documentation/hwmon/via686a
rename to Documentation/hwmon/via686a.rst
diff --git a/Documentation/hwmon/vt1211 b/Documentation/hwmon/vt1211.rst
similarity index 100%
rename from Documentation/hwmon/vt1211
rename to Documentation/hwmon/vt1211.rst
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf.rst
similarity index 100%
rename from Documentation/hwmon/w83627ehf
rename to Documentation/hwmon/w83627ehf.rst
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf.rst
similarity index 100%
rename from Documentation/hwmon/w83627hf
rename to Documentation/hwmon/w83627hf.rst
diff --git a/Documentation/hwmon/w83773g b/Documentation/hwmon/w83773g.rst
similarity index 100%
rename from Documentation/hwmon/w83773g
rename to Documentation/hwmon/w83773g.rst
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d.rst
similarity index 100%
rename from Documentation/hwmon/w83781d
rename to Documentation/hwmon/w83781d.rst
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d.rst
similarity index 99%
rename from Documentation/hwmon/w83791d
rename to Documentation/hwmon/w83791d.rst
index a91f9e5fb0c6..3adaed39b157 100644
--- a/Documentation/hwmon/w83791d
+++ b/Documentation/hwmon/w83791d.rst
@@ -102,7 +102,7 @@ This file is used for both legacy and new code.
 
 The sysfs interface to the beep bitmask has migrated from the original legacy
 method of a single sysfs beep_mask file to a newer method using multiple
-`*_beep` files as described in `Documentation/hwmon/sysfs-interface`.
+`*_beep` files as described in `Documentation/hwmon/sysfs-interface.rst`.
 
 A similar change has occurred for the bitmap corresponding to the alarms. The
 original legacy method used a single sysfs alarms file containing a bitmap
diff --git a/Documentation/hwmon/w83792d b/Documentation/hwmon/w83792d.rst
similarity index 100%
rename from Documentation/hwmon/w83792d
rename to Documentation/hwmon/w83792d.rst
diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793.rst
similarity index 100%
rename from Documentation/hwmon/w83793
rename to Documentation/hwmon/w83793.rst
diff --git a/Documentation/hwmon/w83795 b/Documentation/hwmon/w83795.rst
similarity index 100%
rename from Documentation/hwmon/w83795
rename to Documentation/hwmon/w83795.rst
diff --git a/Documentation/hwmon/w83l785ts b/Documentation/hwmon/w83l785ts.rst
similarity index 100%
rename from Documentation/hwmon/w83l785ts
rename to Documentation/hwmon/w83l785ts.rst
diff --git a/Documentation/hwmon/w83l786ng b/Documentation/hwmon/w83l786ng.rst
similarity index 100%
rename from Documentation/hwmon/w83l786ng
rename to Documentation/hwmon/w83l786ng.rst
diff --git a/Documentation/hwmon/wm831x b/Documentation/hwmon/wm831x.rst
similarity index 100%
rename from Documentation/hwmon/wm831x
rename to Documentation/hwmon/wm831x.rst
diff --git a/Documentation/hwmon/wm8350 b/Documentation/hwmon/wm8350.rst
similarity index 100%
rename from Documentation/hwmon/wm8350
rename to Documentation/hwmon/wm8350.rst
diff --git a/Documentation/hwmon/xgene-hwmon b/Documentation/hwmon/xgene-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/xgene-hwmon
rename to Documentation/hwmon/xgene-hwmon.rst
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100.rst
similarity index 98%
rename from Documentation/hwmon/zl6100
rename to Documentation/hwmon/zl6100.rst
index 4029970bace4..41513bb7fe51 100644
--- a/Documentation/hwmon/zl6100
+++ b/Documentation/hwmon/zl6100.rst
@@ -113,7 +113,7 @@ This driver supports hardware monitoring for Intersil / Zilker Labs ZL6100 and
 compatible digital DC-DC controllers.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus and Documentation.hwmon/pmbus-core for details
+Documentation/hwmon/pmbus.rst and Documentation.hwmon/pmbus-core for details
 on PMBus client drivers.
 
 
diff --git a/Documentation/index.rst b/Documentation/index.rst
index 80a421cb935e..3a710dc24fc8 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -83,6 +83,7 @@ needed).
    media/index
    networking/index
    input/index
+   hwmon/index
    gpu/index
    security/index
    sound/index
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 911399730c1c..c3fa500df92c 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -316,7 +316,7 @@ ACPI thermal zones.
     |---temp[1-*]_input:	The current temperature of thermal zone [1-*]
     |---temp[1-*]_critical:	The critical trip point of thermal zone [1-*]
 
-Please read Documentation/hwmon/sysfs-interface for additional information.
+Please read Documentation/hwmon/sysfs-interface.rst for additional information.
 
 ***************************
 * Thermal zone attributes *
diff --git a/MAINTAINERS b/MAINTAINERS
index dc615cb76455..d258fb8e7e8e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -468,7 +468,7 @@ ADM1025 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/adm1025
+F:	Documentation/hwmon/adm1025.rst
 F:	drivers/hwmon/adm1025.c
 
 ADM1029 HARDWARE MONITOR DRIVER
@@ -520,7 +520,7 @@ ADS1015 HARDWARE MONITOR DRIVER
 M:	Dirk Eibach <eibach@gdsys.de>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ads1015
+F:	Documentation/hwmon/ads1015.rst
 F:	drivers/hwmon/ads1015.c
 F:	include/linux/platform_data/ads1015.h
 
@@ -533,7 +533,7 @@ ADT7475 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/adt7475
+F:	Documentation/hwmon/adt7475.rst
 F:	drivers/hwmon/adt7475.c
 
 ADVANSYS SCSI DRIVER
@@ -764,7 +764,7 @@ AMD FAM15H PROCESSOR POWER MONITORING DRIVER
 M:	Huang Rui <ray.huang@amd.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Supported
-F:	Documentation/hwmon/fam15h_power
+F:	Documentation/hwmon/fam15h_power.rst
 F:	drivers/hwmon/fam15h_power.c
 
 AMD FCH GPIO DRIVER
@@ -2512,7 +2512,7 @@ ASC7621 HARDWARE MONITOR DRIVER
 M:	George Joseph <george.joseph@fairview5.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/asc7621
+F:	Documentation/hwmon/asc7621.rst
 F:	drivers/hwmon/asc7621.c
 
 ASPEED VIDEO ENGINE DRIVER
@@ -4043,7 +4043,7 @@ CORETEMP HARDWARE MONITORING DRIVER
 M:	Fenghua Yu <fenghua.yu@intel.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/coretemp
+F:	Documentation/hwmon/coretemp.rst
 F:	drivers/hwmon/coretemp.c
 
 COSA/SRP SYNC SERIAL DRIVER
@@ -4598,7 +4598,7 @@ DIALOG SEMICONDUCTOR DRIVERS
 M:	Support Opensource <support.opensource@diasemi.com>
 W:	http://www.dialog-semiconductor.com/products
 S:	Supported
-F:	Documentation/hwmon/da90??
+F:	Documentation/hwmon/da90??.rst
 F:	Documentation/devicetree/bindings/mfd/da90*.txt
 F:	Documentation/devicetree/bindings/input/da90??-onkey.txt
 F:	Documentation/devicetree/bindings/thermal/da90??-thermal.txt
@@ -4749,7 +4749,7 @@ DME1737 HARDWARE MONITOR DRIVER
 M:	Juerg Haefliger <juergh@gmail.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/dme1737
+F:	Documentation/hwmon/dme1737.rst
 F:	drivers/hwmon/dme1737.c
 
 DMI/SMBIOS SUPPORT
@@ -5935,7 +5935,7 @@ F71805F HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/f71805f
+F:	Documentation/hwmon/f71805f.rst
 F:	drivers/hwmon/f71805f.c
 
 FADDR2LINE
@@ -7618,7 +7618,7 @@ INA209 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ina209
+F:	Documentation/hwmon/ina209.rst
 F:	Documentation/devicetree/bindings/hwmon/ina2xx.txt
 F:	drivers/hwmon/ina209.c
 
@@ -7626,7 +7626,7 @@ INA2XX HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ina2xx
+F:	Documentation/hwmon/ina2xx.rst
 F:	drivers/hwmon/ina2xx.c
 F:	include/linux/platform_data/ina2xx.h
 
@@ -8244,7 +8244,7 @@ IT87 HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/it87
+F:	Documentation/hwmon/it87.rst
 F:	drivers/hwmon/it87.c
 
 IT913X MEDIA DRIVER
@@ -8288,7 +8288,7 @@ M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
 F:	drivers/hwmon/jc42.c
-F:	Documentation/hwmon/jc42
+F:	Documentation/hwmon/jc42.rst
 
 JFS FILESYSTEM
 M:	Dave Kleikamp <shaggy@kernel.org>
@@ -8336,14 +8336,14 @@ K10TEMP HARDWARE MONITORING DRIVER
 M:	Clemens Ladisch <clemens@ladisch.de>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/k10temp
+F:	Documentation/hwmon/k10temp.rst
 F:	drivers/hwmon/k10temp.c
 
 K8TEMP HARDWARE MONITORING DRIVER
 M:	Rudolf Marek <r.marek@assembler.cz>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/k8temp
+F:	Documentation/hwmon/k8temp.rst
 F:	drivers/hwmon/k8temp.c
 
 KASAN
@@ -9034,21 +9034,21 @@ LM78 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm78
+F:	Documentation/hwmon/lm78.rst
 F:	drivers/hwmon/lm78.c
 
 LM83 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm83
+F:	Documentation/hwmon/lm83.rst
 F:	drivers/hwmon/lm83.c
 
 LM90 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm90
+F:	Documentation/hwmon/lm90.rst
 F:	Documentation/devicetree/bindings/hwmon/lm90.txt
 F:	drivers/hwmon/lm90.c
 F:	include/dt-bindings/thermal/lm90.h
@@ -9057,7 +9057,7 @@ LM95234 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm95234
+F:	Documentation/hwmon/lm95234.rst
 F:	drivers/hwmon/lm95234.c
 
 LME2510 MEDIA DRIVER
@@ -9131,7 +9131,7 @@ LTC4261 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ltc4261
+F:	Documentation/hwmon/ltc4261.rst
 F:	drivers/hwmon/ltc4261.c
 
 LTC4306 I2C MULTIPLEXER DRIVER
@@ -9362,7 +9362,7 @@ MAX16065 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/max16065
+F:	Documentation/hwmon/max16065.rst
 F:	drivers/hwmon/max16065.c
 
 MAX2175 SDR TUNER DRIVER
@@ -9378,14 +9378,14 @@ F:	include/uapi/linux/max2175.h
 MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
 L:	linux-hwmon@vger.kernel.org
 S:	Orphan
-F:	Documentation/hwmon/max6650
+F:	Documentation/hwmon/max6650.rst
 F:	drivers/hwmon/max6650.c
 
 MAX6697 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/max6697
+F:	Documentation/hwmon/max6697.rst
 F:	Documentation/devicetree/bindings/hwmon/max6697.txt
 F:	drivers/hwmon/max6697.c
 F:	include/linux/platform_data/max6697.h
@@ -10031,7 +10031,7 @@ F:	drivers/mfd/menf21bmc.c
 F:	drivers/watchdog/menf21bmc_wdt.c
 F:	drivers/leds/leds-menf21bmc.c
 F:	drivers/hwmon/menf21bmc_hwmon.c
-F:	Documentation/hwmon/menf21bmc
+F:	Documentation/hwmon/menf21bmc.rst
 
 MEN Z069 WATCHDOG DRIVER
 M:	Johannes Thumshirn <jth@kernel.org>
@@ -10659,7 +10659,7 @@ NCT6775 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/nct6775
+F:	Documentation/hwmon/nct6775.rst
 F:	drivers/hwmon/nct6775.c
 
 NET_FAILOVER MODULE
@@ -11753,7 +11753,7 @@ PC87360 HARDWARE MONITORING DRIVER
 M:	Jim Cromie <jim.cromie@gmail.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/pc87360
+F:	Documentation/hwmon/pc87360.rst
 F:	drivers/hwmon/pc87360.c
 
 PC8736x GPIO DRIVER
@@ -11765,7 +11765,7 @@ PC87427 HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/pc87427
+F:	Documentation/hwmon/pc87427.rst
 F:	drivers/hwmon/pc87427.c
 
 PCA9532 LED DRIVER
@@ -12333,23 +12333,23 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/hwmon/ibm,cffps1.txt
 F:	Documentation/devicetree/bindings/hwmon/max31785.txt
 F:	Documentation/devicetree/bindings/hwmon/ltc2978.txt
-F:	Documentation/hwmon/adm1275
-F:	Documentation/hwmon/ibm-cffps
-F:	Documentation/hwmon/ir35221
-F:	Documentation/hwmon/lm25066
-F:	Documentation/hwmon/ltc2978
-F:	Documentation/hwmon/ltc3815
-F:	Documentation/hwmon/max16064
-F:	Documentation/hwmon/max20751
-F:	Documentation/hwmon/max31785
-F:	Documentation/hwmon/max34440
-F:	Documentation/hwmon/max8688
-F:	Documentation/hwmon/pmbus
-F:	Documentation/hwmon/pmbus-core
-F:	Documentation/hwmon/tps40422
-F:	Documentation/hwmon/ucd9000
-F:	Documentation/hwmon/ucd9200
-F:	Documentation/hwmon/zl6100
+F:	Documentation/hwmon/adm1275.rst
+F:	Documentation/hwmon/ibm-cffps.rst
+F:	Documentation/hwmon/ir35221.rst
+F:	Documentation/hwmon/lm25066.rst
+F:	Documentation/hwmon/ltc2978.rst
+F:	Documentation/hwmon/ltc3815.rst
+F:	Documentation/hwmon/max16064.rst
+F:	Documentation/hwmon/max20751.rst
+F:	Documentation/hwmon/max31785.rst
+F:	Documentation/hwmon/max34440.rst
+F:	Documentation/hwmon/max8688.rst
+F:	Documentation/hwmon/pmbus.rst
+F:	Documentation/hwmon/pmbus-core.rst
+F:	Documentation/hwmon/tps40422.rst
+F:	Documentation/hwmon/ucd9000.rst
+F:	Documentation/hwmon/ucd9200.rst
+F:	Documentation/hwmon/zl6100.rst
 F:	drivers/hwmon/pmbus/
 F:	include/linux/pmbus.h
 
@@ -12613,7 +12613,7 @@ M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Supported
 F:	Documentation/devicetree/bindings/hwmon/pwm-fan.txt
-F:	Documentation/hwmon/pwm-fan
+F:	Documentation/hwmon/pwm-fan.rst
 F:	drivers/hwmon/pwm-fan.c
 
 PWM IR Transmitter
@@ -14278,21 +14278,21 @@ SMM665 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/smm665
+F:	Documentation/hwmon/smm665.rst
 F:	drivers/hwmon/smm665.c
 
 SMSC EMC2103 HARDWARE MONITOR DRIVER
 M:	Steve Glendinning <steve.glendinning@shawell.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/emc2103
+F:	Documentation/hwmon/emc2103.rst
 F:	drivers/hwmon/emc2103.c
 
 SMSC SCH5627 HARDWARE MONITOR DRIVER
 M:	Hans de Goede <hdegoede@redhat.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Supported
-F:	Documentation/hwmon/sch5627
+F:	Documentation/hwmon/sch5627.rst
 F:	drivers/hwmon/sch5627.c
 
 SMSC UFX6000 and UFX7000 USB to VGA DRIVER
@@ -14305,7 +14305,7 @@ SMSC47B397 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/smsc47b397
+F:	Documentation/hwmon/smsc47b397.rst
 F:	drivers/hwmon/smsc47b397.c
 
 SMSC911x ETHERNET DRIVER
@@ -15650,7 +15650,7 @@ TMP401 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/tmp401
+F:	Documentation/hwmon/tmp401.rst
 F:	drivers/hwmon/tmp401.c
 
 TMPFS (SHMEM FILESYSTEM)
@@ -16675,7 +16675,7 @@ VT1211 HARDWARE MONITOR DRIVER
 M:	Juerg Haefliger <juergh@gmail.com>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/vt1211
+F:	Documentation/hwmon/vt1211.rst
 F:	drivers/hwmon/vt1211.c
 
 VT8231 HARDWARE MONITOR DRIVER
@@ -16703,14 +16703,14 @@ W83791D HARDWARE MONITORING DRIVER
 M:	Marc Hulsman <m.hulsman@tudelft.nl>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/w83791d
+F:	Documentation/hwmon/w83791d.rst
 F:	drivers/hwmon/w83791d.c
 
 W83793 HARDWARE MONITORING DRIVER
 M:	Rudolf Marek <r.marek@assembler.cz>
 L:	linux-hwmon@vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/w83793
+F:	Documentation/hwmon/w83793.rst
 F:	drivers/hwmon/w83793.c
 
 W83795 HARDWARE MONITORING DRIVER
@@ -16819,7 +16819,7 @@ L:	patches@opensource.cirrus.com
 T:	git https://github.com/CirrusLogic/linux-drivers.git
 W:	https://github.com/CirrusLogic/linux-drivers/wiki
 S:	Supported
-F:	Documentation/hwmon/wm83??
+F:	Documentation/hwmon/wm83??.rst
 F:	Documentation/devicetree/bindings/extcon/extcon-arizona.txt
 F:	Documentation/devicetree/bindings/regulator/arizona-regulator.txt
 F:	Documentation/devicetree/bindings/mfd/arizona.txt
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 6f929bfa9fcd..74c6c95cb657 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -17,7 +17,7 @@ menuconfig HWMON
 
 	  To find out which specific driver(s) you need, use the
 	  sensors-detect script from the lm_sensors package.  Read
-	  <file:Documentation/hwmon/userspace-tools> for details.
+	  <file:Documentation/hwmon/userspace-tools.rst> for details.
 
 	  This support can also be built as a module. If so, the module
 	  will be called hwmon.
@@ -59,7 +59,7 @@ config SENSORS_ABITUGURU
 	  chip can be found on Abit uGuru featuring motherboards (most modern
 	  Abit motherboards from before end 2005). For more info and a list
 	  of which motherboards have which revision see
-	  Documentation/hwmon/abituguru
+	  Documentation/hwmon/abituguru.rst
 
 	  This driver can also be built as a module. If so, the module
 	  will be called abituguru.
@@ -73,7 +73,7 @@ config SENSORS_ABITUGURU3
 	  and their settings is supported. The third revision of the Abit
 	  uGuru chip can be found on recent Abit motherboards (since end
 	  2005). For more info and a list of which motherboards have which
-	  revision see Documentation/hwmon/abituguru3
+	  revision see Documentation/hwmon/abituguru3.rst
 
 	  This driver can also be built as a module. If so, the module
 	  will be called abituguru3.
@@ -643,7 +643,7 @@ config SENSORS_CORETEMP
 	help
 	  If you say yes here you get support for the temperature
 	  sensor inside your CPU. Most of the family 6 CPUs
-	  are supported. Check Documentation/hwmon/coretemp for details.
+	  are supported. Check Documentation/hwmon/coretemp.rst for details.
 
 config SENSORS_IT87
 	tristate "ITE IT87xx and compatibles"
diff --git a/drivers/hwmon/ads7828.c b/drivers/hwmon/ads7828.c
index 12c56d3783ed..545b635a104e 100644
--- a/drivers/hwmon/ads7828.c
+++ b/drivers/hwmon/ads7828.c
@@ -8,7 +8,7 @@
  *
  * ADS7830 support, by Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
  *
- * For further information, see the Documentation/hwmon/ads7828 file.
+ * For further information, see the Documentation/hwmon/ads7828.rst file.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/drivers/hwmon/max197.c b/drivers/hwmon/max197.c
index 3d9e210beedf..dd6a35219a18 100644
--- a/drivers/hwmon/max197.c
+++ b/drivers/hwmon/max197.c
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/max197 file.
+ * For further information, see the Documentation/hwmon/max197.rst file.
  */
 
 #include <linux/kernel.h>
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 39b41e35c2bf..7f4a63959730 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -10,7 +10,7 @@
  *
  * Copyright (c) 2007 Wouter Horre
  *
- * For further information, see the Documentation/hwmon/sht15 file.
+ * For further information, see the Documentation/hwmon/sht15.rst file.
  */
 
 #include <linux/interrupt.h>
diff --git a/include/linux/platform_data/ads7828.h b/include/linux/platform_data/ads7828.h
index 3245f45f9d77..a3370a007702 100644
--- a/include/linux/platform_data/ads7828.h
+++ b/include/linux/platform_data/ads7828.h
@@ -4,7 +4,7 @@
  * Copyright (c) 2012 Savoir-faire Linux Inc.
  *          Vivien Didelot <vivien.didelot@savoirfairelinux.com>
  *
- * For further information, see the Documentation/hwmon/ads7828 file.
+ * For further information, see the Documentation/hwmon/ads7828.rst file.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/include/linux/platform_data/ds620.h b/include/linux/platform_data/ds620.h
index 6ef58bb77e46..f0ce22a78bb8 100644
--- a/include/linux/platform_data/ds620.h
+++ b/include/linux/platform_data/ds620.h
@@ -14,7 +14,7 @@ struct ds620_platform_data {
 	 *  1 = PO_LOW
 	 *  2 = PO_HIGH
 	 *
-	 * (see Documentation/hwmon/ds620)
+	 * (see Documentation/hwmon/ds620.rst)
 	 */
 	int pomode;
 };
diff --git a/include/linux/platform_data/ina2xx.h b/include/linux/platform_data/ina2xx.h
index 9f0aa1b48c78..dde59fd3590f 100644
--- a/include/linux/platform_data/ina2xx.h
+++ b/include/linux/platform_data/ina2xx.h
@@ -7,7 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/ina2xx file.
+ * For further information, see the Documentation/hwmon/ina2xx.rst file.
  */
 
 /**
diff --git a/include/linux/platform_data/max197.h b/include/linux/platform_data/max197.h
index 8da8f94ee15c..2bbd0919bc89 100644
--- a/include/linux/platform_data/max197.h
+++ b/include/linux/platform_data/max197.h
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/max197 file.
+ * For further information, see the Documentation/hwmon/max197.rst file.
  */
 
 #ifndef _PDATA_MAX197_H
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
index ee03d429742b..5fa115d3ea4b 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -42,7 +42,7 @@ struct ntc_thermistor_platform_data {
 	 * read_uV()
 	 *
 	 * How to setup pullup_ohm, pulldown_ohm, and connect is
-	 * described at Documentation/hwmon/ntc_thermistor
+	 * described at Documentation/hwmon/ntc_thermistor.rst
 	 *
 	 * pullup/down_ohm: 0 for infinite / not-connected
 	 *
-- 
2.20.1


^ permalink raw reply related


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