RE: [PATCH 2/5] MAINTAINERS: rectify entry for ARM/TOSHIBA VISCONTI ARCHITECTURE

2021-03-15 Thread nobuhiro1.iwamatsu
Hi Lukas,

> -Original Message-
> From: Lukas Bulwahn [mailto:lukas.bulw...@gmail.com]
> Sent: Tuesday, March 16, 2021 1:05 AM
> To: Rob Herring ; devicet...@vger.kernel.org
> Cc: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT) ; Yu 
> Chen ;
> Anitha Chrisanthus ; Jonathan Cameron 
> ; Joe Perches
> ; Ralf Ramsauer ; 
> kernel-janit...@vger.kernel.org;
> linux-kernel@vger.kernel.org; Lukas Bulwahn 
> Subject: [PATCH 2/5] MAINTAINERS: rectify entry for ARM/TOSHIBA VISCONTI 
> ARCHITECTURE
> 
> Commit 836863a08c99 ("MAINTAINERS: Add information for Toshiba Visconti ARM
> SoCs") refers to the non-existing file toshiba,tmpv7700-pinctrl.yaml in
> ./Documentation/devicetree/bindings/pinctrl/. Commit 1825c1fe0057
> ("pinctrl: Add DT bindings for Toshiba Visconti TMPV7700 SoC") originating
> from the same patch series however adds the file
> toshiba,visconti-pinctrl.yaml in that directory instead.
> 
> So, refer to toshiba,visconti-pinctrl.yaml in the ARM/TOSHIBA VISCONTI
> ARCHITECTURE section instead.
> 
> Signed-off-by: Lukas Bulwahn 

Thanks for your patch.
Acked-by: Nobuhiro Iwamatsu 

> ---
>  MAINTAINERS | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 251e205b5444..89404ca760b9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2621,7 +2621,7 @@ T:  git 
> git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git
>  F:   Documentation/devicetree/bindings/arm/toshiba.yaml
>  F:   Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
>  F:   Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> -F:   Documentation/devicetree/bindings/pinctrl/toshiba,tmpv7700-pinctrl.yaml
> +F:   Documentation/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml
>  F:   Documentation/devicetree/bindings/watchdog/toshiba,visconti-wdt.yaml
>  F:   arch/arm64/boot/dts/toshiba/
>  F:   drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
> --
> 2.17.1

Best regards,
  Nobuhiro


RE: linux-next: manual merge of the net-next tree with the arm-soc tree

2021-02-16 Thread nobuhiro1.iwamatsu
Hi,

I attached a patch which revise this issue.
If I need to send with git send-email, please let me know.

Best regards,
  Nobuhiro

> -Original Message-
> From: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT)
> Sent: Tuesday, February 16, 2021 10:47 PM
> To: Naresh Kamboju ; Yoshihiro Shimoda 
> ; Stephen
> Rothwell 
> Cc: David Miller ; Networking ; 
> Olof Johansson ; Arnd
> Bergmann ; ARM ; Bartosz 
> Golaszewski
> ; Linux Next Mailing List 
> ; Linux Kernel Mailing List
> ; lkft-tri...@lists.linaro.org
> Subject: RE: linux-next: manual merge of the net-next tree with the arm-soc 
> tree
> 
> Hi,
> 
> Thnaks for your report.
> 
> > LKFT builders also found this problem while building arm64 dtb.
> >
> > > This ` causes the following build error on the next-20210216.
> > >
> > >   DTC arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dtb
> > > Error: arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts:52.3-4 syntax 
> > > error
> > > FATAL ERROR: Unable to parse input tree
> > > scripts/Makefile.lib:336: recipe for target 
> > > 'arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dtb' failed
> > > make[2]: *** [arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dtb] Error 1
> > > scripts/Makefile.build:530: recipe for target 
> > > 'arch/arm64/boot/dts/toshiba' failed
> >
> > ref:
> > https://gitlab.com/Linaro/lkft/mirrors/next/linux-next/-/jobs/1033072509#L382
> >
> 
> This seems to be a problem fixing the conflict.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c5e188ea08290d9b6625b4bef322012c0b
> 1902d7
> 
> ```
> diff --git a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts 
> b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> index 2407b2d89c1e9..3760df93a89b5 100644
> --- a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> +++ b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> @@ -49,4 +49,22 @@
> 
>   {
>   status = "okay";
> +};`
> +
> + {
> + status = "okay";
> + phy-handle = <>;
> + phy-mode = "rgmii-id";
> + clocks = <>, <>;
> + clock-names = "stmmaceth", "phy_ref_clk";
> +
> + mdio0 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "snps,dwmac-mdio";
> + phy0: ethernet-phy@1 {
> + device_type = "ethernet-phy";
> + reg = <0x1>;
> + };
> + };
>  };
> ```
> 
> Stephen, could you fix this?
> 
> Best regards,
>   Nobuhiro


