* Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst
From: Mauro Carvalho Chehab @ 2019-04-17 17:13 UTC (permalink / raw)
To: Guenter Roeck
Cc: Mark Rutland, Dirk Eibach, linux-aspeed, Linux Doc Mailing List,
Clemens Ladisch, Kamil Debski, Marc Hulsman, devicetree,
Huang Rui, Paul Mackerras, Jim Cromie, Lorenzo Pieralisi,
Jonathan Corbet, Joel Stanley, 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: <20190417164741.GA12147@roeck-us.net>
Em Wed, 17 Apr 2019 09:47:41 -0700
Guenter Roeck <linux@roeck-us.net> escreveu:
> On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote:
> > 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>
> > Acked-by: Liviu Dudau <liviu.dudau@arm.com>
>
> I applied all patches except this one, which fails due to a conflict in
> ab8500. I also notice that this file has not been touched by your series,
> which is odd. At the same time, patch 20/21 is missing from your series,
> and has been missing all along. Does the missing patch possibly touch
> Documentation/hwmon/ab8500 ?
Patch 20/21 is the biggest one. Maybe vger rejected it either due to
its size or due to the number of c/c.
Just bounced it to you. Please let me know if you didn't receive it
yet.
Regards,
Mauro
>
> Thanks,
> Guenter
>
> > ---
> > .../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} | 1 -
> > Documentation/hwmon/{adt7470 => adt7470.rst} | 0
> > Documentation/hwmon/{adt7475 => adt7475.rst} | 0
> > Documentation/hwmon/{amc6821 => amc6821.rst} | 1 -
> > Documentation/hwmon/{asb100 => asb100.rst} | 1 -
> > 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} | 1 -
> > 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} | 1 -
> > 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} | 1 -
> > 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} | 1 -
> > 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(+), 102 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} (99%)
> > rename Documentation/hwmon/{adt7470 => adt7470.rst} (100%)
> > rename Documentation/hwmon/{adt7475 => adt7475.rst} (100%)
> > rename Documentation/hwmon/{amc6821 => amc6821.rst} (99%)
> > rename Documentation/hwmon/{asb100 => asb100.rst} (99%)
> > 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} (99%)
> > 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} (99%)
> > 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} (99%)
> > 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} (99%)
> > 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 99%
> > rename from Documentation/hwmon/adt7462
> > rename to Documentation/hwmon/adt7462.rst
> > index a7a831118d32..139e19696188 100644
> > --- a/Documentation/hwmon/adt7462
> > +++ b/Documentation/hwmon/adt7462.rst
> > @@ -68,4 +68,3 @@ The ADT7462 will scale the pwm between the lower and higher pwm speed when
> > the temperature is between the two temperature boundaries. PWM values range
> > from 0 (off) to 255 (full speed). Fan speed will be set to maximum when the
> > temperature sensor associated with the PWM control exceeds temp#_max.
> > -
> > 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 99%
> > rename from Documentation/hwmon/amc6821
> > rename to Documentation/hwmon/amc6821.rst
> > index d10eabcbc0f3..5ddb2849da90 100644
> > --- a/Documentation/hwmon/amc6821
> > +++ b/Documentation/hwmon/amc6821.rst
> > @@ -106,4 +106,3 @@ different settings, you can set the following parameters:
> >
> > - init=1,
> > - pwminv: 0 default pwm output, 1 inverts pwm output.
> > -
> > diff --git a/Documentation/hwmon/asb100 b/Documentation/hwmon/asb100.rst
> > similarity index 99%
> > rename from Documentation/hwmon/asb100
> > rename to Documentation/hwmon/asb100.rst
> > index 311d9f7b6926..c2d5f97085fe 100644
> > --- a/Documentation/hwmon/asb100
> > +++ b/Documentation/hwmon/asb100.rst
> > @@ -71,4 +71,3 @@ TODO:
> > * Experiment with temp. sensor types.
> > * Are there really 13 voltage inputs? Probably not...
> > * Cleanups, no doubt...
> > -
> > 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 b347b959fcda..c41eb6108103 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 99%
> > rename from Documentation/hwmon/max1619
> > rename to Documentation/hwmon/max1619.rst
> > index 4b3762c4eceb..e25956e70f73 100644
> > --- a/Documentation/hwmon/max1619
> > +++ b/Documentation/hwmon/max1619.rst
> > @@ -31,4 +31,3 @@ Only the external sensor has high and low limits.
> > The max1619 driver will not update its values more frequently than every
> > other second; reading them more often will do no harm, but will return
> > 'old' values.
> > -
> > 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 99%
> > rename from Documentation/hwmon/max6650
> > rename to Documentation/hwmon/max6650.rst
> > index 74dc3f0caaa2..253482add082 100644
> > --- a/Documentation/hwmon/max6650
> > +++ b/Documentation/hwmon/max6650.rst
> > @@ -72,4 +72,3 @@ clock: The clock frequency in Hz of the chip the driver should assume [254000]
> >
> > Please have a look at the MAX6650/6651 data sheet and make sure that you fully
> > understand the meaning of these parameters before you attempt to change them.
> > -
> > 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 99%
> > rename from Documentation/hwmon/sis5595
> > rename to Documentation/hwmon/sis5595.rst
> > index 5acba6b0c0db..16123b3bfff9 100644
> > --- a/Documentation/hwmon/sis5595
> > +++ b/Documentation/hwmon/sis5595.rst
> > @@ -121,4 +121,3 @@ Problems
> > --------
> > Some chips refuse to be enabled. We don't know why.
> > The driver will recognize this and print a message in dmesg.
> > -
> > 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 99%
> > rename from Documentation/hwmon/thmc50
> > rename to Documentation/hwmon/thmc50.rst
> > index 6dba1b59b20c..cfff3885287d 100644
> > --- a/Documentation/hwmon/thmc50
> > +++ b/Documentation/hwmon/thmc50.rst
> > @@ -87,4 +87,3 @@ so it stops fans even if the value 0 into the ANALOG_OUT register does not.
> >
> > The driver was tested on Compaq AP550 with two ADM1022 chips (one works
> > in the temp3 mode), five temperature readings and two fans.
> > -
> > 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 349e5d8c3f58..6269c9d671ca 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
> > @@ -2531,7 +2531,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
> > @@ -4071,7 +4071,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
> > @@ -4627,7 +4627,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
> > @@ -4778,7 +4778,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
> > @@ -6006,7 +6006,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
> > @@ -7687,7 +7687,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
> >
> > @@ -7695,7 +7695,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
> >
> > @@ -8328,7 +8328,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
> > @@ -8372,7 +8372,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>
> > @@ -8420,14 +8420,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
> > @@ -9118,21 +9118,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
> > @@ -9141,7 +9141,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
> > @@ -9214,7 +9214,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
> > @@ -9445,7 +9445,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
> > @@ -9461,14 +9461,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
> > @@ -10118,7 +10118,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>
> > @@ -10747,7 +10747,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
> > @@ -11841,7 +11841,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
> > @@ -11853,7 +11853,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
> > @@ -12421,23 +12421,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
> >
> > @@ -12701,7 +12701,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
> > @@ -14366,21 +14366,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
> > @@ -14393,7 +14393,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
> > @@ -15744,7 +15744,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)
> > @@ -16796,7 +16796,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
> > @@ -16824,14 +16824,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
> > @@ -16940,7 +16940,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 dedd5febd3aa..470ba66b18b0 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 e6be617e3fb2..03d6e782777a 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
> > *
Thanks,
Mauro
^ permalink raw reply
* Re: Linux 5.1-rc5
From: Linus Torvalds @ 2019-04-17 16:57 UTC (permalink / raw)
To: Martin Schwidefsky
Cc: Christoph Hellwig, linuxppc-dev, Linux List Kernel Mailing,
linux-s390
In-Reply-To: <20190417100244.42e29736@mschwideX1>
On Wed, Apr 17, 2019 at 1:02 AM Martin Schwidefsky
<schwidefsky@de.ibm.com> wrote:
>
> Grumpf, that does *not* work. For gup the table entries may be read only
> once. Now I remember why I open-coded p4d_offset, pud_offset and pmd_offset
> in arch/s390/mm/gup.c, to avoid to read the table entries twice.
> It will be hard to use the common gup code after all.
Hmm. The common gup code generally should do the "read only once"
thing too (since by definition the gup-fast case is done without
locking), although it's probably the case that most architectures
simply don't care.
What would it require for the generic code to work for s390?
Linus
^ permalink raw reply
* Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst
From: Guenter Roeck @ 2019-04-17 16:54 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Mark Rutland, Dirk Eibach, linux-aspeed, Linux Doc Mailing List,
Clemens Ladisch, Kamil Debski, Marc Hulsman, devicetree,
Huang Rui, Paul Mackerras, Jim Cromie, Lorenzo Pieralisi,
Jonathan Corbet, Joel Stanley, 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: <20190417164741.GA12147@roeck-us.net>
On Wed, Apr 17, 2019 at 09:47:41AM -0700, Guenter Roeck wrote:
> On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote:
> > 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>
> > Acked-by: Liviu Dudau <liviu.dudau@arm.com>
>
> I applied all patches except this one, which fails due to a conflict in
> ab8500. I also notice that this file has not been touched by your series,
> which is odd. At the same time, patch 20/21 is missing from your series,
> and has been missing all along. Does the missing patch possibly touch
> Documentation/hwmon/ab8500 ?
>
Actually, the conflicts are in those files:
patching file Documentation/hwmon/amc6821.rst (renamed from Documentation/hwmon/amc6821)
Hunk #1 FAILED at 106.
1 out of 1 hunk FAILED -- saving rejects to file Documentation/hwmon/amc6821.rst.rej
patching file Documentation/hwmon/asb100.rst (renamed from Documentation/hwmon/asb100)
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file Documentation/hwmon/asb100.rst.rej
Both were not touched by your series.
Guenter
> Thanks,
> Guenter
>
> > ---
> > .../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} | 1 -
> > Documentation/hwmon/{adt7470 => adt7470.rst} | 0
> > Documentation/hwmon/{adt7475 => adt7475.rst} | 0
> > Documentation/hwmon/{amc6821 => amc6821.rst} | 1 -
> > Documentation/hwmon/{asb100 => asb100.rst} | 1 -
> > 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} | 1 -
> > 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} | 1 -
> > 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} | 1 -
> > 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} | 1 -
> > 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(+), 102 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} (99%)
> > rename Documentation/hwmon/{adt7470 => adt7470.rst} (100%)
> > rename Documentation/hwmon/{adt7475 => adt7475.rst} (100%)
> > rename Documentation/hwmon/{amc6821 => amc6821.rst} (99%)
> > rename Documentation/hwmon/{asb100 => asb100.rst} (99%)
> > 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} (99%)
> > 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} (99%)
> > 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} (99%)
> > 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} (99%)
> > 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 99%
> > rename from Documentation/hwmon/adt7462
> > rename to Documentation/hwmon/adt7462.rst
> > index a7a831118d32..139e19696188 100644
> > --- a/Documentation/hwmon/adt7462
> > +++ b/Documentation/hwmon/adt7462.rst
> > @@ -68,4 +68,3 @@ The ADT7462 will scale the pwm between the lower and higher pwm speed when
> > the temperature is between the two temperature boundaries. PWM values range
> > from 0 (off) to 255 (full speed). Fan speed will be set to maximum when the
> > temperature sensor associated with the PWM control exceeds temp#_max.
> > -
> > 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 99%
> > rename from Documentation/hwmon/amc6821
> > rename to Documentation/hwmon/amc6821.rst
> > index d10eabcbc0f3..5ddb2849da90 100644
> > --- a/Documentation/hwmon/amc6821
> > +++ b/Documentation/hwmon/amc6821.rst
> > @@ -106,4 +106,3 @@ different settings, you can set the following parameters:
> >
> > - init=1,
> > - pwminv: 0 default pwm output, 1 inverts pwm output.
> > -
> > diff --git a/Documentation/hwmon/asb100 b/Documentation/hwmon/asb100.rst
> > similarity index 99%
> > rename from Documentation/hwmon/asb100
> > rename to Documentation/hwmon/asb100.rst
> > index 311d9f7b6926..c2d5f97085fe 100644
> > --- a/Documentation/hwmon/asb100
> > +++ b/Documentation/hwmon/asb100.rst
> > @@ -71,4 +71,3 @@ TODO:
> > * Experiment with temp. sensor types.
> > * Are there really 13 voltage inputs? Probably not...
> > * Cleanups, no doubt...
> > -
> > 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 b347b959fcda..c41eb6108103 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 99%
> > rename from Documentation/hwmon/max1619
> > rename to Documentation/hwmon/max1619.rst
> > index 4b3762c4eceb..e25956e70f73 100644
> > --- a/Documentation/hwmon/max1619
> > +++ b/Documentation/hwmon/max1619.rst
> > @@ -31,4 +31,3 @@ Only the external sensor has high and low limits.
> > The max1619 driver will not update its values more frequently than every
> > other second; reading them more often will do no harm, but will return
> > 'old' values.
> > -
> > 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 99%
> > rename from Documentation/hwmon/max6650
> > rename to Documentation/hwmon/max6650.rst
> > index 74dc3f0caaa2..253482add082 100644
> > --- a/Documentation/hwmon/max6650
> > +++ b/Documentation/hwmon/max6650.rst
> > @@ -72,4 +72,3 @@ clock: The clock frequency in Hz of the chip the driver should assume [254000]
> >
> > Please have a look at the MAX6650/6651 data sheet and make sure that you fully
> > understand the meaning of these parameters before you attempt to change them.
> > -
> > 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 99%
> > rename from Documentation/hwmon/sis5595
> > rename to Documentation/hwmon/sis5595.rst
> > index 5acba6b0c0db..16123b3bfff9 100644
> > --- a/Documentation/hwmon/sis5595
> > +++ b/Documentation/hwmon/sis5595.rst
> > @@ -121,4 +121,3 @@ Problems
> > --------
> > Some chips refuse to be enabled. We don't know why.
> > The driver will recognize this and print a message in dmesg.
> > -
> > 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 99%
> > rename from Documentation/hwmon/thmc50
> > rename to Documentation/hwmon/thmc50.rst
> > index 6dba1b59b20c..cfff3885287d 100644
> > --- a/Documentation/hwmon/thmc50
> > +++ b/Documentation/hwmon/thmc50.rst
> > @@ -87,4 +87,3 @@ so it stops fans even if the value 0 into the ANALOG_OUT register does not.
> >
> > The driver was tested on Compaq AP550 with two ADM1022 chips (one works
> > in the temp3 mode), five temperature readings and two fans.
> > -
> > 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 349e5d8c3f58..6269c9d671ca 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
> > @@ -2531,7 +2531,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
> > @@ -4071,7 +4071,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
> > @@ -4627,7 +4627,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
> > @@ -4778,7 +4778,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
> > @@ -6006,7 +6006,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
> > @@ -7687,7 +7687,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
> >
> > @@ -7695,7 +7695,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
> >
> > @@ -8328,7 +8328,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
> > @@ -8372,7 +8372,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>
> > @@ -8420,14 +8420,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
> > @@ -9118,21 +9118,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
> > @@ -9141,7 +9141,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
> > @@ -9214,7 +9214,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
> > @@ -9445,7 +9445,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
> > @@ -9461,14 +9461,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
> > @@ -10118,7 +10118,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>
> > @@ -10747,7 +10747,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
> > @@ -11841,7 +11841,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
> > @@ -11853,7 +11853,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
> > @@ -12421,23 +12421,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
> >
> > @@ -12701,7 +12701,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
> > @@ -14366,21 +14366,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
> > @@ -14393,7 +14393,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
> > @@ -15744,7 +15744,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)
> > @@ -16796,7 +16796,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
> > @@ -16824,14 +16824,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
> > @@ -16940,7 +16940,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 dedd5febd3aa..470ba66b18b0 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 e6be617e3fb2..03d6e782777a 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
> > *
^ permalink raw reply
* Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst
From: Guenter Roeck @ 2019-04-17 16:47 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Mark Rutland, Dirk Eibach, linux-aspeed, Linux Doc Mailing List,
Clemens Ladisch, Kamil Debski, Marc Hulsman, devicetree,
Huang Rui, Paul Mackerras, Jim Cromie, Lorenzo Pieralisi,
Jonathan Corbet, Joel Stanley, 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: <efbe0a2b5be35026c3a2dbdb9090c4fbd932c9a2.1555494108.git.mchehab+samsung@kernel.org>
On Wed, Apr 17, 2019 at 06:46:29AM -0300, Mauro Carvalho Chehab wrote:
> 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>
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
I applied all patches except this one, which fails due to a conflict in
ab8500. I also notice that this file has not been touched by your series,
which is odd. At the same time, patch 20/21 is missing from your series,
and has been missing all along. Does the missing patch possibly touch
Documentation/hwmon/ab8500 ?
Thanks,
Guenter
> ---
> .../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} | 1 -
> Documentation/hwmon/{adt7470 => adt7470.rst} | 0
> Documentation/hwmon/{adt7475 => adt7475.rst} | 0
> Documentation/hwmon/{amc6821 => amc6821.rst} | 1 -
> Documentation/hwmon/{asb100 => asb100.rst} | 1 -
> 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} | 1 -
> 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} | 1 -
> 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} | 1 -
> 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} | 1 -
> 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(+), 102 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} (99%)
> rename Documentation/hwmon/{adt7470 => adt7470.rst} (100%)
> rename Documentation/hwmon/{adt7475 => adt7475.rst} (100%)
> rename Documentation/hwmon/{amc6821 => amc6821.rst} (99%)
> rename Documentation/hwmon/{asb100 => asb100.rst} (99%)
> 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} (99%)
> 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} (99%)
> 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} (99%)
> 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} (99%)
> 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 99%
> rename from Documentation/hwmon/adt7462
> rename to Documentation/hwmon/adt7462.rst
> index a7a831118d32..139e19696188 100644
> --- a/Documentation/hwmon/adt7462
> +++ b/Documentation/hwmon/adt7462.rst
> @@ -68,4 +68,3 @@ The ADT7462 will scale the pwm between the lower and higher pwm speed when
> the temperature is between the two temperature boundaries. PWM values range
> from 0 (off) to 255 (full speed). Fan speed will be set to maximum when the
> temperature sensor associated with the PWM control exceeds temp#_max.
> -
> 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 99%
> rename from Documentation/hwmon/amc6821
> rename to Documentation/hwmon/amc6821.rst
> index d10eabcbc0f3..5ddb2849da90 100644
> --- a/Documentation/hwmon/amc6821
> +++ b/Documentation/hwmon/amc6821.rst
> @@ -106,4 +106,3 @@ different settings, you can set the following parameters:
>
> - init=1,
> - pwminv: 0 default pwm output, 1 inverts pwm output.
> -
> diff --git a/Documentation/hwmon/asb100 b/Documentation/hwmon/asb100.rst
> similarity index 99%
> rename from Documentation/hwmon/asb100
> rename to Documentation/hwmon/asb100.rst
> index 311d9f7b6926..c2d5f97085fe 100644
> --- a/Documentation/hwmon/asb100
> +++ b/Documentation/hwmon/asb100.rst
> @@ -71,4 +71,3 @@ TODO:
> * Experiment with temp. sensor types.
> * Are there really 13 voltage inputs? Probably not...
> * Cleanups, no doubt...
> -
> 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 b347b959fcda..c41eb6108103 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 99%
> rename from Documentation/hwmon/max1619
> rename to Documentation/hwmon/max1619.rst
> index 4b3762c4eceb..e25956e70f73 100644
> --- a/Documentation/hwmon/max1619
> +++ b/Documentation/hwmon/max1619.rst
> @@ -31,4 +31,3 @@ Only the external sensor has high and low limits.
> The max1619 driver will not update its values more frequently than every
> other second; reading them more often will do no harm, but will return
> 'old' values.
> -
> 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 99%
> rename from Documentation/hwmon/max6650
> rename to Documentation/hwmon/max6650.rst
> index 74dc3f0caaa2..253482add082 100644
> --- a/Documentation/hwmon/max6650
> +++ b/Documentation/hwmon/max6650.rst
> @@ -72,4 +72,3 @@ clock: The clock frequency in Hz of the chip the driver should assume [254000]
>
> Please have a look at the MAX6650/6651 data sheet and make sure that you fully
> understand the meaning of these parameters before you attempt to change them.
> -
> 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 99%
> rename from Documentation/hwmon/sis5595
> rename to Documentation/hwmon/sis5595.rst
> index 5acba6b0c0db..16123b3bfff9 100644
> --- a/Documentation/hwmon/sis5595
> +++ b/Documentation/hwmon/sis5595.rst
> @@ -121,4 +121,3 @@ Problems
> --------
> Some chips refuse to be enabled. We don't know why.
> The driver will recognize this and print a message in dmesg.
> -
> 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 99%
> rename from Documentation/hwmon/thmc50
> rename to Documentation/hwmon/thmc50.rst
> index 6dba1b59b20c..cfff3885287d 100644
> --- a/Documentation/hwmon/thmc50
> +++ b/Documentation/hwmon/thmc50.rst
> @@ -87,4 +87,3 @@ so it stops fans even if the value 0 into the ANALOG_OUT register does not.
>
> The driver was tested on Compaq AP550 with two ADM1022 chips (one works
> in the temp3 mode), five temperature readings and two fans.
> -
> 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 349e5d8c3f58..6269c9d671ca 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
> @@ -2531,7 +2531,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
> @@ -4071,7 +4071,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
> @@ -4627,7 +4627,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
> @@ -4778,7 +4778,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
> @@ -6006,7 +6006,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
> @@ -7687,7 +7687,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
>
> @@ -7695,7 +7695,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
>
> @@ -8328,7 +8328,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
> @@ -8372,7 +8372,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>
> @@ -8420,14 +8420,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
> @@ -9118,21 +9118,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
> @@ -9141,7 +9141,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
> @@ -9214,7 +9214,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
> @@ -9445,7 +9445,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
> @@ -9461,14 +9461,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
> @@ -10118,7 +10118,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>
> @@ -10747,7 +10747,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
> @@ -11841,7 +11841,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
> @@ -11853,7 +11853,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
> @@ -12421,23 +12421,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
>
> @@ -12701,7 +12701,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
> @@ -14366,21 +14366,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
> @@ -14393,7 +14393,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
> @@ -15744,7 +15744,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)
> @@ -16796,7 +16796,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
> @@ -16824,14 +16824,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
> @@ -16940,7 +16940,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 dedd5febd3aa..470ba66b18b0 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 e6be617e3fb2..03d6e782777a 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
> *
^ permalink raw reply
* Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree
From: Mark Brown @ 2019-04-17 16:42 UTC (permalink / raw)
To: YueHaibing
Cc: alsa-devel, timur, Xiubo.Lee, festevam, tiwai, lgirdwood,
linux-kernel, nicoleotsuka, Mark Brown, perex, linuxppc-dev
In-Reply-To: <20190417150915.37968-1-yuehaibing@huawei.com>
The patch
ASoC: fsl_micfil: Remove set but not used variable 'osr'
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From fd30e17e4f7a499635bd4e3a5d83534afcaaa9a8 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 17 Apr 2019 23:09:15 +0800
Subject: [PATCH] ASoC: fsl_micfil: Remove set but not used variable 'osr'
Fixes gcc '-Wunused-but-set-variable' warning:
sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]
It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/fsl/fsl_micfil.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e756481..f7f2d29f1bfe 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
{
u32 ctrl2_reg;
long mclk_rate;
- int osr;
int clk_div;
regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
- osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
- >> MICFIL_CTRL2_CICOSR_SHIFT);
mclk_rate = clk_get_rate(micfil->mclk);
--
2.20.1
^ permalink raw reply related
* Re: [PATCH v4 7/7] ocxl: Provide global MMIO accessors for external drivers
From: Frederic Barrat @ 2019-04-17 15:35 UTC (permalink / raw)
To: Alastair D'Silva, alastair
Cc: Arnd Bergmann, Greg Kroah-Hartman, Greg Kurz, linux-kernel,
Andrew Donnellan, linuxppc-dev
In-Reply-To: <20190327053137.15173-8-alastair@au1.ibm.com>
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> External drivers that communicate via OpenCAPI will need to make
> MMIO calls to interact with the devices.
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> Reviewed-by: Greg Kurz <groug@kaod.org>
> ---
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
And that's the final one! Thanks a lot Alastair, that took some effort,
but I'm quite happy with the result.
Fred
> drivers/misc/ocxl/Makefile | 2 +-
> drivers/misc/ocxl/mmio.c | 234 +++++++++++++++++++++++++++++++++++++
> include/misc/ocxl.h | 110 +++++++++++++++++
> 3 files changed, 345 insertions(+), 1 deletion(-)
> create mode 100644 drivers/misc/ocxl/mmio.c
>
> diff --git a/drivers/misc/ocxl/Makefile b/drivers/misc/ocxl/Makefile
> index bc4e39bfda7b..d07d1bb8e8d4 100644
> --- a/drivers/misc/ocxl/Makefile
> +++ b/drivers/misc/ocxl/Makefile
> @@ -1,7 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0+
> ccflags-$(CONFIG_PPC_WERROR) += -Werror
>
> -ocxl-y += main.o pci.o config.o file.o pasid.o
> +ocxl-y += main.o pci.o config.o file.o pasid.o mmio.o
> ocxl-y += link.o context.o afu_irq.o sysfs.o trace.o
> ocxl-y += core.o
> obj-$(CONFIG_OCXL) += ocxl.o
> diff --git a/drivers/misc/ocxl/mmio.c b/drivers/misc/ocxl/mmio.c
> new file mode 100644
> index 000000000000..aae713db4ebe
> --- /dev/null
> +++ b/drivers/misc/ocxl/mmio.c
> @@ -0,0 +1,234 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +// Copyright 2019 IBM Corp.
> +#include <linux/sched/mm.h>
> +#include "trace.h"
> +#include "ocxl_internal.h"
> +
> +int ocxl_global_mmio_read32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 *val)
> +{
> + if (offset > afu->config.global_mmio_size - 4)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + *val = readl_be((char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + *val = readl((char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_read32);
> +
> +int ocxl_global_mmio_read64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 *val)
> +{
> + if (offset > afu->config.global_mmio_size - 8)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + *val = readq_be((char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + *val = readq((char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_read64);
> +
> +int ocxl_global_mmio_write32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 val)
> +{
> + if (offset > afu->config.global_mmio_size - 4)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + writel_be(val, (char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + writel(val, (char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_write32);
> +
> +int ocxl_global_mmio_write64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 val)
> +{
> + if (offset > afu->config.global_mmio_size - 8)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + writeq_be(val, (char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + writeq(val, (char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_write64);
> +
> +int ocxl_global_mmio_set32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 mask)
> +{
> + u32 tmp;
> +
> + if (offset > afu->config.global_mmio_size - 4)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + tmp = readl_be((char *)afu->global_mmio_ptr + offset);
> + tmp |= mask;
> + writel_be(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + tmp = readl((char *)afu->global_mmio_ptr + offset);
> + tmp |= mask;
> + writel(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_set32);
> +
> +int ocxl_global_mmio_set64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 mask)
> +{
> + u64 tmp;
> +
> + if (offset > afu->config.global_mmio_size - 8)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + tmp = readq_be((char *)afu->global_mmio_ptr + offset);
> + tmp |= mask;
> + writeq_be(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + tmp = readq((char *)afu->global_mmio_ptr + offset);
> + tmp |= mask;
> + writeq(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_set64);
> +
> +int ocxl_global_mmio_clear32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 mask)
> +{
> + u32 tmp;
> +
> + if (offset > afu->config.global_mmio_size - 4)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + tmp = readl_be((char *)afu->global_mmio_ptr + offset);
> + tmp &= ~mask;
> + writel_be(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + tmp = readl((char *)afu->global_mmio_ptr + offset);
> + tmp &= ~mask;
> + writel(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_clear32);
> +
> +int ocxl_global_mmio_clear64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 mask)
> +{
> + u64 tmp;
> +
> + if (offset > afu->config.global_mmio_size - 8)
> + return -EINVAL;
> +
> +#ifdef __BIG_ENDIAN__
> + if (endian == OCXL_HOST_ENDIAN)
> + endian = OCXL_BIG_ENDIAN;
> +#endif
> +
> + switch (endian) {
> + case OCXL_BIG_ENDIAN:
> + tmp = readq_be((char *)afu->global_mmio_ptr + offset);
> + tmp &= ~mask;
> + writeq_be(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> +
> + default:
> + tmp = readq((char *)afu->global_mmio_ptr + offset);
> + tmp &= ~mask;
> + writeq(tmp, (char *)afu->global_mmio_ptr + offset);
> + break;
> + }
> +
> + writeq(tmp, (char *)afu->global_mmio_ptr + offset);
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_global_mmio_clear64);
> diff --git a/include/misc/ocxl.h b/include/misc/ocxl.h
> index dea93885a839..5c4b4916e6be 100644
> --- a/include/misc/ocxl.h
> +++ b/include/misc/ocxl.h
> @@ -45,6 +45,12 @@ struct ocxl_fn_config {
> s8 max_afu_index;
> };
>
> +enum ocxl_endian {
> + OCXL_BIG_ENDIAN = 0, /**< AFU data is big-endian */
> + OCXL_LITTLE_ENDIAN = 1, /**< AFU data is little-endian */
> + OCXL_HOST_ENDIAN = 2, /**< AFU data is the same endianness as the host */
> +};
> +
> // These are opaque outside the ocxl driver
> struct ocxl_afu;
> struct ocxl_fn;
> @@ -230,6 +236,110 @@ void ocxl_afu_set_private(struct ocxl_afu *afu, void *private);
> */
> void *ocxl_afu_get_private(struct ocxl_afu *dev);
>
> +// Global MMIO
> +/**
> + * Read a 32 bit value from global MMIO
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @val: returns the value
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_read32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 *val);
> +
> +/**
> + * Read a 64 bit value from global MMIO
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @val: returns the value
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_read64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 *val);
> +
> +/**
> + * Write a 32 bit value to global MMIO
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @val: The value to write
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_write32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 val);
> +
> +/**
> + * Write a 64 bit value to global MMIO
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @val: The value to write
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_write64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 val);
> +
> +/**
> + * Set bits in a 32 bit global MMIO register
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @mask: a mask of the bits to set
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_set32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 mask);
> +
> +/**
> + * Set bits in a 64 bit global MMIO register
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @mask: a mask of the bits to set
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_set64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 mask);
> +
> +/**
> + * Set bits in a 32 bit global MMIO register
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @mask: a mask of the bits to set
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_clear32(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u32 mask);
> +
> +/**
> + * Set bits in a 64 bit global MMIO register
> + *
> + * @afu: The AFU
> + * @offset: The Offset from the start of MMIO
> + * @endian: the endianness that the MMIO data is in
> + * @mask: a mask of the bits to set
> + *
> + * Returns 0 for success, negative on error
> + */
> +int ocxl_global_mmio_clear64(struct ocxl_afu *afu, size_t offset,
> + enum ocxl_endian endian, u64 mask);
>
> // Functions left here are for compatibility with the cxlflash driver
>
>
^ permalink raw reply
* Re: [PATCH v4 6/7] ocxl: move event_fd handling to frontend
From: Frederic Barrat @ 2019-04-17 15:33 UTC (permalink / raw)
To: Alastair D'Silva, alastair
Cc: Greg Kroah-Hartman, linuxppc-dev, Arnd Bergmann, Andrew Donnellan,
linux-kernel
In-Reply-To: <20190327053137.15173-7-alastair@au1.ibm.com>
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> Event_fd is only used in the driver frontend, so it does not
> need to exist in the backend code. Relocate it to the frontend
> and provide an opaque mechanism for consumers instead.
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
> drivers/misc/ocxl/afu_irq.c | 74 ++++++++++++++++++-------------
> drivers/misc/ocxl/file.c | 22 ++++++++-
> drivers/misc/ocxl/ocxl_internal.h | 5 ---
> include/misc/ocxl.h | 46 +++++++++++++++++++
> 4 files changed, 109 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c
> index 2d410cd6f817..70f8f1c3929d 100644
> --- a/drivers/misc/ocxl/afu_irq.c
> +++ b/drivers/misc/ocxl/afu_irq.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0+
> // Copyright 2017 IBM Corp.
> #include <linux/interrupt.h>
> -#include <linux/eventfd.h>
> +#include <asm/pnv-ocxl.h>
> #include "ocxl_internal.h"
> #include "trace.h"
>
> @@ -11,7 +11,9 @@ struct afu_irq {
> unsigned int virq;
> char *name;
> u64 trigger_page;
> - struct eventfd_ctx *ev_ctx;
> + irqreturn_t (*handler)(void *private);
> + void (*free_private)(void *private);
> + void *private;
> };
>
> int ocxl_irq_offset_to_id(struct ocxl_context *ctx, u64 offset)
> @@ -24,14 +26,44 @@ u64 ocxl_irq_id_to_offset(struct ocxl_context *ctx, int irq_id)
> return ctx->afu->irq_base_offset + (irq_id << PAGE_SHIFT);
> }
>
> +int ocxl_irq_set_handler(struct ocxl_context *ctx, int irq_id,
> + irqreturn_t (*handler)(void *private),
> + void (*free_private)(void *private),
> + void *private)
> +{
> + struct afu_irq *irq;
> + int rc;
> +
> + mutex_lock(&ctx->irq_lock);
> + irq = idr_find(&ctx->irq_idr, irq_id);
> + if (!irq) {
> + rc = -EINVAL;
> + goto unlock;
> + }
> +
> + irq->handler = handler;
> + irq->private = private;
> + irq->free_private = free_private;
> +
> + rc = 0;
> + // Fall through to unlock
> +
> +unlock:
> + mutex_unlock(&ctx->irq_lock);
> + return rc;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_irq_set_handler);
> +
> static irqreturn_t afu_irq_handler(int virq, void *data)
> {
> struct afu_irq *irq = (struct afu_irq *) data;
>
> trace_ocxl_afu_irq_receive(virq);
> - if (irq->ev_ctx)
> - eventfd_signal(irq->ev_ctx, 1);
> - return IRQ_HANDLED;
> +
> + if (irq->handler)
> + return irq->handler(irq->private);
> +
> + return IRQ_HANDLED; // Just drop it on the ground
> }
>
> static int setup_afu_irq(struct ocxl_context *ctx, struct afu_irq *irq)
> @@ -117,6 +149,7 @@ int ocxl_afu_irq_alloc(struct ocxl_context *ctx, int *irq_id)
> kfree(irq);
> return rc;
> }
> +EXPORT_SYMBOL_GPL(ocxl_afu_irq_alloc);
>
> static void afu_irq_free(struct afu_irq *irq, struct ocxl_context *ctx)
> {
> @@ -126,8 +159,8 @@ static void afu_irq_free(struct afu_irq *irq, struct ocxl_context *ctx)
> ocxl_irq_id_to_offset(ctx, irq->id),
> 1 << PAGE_SHIFT, 1);
> release_afu_irq(irq);
> - if (irq->ev_ctx)
> - eventfd_ctx_put(irq->ev_ctx);
> + if (irq->free_private)
> + irq->free_private(irq->private);
> ocxl_link_free_irq(ctx->afu->fn->link, irq->hw_irq);
> kfree(irq);
> }
> @@ -148,6 +181,7 @@ int ocxl_afu_irq_free(struct ocxl_context *ctx, int irq_id)
> mutex_unlock(&ctx->irq_lock);
> return 0;
> }
> +EXPORT_SYMBOL_GPL(ocxl_afu_irq_free);
>
> void ocxl_afu_irq_free_all(struct ocxl_context *ctx)
> {
> @@ -160,31 +194,6 @@ void ocxl_afu_irq_free_all(struct ocxl_context *ctx)
> mutex_unlock(&ctx->irq_lock);
> }
>
> -int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, int irq_id, int eventfd)
> -{
> - struct afu_irq *irq;
> - struct eventfd_ctx *ev_ctx;
> - int rc = 0;
> -
> - mutex_lock(&ctx->irq_lock);
> - irq = idr_find(&ctx->irq_idr, irq_id);
> - if (!irq) {
> - rc = -EINVAL;
> - goto unlock;
> - }
> -
> - ev_ctx = eventfd_ctx_fdget(eventfd);
> - if (IS_ERR(ev_ctx)) {
> - rc = -EINVAL;
> - goto unlock;
> - }
> -
> - irq->ev_ctx = ev_ctx;
> -unlock:
> - mutex_unlock(&ctx->irq_lock);
> - return rc;
> -}
> -
> u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, int irq_id)
> {
> struct afu_irq *irq;
> @@ -197,3 +206,4 @@ u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, int irq_id)
> mutex_unlock(&ctx->irq_lock);
> return addr;
> }
> +EXPORT_SYMBOL_GPL(ocxl_afu_irq_get_addr);
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
> index 7f5282a3af3a..8aa22893ed76 100644
> --- a/drivers/misc/ocxl/file.c
> +++ b/drivers/misc/ocxl/file.c
> @@ -3,6 +3,7 @@
> #include <linux/fs.h>
> #include <linux/poll.h>
> #include <linux/sched/signal.h>
> +#include <linux/eventfd.h>
> #include <linux/uaccess.h>
> #include <uapi/misc/ocxl.h>
> #include <asm/reg.h>
> @@ -183,11 +184,27 @@ static long afu_ioctl_get_features(struct ocxl_context *ctx,
> x == OCXL_IOCTL_GET_FEATURES ? "GET_FEATURES" : \
> "UNKNOWN")
>
> +static irqreturn_t irq_handler(void *private)
> +{
> + struct eventfd_ctx *ev_ctx = private;
> +
> + eventfd_signal(ev_ctx, 1);
> + return IRQ_HANDLED;
> +}
> +
> +static void irq_free(void *private)
> +{
> + struct eventfd_ctx *ev_ctx = private;
> +
> + eventfd_ctx_put(ev_ctx);
> +}
> +
> static long afu_ioctl(struct file *file, unsigned int cmd,
> unsigned long args)
> {
> struct ocxl_context *ctx = file->private_data;
> struct ocxl_ioctl_irq_fd irq_fd;
> + struct eventfd_ctx *ev_ctx;
> int irq_id;
> u64 irq_offset;
> long rc;
> @@ -239,7 +256,10 @@ static long afu_ioctl(struct file *file, unsigned int cmd,
> if (irq_fd.reserved)
> return -EINVAL;
> irq_id = ocxl_irq_offset_to_id(ctx, irq_fd.irq_offset);
> - rc = ocxl_afu_irq_set_fd(ctx, irq_id, irq_fd.eventfd);
> + ev_ctx = eventfd_ctx_fdget(irq_fd.eventfd);
> + if (!ev_ctx)
> + return -EFAULT;
> + rc = ocxl_irq_set_handler(ctx, irq_id, irq_handler, irq_free, ev_ctx);
> break;
>
> case OCXL_IOCTL_GET_METADATA:
> diff --git a/drivers/misc/ocxl/ocxl_internal.h b/drivers/misc/ocxl/ocxl_internal.h
> index 58969467bd5c..97415afd79f3 100644
> --- a/drivers/misc/ocxl/ocxl_internal.h
> +++ b/drivers/misc/ocxl/ocxl_internal.h
> @@ -139,11 +139,6 @@ void ocxl_sysfs_unregister_afu(struct ocxl_file_info *info);
>
> int ocxl_irq_offset_to_id(struct ocxl_context *ctx, u64 offset);
> u64 ocxl_irq_id_to_offset(struct ocxl_context *ctx, int irq_id);
> -int ocxl_afu_irq_alloc(struct ocxl_context *ctx, int *irq_id);
> -int ocxl_afu_irq_free(struct ocxl_context *ctx, int irq_id);
> void ocxl_afu_irq_free_all(struct ocxl_context *ctx);
> -int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, int irq_id,
> - int eventfd);
> -u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, int irq_id);
>
> #endif /* _OCXL_INTERNAL_H_ */
> diff --git a/include/misc/ocxl.h b/include/misc/ocxl.h
> index e4704632eac5..dea93885a839 100644
> --- a/include/misc/ocxl.h
> +++ b/include/misc/ocxl.h
> @@ -155,6 +155,52 @@ int ocxl_context_attach(struct ocxl_context *ctx, u64 amr,
> */
> int ocxl_context_detach(struct ocxl_context *ctx);
>
> +// AFU IRQs
> +
> +/**
> + * Allocate an IRQ associated with an AFU context
> + * @ctx: the AFU context
> + * @irq_id: out, the IRQ ID
> + *
> + * Returns 0 on success, negative on failure
> + */
> +extern int ocxl_afu_irq_alloc(struct ocxl_context *ctx, int *irq_id);
> +
> +/**
> + * Frees an IRQ associated with an AFU context
> + * @ctx: the AFU context
> + * @irq_id: the IRQ ID
> + *
> + * Returns 0 on success, negative on failure
> + */
> +extern int ocxl_afu_irq_free(struct ocxl_context *ctx, int irq_id);
> +
> +/**
> + * Gets the address of the trigger page for an IRQ
> + * This can then be provided to an AFU which will write to that
> + * page to trigger the IRQ.
> + * @ctx: The AFU context that the IRQ is associated with
> + * @irq_id: The IRQ ID
> + *
> + * returns the trigger page address, or 0 if the IRQ is not valid
> + */
> +extern u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, int irq_id);
> +
> +/**
> + * Provide a callback to be called when an IRQ is triggered
> + * @ctx: The AFU context that the IRQ is associated with
> + * @irq_id: The IRQ ID
> + * @handler: the callback to be called when the IRQ is triggered
> + * @free_private: the callback to be called when the IRQ is freed (may be NULL)
> + * @private: Private data to be passed to the callbacks
> + *
> + * Returns 0 on success, negative on failure
> + */
> +int ocxl_irq_set_handler(struct ocxl_context *ctx, int irq_id,
> + irqreturn_t (*handler)(void *private),
> + void (*free_private)(void *private),
> + void *private);
> +
> // AFU Metadata
>
> /**
>
^ permalink raw reply
* Re: [PATCH v4 5/7] ocxl: afu_irq only deals with IRQ IDs, not offsets
From: Frederic Barrat @ 2019-04-17 15:33 UTC (permalink / raw)
To: Alastair D'Silva, alastair
Cc: Greg Kroah-Hartman, linuxppc-dev, Arnd Bergmann, Andrew Donnellan,
linux-kernel
In-Reply-To: <20190327053137.15173-6-alastair@au1.ibm.com>
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> The use of offsets is required only in the frontend, so alter
> the IRQ API to only work with IRQ IDs in the backend.
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
> drivers/misc/ocxl/afu_irq.c | 34 +++++++++++++++----------------
> drivers/misc/ocxl/context.c | 7 +++++--
> drivers/misc/ocxl/file.c | 13 +++++++-----
> drivers/misc/ocxl/ocxl_internal.h | 10 +++++----
> drivers/misc/ocxl/trace.h | 12 ++++-------
> 5 files changed, 39 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c
> index 11ab996657a2..2d410cd6f817 100644
> --- a/drivers/misc/ocxl/afu_irq.c
> +++ b/drivers/misc/ocxl/afu_irq.c
> @@ -14,14 +14,14 @@ struct afu_irq {
> struct eventfd_ctx *ev_ctx;
> };
>
> -static int irq_offset_to_id(struct ocxl_context *ctx, u64 offset)
> +int ocxl_irq_offset_to_id(struct ocxl_context *ctx, u64 offset)
> {
> return (offset - ctx->afu->irq_base_offset) >> PAGE_SHIFT;
> }
>
> -static u64 irq_id_to_offset(struct ocxl_context *ctx, int id)
> +u64 ocxl_irq_id_to_offset(struct ocxl_context *ctx, int irq_id)
> {
> - return ctx->afu->irq_base_offset + (id << PAGE_SHIFT);
> + return ctx->afu->irq_base_offset + (irq_id << PAGE_SHIFT);
> }
>
> static irqreturn_t afu_irq_handler(int virq, void *data)
> @@ -69,7 +69,7 @@ static void release_afu_irq(struct afu_irq *irq)
> kfree(irq->name);
> }
>
> -int ocxl_afu_irq_alloc(struct ocxl_context *ctx, u64 *irq_offset)
> +int ocxl_afu_irq_alloc(struct ocxl_context *ctx, int *irq_id)
> {
> struct afu_irq *irq;
> int rc;
> @@ -101,11 +101,11 @@ int ocxl_afu_irq_alloc(struct ocxl_context *ctx, u64 *irq_offset)
> if (rc)
> goto err_alloc;
>
> - *irq_offset = irq_id_to_offset(ctx, irq->id);
> -
> - trace_ocxl_afu_irq_alloc(ctx->pasid, irq->id, irq->virq, irq->hw_irq,
> - *irq_offset);
> + trace_ocxl_afu_irq_alloc(ctx->pasid, irq->id, irq->virq, irq->hw_irq);
> mutex_unlock(&ctx->irq_lock);
> +
> + *irq_id = irq->id;
> +
> return 0;
>
> err_alloc:
> @@ -123,7 +123,7 @@ static void afu_irq_free(struct afu_irq *irq, struct ocxl_context *ctx)
> trace_ocxl_afu_irq_free(ctx->pasid, irq->id);
> if (ctx->mapping)
> unmap_mapping_range(ctx->mapping,
> - irq_id_to_offset(ctx, irq->id),
> + ocxl_irq_id_to_offset(ctx, irq->id),
> 1 << PAGE_SHIFT, 1);
> release_afu_irq(irq);
> if (irq->ev_ctx)
> @@ -132,14 +132,13 @@ static void afu_irq_free(struct afu_irq *irq, struct ocxl_context *ctx)
> kfree(irq);
> }
>
> -int ocxl_afu_irq_free(struct ocxl_context *ctx, u64 irq_offset)
> +int ocxl_afu_irq_free(struct ocxl_context *ctx, int irq_id)
> {
> struct afu_irq *irq;
> - int id = irq_offset_to_id(ctx, irq_offset);
>
> mutex_lock(&ctx->irq_lock);
>
> - irq = idr_find(&ctx->irq_idr, id);
> + irq = idr_find(&ctx->irq_idr, irq_id);
> if (!irq) {
> mutex_unlock(&ctx->irq_lock);
> return -EINVAL;
> @@ -161,14 +160,14 @@ void ocxl_afu_irq_free_all(struct ocxl_context *ctx)
> mutex_unlock(&ctx->irq_lock);
> }
>
> -int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, u64 irq_offset, int eventfd)
> +int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, int irq_id, int eventfd)
> {
> struct afu_irq *irq;
> struct eventfd_ctx *ev_ctx;
> - int rc = 0, id = irq_offset_to_id(ctx, irq_offset);
> + int rc = 0;
>
> mutex_lock(&ctx->irq_lock);
> - irq = idr_find(&ctx->irq_idr, id);
> + irq = idr_find(&ctx->irq_idr, irq_id);
> if (!irq) {
> rc = -EINVAL;
> goto unlock;
> @@ -186,14 +185,13 @@ int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, u64 irq_offset, int eventfd)
> return rc;
> }
>
> -u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, u64 irq_offset)
> +u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, int irq_id)
> {
> struct afu_irq *irq;
> - int id = irq_offset_to_id(ctx, irq_offset);
> u64 addr = 0;
>
> mutex_lock(&ctx->irq_lock);
> - irq = idr_find(&ctx->irq_idr, id);
> + irq = idr_find(&ctx->irq_idr, irq_id);
> if (irq)
> addr = irq->trigger_page;
> mutex_unlock(&ctx->irq_lock);
> diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c
> index b60e674ac019..bab9c9364184 100644
> --- a/drivers/misc/ocxl/context.c
> +++ b/drivers/misc/ocxl/context.c
> @@ -94,8 +94,9 @@ static vm_fault_t map_afu_irq(struct vm_area_struct *vma, unsigned long address,
> u64 offset, struct ocxl_context *ctx)
> {
> u64 trigger_addr;
> + int irq_id = ocxl_irq_offset_to_id(ctx, offset);
>
> - trigger_addr = ocxl_afu_irq_get_addr(ctx, offset);
> + trigger_addr = ocxl_afu_irq_get_addr(ctx, irq_id);
> if (!trigger_addr)
> return VM_FAULT_SIGBUS;
>
> @@ -155,12 +156,14 @@ static const struct vm_operations_struct ocxl_vmops = {
> static int check_mmap_afu_irq(struct ocxl_context *ctx,
> struct vm_area_struct *vma)
> {
> + int irq_id = ocxl_irq_offset_to_id(ctx, vma->vm_pgoff << PAGE_SHIFT);
> +
> /* only one page */
> if (vma_pages(vma) != 1)
> return -EINVAL;
>
> /* check offset validty */
> - if (!ocxl_afu_irq_get_addr(ctx, vma->vm_pgoff << PAGE_SHIFT))
> + if (!ocxl_afu_irq_get_addr(ctx, irq_id))
> return -EINVAL;
>
> /*
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
> index 8225892a5d77..7f5282a3af3a 100644
> --- a/drivers/misc/ocxl/file.c
> +++ b/drivers/misc/ocxl/file.c
> @@ -188,6 +188,7 @@ static long afu_ioctl(struct file *file, unsigned int cmd,
> {
> struct ocxl_context *ctx = file->private_data;
> struct ocxl_ioctl_irq_fd irq_fd;
> + int irq_id;
> u64 irq_offset;
> long rc;
> bool closed;
> @@ -209,12 +210,13 @@ static long afu_ioctl(struct file *file, unsigned int cmd,
> break;
>
> case OCXL_IOCTL_IRQ_ALLOC:
> - rc = ocxl_afu_irq_alloc(ctx, &irq_offset);
> + rc = ocxl_afu_irq_alloc(ctx, &irq_id);
> if (!rc) {
> + irq_offset = ocxl_irq_id_to_offset(ctx, irq_id);
> rc = copy_to_user((u64 __user *) args, &irq_offset,
> sizeof(irq_offset));
> if (rc) {
> - ocxl_afu_irq_free(ctx, irq_offset);
> + ocxl_afu_irq_free(ctx, irq_id);
> return -EFAULT;
> }
> }
> @@ -225,7 +227,8 @@ static long afu_ioctl(struct file *file, unsigned int cmd,
> sizeof(irq_offset));
> if (rc)
> return -EFAULT;
> - rc = ocxl_afu_irq_free(ctx, irq_offset);
> + irq_id = ocxl_irq_offset_to_id(ctx, irq_offset);
> + rc = ocxl_afu_irq_free(ctx, irq_id);
> break;
>
> case OCXL_IOCTL_IRQ_SET_FD:
> @@ -235,8 +238,8 @@ static long afu_ioctl(struct file *file, unsigned int cmd,
> return -EFAULT;
> if (irq_fd.reserved)
> return -EINVAL;
> - rc = ocxl_afu_irq_set_fd(ctx, irq_fd.irq_offset,
> - irq_fd.eventfd);
> + irq_id = ocxl_irq_offset_to_id(ctx, irq_fd.irq_offset);
> + rc = ocxl_afu_irq_set_fd(ctx, irq_id, irq_fd.eventfd);
> break;
>
> case OCXL_IOCTL_GET_METADATA:
> diff --git a/drivers/misc/ocxl/ocxl_internal.h b/drivers/misc/ocxl/ocxl_internal.h
> index de6c16237742..58969467bd5c 100644
> --- a/drivers/misc/ocxl/ocxl_internal.h
> +++ b/drivers/misc/ocxl/ocxl_internal.h
> @@ -137,11 +137,13 @@ void ocxl_context_detach_all(struct ocxl_afu *afu);
> int ocxl_sysfs_register_afu(struct ocxl_file_info *info);
> void ocxl_sysfs_unregister_afu(struct ocxl_file_info *info);
>
> -int ocxl_afu_irq_alloc(struct ocxl_context *ctx, u64 *irq_offset);
> -int ocxl_afu_irq_free(struct ocxl_context *ctx, u64 irq_offset);
> +int ocxl_irq_offset_to_id(struct ocxl_context *ctx, u64 offset);
> +u64 ocxl_irq_id_to_offset(struct ocxl_context *ctx, int irq_id);
> +int ocxl_afu_irq_alloc(struct ocxl_context *ctx, int *irq_id);
> +int ocxl_afu_irq_free(struct ocxl_context *ctx, int irq_id);
> void ocxl_afu_irq_free_all(struct ocxl_context *ctx);
> -int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, u64 irq_offset,
> +int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, int irq_id,
> int eventfd);
> -u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, u64 irq_offset);
> +u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, int irq_id);
>
> #endif /* _OCXL_INTERNAL_H_ */
> diff --git a/drivers/misc/ocxl/trace.h b/drivers/misc/ocxl/trace.h
> index bcb7ff330c1e..024f417e7e01 100644
> --- a/drivers/misc/ocxl/trace.h
> +++ b/drivers/misc/ocxl/trace.h
> @@ -107,16 +107,14 @@ DEFINE_EVENT(ocxl_fault_handler, ocxl_fault_ack,
> );
>
> TRACE_EVENT(ocxl_afu_irq_alloc,
> - TP_PROTO(int pasid, int irq_id, unsigned int virq, int hw_irq,
> - u64 irq_offset),
> - TP_ARGS(pasid, irq_id, virq, hw_irq, irq_offset),
> + TP_PROTO(int pasid, int irq_id, unsigned int virq, int hw_irq),
> + TP_ARGS(pasid, irq_id, virq, hw_irq),
>
> TP_STRUCT__entry(
> __field(int, pasid)
> __field(int, irq_id)
> __field(unsigned int, virq)
> __field(int, hw_irq)
> - __field(u64, irq_offset)
> ),
>
> TP_fast_assign(
> @@ -124,15 +122,13 @@ TRACE_EVENT(ocxl_afu_irq_alloc,
> __entry->irq_id = irq_id;
> __entry->virq = virq;
> __entry->hw_irq = hw_irq;
> - __entry->irq_offset = irq_offset;
> ),
>
> - TP_printk("pasid=0x%x irq_id=%d virq=%u hw_irq=%d irq_offset=0x%llx",
> + TP_printk("pasid=0x%x irq_id=%d virq=%u hw_irq=%d",
> __entry->pasid,
> __entry->irq_id,
> __entry->virq,
> - __entry->hw_irq,
> - __entry->irq_offset
> + __entry->hw_irq
> )
> );
>
>
^ permalink raw reply
* Re: [PATCH v4 4/7] ocxl: Allow external drivers to use OpenCAPI contexts
From: Frederic Barrat @ 2019-04-17 15:33 UTC (permalink / raw)
To: Alastair D'Silva, alastair
Cc: Arnd Bergmann, Greg Kroah-Hartman, Greg Kurz, linux-kernel,
Andrew Donnellan, linuxppc-dev
In-Reply-To: <20190327053137.15173-5-alastair@au1.ibm.com>
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> Most OpenCAPI operations require a valid context, so
> exposing these functions to external drivers is necessary.
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> Reviewed-by: Greg Kurz <groug@kaod.org>
> ---
There's a small memory leak in here on context alloc, if we can't get a
pasid from the IDR. But that's not new to this patch, I just saw it
because the code was moved around. And since that's the only thing I've
seen in the full series and it's super long to review, I'll address it
with a later patch. So:
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
> drivers/misc/ocxl/context.c | 22 ++++++++++-------
> drivers/misc/ocxl/file.c | 8 ++-----
> drivers/misc/ocxl/ocxl_internal.h | 6 -----
> include/misc/ocxl.h | 39 +++++++++++++++++++++++++++++++
> 4 files changed, 55 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c
> index c73a859d2224..b60e674ac019 100644
> --- a/drivers/misc/ocxl/context.c
> +++ b/drivers/misc/ocxl/context.c
> @@ -4,15 +4,17 @@
> #include "trace.h"
> #include "ocxl_internal.h"
>
> -struct ocxl_context *ocxl_context_alloc(void)
> -{
> - return kzalloc(sizeof(struct ocxl_context), GFP_KERNEL);
> -}
> -
> -int ocxl_context_init(struct ocxl_context *ctx, struct ocxl_afu *afu,
> +int ocxl_context_alloc(struct ocxl_context **context, struct ocxl_afu *afu,
> struct address_space *mapping)
> {
> int pasid;
> + struct ocxl_context *ctx;
> +
> + *context = kzalloc(sizeof(struct ocxl_context), GFP_KERNEL);
> + if (!*context)
> + return -ENOMEM;
> +
> + ctx = *context;
>
> ctx->afu = afu;
> mutex_lock(&afu->contexts_lock);
> @@ -43,6 +45,7 @@ int ocxl_context_init(struct ocxl_context *ctx, struct ocxl_afu *afu,
> ocxl_afu_get(afu);
> return 0;
> }
> +EXPORT_SYMBOL_GPL(ocxl_context_alloc);
>
> /*
> * Callback for when a translation fault triggers an error
> @@ -63,7 +66,7 @@ static void xsl_fault_error(void *data, u64 addr, u64 dsisr)
> wake_up_all(&ctx->events_wq);
> }
>
> -int ocxl_context_attach(struct ocxl_context *ctx, u64 amr)
> +int ocxl_context_attach(struct ocxl_context *ctx, u64 amr, struct mm_struct *mm)
> {
> int rc;
>
> @@ -75,7 +78,7 @@ int ocxl_context_attach(struct ocxl_context *ctx, u64 amr)
> }
>
> rc = ocxl_link_add_pe(ctx->afu->fn->link, ctx->pasid,
> - current->mm->context.id, ctx->tidr, amr, current->mm,
> + mm->context.id, ctx->tidr, amr, mm,
> xsl_fault_error, ctx);
> if (rc)
> goto out;
> @@ -85,6 +88,7 @@ int ocxl_context_attach(struct ocxl_context *ctx, u64 amr)
> mutex_unlock(&ctx->status_mutex);
> return rc;
> }
> +EXPORT_SYMBOL_GPL(ocxl_context_attach);
>
> static vm_fault_t map_afu_irq(struct vm_area_struct *vma, unsigned long address,
> u64 offset, struct ocxl_context *ctx)
> @@ -243,6 +247,7 @@ int ocxl_context_detach(struct ocxl_context *ctx)
> }
> return 0;
> }
> +EXPORT_SYMBOL_GPL(ocxl_context_detach);
>
> void ocxl_context_detach_all(struct ocxl_afu *afu)
> {
> @@ -280,3 +285,4 @@ void ocxl_context_free(struct ocxl_context *ctx)
> ocxl_afu_put(ctx->afu);
> kfree(ctx);
> }
> +EXPORT_SYMBOL_GPL(ocxl_context_free);
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
> index 7a38ea5af9db..8225892a5d77 100644
> --- a/drivers/misc/ocxl/file.c
> +++ b/drivers/misc/ocxl/file.c
> @@ -61,11 +61,7 @@ static int afu_open(struct inode *inode, struct file *file)
> if (!info)
> return -ENODEV;
>
> - ctx = ocxl_context_alloc();
> - if (!ctx)
> - return -ENOMEM;
> -
> - rc = ocxl_context_init(ctx, info->afu, inode->i_mapping);
> + rc = ocxl_context_alloc(&ctx, info->afu, inode->i_mapping);
> if (rc)
> return rc;
>
> @@ -90,7 +86,7 @@ static long afu_ioctl_attach(struct ocxl_context *ctx,
> return -EINVAL;
>
> amr = arg.amr & mfspr(SPRN_UAMOR);
> - rc = ocxl_context_attach(ctx, amr);
> + rc = ocxl_context_attach(ctx, amr, current->mm);
> return rc;
> }
>
> diff --git a/drivers/misc/ocxl/ocxl_internal.h b/drivers/misc/ocxl/ocxl_internal.h
> index 53b6c64a1bf0..de6c16237742 100644
> --- a/drivers/misc/ocxl/ocxl_internal.h
> +++ b/drivers/misc/ocxl/ocxl_internal.h
> @@ -130,15 +130,9 @@ int ocxl_config_check_afu_index(struct pci_dev *dev,
> */
> int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid);
>
> -struct ocxl_context *ocxl_context_alloc(void);
> -int ocxl_context_init(struct ocxl_context *ctx, struct ocxl_afu *afu,
> - struct address_space *mapping);
> -int ocxl_context_attach(struct ocxl_context *ctx, u64 amr);
> int ocxl_context_mmap(struct ocxl_context *ctx,
> struct vm_area_struct *vma);
> -int ocxl_context_detach(struct ocxl_context *ctx);
> void ocxl_context_detach_all(struct ocxl_afu *afu);
> -void ocxl_context_free(struct ocxl_context *ctx);
>
> int ocxl_sysfs_register_afu(struct ocxl_file_info *info);
> void ocxl_sysfs_unregister_afu(struct ocxl_file_info *info);
> diff --git a/include/misc/ocxl.h b/include/misc/ocxl.h
> index 8bafd748e380..e4704632eac5 100644
> --- a/include/misc/ocxl.h
> +++ b/include/misc/ocxl.h
> @@ -48,6 +48,7 @@ struct ocxl_fn_config {
> // These are opaque outside the ocxl driver
> struct ocxl_afu;
> struct ocxl_fn;
> +struct ocxl_context;
>
> // Device detection & initialisation
>
> @@ -116,6 +117,44 @@ const struct ocxl_fn_config *ocxl_function_config(struct ocxl_fn *fn);
> */
> void ocxl_function_close(struct ocxl_fn *fn);
>
> +// Context allocation
> +
> +/**
> + * Allocate an OpenCAPI context
> + *
> + * @context: The OpenCAPI context to allocate, must be freed with ocxl_context_free
> + * @afu: The AFU the context belongs to
> + * @mapping: The mapping to unmap when the context is closed (may be NULL)
> + */
> +int ocxl_context_alloc(struct ocxl_context **context, struct ocxl_afu *afu,
> + struct address_space *mapping);
> +
> +/**
> + * Free an OpenCAPI context
> + *
> + * @ctx: The OpenCAPI context to free
> + */
> +void ocxl_context_free(struct ocxl_context *ctx);
> +
> +/**
> + * Grant access to an MM to an OpenCAPI context
> + * @ctx: The OpenCAPI context to attach
> + * @amr: The value of the AMR register to restrict access
> + * @mm: The mm to attach to the context
> + *
> + * Returns 0 on success, negative on failure
> + */
> +int ocxl_context_attach(struct ocxl_context *ctx, u64 amr,
> + struct mm_struct *mm);
> +
> +/**
> + * Detach an MM from an OpenCAPI context
> + * @ctx: The OpenCAPI context to attach
> + *
> + * Returns 0 on success, negative on failure
> + */
> +int ocxl_context_detach(struct ocxl_context *ctx);
> +
> // AFU Metadata
>
> /**
>
^ permalink raw reply
* Re: [PATCH v4 3/7] ocxl: Create a clear delineation between ocxl backend & frontend
From: Frederic Barrat @ 2019-04-17 15:29 UTC (permalink / raw)
To: Alastair D'Silva, alastair
Cc: Greg Kroah-Hartman, linuxppc-dev, Arnd Bergmann, Andrew Donnellan,
linux-kernel
In-Reply-To: <20190327053137.15173-4-alastair@au1.ibm.com>
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> The OCXL driver contains both frontend code for interacting with userspace,
> as well as backend code for interacting with the hardware.
>
> This patch separates the backend code from the frontend so that it can be
> used by other device drivers that communicate via OpenCAPI.
>
> Relocate dev, cdev & sysfs files to the frontend code to allow external
> drivers to maintain their own devices.
>
> Reference counting on the device in the backend is replaced with kref
> counting.
>
> Move file & sysfs layer initialisation from core.c (backend) to
> pci.c (frontend).
>
> Create an ocxl_function oriented interface for initing devices &
> enumerating AFUs.
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
> drivers/misc/ocxl/context.c | 2 +-
> drivers/misc/ocxl/core.c | 201 +++++++++++++++++++-----------
> drivers/misc/ocxl/file.c | 142 ++++++++++++++-------
> drivers/misc/ocxl/ocxl_internal.h | 31 ++---
> drivers/misc/ocxl/pci.c | 56 ++++-----
> drivers/misc/ocxl/sysfs.c | 54 ++++----
> include/misc/ocxl.h | 119 ++++++++++++++++--
> 7 files changed, 409 insertions(+), 196 deletions(-)
>
> diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c
> index c10a940e3b38..c73a859d2224 100644
> --- a/drivers/misc/ocxl/context.c
> +++ b/drivers/misc/ocxl/context.c
> @@ -238,7 +238,7 @@ int ocxl_context_detach(struct ocxl_context *ctx)
> }
> rc = ocxl_link_remove_pe(ctx->afu->fn->link, ctx->pasid);
> if (rc) {
> - dev_warn(&ctx->afu->dev,
> + dev_warn(&dev->dev,
> "Couldn't remove PE entry cleanly: %d\n", rc);
> }
> return 0;
> diff --git a/drivers/misc/ocxl/core.c b/drivers/misc/ocxl/core.c
> index 2f2fe12eac1e..b7a09b21ab36 100644
> --- a/drivers/misc/ocxl/core.c
> +++ b/drivers/misc/ocxl/core.c
> @@ -13,16 +13,6 @@ static void ocxl_fn_put(struct ocxl_fn *fn)
> put_device(&fn->dev);
> }
>
> -struct ocxl_afu *ocxl_afu_get(struct ocxl_afu *afu)
> -{
> - return (get_device(&afu->dev) == NULL) ? NULL : afu;
> -}
> -
> -void ocxl_afu_put(struct ocxl_afu *afu)
> -{
> - put_device(&afu->dev);
> -}
> -
> static struct ocxl_afu *alloc_afu(struct ocxl_fn *fn)
> {
> struct ocxl_afu *afu;
> @@ -31,6 +21,7 @@ static struct ocxl_afu *alloc_afu(struct ocxl_fn *fn)
> if (!afu)
> return NULL;
>
> + kref_init(&afu->kref);
> mutex_init(&afu->contexts_lock);
> mutex_init(&afu->afu_control_lock);
> idr_init(&afu->contexts_idr);
> @@ -39,32 +30,26 @@ static struct ocxl_afu *alloc_afu(struct ocxl_fn *fn)
> return afu;
> }
>
> -static void free_afu(struct ocxl_afu *afu)
> +static void free_afu(struct kref *kref)
> {
> + struct ocxl_afu *afu = container_of(kref, struct ocxl_afu, kref);
> +
> idr_destroy(&afu->contexts_idr);
> ocxl_fn_put(afu->fn);
> kfree(afu);
> }
>
> -static void free_afu_dev(struct device *dev)
> +void ocxl_afu_get(struct ocxl_afu *afu)
> {
> - struct ocxl_afu *afu = to_ocxl_afu(dev);
> -
> - ocxl_unregister_afu(afu);
> - free_afu(afu);
> + kref_get(&afu->kref);
> }
> +EXPORT_SYMBOL_GPL(ocxl_afu_get);
>
> -static int set_afu_device(struct ocxl_afu *afu, const char *location)
> +void ocxl_afu_put(struct ocxl_afu *afu)
> {
> - struct ocxl_fn *fn = afu->fn;
> - int rc;
> -
> - afu->dev.parent = &fn->dev;
> - afu->dev.release = free_afu_dev;
> - rc = dev_set_name(&afu->dev, "%s.%s.%hhu", afu->config.name, location,
> - afu->config.idx);
> - return rc;
> + kref_put(&afu->kref, free_afu);
> }
> +EXPORT_SYMBOL_GPL(ocxl_afu_put);
>
> static int assign_afu_actag(struct ocxl_afu *afu)
> {
> @@ -233,27 +218,25 @@ static int configure_afu(struct ocxl_afu *afu, u8 afu_idx, struct pci_dev *dev)
> if (rc)
> return rc;
>
> - rc = set_afu_device(afu, dev_name(&dev->dev));
> - if (rc)
> - return rc;
> -
> rc = assign_afu_actag(afu);
> if (rc)
> return rc;
>
> rc = assign_afu_pasid(afu);
> - if (rc) {
> - reclaim_afu_actag(afu);
> - return rc;
> - }
> + if (rc)
> + goto err_free_actag;
>
> rc = map_mmio_areas(afu);
> - if (rc) {
> - reclaim_afu_pasid(afu);
> - reclaim_afu_actag(afu);
> - return rc;
> - }
> + if (rc)
> + goto err_free_pasid;
> +
> return 0;
> +
> +err_free_pasid:
> + reclaim_afu_pasid(afu);
> +err_free_actag:
> + reclaim_afu_actag(afu);
> + return rc;
> }
>
> static void deconfigure_afu(struct ocxl_afu *afu)
> @@ -265,16 +248,8 @@ static void deconfigure_afu(struct ocxl_afu *afu)
>
> static int activate_afu(struct pci_dev *dev, struct ocxl_afu *afu)
> {
> - int rc;
> -
> ocxl_config_set_afu_state(dev, afu->config.dvsec_afu_control_pos, 1);
> - /*
> - * Char device creation is the last step, as processes can
> - * call our driver immediately, so all our inits must be finished.
> - */
> - rc = ocxl_create_cdev(afu);
> - if (rc)
> - return rc;
> +
> return 0;
> }
>
> @@ -282,11 +257,10 @@ static void deactivate_afu(struct ocxl_afu *afu)
> {
> struct pci_dev *dev = to_pci_dev(afu->fn->dev.parent);
>
> - ocxl_destroy_cdev(afu);
> ocxl_config_set_afu_state(dev, afu->config.dvsec_afu_control_pos, 0);
> }
>
> -int init_afu(struct pci_dev *dev, struct ocxl_fn *fn, u8 afu_idx)
> +static int init_afu(struct pci_dev *dev, struct ocxl_fn *fn, u8 afu_idx)
> {
> int rc;
> struct ocxl_afu *afu;
> @@ -297,41 +271,29 @@ int init_afu(struct pci_dev *dev, struct ocxl_fn *fn, u8 afu_idx)
>
> rc = configure_afu(afu, afu_idx, dev);
> if (rc) {
> - free_afu(afu);
> + ocxl_afu_put(afu);
> return rc;
> }
>
> - rc = ocxl_register_afu(afu);
> - if (rc)
> - goto err;
> -
> - rc = ocxl_sysfs_add_afu(afu);
> - if (rc)
> - goto err;
> -
> rc = activate_afu(dev, afu);
> - if (rc)
> - goto err_sys;
> + if (rc) {
> + deconfigure_afu(afu);
> + ocxl_afu_put(afu);
> + return rc;
> + }
>
> list_add_tail(&afu->list, &fn->afu_list);
> - return 0;
>
> -err_sys:
> - ocxl_sysfs_remove_afu(afu);
> -err:
> - deconfigure_afu(afu);
> - device_unregister(&afu->dev);
> - return rc;
> + return 0;
> }
>
> -void remove_afu(struct ocxl_afu *afu)
> +static void remove_afu(struct ocxl_afu *afu)
> {
> list_del(&afu->list);
> ocxl_context_detach_all(afu);
> deactivate_afu(afu);
> - ocxl_sysfs_remove_afu(afu);
> deconfigure_afu(afu);
> - device_unregister(&afu->dev);
> + ocxl_afu_put(afu); // matches the implicit get in alloc_afu
> }
>
> static struct ocxl_fn *alloc_function(void)
> @@ -358,7 +320,7 @@ static void free_function(struct ocxl_fn *fn)
>
> static void free_function_dev(struct device *dev)
> {
> - struct ocxl_fn *fn = to_ocxl_function(dev);
> + struct ocxl_fn *fn = container_of(dev, struct ocxl_fn, dev);
>
> free_function(fn);
> }
> @@ -372,7 +334,6 @@ static int set_function_device(struct ocxl_fn *fn, struct pci_dev *dev)
> rc = dev_set_name(&fn->dev, "ocxlfn.%s", dev_name(&dev->dev));
> if (rc)
> return rc;
> - pci_set_drvdata(dev, fn);
> return 0;
> }
>
> @@ -490,7 +451,7 @@ static void deconfigure_function(struct ocxl_fn *fn)
> pci_disable_device(dev);
> }
>
> -struct ocxl_fn *init_function(struct pci_dev *dev)
> +static struct ocxl_fn *init_function(struct pci_dev *dev)
> {
> struct ocxl_fn *fn;
> int rc;
> @@ -514,8 +475,100 @@ struct ocxl_fn *init_function(struct pci_dev *dev)
> return fn;
> }
>
> -void remove_function(struct ocxl_fn *fn)
> +// Device detection & initialisation
> +
> +struct ocxl_fn *ocxl_function_open(struct pci_dev *dev)
> +{
> + int rc, afu_count = 0;
> + u8 afu;
> + struct ocxl_fn *fn;
> +
> + if (!radix_enabled()) {
> + dev_err(&dev->dev, "Unsupported memory model (hash)\n");
> + return ERR_PTR(-ENODEV);
> + }
> +
> + fn = init_function(dev);
> + if (IS_ERR(fn)) {
> + dev_err(&dev->dev, "function init failed: %li\n",
> + PTR_ERR(fn));
> + return fn;
> + }
> +
> + for (afu = 0; afu <= fn->config.max_afu_index; afu++) {
> + rc = ocxl_config_check_afu_index(dev, &fn->config, afu);
> + if (rc > 0) {
> + rc = init_afu(dev, fn, afu);
> + if (rc) {
> + dev_err(&dev->dev,
> + "Can't initialize AFU index %d\n", afu);
> + continue;
> + }
> + afu_count++;
> + }
> + }
> + dev_info(&dev->dev, "%d AFU(s) configured\n", afu_count);
> + return fn;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_function_open);
> +
> +struct list_head *ocxl_function_afu_list(struct ocxl_fn *fn)
> +{
> + return &fn->afu_list;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_function_afu_list);
> +
> +struct ocxl_afu *ocxl_function_fetch_afu(struct ocxl_fn *fn, u8 afu_idx)
> +{
> + struct ocxl_afu *afu;
> +
> + list_for_each_entry(afu, &fn->afu_list, list) {
> + if (afu->config.idx == afu_idx)
> + return afu;
> + }
> +
> + return NULL;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_function_fetch_afu);
> +
> +const struct ocxl_fn_config *ocxl_function_config(struct ocxl_fn *fn)
> {
> + return &fn->config;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_function_config);
> +
> +void ocxl_function_close(struct ocxl_fn *fn)
> +{
> + struct ocxl_afu *afu, *tmp;
> +
> + list_for_each_entry_safe(afu, tmp, &fn->afu_list, list) {
> + remove_afu(afu);
> + }
> +
> deconfigure_function(fn);
> device_unregister(&fn->dev);
> }
> +EXPORT_SYMBOL_GPL(ocxl_function_close);
> +
> +// AFU Metadata
> +
> +struct ocxl_afu_config *ocxl_afu_config(struct ocxl_afu *afu)
> +{
> + return &afu->config;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_afu_config);
> +
> +void ocxl_afu_set_private(struct ocxl_afu *afu, void *private)
> +{
> + afu->private = private;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_afu_set_private);
> +
> +void *ocxl_afu_get_private(struct ocxl_afu *afu)
> +{
> + if (afu)
> + return afu->private;
> +
> + return NULL;
> +}
> +EXPORT_SYMBOL_GPL(ocxl_afu_get_private);
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
> index 009e09b7ded5..7a38ea5af9db 100644
> --- a/drivers/misc/ocxl/file.c
> +++ b/drivers/misc/ocxl/file.c
> @@ -17,70 +17,60 @@ static struct class *ocxl_class;
> static struct mutex minors_idr_lock;
> static struct idr minors_idr;
>
> -static struct ocxl_afu *find_and_get_afu(dev_t devno)
> +static struct ocxl_file_info *find_file_info(dev_t devno)
> {
> - struct ocxl_afu *afu;
> - int afu_minor;
> + struct ocxl_file_info *info;
>
> - afu_minor = MINOR(devno);
> /*
> * We don't declare an RCU critical section here, as our AFU
> * is protected by a reference counter on the device. By the time the
> - * minor number of a device is removed from the idr, the ref count of
> + * info reference is removed from the idr, the ref count of
> * the device is already at 0, so no user API will access that AFU and
> * this function can't return it.
> */
> - afu = idr_find(&minors_idr, afu_minor);
> - if (afu)
> - ocxl_afu_get(afu);
> - return afu;
> + info = idr_find(&minors_idr, MINOR(devno));
> + return info;
> }
>
> -static int allocate_afu_minor(struct ocxl_afu *afu)
> +static int allocate_minor(struct ocxl_file_info *info)
> {
> int minor;
>
> mutex_lock(&minors_idr_lock);
> - minor = idr_alloc(&minors_idr, afu, 0, OCXL_NUM_MINORS, GFP_KERNEL);
> + minor = idr_alloc(&minors_idr, info, 0, OCXL_NUM_MINORS, GFP_KERNEL);
> mutex_unlock(&minors_idr_lock);
> return minor;
> }
>
> -static void free_afu_minor(struct ocxl_afu *afu)
> +static void free_minor(struct ocxl_file_info *info)
> {
> mutex_lock(&minors_idr_lock);
> - idr_remove(&minors_idr, MINOR(afu->dev.devt));
> + idr_remove(&minors_idr, MINOR(info->dev.devt));
> mutex_unlock(&minors_idr_lock);
> }
>
> static int afu_open(struct inode *inode, struct file *file)
> {
> - struct ocxl_afu *afu;
> + struct ocxl_file_info *info;
> struct ocxl_context *ctx;
> int rc;
>
> pr_debug("%s for device %x\n", __func__, inode->i_rdev);
>
> - afu = find_and_get_afu(inode->i_rdev);
> - if (!afu)
> + info = find_file_info(inode->i_rdev);
> + if (!info)
> return -ENODEV;
>
> ctx = ocxl_context_alloc();
> - if (!ctx) {
> - rc = -ENOMEM;
> - goto put_afu;
> - }
> + if (!ctx)
> + return -ENOMEM;
>
> - rc = ocxl_context_init(ctx, afu, inode->i_mapping);
> + rc = ocxl_context_init(ctx, info->afu, inode->i_mapping);
> if (rc)
> - goto put_afu;
> + return rc;
> +
> file->private_data = ctx;
> - ocxl_afu_put(afu);
> return 0;
> -
> -put_afu:
> - ocxl_afu_put(afu);
> - return rc;
> }
>
> static long afu_ioctl_attach(struct ocxl_context *ctx,
> @@ -204,11 +194,16 @@ static long afu_ioctl(struct file *file, unsigned int cmd,
> struct ocxl_ioctl_irq_fd irq_fd;
> u64 irq_offset;
> long rc;
> + bool closed;
>
> pr_debug("%s for context %d, command %s\n", __func__, ctx->pasid,
> CMD_STR(cmd));
>
> - if (ctx->status == CLOSED)
> + mutex_lock(&ctx->status_mutex);
> + closed = (ctx->status == CLOSED);
> + mutex_unlock(&ctx->status_mutex);
> +
> + if (closed)
> return -EIO;
>
> switch (cmd) {
> @@ -468,39 +463,102 @@ static const struct file_operations ocxl_afu_fops = {
> .release = afu_release,
> };
>
> -int ocxl_create_cdev(struct ocxl_afu *afu)
> +// Free the info struct
> +static void info_release(struct device *dev)
> +{
> + struct ocxl_file_info *info = container_of(dev, struct ocxl_file_info, dev);
> +
> + free_minor(info);
> + ocxl_afu_put(info->afu);
> + kfree(info);
> +}
> +
> +static int ocxl_file_make_visible(struct ocxl_file_info *info)
> {
> int rc;
>
> - cdev_init(&afu->cdev, &ocxl_afu_fops);
> - rc = cdev_add(&afu->cdev, afu->dev.devt, 1);
> + cdev_init(&info->cdev, &ocxl_afu_fops);
> + rc = cdev_add(&info->cdev, info->dev.devt, 1);
> if (rc) {
> - dev_err(&afu->dev, "Unable to add afu char device: %d\n", rc);
> + dev_err(&info->dev, "Unable to add afu char device: %d\n", rc);
> return rc;
> }
> +
> return 0;
> }
>
> -void ocxl_destroy_cdev(struct ocxl_afu *afu)
> +static void ocxl_file_make_invisible(struct ocxl_file_info *info)
> {
> - cdev_del(&afu->cdev);
> + cdev_del(&info->cdev);
> }
>
> -int ocxl_register_afu(struct ocxl_afu *afu)
> +int ocxl_file_register_afu(struct ocxl_afu *afu)
> {
> int minor;
> + int rc;
> + struct ocxl_file_info *info;
> + struct ocxl_fn *fn = afu->fn;
> + struct pci_dev *pci_dev = to_pci_dev(fn->dev.parent);
> +
> + info = kzalloc(sizeof(*info), GFP_KERNEL);
> + if (info == NULL)
> + return -ENOMEM;
>
> - minor = allocate_afu_minor(afu);
> - if (minor < 0)
> + minor = allocate_minor(info);
> + if (minor < 0) {
> + kfree(info);
> return minor;
> - afu->dev.devt = MKDEV(MAJOR(ocxl_dev), minor);
> - afu->dev.class = ocxl_class;
> - return device_register(&afu->dev);
> + }
> +
> + info->dev.parent = &fn->dev;
> + info->dev.devt = MKDEV(MAJOR(ocxl_dev), minor);
> + info->dev.class = ocxl_class;
> + info->dev.release = info_release;
> +
> + info->afu = afu;
> + ocxl_afu_get(afu);
> +
> + rc = dev_set_name(&info->dev, "%s.%s.%hhu",
> + afu->config.name, dev_name(&pci_dev->dev), afu->config.idx);
> + if (rc)
> + goto err_put;
> +
> + rc = device_register(&info->dev);
> + if (rc)
> + goto err_put;
> +
> + rc = ocxl_sysfs_register_afu(info);
> + if (rc)
> + goto err_unregister;
> +
> + rc = ocxl_file_make_visible(info);
> + if (rc)
> + goto err_unregister;
> +
> + ocxl_afu_set_private(afu, info);
> +
> + return 0;
> +
> +err_unregister:
> + ocxl_sysfs_unregister_afu(info); // safe to call even if register failed
> + device_unregister(&info->dev);
> +err_put:
> + ocxl_afu_put(afu);
> + free_minor(info);
> + kfree(info);
> + return rc;
> }
>
> -void ocxl_unregister_afu(struct ocxl_afu *afu)
> +void ocxl_file_unregister_afu(struct ocxl_afu *afu)
> {
> - free_afu_minor(afu);
> + struct ocxl_file_info *info = ocxl_afu_get_private(afu);
> +
> + if (!info)
> + return;
> +
> + ocxl_file_make_invisible(info);
> + ocxl_sysfs_unregister_afu(info);
> + device_unregister(&info->dev);
> }
>
> static char *ocxl_devnode(struct device *dev, umode_t *mode)
> diff --git a/drivers/misc/ocxl/ocxl_internal.h b/drivers/misc/ocxl/ocxl_internal.h
> index 81086534dab5..53b6c64a1bf0 100644
> --- a/drivers/misc/ocxl/ocxl_internal.h
> +++ b/drivers/misc/ocxl/ocxl_internal.h
> @@ -11,9 +11,6 @@
> #define MAX_IRQ_PER_LINK 2000
> #define MAX_IRQ_PER_CONTEXT MAX_IRQ_PER_LINK
>
> -#define to_ocxl_function(d) container_of(d, struct ocxl_fn, dev)
> -#define to_ocxl_afu(d) container_of(d, struct ocxl_afu, dev)
> -
> extern struct pci_driver ocxl_pci_driver;
>
> struct ocxl_fn {
> @@ -30,11 +27,17 @@ struct ocxl_fn {
> void *link;
> };
>
> +struct ocxl_file_info {
> + struct ocxl_afu *afu;
> + struct device dev;
> + struct cdev cdev;
> + struct bin_attribute attr_global_mmio;
> +};
> +
> struct ocxl_afu {
> + struct kref kref;
> struct ocxl_fn *fn;
> struct list_head list;
> - struct device dev;
> - struct cdev cdev;
> struct ocxl_afu_config config;
> int pasid_base;
> int pasid_count; /* opened contexts */
> @@ -48,7 +51,7 @@ struct ocxl_afu {
> u64 irq_base_offset;
> void __iomem *global_mmio_ptr;
> u64 pp_mmio_start;
> - struct bin_attribute attr_global_mmio;
> + void *private;
> };
>
> enum ocxl_context_status {
> @@ -91,13 +94,10 @@ struct ocxl_process_element {
> __be32 software_state;
> };
>
> -struct ocxl_afu *ocxl_afu_get(struct ocxl_afu *afu);
> -void ocxl_afu_put(struct ocxl_afu *afu);
> -
> int ocxl_create_cdev(struct ocxl_afu *afu);
> void ocxl_destroy_cdev(struct ocxl_afu *afu);
> -int ocxl_register_afu(struct ocxl_afu *afu);
> -void ocxl_unregister_afu(struct ocxl_afu *afu);
> +int ocxl_file_register_afu(struct ocxl_afu *afu);
> +void ocxl_file_unregister_afu(struct ocxl_afu *afu);
>
> int ocxl_file_init(void);
> void ocxl_file_exit(void);
> @@ -140,8 +140,8 @@ int ocxl_context_detach(struct ocxl_context *ctx);
> void ocxl_context_detach_all(struct ocxl_afu *afu);
> void ocxl_context_free(struct ocxl_context *ctx);
>
> -int ocxl_sysfs_add_afu(struct ocxl_afu *afu);
> -void ocxl_sysfs_remove_afu(struct ocxl_afu *afu);
> +int ocxl_sysfs_register_afu(struct ocxl_file_info *info);
> +void ocxl_sysfs_unregister_afu(struct ocxl_file_info *info);
>
> int ocxl_afu_irq_alloc(struct ocxl_context *ctx, u64 *irq_offset);
> int ocxl_afu_irq_free(struct ocxl_context *ctx, u64 irq_offset);
> @@ -150,9 +150,4 @@ int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, u64 irq_offset,
> int eventfd);
> u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, u64 irq_offset);
>
> -struct ocxl_fn *init_function(struct pci_dev *dev);
> -void remove_function(struct ocxl_fn *fn);
> -int init_afu(struct pci_dev *dev, struct ocxl_fn *fn, u8 afu_idx);
> -void remove_afu(struct ocxl_afu *afu);
> -
> #endif /* _OCXL_INTERNAL_H_ */
> diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c
> index 4ed7cb1a667f..f2a3ef4b9bdd 100644
> --- a/drivers/misc/ocxl/pci.c
> +++ b/drivers/misc/ocxl/pci.c
> @@ -16,47 +16,45 @@ MODULE_DEVICE_TABLE(pci, ocxl_pci_tbl);
>
> static int ocxl_probe(struct pci_dev *dev, const struct pci_device_id *id)
> {
> - int rc, afu_count = 0;
> - u8 afu;
> + int rc;
> + struct ocxl_afu *afu, *tmp;
> struct ocxl_fn *fn;
> + struct list_head *afu_list;
>
> - if (!radix_enabled()) {
> - dev_err(&dev->dev, "Unsupported memory model (hash)\n");
> - return -ENODEV;
> - }
> -
> - fn = init_function(dev);
> - if (IS_ERR(fn)) {
> - dev_err(&dev->dev, "function init failed: %li\n",
> - PTR_ERR(fn));
> + fn = ocxl_function_open(dev);
> + if (IS_ERR(fn))
> return PTR_ERR(fn);
> - }
>
> - for (afu = 0; afu <= fn->config.max_afu_index; afu++) {
> - rc = ocxl_config_check_afu_index(dev, &fn->config, afu);
> - if (rc > 0) {
> - rc = init_afu(dev, fn, afu);
> - if (rc) {
> - dev_err(&dev->dev,
> - "Can't initialize AFU index %d\n", afu);
> - continue;
> - }
> - afu_count++;
> + pci_set_drvdata(dev, fn);
> +
> + afu_list = ocxl_function_afu_list(fn);
> +
> + list_for_each_entry_safe(afu, tmp, afu_list, list) {
> + // Cleanup handled within ocxl_file_register_afu()
> + rc = ocxl_file_register_afu(afu);
> + if (rc) {
> + dev_err(&dev->dev, "Failed to register AFU '%s' index %d",
> + afu->config.name, afu->config.idx);
> }
> }
> - dev_info(&dev->dev, "%d AFU(s) configured\n", afu_count);
> +
> return 0;
> }
>
> -static void ocxl_remove(struct pci_dev *dev)
> +void ocxl_remove(struct pci_dev *dev)
> {
> - struct ocxl_afu *afu, *tmp;
> - struct ocxl_fn *fn = pci_get_drvdata(dev);
> + struct ocxl_fn *fn;
> + struct ocxl_afu *afu;
> + struct list_head *afu_list;
>
> - list_for_each_entry_safe(afu, tmp, &fn->afu_list, list) {
> - remove_afu(afu);
> + fn = pci_get_drvdata(dev);
> + afu_list = ocxl_function_afu_list(fn);
> +
> + list_for_each_entry(afu, afu_list, list) {
> + ocxl_file_unregister_afu(afu);
> }
> - remove_function(fn);
> +
> + ocxl_function_close(fn);
> }
>
> struct pci_driver ocxl_pci_driver = {
> diff --git a/drivers/misc/ocxl/sysfs.c b/drivers/misc/ocxl/sysfs.c
> index 0ab1fd1b2682..58f1ba264206 100644
> --- a/drivers/misc/ocxl/sysfs.c
> +++ b/drivers/misc/ocxl/sysfs.c
> @@ -3,11 +3,18 @@
> #include <linux/sysfs.h>
> #include "ocxl_internal.h"
>
> +static inline struct ocxl_afu *to_afu(struct device *device)
> +{
> + struct ocxl_file_info *info = container_of(device, struct ocxl_file_info, dev);
> +
> + return info->afu;
> +}
> +
> static ssize_t global_mmio_size_show(struct device *device,
> struct device_attribute *attr,
> char *buf)
> {
> - struct ocxl_afu *afu = to_ocxl_afu(device);
> + struct ocxl_afu *afu = to_afu(device);
>
> return scnprintf(buf, PAGE_SIZE, "%d\n",
> afu->config.global_mmio_size);
> @@ -17,7 +24,7 @@ static ssize_t pp_mmio_size_show(struct device *device,
> struct device_attribute *attr,
> char *buf)
> {
> - struct ocxl_afu *afu = to_ocxl_afu(device);
> + struct ocxl_afu *afu = to_afu(device);
>
> return scnprintf(buf, PAGE_SIZE, "%d\n",
> afu->config.pp_mmio_stride);
> @@ -27,7 +34,7 @@ static ssize_t afu_version_show(struct device *device,
> struct device_attribute *attr,
> char *buf)
> {
> - struct ocxl_afu *afu = to_ocxl_afu(device);
> + struct ocxl_afu *afu = to_afu(device);
>
> return scnprintf(buf, PAGE_SIZE, "%hhu:%hhu\n",
> afu->config.version_major,
> @@ -38,7 +45,7 @@ static ssize_t contexts_show(struct device *device,
> struct device_attribute *attr,
> char *buf)
> {
> - struct ocxl_afu *afu = to_ocxl_afu(device);
> + struct ocxl_afu *afu = to_afu(device);
>
> return scnprintf(buf, PAGE_SIZE, "%d/%d\n",
> afu->pasid_count, afu->pasid_max);
> @@ -55,7 +62,7 @@ static ssize_t global_mmio_read(struct file *filp, struct kobject *kobj,
> struct bin_attribute *bin_attr, char *buf,
> loff_t off, size_t count)
> {
> - struct ocxl_afu *afu = to_ocxl_afu(kobj_to_dev(kobj));
> + struct ocxl_afu *afu = to_afu(kobj_to_dev(kobj));
>
> if (count == 0 || off < 0 ||
> off >= afu->config.global_mmio_size)
> @@ -86,7 +93,7 @@ static int global_mmio_mmap(struct file *filp, struct kobject *kobj,
> struct bin_attribute *bin_attr,
> struct vm_area_struct *vma)
> {
> - struct ocxl_afu *afu = to_ocxl_afu(kobj_to_dev(kobj));
> + struct ocxl_afu *afu = to_afu(kobj_to_dev(kobj));
>
> if ((vma_pages(vma) + vma->vm_pgoff) >
> (afu->config.global_mmio_size >> PAGE_SHIFT))
> @@ -99,27 +106,25 @@ static int global_mmio_mmap(struct file *filp, struct kobject *kobj,
> return 0;
> }
>
> -int ocxl_sysfs_add_afu(struct ocxl_afu *afu)
> +int ocxl_sysfs_register_afu(struct ocxl_file_info *info)
> {
> int i, rc;
>
> for (i = 0; i < ARRAY_SIZE(afu_attrs); i++) {
> - rc = device_create_file(&afu->dev, &afu_attrs[i]);
> + rc = device_create_file(&info->dev, &afu_attrs[i]);
> if (rc)
> goto err;
> }
>
> - sysfs_attr_init(&afu->attr_global_mmio.attr);
> - afu->attr_global_mmio.attr.name = "global_mmio_area";
> - afu->attr_global_mmio.attr.mode = 0600;
> - afu->attr_global_mmio.size = afu->config.global_mmio_size;
> - afu->attr_global_mmio.read = global_mmio_read;
> - afu->attr_global_mmio.mmap = global_mmio_mmap;
> - rc = device_create_bin_file(&afu->dev, &afu->attr_global_mmio);
> + sysfs_attr_init(&info->attr_global_mmio.attr);
> + info->attr_global_mmio.attr.name = "global_mmio_area";
> + info->attr_global_mmio.attr.mode = 0600;
> + info->attr_global_mmio.size = info->afu->config.global_mmio_size;
> + info->attr_global_mmio.read = global_mmio_read;
> + info->attr_global_mmio.mmap = global_mmio_mmap;
> + rc = device_create_bin_file(&info->dev, &info->attr_global_mmio);
> if (rc) {
> - dev_err(&afu->dev,
> - "Unable to create global mmio attr for afu: %d\n",
> - rc);
> + dev_err(&info->dev, "Unable to create global mmio attr for afu: %d\n", rc);
> goto err;
> }
>
> @@ -127,15 +132,20 @@ int ocxl_sysfs_add_afu(struct ocxl_afu *afu)
>
> err:
> for (i--; i >= 0; i--)
> - device_remove_file(&afu->dev, &afu_attrs[i]);
> + device_remove_file(&info->dev, &afu_attrs[i]);
> +
> return rc;
> }
>
> -void ocxl_sysfs_remove_afu(struct ocxl_afu *afu)
> +void ocxl_sysfs_unregister_afu(struct ocxl_file_info *info)
> {
> int i;
>
> + /*
> + * device_remove_bin_file is safe to call if the file is not added as
> + * the files are removed by name, and early exit if not found
> + */
> for (i = 0; i < ARRAY_SIZE(afu_attrs); i++)
> - device_remove_file(&afu->dev, &afu_attrs[i]);
> - device_remove_bin_file(&afu->dev, &afu->attr_global_mmio);
> + device_remove_file(&info->dev, &afu_attrs[i]);
> + device_remove_bin_file(&info->dev, &info->attr_global_mmio);
> }
> diff --git a/include/misc/ocxl.h b/include/misc/ocxl.h
> index 9530d3be1b30..8bafd748e380 100644
> --- a/include/misc/ocxl.h
> +++ b/include/misc/ocxl.h
> @@ -16,11 +16,7 @@
>
> #define OCXL_AFU_NAME_SZ (24+1) /* add 1 for NULL termination */
>
> -/*
> - * The following 2 structures are a fairly generic way of representing
> - * the configuration data for a function and AFU, as read from the
> - * configuration space.
> - */
> +
> struct ocxl_afu_config {
> u8 idx;
> int dvsec_afu_control_pos; /* offset of AFU control DVSEC */
> @@ -49,12 +45,108 @@ struct ocxl_fn_config {
> s8 max_afu_index;
> };
>
> -/*
> - * Read the configuration space of a function and fill in a
> - * ocxl_fn_config structure with all the function details
> +// These are opaque outside the ocxl driver
> +struct ocxl_afu;
> +struct ocxl_fn;
> +
> +// Device detection & initialisation
> +
> +/**
> + * Open an OpenCAPI function on an OpenCAPI device
> + *
> + * @dev: The PCI device that contains the function
> + *
> + * Returns an opaque pointer to the function, or an error pointer (check with IS_ERR)
> */
> -int ocxl_config_read_function(struct pci_dev *dev,
> - struct ocxl_fn_config *fn);
> +struct ocxl_fn *ocxl_function_open(struct pci_dev *dev);
> +
> +/**
> + * Get the list of AFUs associated with a PCI function device
> + *
> + * Returns a list of struct ocxl_afu *
> + *
> + * @fn: The OpenCAPI function containing the AFUs
> + */
> +struct list_head *ocxl_function_afu_list(struct ocxl_fn *fn);
> +
> +/**
> + * Fetch an AFU instance from an OpenCAPI function
> + *
> + * @fn: The OpenCAPI function to get the AFU from
> + * @afu_idx: The index of the AFU to get
> + *
> + * If successful, the AFU should be released with ocxl_afu_put()
> + *
> + * Returns a pointer to the AFU, or NULL on error
> + */
> +struct ocxl_afu *ocxl_function_fetch_afu(struct ocxl_fn *fn, u8 afu_idx);
> +
> +/**
> + * Take a reference to an AFU
> + *
> + * @afu: The AFU to increment the reference count on
> + */
> +void ocxl_afu_get(struct ocxl_afu *afu);
> +
> +/**
> + * Release a reference to an AFU
> + *
> + * @afu: The AFU to decrement the reference count on
> + */
> +void ocxl_afu_put(struct ocxl_afu *afu);
> +
> +
> +/**
> + * Get the configuration information for an OpenCAPI function
> + *
> + * @fn: The OpenCAPI function to get the config for
> + *
> + * Returns the function config, or NULL on error
> + */
> +const struct ocxl_fn_config *ocxl_function_config(struct ocxl_fn *fn);
> +
> +/**
> + * Close an OpenCAPI function
> + *
> + * This will free any AFUs previously retrieved from the function, and
> + * detach and associated contexts. The contexts must by freed by the caller.
> + *
> + * @fn: The OpenCAPI function to close
> + *
> + */
> +void ocxl_function_close(struct ocxl_fn *fn);
> +
> +// AFU Metadata
> +
> +/**
> + * Get a pointer to the config for an AFU
> + *
> + * @afu: a pointer to the AFU to get the config for
> + *
> + * Returns a pointer to the AFU config
> + */
> +struct ocxl_afu_config *ocxl_afu_config(struct ocxl_afu *afu);
> +
> +/**
> + * Assign opaque hardware specific information to an OpenCAPI AFU.
> + *
> + * @dev: The PCI device associated with the OpenCAPI device
> + * @private: the opaque hardware specific information to assign to the driver
> + */
> +void ocxl_afu_set_private(struct ocxl_afu *afu, void *private);
> +
> +/**
> + * Fetch the hardware specific information associated with an external OpenCAPI
> + * AFU. This may be consumed by an external OpenCAPI driver.
> + *
> + * @afu: The AFU
> + *
> + * Returns the opaque pointer associated with the device, or NULL if not set
> + */
> +void *ocxl_afu_get_private(struct ocxl_afu *dev);
> +
> +
> +// Functions left here are for compatibility with the cxlflash driver
>
> /*
> * Read the configuration space of a function for the AFU specified by
> @@ -141,6 +233,13 @@ int ocxl_config_set_TL(struct pci_dev *dev, int tl_dvsec);
> int ocxl_config_terminate_pasid(struct pci_dev *dev,
> int afu_control_offset, int pasid);
>
> +/*
> + * Read the configuration space of a function and fill in a
> + * ocxl_fn_config structure with all the function details
> + */
> +int ocxl_config_read_function(struct pci_dev *dev,
> + struct ocxl_fn_config *fn);
> +
> /*
> * Set up the opencapi link for the function.
> *
>
^ permalink raw reply
* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
From: Daniel Baluta @ 2019-04-17 15:25 UTC (permalink / raw)
To: Yue Haibing
Cc: Linux-ALSA, linuxppc-dev, Timur Tabi, Xiubo Li,
Linux Kernel Mailing List, Takashi Iwai, Liam Girdwood,
Jaroslav Kysela, Nicolin Chen, Mark Brown, Cosmin-Gabriel Samoila,
Fabio Estevam
In-Reply-To: <20190417150915.37968-1-yuehaibing@huawei.com>
Hi Yue,
Looks good to me. Just one question for Cosmin:
On Wed, Apr 17, 2019 at 6:10 PM Yue Haibing <yuehaibing@huawei.com> wrote:
>
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
> sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]
>
> It is never used since introduction in
> commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> sound/soc/fsl/fsl_micfil.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
> index 40c07e7..f7f2d29 100644
> --- a/sound/soc/fsl/fsl_micfil.c
> +++ b/sound/soc/fsl/fsl_micfil.c
> @@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
> {
> u32 ctrl2_reg;
> long mclk_rate;
> - int osr;
> int clk_div;
>
> regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
I noticed now that we also read ctrl2_reg without using it. Is this as intended?
> - osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
> - >> MICFIL_CTRL2_CICOSR_SHIFT);
>
> mclk_rate = clk_get_rate(micfil->mclk);
>
> --
> 2.7.4
>
>
^ permalink raw reply
* [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
From: Yue Haibing @ 2019-04-17 15:09 UTC (permalink / raw)
To: timur, nicoleotsuka, Xiubo.Lee, festevam, lgirdwood, broonie,
perex, tiwai
Cc: YueHaibing, alsa-devel, linuxppc-dev, linux-kernel
From: YueHaibing <yuehaibing@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]
It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
sound/soc/fsl/fsl_micfil.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e7..f7f2d29 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
{
u32 ctrl2_reg;
long mclk_rate;
- int osr;
int clk_div;
regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
- osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
- >> MICFIL_CTRL2_CICOSR_SHIFT);
mclk_rate = clk_get_rate(micfil->mclk);
--
2.7.4
^ permalink raw reply related
* [PATCH -next] ALSA: ps3: Remove set but not used variables 'start_vaddr' and 'pcm_index'
From: Yue Haibing @ 2019-04-17 14:57 UTC (permalink / raw)
To: geoff, perex, tiwai, benh, paulus, mpe
Cc: YueHaibing, alsa-devel, linuxppc-dev, linux-kernel
From: YueHaibing <yuehaibing@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warnings:
sound/ppc/snd_ps3.c: In function 'snd_ps3_program_dma':
sound/ppc/snd_ps3.c:236:8: warning: variable 'start_vaddr' set but not used [-Wunused-but-set-variable]
sound/ppc/snd_ps3.c: In function 'snd_ps3_pcm_open':
sound/ppc/snd_ps3.c:529:6: warning: variable 'pcm_index' set but not used [-Wunused-but-set-variable]
They are never used and can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
sound/ppc/snd_ps3.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index 521236e..f77a0d5 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -233,7 +233,6 @@ static int snd_ps3_program_dma(struct snd_ps3_card_info *card,
int fill_stages, dma_ch, stage;
enum snd_ps3_ch ch;
uint32_t ch0_kick_event = 0; /* initialize to mute gcc */
- void *start_vaddr;
unsigned long irqsave;
int silent = 0;
@@ -257,7 +256,6 @@ static int snd_ps3_program_dma(struct snd_ps3_card_info *card,
fill_stages = 4;
spin_lock_irqsave(&card->dma_lock, irqsave);
for (ch = 0; ch < 2; ch++) {
- start_vaddr = card->dma_next_transfer_vaddr[0];
for (stage = 0; stage < fill_stages; stage++) {
dma_ch = stage * 2 + ch;
if (silent)
@@ -526,9 +524,7 @@ static int snd_ps3_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream);
- int pcm_index;
- pcm_index = substream->pcm->device;
/* to retrieve substream/runtime in interrupt handler */
card->substream = substream;
--
2.7.4
^ permalink raw reply related
* [PATCH] drivers: cpuidle: This patch fix the following checkpatch warning.
From: Mohan Kumar @ 2019-04-17 14:52 UTC (permalink / raw)
To: rjw; +Cc: daniel.lezcano, linuxppc-dev, linux-kernel, linux-pm
Use pr_debug instead of printk
WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then
dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
---
drivers/cpuidle/cpuidle-powernv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index 84b1ebe..7cf9835 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -401,7 +401,7 @@ static int __init powernv_processor_idle_init(void)
powernv_cpuidle_driver_init();
retval = cpuidle_register(&powernv_idle_driver, NULL);
if (retval) {
- printk(KERN_DEBUG "Registration of powernv driver failed.\n");
+ pr_debug("Registration of powernv driver failed.\n");
return retval;
}
@@ -413,7 +413,7 @@ static int __init powernv_processor_idle_init(void)
"cpuidle/powernv:dead", NULL,
powernv_cpuidle_cpu_dead);
WARN_ON(retval < 0);
- printk(KERN_DEBUG "powernv_idle_driver registered\n");
+ pr_debug("powernv_idle_driver registered\n");
return 0;
}
--
2.7.4
^ permalink raw reply related
* Re: [PATCH v5 09/10] powerpc/64s: Implement KUAP for Radix MMU
From: Michael Ellerman @ 2019-04-17 13:39 UTC (permalink / raw)
To: Christophe Leroy, linuxppc-dev; +Cc: npiggin
In-Reply-To: <fff6b7e5-1b97-85ad-defa-c429b9746f04@c-s.fr>
Christophe Leroy <christophe.leroy@c-s.fr> writes:
> Le 08/03/2019 à 02:16, Michael Ellerman a écrit :
...
>> diff --git a/arch/powerpc/include/asm/book3s/64/kup-radix.h b/arch/powerpc/include/asm/book3s/64/kup-radix.h
>> new file mode 100644
>> index 000000000000..3d60b04fc3f6
>> --- /dev/null
>> +++ b/arch/powerpc/include/asm/book3s/64/kup-radix.h
>> @@ -0,0 +1,107 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#ifndef _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H
>> +#define _ASM_POWERPC_BOOK3S_64_KUP_RADIX_H
>> +
>> +#include <linux/const.h>
>> +
>> +#define AMR_KUAP_BLOCK_READ UL(0x4000000000000000)
>> +#define AMR_KUAP_BLOCK_WRITE UL(0x8000000000000000)
>> +#define AMR_KUAP_BLOCKED (AMR_KUAP_BLOCK_READ | AMR_KUAP_BLOCK_WRITE)
>> +#define AMR_KUAP_SHIFT 62
>> +
>> +#ifdef __ASSEMBLY__
>> +
>> +.macro kuap_restore_amr gpr
>
> What about calling it just kuap_restore (kuap_check and
> kuap_save_and_lock) , for the day we add an different implementation for
> non RADIX ?
I don't think we have any plan to use anything other than AMR. We can
always rename them if we do.
>> +#ifdef CONFIG_PPC_KUAP
>> + BEGIN_MMU_FTR_SECTION_NESTED(67)
>> + ld \gpr, STACK_REGS_KUAP(r1)
>> + mtspr SPRN_AMR, \gpr
>> + END_MMU_FTR_SECTION_NESTED_IFSET(MMU_FTR_RADIX_KUAP, 67)
>> +#endif
>> +.endm
>> +
>> +.macro kuap_check_amr gpr1 gpr2
>
> What about using .macro kuap_check_amr gpr1, gpr2 instead to have a
> standard form with a ',' like kuap_save_amr_and_lock
Yep, that was not intentional.
>> +#ifdef CONFIG_PPC_KUAP_DEBUG
>> + BEGIN_MMU_FTR_SECTION_NESTED(67)
>> + mfspr \gpr1, SPRN_AMR
>> + li \gpr2, (AMR_KUAP_BLOCKED >> AMR_KUAP_SHIFT)
>> + sldi \gpr2, \gpr2, AMR_KUAP_SHIFT
>> +999: tdne \gpr1, \gpr2
>> + EMIT_BUG_ENTRY 999b,__FILE__,__LINE__, \
>> + (BUGFLAG_WARNING|BUGFLAG_ONCE)
>
> This should fit on a single line.
> Also add space after , and around |
Yep, copy/pasted from elsewhere.
>> +.macro kuap_save_amr_and_lock gpr1, gpr2, use_cr, msr_pr_cr
>> +#ifdef CONFIG_PPC_KUAP
>> + BEGIN_MMU_FTR_SECTION_NESTED(67)
>> + .ifnb \msr_pr_cr
>> + bne \msr_pr_cr, 99f
>> + .endif
>> + mfspr \gpr1, SPRN_AMR
>> + std \gpr1, STACK_REGS_KUAP(r1)
>> + li \gpr2, (AMR_KUAP_BLOCKED >> AMR_KUAP_SHIFT)
>> + sldi \gpr2, \gpr2, AMR_KUAP_SHIFT
>> + cmpd \use_cr, \gpr1, \gpr2
>
> On ppc32, I would have used rlwinm. to do the test. Is there an
> equivalent rldinm. (unless we need to preserve cr0) ?
I prefer to have the CR field specified, so we don't accidentally
clobber cr0 in some path where it is live.
>> + beq \use_cr, 99f
>> + // We don't isync here because we very recently entered via rfid
>
> Is this form of comment acceptable now ? It used to be /* */ only.
Yeah it is, at least in powerpc code :)
>> diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
>> index 937bb630093f..bef4e05a6823 100644
>> --- a/arch/powerpc/include/asm/exception-64s.h
>> +++ b/arch/powerpc/include/asm/exception-64s.h
>> @@ -497,6 +497,7 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
>> RESTORE_CTR(r1, area); \
>> b bad_stack; \
>> 3: EXCEPTION_PROLOG_COMMON_1(); \
>> + kuap_save_amr_and_lock r9, r10, cr1, cr0; \
>
> What about moving this to 4f, to avoid the cr test and branch in
> kuap_save_amr_and_lock ?
Moving it there wouldn't help, because user & kernel entry both go
through 4f. So we'd still need to check if we're coming from user.
Or did I misunderstand?
>> beq 4f; /* if from kernel mode */ \
>> ACCOUNT_CPU_USER_ENTRY(r13, r9, r10); \
>> SAVE_PPR(area, r9); \
>> diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
>> index 224bcd4be5ae..0c87832ddd6c 100644
>> --- a/arch/powerpc/mm/pgtable-radix.c
>> +++ b/arch/powerpc/mm/pgtable-radix.c
>> @@ -553,6 +554,23 @@ void __init setup_kuep(bool disabled)
>> }
>> #endif
>>
>> +#ifdef CONFIG_PPC_KUAP
>> +void __init setup_kuap(bool disabled)
>> +{
>> + if (disabled || !early_radix_enabled())
>> + return;
>> +
>> + if (smp_processor_id() == boot_cpuid) {
>> + pr_info("Activating Kernel Userspace Access Prevention\n");
>> + cur_cpu_spec->mmu_features |= MMU_FTR_RADIX_KUAP;
>> + }
>> +
>> + /* Make sure userspace can't change the AMR */
>> + mtspr(SPRN_UAMOR, 0);
>> + mtspr(SPRN_AMR, AMR_KUAP_BLOCKED);
>
> No isync() needed here ?
Will add.
>> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
>> index 60371784c9f1..5e53b9fd62aa 100644
>> --- a/arch/powerpc/platforms/Kconfig.cputype
>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>> @@ -370,6 +371,13 @@ config PPC_KUAP
>>
>> If you're unsure, say Y.
>>
>> +config PPC_KUAP_DEBUG
>> + bool "Extra debugging for Kernel Userspace Access Protection"
>> + depends on PPC_HAVE_KUAP && PPC_RADIX_MMU
>
> Why only PPC_RADIX_MMU ?
Because it doesn't do anything useful unless radix is enabled.
We can remove it when another platform wants it.
Thanks for the review.
cheers
^ permalink raw reply
* Re: [PATCH v4 2/7] ocxl: Don't pass pci_dev around
From: Frederic Barrat @ 2019-04-17 13:29 UTC (permalink / raw)
To: Alastair D'Silva, alastair
Cc: Greg Kroah-Hartman, linuxppc-dev, Arnd Bergmann, Andrew Donnellan,
linux-kernel
In-Reply-To: <20190327053137.15173-3-alastair@au1.ibm.com>
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> This data is already available in a struct
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
> drivers/misc/ocxl/core.c | 38 +++++++++++++++++++++-----------------
> 1 file changed, 21 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/misc/ocxl/core.c b/drivers/misc/ocxl/core.c
> index 1a4411b72d35..2f2fe12eac1e 100644
> --- a/drivers/misc/ocxl/core.c
> +++ b/drivers/misc/ocxl/core.c
> @@ -66,10 +66,11 @@ static int set_afu_device(struct ocxl_afu *afu, const char *location)
> return rc;
> }
>
> -static int assign_afu_actag(struct ocxl_afu *afu, struct pci_dev *dev)
> +static int assign_afu_actag(struct ocxl_afu *afu)
> {
> struct ocxl_fn *fn = afu->fn;
> int actag_count, actag_offset;
> + struct pci_dev *pci_dev = to_pci_dev(fn->dev.parent);
>
> /*
> * if there were not enough actags for the function, each afu
> @@ -79,16 +80,16 @@ static int assign_afu_actag(struct ocxl_afu *afu, struct pci_dev *dev)
> fn->actag_enabled / fn->actag_supported;
> actag_offset = ocxl_actag_afu_alloc(fn, actag_count);
> if (actag_offset < 0) {
> - dev_err(&afu->dev, "Can't allocate %d actags for AFU: %d\n",
> + dev_err(&pci_dev->dev, "Can't allocate %d actags for AFU: %d\n",
> actag_count, actag_offset);
> return actag_offset;
> }
> afu->actag_base = fn->actag_base + actag_offset;
> afu->actag_enabled = actag_count;
>
> - ocxl_config_set_afu_actag(dev, afu->config.dvsec_afu_control_pos,
> + ocxl_config_set_afu_actag(pci_dev, afu->config.dvsec_afu_control_pos,
> afu->actag_base, afu->actag_enabled);
> - dev_dbg(&afu->dev, "actag base=%d enabled=%d\n",
> + dev_dbg(&pci_dev->dev, "actag base=%d enabled=%d\n",
> afu->actag_base, afu->actag_enabled);
> return 0;
> }
> @@ -103,10 +104,11 @@ static void reclaim_afu_actag(struct ocxl_afu *afu)
> ocxl_actag_afu_free(afu->fn, start_offset, size);
> }
>
> -static int assign_afu_pasid(struct ocxl_afu *afu, struct pci_dev *dev)
> +static int assign_afu_pasid(struct ocxl_afu *afu)
> {
> struct ocxl_fn *fn = afu->fn;
> int pasid_count, pasid_offset;
> + struct pci_dev *pci_dev = to_pci_dev(fn->dev.parent);
>
> /*
> * We only support the case where the function configuration
> @@ -115,7 +117,7 @@ static int assign_afu_pasid(struct ocxl_afu *afu, struct pci_dev *dev)
> pasid_count = 1 << afu->config.pasid_supported_log;
> pasid_offset = ocxl_pasid_afu_alloc(fn, pasid_count);
> if (pasid_offset < 0) {
> - dev_err(&afu->dev, "Can't allocate %d PASIDs for AFU: %d\n",
> + dev_err(&pci_dev->dev, "Can't allocate %d PASIDs for AFU: %d\n",
> pasid_count, pasid_offset);
> return pasid_offset;
> }
> @@ -123,10 +125,10 @@ static int assign_afu_pasid(struct ocxl_afu *afu, struct pci_dev *dev)
> afu->pasid_count = 0;
> afu->pasid_max = pasid_count;
>
> - ocxl_config_set_afu_pasid(dev, afu->config.dvsec_afu_control_pos,
> + ocxl_config_set_afu_pasid(pci_dev, afu->config.dvsec_afu_control_pos,
> afu->pasid_base,
> afu->config.pasid_supported_log);
> - dev_dbg(&afu->dev, "PASID base=%d, enabled=%d\n",
> + dev_dbg(&pci_dev->dev, "PASID base=%d, enabled=%d\n",
> afu->pasid_base, pasid_count);
> return 0;
> }
> @@ -172,9 +174,10 @@ static void release_fn_bar(struct ocxl_fn *fn, int bar)
> WARN_ON(fn->bar_used[idx] < 0);
> }
>
> -static int map_mmio_areas(struct ocxl_afu *afu, struct pci_dev *dev)
> +static int map_mmio_areas(struct ocxl_afu *afu)
> {
> int rc;
> + struct pci_dev *pci_dev = to_pci_dev(afu->fn->dev.parent);
>
> rc = reserve_fn_bar(afu->fn, afu->config.global_mmio_bar);
> if (rc)
> @@ -187,10 +190,10 @@ static int map_mmio_areas(struct ocxl_afu *afu, struct pci_dev *dev)
> }
>
> afu->global_mmio_start =
> - pci_resource_start(dev, afu->config.global_mmio_bar) +
> + pci_resource_start(pci_dev, afu->config.global_mmio_bar) +
> afu->config.global_mmio_offset;
> afu->pp_mmio_start =
> - pci_resource_start(dev, afu->config.pp_mmio_bar) +
> + pci_resource_start(pci_dev, afu->config.pp_mmio_bar) +
> afu->config.pp_mmio_offset;
>
> afu->global_mmio_ptr = ioremap(afu->global_mmio_start,
> @@ -198,7 +201,7 @@ static int map_mmio_areas(struct ocxl_afu *afu, struct pci_dev *dev)
> if (!afu->global_mmio_ptr) {
> release_fn_bar(afu->fn, afu->config.pp_mmio_bar);
> release_fn_bar(afu->fn, afu->config.global_mmio_bar);
> - dev_err(&dev->dev, "Error mapping global mmio area\n");
> + dev_err(&pci_dev->dev, "Error mapping global mmio area\n");
> return -ENOMEM;
> }
>
> @@ -234,17 +237,17 @@ static int configure_afu(struct ocxl_afu *afu, u8 afu_idx, struct pci_dev *dev)
> if (rc)
> return rc;
>
> - rc = assign_afu_actag(afu, dev);
> + rc = assign_afu_actag(afu);
> if (rc)
> return rc;
>
> - rc = assign_afu_pasid(afu, dev);
> + rc = assign_afu_pasid(afu);
> if (rc) {
> reclaim_afu_actag(afu);
> return rc;
> }
>
> - rc = map_mmio_areas(afu, dev);
> + rc = map_mmio_areas(afu);
> if (rc) {
> reclaim_afu_pasid(afu);
> reclaim_afu_actag(afu);
> @@ -331,7 +334,7 @@ void remove_afu(struct ocxl_afu *afu)
> device_unregister(&afu->dev);
> }
>
> -static struct ocxl_fn *alloc_function(struct pci_dev *dev)
> +static struct ocxl_fn *alloc_function(void)
> {
> struct ocxl_fn *fn;
>
> @@ -342,6 +345,7 @@ static struct ocxl_fn *alloc_function(struct pci_dev *dev)
> INIT_LIST_HEAD(&fn->afu_list);
> INIT_LIST_HEAD(&fn->pasid_list);
> INIT_LIST_HEAD(&fn->actag_list);
> +
> return fn;
> }
>
> @@ -491,7 +495,7 @@ struct ocxl_fn *init_function(struct pci_dev *dev)
> struct ocxl_fn *fn;
> int rc;
>
> - fn = alloc_function(dev);
> + fn = alloc_function();
> if (!fn)
> return ERR_PTR(-ENOMEM);
>
>
^ permalink raw reply
* Re: [PATCH v4 1/7] ocxl: Split pci.c
From: Frederic Barrat @ 2019-04-17 13:22 UTC (permalink / raw)
To: Alastair D'Silva, alastair
Cc: Greg Kroah-Hartman, linuxppc-dev, Arnd Bergmann, Andrew Donnellan,
linux-kernel
In-Reply-To: <20190327053137.15173-2-alastair@au1.ibm.com>
Le 27/03/2019 à 06:31, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> In preparation for making core code available for external drivers,
> move the core code out of pci.c and into core.c
>
> Signed-off-by: Alastai
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
> drivers/misc/ocxl/Makefile | 1 +
> drivers/misc/ocxl/core.c | 517 +++++++++++++++++++++++++++++
> drivers/misc/ocxl/ocxl_internal.h | 5 +
> drivers/misc/ocxl/pci.c | 519 +-----------------------------
> 4 files changed, 524 insertions(+), 518 deletions(-)
> create mode 100644 drivers/misc/ocxl/core.c
>
> diff --git a/drivers/misc/ocxl/Makefile b/drivers/misc/ocxl/Makefile
> index 5229dcda8297..bc4e39bfda7b 100644
> --- a/drivers/misc/ocxl/Makefile
> +++ b/drivers/misc/ocxl/Makefile
> @@ -3,6 +3,7 @@ ccflags-$(CONFIG_PPC_WERROR) += -Werror
>
> ocxl-y += main.o pci.o config.o file.o pasid.o
> ocxl-y += link.o context.o afu_irq.o sysfs.o trace.o
> +ocxl-y += core.o
> obj-$(CONFIG_OCXL) += ocxl.o
>
> # For tracepoints to include our trace.h from tracepoint infrastructure:
> diff --git a/drivers/misc/ocxl/core.c b/drivers/misc/ocxl/core.c
> new file mode 100644
> index 000000000000..1a4411b72d35
> --- /dev/null
> +++ b/drivers/misc/ocxl/core.c
> @@ -0,0 +1,517 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +// Copyright 2019 IBM Corp.
> +#include <linux/idr.h>
> +#include "ocxl_internal.h"
> +
> +static struct ocxl_fn *ocxl_fn_get(struct ocxl_fn *fn)
> +{
> + return (get_device(&fn->dev) == NULL) ? NULL : fn;
> +}
> +
> +static void ocxl_fn_put(struct ocxl_fn *fn)
> +{
> + put_device(&fn->dev);
> +}
> +
> +struct ocxl_afu *ocxl_afu_get(struct ocxl_afu *afu)
> +{
> + return (get_device(&afu->dev) == NULL) ? NULL : afu;
> +}
> +
> +void ocxl_afu_put(struct ocxl_afu *afu)
> +{
> + put_device(&afu->dev);
> +}
> +
> +static struct ocxl_afu *alloc_afu(struct ocxl_fn *fn)
> +{
> + struct ocxl_afu *afu;
> +
> + afu = kzalloc(sizeof(struct ocxl_afu), GFP_KERNEL);
> + if (!afu)
> + return NULL;
> +
> + mutex_init(&afu->contexts_lock);
> + mutex_init(&afu->afu_control_lock);
> + idr_init(&afu->contexts_idr);
> + afu->fn = fn;
> + ocxl_fn_get(fn);
> + return afu;
> +}
> +
> +static void free_afu(struct ocxl_afu *afu)
> +{
> + idr_destroy(&afu->contexts_idr);
> + ocxl_fn_put(afu->fn);
> + kfree(afu);
> +}
> +
> +static void free_afu_dev(struct device *dev)
> +{
> + struct ocxl_afu *afu = to_ocxl_afu(dev);
> +
> + ocxl_unregister_afu(afu);
> + free_afu(afu);
> +}
> +
> +static int set_afu_device(struct ocxl_afu *afu, const char *location)
> +{
> + struct ocxl_fn *fn = afu->fn;
> + int rc;
> +
> + afu->dev.parent = &fn->dev;
> + afu->dev.release = free_afu_dev;
> + rc = dev_set_name(&afu->dev, "%s.%s.%hhu", afu->config.name, location,
> + afu->config.idx);
> + return rc;
> +}
> +
> +static int assign_afu_actag(struct ocxl_afu *afu, struct pci_dev *dev)
> +{
> + struct ocxl_fn *fn = afu->fn;
> + int actag_count, actag_offset;
> +
> + /*
> + * if there were not enough actags for the function, each afu
> + * reduces its count as well
> + */
> + actag_count = afu->config.actag_supported *
> + fn->actag_enabled / fn->actag_supported;
> + actag_offset = ocxl_actag_afu_alloc(fn, actag_count);
> + if (actag_offset < 0) {
> + dev_err(&afu->dev, "Can't allocate %d actags for AFU: %d\n",
> + actag_count, actag_offset);
> + return actag_offset;
> + }
> + afu->actag_base = fn->actag_base + actag_offset;
> + afu->actag_enabled = actag_count;
> +
> + ocxl_config_set_afu_actag(dev, afu->config.dvsec_afu_control_pos,
> + afu->actag_base, afu->actag_enabled);
> + dev_dbg(&afu->dev, "actag base=%d enabled=%d\n",
> + afu->actag_base, afu->actag_enabled);
> + return 0;
> +}
> +
> +static void reclaim_afu_actag(struct ocxl_afu *afu)
> +{
> + struct ocxl_fn *fn = afu->fn;
> + int start_offset, size;
> +
> + start_offset = afu->actag_base - fn->actag_base;
> + size = afu->actag_enabled;
> + ocxl_actag_afu_free(afu->fn, start_offset, size);
> +}
> +
> +static int assign_afu_pasid(struct ocxl_afu *afu, struct pci_dev *dev)
> +{
> + struct ocxl_fn *fn = afu->fn;
> + int pasid_count, pasid_offset;
> +
> + /*
> + * We only support the case where the function configuration
> + * requested enough PASIDs to cover all AFUs.
> + */
> + pasid_count = 1 << afu->config.pasid_supported_log;
> + pasid_offset = ocxl_pasid_afu_alloc(fn, pasid_count);
> + if (pasid_offset < 0) {
> + dev_err(&afu->dev, "Can't allocate %d PASIDs for AFU: %d\n",
> + pasid_count, pasid_offset);
> + return pasid_offset;
> + }
> + afu->pasid_base = fn->pasid_base + pasid_offset;
> + afu->pasid_count = 0;
> + afu->pasid_max = pasid_count;
> +
> + ocxl_config_set_afu_pasid(dev, afu->config.dvsec_afu_control_pos,
> + afu->pasid_base,
> + afu->config.pasid_supported_log);
> + dev_dbg(&afu->dev, "PASID base=%d, enabled=%d\n",
> + afu->pasid_base, pasid_count);
> + return 0;
> +}
> +
> +static void reclaim_afu_pasid(struct ocxl_afu *afu)
> +{
> + struct ocxl_fn *fn = afu->fn;
> + int start_offset, size;
> +
> + start_offset = afu->pasid_base - fn->pasid_base;
> + size = 1 << afu->config.pasid_supported_log;
> + ocxl_pasid_afu_free(afu->fn, start_offset, size);
> +}
> +
> +static int reserve_fn_bar(struct ocxl_fn *fn, int bar)
> +{
> + struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> + int rc, idx;
> +
> + if (bar != 0 && bar != 2 && bar != 4)
> + return -EINVAL;
> +
> + idx = bar >> 1;
> + if (fn->bar_used[idx]++ == 0) {
> + rc = pci_request_region(dev, bar, "ocxl");
> + if (rc)
> + return rc;
> + }
> + return 0;
> +}
> +
> +static void release_fn_bar(struct ocxl_fn *fn, int bar)
> +{
> + struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> + int idx;
> +
> + if (bar != 0 && bar != 2 && bar != 4)
> + return;
> +
> + idx = bar >> 1;
> + if (--fn->bar_used[idx] == 0)
> + pci_release_region(dev, bar);
> + WARN_ON(fn->bar_used[idx] < 0);
> +}
> +
> +static int map_mmio_areas(struct ocxl_afu *afu, struct pci_dev *dev)
> +{
> + int rc;
> +
> + rc = reserve_fn_bar(afu->fn, afu->config.global_mmio_bar);
> + if (rc)
> + return rc;
> +
> + rc = reserve_fn_bar(afu->fn, afu->config.pp_mmio_bar);
> + if (rc) {
> + release_fn_bar(afu->fn, afu->config.global_mmio_bar);
> + return rc;
> + }
> +
> + afu->global_mmio_start =
> + pci_resource_start(dev, afu->config.global_mmio_bar) +
> + afu->config.global_mmio_offset;
> + afu->pp_mmio_start =
> + pci_resource_start(dev, afu->config.pp_mmio_bar) +
> + afu->config.pp_mmio_offset;
> +
> + afu->global_mmio_ptr = ioremap(afu->global_mmio_start,
> + afu->config.global_mmio_size);
> + if (!afu->global_mmio_ptr) {
> + release_fn_bar(afu->fn, afu->config.pp_mmio_bar);
> + release_fn_bar(afu->fn, afu->config.global_mmio_bar);
> + dev_err(&dev->dev, "Error mapping global mmio area\n");
> + return -ENOMEM;
> + }
> +
> + /*
> + * Leave an empty page between the per-process mmio area and
> + * the AFU interrupt mappings
> + */
> + afu->irq_base_offset = afu->config.pp_mmio_stride + PAGE_SIZE;
> + return 0;
> +}
> +
> +static void unmap_mmio_areas(struct ocxl_afu *afu)
> +{
> + if (afu->global_mmio_ptr) {
> + iounmap(afu->global_mmio_ptr);
> + afu->global_mmio_ptr = NULL;
> + }
> + afu->global_mmio_start = 0;
> + afu->pp_mmio_start = 0;
> + release_fn_bar(afu->fn, afu->config.pp_mmio_bar);
> + release_fn_bar(afu->fn, afu->config.global_mmio_bar);
> +}
> +
> +static int configure_afu(struct ocxl_afu *afu, u8 afu_idx, struct pci_dev *dev)
> +{
> + int rc;
> +
> + rc = ocxl_config_read_afu(dev, &afu->fn->config, &afu->config, afu_idx);
> + if (rc)
> + return rc;
> +
> + rc = set_afu_device(afu, dev_name(&dev->dev));
> + if (rc)
> + return rc;
> +
> + rc = assign_afu_actag(afu, dev);
> + if (rc)
> + return rc;
> +
> + rc = assign_afu_pasid(afu, dev);
> + if (rc) {
> + reclaim_afu_actag(afu);
> + return rc;
> + }
> +
> + rc = map_mmio_areas(afu, dev);
> + if (rc) {
> + reclaim_afu_pasid(afu);
> + reclaim_afu_actag(afu);
> + return rc;
> + }
> + return 0;
> +}
> +
> +static void deconfigure_afu(struct ocxl_afu *afu)
> +{
> + unmap_mmio_areas(afu);
> + reclaim_afu_pasid(afu);
> + reclaim_afu_actag(afu);
> +}
> +
> +static int activate_afu(struct pci_dev *dev, struct ocxl_afu *afu)
> +{
> + int rc;
> +
> + ocxl_config_set_afu_state(dev, afu->config.dvsec_afu_control_pos, 1);
> + /*
> + * Char device creation is the last step, as processes can
> + * call our driver immediately, so all our inits must be finished.
> + */
> + rc = ocxl_create_cdev(afu);
> + if (rc)
> + return rc;
> + return 0;
> +}
> +
> +static void deactivate_afu(struct ocxl_afu *afu)
> +{
> + struct pci_dev *dev = to_pci_dev(afu->fn->dev.parent);
> +
> + ocxl_destroy_cdev(afu);
> + ocxl_config_set_afu_state(dev, afu->config.dvsec_afu_control_pos, 0);
> +}
> +
> +int init_afu(struct pci_dev *dev, struct ocxl_fn *fn, u8 afu_idx)
> +{
> + int rc;
> + struct ocxl_afu *afu;
> +
> + afu = alloc_afu(fn);
> + if (!afu)
> + return -ENOMEM;
> +
> + rc = configure_afu(afu, afu_idx, dev);
> + if (rc) {
> + free_afu(afu);
> + return rc;
> + }
> +
> + rc = ocxl_register_afu(afu);
> + if (rc)
> + goto err;
> +
> + rc = ocxl_sysfs_add_afu(afu);
> + if (rc)
> + goto err;
> +
> + rc = activate_afu(dev, afu);
> + if (rc)
> + goto err_sys;
> +
> + list_add_tail(&afu->list, &fn->afu_list);
> + return 0;
> +
> +err_sys:
> + ocxl_sysfs_remove_afu(afu);
> +err:
> + deconfigure_afu(afu);
> + device_unregister(&afu->dev);
> + return rc;
> +}
> +
> +void remove_afu(struct ocxl_afu *afu)
> +{
> + list_del(&afu->list);
> + ocxl_context_detach_all(afu);
> + deactivate_afu(afu);
> + ocxl_sysfs_remove_afu(afu);
> + deconfigure_afu(afu);
> + device_unregister(&afu->dev);
> +}
> +
> +static struct ocxl_fn *alloc_function(struct pci_dev *dev)
> +{
> + struct ocxl_fn *fn;
> +
> + fn = kzalloc(sizeof(struct ocxl_fn), GFP_KERNEL);
> + if (!fn)
> + return NULL;
> +
> + INIT_LIST_HEAD(&fn->afu_list);
> + INIT_LIST_HEAD(&fn->pasid_list);
> + INIT_LIST_HEAD(&fn->actag_list);
> + return fn;
> +}
> +
> +static void free_function(struct ocxl_fn *fn)
> +{
> + WARN_ON(!list_empty(&fn->afu_list));
> + WARN_ON(!list_empty(&fn->pasid_list));
> + kfree(fn);
> +}
> +
> +static void free_function_dev(struct device *dev)
> +{
> + struct ocxl_fn *fn = to_ocxl_function(dev);
> +
> + free_function(fn);
> +}
> +
> +static int set_function_device(struct ocxl_fn *fn, struct pci_dev *dev)
> +{
> + int rc;
> +
> + fn->dev.parent = &dev->dev;
> + fn->dev.release = free_function_dev;
> + rc = dev_set_name(&fn->dev, "ocxlfn.%s", dev_name(&dev->dev));
> + if (rc)
> + return rc;
> + pci_set_drvdata(dev, fn);
> + return 0;
> +}
> +
> +static int assign_function_actag(struct ocxl_fn *fn)
> +{
> + struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> + u16 base, enabled, supported;
> + int rc;
> +
> + rc = ocxl_config_get_actag_info(dev, &base, &enabled, &supported);
> + if (rc)
> + return rc;
> +
> + fn->actag_base = base;
> + fn->actag_enabled = enabled;
> + fn->actag_supported = supported;
> +
> + ocxl_config_set_actag(dev, fn->config.dvsec_function_pos,
> + fn->actag_base, fn->actag_enabled);
> + dev_dbg(&fn->dev, "actag range starting at %d, enabled %d\n",
> + fn->actag_base, fn->actag_enabled);
> + return 0;
> +}
> +
> +static int set_function_pasid(struct ocxl_fn *fn)
> +{
> + struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> + int rc, desired_count, max_count;
> +
> + /* A function may not require any PASID */
> + if (fn->config.max_pasid_log < 0)
> + return 0;
> +
> + rc = ocxl_config_get_pasid_info(dev, &max_count);
> + if (rc)
> + return rc;
> +
> + desired_count = 1 << fn->config.max_pasid_log;
> +
> + if (desired_count > max_count) {
> + dev_err(&fn->dev,
> + "Function requires more PASIDs than is available (%d vs. %d)\n",
> + desired_count, max_count);
> + return -ENOSPC;
> + }
> +
> + fn->pasid_base = 0;
> + return 0;
> +}
> +
> +static int configure_function(struct ocxl_fn *fn, struct pci_dev *dev)
> +{
> + int rc;
> +
> + rc = pci_enable_device(dev);
> + if (rc) {
> + dev_err(&dev->dev, "pci_enable_device failed: %d\n", rc);
> + return rc;
> + }
> +
> + /*
> + * Once it has been confirmed to work on our hardware, we
> + * should reset the function, to force the adapter to restart
> + * from scratch.
> + * A function reset would also reset all its AFUs.
> + *
> + * Some hints for implementation:
> + *
> + * - there's not status bit to know when the reset is done. We
> + * should try reading the config space to know when it's
> + * done.
> + * - probably something like:
> + * Reset
> + * wait 100ms
> + * issue config read
> + * allow device up to 1 sec to return success on config
> + * read before declaring it broken
> + *
> + * Some shared logic on the card (CFG, TLX) won't be reset, so
> + * there's no guarantee that it will be enough.
> + */
> + rc = ocxl_config_read_function(dev, &fn->config);
> + if (rc)
> + return rc;
> +
> + rc = set_function_device(fn, dev);
> + if (rc)
> + return rc;
> +
> + rc = assign_function_actag(fn);
> + if (rc)
> + return rc;
> +
> + rc = set_function_pasid(fn);
> + if (rc)
> + return rc;
> +
> + rc = ocxl_link_setup(dev, 0, &fn->link);
> + if (rc)
> + return rc;
> +
> + rc = ocxl_config_set_TL(dev, fn->config.dvsec_tl_pos);
> + if (rc) {
> + ocxl_link_release(dev, fn->link);
> + return rc;
> + }
> + return 0;
> +}
> +
> +static void deconfigure_function(struct ocxl_fn *fn)
> +{
> + struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> +
> + ocxl_link_release(dev, fn->link);
> + pci_disable_device(dev);
> +}
> +
> +struct ocxl_fn *init_function(struct pci_dev *dev)
> +{
> + struct ocxl_fn *fn;
> + int rc;
> +
> + fn = alloc_function(dev);
> + if (!fn)
> + return ERR_PTR(-ENOMEM);
> +
> + rc = configure_function(fn, dev);
> + if (rc) {
> + free_function(fn);
> + return ERR_PTR(rc);
> + }
> +
> + rc = device_register(&fn->dev);
> + if (rc) {
> + deconfigure_function(fn);
> + put_device(&fn->dev);
> + return ERR_PTR(rc);
> + }
> + return fn;
> +}
> +
> +void remove_function(struct ocxl_fn *fn)
> +{
> + deconfigure_function(fn);
> + device_unregister(&fn->dev);
> +}
> diff --git a/drivers/misc/ocxl/ocxl_internal.h b/drivers/misc/ocxl/ocxl_internal.h
> index 06fd98c989c8..81086534dab5 100644
> --- a/drivers/misc/ocxl/ocxl_internal.h
> +++ b/drivers/misc/ocxl/ocxl_internal.h
> @@ -150,4 +150,9 @@ int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, u64 irq_offset,
> int eventfd);
> u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, u64 irq_offset);
>
> +struct ocxl_fn *init_function(struct pci_dev *dev);
> +void remove_function(struct ocxl_fn *fn);
> +int init_afu(struct pci_dev *dev, struct ocxl_fn *fn, u8 afu_idx);
> +void remove_afu(struct ocxl_afu *afu);
> +
> #endif /* _OCXL_INTERNAL_H_ */
> diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c
> index 21f425472a82..4ed7cb1a667f 100644
> --- a/drivers/misc/ocxl/pci.c
> +++ b/drivers/misc/ocxl/pci.c
> @@ -1,9 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0+
> -// Copyright 2017 IBM Corp.
> +// Copyright 2019 IBM Corp.
> #include <linux/module.h>
> -#include <linux/pci.h>
> -#include <linux/idr.h>
> -#include <asm/pnv-ocxl.h>
> #include "ocxl_internal.h"
>
> /*
> @@ -17,520 +14,6 @@ static const struct pci_device_id ocxl_pci_tbl[] = {
> };
> MODULE_DEVICE_TABLE(pci, ocxl_pci_tbl);
>
> -
> -static struct ocxl_fn *ocxl_fn_get(struct ocxl_fn *fn)
> -{
> - return (get_device(&fn->dev) == NULL) ? NULL : fn;
> -}
> -
> -static void ocxl_fn_put(struct ocxl_fn *fn)
> -{
> - put_device(&fn->dev);
> -}
> -
> -struct ocxl_afu *ocxl_afu_get(struct ocxl_afu *afu)
> -{
> - return (get_device(&afu->dev) == NULL) ? NULL : afu;
> -}
> -
> -void ocxl_afu_put(struct ocxl_afu *afu)
> -{
> - put_device(&afu->dev);
> -}
> -
> -static struct ocxl_afu *alloc_afu(struct ocxl_fn *fn)
> -{
> - struct ocxl_afu *afu;
> -
> - afu = kzalloc(sizeof(struct ocxl_afu), GFP_KERNEL);
> - if (!afu)
> - return NULL;
> -
> - mutex_init(&afu->contexts_lock);
> - mutex_init(&afu->afu_control_lock);
> - idr_init(&afu->contexts_idr);
> - afu->fn = fn;
> - ocxl_fn_get(fn);
> - return afu;
> -}
> -
> -static void free_afu(struct ocxl_afu *afu)
> -{
> - idr_destroy(&afu->contexts_idr);
> - ocxl_fn_put(afu->fn);
> - kfree(afu);
> -}
> -
> -static void free_afu_dev(struct device *dev)
> -{
> - struct ocxl_afu *afu = to_ocxl_afu(dev);
> -
> - ocxl_unregister_afu(afu);
> - free_afu(afu);
> -}
> -
> -static int set_afu_device(struct ocxl_afu *afu, const char *location)
> -{
> - struct ocxl_fn *fn = afu->fn;
> - int rc;
> -
> - afu->dev.parent = &fn->dev;
> - afu->dev.release = free_afu_dev;
> - rc = dev_set_name(&afu->dev, "%s.%s.%hhu", afu->config.name, location,
> - afu->config.idx);
> - return rc;
> -}
> -
> -static int assign_afu_actag(struct ocxl_afu *afu, struct pci_dev *dev)
> -{
> - struct ocxl_fn *fn = afu->fn;
> - int actag_count, actag_offset;
> -
> - /*
> - * if there were not enough actags for the function, each afu
> - * reduces its count as well
> - */
> - actag_count = afu->config.actag_supported *
> - fn->actag_enabled / fn->actag_supported;
> - actag_offset = ocxl_actag_afu_alloc(fn, actag_count);
> - if (actag_offset < 0) {
> - dev_err(&afu->dev, "Can't allocate %d actags for AFU: %d\n",
> - actag_count, actag_offset);
> - return actag_offset;
> - }
> - afu->actag_base = fn->actag_base + actag_offset;
> - afu->actag_enabled = actag_count;
> -
> - ocxl_config_set_afu_actag(dev, afu->config.dvsec_afu_control_pos,
> - afu->actag_base, afu->actag_enabled);
> - dev_dbg(&afu->dev, "actag base=%d enabled=%d\n",
> - afu->actag_base, afu->actag_enabled);
> - return 0;
> -}
> -
> -static void reclaim_afu_actag(struct ocxl_afu *afu)
> -{
> - struct ocxl_fn *fn = afu->fn;
> - int start_offset, size;
> -
> - start_offset = afu->actag_base - fn->actag_base;
> - size = afu->actag_enabled;
> - ocxl_actag_afu_free(afu->fn, start_offset, size);
> -}
> -
> -static int assign_afu_pasid(struct ocxl_afu *afu, struct pci_dev *dev)
> -{
> - struct ocxl_fn *fn = afu->fn;
> - int pasid_count, pasid_offset;
> -
> - /*
> - * We only support the case where the function configuration
> - * requested enough PASIDs to cover all AFUs.
> - */
> - pasid_count = 1 << afu->config.pasid_supported_log;
> - pasid_offset = ocxl_pasid_afu_alloc(fn, pasid_count);
> - if (pasid_offset < 0) {
> - dev_err(&afu->dev, "Can't allocate %d PASIDs for AFU: %d\n",
> - pasid_count, pasid_offset);
> - return pasid_offset;
> - }
> - afu->pasid_base = fn->pasid_base + pasid_offset;
> - afu->pasid_count = 0;
> - afu->pasid_max = pasid_count;
> -
> - ocxl_config_set_afu_pasid(dev, afu->config.dvsec_afu_control_pos,
> - afu->pasid_base,
> - afu->config.pasid_supported_log);
> - dev_dbg(&afu->dev, "PASID base=%d, enabled=%d\n",
> - afu->pasid_base, pasid_count);
> - return 0;
> -}
> -
> -static void reclaim_afu_pasid(struct ocxl_afu *afu)
> -{
> - struct ocxl_fn *fn = afu->fn;
> - int start_offset, size;
> -
> - start_offset = afu->pasid_base - fn->pasid_base;
> - size = 1 << afu->config.pasid_supported_log;
> - ocxl_pasid_afu_free(afu->fn, start_offset, size);
> -}
> -
> -static int reserve_fn_bar(struct ocxl_fn *fn, int bar)
> -{
> - struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> - int rc, idx;
> -
> - if (bar != 0 && bar != 2 && bar != 4)
> - return -EINVAL;
> -
> - idx = bar >> 1;
> - if (fn->bar_used[idx]++ == 0) {
> - rc = pci_request_region(dev, bar, "ocxl");
> - if (rc)
> - return rc;
> - }
> - return 0;
> -}
> -
> -static void release_fn_bar(struct ocxl_fn *fn, int bar)
> -{
> - struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> - int idx;
> -
> - if (bar != 0 && bar != 2 && bar != 4)
> - return;
> -
> - idx = bar >> 1;
> - if (--fn->bar_used[idx] == 0)
> - pci_release_region(dev, bar);
> - WARN_ON(fn->bar_used[idx] < 0);
> -}
> -
> -static int map_mmio_areas(struct ocxl_afu *afu, struct pci_dev *dev)
> -{
> - int rc;
> -
> - rc = reserve_fn_bar(afu->fn, afu->config.global_mmio_bar);
> - if (rc)
> - return rc;
> -
> - rc = reserve_fn_bar(afu->fn, afu->config.pp_mmio_bar);
> - if (rc) {
> - release_fn_bar(afu->fn, afu->config.global_mmio_bar);
> - return rc;
> - }
> -
> - afu->global_mmio_start =
> - pci_resource_start(dev, afu->config.global_mmio_bar) +
> - afu->config.global_mmio_offset;
> - afu->pp_mmio_start =
> - pci_resource_start(dev, afu->config.pp_mmio_bar) +
> - afu->config.pp_mmio_offset;
> -
> - afu->global_mmio_ptr = ioremap(afu->global_mmio_start,
> - afu->config.global_mmio_size);
> - if (!afu->global_mmio_ptr) {
> - release_fn_bar(afu->fn, afu->config.pp_mmio_bar);
> - release_fn_bar(afu->fn, afu->config.global_mmio_bar);
> - dev_err(&dev->dev, "Error mapping global mmio area\n");
> - return -ENOMEM;
> - }
> -
> - /*
> - * Leave an empty page between the per-process mmio area and
> - * the AFU interrupt mappings
> - */
> - afu->irq_base_offset = afu->config.pp_mmio_stride + PAGE_SIZE;
> - return 0;
> -}
> -
> -static void unmap_mmio_areas(struct ocxl_afu *afu)
> -{
> - if (afu->global_mmio_ptr) {
> - iounmap(afu->global_mmio_ptr);
> - afu->global_mmio_ptr = NULL;
> - }
> - afu->global_mmio_start = 0;
> - afu->pp_mmio_start = 0;
> - release_fn_bar(afu->fn, afu->config.pp_mmio_bar);
> - release_fn_bar(afu->fn, afu->config.global_mmio_bar);
> -}
> -
> -static int configure_afu(struct ocxl_afu *afu, u8 afu_idx, struct pci_dev *dev)
> -{
> - int rc;
> -
> - rc = ocxl_config_read_afu(dev, &afu->fn->config, &afu->config, afu_idx);
> - if (rc)
> - return rc;
> -
> - rc = set_afu_device(afu, dev_name(&dev->dev));
> - if (rc)
> - return rc;
> -
> - rc = assign_afu_actag(afu, dev);
> - if (rc)
> - return rc;
> -
> - rc = assign_afu_pasid(afu, dev);
> - if (rc) {
> - reclaim_afu_actag(afu);
> - return rc;
> - }
> -
> - rc = map_mmio_areas(afu, dev);
> - if (rc) {
> - reclaim_afu_pasid(afu);
> - reclaim_afu_actag(afu);
> - return rc;
> - }
> - return 0;
> -}
> -
> -static void deconfigure_afu(struct ocxl_afu *afu)
> -{
> - unmap_mmio_areas(afu);
> - reclaim_afu_pasid(afu);
> - reclaim_afu_actag(afu);
> -}
> -
> -static int activate_afu(struct pci_dev *dev, struct ocxl_afu *afu)
> -{
> - int rc;
> -
> - ocxl_config_set_afu_state(dev, afu->config.dvsec_afu_control_pos, 1);
> - /*
> - * Char device creation is the last step, as processes can
> - * call our driver immediately, so all our inits must be finished.
> - */
> - rc = ocxl_create_cdev(afu);
> - if (rc)
> - return rc;
> - return 0;
> -}
> -
> -static void deactivate_afu(struct ocxl_afu *afu)
> -{
> - struct pci_dev *dev = to_pci_dev(afu->fn->dev.parent);
> -
> - ocxl_destroy_cdev(afu);
> - ocxl_config_set_afu_state(dev, afu->config.dvsec_afu_control_pos, 0);
> -}
> -
> -static int init_afu(struct pci_dev *dev, struct ocxl_fn *fn, u8 afu_idx)
> -{
> - int rc;
> - struct ocxl_afu *afu;
> -
> - afu = alloc_afu(fn);
> - if (!afu)
> - return -ENOMEM;
> -
> - rc = configure_afu(afu, afu_idx, dev);
> - if (rc) {
> - free_afu(afu);
> - return rc;
> - }
> -
> - rc = ocxl_register_afu(afu);
> - if (rc)
> - goto err;
> -
> - rc = ocxl_sysfs_add_afu(afu);
> - if (rc)
> - goto err;
> -
> - rc = activate_afu(dev, afu);
> - if (rc)
> - goto err_sys;
> -
> - list_add_tail(&afu->list, &fn->afu_list);
> - return 0;
> -
> -err_sys:
> - ocxl_sysfs_remove_afu(afu);
> -err:
> - deconfigure_afu(afu);
> - device_unregister(&afu->dev);
> - return rc;
> -}
> -
> -static void remove_afu(struct ocxl_afu *afu)
> -{
> - list_del(&afu->list);
> - ocxl_context_detach_all(afu);
> - deactivate_afu(afu);
> - ocxl_sysfs_remove_afu(afu);
> - deconfigure_afu(afu);
> - device_unregister(&afu->dev);
> -}
> -
> -static struct ocxl_fn *alloc_function(struct pci_dev *dev)
> -{
> - struct ocxl_fn *fn;
> -
> - fn = kzalloc(sizeof(struct ocxl_fn), GFP_KERNEL);
> - if (!fn)
> - return NULL;
> -
> - INIT_LIST_HEAD(&fn->afu_list);
> - INIT_LIST_HEAD(&fn->pasid_list);
> - INIT_LIST_HEAD(&fn->actag_list);
> - return fn;
> -}
> -
> -static void free_function(struct ocxl_fn *fn)
> -{
> - WARN_ON(!list_empty(&fn->afu_list));
> - WARN_ON(!list_empty(&fn->pasid_list));
> - kfree(fn);
> -}
> -
> -static void free_function_dev(struct device *dev)
> -{
> - struct ocxl_fn *fn = to_ocxl_function(dev);
> -
> - free_function(fn);
> -}
> -
> -static int set_function_device(struct ocxl_fn *fn, struct pci_dev *dev)
> -{
> - int rc;
> -
> - fn->dev.parent = &dev->dev;
> - fn->dev.release = free_function_dev;
> - rc = dev_set_name(&fn->dev, "ocxlfn.%s", dev_name(&dev->dev));
> - if (rc)
> - return rc;
> - pci_set_drvdata(dev, fn);
> - return 0;
> -}
> -
> -static int assign_function_actag(struct ocxl_fn *fn)
> -{
> - struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> - u16 base, enabled, supported;
> - int rc;
> -
> - rc = ocxl_config_get_actag_info(dev, &base, &enabled, &supported);
> - if (rc)
> - return rc;
> -
> - fn->actag_base = base;
> - fn->actag_enabled = enabled;
> - fn->actag_supported = supported;
> -
> - ocxl_config_set_actag(dev, fn->config.dvsec_function_pos,
> - fn->actag_base, fn->actag_enabled);
> - dev_dbg(&fn->dev, "actag range starting at %d, enabled %d\n",
> - fn->actag_base, fn->actag_enabled);
> - return 0;
> -}
> -
> -static int set_function_pasid(struct ocxl_fn *fn)
> -{
> - struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> - int rc, desired_count, max_count;
> -
> - /* A function may not require any PASID */
> - if (fn->config.max_pasid_log < 0)
> - return 0;
> -
> - rc = ocxl_config_get_pasid_info(dev, &max_count);
> - if (rc)
> - return rc;
> -
> - desired_count = 1 << fn->config.max_pasid_log;
> -
> - if (desired_count > max_count) {
> - dev_err(&fn->dev,
> - "Function requires more PASIDs than is available (%d vs. %d)\n",
> - desired_count, max_count);
> - return -ENOSPC;
> - }
> -
> - fn->pasid_base = 0;
> - return 0;
> -}
> -
> -static int configure_function(struct ocxl_fn *fn, struct pci_dev *dev)
> -{
> - int rc;
> -
> - rc = pci_enable_device(dev);
> - if (rc) {
> - dev_err(&dev->dev, "pci_enable_device failed: %d\n", rc);
> - return rc;
> - }
> -
> - /*
> - * Once it has been confirmed to work on our hardware, we
> - * should reset the function, to force the adapter to restart
> - * from scratch.
> - * A function reset would also reset all its AFUs.
> - *
> - * Some hints for implementation:
> - *
> - * - there's not status bit to know when the reset is done. We
> - * should try reading the config space to know when it's
> - * done.
> - * - probably something like:
> - * Reset
> - * wait 100ms
> - * issue config read
> - * allow device up to 1 sec to return success on config
> - * read before declaring it broken
> - *
> - * Some shared logic on the card (CFG, TLX) won't be reset, so
> - * there's no guarantee that it will be enough.
> - */
> - rc = ocxl_config_read_function(dev, &fn->config);
> - if (rc)
> - return rc;
> -
> - rc = set_function_device(fn, dev);
> - if (rc)
> - return rc;
> -
> - rc = assign_function_actag(fn);
> - if (rc)
> - return rc;
> -
> - rc = set_function_pasid(fn);
> - if (rc)
> - return rc;
> -
> - rc = ocxl_link_setup(dev, 0, &fn->link);
> - if (rc)
> - return rc;
> -
> - rc = ocxl_config_set_TL(dev, fn->config.dvsec_tl_pos);
> - if (rc) {
> - ocxl_link_release(dev, fn->link);
> - return rc;
> - }
> - return 0;
> -}
> -
> -static void deconfigure_function(struct ocxl_fn *fn)
> -{
> - struct pci_dev *dev = to_pci_dev(fn->dev.parent);
> -
> - ocxl_link_release(dev, fn->link);
> - pci_disable_device(dev);
> -}
> -
> -static struct ocxl_fn *init_function(struct pci_dev *dev)
> -{
> - struct ocxl_fn *fn;
> - int rc;
> -
> - fn = alloc_function(dev);
> - if (!fn)
> - return ERR_PTR(-ENOMEM);
> -
> - rc = configure_function(fn, dev);
> - if (rc) {
> - free_function(fn);
> - return ERR_PTR(rc);
> - }
> -
> - rc = device_register(&fn->dev);
> - if (rc) {
> - deconfigure_function(fn);
> - put_device(&fn->dev);
> - return ERR_PTR(rc);
> - }
> - return fn;
> -}
> -
> -static void remove_function(struct ocxl_fn *fn)
> -{
> - deconfigure_function(fn);
> - device_unregister(&fn->dev);
> -}
> -
> static int ocxl_probe(struct pci_dev *dev, const struct pci_device_id *id)
> {
> int rc, afu_count = 0;
>
^ permalink raw reply
* Re: [PATCH v5 10/10] powerpc/mm: Detect bad KUAP faults
From: Michael Ellerman @ 2019-04-17 13:17 UTC (permalink / raw)
To: christophe leroy, linuxppc-dev; +Cc: npiggin
In-Reply-To: <8d24e5eb-7313-73d3-fd25-ec9e73e7abfc@c-s.fr>
christophe leroy <christophe.leroy@c-s.fr> writes:
> Le 08/03/2019 à 09:53, Christophe Leroy a écrit :
>> Le 08/03/2019 à 02:16, Michael Ellerman a écrit :
...
>>> diff --git a/arch/powerpc/include/asm/book3s/64/kup-radix.h
>>> b/arch/powerpc/include/asm/book3s/64/kup-radix.h
>>> index 3d60b04fc3f6..8d2ddc61e92e 100644
>>> --- a/arch/powerpc/include/asm/book3s/64/kup-radix.h
>>> +++ b/arch/powerpc/include/asm/book3s/64/kup-radix.h
>>> @@ -100,6 +100,18 @@ static inline void prevent_user_access(void
>>> __user *to, const void __user *from,
>>> set_kuap(AMR_KUAP_BLOCKED);
>>> }
>>> +static inline bool bad_kuap_fault(struct pt_regs *regs, bool is_write)
>>> +{
>>> + if (mmu_has_feature(MMU_FTR_RADIX_KUAP) &&
>>> + ((is_write && (regs->kuap & AMR_KUAP_BLOCK_WRITE)) ||
>>> + (!is_write && (regs->kuap & AMR_KUAP_BLOCK_READ))))
>>> + {
>>
>> Should this { go on the previous line ?
>>
>>> + WARN(true, "Bug: %s fault blocked by AMR!", is_write ?
>>> "Write" : "Read");
>>> + return true;
>>
>> Could just be
>> return WARN(true, ....)
>>
>> Or even
>> return WARN(mmu_has_feature(MMU_FTR_RADIX_KUAP) &&
>> ((is_write && (regs->kuap & AMR_KUAP_BLOCK_WRITE)) ||
>> (!is_write && (regs->kuap & AMR_KUAP_BLOCK_READ))), ...);
>
> Could also be simplified as follows since (is_write && ...) and
> (!is_write && ...) are mutually exclusive:
>
> mmu_has_feature(MMU_FTR_RADIX_KUAP) &&
> (regs->kuap & (is_write ? AMR_KUAP_BLOCK_WRITE : AMR_KUAP_BLOCK_READ))
Yeah I guess that is better.
I'll do:
static inline bool bad_kuap_fault(struct pt_regs *regs, bool is_write)
{
return WARN(mmu_has_feature(MMU_FTR_RADIX_KUAP) &&
(regs->kuap & (is_write ? AMR_KUAP_BLOCK_WRITE : AMR_KUAP_BLOCK_READ)),
"Bug: %s fault blocked by AMR!", is_write ? "Write" : "Read");
}
cheers
^ permalink raw reply
* Re: [PATCH v5 10/10] powerpc/mm: Detect bad KUAP faults
From: Michael Ellerman @ 2019-04-17 13:12 UTC (permalink / raw)
To: Christophe Leroy, linuxppc-dev; +Cc: npiggin
In-Reply-To: <f1332a90-4404-8226-baae-f586c3f21fbb@c-s.fr>
Christophe Leroy <christophe.leroy@c-s.fr> writes:
> Le 08/03/2019 à 02:16, Michael Ellerman a écrit :
>> When KUAP is enabled we have logic to detect page faults that occur
>> outside of a valid user access region and are blocked by the AMR.
>>
>> What we don't have at the moment is logic to detect a fault *within* a
>> valid user access region, that has been incorrectly blocked by AMR.
>> This is not meant to ever happen, but it can if we incorrectly
>> save/restore the AMR, or if the AMR was overwritten for some other
>> reason.
>>
>> Currently if that happens we assume it's just a regular fault that
>> will be corrected by handling the fault normally, so we just return.
>> But there is nothing the fault handling code can do to fix it, so the
>> fault just happens again and we spin forever, leading to soft lockups.
>>
>> So add some logic to detect that case and WARN() if we ever see it.
>> Arguably it should be a BUG(), but it's more polite to fail the access
>> and let the kernel continue, rather than taking down the box. There
>> should be no data integrity issue with failing the fault rather than
>> BUG'ing, as we're just going to disallow an access that should have
>> been allowed.
>>
>> To make the code a little easier to follow, unroll the condition at
>> the end of bad_kernel_fault() and comment each case, before adding the
>> call to bad_kuap_fault().
>>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>> ---
>>
>> v5: New.
>>
>> .../powerpc/include/asm/book3s/64/kup-radix.h | 12 +++++++++
>> arch/powerpc/include/asm/kup.h | 1 +
>> arch/powerpc/mm/fault.c | 25 ++++++++++++++++---
>> 3 files changed, 35 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/book3s/64/kup-radix.h b/arch/powerpc/include/asm/book3s/64/kup-radix.h
>> index 3d60b04fc3f6..8d2ddc61e92e 100644
>> --- a/arch/powerpc/include/asm/book3s/64/kup-radix.h
>> +++ b/arch/powerpc/include/asm/book3s/64/kup-radix.h
>> @@ -100,6 +100,18 @@ static inline void prevent_user_access(void __user *to, const void __user *from,
>> set_kuap(AMR_KUAP_BLOCKED);
>> }
>>
>> +static inline bool bad_kuap_fault(struct pt_regs *regs, bool is_write)
>> +{
>> + if (mmu_has_feature(MMU_FTR_RADIX_KUAP) &&
>> + ((is_write && (regs->kuap & AMR_KUAP_BLOCK_WRITE)) ||
>> + (!is_write && (regs->kuap & AMR_KUAP_BLOCK_READ)))) {
>
> Should this { go on the previous line ?
Yeah I guess.
>> + WARN(true, "Bug: %s fault blocked by AMR!", is_write ? "Write" : "Read");
>> + return true;
>
> Could just be
> return WARN(true, ....)
>
> Or even
> return WARN(mmu_has_feature(MMU_FTR_RADIX_KUAP) &&
> ((is_write && (regs->kuap & AMR_KUAP_BLOCK_WRITE)) ||
> (!is_write && (regs->kuap & AMR_KUAP_BLOCK_READ))), ...);
That's not any more readable IMO.
>> diff --git a/arch/powerpc/include/asm/kup.h b/arch/powerpc/include/asm/kup.h
>> index f79d4d970852..ccbd2a249575 100644
>> --- a/arch/powerpc/include/asm/kup.h
>> +++ b/arch/powerpc/include/asm/kup.h
>> @@ -28,6 +28,7 @@ static inline void prevent_user_access(void __user *to, const void __user *from,
>> unsigned long size) { }
>> static inline void allow_read_from_user(const void __user *from, unsigned long size) {}
>> static inline void allow_write_to_user(void __user *to, unsigned long size) {}
>> +static inline bool bad_kuap_fault(struct pt_regs *regs, bool is_write) { return false; }
>> #endif /* CONFIG_PPC_KUAP */
>>
>> static inline void prevent_read_from_user(const void __user *from, unsigned long size)
>> diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
>> index 463d1e9d026e..b5d3578d9f65 100644
>> --- a/arch/powerpc/mm/fault.c
>> +++ b/arch/powerpc/mm/fault.c
>> @@ -224,7 +225,7 @@ static int mm_fault_error(struct pt_regs *regs, unsigned long addr,
>>
>> /* Is this a bad kernel fault ? */
>> static bool bad_kernel_fault(struct pt_regs *regs, unsigned long error_code,
>> - unsigned long address)
>> + unsigned long address, bool is_write)
>
> We have regs, do we need is_write in addition ?
It comes from error_code, which we also have. But I don't see any harm
passing it as we already have it calculated and sitting in a GPR.
cheers
^ permalink raw reply
* [PATCH v3 6/6] powerc/mm/hash: Reduce hash_mm_context size
From: Aneesh Kumar K.V @ 2019-04-17 13:03 UTC (permalink / raw)
To: npiggin, paulus, mpe, Christophe Leroy; +Cc: Aneesh Kumar K.V, linuxppc-dev
In-Reply-To: <20190417130351.3805-1-aneesh.kumar@linux.ibm.com>
Allocate subpage protect related variables only if we use the feature.
This helps in reducing the hash related mm context struct by around 4K
Before the patch
sizeof(struct hash_mm_context) = 8288
After the patch
sizeof(struct hash_mm_context) = 4160
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 4 +--
arch/powerpc/include/asm/book3s/64/mmu.h | 2 +-
arch/powerpc/mm/hash_utils_64.c | 3 ++
arch/powerpc/mm/mmu_context_book3s64.c | 17 +++++++++--
arch/powerpc/mm/subpage-prot.c | 28 ++++++++++++++-----
5 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index 4481bedbb5be..eeb40091b46b 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -687,10 +687,8 @@ struct subpage_prot_table {
#define SBP_L3_SHIFT (SBP_L2_SHIFT + SBP_L2_BITS)
extern void subpage_prot_free(struct mm_struct *mm);
-extern void subpage_prot_init_new_context(struct mm_struct *mm);
#else
static inline void subpage_prot_free(struct mm_struct *mm) {}
-static inline void subpage_prot_init_new_context(struct mm_struct *mm) { }
#endif /* CONFIG_PPC_SUBPAGE_PROT */
/*
@@ -720,7 +718,7 @@ struct hash_mm_context {
#endif
#ifdef CONFIG_PPC_SUBPAGE_PROT
- struct subpage_prot_table spt;
+ struct subpage_prot_table *spt;
#endif /* CONFIG_PPC_SUBPAGE_PROT */
};
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index 3bc94baf5ed5..62ae73df93d2 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -191,7 +191,7 @@ static inline struct slice_mask *mm_ctx_slice_mask_16g(mm_context_t *ctx)
#ifdef CONFIG_PPC_SUBPAGE_PROT
static inline struct subpage_prot_table *mm_ctx_subpage_prot(mm_context_t *ctx)
{
- return &ctx->hash_context->spt;
+ return ctx->hash_context->spt;
}
#endif
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 04ac7c36d380..33bd4a1b4d75 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -1155,6 +1155,9 @@ static int subpage_protection(struct mm_struct *mm, unsigned long ea)
u32 spp = 0;
u32 **sbpm, *sbpp;
+ if (!spt)
+ return 0;
+
if (ea >= spt->maxaddr)
return 0;
if (ea < 0x100000000UL) {
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c
index 6eef5a36b2e9..cb2b08635508 100644
--- a/arch/powerpc/mm/mmu_context_book3s64.c
+++ b/arch/powerpc/mm/mmu_context_book3s64.c
@@ -63,7 +63,8 @@ static int hash__init_new_context(struct mm_struct *mm)
if (index < 0)
return index;
- mm->context.hash_context = kmalloc(sizeof(struct hash_mm_context), GFP_KERNEL);
+ mm->context.hash_context = kmalloc(sizeof(struct hash_mm_context),
+ GFP_KERNEL);
if (!mm->context.hash_context) {
ida_free(&mmu_context_ida, index);
return -ENOMEM;
@@ -89,11 +90,21 @@ static int hash__init_new_context(struct mm_struct *mm)
} else {
/* This is fork. Copy hash_context details from current->mm */
memcpy(mm->context.hash_context, current->mm->context.hash_context, sizeof(struct hash_mm_context));
+#ifdef CONFIG_PPC_SUBPAGE_PROT
+ /* inherit subpage prot detalis if we have one. */
+ if (current->mm->context.hash_context->spt) {
+ mm->context.hash_context->spt = kmalloc(sizeof(struct subpage_prot_table),
+ GFP_KERNEL);
+ if (!mm->context.hash_context->spt) {
+ ida_free(&mmu_context_ida, index);
+ kfree(mm->context.hash_context);
+ return -ENOMEM;
+ }
+ }
+#endif
}
- subpage_prot_init_new_context(mm);
-
pkey_mm_init(mm);
return index;
}
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c
index c72252542210..c9dff4e1f295 100644
--- a/arch/powerpc/mm/subpage-prot.c
+++ b/arch/powerpc/mm/subpage-prot.c
@@ -29,6 +29,9 @@ void subpage_prot_free(struct mm_struct *mm)
unsigned long i, j, addr;
u32 **p;
+ if (!spt)
+ return;
+
for (i = 0; i < 4; ++i) {
if (spt->low_prot[i]) {
free_page((unsigned long)spt->low_prot[i]);
@@ -48,13 +51,7 @@ void subpage_prot_free(struct mm_struct *mm)
free_page((unsigned long)p);
}
spt->maxaddr = 0;
-}
-
-void subpage_prot_init_new_context(struct mm_struct *mm)
-{
- struct subpage_prot_table *spt = mm_ctx_subpage_prot(&mm->context);
-
- memset(spt, 0, sizeof(*spt));
+ kfree(spt);
}
static void hpte_flush_range(struct mm_struct *mm, unsigned long addr,
@@ -99,6 +96,9 @@ static void subpage_prot_clear(unsigned long addr, unsigned long len)
size_t nw;
unsigned long next, limit;
+ if (!spt)
+ return ;
+
down_write(&mm->mmap_sem);
limit = addr + len;
if (limit > spt->maxaddr)
@@ -218,6 +218,20 @@ SYSCALL_DEFINE3(subpage_prot, unsigned long, addr,
return -EFAULT;
down_write(&mm->mmap_sem);
+
+ if (!spt) {
+ /*
+ * Allocate subpage prot table if not already done.
+ * Do this with mmap_sem held
+ */
+ spt = kzalloc(sizeof(struct subpage_prot_table), GFP_KERNEL);
+ if (!spt) {
+ err = -ENOMEM;
+ goto out;
+ }
+ mm->context.hash_context->spt = spt;
+ }
+
subpage_mark_vma_nohuge(mm, addr, len);
for (limit = addr + len; addr < limit; addr = next) {
next = pmd_addr_end(addr, limit);
--
2.20.1
^ permalink raw reply related
* [PATCH v3 5/6] powerpc/mm: Reduce memory usage for mm_context_t for radix
From: Aneesh Kumar K.V @ 2019-04-17 13:03 UTC (permalink / raw)
To: npiggin, paulus, mpe, Christophe Leroy; +Cc: Aneesh Kumar K.V, linuxppc-dev
In-Reply-To: <20190417130351.3805-1-aneesh.kumar@linux.ibm.com>
Currently, our mm_context_t on book3s64 include all hash specific
context details like slice mask and subpage protection details. We
can skip allocating these with radix translation. This will help us to save
8K per mm_context with radix translation.
With the patch applied we have
sizeof(mm_context_t) = 136
sizeof(struct hash_mm_context) = 8288
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 33 ++++++++++++-
arch/powerpc/include/asm/book3s/64/mmu.h | 49 +++++--------------
arch/powerpc/kernel/setup-common.c | 6 +++
arch/powerpc/mm/hash_utils_64.c | 4 +-
arch/powerpc/mm/mmu_context_book3s64.c | 16 +++++-
5 files changed, 68 insertions(+), 40 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index eb36fbfe4ef5..4481bedbb5be 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -658,7 +658,7 @@ extern void slb_set_size(u16 size);
/* 4 bits per slice and we have one slice per 1TB */
#define SLICE_ARRAY_SIZE (H_PGTABLE_RANGE >> 41)
#define LOW_SLICE_ARRAY_SZ (BITS_PER_LONG / BITS_PER_BYTE)
-#define TASK_SLICE_ARRAY_SZ(x) ((x)->slb_addr_limit >> 41)
+#define TASK_SLICE_ARRAY_SZ(x) ((x)->hash_context->slb_addr_limit >> 41)
#ifndef __ASSEMBLY__
#ifdef CONFIG_PPC_SUBPAGE_PROT
@@ -693,6 +693,37 @@ static inline void subpage_prot_free(struct mm_struct *mm) {}
static inline void subpage_prot_init_new_context(struct mm_struct *mm) { }
#endif /* CONFIG_PPC_SUBPAGE_PROT */
+/*
+ * One bit per slice. We have lower slices which cover 256MB segments
+ * upto 4G range. That gets us 16 low slices. For the rest we track slices
+ * in 1TB size.
+ */
+struct slice_mask {
+ u64 low_slices;
+ DECLARE_BITMAP(high_slices, SLICE_NUM_HIGH);
+};
+
+struct hash_mm_context {
+ u16 user_psize; /* page size index */
+
+ /* SLB page size encodings*/
+ unsigned char low_slices_psize[LOW_SLICE_ARRAY_SZ];
+ unsigned char high_slices_psize[SLICE_ARRAY_SIZE];
+ unsigned long slb_addr_limit;
+#ifdef CONFIG_PPC_64K_PAGES
+ struct slice_mask mask_64k;
+#endif
+ struct slice_mask mask_4k;
+#ifdef CONFIG_HUGETLB_PAGE
+ struct slice_mask mask_16m;
+ struct slice_mask mask_16g;
+#endif
+
+#ifdef CONFIG_PPC_SUBPAGE_PROT
+ struct subpage_prot_table spt;
+#endif /* CONFIG_PPC_SUBPAGE_PROT */
+};
+
#if 0
/*
* The code below is equivalent to this function for arguments
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index 28213a36fef7..3bc94baf5ed5 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -89,16 +89,6 @@ struct spinlock;
/* Maximum possible number of NPUs in a system. */
#define NV_MAX_NPUS 8
-/*
- * One bit per slice. We have lower slices which cover 256MB segments
- * upto 4G range. That gets us 16 low slices. For the rest we track slices
- * in 1TB size.
- */
-struct slice_mask {
- u64 low_slices;
- DECLARE_BITMAP(high_slices, SLICE_NUM_HIGH);
-};
-
typedef struct {
union {
/*
@@ -112,7 +102,6 @@ typedef struct {
mm_context_id_t id;
mm_context_id_t extended_id[TASK_SIZE_USER64/TASK_CONTEXT_SIZE];
};
- u16 user_psize; /* page size index */
/* Number of bits in the mm_cpumask */
atomic_t active_cpus;
@@ -122,23 +111,9 @@ typedef struct {
/* NPU NMMU context */
struct npu_context *npu_context;
+ struct hash_mm_context *hash_context;
- /* SLB page size encodings*/
- unsigned char low_slices_psize[LOW_SLICE_ARRAY_SZ];
- unsigned char high_slices_psize[SLICE_ARRAY_SIZE];
- unsigned long slb_addr_limit;
-# ifdef CONFIG_PPC_64K_PAGES
- struct slice_mask mask_64k;
-# endif
- struct slice_mask mask_4k;
-# ifdef CONFIG_HUGETLB_PAGE
- struct slice_mask mask_16m;
- struct slice_mask mask_16g;
-# endif
unsigned long vdso_base;
-#ifdef CONFIG_PPC_SUBPAGE_PROT
- struct subpage_prot_table spt;
-#endif /* CONFIG_PPC_SUBPAGE_PROT */
/*
* pagetable fragment support
*/
@@ -161,62 +136,62 @@ typedef struct {
static inline u16 mm_ctx_user_psize(mm_context_t *ctx)
{
- return ctx->user_psize;
+ return ctx->hash_context->user_psize;
}
static inline void mm_ctx_set_user_psize(mm_context_t *ctx, u16 user_psize)
{
- ctx->user_psize = user_psize;
+ ctx->hash_context->user_psize = user_psize;
}
static inline unsigned char *mm_ctx_low_slices(mm_context_t *ctx)
{
- return ctx->low_slices_psize;
+ return ctx->hash_context->low_slices_psize;
}
static inline unsigned char *mm_ctx_high_slices(mm_context_t *ctx)
{
- return ctx->high_slices_psize;
+ return ctx->hash_context->high_slices_psize;
}
static inline unsigned long mm_ctx_slb_addr_limit(mm_context_t *ctx)
{
- return ctx->slb_addr_limit;
+ return ctx->hash_context->slb_addr_limit;
}
static inline void mm_ctx_set_slb_addr_limit(mm_context_t *ctx, unsigned long limit)
{
- ctx->slb_addr_limit = limit;
+ ctx->hash_context->slb_addr_limit = limit;
}
#ifdef CONFIG_PPC_64K_PAGES
static inline struct slice_mask *mm_ctx_slice_mask_64k(mm_context_t *ctx)
{
- return &ctx->mask_64k;
+ return &ctx->hash_context->mask_64k;
}
#endif
static inline struct slice_mask *mm_ctx_slice_mask_4k(mm_context_t *ctx)
{
- return &ctx->mask_4k;
+ return &ctx->hash_context->mask_4k;
}
#ifdef CONFIG_HUGETLB_PAGE
static inline struct slice_mask *mm_ctx_slice_mask_16m(mm_context_t *ctx)
{
- return &ctx->mask_16m;
+ return &ctx->hash_context->mask_16m;
}
static inline struct slice_mask *mm_ctx_slice_mask_16g(mm_context_t *ctx)
{
- return &ctx->mask_16g;
+ return &ctx->hash_context->mask_16g;
}
#endif
#ifdef CONFIG_PPC_SUBPAGE_PROT
static inline struct subpage_prot_table *mm_ctx_subpage_prot(mm_context_t *ctx)
{
- return &ctx->spt;
+ return &ctx->hash_context->spt;
}
#endif
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index a07de8608484..21b1ce200b22 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -947,6 +947,12 @@ void __init setup_arch(char **cmdline_p)
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = klimit;
+#ifdef CONFIG_PPC_MM_SLICES
+#if defined(CONFIG_PPC_8xx)
+ init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW;
+#endif
+#endif
+
#ifdef CONFIG_SPAPR_TCE_IOMMU
mm_iommu_init(&init_mm);
#endif
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 2cb3a456f5b5..04ac7c36d380 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -968,6 +968,7 @@ void __init hash__early_init_devtree(void)
htab_scan_page_sizes();
}
+struct hash_mm_context init_hash_mm_context;
void __init hash__early_init_mmu(void)
{
#ifndef CONFIG_PPC_64K_PAGES
@@ -1041,7 +1042,8 @@ void __init hash__early_init_mmu(void)
*/
htab_initialize();
- init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
+ init_mm.context.hash_context = &init_hash_mm_context;
+ init_mm.context.hash_context->slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
pr_info("Initializing hash mmu with SLB\n");
/* Initialize SLB management */
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c
index f720c5cc0b5e..6eef5a36b2e9 100644
--- a/arch/powerpc/mm/mmu_context_book3s64.c
+++ b/arch/powerpc/mm/mmu_context_book3s64.c
@@ -63,6 +63,12 @@ static int hash__init_new_context(struct mm_struct *mm)
if (index < 0)
return index;
+ mm->context.hash_context = kmalloc(sizeof(struct hash_mm_context), GFP_KERNEL);
+ if (!mm->context.hash_context) {
+ ida_free(&mmu_context_ida, index);
+ return -ENOMEM;
+ }
+
/*
* The old code would re-promote on fork, we don't do that when using
* slices as it could cause problem promoting slices that have been
@@ -77,8 +83,14 @@ static int hash__init_new_context(struct mm_struct *mm)
* We should not be calling init_new_context() on init_mm. Hence a
* check against 0 is OK.
*/
- if (mm->context.id == 0)
+ if (mm->context.id == 0) {
+ memset(mm->context.hash_context, 0, sizeof(struct hash_mm_context));
slice_init_new_context_exec(mm);
+ } else {
+ /* This is fork. Copy hash_context details from current->mm */
+ memcpy(mm->context.hash_context, current->mm->context.hash_context, sizeof(struct hash_mm_context));
+
+ }
subpage_prot_init_new_context(mm);
@@ -118,6 +130,7 @@ static int radix__init_new_context(struct mm_struct *mm)
asm volatile("ptesync;isync" : : : "memory");
mm->context.npu_context = NULL;
+ mm->context.hash_context = NULL;
return index;
}
@@ -162,6 +175,7 @@ static void destroy_contexts(mm_context_t *ctx)
if (context_id)
ida_free(&mmu_context_ida, context_id);
}
+ kfree(ctx->hash_context);
}
static void pmd_frag_destroy(void *pmd_frag)
--
2.20.1
^ permalink raw reply related
* [PATCH v3 4/6] powerpc/mm: Move slb_addr_linit to early_init_mmu
From: Aneesh Kumar K.V @ 2019-04-17 13:03 UTC (permalink / raw)
To: npiggin, paulus, mpe, Christophe Leroy; +Cc: Aneesh Kumar K.V, linuxppc-dev
In-Reply-To: <20190417130351.3805-1-aneesh.kumar@linux.ibm.com>
Avoid #ifdef in generic code. Also enables us to do this specific to
MMU translation mode on book3s64
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
arch/powerpc/kernel/setup-common.c | 11 -----------
arch/powerpc/mm/hash_utils_64.c | 2 ++
arch/powerpc/mm/tlb_nohash.c | 6 ++++++
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 2e5dfb6e0823..a07de8608484 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -947,17 +947,6 @@ void __init setup_arch(char **cmdline_p)
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = klimit;
-#ifdef CONFIG_PPC_MM_SLICES
-#ifdef CONFIG_PPC64
- if (!radix_enabled())
- init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
-#elif defined(CONFIG_PPC_8xx)
- init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW;
-#else
-#error "context.addr_limit not initialized."
-#endif
-#endif
-
#ifdef CONFIG_SPAPR_TCE_IOMMU
mm_iommu_init(&init_mm);
#endif
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 5a2bd132f92e..2cb3a456f5b5 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -1041,6 +1041,8 @@ void __init hash__early_init_mmu(void)
*/
htab_initialize();
+ init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
+
pr_info("Initializing hash mmu with SLB\n");
/* Initialize SLB management */
slb_initialize();
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index ac23dc1c6535..088e0a6b5ade 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -800,5 +800,11 @@ void __init early_init_mmu(void)
#ifdef CONFIG_PPC_47x
early_init_mmu_47x();
#endif
+
+#ifdef CONFIG_PPC_MM_SLICES
+#if defined(CONFIG_PPC_8xx)
+ init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW;
+#endif
+#endif
}
#endif /* CONFIG_PPC64 */
--
2.20.1
^ permalink raw reply related
* [PATCH v3 3/6] powerpc/mm: Add helpers for accessing hash translation related variables
From: Aneesh Kumar K.V @ 2019-04-17 13:03 UTC (permalink / raw)
To: npiggin, paulus, mpe, Christophe Leroy; +Cc: Aneesh Kumar K.V, linuxppc-dev
In-Reply-To: <20190417130351.3805-1-aneesh.kumar@linux.ibm.com>
We want to switch to allocating them runtime only when hash translation is
enabled. Add helpers so that both book3s and nohash can be adapted to
upcoming change easily.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 4 +-
arch/powerpc/include/asm/book3s/64/mmu.h | 63 ++++++++++++++++++-
arch/powerpc/include/asm/nohash/32/mmu-8xx.h | 50 +++++++++++++++
arch/powerpc/kernel/paca.c | 12 ++--
arch/powerpc/mm/hash_utils_64.c | 10 +--
arch/powerpc/mm/slb.c | 2 +-
arch/powerpc/mm/slice.c | 49 +++++++--------
arch/powerpc/mm/subpage-prot.c | 8 +--
8 files changed, 154 insertions(+), 44 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index a28a28079edb..eb36fbfe4ef5 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -657,8 +657,8 @@ extern void slb_set_size(u16 size);
/* 4 bits per slice and we have one slice per 1TB */
#define SLICE_ARRAY_SIZE (H_PGTABLE_RANGE >> 41)
-#define TASK_SLICE_ARRAY_SZ(x) ((x)->context.slb_addr_limit >> 41)
-
+#define LOW_SLICE_ARRAY_SZ (BITS_PER_LONG / BITS_PER_BYTE)
+#define TASK_SLICE_ARRAY_SZ(x) ((x)->slb_addr_limit >> 41)
#ifndef __ASSEMBLY__
#ifdef CONFIG_PPC_SUBPAGE_PROT
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index 484a8ff9b338..28213a36fef7 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -124,7 +124,7 @@ typedef struct {
struct npu_context *npu_context;
/* SLB page size encodings*/
- unsigned char low_slices_psize[BITS_PER_LONG / BITS_PER_BYTE];
+ unsigned char low_slices_psize[LOW_SLICE_ARRAY_SZ];
unsigned char high_slices_psize[SLICE_ARRAY_SIZE];
unsigned long slb_addr_limit;
# ifdef CONFIG_PPC_64K_PAGES
@@ -159,6 +159,67 @@ typedef struct {
#endif
} mm_context_t;
+static inline u16 mm_ctx_user_psize(mm_context_t *ctx)
+{
+ return ctx->user_psize;
+}
+
+static inline void mm_ctx_set_user_psize(mm_context_t *ctx, u16 user_psize)
+{
+ ctx->user_psize = user_psize;
+}
+
+static inline unsigned char *mm_ctx_low_slices(mm_context_t *ctx)
+{
+ return ctx->low_slices_psize;
+}
+
+static inline unsigned char *mm_ctx_high_slices(mm_context_t *ctx)
+{
+ return ctx->high_slices_psize;
+}
+
+static inline unsigned long mm_ctx_slb_addr_limit(mm_context_t *ctx)
+{
+ return ctx->slb_addr_limit;
+}
+
+static inline void mm_ctx_set_slb_addr_limit(mm_context_t *ctx, unsigned long limit)
+{
+ ctx->slb_addr_limit = limit;
+}
+
+#ifdef CONFIG_PPC_64K_PAGES
+static inline struct slice_mask *mm_ctx_slice_mask_64k(mm_context_t *ctx)
+{
+ return &ctx->mask_64k;
+}
+#endif
+
+static inline struct slice_mask *mm_ctx_slice_mask_4k(mm_context_t *ctx)
+{
+ return &ctx->mask_4k;
+}
+
+#ifdef CONFIG_HUGETLB_PAGE
+static inline struct slice_mask *mm_ctx_slice_mask_16m(mm_context_t *ctx)
+{
+ return &ctx->mask_16m;
+}
+
+static inline struct slice_mask *mm_ctx_slice_mask_16g(mm_context_t *ctx)
+{
+ return &ctx->mask_16g;
+}
+#endif
+
+#ifdef CONFIG_PPC_SUBPAGE_PROT
+static inline struct subpage_prot_table *mm_ctx_subpage_prot(mm_context_t *ctx)
+{
+ return &ctx->spt;
+}
+#endif
+
/*
* The current system page and segment sizes
*/
diff --git a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
index 0a1a3fc54e54..0f4b0b50e5ad 100644
--- a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
+++ b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
@@ -167,6 +167,7 @@
#ifdef CONFIG_PPC_MM_SLICES
#include <asm/nohash/32/slice.h>
#define SLICE_ARRAY_SIZE (1 << (32 - SLICE_LOW_SHIFT - 1))
+#define LOW_SLICE_ARRAY_SZ SLICE_ARRAY_SIZE
#endif
#ifndef __ASSEMBLY__
@@ -193,6 +194,55 @@ typedef struct {
void *pte_frag;
} mm_context_t;
+#ifdef CONFIG_PPC_MM_SLICES
+static inline u16 mm_ctx_user_psize(mm_context_t *ctx)
+{
+ return ctx->user_psize;
+}
+
+static inline void mm_ctx_set_user_psize(mm_context_t *ctx, u16 user_psize)
+{
+ ctx->user_psize = user_psize;
+}
+
+static inline unsigned char *mm_ctx_low_slices(mm_context_t *ctx)
+{
+ return ctx->low_slices_psize;
+}
+
+static inline unsigned char *mm_ctx_high_slices(mm_context_t *ctx)
+{
+ return ctx->high_slices_psize;
+}
+
+static inline unsigned long mm_ctx_slb_addr_limit(mm_context_t *ctx)
+{
+ return ctx->slb_addr_limit;
+}
+
+static inline void mm_ctx_set_slb_addr_limit(mm_context_t *ctx, unsigned long limit)
+{
+ ctx->slb_addr_limit = limit;
+}
+
+static inline struct slice_mask *mm_ctx_slice_mask_base(mm_context_t *ctx)
+{
+ return &ctx->mask_base_psize;
+}
+
+#ifdef CONFIG_HUGETLB_PAGE
+static inline struct slice_mask *mm_ctx_slice_mask_512k(mm_context_t *ctx)
+{
+ return &ctx->mask_512k;
+}
+
+static inline struct slice_mask *mm_ctx_slice_mask_8m(mm_context_t *ctx)
+{
+ return &ctx->mask_8m;
+}
+#endif
+#endif /* CONFIG_PPC_MM_SLICE */
+
#define PHYS_IMMR_BASE (mfspr(SPRN_IMMR) & 0xfff80000)
#define VIRT_IMMR_BASE (__fix_to_virt(FIX_IMMR_BASE))
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index e7382abee868..9cc91d03ab62 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -267,12 +267,12 @@ void copy_mm_to_paca(struct mm_struct *mm)
get_paca()->mm_ctx_id = context->id;
#ifdef CONFIG_PPC_MM_SLICES
- VM_BUG_ON(!mm->context.slb_addr_limit);
- get_paca()->mm_ctx_slb_addr_limit = mm->context.slb_addr_limit;
- memcpy(&get_paca()->mm_ctx_low_slices_psize,
- &context->low_slices_psize, sizeof(context->low_slices_psize));
- memcpy(&get_paca()->mm_ctx_high_slices_psize,
- &context->high_slices_psize, TASK_SLICE_ARRAY_SZ(mm));
+ VM_BUG_ON(!mm_ctx_slb_addr_limit(context));
+ get_paca()->mm_ctx_slb_addr_limit = mm_ctx_slb_addr_limit(context);
+ memcpy(&get_paca()->mm_ctx_low_slices_psize, mm_ctx_low_slices(context),
+ LOW_SLICE_ARRAY_SZ);
+ memcpy(&get_paca()->mm_ctx_high_slices_psize, mm_ctx_high_slices(context),
+ TASK_SLICE_ARRAY_SZ(context));
#else /* CONFIG_PPC_MM_SLICES */
get_paca()->mm_ctx_user_psize = context->user_psize;
get_paca()->mm_ctx_sllp = context->sllp;
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 0a4f939a8161..5a2bd132f92e 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -1147,7 +1147,7 @@ void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
*/
static int subpage_protection(struct mm_struct *mm, unsigned long ea)
{
- struct subpage_prot_table *spt = &mm->context.spt;
+ struct subpage_prot_table *spt = mm_ctx_subpage_prot(&mm->context);
u32 spp = 0;
u32 **sbpm, *sbpp;
@@ -1470,7 +1470,7 @@ static bool should_hash_preload(struct mm_struct *mm, unsigned long ea)
int psize = get_slice_psize(mm, ea);
/* We only prefault standard pages for now */
- if (unlikely(psize != mm->context.user_psize))
+ if (unlikely(psize != mm_ctx_user_psize(&mm->context)))
return false;
/*
@@ -1549,7 +1549,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
/* Hash it in */
#ifdef CONFIG_PPC_64K_PAGES
- if (mm->context.user_psize == MMU_PAGE_64K)
+ if (mm_ctx_user_psize(&mm->context) == MMU_PAGE_64K)
rc = __hash_page_64K(ea, access, vsid, ptep, trap,
update_flags, ssize);
else
@@ -1562,8 +1562,8 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
*/
if (rc == -1)
hash_failure_debug(ea, access, vsid, trap, ssize,
- mm->context.user_psize,
- mm->context.user_psize,
+ mm_ctx_user_psize(&mm->context),
+ mm_ctx_user_psize(&mm->context),
pte_val(*ptep));
out_exit:
local_irq_restore(flags);
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 5986df48359b..78c0c0a0e355 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -739,7 +739,7 @@ static long slb_allocate_user(struct mm_struct *mm, unsigned long ea)
* consider this as bad access if we take a SLB miss
* on an address above addr limit.
*/
- if (ea >= mm->context.slb_addr_limit)
+ if (ea >= mm_ctx_slb_addr_limit(&mm->context))
return -EFAULT;
context = get_user_context(&mm->context, ea);
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index aec91dbcdc0b..35b278082391 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -101,7 +101,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
{
struct vm_area_struct *vma;
- if ((mm->context.slb_addr_limit - len) < addr)
+ if ((mm_ctx_slb_addr_limit(&mm->context) - len) < addr)
return 0;
vma = find_vma(mm, addr);
return (!vma || (addr + len) <= vm_start_gap(vma));
@@ -155,15 +155,15 @@ static struct slice_mask *slice_mask_for_size(struct mm_struct *mm, int psize)
{
#ifdef CONFIG_PPC_64K_PAGES
if (psize == MMU_PAGE_64K)
- return &mm->context.mask_64k;
+ return mm_ctx_slice_mask_64k(&mm->context);
#endif
if (psize == MMU_PAGE_4K)
- return &mm->context.mask_4k;
+ return mm_ctx_slice_mask_4k(&mm->context);
#ifdef CONFIG_HUGETLB_PAGE
if (psize == MMU_PAGE_16M)
- return &mm->context.mask_16m;
+ return mm_ctx_slice_mask_16m(&mm->context);
if (psize == MMU_PAGE_16G)
- return &mm->context.mask_16g;
+ return mm_ctx_slice_mask_16g(&mm->context);
#endif
BUG();
}
@@ -253,7 +253,7 @@ static void slice_convert(struct mm_struct *mm,
*/
spin_lock_irqsave(&slice_convert_lock, flags);
- lpsizes = mm->context.low_slices_psize;
+ lpsizes = mm_ctx_low_slices(&mm->context);
for (i = 0; i < SLICE_NUM_LOW; i++) {
if (!(mask->low_slices & (1u << i)))
continue;
@@ -272,8 +272,8 @@ static void slice_convert(struct mm_struct *mm,
(((unsigned long)psize) << (mask_index * 4));
}
- hpsizes = mm->context.high_slices_psize;
- for (i = 0; i < GET_HIGH_SLICE_INDEX(mm->context.slb_addr_limit); i++) {
+ hpsizes = mm_ctx_high_slices(&mm->context);
+ for (i = 0; i < GET_HIGH_SLICE_INDEX(mm_ctx_slb_addr_limit(&mm->context)); i++) {
if (!test_bit(i, mask->high_slices))
continue;
@@ -292,8 +292,8 @@ static void slice_convert(struct mm_struct *mm,
}
slice_dbg(" lsps=%lx, hsps=%lx\n",
- (unsigned long)mm->context.low_slices_psize,
- (unsigned long)mm->context.high_slices_psize);
+ (unsigned long)mm_ctx_low_slices(&mm->context),
+ (unsigned long)mm_ctx_high_slices(&mm->context));
spin_unlock_irqrestore(&slice_convert_lock, flags);
@@ -393,7 +393,7 @@ static unsigned long slice_find_area_topdown(struct mm_struct *mm,
* DEFAULT_MAP_WINDOW we should apply this.
*/
if (high_limit > DEFAULT_MAP_WINDOW)
- addr += mm->context.slb_addr_limit - DEFAULT_MAP_WINDOW;
+ addr += mm_ctx_slb_addr_limit(&mm->context) - DEFAULT_MAP_WINDOW;
while (addr > min_addr) {
info.high_limit = addr;
@@ -505,20 +505,20 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
return -ENOMEM;
}
- if (high_limit > mm->context.slb_addr_limit) {
+ if (high_limit > mm_ctx_slb_addr_limit(&mm->context)) {
/*
* Increasing the slb_addr_limit does not require
* slice mask cache to be recalculated because it should
* be already initialised beyond the old address limit.
*/
- mm->context.slb_addr_limit = high_limit;
+ mm_ctx_set_slb_addr_limit(&mm->context, high_limit);
on_each_cpu(slice_flush_segments, mm, 1);
}
/* Sanity checks */
BUG_ON(mm->task_size == 0);
- BUG_ON(mm->context.slb_addr_limit == 0);
+ BUG_ON(mm_ctx_slb_addr_limit(&mm->context) == 0);
VM_BUG_ON(radix_enabled());
slice_dbg("slice_get_unmapped_area(mm=%p, psize=%d...\n", mm, psize);
@@ -696,7 +696,7 @@ unsigned long arch_get_unmapped_area(struct file *filp,
unsigned long flags)
{
return slice_get_unmapped_area(addr, len, flags,
- current->mm->context.user_psize, 0);
+ mm_ctx_user_psize(¤t->mm->context), 0);
}
unsigned long arch_get_unmapped_area_topdown(struct file *filp,
@@ -706,7 +706,7 @@ unsigned long arch_get_unmapped_area_topdown(struct file *filp,
const unsigned long flags)
{
return slice_get_unmapped_area(addr0, len, flags,
- current->mm->context.user_psize, 1);
+ mm_ctx_user_psize(¤t->mm->context), 1);
}
unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
@@ -717,10 +717,10 @@ unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
VM_BUG_ON(radix_enabled());
if (slice_addr_is_low(addr)) {
- psizes = mm->context.low_slices_psize;
+ psizes = mm_ctx_low_slices(&mm->context);
index = GET_LOW_SLICE_INDEX(addr);
} else {
- psizes = mm->context.high_slices_psize;
+ psizes = mm_ctx_high_slices(&mm->context);
index = GET_HIGH_SLICE_INDEX(addr);
}
mask_index = index & 0x1;
@@ -742,20 +742,19 @@ void slice_init_new_context_exec(struct mm_struct *mm)
* duplicated.
*/
#ifdef CONFIG_PPC64
- mm->context.slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
+ mm_ctx_set_slb_addr_limit(&mm->context, DEFAULT_MAP_WINDOW_USER64);
#else
mm->context.slb_addr_limit = DEFAULT_MAP_WINDOW;
#endif
-
- mm->context.user_psize = psize;
+ mm_ctx_set_user_psize(&mm->context, psize);
/*
* Set all slice psizes to the default.
*/
- lpsizes = mm->context.low_slices_psize;
+ lpsizes = mm_ctx_low_slices(&mm->context);
memset(lpsizes, (psize << 4) | psize, SLICE_NUM_LOW >> 1);
- hpsizes = mm->context.high_slices_psize;
+ hpsizes = mm_ctx_high_slices(&mm->context);
memset(hpsizes, (psize << 4) | psize, SLICE_NUM_HIGH >> 1);
/*
@@ -777,7 +776,7 @@ void slice_setup_new_exec(void)
if (!is_32bit_task())
return;
- mm->context.slb_addr_limit = DEFAULT_MAP_WINDOW;
+ mm_ctx_set_slb_addr_limit(&mm->context, DEFAULT_MAP_WINDOW);
}
#endif
@@ -816,7 +815,7 @@ int slice_is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
unsigned long len)
{
const struct slice_mask *maskp;
- unsigned int psize = mm->context.user_psize;
+ unsigned int psize = mm_ctx_user_psize(&mm->context);
VM_BUG_ON(radix_enabled());
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c
index 5e4178790dee..c72252542210 100644
--- a/arch/powerpc/mm/subpage-prot.c
+++ b/arch/powerpc/mm/subpage-prot.c
@@ -25,7 +25,7 @@
*/
void subpage_prot_free(struct mm_struct *mm)
{
- struct subpage_prot_table *spt = &mm->context.spt;
+ struct subpage_prot_table *spt = mm_ctx_subpage_prot(&mm->context);
unsigned long i, j, addr;
u32 **p;
@@ -52,7 +52,7 @@ void subpage_prot_free(struct mm_struct *mm)
void subpage_prot_init_new_context(struct mm_struct *mm)
{
- struct subpage_prot_table *spt = &mm->context.spt;
+ struct subpage_prot_table *spt = mm_ctx_subpage_prot(&mm->context);
memset(spt, 0, sizeof(*spt));
}
@@ -93,7 +93,7 @@ static void hpte_flush_range(struct mm_struct *mm, unsigned long addr,
static void subpage_prot_clear(unsigned long addr, unsigned long len)
{
struct mm_struct *mm = current->mm;
- struct subpage_prot_table *spt = &mm->context.spt;
+ struct subpage_prot_table *spt = mm_ctx_subpage_prot(&mm->context);
u32 **spm, *spp;
unsigned long i;
size_t nw;
@@ -189,7 +189,7 @@ SYSCALL_DEFINE3(subpage_prot, unsigned long, addr,
unsigned long, len, u32 __user *, map)
{
struct mm_struct *mm = current->mm;
- struct subpage_prot_table *spt = &mm->context.spt;
+ struct subpage_prot_table *spt = mm_ctx_subpage_prot(&mm->context);
u32 **spm, *spp;
unsigned long i;
size_t nw;
--
2.20.1
^ permalink raw reply related
* [PATCH v3 1/6] powerpc/mm/radix: Do slb preload only with hash translation mode
From: Aneesh Kumar K.V @ 2019-04-17 13:03 UTC (permalink / raw)
To: npiggin, paulus, mpe, Christophe Leroy; +Cc: Aneesh Kumar K.V, linuxppc-dev
In-Reply-To: <20190417130351.3805-1-aneesh.kumar@linux.ibm.com>
Add radix_enabled check to avoid slb preload with radix translation.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
arch/powerpc/kernel/process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index dd9e0d5386ee..f7b2e3b3db28 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1729,7 +1729,8 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
unsigned long load_addr = regs->gpr[2]; /* saved by ELF_PLAT_INIT */
#ifdef CONFIG_PPC_BOOK3S_64
- preload_new_slb_context(start, sp);
+ if (!radix_enabled())
+ preload_new_slb_context(start, sp);
#endif
#endif
--
2.20.1
^ permalink raw reply related
* [PATCH v3 2/6] powerpc/mm: Remove PPC_MM_SLICES #ifdef for book3s64
From: Aneesh Kumar K.V @ 2019-04-17 13:03 UTC (permalink / raw)
To: npiggin, paulus, mpe, Christophe Leroy; +Cc: Aneesh Kumar K.V, linuxppc-dev
In-Reply-To: <20190417130351.3805-1-aneesh.kumar@linux.ibm.com>
Book3s64 always have PPC_MM_SLICES enabled. So remove the unncessary #ifdef
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu.h | 4 ----
arch/powerpc/include/asm/book3s/64/slice.h | 13 -------------
2 files changed, 17 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index 1ceee000c18d..484a8ff9b338 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -123,7 +123,6 @@ typedef struct {
/* NPU NMMU context */
struct npu_context *npu_context;
-#ifdef CONFIG_PPC_MM_SLICES
/* SLB page size encodings*/
unsigned char low_slices_psize[BITS_PER_LONG / BITS_PER_BYTE];
unsigned char high_slices_psize[SLICE_ARRAY_SIZE];
@@ -136,9 +135,6 @@ typedef struct {
struct slice_mask mask_16m;
struct slice_mask mask_16g;
# endif
-#else
- u16 sllp; /* SLB page size encoding */
-#endif
unsigned long vdso_base;
#ifdef CONFIG_PPC_SUBPAGE_PROT
struct subpage_prot_table spt;
diff --git a/arch/powerpc/include/asm/book3s/64/slice.h b/arch/powerpc/include/asm/book3s/64/slice.h
index db0dedab65ee..062e11136e9c 100644
--- a/arch/powerpc/include/asm/book3s/64/slice.h
+++ b/arch/powerpc/include/asm/book3s/64/slice.h
@@ -2,8 +2,6 @@
#ifndef _ASM_POWERPC_BOOK3S_64_SLICE_H
#define _ASM_POWERPC_BOOK3S_64_SLICE_H
-#ifdef CONFIG_PPC_MM_SLICES
-
#define SLICE_LOW_SHIFT 28
#define SLICE_LOW_TOP (0x100000000ul)
#define SLICE_NUM_LOW (SLICE_LOW_TOP >> SLICE_LOW_SHIFT)
@@ -13,15 +11,4 @@
#define SLICE_NUM_HIGH (H_PGTABLE_RANGE >> SLICE_HIGH_SHIFT)
#define GET_HIGH_SLICE_INDEX(addr) ((addr) >> SLICE_HIGH_SHIFT)
-#else /* CONFIG_PPC_MM_SLICES */
-
-#define get_slice_psize(mm, addr) ((mm)->context.user_psize)
-#define slice_set_user_psize(mm, psize) \
-do { \
- (mm)->context.user_psize = (psize); \
- (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \
-} while (0)
-
-#endif /* CONFIG_PPC_MM_SLICES */
-
#endif /* _ASM_POWERPC_BOOK3S_64_SLICE_H */
--
2.20.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox