Re: [PATCH net-next v2 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-20 Thread Ilya Lipnitskiy
On Tue, Apr 20, 2021 at 12:51 PM Rob Herring wrote: > > On Mon, Apr 19, 2021 at 08:46:59AM -0700, Ilya Lipnitskiy wrote: > > The MAC device name can now be set within DTS file instead of always > > being "ethX". This is helpful for DSA to clearly label the DSA master &

[PATCH] MIPS: pci-legacy: revert "use generic pci_enable_resources"

2021-04-19 Thread Ilya Lipnitskiy
: arch/mips/pci/pci-legacy.c:284: + if ((err = pcibios_enable_resources(dev, mask)) < 0) Reported-by: Guenter Roeck Signed-off-by: Ilya Lipnitskiy --- Guenter, sorry about this - let's just revert this for now to minimize turmoil to the legacy PCI code. Obviously, this needs more

Re: [PATCH] dt-bindings: net: mediatek: support MT7621 SoC

2021-04-19 Thread Ilya Lipnitskiy
On Sun, Apr 18, 2021 at 11:24 PM Bjørn Mork wrote: > > Ilya Lipnitskiy writes: > > > Add missing binding documentation for SoC support that has been in place > > since v5.1 > > > > Fixes: 889bcbdeee57 ("net: ethernet: mediatek: support MT7621 SoC ether

[PATCH] dt-bindings: net: mediatek/ralink: remove unused bindings

2021-04-19 Thread Ilya Lipnitskiy
hn Crispin Signed-off-by: Ilya Lipnitskiy --- .../bindings/net/mediatek,mt7620-gsw.txt | 24 .../bindings/net/ralink,rt2880-net.txt| 59 --- .../bindings/net/ralink,rt3050-esw.txt| 30 -- 3 files changed, 113 deletions(-) delete m

[PATCH net-next v2 1/2] dt-bindings: net: mediatek: add optional GMAC labels

2021-04-19 Thread Ilya Lipnitskiy
Document the mediatek ethernet driver change that adds support for custom labels and provide an example. Signed-off-by: Ilya Lipnitskiy --- Documentation/devicetree/bindings/net/mediatek-net.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net

[PATCH net-next v2 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
the master GMAC with a different prefix than DSA ports helps with clarity. Suggested-by: René van Dorst Signed-off-by: Ilya Lipnitskiy --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_et

[PATCH net-next v2 0/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
Add support for specifying GMAC label via DTS. Useful when it is desired to use a master DSA interface name that is different from the "eth%d" pattern. v2: - Use alloc_netdev instead of alloc_etherdev followed by rename Ilya Lipnitskiy (2): dt-bindings: net: mediatek: add opt

Re: [PATCH] dt-bindings: net: mediatek: support MT7621 SoC

2021-04-19 Thread Ilya Lipnitskiy
On Sun, Apr 18, 2021 at 11:24 PM Bjørn Mork wrote: > > Ilya Lipnitskiy writes: > > > Add missing binding documentation for SoC support that has been in place > > since v5.1 > > > > Fixes: 889bcbdeee57 ("net: ethernet: mediatek: support MT7621 SoC ether

Re: [PATCH net-next 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
On Mon, Apr 19, 2021 at 5:15 AM Andrew Lunn wrote: > > On Sun, Apr 18, 2021 at 09:03:52PM -0700, Ilya Lipnitskiy wrote: > > The MAC device name can now be set within DTS file instead of always > > being "ethX". This is helpful for DSA to clearly label the DSA master &

[PATCH net-next 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-18 Thread Ilya Lipnitskiy
the master GMAC with a different prefix than DSA ports helps with clarity. Suggested-by: René van Dorst Signed-off-by: Ilya Lipnitskiy --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/ne

[PATCH net-next 1/2] dt-bindings: net: mediatek: add optional GMAC labels

2021-04-18 Thread Ilya Lipnitskiy
Document the mediatek ethernet driver change that adds support for custom labels and provide an example. Signed-off-by: Ilya Lipnitskiy --- Documentation/devicetree/bindings/net/mediatek-net.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net

[PATCH net-next 0/2] net: ethernet: mediatek: support custom GMAC label

2021-04-18 Thread Ilya Lipnitskiy
Add support for specifying GMAC label via DTS. Useful when it is desired to use a master DSA interface name that is different from the "eth%d" pattern. Ilya Lipnitskiy (2): dt-bindings: net: mediatek: add optional GMAC labels net: ethernet: mediatek: support custom GMAC label Doc

[PATCH] dt-bindings: net: mediatek: support MT7621 SoC

2021-04-18 Thread Ilya Lipnitskiy
Add missing binding documentation for SoC support that has been in place since v5.1 Fixes: 889bcbdeee57 ("net: ethernet: mediatek: support MT7621 SoC ethernet hardware") Cc: Bjørn Mork Signed-off-by: Ilya Lipnitskiy --- Documentation/devicetree/bindings/net/mediatek-net.txt | 1

[PATCH net-next,v3] net: ethernet: mediatek: ppe: fix busy wait loop

2021-04-15 Thread Ilya Lipnitskiy
: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE") Signed-off-by: Ilya Lipnitskiy Cc: Felix Fietkau Reviewed-by: Andrew Lunn --- v2: - Use readl_poll_timeout as suggested by Andrew Lunn v3: - Remove unused #include's drivers/net/ethernet/mediatek

[PATCH net-next,v2] net: ethernet: mediatek: ppe: fix busy wait loop

2021-04-15 Thread Ilya Lipnitskiy
: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE") Signed-off-by: Ilya Lipnitskiy Cc: Felix Fietkau --- drivers/net/ethernet/mediatek/mtk_ppe.c | 18 +- drivers/net/ethernet/mediatek/mtk_ppe.h | 1 + 2 files changed, 10 insertions(+), 9 deletion

[PATCH net-next] net: ethernet: mediatek: ppe: fix busy wait loop

2021-04-15 Thread Ilya Lipnitskiy
intended behavior here. Fixes: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE") Signed-off-by: Ilya Lipnitskiy Cc: Felix Fietkau --- drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ne

Re: [PATCH] staging: mt7621-pci: stop using of_pci_range_to_resource

2021-04-13 Thread Ilya Lipnitskiy
1 at 7:33 PM Ilya Lipnitskiy > wrote: > > > > The logic here was already overriding the erroneous IO addresses > > returned from of_pci_range_to_resource, which is the bulk of the logic. > > > > So stop using it altogether and initialize the fields explicitly, as &

[PATCH v2 6/8] MIPS: pci-legacy: remove redundant info messages

2021-04-13 Thread Ilya Lipnitskiy
:00: root bus resource [mem 0x2000-0x2fff] pci_bus :00: root bus resource [io 0x46-0x46] Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-legacy.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index

[PATCH v2 8/8] MIPS: pci-legacy: use generic pci_enable_resources

2021-04-13 Thread Ilya Lipnitskiy
d". That should have no effect on any pci-legacy driver. Suggested-by: Bjorn Helgaas Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-legacy.c | 40 ++ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/arch/mips/pci/pci-legacy.c

[PATCH v2 7/8] MIPS: pci-legacy: remove busn_resource field

2021-04-13 Thread Ilya Lipnitskiy
flags 0x0] Signed-off-by: Ilya Lipnitskiy Cc: Bjorn Helgaas --- arch/mips/include/asm/pci.h | 1 - arch/mips/pci/pci-legacy.c | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index 6f48649201c5..9ffc8192adae 100644 --- a/arch/mips/i

[PATCH v2 5/8] MIPS: pci-legacy: stop using of_pci_range_to_resource

2021-04-13 Thread Ilya Lipnitskiy
Fix the conversion of IO ranges into IO resources") Signed-off-by: Ilya Lipnitskiy Cc: Liviu Dudau --- arch/mips/pci/pci-legacy.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index 39052de915f3..3a9091942

[PATCH v2 3/8] MIPS: pci-rt3883: trivial: remove unused variable

2021-04-13 Thread Ilya Lipnitskiy
Fixes the following compiler warning: warning: unused variable 'flags' [-Wunused-variable] Fixes: e5067c718b3a ("MIPS: pci-rt3883: Remove odd locking in PCI config space access code") Signed-off-by: Ilya Lipnitskiy Acked-by: Sergey Ryazanov Cc: triv...@kernel.org --

[PATCH v2 0/8] MIPS: fixes for PCI legacy drivers (rt2880, rt3883)

2021-04-13 Thread Ilya Lipnitskiy
functions after the device has been registered with the PCI subsystem to avoid races. Use safe pci_bus_{read,write}_config_{d}word wrappers instead. Ilya Lipnitskiy (8): MIPS: pci-rt2880: fix slot 0 configuration MIPS: pci-rt2880: remove unneeded locks MIPS: pci-rt3883: trivial: remove unused

[PATCH v2 2/8] MIPS: pci-rt2880: remove unneeded locks

2021-04-13 Thread Ilya Lipnitskiy
ere. Local PCI read/write functions are never called simultaneously, also they do not require synchronization with the PCI controller ops, since they are used before the controller registration. Suggested-by: Sergey Ryazanov Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-rt2

[PATCH v2 1/8] MIPS: pci-rt2880: fix slot 0 configuration

2021-04-13 Thread Ilya Lipnitskiy
: 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Signed-off-by: Ilya Lipnitskiy Cc: Lorenzo Pieralisi Cc: Tobias Wolf Cc: # v4.14+ --- arch/mips/pci/pci-rt2880.c | 37 - 1 file changed, 24 inserti

[PATCH v2 4/8] MIPS: pci-rt3883: more accurate DT error messages

2021-04-13 Thread Ilya Lipnitskiy
Existing strings do not make sense: one is always NULL and the other refers to the wrong parent node. Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-rt3883.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c

Re: [PATCH 2/8] MIPS: pci-rt2880: remove unneeded locks

2021-04-13 Thread Ilya Lipnitskiy
Hi Sergey, On Tue, Apr 13, 2021 at 6:40 AM Sergey Ryazanov wrote: > > On Tue, Apr 13, 2021 at 4:28 PM Sergey Ryazanov > wrote: > > On Tue, Apr 13, 2021 at 9:22 AM Ilya Lipnitskiy > > wrote: > > > Mirror pci-rt3883 fix from commit e5067c718b3a ("MIPS: pci-

Re: [PATCH] MIPS: fix memory reservation for non-usermem setups

2021-04-12 Thread Ilya Lipnitskiy
On Mon, Apr 12, 2021 at 11:45 PM Ilya Lipnitskiy wrote: > > Hi Thomas, > > On Tue, Apr 6, 2021 at 6:18 AM Thomas Bogendoerfer > wrote: > > > > On Sat, Apr 03, 2021 at 07:02:13PM -0700, Ilya Lipnitskiy wrote: > > > Hi Mike, > > > > > >

Re: [PATCH] MIPS: fix memory reservation for non-usermem setups

2021-04-12 Thread Ilya Lipnitskiy
Hi Thomas, On Tue, Apr 6, 2021 at 6:18 AM Thomas Bogendoerfer wrote: > > On Sat, Apr 03, 2021 at 07:02:13PM -0700, Ilya Lipnitskiy wrote: > > Hi Mike, > > > > On Tue, Mar 16, 2021 at 11:33 PM Mike Rapoport wrote: > > > > > > Hi Ilya, > > > &

[PATCH 5/8] MIPS: pci-legacy: stop using of_pci_range_to_resource

2021-04-12 Thread Ilya Lipnitskiy
Fix the conversion of IO ranges into IO resources") Signed-off-by: Ilya Lipnitskiy Cc: Liviu Dudau --- arch/mips/pci/pci-legacy.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index 39052de915f3..3a9091942

[PATCH 8/8] MIPS: pci-legacy: use generic pci_enable_resources

2021-04-12 Thread Ilya Lipnitskiy
d". That should have no effect on any pci-legacy driver. Suggested-by: Bjorn Helgaas Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-legacy.c | 40 ++ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/arch/mips/pci/pci-legacy.c

[PATCH 1/8] MIPS: pci-rt2880: fix slot 0 configuration

2021-04-12 Thread Ilya Lipnitskiy
: 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Signed-off-by: Ilya Lipnitskiy Cc: Lorenzo Pieralisi Cc: Tobias Wolf Cc: # v4.14+ --- arch/mips/pci/pci-rt2880.c | 50 +- 1 file changed, 33 inserti

[PATCH 2/8] MIPS: pci-rt2880: remove unneeded locks

2021-04-12 Thread Ilya Lipnitskiy
ere. Local PCI read/write functions are never called simultaneously, also they do not require synchronization with the PCI controller ops, since they are used before the controller registration. Suggested-by: Sergey Ryazanov Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-rt2

[PATCH 3/8] MIPS: pci-rt3883: trivial: remove unused variable

2021-04-12 Thread Ilya Lipnitskiy
Fixes the following compiler warning: warning: unused variable 'flags' [-Wunused-variable] Fixes: e5067c718b3a ("MIPS: pci-rt3883: Remove odd locking in PCI config space access code") Signed-off-by: Ilya Lipnitskiy Cc: Sergey Ryazanov Cc: triv...@kernel.org --- arch/m

[PATCH 4/8] MIPS: pci-rt3883: more accurate DT error messages

2021-04-12 Thread Ilya Lipnitskiy
Existing strings do not make sense: one is always NULL and the other refers to the wrong parent node. Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-rt3883.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c

[PATCH 7/8] MIPS: pci-legacy: remove busn_resource field

2021-04-12 Thread Ilya Lipnitskiy
flags 0x0] Signed-off-by: Ilya Lipnitskiy Cc: Bjorn Helgaas --- arch/mips/include/asm/pci.h | 1 - arch/mips/pci/pci-legacy.c | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index 6f48649201c5..9ffc8192adae 100644 --- a/arch/mips/i

[PATCH 6/8] MIPS: pci-legacy: remove redundant info messages

2021-04-12 Thread Ilya Lipnitskiy
:00: root bus resource [mem 0x2000-0x2fff] pci_bus :00: root bus resource [io 0x46-0x46] Signed-off-by: Ilya Lipnitskiy --- arch/mips/pci/pci-legacy.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index

[PATCH 0/8] MIPS: Fixes for PCI legacy drivers (rt2880, rt3883)

2021-04-12 Thread Ilya Lipnitskiy
One major fix for rt2880-pci in the first patch - fixes breakage that existed since v4.14. Other more minor fixes, cleanups, and improvements that either free up memory, make dmesg messages clearer, or remove redundant dmesg output. Ilya Lipnitskiy (8): MIPS: pci-rt2880: fix slot 0

[PATCH] staging: mt7621-pci: stop using of_pci_range_to_resource

2021-04-10 Thread Ilya Lipnitskiy
ource() change"). Signed-off-by: Ilya Lipnitskiy Cc: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 17

Re: [PATCH v2] of: property: fw_devlink: do not link ".*,nr-gpios"

2021-04-07 Thread Ilya Lipnitskiy
> > > > On Tue, Apr 06, 2021 at 04:09:10PM -0700, Saravana Kannan wrote: > > > > > On Mon, Apr 5, 2021 at 3:26 PM Ilya Lipnitskiy > > > > > wrote: > > > > > > > > > > > > [,]nr-gpios property is used by some GPIO driver

[PATCH v3] MIPS: add support for buggy MT7621S core detection

2021-04-07 Thread Ilya Lipnitskiy
=c63f0f4c1ec742e24d8480e80553863744b58f6a;hb=10267e17299806f9885d086147878f6c492cb904 Suggested-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy --- arch/mips/include/asm/mips-cps.h | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/mips-cps.h b

Re: [PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-07 Thread Ilya Lipnitskiy
On Wed, Apr 7, 2021 at 6:49 AM Maciej W. Rozycki wrote: > > On Mon, 5 Apr 2021, Ilya Lipnitskiy wrote: > > > Thanks for the comments. Including asm/bugs.h in asm/mips-cps.h led to > > some circular dependencies when I tried it, but I will try again based > > on your fe

Re: [PATCH] of: property: do not create device links from *nr-gpios

2021-04-06 Thread Ilya Lipnitskiy
On Tue, Apr 6, 2021 at 10:40 AM Rob Herring wrote: > > On Mon, Apr 05, 2021 at 01:18:56PM -0700, Saravana Kannan wrote: > > On Mon, Apr 5, 2021 at 1:10 PM Ilya Lipnitskiy > > wrote: > > > > > > Hi Saravana, > > > > > > On Mon

[PATCH v2] MIPS: add support for buggy MT7621S core detection

2021-04-05 Thread Ilya Lipnitskiy
=c63f0f4c1ec742e24d8480e80553863744b58f6a;hb=10267e17299806f9885d086147878f6c492cb904 Suggested-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy --- arch/mips/include/asm/mips-cps.h | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/mips-cps.h b/arch

Re: [PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-05 Thread Ilya Lipnitskiy
On Mon, Apr 5, 2021 at 6:22 PM Maciej W. Rozycki wrote: > > On Fri, 2 Apr 2021, Ilya Lipnitskiy wrote: > > > diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h > > index d72dc6e1cf3c..d32f0c4e61f7 100644 > > --- a/arch/mips/include/asm/bugs.h >

[PATCH v2] of: property: fw_devlink: do not link ".*,nr-gpios"

2021-04-05 Thread Ilya Lipnitskiy
for interrupt-parent, dmas and -gpio(s)") Signed-off-by: Ilya Lipnitskiy Cc: Saravana Kannan Cc: # 5.5.x --- drivers/of/property.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index 2046ae311322..1793303e84ac 100

Re: [PATCH] of: property: do not create device links from *nr-gpios

2021-04-05 Thread Ilya Lipnitskiy
On Mon, Apr 5, 2021 at 1:19 PM Saravana Kannan wrote: > > On Mon, Apr 5, 2021 at 1:10 PM Ilya Lipnitskiy > wrote: > > > > Hi Saravana, > > > > On Mon, Apr 5, 2021 at 1:01 PM Saravana Kannan wrote: > > > > > > On Sun, Apr 4, 2021 at 8:14 PM

Re: [PATCH] of: property: do not create device links from *nr-gpios

2021-04-05 Thread Ilya Lipnitskiy
Hi Saravana, On Mon, Apr 5, 2021 at 1:01 PM Saravana Kannan wrote: > > On Sun, Apr 4, 2021 at 8:14 PM Ilya Lipnitskiy > wrote: > > > > [,]nr-gpios property is used by some GPIO drivers[0] to indicate > > the number of GPIOs present on a system, not define a GPIO. nr-

[PATCH] of: property: do not create device links from *nr-gpios

2021-04-04 Thread Ilya Lipnitskiy
add+0x4e0/0x734 of_platform_device_create_pdata+0xb8/0xfc of_platform_bus_create+0x170/0x214 of_platform_populate+0x88/0xf4 __dt_register_buses+0xbc/0xf0 plat_of_setup+0x1c/0x34 Fixes: 7f00be96f125 ("of: property: Add device link support for interrupt-parent, dmas and -gpio(s)") Signed-of

[PATCH] MIPS: ralink: rt288x: select MIPS_AUTO_PFN_OFFSET

2021-04-03 Thread Ilya Lipnitskiy
device. Link: https://lore.kernel.org/linux-mips/20180820233111.xww5232dxbuouf4n@pburton-laptop/ Signed-off-by: Ilya Lipnitskiy Cc: Mike Rapoport --- arch/mips/ralink/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig index

Re: [PATCH] MIPS: fix memory reservation for non-usermem setups

2021-04-03 Thread Ilya Lipnitskiy
Hi Mike, On Tue, Mar 16, 2021 at 11:33 PM Mike Rapoport wrote: > > Hi Ilya, > > On Tue, Mar 16, 2021 at 10:10:09PM -0700, Ilya Lipnitskiy wrote: > > Hi Thomas, > > > > On Fri, Mar 12, 2021 at 7:19 AM Thomas Bogendoerfer > > wrote: > > > > &g

[PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-02 Thread Ilya Lipnitskiy
=c63f0f4c1ec742e24d8480e80553863744b58f6a;hb=10267e17299806f9885d086147878f6c492cb904 Suggested-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy --- arch/mips/include/asm/bugs.h | 18 ++ arch/mips/kernel/smp-cps.c | 3 +++ 2 files changed, 21 insertions(+) diff --git a/arch/mips/include/asm

Re: exec error: BUG: Bad rss-counter

2021-03-30 Thread Ilya Lipnitskiy
On Tue, Mar 30, 2021 at 9:11 AM Linus Torvalds wrote: > > On Mon, Mar 29, 2021 at 9:56 PM Zhou Yanjie wrote: > > > > On 2021/3/29 上午10:48, Ilya Lipnitskiy wrote: > > > > > > Try: > > > diff --git a/mm/memory.c b/mm/memory.c > > > index c8e

[PATCH v3] mm: fix race by making init_zero_pfn() early_initcall

2021-03-29 Thread Ilya Lipnitskiy
level. Depending on the architecture, ZERO_PAGE is either constant or gets initialized even earlier, at paging_init, so there is no issue with initializing zero_pfn earlier. Discussion: https://lkml.kernel.org/r/CALCv0x2YqOXEAy2Q=hafjhHCtTHVodChv1qpM=niaxopqeb...@mail.gmail.com Signed-off-by: Ilya Li

[PATCH v2] mm: fix race by making init_zero_pfn() early_initcall

2021-03-28 Thread Ilya Lipnitskiy
level. Depending on the architecture, ZERO_PAGE is either constant or gets initialized even earlier, at paging_init, so there is no issue with initializing zero_pfn earlier. ML discussion: https://lore.kernel.org/lkml/CALCv0x2YqOXEAy2Q=hafjhHCtTHVodChv1qpM=niaxopqeb...@mail.gmail.com/ Signed-off

[PATCH] mm: fix race by making init_zero_pfn() early_initcall

2021-03-28 Thread Ilya Lipnitskiy
level. Depending on the architecture, ZERO_PAGE is either constant or gets initialized even earlier, at paging_init, so there is no issue with initializing zero_pfn earlier. ML discussion: https://lore.kernel.org/lkml/CALCv0x2YqOXEAy2Q=hafjhHCtTHVodChv1qpM=niaxopqeb...@mail.gmail.com/ Signed-off-b

Re: exec error: BUG: Bad rss-counter

2021-03-28 Thread Ilya Lipnitskiy
On Sat, Mar 20, 2021 at 8:59 AM Zhou Yanjie wrote: > > Hi Ilya, > > On 2021/3/3 下午11:55, Ilya Lipnitskiy wrote: > > On Wed, Mar 3, 2021 at 7:50 AM Eric W. Biederman > > wrote: > >> Ilya Lipnitskiy writes: > >> > >>> On Tue, Mar 2, 2021 at

Re: exec error: BUG: Bad rss-counter

2021-03-28 Thread Ilya Lipnitskiy
On Wed, Mar 3, 2021 at 7:50 AM Eric W. Biederman wrote: > > Ilya Lipnitskiy writes: > > > On Tue, Mar 2, 2021 at 11:37 AM Eric W. Biederman > > wrote: > >> > >> Ilya Lipnitskiy writes: > >> > >> > On Mon, Mar 1, 2021 at 12:

[PATCH v3] crypto: mips: add poly1305-core.S to .gitignore

2021-03-27 Thread Ilya Lipnitskiy
poly1305-core.S is an auto-generated file, so it should be ignored. Fixes: a11d055e7a64 ("crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation") Signed-off-by: Ilya Lipnitskiy Cc: Ard Biesheuvel --- arch/mips/crypto/.gitignore | 2 ++ 1 file changed, 2

[PATCH v2] crypto: mips: add poly1305-core.S to .gitignore

2021-03-27 Thread Ilya Lipnitskiy
poly1305-core.S is an auto-generated file, so it should be ignored. Fixes: a11d055e7a64 ("crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation") Signed-off-by: Ilya Lipnitskiy Cc: Ard Biesheuvel --- arch/mips/crypto/.gitignore | 1 + 1 file changed, 1

[PATCH] crypto: mips: add poly1305-core.S to .gitignore

2021-03-27 Thread Ilya Lipnitskiy
poly1305-core.S is an auto-generated file, so it should be ignored. Signed-off-by: Ilya Lipnitskiy Cc: Ard Biesheuvel --- arch/mips/crypto/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 arch/mips/crypto/.gitignore diff --git a/arch/mips/crypto/.gitignore b/arch/mips

Re: [PATCH] MIPS: ralink: mt7621: add memory detection support

2021-03-27 Thread Ilya Lipnitskiy
On Sat, Mar 27, 2021 at 2:06 PM Thomas Bogendoerfer wrote: > > On Sat, Mar 27, 2021 at 09:35:43AM -0700, Ilya Lipnitskiy wrote: > > On Sat, Mar 27, 2021 at 2:46 AM Thomas Bogendoerfer > > wrote: > > > > > > On Thu, Mar 25, 2021 at 07:45:23PM -0700, Ilya Lipn

Re: [PATCH] MIPS: ralink: mt7621: add memory detection support

2021-03-27 Thread Ilya Lipnitskiy
On Sat, Mar 27, 2021 at 2:46 AM Thomas Bogendoerfer wrote: > > On Thu, Mar 25, 2021 at 07:45:23PM -0700, Ilya Lipnitskiy wrote: > > On Thu, Mar 25, 2021 at 3:01 AM Thomas Bogendoerfer > > wrote: > > > > > > On Tue, Mar 16, 2021 at 10:59:02PM -0700, Ilya Lipni

[PATCH net-next,v2] net: dsa: mt7530: clean up core and TRGMII clock setup

2021-03-26 Thread Ilya Lipnitskiy
redundantly three times. Simplify the code and only write the register only once at the end of clock reconfiguration to enable both core and TRGMII Tx clocks. Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c

[PATCH net-next] net: dsa: mt7530: clean up core and TRGMII clock setup

2021-03-26 Thread Ilya Lipnitskiy
written redundantly three times. Simplify the code and only write the register only once at the end of clock reconfiguration to enable both core and TRGMII Tx clocks. Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c

[PATCH 2/2] MIPS: ralink: mt7621: add memory detection support

2021-03-26 Thread Ilya Lipnitskiy
hange kernel load address to 256m or higher address. Since this is a quite unusual case, we just skip 512m testing and return 256m as memory size. Signed-off-by: Chuanhong Guo [Minor commit message reword, make mt7621_memory_detect static] Signed-off-by: Ilya Lipnitskiy --- arch/mips/in

[PATCH 1/2] MIPS: ralink: annotate prom_soc_init() with __init

2021-03-26 Thread Ilya Lipnitskiy
prom_soc_init is only called from prom_init in arch/mips/ralink/prom.c, which is already annotated with __init, so annotate prom_soc_init with __init too. Signed-off-by: Ilya Lipnitskiy --- arch/mips/ralink/common.h | 2 +- arch/mips/ralink/mt7620.c | 2 +- arch/mips/ralink/mt7621.c | 2

Re: [PATCH] MIPS: ralink: mt7621: add memory detection support

2021-03-25 Thread Ilya Lipnitskiy
On Thu, Mar 25, 2021 at 3:01 AM Thomas Bogendoerfer wrote: > > On Tue, Mar 16, 2021 at 10:59:02PM -0700, Ilya Lipnitskiy wrote: > > From: Chuanhong Guo > > > > mt7621 has the following memory map: > > 0x0-0x1c00: lower 448m memory > > 0x1c00-0x200:

Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-23 Thread Ilya Lipnitskiy
On Tue, Mar 23, 2021 at 6:33 PM Ilya Lipnitskiy wrote: > > On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn wrote: > > > > On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote: > > > A recent change to MIPS ralink reset logic made it so mt7530 actually > >

Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-23 Thread Ilya Lipnitskiy
On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn wrote: > > On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote: > > A recent change to MIPS ralink reset logic made it so mt7530 actually > > resets the switch on platforms such as mt7621 (where bit 2 is the reset >

[PATCH] MIPS: ralink: mt7621: add memory detection support

2021-03-16 Thread Ilya Lipnitskiy
hange kernel load address to 256m or higher address. Since this is a quite unusual case, we just skip 512m testing and return 256m as memory size. Signed-off-by: Chuanhong Guo [Minor commit message reword, make mt7621_memory_detect static] Signed-off-by: Ilya Lipnitskiy --- arch/mips/in

Re: [PATCH] MIPS: fix memory reservation for non-usermem setups

2021-03-16 Thread Ilya Lipnitskiy
Hi Thomas, On Fri, Mar 12, 2021 at 7:19 AM Thomas Bogendoerfer wrote: > > On Sun, Mar 07, 2021 at 11:40:30AM -0800, Ilya Lipnitskiy wrote: > > From: Tobias Wolf > > > > Commit 67a3ba25aa95 ("MIPS: Fix incorrect mem=X@Y handling") introduced a > > new >

Re: [PATCH] MIPS: ralink: select WEAK_REORDERING_BEYOND_LLSC on MT7621

2021-03-15 Thread Ilya Lipnitskiy
Hi Thomas, On Fri, Mar 12, 2021 at 2:34 AM Thomas Bogendoerfer wrote: > > On Sun, Mar 07, 2021 at 11:08:06AM -0800, Ilya Lipnitskiy wrote: > > Upstream a long-standing OpenWrt patch for RALINK MT7621 SoC. Selecting > > WEAK_REORDERING_BEYOND_LLSC fixes random kernel hangs

[PATCH net,v2] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-12 Thread Ilya Lipnitskiy
mode to fix the issue. Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled. Fixes: 3f9ef7785a9c ("MIPS: ralink: manage low reset lines") Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 52 +++- 1 file changed, 25 insertions(+), 27

Re: [PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
Hi Florian, On Wed, Mar 10, 2021 at 7:20 PM Florian Fainelli wrote: > > > > On 3/10/2021 7:17 PM, Ilya Lipnitskiy wrote: > > Hi Vladimir, > > > > On Wed, Mar 10, 2021 at 3:10 PM Vladimir Oltean wrote: > >> > >> Hello Ilya, > >> >

Re: [PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
Hi Vladimir, On Wed, Mar 10, 2021 at 3:10 PM Vladimir Oltean wrote: > > Hello Ilya, > > On Wed, Mar 10, 2021 at 01:14:20PM -0800, Ilya Lipnitskiy wrote: > > 3f9ef7785a9c ("MIPS: ralink: manage low reset lines") made it so mt7530 > > actually resets the switch

Re: [PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
Hi Vladimir, On Wed, Mar 10, 2021 at 3:10 PM Vladimir Oltean wrote: > > Hello Ilya, > > On Wed, Mar 10, 2021 at 01:14:20PM -0800, Ilya Lipnitskiy wrote: > > 3f9ef7785a9c ("MIPS: ralink: manage low reset lines") made it so mt7530 > > actually resets the switch

[PATCH net-next,v2 3/3] net: dsa: mt7530: disable TRGMII clock at reconfigure

2021-03-10 Thread Ilya Lipnitskiy
running the GMAC and MT7530 in TRGMII mode. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 80a35caf920e..7ef5e7c23e05 100644 --- a

[PATCH net-next,v2 2/3] net: dsa: mt7530: clean up redundant clock enables

2021-03-10 Thread Ilya Lipnitskiy
core_write wrapper instead like the rest of the code in the function does. This change helps with consistency and readability. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b

[PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
mode to fix the issue. Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled. Fixes: 3f9ef7785a9c ("MIPS: ralink: manage low reset lines") Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 52 +++- 1 file changed, 25 insertions(+), 27

[PATCH net] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
mode to fix the issue. Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled. Fixes: 3f9ef7785a9c ("MIPS: ralink: manage low reset lines") Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 52 +++- 1 file changed, 25 insertions(+), 27

[PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
e clock in TRGMII mode to fix the issue. Also, disable both core and TRGMII Tx clocks prior to reconfiguring. Previously, only the core clock was disabled, but not TRGMII Tx clock. Tested on Ubiquity ER-X (MT7621) with TRGMII mode enabled. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7

[PATCH 2/3] net: dsa: mt7530: use core_write wrapper

2021-03-10 Thread Ilya Lipnitskiy
When disabling PLL, there is no need to call core_write_mmd_indirect directly, use the core_write wrapper instead like the rest of the code in the function does. This change helps with consistency and readability. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 5 + 1 file

[PATCH 1/3] net: dsa: mt7530: remove redundant clock enables

2021-03-10 Thread Ilya Lipnitskiy
In RGMII mode, the REG_GSWCK_EN bit of CORE_TRGMII_GSW_CLK_CG gets set three times in a row. In TRGMII mode, two times. Simplify the code and only set it once for both modes. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH] MIPS: fix memory reservation for non-usermem setups

2021-03-07 Thread Ilya Lipnitskiy
ixes: 67a3ba25aa95 ("MIPS: Fix incorrect mem=X@Y handling") Signed-off-by: Tobias Wolf [Reword commit message] Signed-off-by: Ilya Lipnitskiy Cc: Marcin Nowakowski Cc: linux-m...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: sta...@vger.kernel.org --- arch/mips/kernel/setup.c

[PATCH] MIPS: ralink: select WEAK_REORDERING_BEYOND_LLSC on MT7621

2021-03-07 Thread Ilya Lipnitskiy
Upstream a long-standing OpenWrt patch for RALINK MT7621 SoC. Selecting WEAK_REORDERING_BEYOND_LLSC fixes random kernel hangs. This bug and fix was reported by MediaTek WCN division [0]. [0]: https://lists.infradead.org/pipermail/lede-commits/2017-August/004537.html Signed-off-by: Ilya

[PATCH] MIPS: ralink: make RALINK_ILL_ACC symbol visible

2021-03-06 Thread Ilya Lipnitskiy
lity. This change only makes the symbol visible and adds a brief description. Signed-off-by: Ilya Lipnitskiy Cc: linux-m...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- arch/mips/ralink/Kconfig | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/mips/ralink/Kconfig b

[PATCH] MIPS: pci-mt7620: fix PLL lock check

2021-03-06 Thread Ilya Lipnitskiy
(bit 23). Also reword the error message for clarity. Without this change it is unlikely that this driver ever worked with mainline kernel. [0]: https://lists.infradead.org/pipermail/lede-commits/2017-July/004441.html Signed-off-by: Ilya Lipnitskiy Cc: John Crispin Cc: linux-m

Re: exec error: BUG: Bad rss-counter

2021-03-03 Thread Ilya Lipnitskiy
On Wed, Mar 3, 2021 at 7:50 AM Eric W. Biederman wrote: > > Ilya Lipnitskiy writes: > > > On Tue, Mar 2, 2021 at 11:37 AM Eric W. Biederman > > wrote: > >> > >> Ilya Lipnitskiy writes: > >> > >> > On Mon, Mar 1, 2021 at 12:

Re: exec error: BUG: Bad rss-counter

2021-03-03 Thread Ilya Lipnitskiy
On Tue, Mar 2, 2021 at 10:56 AM Linus Torvalds wrote: > > On Mon, Mar 1, 2021 at 11:59 PM Ilya Lipnitskiy > wrote: > > > > Good to know. Some more digging and I can say that we hit this error > > when trying to unmap PFN 0 (is_zero_pfn(pfn) returns TRUE, >

Re: exec error: BUG: Bad rss-counter

2021-03-03 Thread Ilya Lipnitskiy
On Tue, Mar 2, 2021 at 11:37 AM Eric W. Biederman wrote: > > Ilya Lipnitskiy writes: > > > On Mon, Mar 1, 2021 at 12:43 PM Eric W. Biederman > > wrote: > >> > >> Ilya Lipnitskiy writes: > >> > >> > Eric, All, > >> > >

Re: exec error: BUG: Bad rss-counter

2021-03-02 Thread Ilya Lipnitskiy
On Mon, Mar 1, 2021 at 12:43 PM Eric W. Biederman wrote: > > Ilya Lipnitskiy writes: > > > Eric, All, > > > > The following error appears when running Linux 5.10.18 on an embedded > > MIPS mt7621 target: > > [0.301219] BUG: Bad rss-counter state m

Re: [PATCH 4.19 209/247] staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c

2021-03-01 Thread Ilya Lipnitskiy
Kroah-Hartman wrote: > > From: Ilya Lipnitskiy > > commit 1f92798cbe7fe923479cff754dd06dd23d352e36 upstream. > > Also use KBUILD_MODNAME for module name. > > This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building > against that target using OpenWrt w

Re: [PATCH 5.4 280/340] staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c

2021-03-01 Thread Ilya Lipnitskiy
Kroah-Hartman wrote: > > From: Ilya Lipnitskiy > > commit 1f92798cbe7fe923479cff754dd06dd23d352e36 upstream. > > Also use KBUILD_MODNAME for module name. > > This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building > against that target using OpenWrt with Linux

exec error: BUG: Bad rss-counter

2021-02-28 Thread Ilya Lipnitskiy
Eric, All, The following error appears when running Linux 5.10.18 on an embedded MIPS mt7621 target: [0.301219] BUG: Bad rss-counter state mm:(ptrval) type:MM_ANONPAGES val:1 Being a very generic error, I started digging and added a stack dump before the BUG: Call Trace: [<80008094>] show_sta