0001-arm64-dts-visconti-Fix-parse-error-for-TMPV7708-RM-m.patch
Description: 0001-arm64-dts-visconti-Fix-parse-error-for-TMPV7708-RM-m.patch


RE: linux-next: manual merge of the net-next tree with the arm-soc tree

2021-02-16 Thread nobuhiro1.iwamatsu
Hi,

Thnaks for your report.

> LKFT builders also found this problem while building arm64 dtb.
> 
> > This ` causes the following build error on the next-20210216.
> >
> >   DTC arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dtb
> > Error: arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts:52.3-4 syntax error
> > FATAL ERROR: Unable to parse input tree
> > scripts/Makefile.lib:336: recipe for target 
> > 'arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dtb' failed
> > make[2]: *** [arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dtb] Error 1
> > scripts/Makefile.build:530: recipe for target 'arch/arm64/boot/dts/toshiba' 
> > failed
> 
> ref:
> https://gitlab.com/Linaro/lkft/mirrors/next/linux-next/-/jobs/1033072509#L382
> 

This seems to be a problem fixing the conflict.

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c5e188ea08290d9b6625b4bef322012c0b1902d7

```
diff --git a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts 
b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
index 2407b2d89c1e9..3760df93a89b5 100644
--- a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
+++ b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
@@ -49,4 +49,22 @@
 
  {
status = "okay";
+};`
+
+ {
+   status = "okay";
+   phy-handle = <>;
+   phy-mode = "rgmii-id";
+   clocks = <>, <>;
+   clock-names = "stmmaceth", "phy_ref_clk";
+
+   mdio0 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "snps,dwmac-mdio";
+   phy0: ethernet-phy@1 {
+   device_type = "ethernet-phy";
+   reg = <0x1>;
+   };
+   };
 };
```

Stephen, could you fix this?

Best regards,
  Nobuhiro


RE: linux-next: manual merge of the net-next tree with the arm-soc tree

2021-02-15 Thread nobuhiro1.iwamatsu
Hi,

> -Original Message-
> From: Stephen Rothwell [mailto:s...@canb.auug.org.au]
> Sent: Tuesday, February 16, 2021 11:05 AM
> To: David Miller ; Networking ; 
> Olof Johansson ; Arnd
> Bergmann ; ARM 
> Cc: Bartosz Golaszewski ; Linux Kernel Mailing 
> List ; Linux
> Next Mailing List ; iwamatsu nobuhiro(岩松 信洋 
> □SWC◯ACT)
> 
> Subject: linux-next: manual merge of the net-next tree with the arm-soc tree
> 
> Hi all,
> 
> Today's linux-next merge of the net-next tree got conflicts in:
> 
>   arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
>   arch/arm64/boot/dts/toshiba/tmpv7708.dtsi
> 
> between commits:
> 
>   4fd18fc38757 ("arm64: dts: visconti: Add watchdog support for TMPV7708 SoC")
>   0109a17564fc ("arm: dts: visconti: Add DT support for Toshiba Visconti5 
> GPIO driver")
> 
> from the arm-soc tree and commit:
> 
>   ec8a42e73432 ("arm: dts: visconti: Add DT support for Toshiba Visconti5 
> ethernet controller")
> 
> from the net-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 

This is because the DTS changes are included in net-next. This patch should be 
merged via the soc tree.
I had the same problem before. How is it correct to send a DTS patch?
Should I separate into different series?

Best regards,
  Nobuhiro


RE: linux-next: manual merge of the gpio-brgl tree with the arm-soc tree

2021-02-09 Thread nobuhiro1.iwamatsu
Hi all,

> -Original Message-
> From: Arnd Bergmann [mailto:a...@kernel.org]
> Sent: Tuesday, February 9, 2021 8:36 PM
> To: Geert Uytterhoeven 
> Cc: Stephen Rothwell ; Bartosz Golaszewski 
> ; Olof Johansson ;
> Arnd Bergmann ; ARM ; 
> Bartosz Golaszewski
> ; Linux Kernel Mailing List 
> ; Linux Next Mailing List
> ; iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT) 
> 
> Subject: Re: linux-next: manual merge of the gpio-brgl tree with the arm-soc 
> tree
> 
> On Tue, Feb 9, 2021 at 11:01 AM Geert Uytterhoeven  
> wrote:
> > On Thu, Jan 28, 2021 at 7:05 AM Stephen Rothwell  
> > wrote:
> 
> > > diff --cc arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> > > index 37da418393e0,950010a290f0..
> > > --- a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> > > +++ b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> > > @@@ -42,7 -42,6 +42,11 @@@
> > > clock-names = "apb_pclk";
> > >   };
> > >
> > >  + {
> > >  +  status = "okay";
> > >  +  clocks = <_clk>;
> > >  +};
> > > ++
> > > +  {
> > > +   status = "okay";
> > > + };
> >
> > Probably some sort order should be taken into account (gpio before uart0),
> > also avoidng the conflict?
> >
> 
> We normally do this by asking everyone to send the dts changes for
> inclusion through the soc tree rather than the subsystem that contains
> the driver. Why is this one in the gpio-brgl tree?

