All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] Add R8A7794/SILK board eMMC DT support
@ 2016-05-31 22:06 ` Sergei Shtylyov
  0 siblings, 0 replies; 147+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:06 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Hello.

   Here's the set of 13 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160530-v4.7-rc1' tag. We add the device tree support for
the R8A7792-based Blanche board. The R-Car 'clk' driver patch was posted last
week separately...

[01/13] ARM: shmobile: r8a7792: add clock index macros
[02/13] ARM: shmobile: r8a7792: add power domain index macros
[03/13] soc: renesas: rcar-sysc: add R8A7792 support
[04/13] ARM: shmobile: r8a7792: basic SoC support
[05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
[06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
[07/13] ARM: dts: r8a7792: initial SoC device tree
[08/13] ARM: dts: r8a7792: add SYS-DMAC support
[09/13] ARM: dts: r8a7792: add [H]SCIF support
[10/13] ARM dts: r8a7792: add IRQC support
[11/13] DT: arm: shmobile: document Blanche board
[12/13] ARM: dts: blanche: initial device tree
[13/13] ARM: dts: blanche: add Ethernet support

WBR, Sergei

^ permalink raw reply	[flat|nested] 147+ messages in thread
* [PATCH v2 1/2] ip6_gre: Fix MTU setting for ip6gretap
@ 2016-05-21 10:17 Haishuang Yan
  2016-05-21 10:17 ` [PATCH v2 2/2] ip6_gre: Set flowi6_proto as IPPROTO_GRE in xmit path Haishuang Yan
  2016-05-24 21:34 ` [PATCH v2 1/2] ip6_gre: Fix MTU setting for ip6gretap David Miller
  0 siblings, 2 replies; 147+ messages in thread
From: Haishuang Yan @ 2016-05-21 10:17 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI
  Cc: netdev, linux-kernel, Haishuang Yan

When creat an ip6gretap interface with an unreachable route,
the MTU is about 14 bytes larger than what was needed.

If the remote address is reachable:
ping6 2001:0:130::1 -c 2
PING 2001:0:130::1(2001:0:130::1) 56 data bytes
64 bytes from 2001:0:130::1: icmp_seq=1 ttl=64 time=1.46 ms
64 bytes from 2001:0:130::1: icmp_seq=2 ttl=64 time=81.1 ms

--- 2001:0:130::1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.465/41.316/81.167/39.851 ms

ip link add ip6gretap1 type ip6gretap\
 local 2001:0:130::2 remote 2001:0:130::1
ip link show ip6gretap1
11: ip6gretap1@NONE: <BROADCAST,MULTICAST> mtu 1434 ...
    link/ether c2:f3:f8:c1:2c:bf brd ff:ff:ff:ff:ff:ff

The MTU value 1434 is right. But if we delete the direct route:
ip -6 route del 2001:0:130::/64
ping6 2001:0:130::1 -c 2
connect: Network is unreachable
ip link add ip6gretap1 type ip6gretap\
 local 2001:0:130::2 remote 2001:0:130::1
ip link show ip6gretap1
12: ip6gretap1@NONE: <BROADCAST,MULTICAST> mtu 1448 ...
    link/ether 7e:e1:d2:c4:06:5e brd ff:ff:ff:ff:ff:ff

Now, the MTU value 1448 is larger than what was needed.

The reason is that if there is a reachable route, when
run following code in ip6gre_tnl_link_config:

	if (p->flags & IP6_TNL_F_CAP_XMIT) {
		int strict = (ipv6_addr_type(&p->raddr) &
			      (IPV6_ADDR_MULTICAST|IPV6_ADDR_LINKLOCAL));

		struct rt6_info *rt = rt6_lookup(t->net,
						 &p->raddr, &p->laddr,
						 p->link, strict);

		if (!rt)
			return;

		if (rt->dst.dev) {
			dev->hard_header_len = rt->dst.dev->hard_header_len +
					       t_hlen;

			if (set_mtu) {
				dev->mtu = rt->dst.dev->mtu - t_hlen;
				if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
					dev->mtu -= 8;
				if (dev->type == ARPHRD_ETHER)
					dev->mtu -= ETH_HLEN;

				if (dev->mtu < IPV6_MIN_MTU)
					dev->mtu = IPV6_MIN_MTU;
			}
		}
		ip6_rt_put(rt);
	}

Because rt is not NULL here, so dev->mtu will subtract the ethernet
header length later. But when rt is NULL, it just simply return, so
dev->mtu doesn't update correctly in this situation.

This patch first verify the dev->type is ARPHRD_ETHER for ip6gretap
interface, and then decrease the mtu as early as possible.

Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
---
Changes in v2:
  - Make the commit message more clearer.
---
 net/ipv6/ip6_gre.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 4541fa5..8ea5a4d 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1029,6 +1029,8 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)
 
 	dev->hard_header_len = LL_MAX_HEADER + t_hlen;
 	dev->mtu = ETH_DATA_LEN - t_hlen;
+	if (dev->type == ARPHRD_ETHER)
+		dev->mtu -= ETH_HLEN;
 	if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
 		dev->mtu -= 8;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 147+ messages in thread
* [PATCH] ARM: shmobile: rcar-gen2: Use ICRAM1 for jump stub on all SoCs
@ 2016-05-17 15:15 ` Geert Uytterhoeven
  0 siblings, 0 replies; 147+ messages in thread
From: Geert Uytterhoeven @ 2016-05-17 15:15 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

Currently the different SoCs in the R-Car Gen2 family use different
types of on-chip RAM for the jump stub:
  - R-Car H2 uses Media RAM,
  - R-Car M2-W uses another type of optional On-chip RAM, as it doesn't
    have Media RAM,
  - R-Car M2-N uses Inter Connect RAM in Magnus Damm's "ARM: shmobile:
    r8a7793 boot address update".

As all R-Car Gen2 SoCs have 4 KiB of Inter Connect RAM, consolidate the
code by always using that.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Tested on r8a7790/lager and r8a7791/koelsch.
---
 arch/arm/mach-shmobile/pm-rcar-gen2.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
index 691ac166a277c03f..61361dac6068210a 100644
--- a/arch/arm/mach-shmobile/pm-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c
@@ -26,8 +26,7 @@
 #define CA7RESCNT	0x0044
 
 /* On-chip RAM */
-#define MERAM		0xe8080000
-#define RAM		0xe6300000
+#define ICRAM1		0xe63c0000	/* Inter Connect RAM1 (4 KiB) */
 
 /* SYSC */
 #define SYSCIER 0x0c
@@ -58,7 +57,7 @@ void __init rcar_gen2_pm_init(void)
 	struct device_node *np, *cpus;
 	bool has_a7 = false;
 	bool has_a15 = false;
-	phys_addr_t boot_vector_addr = 0;
+	phys_addr_t boot_vector_addr = ICRAM1;
 	u32 syscier = 0;
 
 	if (once++)
@@ -75,14 +74,10 @@ void __init rcar_gen2_pm_init(void)
 			has_a7 = true;
 	}
 
-	if (of_machine_is_compatible("renesas,r8a7790")) {
-		boot_vector_addr = MERAM;
+	if (of_machine_is_compatible("renesas,r8a7790"))
 		syscier = 0x013111ef;
-
-	} else if (of_machine_is_compatible("renesas,r8a7791")) {
-		boot_vector_addr = RAM;
+	else if (of_machine_is_compatible("renesas,r8a7791"))
 		syscier = 0x00111003;
-	}
 
 	/* RAM for jump stub, because BAR requires 256KB aligned address */
 	p = ioremap_nocache(boot_vector_addr, shmobile_boot_size);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 147+ messages in thread

end of thread, other threads:[~2016-06-23 10:49 UTC | newest]

Thread overview: 147+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
2016-05-31 22:06 ` Sergei Shtylyov
2016-05-31 22:09 ` [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros Sergei Shtylyov
2016-06-01  0:52   ` Simon Horman
2016-06-01 13:57     ` Sergei Shtylyov
2016-06-22 19:52     ` Sergei Shtylyov
2016-06-22 22:33       ` Simon Horman
     [not found]         ` <20160622223330.GA15843-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2016-06-23  7:46           ` Geert Uytterhoeven
2016-06-23  7:46             ` Geert Uytterhoeven
2016-06-23 10:49           ` Sergei Shtylyov
2016-06-23 10:49             ` Sergei Shtylyov
     [not found]   ` <2280165.siMXMbFrFe-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  7:22     ` Geert Uytterhoeven
2016-06-01  7:22       ` Geert Uytterhoeven
2016-06-01 14:09       ` Sergei Shtylyov
2016-05-31 22:11 ` [PATCH 02/13] ARM: shmobile: r8a7792: add power domain " Sergei Shtylyov
2016-06-01  7:32   ` Geert Uytterhoeven
2016-05-31 22:15 ` [PATCH 03/13] soc: renesas: rcar-sysc: add R8A7792 support Sergei Shtylyov
2016-06-01  7:38   ` Geert Uytterhoeven
2016-05-31 22:18 ` [PATCH 04/13] ARM: shmobile: r8a7792: basic SoC support Sergei Shtylyov
2016-05-31 22:18   ` Sergei Shtylyov
2016-06-01  0:25   ` Simon Horman
2016-06-01  0:25     ` Simon Horman
2016-06-01  7:47   ` Geert Uytterhoeven
2016-06-01  7:47     ` Geert Uytterhoeven
2016-06-01 21:00     ` Sergei Shtylyov
2016-06-01 21:00       ` Sergei Shtylyov
2016-06-06 18:59   ` Sergei Shtylyov
2016-06-06 18:59     ` Sergei Shtylyov
2016-05-31 22:20 ` [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support Sergei Shtylyov
2016-06-01  0:25   ` Simon Horman
2016-06-01  0:30     ` Simon Horman
2016-06-01  7:50     ` Geert Uytterhoeven
2016-06-01  7:48   ` Geert Uytterhoeven
2016-06-03  1:49   ` Rob Herring
2016-05-31 22:21 ` [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support Sergei Shtylyov
2016-06-01  0:28   ` Simon Horman
2016-06-01  7:51   ` Geert Uytterhoeven
2016-06-03  1:50   ` Rob Herring
2016-05-31 22:24 ` [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree Sergei Shtylyov
2016-05-31 22:24   ` Sergei Shtylyov
2016-06-01  0:57   ` Simon Horman
2016-06-01  0:57     ` Simon Horman
2016-06-01 14:00     ` Sergei Shtylyov
2016-06-01 14:00       ` Sergei Shtylyov
2016-06-06 22:26     ` Sergei Shtylyov
2016-06-06 22:26       ` Sergei Shtylyov
2016-06-07  7:13       ` Geert Uytterhoeven
2016-06-07  7:13         ` Geert Uytterhoeven
2016-06-07 20:58         ` Sergei Shtylyov
2016-06-07 20:58           ` Sergei Shtylyov
2016-06-10  1:02           ` Simon Horman
2016-06-10  1:02             ` Simon Horman
2016-06-10 19:29             ` Sergei Shtylyov
2016-06-10 19:29               ` Sergei Shtylyov
2016-06-10 20:42               ` Geert Uytterhoeven
2016-06-10 20:42                 ` Geert Uytterhoeven
2016-06-10 20:50                 ` Sergei Shtylyov
2016-06-10 20:50                   ` Sergei Shtylyov
2016-06-13  7:12                   ` Geert Uytterhoeven
2016-06-13  7:12                     ` Geert Uytterhoeven
2016-06-13 11:24                     ` Sergei Shtylyov
2016-06-13 11:24                       ` Sergei Shtylyov
     [not found]                       ` <7d93d81d-cca9-e434-6488-0ea839f81663-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-06-13 11:48                         ` Geert Uytterhoeven
2016-06-13 11:48                           ` Geert Uytterhoeven
2016-06-13 11:48                           ` Geert Uytterhoeven
2016-06-14  1:08                     ` Kuninori Morimoto
2016-06-14  1:08                       ` Kuninori Morimoto
2016-06-17  2:14                       ` Kuninori Morimoto
2016-06-17  2:14                         ` Kuninori Morimoto
2016-06-17  6:27                         ` Geert Uytterhoeven
2016-06-17  6:27                           ` Geert Uytterhoeven
     [not found]               ` <8efb1c7e-5463-2556-744c-d327886d92d4-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-06-14  0:43                 ` Simon Horman
2016-06-14  0:43                   ` Simon Horman
2016-06-14  0:43                   ` Simon Horman
2016-06-14 21:08                   ` Sergei Shtylyov
2016-06-14 21:08                     ` Sergei Shtylyov
2016-06-16  0:06                     ` Simon Horman
2016-06-16  0:06                       ` Simon Horman
2016-06-01  9:23   ` Geert Uytterhoeven
2016-06-01  9:23     ` Geert Uytterhoeven
2016-05-31 22:25 ` [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support Sergei Shtylyov
2016-05-31 22:25   ` Sergei Shtylyov
2016-06-01  1:03   ` Simon Horman
2016-06-01  1:03     ` Simon Horman
     [not found]   ` <5621267.GpvUaW18zI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  8:15     ` Geert Uytterhoeven
2016-06-01  8:15       ` Geert Uytterhoeven
2016-06-01  8:15       ` Geert Uytterhoeven
2016-05-31 22:26 ` [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support Sergei Shtylyov
2016-05-31 22:26   ` Sergei Shtylyov
2016-06-01  1:13   ` Simon Horman
2016-06-01  1:13     ` Simon Horman
2016-06-03 14:33     ` Sergei Shtylyov
2016-06-03 14:33       ` Sergei Shtylyov
2016-06-01  8:17   ` Geert Uytterhoeven
2016-06-01  8:17     ` Geert Uytterhoeven
2016-05-31 22:29 ` [PATCH 10/13] ARM: dts: r8a7792: add IRQC support Sergei Shtylyov
2016-05-31 22:29   ` Sergei Shtylyov
2016-06-01  1:18   ` Simon Horman
2016-06-01  1:18     ` Simon Horman
2016-06-01 14:02     ` Sergei Shtylyov
2016-06-01 14:02       ` Sergei Shtylyov
     [not found]   ` <3573091.BUvyGW3hVt-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  8:17     ` Geert Uytterhoeven
2016-06-01  8:17       ` Geert Uytterhoeven
2016-06-01  8:17       ` Geert Uytterhoeven
2016-05-31 22:30 ` [PATCH 11/13] DT: arm: shmobile: document Blanche board Sergei Shtylyov
2016-05-31 23:51   ` Simon Horman
     [not found]     ` <20160531235119.GA20527-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2016-06-01 13:34       ` Sergei Shtylyov
2016-06-01 13:34         ` Sergei Shtylyov
2016-06-01  8:19   ` Geert Uytterhoeven
2016-06-03  1:50   ` Rob Herring
2016-05-31 22:32 ` [PATCH 12/13] ARM: dts: blanche: initial device tree Sergei Shtylyov
2016-05-31 22:32   ` Sergei Shtylyov
2016-06-01  1:21   ` Simon Horman
2016-06-01  1:21     ` Simon Horman
2016-06-02 21:34     ` Sergei Shtylyov
2016-06-02 21:34       ` Sergei Shtylyov
2016-06-01  8:36   ` Geert Uytterhoeven
2016-06-01  8:36     ` Geert Uytterhoeven
2016-06-01  8:36     ` Geert Uytterhoeven
2016-05-31 22:33 ` [PATCH 13/13] ARM: dts: blanche: add Ethernet support Sergei Shtylyov
2016-05-31 22:33   ` Sergei Shtylyov
2016-06-01  1:24   ` Simon Horman
2016-06-01  1:24     ` Simon Horman
     [not found]   ` <1669958.qjJ7i3NBPv-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  8:22     ` Geert Uytterhoeven
2016-06-01  8:22       ` Geert Uytterhoeven
2016-06-01  8:22       ` Geert Uytterhoeven
2016-06-01 12:16       ` Sergei Shtylyov
2016-06-01 12:16         ` Sergei Shtylyov
     [not found]         ` <a60346f2-2abb-342b-dd20-38d401c4ceb3-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-06-01 12:27           ` Geert Uytterhoeven
2016-06-01 12:27             ` Geert Uytterhoeven
2016-06-01 12:27             ` Geert Uytterhoeven
2016-06-02 21:33             ` Sergei Shtylyov
2016-06-02 21:33               ` Sergei Shtylyov
     [not found] ` <13205049.n7pM8utpHF-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  7:04   ` [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Geert Uytterhoeven
2016-06-01  7:04     ` Geert Uytterhoeven
2016-06-01  7:04     ` Geert Uytterhoeven
2016-06-01 10:30     ` Sergei Shtylyov
2016-06-01 10:30       ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2016-05-21 10:17 [PATCH v2 1/2] ip6_gre: Fix MTU setting for ip6gretap Haishuang Yan
2016-05-21 10:17 ` [PATCH v2 2/2] ip6_gre: Set flowi6_proto as IPPROTO_GRE in xmit path Haishuang Yan
2016-05-24 21:34   ` David Miller
2016-05-24 21:34     ` [PATCH v2 2/2] ip6_gre: Set flowi6_proto as IPPROTO_GRE in xmit path., Re: [PATCH] ARM: shmobile: rcar-gen2: Use ICRAM1 for jump stub on all SoCs, [PATCH 12/13] ARM: dts: blanche: initial device tree David Miller, Simon Horman, Sergei Shtylyov
2016-05-24 21:34 ` [PATCH v2 1/2] ip6_gre: Fix MTU setting for ip6gretap David Miller
2016-05-17 15:15 [PATCH] ARM: shmobile: rcar-gen2: Use ICRAM1 for jump stub on all SoCs Geert Uytterhoeven
2016-05-17 15:15 ` Geert Uytterhoeven
2016-05-25  1:01 ` Simon Horman
2016-05-25  1:01   ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.