* Re: [PATCH] watchdog: add SPDX identifiers for watchdog subsystem
From: Marcus Folkesson @ 2018-02-20 9:59 UTC (permalink / raw)
To: Neil Armstrong
Cc: Wim Van Sebroeck, Guenter Roeck, Joel Stanley, Nicolas Ferre,
Alexandre Belloni, Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Eric Anholt, Stefan Wahren,
Linus Walleij, Support Opensource, Baruch Siach,
William Breathitt Gray, Jimmy Vance, Keguang Zhang,
Joachim Eastwood, Tomas Winkler, Johannes Thumshirn,
Andreas Werner, Carlo Caione, Kevin Hilman, Matthias Brugger,
Wan ZongShun, Michal Simek, Vladimir Zapolskiy, Sylvain Lemieux,
Kukjin Kim, Krzysztof Kozlowski, Zwane Mwaikambo, Jim Cromie,
Barry Song, Patrice Chotard, Maxime Ripard, Chen-Yu Tsai,
Marc Gonzalez, Mans Rullgard, Thierry Reding, Jonathan Hunter,
Masahiro Yamada, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Jun Nie, Baoyou Xie, Shawn Guo, linux-mips,
linux-samsung-soc, linux-watchdog, patches, adi-buildroot-devel,
linux-kernel, linux-mediatek, linux-rpi-kernel, linux-tegra,
linux-amlogic, linuxppc-dev, linux-arm-kernel
In-Reply-To: <d734dd84-ad3b-141b-779d-13d340217a18@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 13268 bytes --]
On Tue, Feb 20, 2018 at 10:47:03AM +0100, Neil Armstrong wrote:
> Hi Marcus,
>
> On 20/02/2018 10:31, Marcus Folkesson wrote:
> > - Add SPDX identifier
> > - Remove boiler plate license text
> > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate
> > license
> >
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> >
> > Notes:
> > v1: Please have an extra look at meson_gxbb_wdt.c
> >
> > drivers/watchdog/acquirewdt.c | 6 +---
> > drivers/watchdog/advantechwdt.c | 6 +---
> > drivers/watchdog/alim1535_wdt.c | 6 +---
> > drivers/watchdog/alim7101_wdt.c | 1 +
> > drivers/watchdog/ar7_wdt.c | 14 +--------
> > drivers/watchdog/asm9260_wdt.c | 2 +-
> > drivers/watchdog/aspeed_wdt.c | 5 +---
> > drivers/watchdog/at91rm9200_wdt.c | 5 +---
> > drivers/watchdog/at91sam9_wdt.c | 5 +---
> > drivers/watchdog/at91sam9_wdt.h | 5 +---
> > drivers/watchdog/ath79_wdt.c | 4 +--
> > drivers/watchdog/atlas7_wdt.c | 2 +-
> > drivers/watchdog/bcm2835_wdt.c | 5 +---
> > drivers/watchdog/bcm47xx_wdt.c | 5 +---
> > drivers/watchdog/bcm63xx_wdt.c | 5 +---
> > drivers/watchdog/bcm7038_wdt.c | 12 ++------
> > drivers/watchdog/bcm_kona_wdt.c | 9 +-----
> > drivers/watchdog/bfin_wdt.c | 2 +-
> > drivers/watchdog/booke_wdt.c | 5 +---
> > drivers/watchdog/cadence_wdt.c | 5 +---
> > drivers/watchdog/coh901327_wdt.c | 7 ++---
> > drivers/watchdog/cpu5wdt.c | 15 +---------
> > drivers/watchdog/cpwd.c | 1 +
> > drivers/watchdog/da9052_wdt.c | 6 +---
> > drivers/watchdog/da9055_wdt.c | 6 +---
> > drivers/watchdog/da9062_wdt.c | 10 +------
> > drivers/watchdog/da9063_wdt.c | 5 +---
> > drivers/watchdog/davinci_wdt.c | 7 ++---
> > drivers/watchdog/diag288_wdt.c | 1 +
> > drivers/watchdog/digicolor_wdt.c | 5 +---
> > drivers/watchdog/dw_wdt.c | 6 +---
> > drivers/watchdog/ebc-c384_wdt.c | 9 +-----
> > drivers/watchdog/ep93xx_wdt.c | 7 ++---
> > drivers/watchdog/eurotechwdt.c | 6 +---
> > drivers/watchdog/f71808e_wdt.c | 16 +---------
> > drivers/watchdog/ftwdt010_wdt.c | 6 ++--
> > drivers/watchdog/gef_wdt.c | 6 +---
> > drivers/watchdog/geodewdt.c | 5 +---
> > drivers/watchdog/gpio_wdt.c | 5 +---
> > drivers/watchdog/hpwdt.c | 7 ++---
> > drivers/watchdog/i6300esb.c | 6 +---
> > drivers/watchdog/iTCO_vendor_support.c | 9 +-----
> > drivers/watchdog/iTCO_wdt.c | 10 +------
> > drivers/watchdog/ib700wdt.c | 6 +---
> > drivers/watchdog/ibmasr.c | 3 +-
> > drivers/watchdog/ie6xx_wdt.c | 18 ++---------
> > drivers/watchdog/imgpdc_wdt.c | 5 +---
> > drivers/watchdog/imx2_wdt.c | 5 +---
> > drivers/watchdog/indydog.c | 6 +---
> > drivers/watchdog/intel-mid_wdt.c | 6 ++--
> > drivers/watchdog/intel_scu_watchdog.c | 18 ++---------
> > drivers/watchdog/intel_scu_watchdog.h | 16 +---------
> > drivers/watchdog/iop_wdt.c | 16 ++--------
> > drivers/watchdog/it8712f_wdt.c | 10 +------
> > drivers/watchdog/it87_wdt.c | 10 +------
> > drivers/watchdog/ixp4xx_wdt.c | 6 ++--
> > drivers/watchdog/jz4740_wdt.c | 10 +------
> > drivers/watchdog/kempld_wdt.c | 12 ++------
> > drivers/watchdog/ks8695_wdt.c | 6 ++--
> > drivers/watchdog/lantiq_wdt.c | 7 ++---
> > drivers/watchdog/loongson1_wdt.c | 5 +---
> > drivers/watchdog/lpc18xx_wdt.c | 5 +---
> > drivers/watchdog/m54xx_wdt.c | 6 ++--
> > drivers/watchdog/machzwd.c | 11 +------
> > drivers/watchdog/max63xx_wdt.c | 5 +---
> > drivers/watchdog/max77620_wdt.c | 5 +---
> > drivers/watchdog/mei_wdt.c | 12 ++------
> > drivers/watchdog/mena21_wdt.c | 4 +--
> > drivers/watchdog/menf21bmc_wdt.c | 8 ++---
> > drivers/watchdog/meson_gxbb_wdt.c | 55 +---------------------------------
> > drivers/watchdog/meson_wdt.c | 6 +---
> > drivers/watchdog/mixcomwd.c | 6 +---
> > drivers/watchdog/moxart_wdt.c | 7 ++---
> > drivers/watchdog/mpc8xxx_wdt.c | 6 +---
> > drivers/watchdog/mt7621_wdt.c | 5 +---
> > drivers/watchdog/mtk_wdt.c | 11 +------
> > drivers/watchdog/mtx-1_wdt.c | 11 +------
> > drivers/watchdog/mv64x60_wdt.c | 6 ++--
> > drivers/watchdog/ni903x_wdt.c | 11 +------
> > drivers/watchdog/nic7018_wdt.c | 11 +------
> > drivers/watchdog/nuc900_wdt.c | 7 ++---
> > drivers/watchdog/nv_tco.c | 6 +---
> > drivers/watchdog/nv_tco.h | 10 +------
> > drivers/watchdog/octeon-wdt-main.c | 11 +------
> > drivers/watchdog/octeon-wdt-nmi.S | 5 +---
> > drivers/watchdog/of_xilinx_wdt.c | 8 ++---
> > drivers/watchdog/omap_wdt.c | 1 +
> > drivers/watchdog/omap_wdt.h | 21 +------------
> > drivers/watchdog/orion_wdt.c | 5 +---
> > drivers/watchdog/pc87413_wdt.c | 10 +------
> > drivers/watchdog/pcwd.c | 1 +
> > drivers/watchdog/pcwd_pci.c | 10 +------
> > drivers/watchdog/pcwd_usb.c | 10 +------
> > drivers/watchdog/pic32-dmt.c | 5 +---
> > drivers/watchdog/pic32-wdt.c | 6 +---
> > drivers/watchdog/pika_wdt.c | 1 +
> > drivers/watchdog/pnx4008_wdt.c | 7 ++---
> > drivers/watchdog/pnx833x_wdt.c | 6 +---
> > drivers/watchdog/pretimeout_noop.c | 7 +----
> > drivers/watchdog/pretimeout_panic.c | 7 +----
> > drivers/watchdog/qcom-wdt.c | 14 ++-------
> > drivers/watchdog/renesas_wdt.c | 4 +--
> > drivers/watchdog/retu_wdt.c | 10 +------
> > drivers/watchdog/riowd.c | 1 +
> > drivers/watchdog/rn5t618_wdt.c | 8 +----
> > drivers/watchdog/rt2880_wdt.c | 5 +---
> > drivers/watchdog/rtd119x_wdt.c | 2 +-
> > drivers/watchdog/rza_wdt.c | 5 +---
> > drivers/watchdog/s3c2410_wdt.c | 11 +------
> > drivers/watchdog/sa1100_wdt.c | 11 +------
> > drivers/watchdog/sama5d4_wdt.c | 3 +-
> > drivers/watchdog/sb_wdog.c | 5 +---
> > drivers/watchdog/sbc60xxwdt.c | 10 +------
> > drivers/watchdog/sbc7240_wdt.c | 12 ++------
> > drivers/watchdog/sbc8360.c | 10 +------
> > drivers/watchdog/sbc_epx_c3.c | 6 +---
> > drivers/watchdog/sbc_fitpc2_wdt.c | 7 ++---
> > drivers/watchdog/sbsa_gwdt.c | 10 +------
> > drivers/watchdog/sc1200wdt.c | 10 +------
> > drivers/watchdog/sc520_wdt.c | 10 +------
> > drivers/watchdog/sch311x_wdt.c | 10 +------
> > drivers/watchdog/scx200_wdt.c | 10 ++-----
> > drivers/watchdog/shwdt.c | 6 +---
> > drivers/watchdog/sirfsoc_wdt.c | 5 ++--
> > drivers/watchdog/smsc37b787_wdt.c | 10 +------
> > drivers/watchdog/softdog.c | 10 +------
> > drivers/watchdog/sp5100_tco.c | 6 +---
> > drivers/watchdog/sp805_wdt.c | 5 +---
> > drivers/watchdog/sprd_wdt.c | 10 +------
> > drivers/watchdog/st_lpc_wdt.c | 6 +---
> > drivers/watchdog/stmp3xxx_rtc_wdt.c | 5 +---
> > drivers/watchdog/sun4v_wdt.c | 6 +---
> > drivers/watchdog/sunxi_wdt.c | 6 +---
> > drivers/watchdog/tangox_wdt.c | 6 +---
> > drivers/watchdog/tegra_wdt.c | 10 +------
> > drivers/watchdog/ts4800_wdt.c | 5 +---
> > drivers/watchdog/ts72xx_wdt.c | 7 ++---
> > drivers/watchdog/twl4030_wdt.c | 15 +---------
> > drivers/watchdog/txx9wdt.c | 9 ++----
> > drivers/watchdog/uniphier_wdt.c | 10 +------
> > drivers/watchdog/ux500_wdt.c | 5 ++--
> > drivers/watchdog/via_wdt.c | 4 +--
> > drivers/watchdog/w83627hf_wdt.c | 10 +------
> > drivers/watchdog/w83877f_wdt.c | 10 +------
> > drivers/watchdog/w83977f_wdt.c | 9 +-----
> > drivers/watchdog/wafer5823wdt.c | 11 +------
> > drivers/watchdog/watchdog_core.c | 10 +------
> > drivers/watchdog/watchdog_core.h | 10 +------
> > drivers/watchdog/watchdog_dev.c | 10 +------
> > drivers/watchdog/watchdog_pretimeout.c | 6 +---
> > drivers/watchdog/wd501p.h | 1 +
> > drivers/watchdog/wdat_wdt.c | 5 +---
> > drivers/watchdog/wdrtas.c | 15 +---------
> > drivers/watchdog/wdt.c | 11 +------
> > drivers/watchdog/wdt285.c | 7 +----
> > drivers/watchdog/wdt977.c | 8 +----
> > drivers/watchdog/wdt_pci.c | 11 +------
> > drivers/watchdog/wm831x_wdt.c | 5 +---
> > drivers/watchdog/wm8350_wdt.c | 5 +---
> > drivers/watchdog/xen_wdt.c | 6 +---
> > drivers/watchdog/ziirave_wdt.c | 11 +------
> > drivers/watchdog/zx2967_wdt.c | 3 +-
> > 162 files changed, 195 insertions(+), 1059 deletions(-)
> >
>
> [..]
>
> > diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> > index 69a5a57f1446..500463c3e040 100644
> > --- a/drivers/watchdog/meson_gxbb_wdt.c
> > +++ b/drivers/watchdog/meson_gxbb_wdt.c
> > @@ -1,57 +1,4 @@
> > -/*
> > - * This file is provided under a dual BSD/GPLv2 license. When using or
> > - * redistributing this file, you may do so under either license.
> > - *
> > - * GPL LICENSE SUMMARY
> > - *
> > - * Copyright (c) 2016 BayLibre, SAS.
> > - * Author: Neil Armstrong <narmstrong@baylibre.com>
>
> Please keep the copyright !
Sorry Neil!
I will fix that for v2.
I saw that the copyright text has magically disappered for
coh901327_wdt.c as well.
What do you think about the BSD license? Is BSD-2-Clause right?
>
> > - *
> > - * This program is free software; you can redistribute it and/or modify
> > - * it under the terms of version 2 of the GNU General Public License as
> > - * published by the Free Software Foundation.
> > - *
> > - * This program is distributed in the hope that it will be useful, but
> > - * WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> > - * General Public License for more details.
> > - *
> > - * You should have received a copy of the GNU General Public License
> > - * along with this program; if not, see <http://www.gnu.org/licenses/>.
> > - * The full GNU General Public License is included in this distribution
> > - * in the file called COPYING.
> > - *
> > - * BSD LICENSE
> > - *
> > - * Copyright (c) 2016 BayLibre, SAS.
> > - * Author: Neil Armstrong <narmstrong@baylibre.com>
> > - *
> > - * Redistribution and use in source and binary forms, with or without
> > - * modification, are permitted provided that the following conditions
> > - * are met:
> > - *
> > - * * Redistributions of source code must retain the above copyright
> > - * notice, this list of conditions and the following disclaimer.
> > - * * Redistributions in binary form must reproduce the above copyright
> > - * notice, this list of conditions and the following disclaimer in
> > - * the documentation and/or other materials provided with the
> > - * distribution.
> > - * * Neither the name of Intel Corporation nor the names of its
> > - * contributors may be used to endorse or promote products derived
> > - * from this software without specific prior written permission.
> > - *
> > - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > - */
> > +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> > #include <linux/clk.h>
> > #include <linux/err.h>
> > #include <linux/io.h>
> [..]
>
> Thanks,
> Neil
Best regards
Marcus Folkesson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH 2/3] rfi-flush: Make it possible to call setup_rfi_flush() again
From: Michael Ellerman @ 2018-02-20 9:59 UTC (permalink / raw)
To: Mauricio Faria de Oliveira, Michal Suchánek; +Cc: linuxppc-dev
In-Reply-To: <b87d6261-c48d-6eab-e328-6988f628c949@linux.vnet.ibm.com>
Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> writes:
> Hi Michal and Michael,
>
> On 02/15/2018 05:13 AM, Michal Such=C3=A1nek wrote:
>>> From: Michael Ellerman<mpe@ellerman.id.au>
>>>
>>> For PowerVM migration we want to be able to call setup_rfi_flush()
>>> again after we've migrated the partition.
>>>
>>> To support that we need to check that we're not trying to allocate the
>>> fallback flush area after memblock has gone away. If so we just fail,
>>> we don't support migrating from a patched to an unpatched machine. Or
>>> we do support it, but there will be no RFI flush enabled on the
>>> destination.
>>>
>> This sounds bad to me. Either we support RFI flush or we don't.
>>=20
>> If we do the fallback area should be allocated at boot so it is always
>> available. [snip]
>
> I think the problem with this is the size of the fallback area might
> have to be different between the origin and destination systems, say,
> a larger L1 data cache at the destination.
>
> In that case, the original size might not be enough to fully flush
> the L1 data cache.
>
> Michael, is that the reason it is done that way? I thought of that,
> but don't know for sure.
No, supporting different cache sizes is a good idea though :)
I did it the way I did because otherwise we waste memory on every system
on earth just to support a use case that we don't actually intend for
anyone to ever use - ie. migrating from a patched machine to an
unpatched machine.
In fact without further checks we'd be allocating the fallback area on
powernv machines which don't even support LPM.
So that just seemed a bit gross.
I think I'm inclined to leave it the way it is, unless you feel strongly
about it Michal?
cheers
^ permalink raw reply
* Re: [PATCH] watchdog: add SPDX identifiers for watchdog subsystem
From: Neil Armstrong @ 2018-02-20 9:47 UTC (permalink / raw)
To: Marcus Folkesson, Wim Van Sebroeck, Guenter Roeck, Joel Stanley,
Nicolas Ferre, Alexandre Belloni, Florian Fainelli, Ray Jui,
Scott Branden, bcm-kernel-feedback-list, Eric Anholt,
Stefan Wahren, Linus Walleij, Support Opensource, Baruch Siach,
William Breathitt Gray, Jimmy Vance, Keguang Zhang,
Joachim Eastwood, Tomas Winkler, Johannes Thumshirn,
Andreas Werner, Carlo Caione, Kevin Hilman, Matthias Brugger,
Wan ZongShun, Michal Simek, Vladimir Zapolskiy, Sylvain Lemieux,
Kukjin Kim, Krzysztof Kozlowski, Zwane Mwaikambo, Jim Cromie,
Barry Song, Patrice Chotard, Maxime Ripard, Chen-Yu Tsai,
Marc Gonzalez, Mans Rullgard, Thierry Reding, Jonathan Hunter,
Masahiro Yamada, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Jun Nie, Baoyou Xie, Shawn Guo
Cc: linux-mips, linux-samsung-soc, linux-watchdog, patches,
adi-buildroot-devel, linux-kernel, linux-mediatek,
linux-rpi-kernel, linux-tegra, linux-amlogic, linuxppc-dev,
linux-arm-kernel
In-Reply-To: <20180220093119.23720-1-marcus.folkesson@gmail.com>
Hi Marcus,
On 20/02/2018 10:31, Marcus Folkesson wrote:
> - Add SPDX identifier
> - Remove boiler plate license text
> - If MODULE_LICENSE and boiler plate does not match, go for boiler plate
> license
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>
> Notes:
> v1: Please have an extra look at meson_gxbb_wdt.c
>
> drivers/watchdog/acquirewdt.c | 6 +---
> drivers/watchdog/advantechwdt.c | 6 +---
> drivers/watchdog/alim1535_wdt.c | 6 +---
> drivers/watchdog/alim7101_wdt.c | 1 +
> drivers/watchdog/ar7_wdt.c | 14 +--------
> drivers/watchdog/asm9260_wdt.c | 2 +-
> drivers/watchdog/aspeed_wdt.c | 5 +---
> drivers/watchdog/at91rm9200_wdt.c | 5 +---
> drivers/watchdog/at91sam9_wdt.c | 5 +---
> drivers/watchdog/at91sam9_wdt.h | 5 +---
> drivers/watchdog/ath79_wdt.c | 4 +--
> drivers/watchdog/atlas7_wdt.c | 2 +-
> drivers/watchdog/bcm2835_wdt.c | 5 +---
> drivers/watchdog/bcm47xx_wdt.c | 5 +---
> drivers/watchdog/bcm63xx_wdt.c | 5 +---
> drivers/watchdog/bcm7038_wdt.c | 12 ++------
> drivers/watchdog/bcm_kona_wdt.c | 9 +-----
> drivers/watchdog/bfin_wdt.c | 2 +-
> drivers/watchdog/booke_wdt.c | 5 +---
> drivers/watchdog/cadence_wdt.c | 5 +---
> drivers/watchdog/coh901327_wdt.c | 7 ++---
> drivers/watchdog/cpu5wdt.c | 15 +---------
> drivers/watchdog/cpwd.c | 1 +
> drivers/watchdog/da9052_wdt.c | 6 +---
> drivers/watchdog/da9055_wdt.c | 6 +---
> drivers/watchdog/da9062_wdt.c | 10 +------
> drivers/watchdog/da9063_wdt.c | 5 +---
> drivers/watchdog/davinci_wdt.c | 7 ++---
> drivers/watchdog/diag288_wdt.c | 1 +
> drivers/watchdog/digicolor_wdt.c | 5 +---
> drivers/watchdog/dw_wdt.c | 6 +---
> drivers/watchdog/ebc-c384_wdt.c | 9 +-----
> drivers/watchdog/ep93xx_wdt.c | 7 ++---
> drivers/watchdog/eurotechwdt.c | 6 +---
> drivers/watchdog/f71808e_wdt.c | 16 +---------
> drivers/watchdog/ftwdt010_wdt.c | 6 ++--
> drivers/watchdog/gef_wdt.c | 6 +---
> drivers/watchdog/geodewdt.c | 5 +---
> drivers/watchdog/gpio_wdt.c | 5 +---
> drivers/watchdog/hpwdt.c | 7 ++---
> drivers/watchdog/i6300esb.c | 6 +---
> drivers/watchdog/iTCO_vendor_support.c | 9 +-----
> drivers/watchdog/iTCO_wdt.c | 10 +------
> drivers/watchdog/ib700wdt.c | 6 +---
> drivers/watchdog/ibmasr.c | 3 +-
> drivers/watchdog/ie6xx_wdt.c | 18 ++---------
> drivers/watchdog/imgpdc_wdt.c | 5 +---
> drivers/watchdog/imx2_wdt.c | 5 +---
> drivers/watchdog/indydog.c | 6 +---
> drivers/watchdog/intel-mid_wdt.c | 6 ++--
> drivers/watchdog/intel_scu_watchdog.c | 18 ++---------
> drivers/watchdog/intel_scu_watchdog.h | 16 +---------
> drivers/watchdog/iop_wdt.c | 16 ++--------
> drivers/watchdog/it8712f_wdt.c | 10 +------
> drivers/watchdog/it87_wdt.c | 10 +------
> drivers/watchdog/ixp4xx_wdt.c | 6 ++--
> drivers/watchdog/jz4740_wdt.c | 10 +------
> drivers/watchdog/kempld_wdt.c | 12 ++------
> drivers/watchdog/ks8695_wdt.c | 6 ++--
> drivers/watchdog/lantiq_wdt.c | 7 ++---
> drivers/watchdog/loongson1_wdt.c | 5 +---
> drivers/watchdog/lpc18xx_wdt.c | 5 +---
> drivers/watchdog/m54xx_wdt.c | 6 ++--
> drivers/watchdog/machzwd.c | 11 +------
> drivers/watchdog/max63xx_wdt.c | 5 +---
> drivers/watchdog/max77620_wdt.c | 5 +---
> drivers/watchdog/mei_wdt.c | 12 ++------
> drivers/watchdog/mena21_wdt.c | 4 +--
> drivers/watchdog/menf21bmc_wdt.c | 8 ++---
> drivers/watchdog/meson_gxbb_wdt.c | 55 +---------------------------------
> drivers/watchdog/meson_wdt.c | 6 +---
> drivers/watchdog/mixcomwd.c | 6 +---
> drivers/watchdog/moxart_wdt.c | 7 ++---
> drivers/watchdog/mpc8xxx_wdt.c | 6 +---
> drivers/watchdog/mt7621_wdt.c | 5 +---
> drivers/watchdog/mtk_wdt.c | 11 +------
> drivers/watchdog/mtx-1_wdt.c | 11 +------
> drivers/watchdog/mv64x60_wdt.c | 6 ++--
> drivers/watchdog/ni903x_wdt.c | 11 +------
> drivers/watchdog/nic7018_wdt.c | 11 +------
> drivers/watchdog/nuc900_wdt.c | 7 ++---
> drivers/watchdog/nv_tco.c | 6 +---
> drivers/watchdog/nv_tco.h | 10 +------
> drivers/watchdog/octeon-wdt-main.c | 11 +------
> drivers/watchdog/octeon-wdt-nmi.S | 5 +---
> drivers/watchdog/of_xilinx_wdt.c | 8 ++---
> drivers/watchdog/omap_wdt.c | 1 +
> drivers/watchdog/omap_wdt.h | 21 +------------
> drivers/watchdog/orion_wdt.c | 5 +---
> drivers/watchdog/pc87413_wdt.c | 10 +------
> drivers/watchdog/pcwd.c | 1 +
> drivers/watchdog/pcwd_pci.c | 10 +------
> drivers/watchdog/pcwd_usb.c | 10 +------
> drivers/watchdog/pic32-dmt.c | 5 +---
> drivers/watchdog/pic32-wdt.c | 6 +---
> drivers/watchdog/pika_wdt.c | 1 +
> drivers/watchdog/pnx4008_wdt.c | 7 ++---
> drivers/watchdog/pnx833x_wdt.c | 6 +---
> drivers/watchdog/pretimeout_noop.c | 7 +----
> drivers/watchdog/pretimeout_panic.c | 7 +----
> drivers/watchdog/qcom-wdt.c | 14 ++-------
> drivers/watchdog/renesas_wdt.c | 4 +--
> drivers/watchdog/retu_wdt.c | 10 +------
> drivers/watchdog/riowd.c | 1 +
> drivers/watchdog/rn5t618_wdt.c | 8 +----
> drivers/watchdog/rt2880_wdt.c | 5 +---
> drivers/watchdog/rtd119x_wdt.c | 2 +-
> drivers/watchdog/rza_wdt.c | 5 +---
> drivers/watchdog/s3c2410_wdt.c | 11 +------
> drivers/watchdog/sa1100_wdt.c | 11 +------
> drivers/watchdog/sama5d4_wdt.c | 3 +-
> drivers/watchdog/sb_wdog.c | 5 +---
> drivers/watchdog/sbc60xxwdt.c | 10 +------
> drivers/watchdog/sbc7240_wdt.c | 12 ++------
> drivers/watchdog/sbc8360.c | 10 +------
> drivers/watchdog/sbc_epx_c3.c | 6 +---
> drivers/watchdog/sbc_fitpc2_wdt.c | 7 ++---
> drivers/watchdog/sbsa_gwdt.c | 10 +------
> drivers/watchdog/sc1200wdt.c | 10 +------
> drivers/watchdog/sc520_wdt.c | 10 +------
> drivers/watchdog/sch311x_wdt.c | 10 +------
> drivers/watchdog/scx200_wdt.c | 10 ++-----
> drivers/watchdog/shwdt.c | 6 +---
> drivers/watchdog/sirfsoc_wdt.c | 5 ++--
> drivers/watchdog/smsc37b787_wdt.c | 10 +------
> drivers/watchdog/softdog.c | 10 +------
> drivers/watchdog/sp5100_tco.c | 6 +---
> drivers/watchdog/sp805_wdt.c | 5 +---
> drivers/watchdog/sprd_wdt.c | 10 +------
> drivers/watchdog/st_lpc_wdt.c | 6 +---
> drivers/watchdog/stmp3xxx_rtc_wdt.c | 5 +---
> drivers/watchdog/sun4v_wdt.c | 6 +---
> drivers/watchdog/sunxi_wdt.c | 6 +---
> drivers/watchdog/tangox_wdt.c | 6 +---
> drivers/watchdog/tegra_wdt.c | 10 +------
> drivers/watchdog/ts4800_wdt.c | 5 +---
> drivers/watchdog/ts72xx_wdt.c | 7 ++---
> drivers/watchdog/twl4030_wdt.c | 15 +---------
> drivers/watchdog/txx9wdt.c | 9 ++----
> drivers/watchdog/uniphier_wdt.c | 10 +------
> drivers/watchdog/ux500_wdt.c | 5 ++--
> drivers/watchdog/via_wdt.c | 4 +--
> drivers/watchdog/w83627hf_wdt.c | 10 +------
> drivers/watchdog/w83877f_wdt.c | 10 +------
> drivers/watchdog/w83977f_wdt.c | 9 +-----
> drivers/watchdog/wafer5823wdt.c | 11 +------
> drivers/watchdog/watchdog_core.c | 10 +------
> drivers/watchdog/watchdog_core.h | 10 +------
> drivers/watchdog/watchdog_dev.c | 10 +------
> drivers/watchdog/watchdog_pretimeout.c | 6 +---
> drivers/watchdog/wd501p.h | 1 +
> drivers/watchdog/wdat_wdt.c | 5 +---
> drivers/watchdog/wdrtas.c | 15 +---------
> drivers/watchdog/wdt.c | 11 +------
> drivers/watchdog/wdt285.c | 7 +----
> drivers/watchdog/wdt977.c | 8 +----
> drivers/watchdog/wdt_pci.c | 11 +------
> drivers/watchdog/wm831x_wdt.c | 5 +---
> drivers/watchdog/wm8350_wdt.c | 5 +---
> drivers/watchdog/xen_wdt.c | 6 +---
> drivers/watchdog/ziirave_wdt.c | 11 +------
> drivers/watchdog/zx2967_wdt.c | 3 +-
> 162 files changed, 195 insertions(+), 1059 deletions(-)
>
[..]
> diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> index 69a5a57f1446..500463c3e040 100644
> --- a/drivers/watchdog/meson_gxbb_wdt.c
> +++ b/drivers/watchdog/meson_gxbb_wdt.c
> @@ -1,57 +1,4 @@
> -/*
> - * This file is provided under a dual BSD/GPLv2 license. When using or
> - * redistributing this file, you may do so under either license.
> - *
> - * GPL LICENSE SUMMARY
> - *
> - * Copyright (c) 2016 BayLibre, SAS.
> - * Author: Neil Armstrong <narmstrong@baylibre.com>
Please keep the copyright !
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of version 2 of the GNU General Public License as
> - * published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, see <http://www.gnu.org/licenses/>.
> - * The full GNU General Public License is included in this distribution
> - * in the file called COPYING.
> - *
> - * BSD LICENSE
> - *
> - * Copyright (c) 2016 BayLibre, SAS.
> - * Author: Neil Armstrong <narmstrong@baylibre.com>
> - *
> - * Redistribution and use in source and binary forms, with or without
> - * modification, are permitted provided that the following conditions
> - * are met:
> - *
> - * * Redistributions of source code must retain the above copyright
> - * notice, this list of conditions and the following disclaimer.
> - * * Redistributions in binary form must reproduce the above copyright
> - * notice, this list of conditions and the following disclaimer in
> - * the documentation and/or other materials provided with the
> - * distribution.
> - * * Neither the name of Intel Corporation nor the names of its
> - * contributors may be used to endorse or promote products derived
> - * from this software without specific prior written permission.
> - *
> - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> - */
> +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> #include <linux/clk.h>
> #include <linux/err.h>
> #include <linux/io.h>
[..]
Thanks,
Neil
^ permalink raw reply
* [PATCH] watchdog: add SPDX identifiers for watchdog subsystem
From: Marcus Folkesson @ 2018-02-20 9:31 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Joel Stanley, Nicolas Ferre,
Alexandre Belloni, Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Eric Anholt, Stefan Wahren,
Linus Walleij, Support Opensource, Baruch Siach,
William Breathitt Gray, Jimmy Vance, Keguang Zhang,
Joachim Eastwood, Tomas Winkler, Johannes Thumshirn,
Andreas Werner, Carlo Caione, Kevin Hilman, Matthias Brugger,
Wan ZongShun, Michal Simek, Vladimir Zapolskiy, Sylvain Lemieux,
Kukjin Kim, Krzysztof Kozlowski, Zwane Mwaikambo, Jim Cromie,
Barry Song, Patrice Chotard, Maxime Ripard, Chen-Yu Tsai,
Marc Gonzalez, Mans Rullgard, Thierry Reding, Jonathan Hunter,
Masahiro Yamada, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Jun Nie, Baoyou Xie, Shawn Guo
Cc: Marcus Folkesson, linux-watchdog, linux-kernel, linux-arm-kernel,
linux-rpi-kernel, adi-buildroot-devel, linux-mips, linux-amlogic,
linux-mediatek, linux-samsung-soc, linux-tegra, linuxppc-dev,
patches
- Add SPDX identifier
- Remove boiler plate license text
- If MODULE_LICENSE and boiler plate does not match, go for boiler plate
license
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
Notes:
v1: Please have an extra look at meson_gxbb_wdt.c
drivers/watchdog/acquirewdt.c | 6 +---
drivers/watchdog/advantechwdt.c | 6 +---
drivers/watchdog/alim1535_wdt.c | 6 +---
drivers/watchdog/alim7101_wdt.c | 1 +
drivers/watchdog/ar7_wdt.c | 14 +--------
drivers/watchdog/asm9260_wdt.c | 2 +-
drivers/watchdog/aspeed_wdt.c | 5 +---
drivers/watchdog/at91rm9200_wdt.c | 5 +---
drivers/watchdog/at91sam9_wdt.c | 5 +---
drivers/watchdog/at91sam9_wdt.h | 5 +---
drivers/watchdog/ath79_wdt.c | 4 +--
drivers/watchdog/atlas7_wdt.c | 2 +-
drivers/watchdog/bcm2835_wdt.c | 5 +---
drivers/watchdog/bcm47xx_wdt.c | 5 +---
drivers/watchdog/bcm63xx_wdt.c | 5 +---
drivers/watchdog/bcm7038_wdt.c | 12 ++------
drivers/watchdog/bcm_kona_wdt.c | 9 +-----
drivers/watchdog/bfin_wdt.c | 2 +-
drivers/watchdog/booke_wdt.c | 5 +---
drivers/watchdog/cadence_wdt.c | 5 +---
drivers/watchdog/coh901327_wdt.c | 7 ++---
drivers/watchdog/cpu5wdt.c | 15 +---------
drivers/watchdog/cpwd.c | 1 +
drivers/watchdog/da9052_wdt.c | 6 +---
drivers/watchdog/da9055_wdt.c | 6 +---
drivers/watchdog/da9062_wdt.c | 10 +------
drivers/watchdog/da9063_wdt.c | 5 +---
drivers/watchdog/davinci_wdt.c | 7 ++---
drivers/watchdog/diag288_wdt.c | 1 +
drivers/watchdog/digicolor_wdt.c | 5 +---
drivers/watchdog/dw_wdt.c | 6 +---
drivers/watchdog/ebc-c384_wdt.c | 9 +-----
drivers/watchdog/ep93xx_wdt.c | 7 ++---
drivers/watchdog/eurotechwdt.c | 6 +---
drivers/watchdog/f71808e_wdt.c | 16 +---------
drivers/watchdog/ftwdt010_wdt.c | 6 ++--
drivers/watchdog/gef_wdt.c | 6 +---
drivers/watchdog/geodewdt.c | 5 +---
drivers/watchdog/gpio_wdt.c | 5 +---
drivers/watchdog/hpwdt.c | 7 ++---
drivers/watchdog/i6300esb.c | 6 +---
drivers/watchdog/iTCO_vendor_support.c | 9 +-----
drivers/watchdog/iTCO_wdt.c | 10 +------
drivers/watchdog/ib700wdt.c | 6 +---
drivers/watchdog/ibmasr.c | 3 +-
drivers/watchdog/ie6xx_wdt.c | 18 ++---------
drivers/watchdog/imgpdc_wdt.c | 5 +---
drivers/watchdog/imx2_wdt.c | 5 +---
drivers/watchdog/indydog.c | 6 +---
drivers/watchdog/intel-mid_wdt.c | 6 ++--
drivers/watchdog/intel_scu_watchdog.c | 18 ++---------
drivers/watchdog/intel_scu_watchdog.h | 16 +---------
drivers/watchdog/iop_wdt.c | 16 ++--------
drivers/watchdog/it8712f_wdt.c | 10 +------
drivers/watchdog/it87_wdt.c | 10 +------
drivers/watchdog/ixp4xx_wdt.c | 6 ++--
drivers/watchdog/jz4740_wdt.c | 10 +------
drivers/watchdog/kempld_wdt.c | 12 ++------
drivers/watchdog/ks8695_wdt.c | 6 ++--
drivers/watchdog/lantiq_wdt.c | 7 ++---
drivers/watchdog/loongson1_wdt.c | 5 +---
drivers/watchdog/lpc18xx_wdt.c | 5 +---
drivers/watchdog/m54xx_wdt.c | 6 ++--
drivers/watchdog/machzwd.c | 11 +------
drivers/watchdog/max63xx_wdt.c | 5 +---
drivers/watchdog/max77620_wdt.c | 5 +---
drivers/watchdog/mei_wdt.c | 12 ++------
drivers/watchdog/mena21_wdt.c | 4 +--
drivers/watchdog/menf21bmc_wdt.c | 8 ++---
drivers/watchdog/meson_gxbb_wdt.c | 55 +---------------------------------
drivers/watchdog/meson_wdt.c | 6 +---
drivers/watchdog/mixcomwd.c | 6 +---
drivers/watchdog/moxart_wdt.c | 7 ++---
drivers/watchdog/mpc8xxx_wdt.c | 6 +---
drivers/watchdog/mt7621_wdt.c | 5 +---
drivers/watchdog/mtk_wdt.c | 11 +------
drivers/watchdog/mtx-1_wdt.c | 11 +------
drivers/watchdog/mv64x60_wdt.c | 6 ++--
drivers/watchdog/ni903x_wdt.c | 11 +------
drivers/watchdog/nic7018_wdt.c | 11 +------
drivers/watchdog/nuc900_wdt.c | 7 ++---
drivers/watchdog/nv_tco.c | 6 +---
drivers/watchdog/nv_tco.h | 10 +------
drivers/watchdog/octeon-wdt-main.c | 11 +------
drivers/watchdog/octeon-wdt-nmi.S | 5 +---
drivers/watchdog/of_xilinx_wdt.c | 8 ++---
drivers/watchdog/omap_wdt.c | 1 +
drivers/watchdog/omap_wdt.h | 21 +------------
drivers/watchdog/orion_wdt.c | 5 +---
drivers/watchdog/pc87413_wdt.c | 10 +------
drivers/watchdog/pcwd.c | 1 +
drivers/watchdog/pcwd_pci.c | 10 +------
drivers/watchdog/pcwd_usb.c | 10 +------
drivers/watchdog/pic32-dmt.c | 5 +---
drivers/watchdog/pic32-wdt.c | 6 +---
drivers/watchdog/pika_wdt.c | 1 +
drivers/watchdog/pnx4008_wdt.c | 7 ++---
drivers/watchdog/pnx833x_wdt.c | 6 +---
drivers/watchdog/pretimeout_noop.c | 7 +----
drivers/watchdog/pretimeout_panic.c | 7 +----
drivers/watchdog/qcom-wdt.c | 14 ++-------
drivers/watchdog/renesas_wdt.c | 4 +--
drivers/watchdog/retu_wdt.c | 10 +------
drivers/watchdog/riowd.c | 1 +
drivers/watchdog/rn5t618_wdt.c | 8 +----
drivers/watchdog/rt2880_wdt.c | 5 +---
drivers/watchdog/rtd119x_wdt.c | 2 +-
drivers/watchdog/rza_wdt.c | 5 +---
drivers/watchdog/s3c2410_wdt.c | 11 +------
drivers/watchdog/sa1100_wdt.c | 11 +------
drivers/watchdog/sama5d4_wdt.c | 3 +-
drivers/watchdog/sb_wdog.c | 5 +---
drivers/watchdog/sbc60xxwdt.c | 10 +------
drivers/watchdog/sbc7240_wdt.c | 12 ++------
drivers/watchdog/sbc8360.c | 10 +------
drivers/watchdog/sbc_epx_c3.c | 6 +---
drivers/watchdog/sbc_fitpc2_wdt.c | 7 ++---
drivers/watchdog/sbsa_gwdt.c | 10 +------
drivers/watchdog/sc1200wdt.c | 10 +------
drivers/watchdog/sc520_wdt.c | 10 +------
drivers/watchdog/sch311x_wdt.c | 10 +------
drivers/watchdog/scx200_wdt.c | 10 ++-----
drivers/watchdog/shwdt.c | 6 +---
drivers/watchdog/sirfsoc_wdt.c | 5 ++--
drivers/watchdog/smsc37b787_wdt.c | 10 +------
drivers/watchdog/softdog.c | 10 +------
drivers/watchdog/sp5100_tco.c | 6 +---
drivers/watchdog/sp805_wdt.c | 5 +---
drivers/watchdog/sprd_wdt.c | 10 +------
drivers/watchdog/st_lpc_wdt.c | 6 +---
drivers/watchdog/stmp3xxx_rtc_wdt.c | 5 +---
drivers/watchdog/sun4v_wdt.c | 6 +---
drivers/watchdog/sunxi_wdt.c | 6 +---
drivers/watchdog/tangox_wdt.c | 6 +---
drivers/watchdog/tegra_wdt.c | 10 +------
drivers/watchdog/ts4800_wdt.c | 5 +---
drivers/watchdog/ts72xx_wdt.c | 7 ++---
drivers/watchdog/twl4030_wdt.c | 15 +---------
drivers/watchdog/txx9wdt.c | 9 ++----
drivers/watchdog/uniphier_wdt.c | 10 +------
drivers/watchdog/ux500_wdt.c | 5 ++--
drivers/watchdog/via_wdt.c | 4 +--
drivers/watchdog/w83627hf_wdt.c | 10 +------
drivers/watchdog/w83877f_wdt.c | 10 +------
drivers/watchdog/w83977f_wdt.c | 9 +-----
drivers/watchdog/wafer5823wdt.c | 11 +------
drivers/watchdog/watchdog_core.c | 10 +------
drivers/watchdog/watchdog_core.h | 10 +------
drivers/watchdog/watchdog_dev.c | 10 +------
drivers/watchdog/watchdog_pretimeout.c | 6 +---
drivers/watchdog/wd501p.h | 1 +
drivers/watchdog/wdat_wdt.c | 5 +---
drivers/watchdog/wdrtas.c | 15 +---------
drivers/watchdog/wdt.c | 11 +------
drivers/watchdog/wdt285.c | 7 +----
drivers/watchdog/wdt977.c | 8 +----
drivers/watchdog/wdt_pci.c | 11 +------
drivers/watchdog/wm831x_wdt.c | 5 +---
drivers/watchdog/wm8350_wdt.c | 5 +---
drivers/watchdog/xen_wdt.c | 6 +---
drivers/watchdog/ziirave_wdt.c | 11 +------
drivers/watchdog/zx2967_wdt.c | 3 +-
162 files changed, 195 insertions(+), 1059 deletions(-)
diff --git a/drivers/watchdog/acquirewdt.c b/drivers/watchdog/acquirewdt.c
index d6210d946082..37fb5d85a9b9 100644
--- a/drivers/watchdog/acquirewdt.c
+++ b/drivers/watchdog/acquirewdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Acquire Single Board Computer Watchdog Timer driver
*
@@ -6,11 +7,6 @@
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
* warranty for any of this software. This material is provided
* "AS-IS" and at no charge.
diff --git a/drivers/watchdog/advantechwdt.c b/drivers/watchdog/advantechwdt.c
index f61944369c1a..16512e3c6e00 100644
--- a/drivers/watchdog/advantechwdt.c
+++ b/drivers/watchdog/advantechwdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Advantech Single Board Computer WDT driver
*
@@ -9,11 +10,6 @@
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
* warranty for any of this software. This material is provided
* "AS-IS" and at no charge.
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index 60f0c2eb8531..9b341b1ba97e 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -1,10 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog for the 7101 PMU version found in the ALi M1535 chipsets
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c
index 12f7ea62dddd..b3233c1edcc5 100644
--- a/drivers/watchdog/alim7101_wdt.c
+++ b/drivers/watchdog/alim7101_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* ALi M7101 PMU Computer Watchdog Timer driver
*
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c
index 6d5ae251e309..ee1ab12ab04f 100644
--- a/drivers/watchdog/ar7_wdt.c
+++ b/drivers/watchdog/ar7_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* drivers/watchdog/ar7_wdt.c
*
@@ -8,19 +9,6 @@
* National Semiconductor SCx200 Watchdog support
* Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/asm9260_wdt.c b/drivers/watchdog/asm9260_wdt.c
index 7dd0da644a7f..774d5c09d747 100644
--- a/drivers/watchdog/asm9260_wdt.c
+++ b/drivers/watchdog/asm9260_wdt.c
@@ -1,9 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for Alphascale ASM9260.
*
* Copyright (c) 2014 Oleksij Rempel <linux@rempel-privat.de>
*
- * Licensed under GPLv2 or later.
*/
#include <linux/bitops.h>
diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
index ca5b91e2eb92..30476a7e7951 100644
--- a/drivers/watchdog/aspeed_wdt.c
+++ b/drivers/watchdog/aspeed_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2016 IBM Corporation
*
* Joel Stanley <joel@jms.id.au>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#include <linux/delay.h>
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index e12a797cb820..b45fc0aee667 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for Atmel AT91RM9200 (Thunder)
*
* Copyright (C) 2003 SAN People (Pty) Ltd
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 88c05d0448b2..f4050a229eb5 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for Atmel AT91SAM9x processors.
*
* Copyright (C) 2008 Renaud CERRATO r.cerrato@til-technologies.fr
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
/*
diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h
index b79a83b467ce..390941c65eee 100644
--- a/drivers/watchdog/at91sam9_wdt.h
+++ b/drivers/watchdog/at91sam9_wdt.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* drivers/watchdog/at91sam9_wdt.h
*
@@ -7,10 +8,6 @@
* Watchdog Timer (WDT) - System peripherals regsters.
* Based on AT91SAM9261 datasheet revision D.
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#ifndef AT91_WDT_H
diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c
index e2209bf5fa8a..54b124c9d0fa 100644
--- a/drivers/watchdog/ath79_wdt.c
+++ b/drivers/watchdog/ath79_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Atheros AR71XX/AR724X/AR913X built-in hardware watchdog timer.
*
@@ -11,9 +12,6 @@
* which again was based on sa1100 driver,
* Copyright (C) 2000 Oleg Drokin <green@crimea.edu>
*
- * 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 published
- * by the Free Software Foundation.
*
*/
diff --git a/drivers/watchdog/atlas7_wdt.c b/drivers/watchdog/atlas7_wdt.c
index 4abdcabd8219..e4f4b873028a 100644
--- a/drivers/watchdog/atlas7_wdt.c
+++ b/drivers/watchdog/atlas7_wdt.c
@@ -1,9 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for CSR Atlas7
*
* Copyright (c) 2015 Cambridge Silicon Radio Limited, a CSR plc group company.
*
- * Licensed under GPLv2.
*/
#include <linux/clk.h>
diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
index b339e0e67b4c..ed05514cc2dc 100644
--- a/drivers/watchdog/bcm2835_wdt.c
+++ b/drivers/watchdog/bcm2835_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for Broadcom BCM2835
*
@@ -7,10 +8,6 @@
*
* Copyright (C) 2013 Lubomir Rintel <lkundrak@v3.sk>
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#include <linux/delay.h>
diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c
index f41b756d6dd5..05425c1dfd4c 100644
--- a/drivers/watchdog/bcm47xx_wdt.c
+++ b/drivers/watchdog/bcm47xx_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for Broadcom BCM47XX
*
@@ -5,10 +6,6 @@
* Copyright (C) 2009 Matthieu CASTET <castet.matthieu@free.fr>
* Copyright (C) 2012-2013 Hauke Mehrtens <hauke@hauke-m.de>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c
index 8555afc70f9b..d3c1113e774c 100644
--- a/drivers/watchdog/bcm63xx_wdt.c
+++ b/drivers/watchdog/bcm63xx_wdt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Broadcom BCM63xx SoC watchdog driver
*
* Copyright (C) 2007, Miguel Gaio <miguel.gaio@efixo.com>
* Copyright (C) 2008, Florian Fainelli <florian@openwrt.org>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/bcm7038_wdt.c b/drivers/watchdog/bcm7038_wdt.c
index f88f546e8050..ce3f646e8077 100644
--- a/drivers/watchdog/bcm7038_wdt.c
+++ b/drivers/watchdog/bcm7038_wdt.c
@@ -1,15 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Broadcom Corporation
*
- * 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 the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/clk.h>
@@ -235,6 +227,6 @@ module_platform_driver(bcm7038_wdt_driver);
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Driver for Broadcom 7038 SoCs Watchdog");
MODULE_AUTHOR("Justin Chen");
diff --git a/drivers/watchdog/bcm_kona_wdt.c b/drivers/watchdog/bcm_kona_wdt.c
index a5775dfd8d5f..1462be9e6fc5 100644
--- a/drivers/watchdog/bcm_kona_wdt.c
+++ b/drivers/watchdog/bcm_kona_wdt.c
@@ -1,14 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2013 Broadcom Corporation
*
- * 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 the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/debugfs.h>
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c
index aa4d2e8a8ef9..5570395fc634 100644
--- a/drivers/watchdog/bfin_wdt.c
+++ b/drivers/watchdog/bfin_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Blackfin On-Chip Watchdog Driver
*
@@ -8,7 +9,6 @@
*
* Enter bugs at http://blackfin.uclinux.org/
*
- * Licensed under the GPL-2 or later.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 3ad1e44bef44..6fec159e59c4 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog timer for PowerPC Book-E systems
*
@@ -6,10 +7,6 @@
*
* Copyright 2005, 2008, 2010-2011 Freescale Semiconductor Inc.
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
index 064cf7b6c1c5..3ec1f418837d 100644
--- a/drivers/watchdog/cadence_wdt.c
+++ b/drivers/watchdog/cadence_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Cadence WDT driver - Used by Xilinx Zynq
*
* Copyright (C) 2010 - 2014 Xilinx, Inc.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#include <linux/clk.h>
diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index 4410337f4f7f..6bf9e3ae5b70 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -1,10 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* coh901327_wdt.c
*
- * Copyright (C) 2008-2009 ST-Ericsson AB
- * License terms: GNU General Public License (GPL) version 2
- * Watchdog driver for the ST-Ericsson AB COH 901 327 IP core
- * Author: Linus Walleij <linus.walleij@stericsson.com>
*/
#include <linux/module.h>
#include <linux/types.h>
@@ -419,5 +416,5 @@ MODULE_DESCRIPTION("COH 901 327 Watchdog");
module_param(margin, uint, 0);
MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:coh901327-watchdog");
diff --git a/drivers/watchdog/cpu5wdt.c b/drivers/watchdog/cpu5wdt.c
index 6cfb102c397c..b8f9381543ff 100644
--- a/drivers/watchdog/cpu5wdt.c
+++ b/drivers/watchdog/cpu5wdt.c
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* sma cpu5 watchdog driver
*
* Copyright (C) 2003 Heiko Ronsdorf <hero@ihg.uni-duisburg.de>
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index aee0b25cf10d..a21915f783be 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/* cpwd.c - driver implementation for hardware watchdog
* timers found on Sun Microsystems CP1400 and CP1500 boards.
*
diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c
index d6d5006efa71..e263bad99574 100644
--- a/drivers/watchdog/da9052_wdt.c
+++ b/drivers/watchdog/da9052_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* System monitoring driver for DA9052 PMICs.
*
@@ -5,11 +6,6 @@
*
* Author: Anthony Olech <Anthony.Olech@diasemi.com>
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/
#include <linux/module.h>
diff --git a/drivers/watchdog/da9055_wdt.c b/drivers/watchdog/da9055_wdt.c
index 50bdd1022186..26a5b2984094 100644
--- a/drivers/watchdog/da9055_wdt.c
+++ b/drivers/watchdog/da9055_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* System monitoring driver for DA9055 PMICs.
*
@@ -5,11 +6,6 @@
*
* Author: David Dajun Chen <dchen@diasemi.com>
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/
#include <linux/module.h>
diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
index 814dff6045a4..a001782bbfdb 100644
--- a/drivers/watchdog/da9062_wdt.c
+++ b/drivers/watchdog/da9062_wdt.c
@@ -1,16 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog device driver for DA9062 and DA9061 PMICs
* Copyright (C) 2015 Dialog Semiconductor Ltd.
*
- * 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 the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/kernel.h>
diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
index 2a20fc163ed0..b17ac1bb1f28 100644
--- a/drivers/watchdog/da9063_wdt.c
+++ b/drivers/watchdog/da9063_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for DA9063 PMICs.
*
@@ -5,10 +6,6 @@
*
* Author: Mariusz Wojtasik <mariusz.wojtasik@diasemi.com>
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#include <linux/kernel.h>
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 3e4c592c239f..e470f6498ade 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/char/watchdog/davinci_wdt.c
*
@@ -5,10 +6,6 @@
*
* Copyright (C) 2006-2013 Texas Instruments.
*
- * 2007 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
*/
#include <linux/module.h>
@@ -284,5 +281,5 @@ MODULE_PARM_DESC(heartbeat,
__MODULE_STRING(MAX_HEARTBEAT) ", default "
__MODULE_STRING(DEFAULT_HEARTBEAT));
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:davinci-wdt");
diff --git a/drivers/watchdog/diag288_wdt.c b/drivers/watchdog/diag288_wdt.c
index 806a04a676b7..0a674efd8d06 100644
--- a/drivers/watchdog/diag288_wdt.c
+++ b/drivers/watchdog/diag288_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for z/VM and LPAR using the diag 288 interface.
*
diff --git a/drivers/watchdog/digicolor_wdt.c b/drivers/watchdog/digicolor_wdt.c
index 5e4ef93caa02..a9e11df155b8 100644
--- a/drivers/watchdog/digicolor_wdt.c
+++ b/drivers/watchdog/digicolor_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for Conexant Digicolor
*
* Copyright (C) 2015 Paradox Innovation Ltd.
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#include <linux/types.h>
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index c2f4ff516230..66bd060bc297 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2010-2011 Picochip Ltd., Jamie Iles
* http://www.picochip.com
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* This file implements a driver for the Synopsys DesignWare watchdog device
* in the many subsystems. The watchdog has 16 different timeout periods
* and these are a function of the input clock frequency.
diff --git a/drivers/watchdog/ebc-c384_wdt.c b/drivers/watchdog/ebc-c384_wdt.c
index 2170b275ea01..c173b6f5c866 100644
--- a/drivers/watchdog/ebc-c384_wdt.c
+++ b/drivers/watchdog/ebc-c384_wdt.c
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog timer driver for the WinSystems EBC-C384
* Copyright (C) 2016 William Breathitt Gray
*
- * 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
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
*/
#include <linux/device.h>
#include <linux/dmi.h>
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
index f9b14e6efd9a..838d604bb608 100644
--- a/drivers/watchdog/ep93xx_wdt.c
+++ b/drivers/watchdog/ep93xx_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for Cirrus Logic EP93xx family of devices.
*
@@ -11,10 +12,6 @@
* Copyright (c) 2012 H Hartley Sweeten <hsweeten@visionengravers.com>
* Convert to a platform device and use the watchdog framework API
*
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- *
* This watchdog fires after 250msec, which is a too short interval
* for us to rely on the user space daemon alone. So we ping the
* wdt each ~200msec and eventually stop doing it if the user space
@@ -144,4 +141,4 @@ MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>");
MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
MODULE_AUTHOR("H Hartley Sweeten <hsweeten@visionengravers.com>");
MODULE_DESCRIPTION("EP93xx Watchdog");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/eurotechwdt.c b/drivers/watchdog/eurotechwdt.c
index 47f77a6fdfd6..6b87d6e06dfc 100644
--- a/drivers/watchdog/eurotechwdt.c
+++ b/drivers/watchdog/eurotechwdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Eurotech CPU-1220/1410/1420 on board WDT driver
*
@@ -11,11 +12,6 @@
* (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
* warranty for any of this software. This material is provided
* "AS-IS" and at no charge.
diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c
index e0678c14480f..86a722b38588 100644
--- a/drivers/watchdog/f71808e_wdt.c
+++ b/drivers/watchdog/f71808e_wdt.c
@@ -1,22 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/***************************************************************************
* Copyright (C) 2006 by Hans Edgington <hans@edgington.nl> *
* Copyright (C) 2007-2009 Hans de Goede <hdegoede@redhat.com> *
* Copyright (C) 2010 Giel van Schijndel <me@mortis.eu> *
- * *
- * 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 *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/ftwdt010_wdt.c b/drivers/watchdog/ftwdt010_wdt.c
index a9c2912ee280..efe84e198e61 100644
--- a/drivers/watchdog/ftwdt010_wdt.c
+++ b/drivers/watchdog/ftwdt010_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for Faraday Technology FTWDT010
*
@@ -6,9 +7,6 @@
* Inspired by the out-of-tree drivers from OpenWRT:
* Copyright (C) 2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
*
- * 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
- * published by the Free Software Foundation.
*/
#include <linux/bitops.h>
@@ -233,4 +231,4 @@ static struct platform_driver ftwdt010_wdt_driver = {
module_platform_driver(ftwdt010_wdt_driver);
MODULE_AUTHOR("Linus Walleij");
MODULE_DESCRIPTION("Watchdog driver for Faraday Technology FTWDT010");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c
index 006e2348022c..f397e6d2c4b8 100644
--- a/drivers/watchdog/gef_wdt.c
+++ b/drivers/watchdog/gef_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* GE watchdog userspace interface
*
@@ -5,11 +6,6 @@
*
* Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
* Based on: mv64x60_wdt.c (MV64X60 watchdog userspace interface)
* Author: James Chapman <jchapman@katalix.com>
*/
diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c
index 88e01238f01b..0fa5dcdbf13b 100644
--- a/drivers/watchdog/geodewdt.c
+++ b/drivers/watchdog/geodewdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/* Watchdog timer for machines with the CS5535/CS5536 companion chip
*
* Copyright (C) 2006-2007, Advanced Micro Devices, Inc.
* Copyright (C) 2009 Andres Salomon <dilinger@collabora.co.uk>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c
index 3ade28190341..b6c5cceef1bc 100644
--- a/drivers/watchdog/gpio_wdt.c
+++ b/drivers/watchdog/gpio_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Driver for watchdog device controlled through GPIO-line
*
* Author: 2013, Alexander Shiyan <shc_work@mail.ru>
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/
#include <linux/err.h>
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index f1f00dfc0e68..309640b42fed 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* HPE WatchDog Driver
* based on
@@ -7,10 +8,6 @@
* (c) Copyright 2015 Hewlett Packard Enterprise Development LP
* Thomas Mingarelli <thomas.mingarelli@hpe.com>
*
- * 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 published by the Free Software Foundation
- *
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -909,7 +906,7 @@ static struct pci_driver hpwdt_driver = {
MODULE_AUTHOR("Tom Mingarelli");
MODULE_DESCRIPTION("hp watchdog driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_VERSION(HPWDT_VERSION);
module_param(soft_margin, int, 0);
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
index 950c71a8bb22..c254cbb301a1 100644
--- a/drivers/watchdog/i6300esb.c
+++ b/drivers/watchdog/i6300esb.c
@@ -1,14 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* i6300esb: Watchdog timer driver for Intel 6300ESB chipset
*
* (c) Copyright 2004 Google Inc.
* (c) Copyright 2005 David Härdeman <david@2gen.com>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* based on i810-tco.c which is in turn based on softdog.c
*
* The timer is implemented in the following I/O controller hubs:
diff --git a/drivers/watchdog/iTCO_vendor_support.c b/drivers/watchdog/iTCO_vendor_support.c
index b6b2f90b5d44..9290f827e381 100644
--- a/drivers/watchdog/iTCO_vendor_support.c
+++ b/drivers/watchdog/iTCO_vendor_support.c
@@ -1,16 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* intel TCO vendor specific watchdog driver support
*
* (c) Copyright 2006-2009 Wim Van Sebroeck <wim@iguana.be>.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
- * provide warranty for any of this software. This material is
- * provided "AS-IS" and at no charge.
*/
/*
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 347f0389b089..161a99b8f6a4 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* intel TCO Watchdog Driver
*
* (c) Copyright 2006-2011 Wim Van Sebroeck <wim@iguana.be>.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
- * provide warranty for any of this software. This material is
- * provided "AS-IS" and at no charge.
- *
* The TCO watchdog is implemented in the following I/O controller hubs:
* (See the intel documentation on http://developer.intel.com.)
* document number 290655-003, 290677-014: 82801AA (ICH), 82801AB (ICHO)
diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c
index cc262284a6aa..5ec33701c431 100644
--- a/drivers/watchdog/ib700wdt.c
+++ b/drivers/watchdog/ib700wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* IB700 Single Board Computer WDT driver
*
@@ -14,11 +15,6 @@
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
* warranty for any of this software. This material is provided
* "AS-IS" and at no charge.
diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c
index 366b0474f278..7614a113e8d9 100644
--- a/drivers/watchdog/ibmasr.c
+++ b/drivers/watchdog/ibmasr.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* IBM Automatic Server Restart driver.
*
@@ -6,8 +7,6 @@
* Based on driver written by Pete Reynolds.
* Copyright (c) IBM Corporation, 1998-2004.
*
- * This software may be used and distributed according to the terms
- * of the GNU Public License, incorporated herein by reference.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/ie6xx_wdt.c b/drivers/watchdog/ie6xx_wdt.c
index 78c2541f5d52..d65279a1e091 100644
--- a/drivers/watchdog/ie6xx_wdt.c
+++ b/drivers/watchdog/ie6xx_wdt.c
@@ -1,24 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Intel Atom E6xx Watchdog driver
*
* Copyright (C) 2011 Alexander Stein
* <alexander.stein@systec-electronic.com>
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General
- * Public License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- * The full GNU General Public License is included in this
- * distribution in the file called COPYING.
- *
*/
#include <linux/module.h>
@@ -342,5 +328,5 @@ module_exit(ie6xx_wdt_exit);
MODULE_AUTHOR("Alexander Stein <alexander.stein@systec-electronic.com>");
MODULE_DESCRIPTION("Intel Atom E6xx Watchdog Device Driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:" DRIVER_NAME);
diff --git a/drivers/watchdog/imgpdc_wdt.c b/drivers/watchdog/imgpdc_wdt.c
index 6ed39dee995f..77dbef83b960 100644
--- a/drivers/watchdog/imgpdc_wdt.c
+++ b/drivers/watchdog/imgpdc_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Imagination Technologies PowerDown Controller Watchdog Timer.
*
* Copyright (c) 2014 Imagination Technologies Ltd.
*
- * 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 published by
- * the Free Software Foundation.
- *
* Based on drivers/watchdog/sunxi_wdt.c Copyright (c) 2013 Carlo Caione
* 2012 Henrik Nordstrom
*
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 518dfa1047cb..63bc93f92bfa 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for IMX2 and later processors
*
@@ -7,10 +8,6 @@
* some parts adapted by similar drivers from Darius Augulis and Vladimir
* Zapolskiy, additional improvements by Wim Van Sebroeck.
*
- * 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 published by
- * the Free Software Foundation.
- *
* NOTE: MX1 has a slightly different Watchdog than MX2 and later:
*
* MX1: MX2+:
diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c
index 5d20cdd30efe..27fda954e8e6 100644
--- a/drivers/watchdog/indydog.c
+++ b/drivers/watchdog/indydog.c
@@ -1,14 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* IndyDog 0.3 A Hardware Watchdog Device for SGI IP22
*
* (c) Copyright 2002 Guido Guenther <agx@sigxcpu.org>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
*/
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index 72c108a12c19..21f5cb0f3d81 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* intel-mid_wdt: generic Intel MID SCU watchdog driver
*
@@ -7,9 +8,6 @@
* Copyright (C) 2014 Intel Corporation. All rights reserved.
* Contact: David Cohen <david.a.cohen@linux.intel.com>
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General
- * Public License as published by the Free Software Foundation.
*/
#include <linux/interrupt.h>
@@ -185,4 +183,4 @@ module_platform_driver(mid_wdt_driver);
MODULE_AUTHOR("David Cohen <david.a.cohen@linux.intel.com>");
MODULE_DESCRIPTION("Watchdog Driver for Intel MID platform");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/intel_scu_watchdog.c b/drivers/watchdog/intel_scu_watchdog.c
index 0caab6241eb7..df4390720701 100644
--- a/drivers/watchdog/intel_scu_watchdog.c
+++ b/drivers/watchdog/intel_scu_watchdog.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Intel_SCU 0.2: An Intel SCU IOH Based Watchdog Device
* for Intel part #(s):
@@ -5,21 +6,6 @@
*
* Copyright (C) 2009-2010 Intel Corporation. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General
- * Public License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- * The full GNU General Public License is included in this
- * distribution in the file called COPYING.
- *
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -561,5 +547,5 @@ module_exit(intel_scu_watchdog_exit);
MODULE_AUTHOR("Intel Corporation");
MODULE_DESCRIPTION("Intel SCU Watchdog Device Driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_VERSION(WDT_VER);
diff --git a/drivers/watchdog/intel_scu_watchdog.h b/drivers/watchdog/intel_scu_watchdog.h
index f3ac608deb6a..0efb5ba92f70 100644
--- a/drivers/watchdog/intel_scu_watchdog.h
+++ b/drivers/watchdog/intel_scu_watchdog.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Intel_SCU 0.2: An Intel SCU IOH Based Watchdog Device
* for Intel part #(s):
@@ -5,21 +6,6 @@
*
* Copyright (C) 2009-2010 Intel Corporation. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General
- * Public License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- * The full GNU General Public License is included in this
- * distribution in the file called COPYING.
- *
*/
#ifndef __INTEL_SCU_WATCHDOG_H
diff --git a/drivers/watchdog/iop_wdt.c b/drivers/watchdog/iop_wdt.c
index b16013ffacc2..d5212ccb300b 100644
--- a/drivers/watchdog/iop_wdt.c
+++ b/drivers/watchdog/iop_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* drivers/char/watchdog/iop_wdt.c
*
@@ -6,19 +7,6 @@
*
* Based on ixp4xx driver, Copyright 2004 (c) MontaVista, Software, Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
* Curt E Bruns <curt.e.bruns@intel.com>
* Peter Milne <peter.milne@d-tacq.com>
* Dan Williams <dan.j.williams@intel.com>
@@ -258,4 +246,4 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
MODULE_AUTHOR("Curt E Bruns <curt.e.bruns@intel.com>");
MODULE_DESCRIPTION("iop watchdog timer driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c
index 41b3979a9d87..62ec936dd775 100644
--- a/drivers/watchdog/it8712f_wdt.c
+++ b/drivers/watchdog/it8712f_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* IT8712F "Smart Guardian" Watchdog support
*
@@ -9,15 +10,6 @@
* drivers/hwmon/it87.c
* IT8712F EC-LPC I/O Preliminary Specification 0.8.2
* IT8712F EC-LPC I/O Preliminary Specification 0.9.3
- *
- * 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 the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * The author(s) of this software shall not be held liable for damages
- * of any nature resulting due to the use of this software. This
- * software is provided AS-IS with no warranties.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c
index e96faea24925..c426d583ea54 100644
--- a/drivers/watchdog/it87_wdt.c
+++ b/drivers/watchdog/it87_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog Timer Driver
* for ITE IT87xx Environment Control - Low Pin Count Input / Output
@@ -16,15 +17,6 @@
* IT8702, IT8712, IT8716, IT8718, IT8720, IT8721, IT8726, IT8728,
* and IT8783.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/ixp4xx_wdt.c b/drivers/watchdog/ixp4xx_wdt.c
index f20cc53ff719..0b380f751443 100644
--- a/drivers/watchdog/ixp4xx_wdt.c
+++ b/drivers/watchdog/ixp4xx_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/char/watchdog/ixp4xx_wdt.c
*
@@ -8,9 +9,6 @@
* Copyright 2004 (c) MontaVista, Software, Inc.
* Based on sa1100 driver, Copyright (C) 2000 Oleg Drokin <green@crimea.edu>
*
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -207,4 +205,4 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds (default 60s)");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
index aafbeb96561b..1124ffb4266b 100644
--- a/drivers/watchdog/jz4740_wdt.c
+++ b/drivers/watchdog/jz4740_wdt.c
@@ -1,16 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2010, Paul Cercueil <paul@crapouillou.net>
* JZ4740 Watchdog driver
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
*/
#include <linux/module.h>
diff --git a/drivers/watchdog/kempld_wdt.c b/drivers/watchdog/kempld_wdt.c
index 2f3b049ea301..2c38aceb3d61 100644
--- a/drivers/watchdog/kempld_wdt.c
+++ b/drivers/watchdog/kempld_wdt.c
@@ -1,18 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Kontron PLD watchdog driver
*
* Copyright (c) 2010-2013 Kontron Europe GmbH
* Author: Michael Brunner <michael.brunner@kontron.com>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License 2 as published
- * by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
* Note: From the PLD watchdog point of view timeout and pretimeout are
* defined differently than in the kernel.
* First the pretimeout stage runs out before the timeout stage gets
@@ -582,4 +574,4 @@ module_platform_driver(kempld_wdt_driver);
MODULE_DESCRIPTION("KEM PLD Watchdog Driver");
MODULE_AUTHOR("Michael Brunner <michael.brunner@kontron.com>");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c
index 1e41818a44bc..acf6b551f467 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -1,11 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for Kendin/Micrel KS8695.
*
* (C) 2007 Andrew Victor
*
- * 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
- * published by the Free Software Foundation.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -318,5 +316,5 @@ module_exit(ks8695_wdt_exit);
MODULE_AUTHOR("Andrew Victor");
MODULE_DESCRIPTION("Watchdog driver for KS8695");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:ks8695_wdt");
diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c
index 7f43cefa0eae..c052ef130382 100644
--- a/drivers/watchdog/lantiq_wdt.c
+++ b/drivers/watchdog/lantiq_wdt.c
@@ -1,8 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * 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 published
- * by the Free Software Foundation.
- *
* Copyright (C) 2010 John Crispin <john@phrozen.org>
* Copyright (C) 2017 Hauke Mehrtens <hauke@hauke-m.de>
* Based on EP93xx wdt driver
@@ -306,4 +303,4 @@ module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
MODULE_AUTHOR("John Crispin <john@phrozen.org>");
MODULE_DESCRIPTION("Lantiq SoC Watchdog");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/loongson1_wdt.c b/drivers/watchdog/loongson1_wdt.c
index 3aee50c64a36..a338f30bbe7c 100644
--- a/drivers/watchdog/loongson1_wdt.c
+++ b/drivers/watchdog/loongson1_wdt.c
@@ -1,10 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2016 Yang Ling <gnaygnil@gmail.com>
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#include <linux/clk.h>
diff --git a/drivers/watchdog/lpc18xx_wdt.c b/drivers/watchdog/lpc18xx_wdt.c
index b4221f43cd94..afaa167cdf6e 100644
--- a/drivers/watchdog/lpc18xx_wdt.c
+++ b/drivers/watchdog/lpc18xx_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* NXP LPC18xx Watchdog Timer (WDT)
*
* Copyright (c) 2015 Ariel D'Alessandro <ariel@vanguardiasur.com>
*
- * 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 published by
- * the Free Software Foundation.
- *
* Notes
* -----
* The Watchdog consists of a fixed divide-by-4 clock pre-scaler and a 24-bit
diff --git a/drivers/watchdog/m54xx_wdt.c b/drivers/watchdog/m54xx_wdt.c
index da6fa2b68074..0734fd0412fb 100644
--- a/drivers/watchdog/m54xx_wdt.c
+++ b/drivers/watchdog/m54xx_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/watchdog/m54xx_wdt.c
*
@@ -11,9 +12,6 @@
* Copyright 2004 (c) MontaVista, Software, Inc.
* Based on sa1100 driver, Copyright (C) 2000 Oleg Drokin <green@crimea.edu>
*
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -222,4 +220,4 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds (default 30s)");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
index 88d823d87a4b..bc40a8c64b04 100644
--- a/drivers/watchdog/machzwd.c
+++ b/drivers/watchdog/machzwd.c
@@ -1,16 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* MachZ ZF-Logic Watchdog Timer driver for Linux
*
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * The author does NOT admit liability nor provide warranty for
- * any of this software. This material is provided "AS-IS" in
- * the hope that it may be useful for others.
- *
* Author: Fernando Fuganti <fuganti@conectiva.com.br>
*
* Based on sbc60xxwdt.c by Jakob Oestergaard
diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c
index ac5840d9689a..b70517a98101 100644
--- a/drivers/watchdog/max63xx_wdt.c
+++ b/drivers/watchdog/max63xx_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/char/watchdog/max63xx_wdt.c
*
@@ -5,10 +6,6 @@
*
* Copyright (C) 2009 Marc Zyngier <maz@misterjones.org>
*
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- *
* This driver assumes the watchdog pins are memory mapped (as it is
* the case for the Arcom Zeus). Should it be connected over GPIOs or
* another interface, some abstraction will have to be introduced.
diff --git a/drivers/watchdog/max77620_wdt.c b/drivers/watchdog/max77620_wdt.c
index 2c9f53eaff4f..a65fa81ade2f 100644
--- a/drivers/watchdog/max77620_wdt.c
+++ b/drivers/watchdog/max77620_wdt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Maxim MAX77620 Watchdog Driver
*
* Copyright (C) 2016 NVIDIA CORPORATION. All rights reserved.
*
* Author: Laxman Dewangan <ldewangan@nvidia.com>
- *
- * 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
- * published by the Free Software Foundation.
*/
#include <linux/err.h>
diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
index b8194b02abe0..8023cf28657a 100644
--- a/drivers/watchdog/mei_wdt.c
+++ b/drivers/watchdog/mei_wdt.c
@@ -1,15 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Intel Management Engine Interface (Intel MEI) Linux driver
* Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
*/
#include <linux/module.h>
@@ -687,5 +679,5 @@ static struct mei_cl_driver mei_wdt_driver = {
module_mei_cl_driver(mei_wdt_driver);
MODULE_AUTHOR("Intel Corporation");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Device driver for Intel MEI iAMT watchdog");
diff --git a/drivers/watchdog/mena21_wdt.c b/drivers/watchdog/mena21_wdt.c
index 045201a6fdb3..25d5d2b8cfbe 100644
--- a/drivers/watchdog/mena21_wdt.c
+++ b/drivers/watchdog/mena21_wdt.c
@@ -1,11 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for the A21 VME CPU Boards
*
* Copyright (C) 2013 MEN Mikro Elektronik Nuernberg GmbH
*
- * 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 the Free Software Foundation
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
diff --git a/drivers/watchdog/menf21bmc_wdt.c b/drivers/watchdog/menf21bmc_wdt.c
index 3aefddebb386..9f9662151d2a 100644
--- a/drivers/watchdog/menf21bmc_wdt.c
+++ b/drivers/watchdog/menf21bmc_wdt.c
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* MEN 14F021P00 Board Management Controller (BMC) Watchdog Driver.
*
* Copyright (C) 2014 MEN Mikro Elektronik Nuernberg GmbH
- *
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#include <linux/kernel.h>
@@ -199,5 +195,5 @@ module_platform_driver(menf21bmc_wdt);
MODULE_DESCRIPTION("MEN 14F021P00 BMC Watchdog driver");
MODULE_AUTHOR("Andreas Werner <andreas.werner@men.de>");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:menf21bmc_wdt");
diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index 69a5a57f1446..500463c3e040 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -1,57 +1,4 @@
-/*
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
- * Copyright (c) 2016 BayLibre, SAS.
- * Author: Neil Armstrong <narmstrong@baylibre.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- * The full GNU General Public License is included in this distribution
- * in the file called COPYING.
- *
- * BSD LICENSE
- *
- * Copyright (c) 2016 BayLibre, SAS.
- * Author: Neil Armstrong <narmstrong@baylibre.com>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Intel Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
index 304274c67735..4979ab931ca8 100644
--- a/drivers/watchdog/meson_wdt.c
+++ b/drivers/watchdog/meson_wdt.c
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Meson Watchdog Driver
*
* Copyright (c) 2014 Carlo Caione
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#include <linux/clk.h>
diff --git a/drivers/watchdog/mixcomwd.c b/drivers/watchdog/mixcomwd.c
index 3cc07447c655..aca8d13f6391 100644
--- a/drivers/watchdog/mixcomwd.c
+++ b/drivers/watchdog/mixcomwd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* MixCom Watchdog: A Simple Hardware Watchdog Device
* Based on Softdog driver by Alan Cox and PC Watchdog driver by Ken Hollis
@@ -6,11 +7,6 @@
*
* Copyright (c) 1999 ITConsult-Pro Co. <info@itc.hu>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* Version 0.1 (99/04/15):
* - first version
*
diff --git a/drivers/watchdog/moxart_wdt.c b/drivers/watchdog/moxart_wdt.c
index 2c4a73d1e214..bf7478d01fe6 100644
--- a/drivers/watchdog/moxart_wdt.c
+++ b/drivers/watchdog/moxart_wdt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* MOXA ART SoCs watchdog driver.
*
* Copyright (C) 2013 Jonas Jensen
*
* Jonas Jensen <jonas.jensen@gmail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#include <linux/clk.h>
@@ -174,5 +171,5 @@ module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds");
MODULE_DESCRIPTION("MOXART watchdog driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Jonas Jensen <jonas.jensen@gmail.com>");
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index aca2d6323f8a..98fd806c13ec 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* mpc8xxx_wdt.c - MPC8xx/MPC83xx/MPC86xx watchdog userspace interface
*
@@ -10,11 +11,6 @@
*
* Note: it appears that you can only actually ENABLE or DISABLE the thing
* once after POR. Once enabled, you cannot disable, and vice versa.
- *
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index 5c4a764717c4..627a1a5e49fa 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Ralink MT7621/MT7628 built-in hardware watchdog timer
*
* Copyright (C) 2014 John Crispin <john@phrozen.org>
*
* This driver was based on: drivers/watchdog/rt2880_wdt.c
- *
- * 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 published
- * by the Free Software Foundation.
*/
#include <linux/clk.h>
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 7ed417a765c7..498e7d4e1b66 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Mediatek Watchdog Driver
*
@@ -5,16 +6,6 @@
*
* Matthias Brugger <matthias.bgg@gmail.com>
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
* Based on sunxi_wdt.c
*/
diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c
index ca360d204548..1fa7d2b32494 100644
--- a/drivers/watchdog/mtx-1_wdt.c
+++ b/drivers/watchdog/mtx-1_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Driver for the MTX-1 Watchdog.
*
@@ -6,16 +7,6 @@
* http://www.4g-systems.biz
*
* (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org>
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Michael Stickel nor 4G Systems admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 2005 4G Systems <info@4g-systems.biz>
*
* Release 0.01.
diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c
index 315275d7bab6..c237d37e94c6 100644
--- a/drivers/watchdog/mv64x60_wdt.c
+++ b/drivers/watchdog/mv64x60_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* mv64x60_wdt.c - MV64X60 (Marvell Discovery) watchdog userspace interface
*
@@ -9,10 +10,7 @@
*
* Derived from mpc8xx_wdt.c, with the following copyright.
*
- * 2002 (c) Florian Schirmer <jolt@tuxbox.org> This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
+ * 2002 (c) Florian Schirmer <jolt@tuxbox.org>
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/ni903x_wdt.c b/drivers/watchdog/ni903x_wdt.c
index dc67742e9018..350054b962a5 100644
--- a/drivers/watchdog/ni903x_wdt.c
+++ b/drivers/watchdog/ni903x_wdt.c
@@ -1,15 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2016 National Instruments Corp.
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/acpi.h>
diff --git a/drivers/watchdog/nic7018_wdt.c b/drivers/watchdog/nic7018_wdt.c
index dcd265685837..144821b206b7 100644
--- a/drivers/watchdog/nic7018_wdt.c
+++ b/drivers/watchdog/nic7018_wdt.c
@@ -1,15 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2016 National Instruments Corp.
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/acpi.h>
diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c
index 830bd04ff911..6d3edfa625c9 100644
--- a/drivers/watchdog/nuc900_wdt.c
+++ b/drivers/watchdog/nuc900_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2009 Nuvoton technology corporation.
*
* Wan ZongShun <mcuos.com@gmail.com>
*
- * 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
- * the Free Software Foundation;version 2 of the License.
- *
*/
#include <linux/bitops.h>
@@ -304,5 +301,5 @@ module_platform_driver(nuc900wdt_driver);
MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
MODULE_DESCRIPTION("Watchdog driver for NUC900");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:nuc900-wdt");
diff --git a/drivers/watchdog/nv_tco.c b/drivers/watchdog/nv_tco.c
index a0fabf6f92b0..0328981b8d84 100644
--- a/drivers/watchdog/nv_tco.c
+++ b/drivers/watchdog/nv_tco.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* nv_tco 0.01: TCO timer driver for NV chipsets
*
@@ -8,11 +9,6 @@
* Reserved.
* http://www.kernelconcepts.de
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* TCO timer driver for NV chipsets
* based on softdog.c by Alan Cox <alan@redhat.com>
*/
diff --git a/drivers/watchdog/nv_tco.h b/drivers/watchdog/nv_tco.h
index c2d1d04e055b..860499d36832 100644
--- a/drivers/watchdog/nv_tco.h
+++ b/drivers/watchdog/nv_tco.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* nv_tco: TCO timer driver for nVidia chipsets.
*
@@ -10,15 +11,6 @@
* Reserved.
* http://www.kernelconcepts.de
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither kernel concepts nor Nils Faerber admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>
* developed for
* Jentro AG, Haar/Munich (Germany)
diff --git a/drivers/watchdog/octeon-wdt-main.c b/drivers/watchdog/octeon-wdt-main.c
index 0ec419a3f7ed..9c0d9bb09c60 100644
--- a/drivers/watchdog/octeon-wdt-main.c
+++ b/drivers/watchdog/octeon-wdt-main.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Octeon Watchdog driver
*
@@ -9,16 +10,6 @@
*
* (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
* This file is subject to the terms and conditions of the GNU General Public
diff --git a/drivers/watchdog/octeon-wdt-nmi.S b/drivers/watchdog/octeon-wdt-nmi.S
index 97f6eb7b5a8e..9c102049eeb2 100644
--- a/drivers/watchdog/octeon-wdt-nmi.S
+++ b/drivers/watchdog/octeon-wdt-nmi.S
@@ -1,8 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
* Copyright (C) 2007-2017 Cavium, Inc.
*/
#include <asm/asm.h>
diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
index 1cf286945b7a..4acbe05e27bb 100644
--- a/drivers/watchdog/of_xilinx_wdt.c
+++ b/drivers/watchdog/of_xilinx_wdt.c
@@ -1,13 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog Device Driver for Xilinx axi/xps_timebase_wdt
*
* (C) Copyright 2013 - 2014 Xilinx, Inc.
* (C) Copyright 2011 (Alejandro Cabrera <aldaya@gmail.com>)
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#include <linux/clk.h>
@@ -323,4 +319,4 @@ module_platform_driver(xwdt_driver);
MODULE_AUTHOR("Alejandro Cabrera <aldaya@gmail.com>");
MODULE_DESCRIPTION("Xilinx Watchdog driver");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 1b02bfa81b29..e349412c00b5 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* omap_wdt.c
*
diff --git a/drivers/watchdog/omap_wdt.h b/drivers/watchdog/omap_wdt.h
index 42f31ec5e90d..950b4643f3e7 100644
--- a/drivers/watchdog/omap_wdt.h
+++ b/drivers/watchdog/omap_wdt.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* linux/drivers/char/watchdog/omap_wdt.h
*
@@ -5,26 +6,6 @@
* OMAP Watchdog timer register definitions
*
* Copyright (C) 2004 Texas Instruments.
- *
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _OMAP_WATCHDOG_H
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index ea676d233e1e..966dede7551c 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/watchdog/orion_wdt.c
*
* Watchdog driver for Orion/Kirkwood processors
*
* Author: Sylver Bruneau <sylver.bruneau@googlemail.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c
index 06a892e36a8d..09c8a0637437 100644
--- a/drivers/watchdog/pc87413_wdt.c
+++ b/drivers/watchdog/pc87413_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* NS pc87413-wdt Watchdog Timer driver for Linux 2.6.x.x
*
@@ -6,15 +7,6 @@
* (C) Copyright 2006 Sven Anders, <anders@anduras.de>
* and Marcus Junker, <junker@anduras.de>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Sven Anders, Marcus Junker nor ANDURAS AG
- * admit liability nor provide warranty for any of this software.
- * This material is provided "AS-IS" and at no charge.
- *
* Release 1.1
*/
diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
index b72ce68eacd3..1b7bfe15713c 100644
--- a/drivers/watchdog/pcwd.c
+++ b/drivers/watchdog/pcwd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* PC Watchdog Driver
* by Ken Hollis (khollis@bitgate.com)
diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c
index 1f78f0908621..134a5c53a050 100644
--- a/drivers/watchdog/pcwd_pci.c
+++ b/drivers/watchdog/pcwd_pci.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Berkshire PCI-PC Watchdog Card Driver
*
@@ -9,15 +10,6 @@
* Alan Cox <alan@lxorguk.ukuu.org.uk>,
* Matt Domsch <Matt_Domsch@dell.com>,
* Rob Radez <rob@osinvestor.com>
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
- * provide warranty for any of this software. This material is
- * provided "AS-IS" and at no charge.
*/
/*
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
index 4d02f26156f9..bee86eea512a 100644
--- a/drivers/watchdog/pcwd_usb.c
+++ b/drivers/watchdog/pcwd_usb.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Berkshire USB-PC Watchdog Card Driver
*
@@ -10,15 +11,6 @@
* Rob Radez <rob@osinvestor.com>,
* Greg Kroah-Hartman <greg@kroah.com>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
- * provide warranty for any of this software. This material is
- * provided "AS-IS" and at no charge.
- *
* Thanks also to Simon Machell at Berkshire Products Inc. for
* providing the test hardware. More info is available at
* http://www.berkprod.com/ or http://www.pcwatchdog.com/
diff --git a/drivers/watchdog/pic32-dmt.c b/drivers/watchdog/pic32-dmt.c
index c797305f8338..432506df112c 100644
--- a/drivers/watchdog/pic32-dmt.c
+++ b/drivers/watchdog/pic32-dmt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* PIC32 deadman timer driver
*
* Purna Chandra Mandal <purna.mandal@microchip.com>
* Copyright (c) 2016, Microchip Technology Inc.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#include <linux/clk.h>
#include <linux/device.h>
diff --git a/drivers/watchdog/pic32-wdt.c b/drivers/watchdog/pic32-wdt.c
index e2761068dc6f..bb908c6b0469 100644
--- a/drivers/watchdog/pic32-wdt.c
+++ b/drivers/watchdog/pic32-wdt.c
@@ -1,13 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* PIC32 watchdog driver
*
* Joshua Henderson <joshua.henderson@microchip.com>
* Copyright (c) 2016, Microchip Technology Inc.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#include <linux/clk.h>
#include <linux/device.h>
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
index e0a6f8c0f03c..71479b151162 100644
--- a/drivers/watchdog/pika_wdt.c
+++ b/drivers/watchdog/pika_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* PIKA FPGA based Watchdog Timer
*
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 0529aed158a4..1981c7d21f28 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/char/watchdog/pnx4008_wdt.c
*
@@ -11,10 +12,6 @@
* 2005-2006 (c) MontaVista Software, Inc.
*
* (C) 2012 Wolfram Sang, Pengutronix
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -268,5 +265,5 @@ module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Set to 1 to keep watchdog running after device release");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:pnx4008-watchdog");
diff --git a/drivers/watchdog/pnx833x_wdt.c b/drivers/watchdog/pnx833x_wdt.c
index 882fdcb46ad1..45c8158adcea 100644
--- a/drivers/watchdog/pnx833x_wdt.c
+++ b/drivers/watchdog/pnx833x_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* PNX833x Hardware Watchdog Driver
* Copyright 2008 NXP Semiconductors
@@ -9,11 +10,6 @@
*
* (c) Copyright 2002 Guido Guenther <agx@sigxcpu.org>, All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* based on softdog.c by Alan Cox <alan@redhat.com>
*/
diff --git a/drivers/watchdog/pretimeout_noop.c b/drivers/watchdog/pretimeout_noop.c
index 85f5299d197c..2a553a14f1c8 100644
--- a/drivers/watchdog/pretimeout_noop.c
+++ b/drivers/watchdog/pretimeout_noop.c
@@ -1,11 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015-2016 Mentor Graphics
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/
#include <linux/module.h>
diff --git a/drivers/watchdog/pretimeout_panic.c b/drivers/watchdog/pretimeout_panic.c
index 0c197a1c97f4..dde400a2fb5d 100644
--- a/drivers/watchdog/pretimeout_panic.c
+++ b/drivers/watchdog/pretimeout_panic.c
@@ -1,11 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015-2016 Mentor Graphics
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/
#include <linux/kernel.h>
diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
index 780971318810..1b5b56944872 100644
--- a/drivers/watchdog/qcom-wdt.c
+++ b/drivers/watchdog/qcom-wdt.c
@@ -1,14 +1,6 @@
-/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.
*/
#include <linux/clk.h>
#include <linux/delay.h>
diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index 831ef83f6de1..8436fc74b0c6 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -1,12 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for Renesas WDT watchdog
*
* Copyright (C) 2015-17 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
* Copyright (C) 2015-17 Renesas Electronics Corporation
*
- * 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 published by
- * the Free Software Foundation.
*/
#include <linux/bitops.h>
#include <linux/clk.h>
diff --git a/drivers/watchdog/retu_wdt.c b/drivers/watchdog/retu_wdt.c
index 39cd51df2ffc..258dfcf9cbda 100644
--- a/drivers/watchdog/retu_wdt.c
+++ b/drivers/watchdog/retu_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Retu watchdog driver
*
@@ -5,15 +6,6 @@
*
* Based on code written by Amit Kucheria and Michael Buesch.
* Rewritten by Aaro Koskinen.
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of this
- * archive for more details.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/slab.h>
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c
index aba53424605e..2f343609f8e9 100644
--- a/drivers/watchdog/riowd.c
+++ b/drivers/watchdog/riowd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/* riowd.c - driver for hw watchdog inside Super I/O of RIO
*
* Copyright (C) 2001, 2008 David S. Miller (davem@davemloft.net)
diff --git a/drivers/watchdog/rn5t618_wdt.c b/drivers/watchdog/rn5t618_wdt.c
index e60f55702ab7..9111909fde24 100644
--- a/drivers/watchdog/rn5t618_wdt.c
+++ b/drivers/watchdog/rn5t618_wdt.c
@@ -1,14 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for Ricoh RN5T618 PMIC
*
* Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
- *
- * 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 published by the Free Software Foundation.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/device.h>
diff --git a/drivers/watchdog/rt2880_wdt.c b/drivers/watchdog/rt2880_wdt.c
index 98967f0a7d10..e4453c8fe149 100644
--- a/drivers/watchdog/rt2880_wdt.c
+++ b/drivers/watchdog/rt2880_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Ralink RT288x/RT3xxx/MT76xx built-in hardware watchdog timer
*
@@ -5,10 +6,6 @@
* Copyright (C) 2013 John Crispin <john@phrozen.org>
*
* This driver was based on: drivers/watchdog/softdog.c
- *
- * 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 published
- * by the Free Software Foundation.
*/
#include <linux/clk.h>
diff --git a/drivers/watchdog/rtd119x_wdt.c b/drivers/watchdog/rtd119x_wdt.c
index d001c17ddfde..4f4411cab9b7 100644
--- a/drivers/watchdog/rtd119x_wdt.c
+++ b/drivers/watchdog/rtd119x_wdt.c
@@ -1,9 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Realtek RTD129x watchdog
*
* Copyright (c) 2017 Andreas Färber
*
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <linux/bitops.h>
diff --git a/drivers/watchdog/rza_wdt.c b/drivers/watchdog/rza_wdt.c
index e618218d2374..c63ef03e24f6 100644
--- a/drivers/watchdog/rza_wdt.c
+++ b/drivers/watchdog/rza_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Renesas RZ/A Series WDT Driver
*
* Copyright (C) 2017 Renesas Electronics America, Inc.
* Copyright (C) 2017 Chris Brandt
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
*/
#include <linux/bitops.h>
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index adaa43543f0a..318a5762e10a 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2004 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
@@ -6,16 +7,6 @@
*
* Based on, softdog.c by Alan Cox,
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/module.h>
diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c
index d3be4f831db5..8805a98b5400 100644
--- a/drivers/watchdog/sa1100_wdt.c
+++ b/drivers/watchdog/sa1100_wdt.c
@@ -1,18 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for the SA11x0/PXA2xx
*
* (c) Copyright 2000 Oleg Drokin <green@crimea.edu>
* Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk>
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Oleg Drokin nor iXcelerator.com admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 2000 Oleg Drokin <green@crimea.edu>
*
* 27/11/2000 Initial release
diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
index 0ae947c3d7bc..47d0368caef2 100644
--- a/drivers/watchdog/sama5d4_wdt.c
+++ b/drivers/watchdog/sama5d4_wdt.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Driver for Atmel SAMA5D4 Watchdog Timer
*
* Copyright (C) 2015 Atmel Corporation
- *
- * Licensed under GPLv2.
*/
#include <linux/delay.h>
diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
index 3abae50773b8..1bd2145b12c4 100644
--- a/drivers/watchdog/sb_wdog.c
+++ b/drivers/watchdog/sb_wdog.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-1.0 OR GPL-2.0
/*
* Watchdog driver for SiByte SB1 SoCs
*
@@ -38,10 +39,6 @@
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 1 or 2 as published by the Free Software Foundation.
- *
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c
index 87333a41f753..663c386abe89 100644
--- a/drivers/watchdog/sbc60xxwdt.c
+++ b/drivers/watchdog/sbc60xxwdt.c
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* 60xx Single Board Computer Watchdog Timer driver for Linux 2.2.x
*
* Based on acquirewdt.c by Alan Cox.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * The author does NOT admit liability nor provide warranty for
- * any of this software. This material is provided "AS-IS" in
- * the hope that it may be useful for others.
- *
* (c) Copyright 2000 Jakob Oestergaard <jakob@unthought.net>
*
* 12/4 - 2000 [Initial revision]
diff --git a/drivers/watchdog/sbc7240_wdt.c b/drivers/watchdog/sbc7240_wdt.c
index 5f268add17ce..4da02054c7a5 100644
--- a/drivers/watchdog/sbc7240_wdt.c
+++ b/drivers/watchdog/sbc7240_wdt.c
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* NANO7240 SBC Watchdog device driver
*
* Based on w83877f.c by Scott Jennings,
*
- * 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
- * published by the Free Software Foundation;
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
* (c) Copyright 2007 Gilles GIGAN <gilles.gigan@jcu.edu.au>
*
*/
@@ -308,4 +300,4 @@ module_exit(sbc7240_wdt_unload);
MODULE_AUTHOR("Gilles Gigan");
MODULE_DESCRIPTION("Watchdog device driver for single board"
" computers EPIC Nano 7240 from iEi");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/sbc8360.c b/drivers/watchdog/sbc8360.c
index da60560ca446..e74c5cf9ea14 100644
--- a/drivers/watchdog/sbc8360.c
+++ b/drivers/watchdog/sbc8360.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* SBC8360 Watchdog driver
*
@@ -19,15 +20,6 @@
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
* 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
diff --git a/drivers/watchdog/sbc_epx_c3.c b/drivers/watchdog/sbc_epx_c3.c
index a1c502e0d8ec..3fb6e7f1287d 100644
--- a/drivers/watchdog/sbc_epx_c3.c
+++ b/drivers/watchdog/sbc_epx_c3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* SBC EPX C3 0.1 A Hardware Watchdog Device for the Winsystems EPX-C3
* single board computer
@@ -5,11 +6,6 @@
* (c) Copyright 2006 Calin A. Culianu <calin@ajvar.org>, All Rights
* Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
*/
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c
index a517d8bae757..85d9fb57367b 100644
--- a/drivers/watchdog/sbc_fitpc2_wdt.c
+++ b/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for SBC-FITPC2 board
*
* Author: Denis Turischev <denis@compulab.co.il>
*
* Adapted from the IXP2000 watchdog driver by Deepak Saxena.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#define pr_fmt(fmt) KBUILD_MODNAME " WATCHDOG: " fmt
@@ -262,4 +259,4 @@ MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 316c2eb122d2..a2a9e7e8a38f 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* SBSA(Server Base System Architecture) Generic Watchdog driver
*
@@ -7,15 +8,6 @@
* Al Stone <al.stone@linaro.org>
* Timur Tabi <timur@codeaurora.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License 2 as published
- * by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
* ARM SBSA Generic Watchdog has two stage timeouts:
* the first signal (WS0) is for alerting the system by interrupt,
* the second one (WS1) is a real hardware reset.
diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c
index 8e4e2fc13f87..1aad3afac393 100644
--- a/drivers/watchdog/sc1200wdt.c
+++ b/drivers/watchdog/sc1200wdt.c
@@ -1,18 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver
* (c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com>,
* All Rights Reserved.
* Based on wdt.c and wdt977.c by Alan Cox and Woody Suwalski respectively.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * The author(s) of this software shall not be held liable for damages
- * of any nature resulting due to the use of this software. This
- * software is provided AS-IS with no warranties.
- *
* Changelog:
* 20020220 Zwane Mwaikambo Code based on datasheet, no hardware.
* 20020221 Zwane Mwaikambo Cleanups as suggested by Jeff Garzik
diff --git a/drivers/watchdog/sc520_wdt.c b/drivers/watchdog/sc520_wdt.c
index 6aadb56e7faa..c9a17898d65c 100644
--- a/drivers/watchdog/sc520_wdt.c
+++ b/drivers/watchdog/sc520_wdt.c
@@ -1,18 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* AMD Elan SC520 processor Watchdog Timer driver
*
* Based on acquirewdt.c by Alan Cox,
* and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * The authors do NOT admit liability nor provide warranty for
- * any of this software. This material is provided "AS-IS" in
- * the hope that it may be useful for others.
- *
* (c) Copyright 2001 Scott Jennings <linuxdrivers@oro.net>
* 9/27 - 2001 [Initial release]
*
diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c
index 43d0cbb7ba0b..2f41e66ad644 100644
--- a/drivers/watchdog/sch311x_wdt.c
+++ b/drivers/watchdog/sch311x_wdt.c
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* sch311x_wdt.c - Driver for the SCH311x Super-I/O chips
* integrated watchdog.
*
* (c) Copyright 2008 Wim Van Sebroeck <wim@iguana.be>.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
- * provide warranty for any of this software. This material is
- * provided "AS-IS" and at no charge.
*/
/*
diff --git a/drivers/watchdog/scx200_wdt.c b/drivers/watchdog/scx200_wdt.c
index 836377cf9271..a4b2ea605ad6 100644
--- a/drivers/watchdog/scx200_wdt.c
+++ b/drivers/watchdog/scx200_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/* drivers/char/watchdog/scx200_wdt.c
National Semiconductor SCx200 Watchdog support
@@ -7,15 +8,8 @@
Some code taken from:
National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver
(c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com>
+*/
- 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 the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The author(s) of this software shall not be held liable for damages
- of any nature resulting due to the use of this software. This
- software is provided AS-IS with no warranties. */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index a7d6425db807..4a14a2154b55 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* drivers/watchdog/shwdt.c
*
@@ -5,11 +6,6 @@
*
* Copyright (C) 2001 - 2012 Paul Mundt <lethal@linux-sh.org>
*
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
* 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
* Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
*
diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
index 4eea351e09b0..5943020c141d 100644
--- a/drivers/watchdog/sirfsoc_wdt.c
+++ b/drivers/watchdog/sirfsoc_wdt.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for CSR SiRFprimaII and SiRFatlasVI
*
* Copyright (c) 2013 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
*/
#include <linux/module.h>
@@ -227,5 +226,5 @@ module_platform_driver(sirfsoc_wdt_driver);
MODULE_DESCRIPTION("SiRF SoC watchdog driver");
MODULE_AUTHOR("Xianglong Du <Xianglong.Du@csr.com>");
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL+");
MODULE_ALIAS("platform:sirfsoc-wdt");
diff --git a/drivers/watchdog/smsc37b787_wdt.c b/drivers/watchdog/smsc37b787_wdt.c
index 445ea1ad1fa9..41da9bb76101 100644
--- a/drivers/watchdog/smsc37b787_wdt.c
+++ b/drivers/watchdog/smsc37b787_wdt.c
@@ -1,18 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* SMsC 37B787 Watchdog Timer driver for Linux 2.6.x.x
*
* Based on acquirewdt.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
* and some other existing drivers
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * The authors do NOT admit liability nor provide warranty for
- * any of this software. This material is provided "AS-IS" in
- * the hope that it may be useful for others.
- *
* (C) Copyright 2003-2006 Sven Anders <anders@anduras.de>
*
* History:
diff --git a/drivers/watchdog/softdog.c b/drivers/watchdog/softdog.c
index 060740625485..e5212a53f60b 100644
--- a/drivers/watchdog/softdog.c
+++ b/drivers/watchdog/softdog.c
@@ -1,18 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* SoftDog: A Software Watchdog Device
*
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
* Software only watchdog driver. Unlike its big brother the WDT501P
diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
index 41aaae2d5287..acbabaa79687 100644
--- a/drivers/watchdog/sp5100_tco.c
+++ b/drivers/watchdog/sp5100_tco.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* sp5100_tco : TCO timer driver for sp5100 chipsets
*
@@ -8,11 +9,6 @@
* Reserved.
* http://www.kernelconcepts.de
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* See AMD Publication 43009 "AMD SB700/710/750 Register Reference Guide",
* AMD Publication 45482 "AMD SB800-Series Southbridges Register
* Reference Guide"
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 03805bc5d67a..1a511a9cce25 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* drivers/char/watchdog/sp805-wdt.c
*
@@ -5,10 +6,6 @@
*
* Copyright (C) 2010 ST Microelectronics
* Viresh Kumar <vireshk@kernel.org>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2 or later. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#include <linux/device.h>
diff --git a/drivers/watchdog/sprd_wdt.c b/drivers/watchdog/sprd_wdt.c
index a8b280ff33e0..36e9a08e9b78 100644
--- a/drivers/watchdog/sprd_wdt.c
+++ b/drivers/watchdog/sprd_wdt.c
@@ -1,15 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Spreadtrum watchdog driver
* Copyright (C) 2017 Spreadtrum - http://www.spreadtrum.com
- *
- * 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 published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
*/
#include <linux/bitops.h>
diff --git a/drivers/watchdog/st_lpc_wdt.c b/drivers/watchdog/st_lpc_wdt.c
index e6100e447dd8..177829b379da 100644
--- a/drivers/watchdog/st_lpc_wdt.c
+++ b/drivers/watchdog/st_lpc_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* ST's LPC Watchdog
*
@@ -5,11 +6,6 @@
*
* Author: David Paris <david.paris@st.com> for STMicroelectronics
* Lee Jones <lee.jones@linaro.org> for STMicroelectronics
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
*/
#include <linux/clk.h>
diff --git a/drivers/watchdog/stmp3xxx_rtc_wdt.c b/drivers/watchdog/stmp3xxx_rtc_wdt.c
index d8b11eb269ad..994c54cc68e9 100644
--- a/drivers/watchdog/stmp3xxx_rtc_wdt.c
+++ b/drivers/watchdog/stmp3xxx_rtc_wdt.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for the RTC based watchdog in STMP3xxx and i.MX23/28
*
* Author: Wolfram Sang <kernel@pengutronix.de>
*
* Copyright (C) 2011-12 Wolfram Sang, Pengutronix
- *
- * 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 published by
- * the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/module.h>
diff --git a/drivers/watchdog/sun4v_wdt.c b/drivers/watchdog/sun4v_wdt.c
index 00907973608c..e6df7e899631 100644
--- a/drivers/watchdog/sun4v_wdt.c
+++ b/drivers/watchdog/sun4v_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* sun4v watchdog timer
* (c) Copyright 2016 Oracle Corporation
@@ -5,11 +6,6 @@
* Implement a simple watchdog driver using the built-in sun4v hypervisor
* watchdog support. If time expires, the hypervisor stops or bounces
* the guest domain.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index 802e31b1416d..6510eab83490 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -1,14 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* sunxi Watchdog Driver
*
* Copyright (c) 2013 Carlo Caione
* 2012 Henrik Nordstrom
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* Based on xen_wdt.c
* (c) Copyright 2010 Novell, Inc.
*/
diff --git a/drivers/watchdog/tangox_wdt.c b/drivers/watchdog/tangox_wdt.c
index d5fcce062920..b1de8297fa40 100644
--- a/drivers/watchdog/tangox_wdt.c
+++ b/drivers/watchdog/tangox_wdt.c
@@ -1,11 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Mans Rullgard <mans@mansr.com>
* SMP86xx/SMP87xx Watchdog driver
- *
- * 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 the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
*/
#include <linux/bitops.h>
diff --git a/drivers/watchdog/tegra_wdt.c b/drivers/watchdog/tegra_wdt.c
index 9403c08816e3..877dd39bd41f 100644
--- a/drivers/watchdog/tegra_wdt.c
+++ b/drivers/watchdog/tegra_wdt.c
@@ -1,14 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
*/
#include <linux/kernel.h>
diff --git a/drivers/watchdog/ts4800_wdt.c b/drivers/watchdog/ts4800_wdt.c
index 2b8de8602b67..8087caca5882 100644
--- a/drivers/watchdog/ts4800_wdt.c
+++ b/drivers/watchdog/ts4800_wdt.c
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for TS-4800 based boards
*
* Copyright (c) 2015 - Savoir-faire Linux
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
index 811e43c39ec4..d3d36799ecc2 100644
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for Technologic Systems TS-72xx based SBCs
* (TS-7200, TS-7250 and TS-7260). These boards have external
@@ -7,10 +8,6 @@
* Copyright (c) 2009 Mika Westerberg <mika.westerberg@iki.fi>
*
* This driver is based on ep93xx_wdt and wm831x_wdt drivers.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
#include <linux/platform_device.h>
@@ -175,5 +172,5 @@ module_platform_driver(ts72xx_wdt_driver);
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>");
MODULE_DESCRIPTION("TS-72xx SBC Watchdog");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:ts72xx-wdt");
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
index 569fe85e52da..65a2aabccaff 100644
--- a/drivers/watchdog/twl4030_wdt.c
+++ b/drivers/watchdog/twl4030_wdt.c
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) Nokia Corporation
*
* Written by Timo Kokkonen <timo.t.kokkonen at nokia.com>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/module.h>
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c
index 6f7a9deb27d0..bcaa588ef3d8 100644
--- a/drivers/watchdog/txx9wdt.c
+++ b/drivers/watchdog/txx9wdt.c
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
- * txx9wdt: A Hardware Watchdog Driver for TXx9 SoCs
+ * txx9wdt: A Hardware Watchdog Driver for TXx9 SoC
*
* Copyright (C) 2007 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
- *
- * 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
- * published by the Free Software Foundation.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -174,5 +171,5 @@ static struct platform_driver txx9wdt_driver = {
module_platform_driver_probe(txx9wdt_driver, txx9wdt_probe);
MODULE_DESCRIPTION("TXx9 Watchdog Driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:txx9wdt");
diff --git a/drivers/watchdog/uniphier_wdt.c b/drivers/watchdog/uniphier_wdt.c
index 0ea2339d9702..769d75344050 100644
--- a/drivers/watchdog/uniphier_wdt.c
+++ b/drivers/watchdog/uniphier_wdt.c
@@ -1,18 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Watchdog driver for the UniPhier watchdog timer
*
* (c) Copyright 2014 Panasonic Corporation
* (c) Copyright 2016 Socionext Inc.
* All rights reserved.
- *
- * 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
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/bitops.h>
diff --git a/drivers/watchdog/ux500_wdt.c b/drivers/watchdog/ux500_wdt.c
index 37c084353cce..106507122f2f 100644
--- a/drivers/watchdog/ux500_wdt.c
+++ b/drivers/watchdog/ux500_wdt.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) ST-Ericsson SA 2011-2013
*
- * License Terms: GNU General Public License v2
- *
* Author: Mathieu Poirier <mathieu.poirier@linaro.org> for ST-Ericsson
* Author: Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
*/
@@ -165,5 +164,5 @@ module_platform_driver(ux500_wdt_driver);
MODULE_AUTHOR("Jonas Aaberg <jonas.aberg@stericsson.com>");
MODULE_DESCRIPTION("Ux500 Watchdog Driver");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:ux500_wdt");
diff --git a/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c
index b085ef1084ec..119f0c03e7af 100644
--- a/drivers/watchdog/via_wdt.c
+++ b/drivers/watchdog/via_wdt.c
@@ -1,8 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* VIA Chipset Watchdog Driver
*
* Copyright (C) 2011 Sigfox
- * License terms: GNU General Public License (GPL) version 2
* Author: Marc Vertes <marc.vertes@sigfox.com>
* Based on a preliminary version from Harald Welte <HaraldWelte@viatech.com>
* Timer code by Wim Van Sebroeck <wim@iguana.be>
@@ -258,4 +258,4 @@ module_pci_driver(wdt_driver);
MODULE_AUTHOR("Marc Vertes");
MODULE_DESCRIPTION("Driver for watchdog timer on VIA chipset");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
index 7817836bff55..9cd729219770 100644
--- a/drivers/watchdog/w83627hf_wdt.c
+++ b/drivers/watchdog/w83627hf_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* w83627hf/thf WDT driver
*
@@ -17,15 +18,6 @@
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*/
diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c
index 05658ecc0aa4..c51c5d021c3d 100644
--- a/drivers/watchdog/w83877f_wdt.c
+++ b/drivers/watchdog/w83877f_wdt.c
@@ -1,18 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* W83877F Computer Watchdog Timer driver
*
* Based on acquirewdt.c by Alan Cox,
* and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net>
*
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * The authors do NOT admit liability nor provide warranty for
- * any of this software. This material is provided "AS-IS" in
- * the hope that it may be useful for others.
- *
* (c) Copyright 2001 Scott Jennings <linuxdrivers@oro.net>
*
* 4/19 - 2001 [Initial revision]
diff --git a/drivers/watchdog/w83977f_wdt.c b/drivers/watchdog/w83977f_wdt.c
index 20e2bba10400..5f2021b7a71a 100644
--- a/drivers/watchdog/w83977f_wdt.c
+++ b/drivers/watchdog/w83977f_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* W83977F Watchdog Timer Driver for Winbond W83977F I/O Chip
*
@@ -5,14 +6,6 @@
*
* Based on w83877f_wdt.c by Scott Jennings,
* and wdt977.c by Woody Suwalski
- *
- * -----------------------
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c
index db0da7ea4fd8..64b5df010d52 100644
--- a/drivers/watchdog/wafer5823wdt.c
+++ b/drivers/watchdog/wafer5823wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* ICP Wafer 5823 Single Board Computer WDT driver
* http://www.icpamerica.com/wafer_5823.php
@@ -12,16 +13,6 @@
*
* (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
*/
diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index eb8fa25f8eb2..041605f41e12 100644
--- a/drivers/watchdog/watchdog_core.c
+++ b/drivers/watchdog/watchdog_core.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* watchdog_core.c
*
@@ -15,15 +16,6 @@
* Rusty Lynch <rusty@linux.co.intel.com>
* Satyam Sharma <satyam@infradead.org>
* Randy Dunlap <randy.dunlap@oracle.com>
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox, CymruNet Ltd., Wim Van Sebroeck nor Iguana vzw.
- * admit liability nor provide warranty for any of this software.
- * This material is provided "AS-IS" and at no charge.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/watchdog_core.h b/drivers/watchdog/watchdog_core.h
index 86ff962d1e15..96deb573518f 100644
--- a/drivers/watchdog/watchdog_core.h
+++ b/drivers/watchdog/watchdog_core.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* watchdog_core.h
*
@@ -15,15 +16,6 @@
* Rusty Lynch <rusty@linux.co.intel.com>
* Satyam Sharma <satyam@infradead.org>
* Randy Dunlap <randy.dunlap@oracle.com>
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox, CymruNet Ltd., Wim Van Sebroeck nor Iguana vzw.
- * admit liability nor provide warranty for any of this software.
- * This material is provided "AS-IS" and at no charge.
*/
#define MAX_DOGS 32 /* Maximum number of watchdog devices */
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index ffbdc4642ea5..116aca7b962b 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* watchdog_dev.c
*
@@ -19,15 +20,6 @@
* Rusty Lynch <rusty@linux.co.intel.com>
* Satyam Sharma <satyam@infradead.org>
* Randy Dunlap <randy.dunlap@oracle.com>
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox, CymruNet Ltd., Wim Van Sebroeck nor Iguana vzw.
- * admit liability nor provide warranty for any of this software.
- * This material is provided "AS-IS" and at no charge.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/watchdog_pretimeout.c b/drivers/watchdog/watchdog_pretimeout.c
index 9db07bfb4334..c140ed538580 100644
--- a/drivers/watchdog/watchdog_pretimeout.c
+++ b/drivers/watchdog/watchdog_pretimeout.c
@@ -1,11 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015-2016 Mentor Graphics
*
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/
#include <linux/list.h>
diff --git a/drivers/watchdog/wd501p.h b/drivers/watchdog/wd501p.h
index 0e3a497d5626..a0cbca365744 100644
--- a/drivers/watchdog/wd501p.h
+++ b/drivers/watchdog/wd501p.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Industrial Computer Source WDT500/501 driver
*
diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
index 6d1fbda0f461..46869a487e51 100644
--- a/drivers/watchdog/wdat_wdt.c
+++ b/drivers/watchdog/wdat_wdt.c
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* ACPI Hardware Watchdog (WDAT) driver.
*
* Copyright (C) 2016, Intel Corporation
* Author: Mika Westerberg <mika.westerberg@linux.intel.com>
- *
- * 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
- * published by the Free Software Foundation.
*/
#include <linux/acpi.h>
diff --git a/drivers/watchdog/wdrtas.c b/drivers/watchdog/wdrtas.c
index 0240c60d14e3..af07f746b7cc 100644
--- a/drivers/watchdog/wdrtas.c
+++ b/drivers/watchdog/wdrtas.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* FIXME: add wdrtas_get_status and wdrtas_get_boot_status as soon as
* RTAS calls are available
@@ -10,20 +11,6 @@
* device driver to exploit watchdog RTAS functions
*
* Authors : Utz Bacher <utz.bacher@de.ibm.com>
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c
index e481fbbc4ae7..28f7f8ac2dac 100644
--- a/drivers/watchdog/wdt.c
+++ b/drivers/watchdog/wdt.c
@@ -1,18 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Industrial Computer Source WDT501 driver
*
* (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
* Release 0.10.
diff --git a/drivers/watchdog/wdt285.c b/drivers/watchdog/wdt285.c
index ebbb183be618..943f56a111b9 100644
--- a/drivers/watchdog/wdt285.c
+++ b/drivers/watchdog/wdt285.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Intel 21285 watchdog driver
* Copyright (c) Phil Blundell <pb@nexus.co.uk>, 1998
@@ -8,12 +9,6 @@
*
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c
index a8e6f87f60c9..1975bc760499 100644
--- a/drivers/watchdog/wdt977.c
+++ b/drivers/watchdog/wdt977.c
@@ -1,16 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Wdt977 0.04: A Watchdog Device for Netwinder W83977AF chip
*
* (c) Copyright 1998 Rebel.com (Woody Suwalski <woody@netwinder.org>)
*
* -----------------------
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * -----------------------
* 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
* Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
* 19-Dec-2001 Woody Suwalski: Netwinder fixes, ioctl interface
diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c
index 10e2cda0ee5a..8b5a3db2875c 100644
--- a/drivers/watchdog/wdt_pci.c
+++ b/drivers/watchdog/wdt_pci.c
@@ -1,18 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Industrial Computer Source PCI-WDT500/501 driver
*
* (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
- * warranty for any of this software. This material is provided
- * "AS-IS" and at no charge.
- *
* (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
* Release 0.10.
diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c
index 1ddc1f742cd4..116c2f47b463 100644
--- a/drivers/watchdog/wm831x_wdt.c
+++ b/drivers/watchdog/wm831x_wdt.c
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for the wm831x PMICs
*
* Copyright (C) 2009 Wolfson Microelectronics
- *
- * 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 the Free Software Foundation
*/
#include <linux/module.h>
diff --git a/drivers/watchdog/wm8350_wdt.c b/drivers/watchdog/wm8350_wdt.c
index 4ab4b8347d45..33c62d51f00a 100644
--- a/drivers/watchdog/wm8350_wdt.c
+++ b/drivers/watchdog/wm8350_wdt.c
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Watchdog driver for the wm8350
*
* Copyright (C) 2007, 2008 Wolfson Microelectronics <linux@wolfsonmicro.com>
- *
- * 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 the Free Software Foundation
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c
index f1c016d015b3..8319bee42aaf 100644
--- a/drivers/watchdog/xen_wdt.c
+++ b/drivers/watchdog/xen_wdt.c
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Xen Watchdog Driver
*
* (c) Copyright 2010 Novell, Inc.
- *
- * 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 the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
*/
#define DRV_NAME "xen_wdt"
diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c
index d3594aa3a374..93d70f03c567 100644
--- a/drivers/watchdog/ziirave_wdt.c
+++ b/drivers/watchdog/ziirave_wdt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Zodiac Inflight Innovations
*
@@ -6,16 +7,6 @@
* Based on twl4030_wdt.c by Timo Kokkonen <timo.t.kokkonen at nokia.com>:
*
* Copyright (C) Nokia Corporation
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <linux/delay.h>
diff --git a/drivers/watchdog/zx2967_wdt.c b/drivers/watchdog/zx2967_wdt.c
index 9261f7c77f6d..29cb56139fac 100644
--- a/drivers/watchdog/zx2967_wdt.c
+++ b/drivers/watchdog/zx2967_wdt.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* watchdog driver for ZTE's zx2967 family
*
* Copyright (C) 2017 ZTE Ltd.
*
* Author: Baoyou Xie <baoyou.xie@linaro.org>
- *
- * License terms: GNU General Public License (GPL) version 2
*/
#include <linux/clk.h>
--
2.15.1
^ permalink raw reply related
* Re: [RFC][PATCH bpf v2 1/2] bpf: allow 64-bit offsets for bpf function calls
From: Michael Ellerman @ 2018-02-20 9:29 UTC (permalink / raw)
To: Naveen N. Rao, ast, Daniel Borkmann, Sandipan Das
Cc: linuxppc-dev, netdev, Michael Holzheu
In-Reply-To: <1518791626.5484j97if6.naveen@linux.ibm.com>
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
> Daniel Borkmann wrote:
>> On 02/15/2018 05:25 PM, Daniel Borkmann wrote:
>>> On 02/13/2018 05:05 AM, Sandipan Das wrote:
>>>> The imm field of a bpf_insn is a signed 32-bit integer. For
>>>> JIT-ed bpf-to-bpf function calls, it stores the offset from
>>>> __bpf_call_base to the start of the callee function.
>>>>
>>>> For some architectures, such as powerpc64, it was found that
>>>> this offset may be as large as 64 bits because of which this
>>>> cannot be accomodated in the imm field without truncation.
>>>>
>>>> To resolve this, we additionally make aux->func within each
>>>> bpf_prog associated with the functions to point to the list
>>>> of all function addresses determined by the verifier.
>>>>
>>>> We keep the value assigned to the off field of the bpf_insn
>>>> as a way to index into aux->func and also set aux->func_cnt
>>>> so that this can be used for performing basic upper bound
>>>> checks for the off field.
>>>>
>>>> Signed-off-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
>>>> ---
>>>> v2: Make aux->func point to the list of functions determined
>>>> by the verifier rather than allocating a separate callee
>>>> list for each function.
>>>
>>> Approach looks good to me; do you know whether s390x JIT would
>>> have similar requirement? I think one limitation that would still
>>> need to be addressed later with such approach would be regarding the
>>> xlated prog dump in bpftool, see 'BPF calls via JIT' in 7105e828c087
>>> ("bpf: allow for correlation of maps and helpers in dump"). Any
>>> ideas for this (potentially if we could use off + imm for calls,
>>> we'd get to 48 bits, but that seems still not be enough as you say)?
>
> All good points. I'm not really sure how s390x works, so I can't comment
> on that, but I'm copying Michael Holzheu for his consideration.
>
> With the existing scheme, 48 bits won't be enough, so we rejected that
> approach. I can also see how this will be a problem with bpftool, but I
> haven't looked into it in detail. I wonder if we can annotate the output
> to indicate the function being referred to?
>
>>
>> One other random thought, although I'm not sure how feasible this
>> is for ppc64 JIT to realize ... but idea would be to have something
>> like the below:
>>
>> diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
>> index 29ca920..daa7258 100644
>> --- a/kernel/bpf/core.c
>> +++ b/kernel/bpf/core.c
>> @@ -512,6 +512,11 @@ int bpf_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
>> return ret;
>> }
>>
>> +void * __weak bpf_jit_image_alloc(unsigned long size)
>> +{
>> + return module_alloc(size);
>> +}
>> +
>> struct bpf_binary_header *
>> bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
>> unsigned int alignment,
>> @@ -525,7 +530,7 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
>> * random section of illegal instructions.
>> */
>> size = round_up(proglen + sizeof(*hdr) + 128, PAGE_SIZE);
>> - hdr = module_alloc(size);
>> + hdr = bpf_jit_image_alloc(size);
>> if (hdr == NULL)
>> return NULL;
>>
>> And ppc64 JIT could override bpf_jit_image_alloc() in a similar way
>> like some archs would override the module_alloc() helper through a
>> custom implementation, usually via __vmalloc_node_range(), so we
>> could perhaps fit the range for BPF JITed images in a way that they
>> could use the 32bit imm in the end? There are not that many progs
>> loaded typically, so the range could be a bit narrower in such case
>> anyway. (Not sure if this would work out though, but I thought to
>> bring it up.)
>
> That'd be a good option to consider. I don't think we want to allocate
> anything from the linear memory range since users could load
> unprivileged BPF programs and consume a lot of memory that way. I doubt
> if we can map vmalloc'ed memory into the 0xc0 address range, but I'm not
> entirely sure.
>
> Michael,
> Is the above possible? The question is if we can have BPF programs be
> allocated within 4GB of __bpf_call_base (which is a kernel symbol), so
> that calls to those programs can be encoded in a 32-bit immediate field
> in a BPF instruction.
Hmmm.
It's not technically impossible, but I don't think it's really a good
option.
The 0xc range is a linear mapping of RAM, and the kernel tends to be
near the start of RAM for reasons. That means there generally isn't a
hole in the 0xc range within 4GB for you to map BPF programs.
You could create a hole by making the 0xc mapping non linear, ie.
mapping some RAM near the kernel elsewhere in the 0xc range, to make a
hole that you can then remap BPF programs into. But I think that would
cause a lot of bugs, it's a pretty fundamental assumption that the
linear mapping is 1:1.
> As an extension, we may be able to extend it to
> 48-bits by combining with another BPF instruction field (offset). In
> either case, the vmalloc'ed address range won't work.
48-bits could possibly work, we don't have systems with that much RAM
*yet*. So you could remap the BPF programs at the end of the 0xc range,
or somewhere we have a gap in RAM.
That would probably still confuse some things, ie. the 0xc mapping would
be a 1:1 mapping of RAM plus some other stuff, but it might be tractable
to fix.
We don't have page tables for the 0xc range when using the hash MMU, so
we'd need to either fix that or use some bespoke data structure for
keeping track of the mappings.
It doesn't really appeal :)
We load modules in the 0xd range, and they call functions in the kernel,
we handle that with trampolines. Can you do something similar?
You obviously still need a 64-bit branch somewhere, but perhaps you only
need one, or one per BPF program, rather than one per function call.
> The alternative is to pass the full 64-bit address of the BPF program in
> an auxiliary field (as proposed in this patch set) but we need to fix it
> up for 'bpftool' as well.
OK. You'll have to explain to me how bpftool is related, I thought it
was just for loading/examining BPF programs.
cheers
^ permalink raw reply
* Re: [PATCH V5] cxl: Fix timebase synchronization status on P9
From: Frederic Barrat @ 2018-02-20 9:09 UTC (permalink / raw)
To: Christophe Lombard, linuxppc-dev, vaibhav, andrew.donnellan
In-Reply-To: <1519050491-15326-1-git-send-email-clombard@linux.vnet.ibm.com>
Le 19/02/2018 à 15:28, Christophe Lombard a écrit :
> The PSL Timebase register is updated by the PSL to maintain the
> timebase.
> On P9, the Timebase value is only provided by the CAPP as received
> the last time a timebase request was performed.
> The timebase requests are initiated through the adapter configuration or
> application registers.
> The specific sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is
> now dynamically updated according the content of the PSL Timebase
> register.
>
> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
>
> ---
> This patch applies on top of this patch:
> http://patchwork.ozlabs.org/patch/873663/
>
> Changelog[v5]
> - Rebased to latest upstream.
> - Changed the type of 'delta'
>
> Changelog[v4]
> - Rebased to latest upstream.
> - Added log message.
>
> Changelog[v3]
> - Rebased to latest upstream.
> - Dynamic update is now applied to P8.
>
> Changelog[v2]
> - Missing Signed-off-by.
> - Spaces required around the ':'.
> ---
> drivers/misc/cxl/pci.c | 17 -----------------
> drivers/misc/cxl/sysfs.c | 10 ++++++++++
> 2 files changed, 10 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
> index 66eed6a..3247eaf 100644
> --- a/drivers/misc/cxl/pci.c
> +++ b/drivers/misc/cxl/pci.c
> @@ -606,9 +606,6 @@ static u64 timebase_read_xsl(struct cxl *adapter)
>
> static void cxl_setup_psl_timebase(struct cxl *adapter, struct pci_dev *dev)
> {
> - u64 psl_tb;
> - int delta;
> - unsigned int retry = 0;
> struct device_node *np;
>
> adapter->psl_timebase_synced = false;
> @@ -636,20 +633,6 @@ static void cxl_setup_psl_timebase(struct cxl *adapter, struct pci_dev *dev)
> cxl_p1_write(adapter, CXL_PSL_Control, 0x0000000000000000);
> cxl_p1_write(adapter, CXL_PSL_Control, CXL_PSL_Control_tb);
>
> - /* Wait until CORE TB and PSL TB difference <= 16usecs */
> - do {
> - msleep(1);
> - if (retry++ > 5) {
> - dev_info(&dev->dev, "PSL timebase can't synchronize\n");
> - return;
> - }
> - psl_tb = adapter->native->sl_ops->timebase_read(adapter);
> - delta = mftb() - psl_tb;
> - if (delta < 0)
> - delta = -delta;
> - } while (tb_to_ns(delta) > 16000);
> -
> - adapter->psl_timebase_synced = true;
> return;
> }
>
> diff --git a/drivers/misc/cxl/sysfs.c b/drivers/misc/cxl/sysfs.c
> index a8b6d6a..a20bf8e 100644
> --- a/drivers/misc/cxl/sysfs.c
> +++ b/drivers/misc/cxl/sysfs.c
> @@ -62,6 +62,16 @@ static ssize_t psl_timebase_synced_show(struct device *device,
> char *buf)
> {
> struct cxl *adapter = to_cxl_adapter(device);
> + u64 psl_tb, delta;
> +
> + psl_tb = adapter->native->sl_ops->timebase_read(adapter);
It would dump core in a lpar.
pHyp is supposed to have it initialized, though we have no way to know
for sure. On p8, we're also only supporting a card which doesn't have
timebase problem on powerVM and it doesn't apply to p9. So I think we
just need to recompute the status on bare-metal only.
Fred
> + delta = abs(mftb() - psl_tb);
> +
> + /* CORE TB and PSL TB difference <= 16usecs ? */
> + adapter->psl_timebase_synced = (tb_to_ns(delta) < 16000) ? true : false;
> + pr_devel("PSL timebase %s - delta: 0x%016llx\n",
> + (tb_to_ns(delta) < 16000) ? "synchronized" :
> + "not synchronized", tb_to_ns(delta));
>
> return scnprintf(buf, PAGE_SIZE, "%i\n", adapter->psl_timebase_synced);
> }
>
^ permalink raw reply
* Re: [PATCH] scsi: cxlflash: Select SCSI_SCAN_ASYNC
From: Michael Ellerman @ 2018-02-20 8:56 UTC (permalink / raw)
To: Vaibhav Jain, Manoj N . Kumar
Cc: linux-scsi, Matthew R . Ochs, Vaibhav Jain, Frederic Barrat,
linux-kernel, Uma Krishnan, linuxppc-dev
In-Reply-To: <20180219071037.27938-1-vaibhav@linux.vnet.ibm.com>
Vaibhav Jain <vaibhav@linux.vnet.ibm.com> writes:
> The cxlflash driver uses "Asynchronous SCSI scanning" enabled by
> CONFIG_SCSI_SCAN_ASYNC. Without this enabled the modprobe of cxlflash
> module gets hung with following backtrace:
>
> Call Trace:
> __switch_to+0x2cc/0x470
> __schedule+0x288/0xab0
> schedule+0x40/0xc0
> schedule_timeout+0x254/0x4f0
> wait_for_common+0xdc/0x260
> flush_work+0x140/0x2a0
> work_on_cpu+0x88/0xb0
> pci_device_probe+0x1d0/0x220
> driver_probe_device+0x408/0x5b0
> __driver_attach+0x16c/0x1a0
> bus_for_each_dev+0xb8/0x110
> driver_attach+0x3c/0x60
> bus_add_driver+0x1d8/0x370
> driver_register+0x9c/0x180
> __pci_register_driver+0x74/0xa0
> init_cxlflash+0x158/0x1cc
> do_one_initcall+0x68/0x1e0
> do_init_module+0x90/0x254
> load_module+0x2f8c/0x3720
> SyS_finit_module+0xcc/0x140
> system_call+0x58/0x6c
Why does it "hang"? That's kind of bizarre, I would expect either a
build or runtime failure if a feature the driver requires is missing.
> diff --git a/drivers/scsi/cxlflash/Kconfig b/drivers/scsi/cxlflash/Kconfig
> index a011c5dbf214..f054c1b0fff3 100644
> --- a/drivers/scsi/cxlflash/Kconfig
> +++ b/drivers/scsi/cxlflash/Kconfig
> @@ -6,6 +6,7 @@ config CXLFLASH
> tristate "Support for IBM CAPI Flash"
> depends on PCI && SCSI && CXL && EEH
> select IRQ_POLL
> + select SCSI_SCAN_ASYNC
It's user configurable, so it's rude to select it. It can also be
disabled on the kernel command line, so this seems like a fragile
solution.
cheers
^ permalink raw reply
* Re: [PATCH] fix double ;;s in code
From: Jani Nikula @ 2018-02-20 8:03 UTC (permalink / raw)
To: Pavel Machek, Christophe LEROY, elfring, kernel list, vgupta,
linux, oleg, catalin.marinas, will.deacon, paulus, benh, mpe,
ard.biesheuvel, tglx, mingo, hpa, x86, scott.bauer,
jonathan.derrick, axboe, daniel.lezcano, maxime.ripard, wens,
alexander.deucher, christian.koenig, David1.Zhou, airlied,
robdclark, joro, shli, shawnguo, kernel, fabio.estevam, akpm,
Alexey.Brodkin, mhocko, vbabka, Vladislav.Zakharov, noamca,
yamada.masahiro, sboyd, viresh.kumar, linus.walleij, heiko, aik,
ruscur, david, fbarrat, alistair, robh, joe, harry.wentland,
tony.cheng, Wenjing.Liu, airlied, Ding.Wang, sylvia.tsai,
hersenxs.wu, Rex.Zhu, JinHuiEric.Huang, dan.carpenter, architt,
narmstrong, ville.syrjala, jcrouse, aishpant, noralf, andresx7,
Monk.Liu, nicolai.haehnle, Andrey.Grodzovsky, linux-snps-arc,
linux-arm-kernel, kvm-ppc, linuxppc-dev, linux-efi, linux-block,
amd-gfx, dri-devel, linux-arm-msm, freedreno, iommu, linux-raid
In-Reply-To: <20180219193312.GA3709@amd>
On Mon, 19 Feb 2018, Pavel Machek <pavel@ucw.cz> wrote:
> On Mon 2018-02-19 16:41:35, Daniel Vetter wrote:
>> Yeah, pls split this into one patch per area, with a suitable patch
>> subject prefix. Look at git log of each file to get a feeling for what's
>> the standard in each area.
>
> Yeah I can spend hour spliting it, and then people will ignore it
> anyway.
>
> If you care about one of the files being modified, please fix the
> bug, ";;" is a clear bug.
>
> If you don't care ... well I don't care either.
Look, if this causes just one conflict down the line because it touches
the kernel all over the place, then IMO it already wasn't worth
it. Merge conflicts are inevitable, but there's no reason to make life
harder just to cater for a cleanup patch. It's not that important.
Had it been split up, the drm parts would've been merged already.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply
* Re: [RFC PATCH 05/12] [WIP] powerpc/tm: Reclaim/recheckpoint on entry/exit
From: Cyril Bur @ 2018-02-20 6:32 UTC (permalink / raw)
To: Michael Neuling, benh, linuxppc-dev
In-Reply-To: <1519104300.5655.2.camel@neuling.org>
On Tue, 2018-02-20 at 16:25 +1100, Michael Neuling wrote:
> > > > @@ -1055,6 +1082,8 @@ void restore_tm_state(struct pt_regs *regs)
> > > > msr_diff = current->thread.ckpt_regs.msr & ~regs->msr;
> > > > msr_diff &= MSR_FP | MSR_VEC | MSR_VSX;
> > > >
> > > > + tm_recheckpoint(¤t->thread);
> > > > +
> > >
> > > So why do we do tm_recheckpoint at all? Shouldn't most of the tm_blah code go
> > > away in process.c after all this?
> > >
> >
> > I'm not sure I follow, we need to recheckpoint because we're going back
> > to userspace? Or would you rather calling the tm.S code directly from
> > the exception return path?
>
> Yeah, I was thinking the point of this series was. We do tm_reclaim right on
> entry and tm_recheckpoint right on exit.
>
Yeah that's the ultimate goal, considering I haven't been attacked or
offered more drugs I feel like what I've done isn't crazy. Your
feedback is great, thanks.
> The bits in between (ie. the tm_blah() calls process.c) would mostly go away.
>
>
> > Yes, I hope we'll be able to have a fairly big cleanup commit of tm_
> > code in process.c at the end of this series.
>
> Yep, agreed.
>
> Mikey
^ permalink raw reply
* Re: [PATCH] fix double ;;s in code
From: Michael Ellerman @ 2018-02-20 6:19 UTC (permalink / raw)
To: Daniel Vetter, Christophe LEROY
Cc: Pavel Machek, elfring, kernel list, vgupta, linux, oleg,
catalin.marinas, will.deacon, paulus, benh, ard.biesheuvel, tglx,
mingo, hpa, x86, scott.bauer, jonathan.derrick, axboe,
daniel.lezcano, maxime.ripard, wens, alexander.deucher,
christian.koenig, David1.Zhou, airlied, robdclark, joro, shli,
shawnguo, kernel, fabio.estevam, akpm, Alexey.Brodkin, mhocko,
vbabka, Vladislav.Zakharov, noamca, yamada.masahiro, sboyd,
viresh.kumar, linus.walleij, heiko, aik, ruscur, david, fbarrat,
alistair, robh, joe, harry.wentland, tony.cheng, Wenjing.Liu,
airlied, Ding.Wang, sylvia.tsai, hersenxs.wu, Rex.Zhu,
JinHuiEric.Huang, dan.carpenter, architt, daniel.vetter,
narmstrong, ville.syrjala, jcrouse, aishpant, noralf, andresx7,
Monk.Liu, nicolai.haehnle, Andrey.Grodzovsky, linux-snps-arc,
linux-arm-kernel, kvm-ppc, linuxppc-dev, linux-efi, linux-block,
amd-gfx, dri-devel, linux-arm-msm, freedreno, iommu, linux-raid
In-Reply-To: <20180219154135.GV22199@phenom.ffwll.local>
Daniel Vetter <daniel@ffwll.ch> writes:
> On Sun, Feb 18, 2018 at 11:00:56AM +0100, Christophe LEROY wrote:
>> Le 17/02/2018 =C3=A0 22:19, Pavel Machek a =C3=A9crit=C2=A0:
>> >=20
>> > Fix double ;;'s in code.
>> >=20
>> > Signed-off-by: Pavel Machek <pavel@ucw.cz>
>>=20
>> A summary of the files modified on top of the patch would help understand
>> the impact.
>>=20
>> A maybe there should be one patch by area, eg one for each arch specific
>> modif and one for drivers/ and one for block/ ?
>
> Yeah, pls split this into one patch per area, with a suitable patch
> subject prefix. Look at git log of each file to get a feeling for what's
> the standard in each area.
This part is actually pretty annoying.
I hacked up a script (below) which seems to do a reasonable job in most
cases.
For this patch it gives:
$ for f in $(git ls-files -m); do ./guess-prefix.py $f; done
ARC:=20
ARC:=20
ARM:=20
arm64: ptrace:=20
KVM: PPC:=20
powerpc/powernv:
x86/efi:
block/sed-opal:
clocksource: mips-gic:=20
clocksource/drivers/sun5i:
drm/amd/display:
drm/amd/powerplay:
drm/msm/mdp5:
drm:=20
iommu/vt-d:
md:=20
soc: imx: gpc:=20
I think those are correct except for:
- "drm:" for "drivers/gpu/drm/scheduler" which has only a single commit.
- "md:" for "drivers/md/raid1.c" which is tricked by inconsistent
usage of "md: raid1:" and "md/raid1:".
But that seems like a reasonable hit rate.
Another approach would be to have a file that defines for each subsystem
what the preferred style is, but that is likely to be a PITA to
maintain.
cheers
#!/usr/bin/python3
import sys
import re
from subprocess import check_output
from collections import Counter
if len(sys.argv) !=3D 2:
print('Usage: %s <path>' % sys.argv[0], file=3Dsys.stderr)
sys.exit(1)
fname =3D sys.argv[1]
cmd =3D ['git', 'log', '--format=3D%s', '-n', '100', fname]
output =3D check_output(cmd).decode('utf-8')
ignore =3D ['License', 'Merge']
# Ordered list of patterns
patterns =3D [
# Common style "foo/bar/baz: Fix the foo"
re.compile('^([\w\-_]+: )+'),
# Less common "foo bar baz: Fix the foo"
re.compile('^([\w\-_]+:? )+: ')
]
words =3D []
for line in output.splitlines():
prefix =3D line.split()[0]
for patt in patterns:
match =3D patt.search(line)
if match:
prefix =3D match.group(0)
break
if prefix in ignore:
continue
words.append(prefix)
# Warn if we didn't find many examples
if len(words) < 5:
print("Warning: only found %d previous commits to guess from for" % len=
(words),
fname, file=3Dsys.stderr)
counts =3D Counter(words)
print(counts.most_common(1)[0][0])
^ permalink raw reply
* Re: [PATCH] fix double ;;s in code
From: Vineet Gupta @ 2018-02-20 5:33 UTC (permalink / raw)
To: Pavel Machek, elfring, kernel list, linux, oleg, catalin.marinas,
will.deacon, paulus, benh, mpe, ard.biesheuvel, tglx, mingo, hpa,
x86, scott.bauer, jonathan.derrick, axboe, daniel.lezcano,
maxime.ripard, wens, alexander.deucher, christian.koenig,
David1.Zhou, airlied, robdclark, joro, shli, shawnguo, kernel,
fabio.estevam, akpm, Alexey.Brodkin, mhocko, vbabka,
Vladislav.Zakharov, noamca, yamada.masahiro, sboyd, viresh.kumar,
linus.walleij, heiko, aik, ruscur, david, fbarrat, alistair, robh,
joe, harry.wentland, tony.cheng, Wenjing.Liu, airlied, Ding.Wang,
sylvia.tsai, hersenxs.wu, Rex.Zhu, JinHuiEric.Huang,
dan.carpenter, architt, daniel.vetter, narmstrong, ville.syrjala,
jcrouse, aishpant, noralf, andresx7, Monk.Liu, nicolai.haehnle,
Andrey.Grodzovsky, linux-snps-arc, linux-arm-kernel, kvm-ppc,
linuxppc-dev, linux-efi, linux-block, amd-gfx, dri-devel,
linux-arm-msm, freedreno, iommu, linux-raid
Cc: Luis de Bethencourt
In-Reply-To: <20180217211955.GE9640@amd>
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
On 02/17/2018 01:19 PM, Pavel Machek wrote:
> Fix double ;;'s in code.
>
> Signed-off-by: Pavel Machek<pavel@ucw.cz>
>
> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
> index 9d27331..ec12fe1 100644
> --- a/arch/arc/kernel/setup.c
> +++ b/arch/arc/kernel/setup.c
> @@ -373,7 +373,7 @@ static void arc_chk_core_config(void)
> {
> struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
> int saved = 0, present = 0;
> - char *opt_nm = NULL;;
> + char *opt_nm = NULL;
>
> if (!cpu->extn.timer0)
> panic("Timer0 is not present!\n");
> diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
> index 333daab..183391d 100644
> --- a/arch/arc/kernel/unwind.c
> +++ b/arch/arc/kernel/unwind.c
> @@ -366,7 +366,7 @@ static void init_unwind_hdr(struct unwind_table *table,
> return;
>
> ret_err:
> - panic("Attention !!! Dwarf FDE parsing errors\n");;
> + panic("Attention !!! Dwarf FDE parsing errors\n");
> }
>
I have a fix from Luis to same effect from Jan sitting in my for-curr
Thx for it anyways.
-Vineet
[-- Attachment #2: Type: text/html, Size: 1523 bytes --]
^ permalink raw reply
* Re: [RFC PATCH 10/12] [WIP] powerpc/tm: Correctly save/restore checkpointed sprs
From: Michael Neuling @ 2018-02-20 5:27 UTC (permalink / raw)
To: Cyril Bur, benh, linuxppc-dev
In-Reply-To: <1519099169.6563.19.camel@gmail.com>
On Tue, 2018-02-20 at 14:59 +1100, Cyril Bur wrote:
> On Tue, 2018-02-20 at 14:00 +1100, Michael Neuling wrote:
> > This needs a description of what you're trying to do. "Correctly" does=
n't
> > really mean anything.
> >=20
> >=20
> > On Tue, 2018-02-20 at 11:22 +1100, Cyril Bur wrote:
> > > ---
> > > arch/powerpc/kernel/process.c | 57 +++++++++++++++++++++++++++++++++=
++++++++-
> > > -
> > > arch/powerpc/kernel/ptrace.c | 9 +++----
> > > 2 files changed, 58 insertions(+), 8 deletions(-)
> > >=20
> > > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/proc=
ess.c
> > > index cd3ae80a6878..674f75c56172 100644
> > > --- a/arch/powerpc/kernel/process.c
> > > +++ b/arch/powerpc/kernel/process.c
> > > @@ -859,6 +859,8 @@ static inline bool tm_enabled(struct task_struct =
*tsk)
> > > return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);
> > > }
> > > =20
> > > +static inline void save_sprs(struct thread_struct *t);
> > > +
> > > static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cau=
se)
> > > {
> > > /*
> > > @@ -879,6 +881,8 @@ static void tm_reclaim_thread(struct thread_struc=
t *thr,
> > > uint8_t cause)
> > > if (!MSR_TM_SUSPENDED(mfmsr()))
> > > return;
> > > =20
> > > + save_sprs(thr);
> > > +
> > > giveup_all(container_of(thr, struct task_struct, thread));
> > > =20
> > > tm_reclaim(thr, cause);
> > > @@ -991,6 +995,37 @@ void tm_recheckpoint(struct thread_struct *threa=
d)
> > > =20
> > > __tm_recheckpoint(thread);
> > > =20
> > > + /*
> > > + * This is a stripped down restore_sprs(), we need to do this
> > > + * now as we might go straight out to userspace and currently
> > > + * the checkpointed values are on the CPU.
> > > + *
> > > + * TODO: Improve
> > > + */
> > > +#ifdef CONFIG_ALTIVEC
> > > + if (cpu_has_feature(CPU_FTR_ALTIVEC))
> > > + mtspr(SPRN_VRSAVE, thread->vrsave);
> > > +#endif
> > > +#ifdef CONFIG_PPC_BOOK3S_64
> > > + if (cpu_has_feature(CPU_FTR_DSCR)) {
> > > + u64 dscr =3D get_paca()->dscr_default;
> > > + if (thread->dscr_inherit)
> > > + dscr =3D thread->dscr;
> > > +
> > > + mtspr(SPRN_DSCR, dscr);
> > > + }
> > > +
> > > + if (cpu_has_feature(CPU_FTR_ARCH_207S)) {
> > > + /* The EBB regs aren't checkpointed */
> > > + mtspr(SPRN_FSCR, thread->fscr);
> > > +
> > > + mtspr(SPRN_TAR, thread->tar);
> > > + }
> > > +
> > > + /* I think we don't need to */
> > > + if (cpu_has_feature(CPU_FTR_ARCH_300))
> > > + mtspr(SPRN_TIDR, thread->tidr);
> > > +#endif
> >=20
> > Why are you touching all the above hunk?
>=20
> I copied restore_sprs. I'm tidying that up now - we can't call
> restore_sprs because we don't have a prev and next thread.
Yeah needs to be tided up... we can't have another copy of the code.. obvio=
usly.
>=20
> >=20
> > > local_irq_restore(flags);
> > > }
> > > =20
> > > @@ -1193,6 +1228,11 @@ struct task_struct *__switch_to(struct task_st=
ruct
> > > *prev,
> > > #endif
> > > =20
> > > new_thread =3D &new->thread;
> > > + /*
> > > + * Why not &prev->thread; ?
> > > + * What is the difference between &prev->thread and
> > > + * ¤t->thread ?
> > > + */
> >=20
> > Why not just work it out and FIX THE CODE, rather than just rabbiting o=
n about
> > it! :-P
>=20
> Agreed - I started to and then had a mini freakout that things would
> end really badly if they're not the same. So I left that comment as a
> reminder to investigate.
>=20
> They should be the same though right?
Should be if prev =3D=3D current.
Mikey
^ permalink raw reply
* Re: [RFC PATCH 05/12] [WIP] powerpc/tm: Reclaim/recheckpoint on entry/exit
From: Michael Neuling @ 2018-02-20 5:25 UTC (permalink / raw)
To: Cyril Bur, benh, linuxppc-dev
In-Reply-To: <1519098854.6563.15.camel@gmail.com>
> > > @@ -1055,6 +1082,8 @@ void restore_tm_state(struct pt_regs *regs)
> > > msr_diff =3D current->thread.ckpt_regs.msr & ~regs->msr;
> > > msr_diff &=3D MSR_FP | MSR_VEC | MSR_VSX;
> > > =20
> > > + tm_recheckpoint(¤t->thread);
> > > +
> >=20
> > So why do we do tm_recheckpoint at all? Shouldn't most of the tm_blah c=
ode go
> > away in process.c after all this?
> >=20
>=20
> I'm not sure I follow, we need to recheckpoint because we're going back
> to userspace? Or would you rather calling the tm.S code directly from
> the exception return path?
Yeah, I was thinking the point of this series was. We do tm_reclaim right =
on
entry and tm_recheckpoint right on exit. =20
The bits in between (ie. the tm_blah() calls process.c) would mostly go awa=
y.
> Yes, I hope we'll be able to have a fairly big cleanup commit of tm_
> code in process.c at the end of this series.
Yep, agreed.
Mikey
^ permalink raw reply
* Re: [PATCH V5] cxl: Fix timebase synchronization status on P9
From: Andrew Donnellan @ 2018-02-20 4:07 UTC (permalink / raw)
To: Christophe Lombard, linuxppc-dev, fbarrat, vaibhav
In-Reply-To: <1519050491-15326-1-git-send-email-clombard@linux.vnet.ibm.com>
On 20/02/18 01:28, Christophe Lombard wrote:
> The PSL Timebase register is updated by the PSL to maintain the
> timebase.
> On P9, the Timebase value is only provided by the CAPP as received
> the last time a timebase request was performed.
> The timebase requests are initiated through the adapter configuration or
> application registers.
> The specific sysfs entry "/sys/class/cxl/cardxx/psl_timebase_synced" is
> now dynamically updated according the content of the PSL Timebase
> register.
>
> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply
* Re: [RFC PATCH 10/12] [WIP] powerpc/tm: Correctly save/restore checkpointed sprs
From: Cyril Bur @ 2018-02-20 3:59 UTC (permalink / raw)
To: Michael Neuling, benh, linuxppc-dev
In-Reply-To: <1519095630.7360.57.camel@neuling.org>
On Tue, 2018-02-20 at 14:00 +1100, Michael Neuling wrote:
> This needs a description of what you're trying to do. "Correctly" doesn't
> really mean anything.
>
>
> On Tue, 2018-02-20 at 11:22 +1100, Cyril Bur wrote:
> > ---
> > arch/powerpc/kernel/process.c | 57 +++++++++++++++++++++++++++++++++++++++++-
> > -
> > arch/powerpc/kernel/ptrace.c | 9 +++----
> > 2 files changed, 58 insertions(+), 8 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index cd3ae80a6878..674f75c56172 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -859,6 +859,8 @@ static inline bool tm_enabled(struct task_struct *tsk)
> > return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);
> > }
> >
> > +static inline void save_sprs(struct thread_struct *t);
> > +
> > static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cause)
> > {
> > /*
> > @@ -879,6 +881,8 @@ static void tm_reclaim_thread(struct thread_struct *thr,
> > uint8_t cause)
> > if (!MSR_TM_SUSPENDED(mfmsr()))
> > return;
> >
> > + save_sprs(thr);
> > +
> > giveup_all(container_of(thr, struct task_struct, thread));
> >
> > tm_reclaim(thr, cause);
> > @@ -991,6 +995,37 @@ void tm_recheckpoint(struct thread_struct *thread)
> >
> > __tm_recheckpoint(thread);
> >
> > + /*
> > + * This is a stripped down restore_sprs(), we need to do this
> > + * now as we might go straight out to userspace and currently
> > + * the checkpointed values are on the CPU.
> > + *
> > + * TODO: Improve
> > + */
> > +#ifdef CONFIG_ALTIVEC
> > + if (cpu_has_feature(CPU_FTR_ALTIVEC))
> > + mtspr(SPRN_VRSAVE, thread->vrsave);
> > +#endif
> > +#ifdef CONFIG_PPC_BOOK3S_64
> > + if (cpu_has_feature(CPU_FTR_DSCR)) {
> > + u64 dscr = get_paca()->dscr_default;
> > + if (thread->dscr_inherit)
> > + dscr = thread->dscr;
> > +
> > + mtspr(SPRN_DSCR, dscr);
> > + }
> > +
> > + if (cpu_has_feature(CPU_FTR_ARCH_207S)) {
> > + /* The EBB regs aren't checkpointed */
> > + mtspr(SPRN_FSCR, thread->fscr);
> > +
> > + mtspr(SPRN_TAR, thread->tar);
> > + }
> > +
> > + /* I think we don't need to */
> > + if (cpu_has_feature(CPU_FTR_ARCH_300))
> > + mtspr(SPRN_TIDR, thread->tidr);
> > +#endif
>
> Why are you touching all the above hunk?
I copied restore_sprs. I'm tidying that up now - we can't call
restore_sprs because we don't have a prev and next thread.
>
> > local_irq_restore(flags);
> > }
> >
> > @@ -1193,6 +1228,11 @@ struct task_struct *__switch_to(struct task_struct
> > *prev,
> > #endif
> >
> > new_thread = &new->thread;
> > + /*
> > + * Why not &prev->thread; ?
> > + * What is the difference between &prev->thread and
> > + * ¤t->thread ?
> > + */
>
> Why not just work it out and FIX THE CODE, rather than just rabbiting on about
> it! :-P
Agreed - I started to and then had a mini freakout that things would
end really badly if they're not the same. So I left that comment as a
reminder to investigate.
They should be the same though right?
>
> > old_thread = ¤t->thread;
> >
> > WARN_ON(!irqs_disabled());
> > @@ -1237,8 +1277,16 @@ struct task_struct *__switch_to(struct task_struct
> > *prev,
> > /*
> > * We need to save SPRs before treclaim/trecheckpoint as these will
> > * change a number of them.
> > + *
> > + * Because we're now reclaiming on kernel entry, we've had to
> > + * already save them. Don't do it again.
> > + * Note: To deliver a signal in the signal context, we'll have
> > + * turned off TM because we don't want the signal context to
> > + * have the transactional state of the main thread - what if
> > + * we go through switch to at that point? Can we?
> > */
> > - save_sprs(&prev->thread);
> > + if (!prev->thread.regs || !MSR_TM_ACTIVE(prev->thread.regs->msr))
> > + save_sprs(&prev->thread);
> >
> > /* Save FPU, Altivec, VSX and SPE state */
> > giveup_all(prev);
> > @@ -1260,8 +1308,13 @@ struct task_struct *__switch_to(struct task_struct
> > *prev,
> > * for this is we manually create a stack frame for new tasks that
> > * directly returns through ret_from_fork() or
> > * ret_from_kernel_thread(). See copy_thread() for details.
> > + *
> > + * It isn't stricly nessesary that we avoid the restore here
> > + * because we'll simply restore again after the recheckpoint,
> > + * but we can avoid it for performance reasons.
> > */
> > - restore_sprs(old_thread, new_thread);
> > + if (!new_thread->regs || !MSR_TM_ACTIVE(new_thread->regs->msr))
> > + restore_sprs(old_thread, new_thread);
> >
> > last = _switch(old_thread, new_thread);
> >
> > diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
> > index ca72d7391d40..16001987ba71 100644
> > --- a/arch/powerpc/kernel/ptrace.c
> > +++ b/arch/powerpc/kernel/ptrace.c
> > @@ -135,12 +135,9 @@ static void flush_tmregs_to_thread(struct task_struct
> > *tsk)
> > if ((!cpu_has_feature(CPU_FTR_TM)) || (tsk != current))
> > return;
> >
> > - if (MSR_TM_SUSPENDED(mfmsr())) {
> > - tm_reclaim_current(TM_CAUSE_SIGNAL);
> > - } else {
> > - tm_enable();
> > - tm_save_sprs(&(tsk->thread));
> > - }
> > + BUG_ON(MSR_TM_SUSPENDED(mfmsr()));
> > + tm_enable();
> > + tm_save_sprs(&(tsk->thread));
> > }
> > #else
> > static inline void flush_tmregs_to_thread(struct task_struct *tsk) { }
^ permalink raw reply
* Re: [RFC PATCH 05/12] [WIP] powerpc/tm: Reclaim/recheckpoint on entry/exit
From: Cyril Bur @ 2018-02-20 3:54 UTC (permalink / raw)
To: Michael Neuling, benh, linuxppc-dev
In-Reply-To: <1519095033.7360.52.camel@neuling.org>
On Tue, 2018-02-20 at 13:50 +1100, Michael Neuling wrote:
> On Tue, 2018-02-20 at 11:22 +1100, Cyril Bur wrote:
>
>
> The comment from the cover sheet should be here
>
> > ---
> > arch/powerpc/include/asm/exception-64s.h | 25 +++++++++++++++++++++
> > arch/powerpc/kernel/entry_64.S | 5 +++++
> > arch/powerpc/kernel/process.c | 37 ++++++++++++++++++++++++++++----
> > 3 files changed, 63 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
> > index 471b2274fbeb..f904f19a9ec2 100644
> > --- a/arch/powerpc/include/asm/exception-64s.h
> > +++ b/arch/powerpc/include/asm/exception-64s.h
> > @@ -35,6 +35,7 @@
> > * implementations as possible.
> > */
> > #include <asm/head-64.h>
> > +#include <asm/tm.h>
> >
> > /* PACA save area offsets (exgen, exmc, etc) */
> > #define EX_R9 0
> > @@ -127,6 +128,26 @@
> > hrfid; \
> > b hrfi_flush_fallback
> >
> > +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> > +#define TM_KERNEL_ENTRY \
> > + ld r3,_MSR(r1); \
> > + /* Probably don't need to check if coming from user/kernel */ \
> > + /* If TM is suspended or active then we must have come from*/ \
> > + /* userspace */ \
> > + andi. r0,r3,MSR_PR; \
> > + beq 1f; \
> > + rldicl. r3,r3,(64-MSR_TS_LG),(64-2); /* SUSPENDED or ACTIVE*/ \
> > + beql+ 1f; /* Not SUSPENDED or ACTIVE */ \
> > + bl save_nvgprs; \
> > + RECONCILE_IRQ_STATE(r10,r11); \
> > + li r3,TM_CAUSE_MISC; \
> > + bl tm_reclaim_current; /* uint8 cause */ \
> > +1:
> > +
> > +#else /* CONFIG_PPC_TRANSACTIONAL_MEM */
> > +#define TM_KERNEL_ENTRY
> > +#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
> > +
> > #ifdef CONFIG_RELOCATABLE
> > #define __EXCEPTION_RELON_PROLOG_PSERIES_1(label, h) \
> > mfspr r11,SPRN_##h##SRR0; /* save SRR0 */ \
> > @@ -675,6 +696,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_CTRL)
> > EXCEPTION_PROLOG_COMMON(trap, area); \
> > /* Volatile regs are potentially clobbered here */ \
> > additions; \
> > + /* This is going to need to go somewhere else as well */\
> > + /* See comment in tm_recheckpoint() */\
> > + TM_KERNEL_ENTRY; \
> > addi r3,r1,STACK_FRAME_OVERHEAD; \
> > bl hdlr; \
> > b ret
> > @@ -689,6 +713,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_CTRL)
> > EXCEPTION_PROLOG_COMMON_3(trap); \
> > /* Volatile regs are potentially clobbered here */ \
> > additions; \
> > + TM_KERNEL_ENTRY; \
> > addi r3,r1,STACK_FRAME_OVERHEAD; \
> > bl hdlr
> >
> > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> > index 2cb5109a7ea3..107c15c6f48b 100644
> > --- a/arch/powerpc/kernel/entry_64.S
> > +++ b/arch/powerpc/kernel/entry_64.S
> > @@ -126,6 +126,11 @@ BEGIN_FW_FTR_SECTION
> > 33:
> > END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
> > #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE && CONFIG_PPC_SPLPAR */
> > + TM_KERNEL_ENTRY
> > + REST_GPR(0,r1)
> > + REST_4GPRS(3,r1)
> > + REST_2GPRS(7,r1)
> > + addi r9,r1,STACK_FRAME_OVERHEAD
>
> Why are we doing these restores here now?
The syscall handler expects the syscall params to still be in their
respective regs.
>
> >
> > /*
> > * A syscall should always be called with interrupts enabled
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index 77dc6d8288eb..ea75da0fd506 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -951,6 +951,23 @@ void tm_recheckpoint(struct thread_struct *thread)
> > if (!(thread->regs->msr & MSR_TM))
> > return;
> >
> > + /*
> > + * This is 'that' comment.
>
> I think I'm in the loop here but I don't actually know what this means.
>
> Senior Mikey moment or Crazy Cyril comments? I'll let the peanut gallery decide.
>
Oh quite possibly crazy Cyril comment that will have to be...
normalised. I should actually delete this and see if that's still the
case.
> > + *
> > + * If we get where with tm suspended or active then something
>
> s/where/here/
>
> > + * has gone wrong. I've added this now as a proof of concept.
> > + *
> > + * The problem I'm seeing without it is an attempt to
> > + * recheckpoint a CPU without a previous reclaim.
> > + *
> > + * I'm probably missed an exception entry with the
> > + * TM_KERNEL_ENTRY macro. Should be easy enough to find.
> > + */
> > + if (MSR_TM_ACTIVE(mfmsr()))
> > + return;
>
> I don't really get this. Wouldn't this test apply now?
>
> > +
> > + tm_enable();
>
> Why did we add this?
>
Ah yes that was a cleanup I noticed along the way and clearly forgot to
finish.
At the moment there's a bunch of tm_enable()s either before calling
functions like tm_recheckpoint() or tm_reclaim_current() or inside
helpers (tm_reclaim_current() for example again). I feel like callers
shouldn't have to worry, it should be up to the function actually doing
the TM work to enable it.
> > +
> > /* We really can't be interrupted here as the TEXASR registers can't
> > * change and later in the trecheckpoint code, we have a userspace R1.
> > * So let's hard disable over this region.
> > @@ -1009,6 +1026,13 @@ static inline void tm_recheckpoint_new_task(struct task_struct *new)
> > static inline void __switch_to_tm(struct task_struct *prev,
> > struct task_struct *new)
> > {
> > + /*
> > + * So, with the rework none of this code should not be needed.
> > + * I've left in the reclaim for now. This *should* save us
> > + * from any mistake in the new code. Also the
> > + * enabling/disabling logic of MSR_TM really should be
> > + * refactored into a common way with MSR_{FP,VEC,VSX}
> > + */
> > if (cpu_has_feature(CPU_FTR_TM)) {
> > if (tm_enabled(prev) || tm_enabled(new))
> > tm_enable();
> > @@ -1016,11 +1040,14 @@ static inline void __switch_to_tm(struct task_struct *prev,
> > if (tm_enabled(prev)) {
> > prev->thread.load_tm++;
> > tm_reclaim_task(prev);
> > - if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm == 0)
> > - prev->thread.regs->msr &= ~MSR_TM;
> > + /*
> > + * The disabling logic may be confused don't
> > + * disable for now
> > + *
> > + * if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm == 0)
> > + * prev->thread.regs->msr &= ~MSR_TM;
> > + */
>
> Why are you doing this when you just remove all this code in the next patch?
The next 3 or so patches will need squashing into this one before
merging.
> > }
> > -
> > - tm_recheckpoint_new_task(new);
> > }
> > }
> >
> > @@ -1055,6 +1082,8 @@ void restore_tm_state(struct pt_regs *regs)
> > msr_diff = current->thread.ckpt_regs.msr & ~regs->msr;
> > msr_diff &= MSR_FP | MSR_VEC | MSR_VSX;
> >
> > + tm_recheckpoint(¤t->thread);
> > +
>
> So why do we do tm_recheckpoint at all? Shouldn't most of the tm_blah code go
> away in process.c after all this?
>
I'm not sure I follow, we need to recheckpoint because we're going back
to userspace? Or would you rather calling the tm.S code directly from
the exception return path?
Yes, I hope we'll be able to have a fairly big cleanup commit of tm_
code in process.c at the end of this series.
> > /* Ensure that restore_math() will restore */
> > if (msr_diff & MSR_FP)
> > current->thread.load_fp = 1;
^ permalink raw reply
* Re: [RFC PATCH 06/12] [WIP] powerpc/tm: Remove dead code from __switch_to_tm()
From: Cyril Bur @ 2018-02-20 3:43 UTC (permalink / raw)
To: Michael Neuling, benh, linuxppc-dev
In-Reply-To: <1519095125.7360.54.camel@neuling.org>
On Tue, 2018-02-20 at 13:52 +1100, Michael Neuling wrote:
> Not sure I understand this.. should it be merged with the last patch?
>
Its all going to have to be one patch - I've left it split out to make
it more obvious which bits have had to mess with, this series
absolutely doesn't bisect.
> Needs a comment here.
>
>
> On Tue, 2018-02-20 at 11:22 +1100, Cyril Bur wrote:
> > ---
> > arch/powerpc/kernel/process.c | 24 +++++-------------------
> > 1 file changed, 5 insertions(+), 19 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index ea75da0fd506..574b05fe7d66 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -1027,27 +1027,13 @@ static inline void __switch_to_tm(struct task_struct *prev,
> > struct task_struct *new)
> > {
> > /*
> > - * So, with the rework none of this code should not be needed.
> > - * I've left in the reclaim for now. This *should* save us
> > - * from any mistake in the new code. Also the
> > - * enabling/disabling logic of MSR_TM really should be
> > + * The enabling/disabling logic of MSR_TM really should be
> > * refactored into a common way with MSR_{FP,VEC,VSX}
> > */
> > - if (cpu_has_feature(CPU_FTR_TM)) {
> > - if (tm_enabled(prev) || tm_enabled(new))
> > - tm_enable();
> > -
> > - if (tm_enabled(prev)) {
> > - prev->thread.load_tm++;
> > - tm_reclaim_task(prev);
> > - /*
> > - * The disabling logic may be confused don't
> > - * disable for now
> > - *
> > - * if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm == 0)
> > - * prev->thread.regs->msr &= ~MSR_TM;
> > - */
> > - }
> > + if (cpu_has_feature(CPU_FTR_TM) && tm_enabled(prev)) {
> > + prev->thread.load_tm++;
> > + if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm == 0)
> > + prev->thread.regs->msr &= ~MSR_TM;
> > }
> > }
> >
^ permalink raw reply
* Re: [RFC PATCH 12/12] [WIP] selftests/powerpc: Remove incorrect tm-syscall selftest
From: Cyril Bur @ 2018-02-20 3:42 UTC (permalink / raw)
To: Michael Neuling, benh, linuxppc-dev
In-Reply-To: <1519095881.7360.59.camel@neuling.org>
On Tue, 2018-02-20 at 14:04 +1100, Michael Neuling wrote:
> > --- a/tools/testing/selftests/powerpc/tm/tm-syscall.c
> > +++ /dev/null
> > @@ -1,106 +0,0 @@
> > -/*
> > - * Copyright 2015, Sam Bobroff, IBM Corp.
> > - * Licensed under GPLv2.
> > - *
> > - * Test the kernel's system call code to ensure that a system call
> > - * made from within an active HTM transaction is aborted with the
> > - * correct failure code.
>
> The above is still true
>
> > - * Conversely, ensure that a system call made from within a
> > - * suspended transaction can succeed.
>
> This is true anymore....
>
> So can we just modify the test to remove the second part?
>
Oh true I overlooked that
Thanks
> Mikey
^ permalink raw reply
* Re: [RFC PATCH 12/12] [WIP] selftests/powerpc: Remove incorrect tm-syscall selftest
From: Michael Neuling @ 2018-02-20 3:04 UTC (permalink / raw)
To: Cyril Bur, benh, linuxppc-dev
In-Reply-To: <20180220002241.29648-13-cyrilbur@gmail.com>
> --- a/tools/testing/selftests/powerpc/tm/tm-syscall.c
> +++ /dev/null
> @@ -1,106 +0,0 @@
> -/*
> - * Copyright 2015, Sam Bobroff, IBM Corp.
> - * Licensed under GPLv2.
> - *
> - * Test the kernel's system call code to ensure that a system call
> - * made from within an active HTM transaction is aborted with the
> - * correct failure code.
The above is still true
> - * Conversely, ensure that a system call made from within a
> - * suspended transaction can succeed.
This is true anymore....
So can we just modify the test to remove the second part?
Mikey
^ permalink raw reply
* Re: [RFC PATCH 10/12] [WIP] powerpc/tm: Correctly save/restore checkpointed sprs
From: Michael Neuling @ 2018-02-20 3:00 UTC (permalink / raw)
To: Cyril Bur, benh, linuxppc-dev
In-Reply-To: <20180220002241.29648-11-cyrilbur@gmail.com>
This needs a description of what you're trying to do. "Correctly" doesn't
really mean anything.
On Tue, 2018-02-20 at 11:22 +1100, Cyril Bur wrote:
> ---
> arch/powerpc/kernel/process.c | 57 +++++++++++++++++++++++++++++++++++++=
++++-
> -
> arch/powerpc/kernel/ptrace.c | 9 +++----
> 2 files changed, 58 insertions(+), 8 deletions(-)
>=20
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.=
c
> index cd3ae80a6878..674f75c56172 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -859,6 +859,8 @@ static inline bool tm_enabled(struct task_struct *tsk=
)
> return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);
> }
> =20
> +static inline void save_sprs(struct thread_struct *t);
> +
> static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cause)
> {
> /*
> @@ -879,6 +881,8 @@ static void tm_reclaim_thread(struct thread_struct *t=
hr,
> uint8_t cause)
> if (!MSR_TM_SUSPENDED(mfmsr()))
> return;
> =20
> + save_sprs(thr);
> +
> giveup_all(container_of(thr, struct task_struct, thread));
> =20
> tm_reclaim(thr, cause);
> @@ -991,6 +995,37 @@ void tm_recheckpoint(struct thread_struct *thread)
> =20
> __tm_recheckpoint(thread);
> =20
> + /*
> + * This is a stripped down restore_sprs(), we need to do this
> + * now as we might go straight out to userspace and currently
> + * the checkpointed values are on the CPU.
> + *
> + * TODO: Improve
> + */
> +#ifdef CONFIG_ALTIVEC
> + if (cpu_has_feature(CPU_FTR_ALTIVEC))
> + mtspr(SPRN_VRSAVE, thread->vrsave);
> +#endif
> +#ifdef CONFIG_PPC_BOOK3S_64
> + if (cpu_has_feature(CPU_FTR_DSCR)) {
> + u64 dscr =3D get_paca()->dscr_default;
> + if (thread->dscr_inherit)
> + dscr =3D thread->dscr;
> +
> + mtspr(SPRN_DSCR, dscr);
> + }
> +
> + if (cpu_has_feature(CPU_FTR_ARCH_207S)) {
> + /* The EBB regs aren't checkpointed */
> + mtspr(SPRN_FSCR, thread->fscr);
> +
> + mtspr(SPRN_TAR, thread->tar);
> + }
> +
> + /* I think we don't need to */
> + if (cpu_has_feature(CPU_FTR_ARCH_300))
> + mtspr(SPRN_TIDR, thread->tidr);
> +#endif
Why are you touching all the above hunk?
> local_irq_restore(flags);
> }
> =20
> @@ -1193,6 +1228,11 @@ struct task_struct *__switch_to(struct task_struct
> *prev,
> #endif
> =20
> new_thread =3D &new->thread;
> + /*
> + * Why not &prev->thread; ?
> + * What is the difference between &prev->thread and
> + * ¤t->thread ?
> + */
Why not just work it out and FIX THE CODE, rather than just rabbiting on ab=
out
it! :-P
> old_thread =3D ¤t->thread;
> =20
> WARN_ON(!irqs_disabled());
> @@ -1237,8 +1277,16 @@ struct task_struct *__switch_to(struct task_struct
> *prev,
> /*
> * We need to save SPRs before treclaim/trecheckpoint as these will
> * change a number of them.
> + *
> + * Because we're now reclaiming on kernel entry, we've had to
> + * already save them. Don't do it again.
> + * Note: To deliver a signal in the signal context, we'll have
> + * turned off TM because we don't want the signal context to
> + * have the transactional state of the main thread - what if
> + * we go through switch to at that point? Can we?
> */
> - save_sprs(&prev->thread);
> + if (!prev->thread.regs || !MSR_TM_ACTIVE(prev->thread.regs->msr))
> + save_sprs(&prev->thread);
> =20
> /* Save FPU, Altivec, VSX and SPE state */
> giveup_all(prev);
> @@ -1260,8 +1308,13 @@ struct task_struct *__switch_to(struct task_struct
> *prev,
> * for this is we manually create a stack frame for new tasks that
> * directly returns through ret_from_fork() or
> * ret_from_kernel_thread(). See copy_thread() for details.
> + *
> + * It isn't stricly nessesary that we avoid the restore here
> + * because we'll simply restore again after the recheckpoint,
> + * but we can avoid it for performance reasons.
> */
> - restore_sprs(old_thread, new_thread);
> + if (!new_thread->regs || !MSR_TM_ACTIVE(new_thread->regs->msr))
> + restore_sprs(old_thread, new_thread);
> =20
> last =3D _switch(old_thread, new_thread);
> =20
> diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
> index ca72d7391d40..16001987ba71 100644
> --- a/arch/powerpc/kernel/ptrace.c
> +++ b/arch/powerpc/kernel/ptrace.c
> @@ -135,12 +135,9 @@ static void flush_tmregs_to_thread(struct task_struc=
t
> *tsk)
> if ((!cpu_has_feature(CPU_FTR_TM)) || (tsk !=3D current))
> return;
> =20
> - if (MSR_TM_SUSPENDED(mfmsr())) {
> - tm_reclaim_current(TM_CAUSE_SIGNAL);
> - } else {
> - tm_enable();
> - tm_save_sprs(&(tsk->thread));
> - }
> + BUG_ON(MSR_TM_SUSPENDED(mfmsr()));
> + tm_enable();
> + tm_save_sprs(&(tsk->thread));
> }
> #else
> static inline void flush_tmregs_to_thread(struct task_struct *tsk) { }
^ permalink raw reply
* Re: [RFC PATCH 06/12] [WIP] powerpc/tm: Remove dead code from __switch_to_tm()
From: Michael Neuling @ 2018-02-20 2:52 UTC (permalink / raw)
To: Cyril Bur, benh, linuxppc-dev
In-Reply-To: <20180220002241.29648-7-cyrilbur@gmail.com>
Not sure I understand this.. should it be merged with the last patch?
Needs a comment here.
On Tue, 2018-02-20 at 11:22 +1100, Cyril Bur wrote:
> ---
> arch/powerpc/kernel/process.c | 24 +++++-------------------
> 1 file changed, 5 insertions(+), 19 deletions(-)
>=20
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.=
c
> index ea75da0fd506..574b05fe7d66 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -1027,27 +1027,13 @@ static inline void __switch_to_tm(struct task_str=
uct *prev,
> struct task_struct *new)
> {
> /*
> - * So, with the rework none of this code should not be needed.
> - * I've left in the reclaim for now. This *should* save us
> - * from any mistake in the new code. Also the
> - * enabling/disabling logic of MSR_TM really should be
> + * The enabling/disabling logic of MSR_TM really should be
> * refactored into a common way with MSR_{FP,VEC,VSX}
> */
> - if (cpu_has_feature(CPU_FTR_TM)) {
> - if (tm_enabled(prev) || tm_enabled(new))
> - tm_enable();
> -
> - if (tm_enabled(prev)) {
> - prev->thread.load_tm++;
> - tm_reclaim_task(prev);
> - /*
> - * The disabling logic may be confused don't
> - * disable for now
> - *
> - * if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm=
=3D=3D 0)
> - * prev->thread.regs->msr &=3D ~MSR_TM;
> - */
> - }
> + if (cpu_has_feature(CPU_FTR_TM) && tm_enabled(prev)) {
> + prev->thread.load_tm++;
> + if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm =3D=
=3D 0)
> + prev->thread.regs->msr &=3D ~MSR_TM;
> }
> }
> =20
^ permalink raw reply
* Re: [RFC PATCH 05/12] [WIP] powerpc/tm: Reclaim/recheckpoint on entry/exit
From: Michael Neuling @ 2018-02-20 2:50 UTC (permalink / raw)
To: Cyril Bur, benh, linuxppc-dev
In-Reply-To: <20180220002241.29648-6-cyrilbur@gmail.com>
On Tue, 2018-02-20 at 11:22 +1100, Cyril Bur wrote:
The comment from the cover sheet should be here
> ---
> arch/powerpc/include/asm/exception-64s.h | 25 +++++++++++++++++++++
> arch/powerpc/kernel/entry_64.S | 5 +++++
> arch/powerpc/kernel/process.c | 37 ++++++++++++++++++++++++++=
++----
> 3 files changed, 63 insertions(+), 4 deletions(-)
>=20
> diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/incl=
ude/asm/exception-64s.h
> index 471b2274fbeb..f904f19a9ec2 100644
> --- a/arch/powerpc/include/asm/exception-64s.h
> +++ b/arch/powerpc/include/asm/exception-64s.h
> @@ -35,6 +35,7 @@
> * implementations as possible.
> */
> #include <asm/head-64.h>
> +#include <asm/tm.h>
> =20
> /* PACA save area offsets (exgen, exmc, etc) */
> #define EX_R9 0
> @@ -127,6 +128,26 @@
> hrfid; \
> b hrfi_flush_fallback
> =20
> +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> +#define TM_KERNEL_ENTRY \
> + ld r3,_MSR(r1); \
> + /* Probably don't need to check if coming from user/kernel */ \
> + /* If TM is suspended or active then we must have come from*/ \
> + /* userspace */ \
> + andi. r0,r3,MSR_PR; \
> + beq 1f; \
> + rldicl. r3,r3,(64-MSR_TS_LG),(64-2); /* SUSPENDED or ACTIVE*/ \
> + beql+ 1f; /* Not SUSPENDED or ACTIVE */ \
> + bl save_nvgprs; \
> + RECONCILE_IRQ_STATE(r10,r11); \
> + li r3,TM_CAUSE_MISC; \
> + bl tm_reclaim_current; /* uint8 cause */ \
> +1:
> +
> +#else /* CONFIG_PPC_TRANSACTIONAL_MEM */
> +#define TM_KERNEL_ENTRY
> +#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
> +
> #ifdef CONFIG_RELOCATABLE
> #define __EXCEPTION_RELON_PROLOG_PSERIES_1(label, h) \
> mfspr r11,SPRN_##h##SRR0; /* save SRR0 */ \
> @@ -675,6 +696,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_CTRL)
> EXCEPTION_PROLOG_COMMON(trap, area); \
> /* Volatile regs are potentially clobbered here */ \
> additions; \
> + /* This is going to need to go somewhere else as well */\
> + /* See comment in tm_recheckpoint() */\
> + TM_KERNEL_ENTRY; \
> addi r3,r1,STACK_FRAME_OVERHEAD; \
> bl hdlr; \
> b ret
> @@ -689,6 +713,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_CTRL)
> EXCEPTION_PROLOG_COMMON_3(trap); \
> /* Volatile regs are potentially clobbered here */ \
> additions; \
> + TM_KERNEL_ENTRY; \
> addi r3,r1,STACK_FRAME_OVERHEAD; \
> bl hdlr
> =20
> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_6=
4.S
> index 2cb5109a7ea3..107c15c6f48b 100644
> --- a/arch/powerpc/kernel/entry_64.S
> +++ b/arch/powerpc/kernel/entry_64.S
> @@ -126,6 +126,11 @@ BEGIN_FW_FTR_SECTION
> 33:
> END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
> #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE && CONFIG_PPC_SPLPAR */
> + TM_KERNEL_ENTRY
> + REST_GPR(0,r1)
> + REST_4GPRS(3,r1)
> + REST_2GPRS(7,r1)
> + addi r9,r1,STACK_FRAME_OVERHEAD
Why are we doing these restores here now?
> =20
> /*
> * A syscall should always be called with interrupts enabled
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.=
c
> index 77dc6d8288eb..ea75da0fd506 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -951,6 +951,23 @@ void tm_recheckpoint(struct thread_struct *thread)
> if (!(thread->regs->msr & MSR_TM))
> return;
> =20
> + /*
> + * This is 'that' comment.
I think I'm in the loop here but I don't actually know what this means.=20
Senior Mikey moment or Crazy Cyril comments? I'll let the peanut gallery de=
cide.
> + *
> + * If we get where with tm suspended or active then something
s/where/here/
> + * has gone wrong. I've added this now as a proof of concept.
> + *
> + * The problem I'm seeing without it is an attempt to
> + * recheckpoint a CPU without a previous reclaim.
> + *
> + * I'm probably missed an exception entry with the
> + * TM_KERNEL_ENTRY macro. Should be easy enough to find.
> + */
> + if (MSR_TM_ACTIVE(mfmsr()))
> + return;
I don't really get this. Wouldn't this test apply now?
> +
> + tm_enable();
Why did we add this?
> +
> /* We really can't be interrupted here as the TEXASR registers can't
> * change and later in the trecheckpoint code, we have a userspace R1.
> * So let's hard disable over this region.
> @@ -1009,6 +1026,13 @@ static inline void tm_recheckpoint_new_task(struct=
task_struct *new)
> static inline void __switch_to_tm(struct task_struct *prev,
> struct task_struct *new)
> {
> + /*
> + * So, with the rework none of this code should not be needed.
> + * I've left in the reclaim for now. This *should* save us
> + * from any mistake in the new code. Also the
> + * enabling/disabling logic of MSR_TM really should be
> + * refactored into a common way with MSR_{FP,VEC,VSX}
> + */
> if (cpu_has_feature(CPU_FTR_TM)) {
> if (tm_enabled(prev) || tm_enabled(new))
> tm_enable();
> @@ -1016,11 +1040,14 @@ static inline void __switch_to_tm(struct task_str=
uct *prev,
> if (tm_enabled(prev)) {
> prev->thread.load_tm++;
> tm_reclaim_task(prev);
> - if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm =
=3D=3D 0)
> - prev->thread.regs->msr &=3D ~MSR_TM;
> + /*
> + * The disabling logic may be confused don't
> + * disable for now
> + *
> + * if (!MSR_TM_ACTIVE(prev->thread.regs->msr) && prev->thread.load_tm=
=3D=3D 0)
> + * prev->thread.regs->msr &=3D ~MSR_TM;
> + */
Why are you doing this when you just remove all this code in the next patch=
?
> }
> -
> - tm_recheckpoint_new_task(new);
> }
> }
> =20
> @@ -1055,6 +1082,8 @@ void restore_tm_state(struct pt_regs *regs)
> msr_diff =3D current->thread.ckpt_regs.msr & ~regs->msr;
> msr_diff &=3D MSR_FP | MSR_VEC | MSR_VSX;
> =20
> + tm_recheckpoint(¤t->thread);
> +
So why do we do tm_recheckpoint at all? Shouldn't most of the tm_blah code =
go
away in process.c after all this?
> /* Ensure that restore_math() will restore */
> if (msr_diff & MSR_FP)
> current->thread.load_fp =3D 1;
^ permalink raw reply
* Re: [PATCH] fix double ;;s in code
From: Rob Clark @ 2018-02-20 1:25 UTC (permalink / raw)
To: Pavel Machek
Cc: Christophe LEROY, SF Markus Elfring, kernel list, vgupta,
Russell King - ARM Linux, oleg, Catalin Marinas, Will Deacon,
paulus, Benjamin Herrenschmidt, Michael Ellerman, Ard Biesheuvel,
tglx, mingo, hpa, x86, scott.bauer, jonathan.derrick, axboe,
daniel.lezcano, Maxime Ripard, Chen-Yu Tsai, Alexander Deucher,
Christian König, Chunming Zhou, David Airlie,
list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>, Joerg Roedel <joro@8bytes.org>, ,
Shaohua Li, shawnguo, kernel, Fabio Estevam, Andrew Morton,
Alexey Brodkin, mhocko, vbabka, Vladislav.Zakharov, noamca,
Masahiro Yamada, Stephen Boyd, Viresh Kumar, Linus Walleij,
Heiko Stuebner, aik, ruscur, david, fbarrat, alistair,
Rob Herring, Joe Perches, Harry Wentland, Cheng, Tony,
Wenjing.Liu, Dave Airlie, Ding.Wang, sylvia.tsai, hersenxs.wu,
Rex.Zhu, JinHuiEric.Huang, Dan Carpenter, Archit Taneja,
narmstrong, Ville Syrjälä, Jordan Crouse,
Aishwarya Pant, Noralf Trønnes, andresx7, Monk.Liu,
Nicolai Hähnle, Grodzovsky, Andrey, linux-snps-arc,
linux-arm-kernel, kvm-ppc, linuxppc-dev, linux-efi, linux-block,
amd-gfx, dri-devel, linux-arm-msm, freedreno,
list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>, Joerg Roedel <joro@8bytes.org>, ,
linux-raid
In-Reply-To: <20180219193312.GA3709@amd>
On Mon, Feb 19, 2018 at 2:33 PM, Pavel Machek <pavel@ucw.cz> wrote:
> On Mon 2018-02-19 16:41:35, Daniel Vetter wrote:
>> On Sun, Feb 18, 2018 at 11:00:56AM +0100, Christophe LEROY wrote:
>> >
>> >
>> > Le 17/02/2018 =C3=A0 22:19, Pavel Machek a =C3=A9crit :
>> > >
>> > > Fix double ;;'s in code.
>> > >
>> > > Signed-off-by: Pavel Machek <pavel@ucw.cz>
>> >
>> > A summary of the files modified on top of the patch would help underst=
and
>> > the impact.
>> >
>> > A maybe there should be one patch by area, eg one for each arch specif=
ic
>> > modif and one for drivers/ and one for block/ ?
>>
>> Yeah, pls split this into one patch per area, with a suitable patch
>> subject prefix. Look at git log of each file to get a feeling for what's
>> the standard in each area.
>
> Yeah I can spend hour spliting it, and then people will ignore it
> anyway.
>
> If you care about one of the files being modified, please fix the
> bug, ";;" is a clear bug.
>
> If you don't care ... well I don't care either.
>
> drivers/gpu/ has four entries, i guess that's something for you.
fwiw, one of those four is dup of a patch that I've already pushed to
msm-next for drm/msm (which seems to be an argument for splitting up a
treewide patch.. which seems something quite scriptable, but up to you
whether you want to bother with that.. either way drm/msm is ;;-clean
now)
BR,
-R
> Pavel
>
>> > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/driv=
ers/gpu/drm/amd/display/dc/core/dc_link_dp.c
>> > > index 61e8c3e..33d91e4 100644
>> > > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
>> > > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
>> > > @@ -718,7 +718,7 @@ static enum link_training_result perform_channel=
_equalization_sequence(
>> > > uint32_t retries_ch_eq;
>> > > enum dc_lane_count lane_count =3D lt_settings->link_settin=
gs.lane_count;
>> > > union lane_align_status_updated dpcd_lane_status_updated =
=3D {{0}};
>> > > - union lane_status dpcd_lane_status[LANE_COUNT_DP_MAX] =3D {{{0}}};=
;
>> > > + union lane_status dpcd_lane_status[LANE_COUNT_DP_MAX] =3D {{{0}}};
>> > > hw_tr_pattern =3D get_supported_tp(link);
>> > > diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers=
/gpu/drm/amd/powerplay/amd_powerplay.c
>> > > index 4c3223a..adb6e7b 100644
>> > > --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>> > > +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
>> > > @@ -162,7 +162,7 @@ static int pp_hw_init(void *handle)
>> > > if(hwmgr->smumgr_funcs->start_smu(pp_handle->hwmgr=
)) {
>> > > pr_err("smc start failed\n");
>> > > hwmgr->smumgr_funcs->smu_fini(pp_handle->h=
wmgr);
>> > > - return -EINVAL;;
>> > > + return -EINVAL;
>> > > }
>> > > if (ret =3D=3D PP_DPM_DISABLED)
>> > > goto exit;
>> > > diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/d=
rm/msm/mdp/mdp5/mdp5_kms.c
>> > > index 3e9bba4..6d8e3a9 100644
>> > > --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
>> > > +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
>> > > @@ -680,7 +680,7 @@ struct msm_kms *mdp5_kms_init(struct drm_device =
*dev)
>> > > } else {
>> > > dev_info(&pdev->dev,
>> > > "no iommu, fallback to phys contig buffer=
s for scanout\n");
>> > > - aspace =3D NULL;;
>> > > + aspace =3D NULL;
>> > > }
>> > > pm_runtime_put_sync(&pdev->dev);
>> > > diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu=
/drm/scheduler/gpu_scheduler.c
>> > > index 2c18996..0d95888 100644
>> > > --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
>> > > +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
>> > > @@ -461,7 +461,7 @@ void drm_sched_hw_job_reset(struct drm_gpu_sched=
uler *sched, struct drm_sched_jo
>> > > {
>> > > struct drm_sched_job *s_job;
>> > > struct drm_sched_entity *entity, *tmp;
>> > > - int i;;
>> > > + int i;
>> > > spin_lock(&sched->job_list_lock);
>> > > list_for_each_entry_reverse(s_job, &sched->ring_mirror_lis=
t, node) {
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/b=
log.html
^ permalink raw reply
* [RFC PATCH 12/12] [WIP] selftests/powerpc: Remove incorrect tm-syscall selftest
From: Cyril Bur @ 2018-02-20 0:22 UTC (permalink / raw)
To: mikey, benh, linuxppc-dev
In-Reply-To: <20180220002241.29648-1-cyrilbur@gmail.com>
Currently we perform transactional memory work at late as possible.
That is we run in the kernel with the userspace checkpointed state on
the CPU untill we absolultely must remove it and store it away. Likely
a process switch, but possibly also signals or ptrace.
What this means is that if userspace does a system call in suspended
mode, it is possible that we will handle the system call and return
them without the need to to a reclaim/recheckpoint and so they can
expect to resume their transaction.
This is what tm-syscall tests for - the ability to perform a system
call in suspended state and still resume it afterwards.
TM reworks have meant that we now deal with any transactional state on
entry to the kernel, no matter the reason for entry (some expections
apply). We will categorically doom any suspended transaction that makes
a system call, making that transaction unresumeable.
This test will now always fail no matter what. I would like to note
here that this new behaviour does not break userspace at all. Hardware
Transactional Memory gives zero guarantee of forward progress and any
correct userspace has already had and will always have to implement a
non HTM fallback. Relying on this specific kernel behaviour also meant
relying on the stars aligning in the hardware such that there was no
cache overlaps and that it had a large enough footprint to handle
any system call without dooming a transaction.
---
tools/testing/selftests/powerpc/tm/Makefile | 4 +-
.../testing/selftests/powerpc/tm/tm-syscall-asm.S | 28 ------
tools/testing/selftests/powerpc/tm/tm-syscall.c | 106 ---------------------
3 files changed, 1 insertion(+), 137 deletions(-)
delete mode 100644 tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
delete mode 100644 tools/testing/selftests/powerpc/tm/tm-syscall.c
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index 7a1e53297588..88d6edffcb24 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -2,7 +2,7 @@
SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \
tm-signal-context-chk-vmx tm-signal-context-chk-vsx
-TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack \
+TEST_GEN_PROGS := tm-resched-dscr tm-signal-msr-resv tm-signal-stack \
tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \
tm-signal-drop-transaction \
$(SIGNAL_CONTEXT_CHK_TESTS)
@@ -13,8 +13,6 @@ $(TEST_GEN_PROGS): ../harness.c ../utils.c
CFLAGS += -mhtm
-$(OUTPUT)/tm-syscall: tm-syscall-asm.S
-$(OUTPUT)/tm-syscall: CFLAGS += -I../../../../../usr/include
$(OUTPUT)/tm-tmspr: CFLAGS += -pthread
$(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
$(OUTPUT)/tm-resched-dscr: ../pmu/lib.o
diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S b/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
deleted file mode 100644
index bd1ca25febe4..000000000000
--- a/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <ppc-asm.h>
-#include <asm/unistd.h>
-
- .text
-FUNC_START(getppid_tm_active)
- tbegin.
- beq 1f
- li r0, __NR_getppid
- sc
- tend.
- blr
-1:
- li r3, -1
- blr
-
-FUNC_START(getppid_tm_suspended)
- tbegin.
- beq 1f
- li r0, __NR_getppid
- tsuspend.
- sc
- tresume.
- tend.
- blr
-1:
- li r3, -1
- blr
diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall.c b/tools/testing/selftests/powerpc/tm/tm-syscall.c
deleted file mode 100644
index 454b965a2db3..000000000000
--- a/tools/testing/selftests/powerpc/tm/tm-syscall.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2015, Sam Bobroff, IBM Corp.
- * Licensed under GPLv2.
- *
- * Test the kernel's system call code to ensure that a system call
- * made from within an active HTM transaction is aborted with the
- * correct failure code.
- * Conversely, ensure that a system call made from within a
- * suspended transaction can succeed.
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/syscall.h>
-#include <asm/tm.h>
-#include <sys/time.h>
-#include <stdlib.h>
-
-#include "utils.h"
-#include "tm.h"
-
-extern int getppid_tm_active(void);
-extern int getppid_tm_suspended(void);
-
-unsigned retries = 0;
-
-#define TEST_DURATION 10 /* seconds */
-#define TM_RETRIES 100
-
-pid_t getppid_tm(bool suspend)
-{
- int i;
- pid_t pid;
-
- for (i = 0; i < TM_RETRIES; i++) {
- if (suspend)
- pid = getppid_tm_suspended();
- else
- pid = getppid_tm_active();
-
- if (pid >= 0)
- return pid;
-
- if (failure_is_persistent()) {
- if (failure_is_syscall())
- return -1;
-
- printf("Unexpected persistent transaction failure.\n");
- printf("TEXASR 0x%016lx, TFIAR 0x%016lx.\n",
- __builtin_get_texasr(), __builtin_get_tfiar());
- exit(-1);
- }
-
- retries++;
- }
-
- printf("Exceeded limit of %d temporary transaction failures.\n", TM_RETRIES);
- printf("TEXASR 0x%016lx, TFIAR 0x%016lx.\n",
- __builtin_get_texasr(), __builtin_get_tfiar());
-
- exit(-1);
-}
-
-int tm_syscall(void)
-{
- unsigned count = 0;
- struct timeval end, now;
-
- SKIP_IF(!have_htm_nosc());
-
- setbuf(stdout, NULL);
-
- printf("Testing transactional syscalls for %d seconds...\n", TEST_DURATION);
-
- gettimeofday(&end, NULL);
- now.tv_sec = TEST_DURATION;
- now.tv_usec = 0;
- timeradd(&end, &now, &end);
-
- for (count = 0; timercmp(&now, &end, <); count++) {
- /*
- * Test a syscall within a suspended transaction and verify
- * that it succeeds.
- */
- FAIL_IF(getppid_tm(true) == -1); /* Should succeed. */
-
- /*
- * Test a syscall within an active transaction and verify that
- * it fails with the correct failure code.
- */
- FAIL_IF(getppid_tm(false) != -1); /* Should fail... */
- FAIL_IF(!failure_is_persistent()); /* ...persistently... */
- FAIL_IF(!failure_is_syscall()); /* ...with code syscall. */
- gettimeofday(&now, 0);
- }
-
- printf("%d active and suspended transactions behaved correctly.\n", count);
- printf("(There were %d transaction retries.)\n", retries);
-
- return 0;
-}
-
-int main(void)
-{
- return test_harness(tm_syscall, "tm_syscall");
-}
--
2.16.2
^ permalink raw reply related
* [RFC PATCH 10/12] [WIP] powerpc/tm: Correctly save/restore checkpointed sprs
From: Cyril Bur @ 2018-02-20 0:22 UTC (permalink / raw)
To: mikey, benh, linuxppc-dev
In-Reply-To: <20180220002241.29648-1-cyrilbur@gmail.com>
---
arch/powerpc/kernel/process.c | 57 +++++++++++++++++++++++++++++++++++++++++--
arch/powerpc/kernel/ptrace.c | 9 +++----
2 files changed, 58 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index cd3ae80a6878..674f75c56172 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -859,6 +859,8 @@ static inline bool tm_enabled(struct task_struct *tsk)
return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);
}
+static inline void save_sprs(struct thread_struct *t);
+
static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cause)
{
/*
@@ -879,6 +881,8 @@ static void tm_reclaim_thread(struct thread_struct *thr, uint8_t cause)
if (!MSR_TM_SUSPENDED(mfmsr()))
return;
+ save_sprs(thr);
+
giveup_all(container_of(thr, struct task_struct, thread));
tm_reclaim(thr, cause);
@@ -991,6 +995,37 @@ void tm_recheckpoint(struct thread_struct *thread)
__tm_recheckpoint(thread);
+ /*
+ * This is a stripped down restore_sprs(), we need to do this
+ * now as we might go straight out to userspace and currently
+ * the checkpointed values are on the CPU.
+ *
+ * TODO: Improve
+ */
+#ifdef CONFIG_ALTIVEC
+ if (cpu_has_feature(CPU_FTR_ALTIVEC))
+ mtspr(SPRN_VRSAVE, thread->vrsave);
+#endif
+#ifdef CONFIG_PPC_BOOK3S_64
+ if (cpu_has_feature(CPU_FTR_DSCR)) {
+ u64 dscr = get_paca()->dscr_default;
+ if (thread->dscr_inherit)
+ dscr = thread->dscr;
+
+ mtspr(SPRN_DSCR, dscr);
+ }
+
+ if (cpu_has_feature(CPU_FTR_ARCH_207S)) {
+ /* The EBB regs aren't checkpointed */
+ mtspr(SPRN_FSCR, thread->fscr);
+
+ mtspr(SPRN_TAR, thread->tar);
+ }
+
+ /* I think we don't need to */
+ if (cpu_has_feature(CPU_FTR_ARCH_300))
+ mtspr(SPRN_TIDR, thread->tidr);
+#endif
local_irq_restore(flags);
}
@@ -1193,6 +1228,11 @@ struct task_struct *__switch_to(struct task_struct *prev,
#endif
new_thread = &new->thread;
+ /*
+ * Why not &prev->thread; ?
+ * What is the difference between &prev->thread and
+ * ¤t->thread ?
+ */
old_thread = ¤t->thread;
WARN_ON(!irqs_disabled());
@@ -1237,8 +1277,16 @@ struct task_struct *__switch_to(struct task_struct *prev,
/*
* We need to save SPRs before treclaim/trecheckpoint as these will
* change a number of them.
+ *
+ * Because we're now reclaiming on kernel entry, we've had to
+ * already save them. Don't do it again.
+ * Note: To deliver a signal in the signal context, we'll have
+ * turned off TM because we don't want the signal context to
+ * have the transactional state of the main thread - what if
+ * we go through switch to at that point? Can we?
*/
- save_sprs(&prev->thread);
+ if (!prev->thread.regs || !MSR_TM_ACTIVE(prev->thread.regs->msr))
+ save_sprs(&prev->thread);
/* Save FPU, Altivec, VSX and SPE state */
giveup_all(prev);
@@ -1260,8 +1308,13 @@ struct task_struct *__switch_to(struct task_struct *prev,
* for this is we manually create a stack frame for new tasks that
* directly returns through ret_from_fork() or
* ret_from_kernel_thread(). See copy_thread() for details.
+ *
+ * It isn't stricly nessesary that we avoid the restore here
+ * because we'll simply restore again after the recheckpoint,
+ * but we can avoid it for performance reasons.
*/
- restore_sprs(old_thread, new_thread);
+ if (!new_thread->regs || !MSR_TM_ACTIVE(new_thread->regs->msr))
+ restore_sprs(old_thread, new_thread);
last = _switch(old_thread, new_thread);
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index ca72d7391d40..16001987ba71 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -135,12 +135,9 @@ static void flush_tmregs_to_thread(struct task_struct *tsk)
if ((!cpu_has_feature(CPU_FTR_TM)) || (tsk != current))
return;
- if (MSR_TM_SUSPENDED(mfmsr())) {
- tm_reclaim_current(TM_CAUSE_SIGNAL);
- } else {
- tm_enable();
- tm_save_sprs(&(tsk->thread));
- }
+ BUG_ON(MSR_TM_SUSPENDED(mfmsr()));
+ tm_enable();
+ tm_save_sprs(&(tsk->thread));
}
#else
static inline void flush_tmregs_to_thread(struct task_struct *tsk) { }
--
2.16.2
^ 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