Perhaps this is Bartosz's mistake.
Linus has commented that gpio ml is captured via the soc tree.
  
https://lore.kernel.org/linux-gpio/cacrpkdb--gsy-0vnafs9pik4tjrnrtryezr2rbzd6sfm8zo...@mail.gmail.com/

Bartosz, could you remove commit " arm: dts: visconti: Add DT support for 
Toshiba Visconti5 GPIO driver" from
your tree?

Best regards,
  Nobuhiro


RE: [PATCH 5.4 064/134] ACPI: GED: add support for _Exx / _Lxx handler methods

2020-06-17 Thread nobuhiro1.iwamatsu
Hi again,

> -Original Message-
> From: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT)
> Sent: Wednesday, June 17, 2020 6:23 PM
> To: Greg Kroah-Hartman ; 
> linux-kernel@vger.kernel.org
> Cc: sta...@vger.kernel.org; Ard Biesheuvel ; Rafael J. 
> Wysocki 
> Subject: RE: [PATCH 5.4 064/134] ACPI: GED: add support for _Exx / _Lxx 
> handler methods
> 
> Hi,
> 
> > -Original Message-
> > From: stable-ow...@vger.kernel.org [mailto:stable-ow...@vger.kernel.org] On 
> > Behalf Of Greg Kroah-Hartman
> > Sent: Wednesday, June 17, 2020 12:34 AM
> > To: linux-kernel@vger.kernel.org
> > Cc: Greg Kroah-Hartman ; 
> > sta...@vger.kernel.org; Ard Biesheuvel ;
> Rafael
> > J. Wysocki 
> > Subject: [PATCH 5.4 064/134] ACPI: GED: add support for _Exx / _Lxx handler 
> > methods
> >
> > From: Ard Biesheuvel 
> >
> > commit ea6f3af4c5e63f6981c0b0ab8ebec438e2d5ef40 upstream.
> >
> > Per the ACPI spec, interrupts in the range [0, 255] may be handled
> > in AML using individual methods whose naming is based on the format
> > _Exx or _Lxx, where xx is the hex representation of the interrupt
> > index.
> >
> > Add support for this missing feature to our ACPI GED driver.
> >
> > Cc: v4.9+  # v4.9+
> > Signed-off-by: Ard Biesheuvel 
> > Signed-off-by: Rafael J. Wysocki 
> > Signed-off-by: Greg Kroah-Hartman 
> >
> 
> This patch also requires the following patch.
> Please apply to this kernel version, 4.9, 4.14, 4.19, 5.6 and 5.7.
> 
> From e5c399b0bd6490c12c0af2a9eaa9d7cd805d52c9 Mon Sep 17 00:00:00 2001
> From: Ard Biesheuvel 
> Date: Wed, 27 May 2020 13:37:00 +0200

I update with the correct information.

commit e5c399b0bd6490c12c0af2a9eaa9d7cd805d52c9
Author: Ard Biesheuvel 
Date:   Wed May 27 13:37:00 2020 +0200



Best regards,
  Nobuhiro

> 
> ACPI: GED: use correct trigger type field in _Exx / _Lxx handling
> 
> Commit ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler
> methods") added a reference to the 'triggering' field of either the
> normal or the extended ACPI IRQ resource struct, but inadvertently used
> the wrong pointer in the latter case. Note that both pointers refer to the
> same union, and the 'triggering' field appears at the same offset in both
> struct types, so it currently happens to work by accident. But let's fix
> it nonetheless
> 
> Fixes: ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler 
> methods")
> Signed-off-by: Ard Biesheuvel 
> Signed-off-by: Rafael J. Wysocki 
> 
> Best regards,
>   Nobuhiro
> 
> > ---
> >  drivers/acpi/evged.c |   22 +++---
> >  1 file changed, 19 insertions(+), 3 deletions(-)
> >
> > --- a/drivers/acpi/evged.c
> > +++ b/drivers/acpi/evged.c
> > @@ -79,6 +79,8 @@ static acpi_status acpi_ged_request_inte
> > struct resource r;
> > struct acpi_resource_irq *p = >data.irq;
> > struct acpi_resource_extended_irq *pext = >data.extended_irq;
> > +   char ev_name[5];
> > +   u8 trigger;
> >
> > if (ares->type == ACPI_RESOURCE_TYPE_END_TAG)
> > return AE_OK;
> > @@ -87,14 +89,28 @@ static acpi_status acpi_ged_request_inte
> > dev_err(dev, "unable to parse IRQ resource\n");
> > return AE_ERROR;
> > }
> > -   if (ares->type == ACPI_RESOURCE_TYPE_IRQ)
> > +   if (ares->type == ACPI_RESOURCE_TYPE_IRQ) {
> > gsi = p->interrupts[0];
> > -   else
> > +   trigger = p->triggering;
> > +   } else {
> > gsi = pext->interrupts[0];
> > +   trigger = p->triggering;
> > +   }
> >
> > irq = r.start;
> >
> > -   if (ACPI_FAILURE(acpi_get_handle(handle, "_EVT", _handle))) {
> > +   switch (gsi) {
> > +   case 0 ... 255:
> > +   sprintf(ev_name, "_%c%02hhX",
> > +   trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
> > +
> > +   if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, _handle)))
> > +   break;
> > +   /* fall through */
> > +   default:
> > +   if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", _handle)))
> > +   break;
> > +
> > dev_err(dev, "cannot locate _EVT method\n");
> > return AE_ERROR;
> > }
> >



RE: [PATCH 5.4 064/134] ACPI: GED: add support for _Exx / _Lxx handler methods

2020-06-17 Thread nobuhiro1.iwamatsu
Hi,

> -Original Message-
> From: stable-ow...@vger.kernel.org [mailto:stable-ow...@vger.kernel.org] On 
> Behalf Of Greg Kroah-Hartman
> Sent: Wednesday, June 17, 2020 12:34 AM
> To: linux-kernel@vger.kernel.org
> Cc: Greg Kroah-Hartman ; sta...@vger.kernel.org; 
> Ard Biesheuvel ; Rafael
> J. Wysocki 
> Subject: [PATCH 5.4 064/134] ACPI: GED: add support for _Exx / _Lxx handler 
> methods
> 
> From: Ard Biesheuvel 
> 
> commit ea6f3af4c5e63f6981c0b0ab8ebec438e2d5ef40 upstream.
> 
> Per the ACPI spec, interrupts in the range [0, 255] may be handled
> in AML using individual methods whose naming is based on the format
> _Exx or _Lxx, where xx is the hex representation of the interrupt
> index.
> 
> Add support for this missing feature to our ACPI GED driver.
> 
> Cc: v4.9+  # v4.9+
> Signed-off-by: Ard Biesheuvel 
> Signed-off-by: Rafael J. Wysocki 
> Signed-off-by: Greg Kroah-Hartman 
> 

This patch also requires the following patch.
Please apply to this kernel version, 4.9, 4.14, 4.19, 5.6 and 5.7. 

From e5c399b0bd6490c12c0af2a9eaa9d7cd805d52c9 Mon Sep 17 00:00:00 2001
From: Ard Biesheuvel 
Date: Wed, 27 May 2020 13:37:00 +0200

ACPI: GED: use correct trigger type field in _Exx / _Lxx handling

Commit ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler
methods") added a reference to the 'triggering' field of either the
normal or the extended ACPI IRQ resource struct, but inadvertently used
the wrong pointer in the latter case. Note that both pointers refer to the
same union, and the 'triggering' field appears at the same offset in both
struct types, so it currently happens to work by accident. But let's fix
it nonetheless

Fixes: ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler 
methods")
Signed-off-by: Ard Biesheuvel 
Signed-off-by: Rafael J. Wysocki 

Best regards,
  Nobuhiro

> ---
>  drivers/acpi/evged.c |   22 +++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
> 
> --- a/drivers/acpi/evged.c
> +++ b/drivers/acpi/evged.c
> @@ -79,6 +79,8 @@ static acpi_status acpi_ged_request_inte
>   struct resource r;
>   struct acpi_resource_irq *p = >data.irq;
>   struct acpi_resource_extended_irq *pext = >data.extended_irq;
> + char ev_name[5];
> + u8 trigger;
> 
>   if (ares->type == ACPI_RESOURCE_TYPE_END_TAG)
>   return AE_OK;
> @@ -87,14 +89,28 @@ static acpi_status acpi_ged_request_inte
>   dev_err(dev, "unable to parse IRQ resource\n");
>   return AE_ERROR;
>   }
> - if (ares->type == ACPI_RESOURCE_TYPE_IRQ)
> + if (ares->type == ACPI_RESOURCE_TYPE_IRQ) {
>   gsi = p->interrupts[0];
> - else
> + trigger = p->triggering;
> + } else {
>   gsi = pext->interrupts[0];
> + trigger = p->triggering;
> + }
> 
>   irq = r.start;
> 
> - if (ACPI_FAILURE(acpi_get_handle(handle, "_EVT", _handle))) {
> + switch (gsi) {
> + case 0 ... 255:
> + sprintf(ev_name, "_%c%02hhX",
> + trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
> +
> + if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, _handle)))
> + break;
> + /* fall through */
> + default:
> + if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", _handle)))
> + break;
> +
>   dev_err(dev, "cannot locate _EVT method\n");
>   return AE_ERROR;
>   }
> 



RE: [PATCH 4.4 26/65] sched/fair, cpumask: Export for_each_cpu_wrap()

2020-05-27 Thread nobuhiro1.iwamatsu
Hi,

> -Original Message-
> From: stable-ow...@vger.kernel.org [mailto:stable-ow...@vger.kernel.org] On 
> Behalf Of Greg Kroah-Hartman
> Sent: Wednesday, May 27, 2020 3:53 AM
> To: linux-kernel@vger.kernel.org
> Cc: Greg Kroah-Hartman ; sta...@vger.kernel.org; 
> Peter Zijlstra (Intel)
> ; Lauro Ramos Venancio ; Linus 
> Torvalds ;
> Mike Galbraith ; Rik van Riel ; Thomas 
> Gleixner ;
> lw...@redhat.com; Ingo Molnar ; Daniel Jordan 
> ; Sasha Levin
> 
> Subject: [PATCH 4.4 26/65] sched/fair, cpumask: Export for_each_cpu_wrap()
> 
> From: Peter Zijlstra 
> 
> [ Upstream commit c743f0a5c50f2fcbc628526279cfa24f3dabe182 ]
> 
> More users for for_each_cpu_wrap() have appeared. Promote the construct
> to generic cpumask interface.
> 
> The implementation is slightly modified to reduce arguments.
> 
> Signed-off-by: Peter Zijlstra (Intel) 
> Cc: Lauro Ramos Venancio 
> Cc: Linus Torvalds 
> Cc: Mike Galbraith 
> Cc: Peter Zijlstra 
> Cc: Rik van Riel 
> Cc: Thomas Gleixner 
> Cc: lw...@redhat.com
> Link: 
> http://lkml.kernel.org/r/20170414122005.o35me2h5nowqk...@hirez.programming.kicks-ass.net
> Signed-off-by: Ingo Molnar 
> [dj: include only what's added to the cpumask interface, 4.4 doesn't
>  have them in the scheduler]
> Signed-off-by: Daniel Jordan 
> Signed-off-by: Sasha Levin 
> ---
>  include/linux/cpumask.h | 17 +
>  lib/cpumask.c   | 32 
>  2 files changed, 49 insertions(+)

This commit also needs the following commits:

commit d207af2eab3f8668b95ad02b21930481c42806fd
Author: Michael Kelley 
Date:   Wed Feb 14 02:54:03 2018 +

cpumask: Make for_each_cpu_wrap() available on UP as well

for_each_cpu_wrap() was originally added in the #else half of a
large "#if NR_CPUS == 1" statement, but was omitted in the #if
half.  This patch adds the missing #if half to prevent compile
errors when NR_CPUS is 1.

Reported-by: kbuild test robot 
Signed-off-by: Michael Kelley 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: k...@microsoft.com
Cc: martin.peter...@oracle.com
Cc: mikel...@microsoft.com
Fixes: c743f0a5c50f ("sched/fair, cpumask: Export for_each_cpu_wrap()")
Link: 
http://lkml.kernel.org/r/sn6pr1901mb2045f087f59450507d4fcc17cb...@sn6pr1901mb2045.namprd19.prod.outlook.com
Signed-off-by: Ingo Molnar 

Please apply this commit.

Best regards,
  Nobuhro

> 
> diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
> index bb3a4bb35183..1322883e7b46 100644
> --- a/include/linux/cpumask.h
> +++ b/include/linux/cpumask.h
> @@ -232,6 +232,23 @@ unsigned int cpumask_local_spread(unsigned int i, int 
> node);
>   (cpu) = cpumask_next_zero((cpu), (mask)),   \
>   (cpu) < nr_cpu_ids;)
> 
> +extern int cpumask_next_wrap(int n, const struct cpumask *mask, int start, 
> bool wrap);
> +
> +/**
> + * for_each_cpu_wrap - iterate over every cpu in a mask, starting at a 
> specified location
> + * @cpu: the (optionally unsigned) integer iterator
> + * @mask: the cpumask poiter
> + * @start: the start location
> + *
> + * The implementation does not assume any bit in @mask is set (including 
> @start).
> + *
> + * After the loop, cpu is >= nr_cpu_ids.
> + */
> +#define for_each_cpu_wrap(cpu, mask, start)  
> \
> + for ((cpu) = cpumask_next_wrap((start)-1, (mask), (start), false);  
> \
> +  (cpu) < nr_cpumask_bits;   
> \
> +  (cpu) = cpumask_next_wrap((cpu), (mask), (start), true))
> +
>  /**
>   * for_each_cpu_and - iterate over every cpu in both masks
>   * @cpu: the (optionally unsigned) integer iterator
> diff --git a/lib/cpumask.c b/lib/cpumask.c
> index 5a70f6196f57..24f06e7abf92 100644
> --- a/lib/cpumask.c
> +++ b/lib/cpumask.c
> @@ -42,6 +42,38 @@ int cpumask_any_but(const struct cpumask *mask, unsigned 
> int cpu)
>   return i;
>  }
> 
> +/**
> + * cpumask_next_wrap - helper to implement for_each_cpu_wrap
> + * @n: the cpu prior to the place to search
> + * @mask: the cpumask pointer
> + * @start: the start point of the iteration
> + * @wrap: assume @n crossing @start terminates the iteration
> + *
> + * Returns >= nr_cpu_ids on completion
> + *
> + * Note: the @wrap argument is required for the start condition when
> + * we cannot assume @start is set in @mask.
> + */
> +int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool 
> wrap)
> +{
> + int next;
> +
> +again:
> + next = cpumask_next(n, mask);
> +
> + if (wrap && n < start && next >= start) {
> + return nr_cpumask_bits;
> +
> + } else if (next >= nr_cpumask_bits) {
> + wrap = true;
> + n = -1;
> + goto again;
> + }
> +
> + return next;
> +}
> +EXPORT_SYMBOL(cpumask_next_wrap);
> +
>  /* These are not inline because of header tangles. */
>  #ifdef CONFIG_CPUMASK_OFFSTACK
>  

RE: [PATCH 4.14 03/35] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit

2019-06-09 Thread nobuhiro1.iwamatsu
Hi again.

> -Original Message-
> From: stable-ow...@vger.kernel.org
> [mailto:stable-ow...@vger.kernel.org] On Behalf Of Nobuhiro Iwamatsu
> Sent: Monday, June 10, 2019 10:10 AM
> To: Greg Kroah-Hartman 
> Cc: linux-kernel@vger.kernel.org; sta...@vger.kernel.org; Alan Maguire
> ; David Ahern ; David S.
> Miller 
> Subject: Re: [PATCH 4.14 03/35] neighbor: Call __ipv4_neigh_lookup_noref
> in neigh_xmit
> 
> Hi,
> 
> On Sun, Jun 09, 2019 at 06:42:09PM +0200, Greg Kroah-Hartman wrote:
> > From: David Ahern 
> >
> > [ Upstream commit 4b2a2bfeb3f056461a90bd621e8bd7d03fa47f60 ]
> >
> > Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to
> > INADDR_ANY but neigh_xmit which is used for MPLS encapsulations was
> > not updated to use the altered key. The result is that every packet
> Tx
> > does a lookup on the gateway address which does not find an entry, a
> > new one is created only to find the existing one in the table right
> > before the insert since arp_constructor was updated to reset the
> > primary key. This is seen in the allocs and destroys counters:
> > ip -s -4 ntable show | head -10 | grep alloc
> >
> > which increase for each packet showing the unnecessary overhread.
> >
> > Fix by having neigh_xmit use __ipv4_neigh_lookup_noref for
> NEIGH_ARP_TABLE.
> >
> > Fixes: cd9ff4de0107 ("ipv4: Make neigh lookup keys for
> > loopback/point-to-point devices be INADDR_ANY")
> > Reported-by: Alan Maguire 
> > Signed-off-by: David Ahern 
> > Tested-by: Alan Maguire 
> > Signed-off-by: David S. Miller 
> > Signed-off-by: Greg Kroah-Hartman 
> > ---
> 
> This commit also requires the following commit:
> 
> commit 9b3040a6aafd7898ece7fc7efcbca71e42aa8069
> Author: David Ahern 
> Date:   Sun May 5 11:16:20 2019 -0700
> 
> ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled
> 
> Define __ipv4_neigh_lookup_noref to return NULL when CONFIG_INET is
> disabled.
> 
> Fixes: 4b2a2bfeb3f0 ("neighbor: Call __ipv4_neigh_lookup_noref in
> neigh_xmit")
> Reported-by: kbuild test robot 
> Signed-off-by: David Ahern 
> Signed-off-by: David S. Miller 
> 
> And this is also necessary for 4.4.y, 4.14.y, 4.19.y and 5.1.y.

4.4.y, 4.9.y, 4.19.y and 5.1.y.

> Please apply this commit.
> 
Best regards,
  Nobuhiro


Re: [PATCH 5.0 18/93] paride/pf: cleanup queues when detection fails

2019-04-19 Thread nobuhiro1.iwamatsu
Hi,

> [ Upstream commit 6ce59025f1182125e75c8d121daf44056b65dd1f ]
>
> The driver allocates queues for all the units it potentially
> supports. But if we fail to detect any drives, then we fail
> loading the module without cleaning up those queues. This is
> now evident with the switch to blk-mq, though the bug has
> been there forever as far as I can tell.
>
> Also fix cleanup through regular module exit.
>
> Reported-by: Randy Dunlap 
> Tested-by: Randy Dunlap 
> Signed-off-by: Jens Axboe 
> Signed-off-by: Sasha Levin 

This commit causes a new problem. And the commit that made the fix
is 58ccd2d31e502c37e108b285bf3d343eb00c235b.
I think this commit needs to be applied together.

Best regards,
  Nobuhiro


差出人: linux-kernel-ow...@vger.kernel.org  が 
Greg Kroah-Hartman  の代理で送信
送信日時: 2019年4月19日 2:56
宛先: linux-kernel@vger.kernel.org
CC: Greg Kroah-Hartman; sta...@vger.kernel.org; Randy Dunlap; Jens Axboe; Sasha 
Levin
件名: [PATCH 5.0 18/93] paride/pf: cleanup queues when detection fails

[ Upstream commit 6ce59025f1182125e75c8d121daf44056b65dd1f ]

The driver allocates queues for all the units it potentially
supports. But if we fail to detect any drives, then we fail
loading the module without cleaning up those queues. This is
now evident with the switch to blk-mq, though the bug has
been there forever as far as I can tell.

Also fix cleanup through regular module exit.

Reported-by: Randy Dunlap 
Tested-by: Randy Dunlap 
Signed-off-by: Jens Axboe 
Signed-off-by: Sasha Levin 
---
 drivers/block/paride/pf.c | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index e92e7a8eeeb2..103b617cdc31 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -761,8 +761,12 @@ static int pf_detect(void)
return 0;

printk("%s: No ATAPI disk detected\n", name);
-   for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++)
+   for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) {
+   blk_cleanup_queue(pf->disk->queue);
+   pf->disk->queue = NULL;
+   blk_mq_free_tag_set(>tag_set);
put_disk(pf->disk);
+   }
pi_unregister_driver(par_drv);
return -1;
 }
@@ -1047,13 +1051,15 @@ static void __exit pf_exit(void)
int unit;
unregister_blkdev(major, name);
for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) {
-   if (!pf->present)
-   continue;
-   del_gendisk(pf->disk);
+   if (pf->present)
+   del_gendisk(pf->disk);
+
blk_cleanup_queue(pf->disk->queue);
blk_mq_free_tag_set(>tag_set);
put_disk(pf->disk);
-   pi_release(pf->pi);
+
+   if (pf->present)
+   pi_release(pf->pi);
}
 }

--
2.19.1





Re: [PATCH 4.19 000/110] 4.19.36-stable review

2019-04-19 Thread nobuhiro1.iwamatsu
Hi,

I have some comment for this series.

> YueHaibing 
> appletalk: Fix use-after-free in atalk_proc_exit


This commit has a problem for compile regression.
We also need to apply commit 27da0d2ef998e222a876c0cec72aa7829a626266.

> shamir rabinovitch 
>net/rds: fix warn in rds_message_alloc_sgs

I think that this is not a necessary fix for stable, but this commit will
cause a compilation warning.
This problem can fix commit d84e7bc0595a7e146ad0ddb80b240cea77825245.


> Thor Thayer 
> net: stmmac: Set OWN bit for jumbo frames

This commit is incomplete, I think.
This commit also requires 80acbed9f8fca1db3fbe915540b756f048aa0fd7.

Best regards,
  Nobuhiro


差出人: stable-ow...@vger.kernel.org  が Greg 
Kroah-Hartman  の代理で送信
送信日時: 2019年4月19日 2:55
宛先: linux-kernel@vger.kernel.org
CC: Greg Kroah-Hartman; torva...@linux-foundation.org; 
a...@linux-foundation.org; li...@roeck-us.net; sh...@kernel.org; 
patc...@kernelci.org; ben.hutchi...@codethink.co.uk; 
lkft-tri...@lists.linaro.org; sta...@vger.kernel.org
件名: [PATCH 4.19 000/110] 4.19.36-stable review

This is the start of the stable review cycle for the 4.19.36 release.
There are 110 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Sat Apr 20 16:03:29 UTC 2019.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:

https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.36-rc1.gz
or in the git tree and branch at:

git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git 
linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-
Pseudo-Shortlog of commits:

Greg Kroah-Hartman 
Linux 4.19.36-rc1

Konstantin Khlebnikov 
mm: hide incomplete nr_indirectly_reclaimable in sysfs

Roman Gushchin 
mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo

Kaike Wan 
IB/hfi1: Failed to drain send queue when QP is put into error state

Arnaldo Carvalho de Melo 
tools include: Adopt linux/bits.h

Daniel Borkmann 
bpf: fix use after free in bpf_evict_inode

Pi-Hsun Shih 
include/linux/swap.h: use offsetof() instead of custom __swapoffset macro

Chao Yu 
f2fs: fix to dirty inode for i_mode recovery

David Howells 
rxrpc: Fix client call connect/disconnect race

Stanislaw Gruszka 
lib/div64.c: off by one in shift

YueHaibing 
appletalk: Fix use-after-free in atalk_proc_exit

Kevin Wang 
drm/amdkfd: use init_mqd function to allocate object for hid_mqd (CI)

Yang Shi 
ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t

Ilia Mirkin 
drm/nouveau/volt/gf117: fix speedo readout register

Mika Westerberg 
PCI: Blacklist power management of Gigabyte X299 DESIGNARE EX PCIe ports

Leo Yan 
coresight: cpu-debug: Support for CA73 CPUs

Zhang Rui 
Revert "ACPI / EC: Remove old CLEAR_ON_RESUME quirk"

Lars Persson 
crypto: axis - fix for recursive locking from bottom half

Hsin-Yi, Wang 
drm/panel: panel-innolux: set display off in innolux_panel_unprepare

Christophe Leroy 
lkdtm: Add tests for NULL pointer dereference

Christophe Leroy 
lkdtm: Print real addresses

Dmitry Osipenko 
soc/tegra: pmc: Drop locking from tegra_powergate_is_powered()

Bart Van Assche 
scsi: core: Avoid that system resume triggers a kernel warning

Julia Cartwright 
iommu/dmar: Fix buffer overflow during PCI bus notification

Lorenzo Bianconi 
net: ip6_gre: fix possible NULL pointer dereference in ip6erspan_set_version

Ard Biesheuvel 
crypto: sha512/arm - fix crash bug in Thumb2 build

Ard Biesheuvel 
crypto: sha256/arm - fix crash bug in Thumb2 build

Cong Wang 
xfrm: destroy xfrm_state synchronously on net exit path

shamir rabinovitch 
net/rds: fix warn in rds_message_alloc_sgs

Rafael J. Wysocki 
ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle

Ayman Bagabas 
ALSA: hda: fix front speakers on Huawei MBXP

Trigger Huang 
drm/ttm: Fix bo_global and mem_global kfree error

Hans de Goede 
platform/x86: Add Intel AtomISP2 dummy / power-management driver

Vitaly Kuznetsov 
kernel: hung_task.c: disable on suspend

Steve French 
cifs: fallback to older infolevels on findfirst queryinfo retry

Thor Thayer 
net: stmmac: Set OWN bit for jumbo frames

Sheng Yong 
f2fs: cleanup dirty pages if recover failed

Taehee Yoo 
netfilter: nf_flow_table: remove flowtable hook flush routine in netns exit 
routine

ndesaulni...@google.com 
compiler.h: update definition of unreachable()

Sean Christopherson 
KVM: nVMX: restore host state in nested_vmx_vmexit for VMFail

Kai-Heng Feng 
HID: usbhid: Add quirk for Redragon/Dragonrise Seymur 2

Ronald Tschalär 
ACPI / SBS: Fix GPE storm on recent MacBookPro's

Maciej Żenczykowski 
usbip: fix vhci_hcd 

Re: [PATCH 5.0 19/93] paride/pcd: cleanup queues when detection fails

2019-04-19 Thread nobuhiro1.iwamatsu
Hi,

> [ Upstream commit 81b74ac68c28fddb3589ad5d4d5e587baf4bb781 ]
> 
> The driver allocates queues for all the units it potentially
> supports. But if we fail to detect any drives, then we fail
> loading the module without cleaning up those queues. This is
> now evident with the switch to blk-mq, though the bug has
> been there forever as far as I can tell.
> 
> Also fix cleanup through regular module exit.
> 
> Reported-by: Randy Dunlap 
> Tested-by: Randy Dunlap 
> Signed-off-by: Jens Axboe 
> Signed-off-by: Sasha Levin 

This commit causes a new problem. And the commit that made the fix
is f0d1762554014ce0ae347b9f0d088f2c157c8c72.
I think this commit needs to be applied together.

Best regards,
  Nobuhiro


差出人: stable-ow...@vger.kernel.org  が Greg 
Kroah-Hartman  の代理で送信
送信日時: 2019年4月19日 2:56
宛先: linux-kernel@vger.kernel.org
CC: Greg Kroah-Hartman; sta...@vger.kernel.org; Randy Dunlap; Jens Axboe; Sasha 
Levin
件名: [PATCH 5.0 19/93] paride/pcd: cleanup queues when detection fails

[ Upstream commit 81b74ac68c28fddb3589ad5d4d5e587baf4bb781 ]

The driver allocates queues for all the units it potentially
supports. But if we fail to detect any drives, then we fail
loading the module without cleaning up those queues. This is
now evident with the switch to blk-mq, though the bug has
been there forever as far as I can tell.

Also fix cleanup through regular module exit.

Reported-by: Randy Dunlap 
Tested-by: Randy Dunlap 
Signed-off-by: Jens Axboe 
Signed-off-by: Sasha Levin 
---
 drivers/block/paride/pcd.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index 96670eefaeb2..377a694dc228 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -749,8 +749,12 @@ static int pcd_detect(void)
return 0;

printk("%s: No CD-ROM drive found\n", name);
-   for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++)
+   for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
+   blk_cleanup_queue(cd->disk->queue);
+   cd->disk->queue = NULL;
+   blk_mq_free_tag_set(>tag_set);
put_disk(cd->disk);
+   }
pi_unregister_driver(par_drv);
return -1;
 }
--
2.19.1