diff --git a/0001-ip6_output-fragment-outgoing-reassembled-skb-properl.patch b/0001-ip6_output-fragment-outgoing-reassembled-skb-properl.patch deleted file mode 100644 index a19217d12..000000000 --- a/0001-ip6_output-fragment-outgoing-reassembled-skb-properl.patch +++ /dev/null @@ -1,39 +0,0 @@ -Bugzilla: 1015905 -Upstream-status: 3.13 (should hit stable) - -From 90e4e23d52fd04f228eed2c3d341136c50058b37 Mon Sep 17 00:00:00 2001 -From: Jiri Pirko -Date: Wed, 6 Nov 2013 17:52:19 +0100 -Subject: [PATCH 1/2] ip6_output: fragment outgoing reassembled skb properly - -If reassembled packet would fit into outdev MTU, it is not fragmented -according the original frag size and it is send as single big packet. - -The second case is if skb is gso. In that case fragmentation does not happen -according to the original frag size. - -This patch fixes these. - -Signed-off-by: Jiri Pirko -Signed-off-by: David S. Miller ---- - net/ipv6/ip6_output.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c -index 5b25f85..f80f2fa 100644 ---- a/net/ipv6/ip6_output.c -+++ b/net/ipv6/ip6_output.c -@@ -150,7 +150,8 @@ static int ip6_finish_output2(struct sk_buff *skb) - static int ip6_finish_output(struct sk_buff *skb) - { - if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) || -- dst_allfrag(skb_dst(skb))) -+ dst_allfrag(skb_dst(skb)) || -+ (IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size)) - return ip6_fragment(skb, ip6_finish_output2); - else - return ip6_finish_output2(skb); --- -1.8.3.1 - diff --git a/0001-iwlwifi-don-t-WARN-on-host-commands-sent-when-firmwa.patch b/0001-iwlwifi-don-t-WARN-on-host-commands-sent-when-firmwa.patch deleted file mode 100644 index 241b7d750..000000000 --- a/0001-iwlwifi-don-t-WARN-on-host-commands-sent-when-firmwa.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8ca95995e64f5d270889badb3e449dca91106a2b Mon Sep 17 00:00:00 2001 -From: Emmanuel Grumbach -Date: Sun, 15 Sep 2013 11:37:17 +0300 -Subject: [PATCH] iwlwifi: don't WARN on host commands sent when firmware is dead - -This triggers automatic bug reports and add no valuable -information. Print a simple error instead and drop the -host command. - -Signed-off-by: Emmanuel Grumbach -Signed-off-by: Johannes Berg ---- - drivers/net/wireless/iwlwifi/iwl-trans.h | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h -index dd57a36..80b4750 100644 ---- a/drivers/net/wireless/iwlwifi/iwl-trans.h -+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h -@@ -601,8 +601,10 @@ static inline int iwl_trans_send_cmd(struct iwl_trans *trans, - { - int ret; - -- WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE, -- "%s bad state = %d", __func__, trans->state); -+ if (trans->state != IWL_TRANS_FW_ALIVE) { -+ IWL_ERR(trans, "%s bad state = %d", __func__, trans->state); -+ return -EIO; -+ } - - if (!(cmd->flags & CMD_ASYNC)) - lock_map_acquire_read(&trans->sync_cmd_lockdep_map); --- -1.7.1 - diff --git a/0002-netfilter-push-reasm-skb-through-instead-of-original.patch b/0002-netfilter-push-reasm-skb-through-instead-of-original.patch deleted file mode 100644 index 27fee5173..000000000 --- a/0002-netfilter-push-reasm-skb-through-instead-of-original.patch +++ /dev/null @@ -1,499 +0,0 @@ -Bugzilla: 1015905 -Upstream-status: 3.13 (should hit stable) - -From 5c0df04613dd39fba5d2a43eaf90a2dc1dcd8899 Mon Sep 17 00:00:00 2001 -From: Jiri Pirko -Date: Wed, 6 Nov 2013 17:52:20 +0100 -Subject: [PATCH 2/2] netfilter: push reasm skb through instead of original - frag skbs - -Pushing original fragments through causes several problems. For example -for matching, frags may not be matched correctly. Take following -example: - - -On HOSTA do: -ip6tables -I INPUT -p icmpv6 -j DROP -ip6tables -I INPUT -p icmpv6 -m icmp6 --icmpv6-type 128 -j ACCEPT - -and on HOSTB you do: -ping6 HOSTA -s2000 (MTU is 1500) - -Incoming echo requests will be filtered out on HOSTA. This issue does -not occur with smaller packets than MTU (where fragmentation does not happen) - - -As was discussed previously, the only correct solution seems to be to use -reassembled skb instead of separete frags. Doing this has positive side -effects in reducing sk_buff by one pointer (nfct_reasm) and also the reams -dances in ipvs and conntrack can be removed. - -Future plan is to remove net/ipv6/netfilter/nf_conntrack_reasm.c -entirely and use code in net/ipv6/reassembly.c instead. - -Signed-off-by: Jiri Pirko -Acked-by: Julian Anastasov -Signed-off-by: Marcelo Ricardo Leitner -Signed-off-by: David S. Miller - -Conflicts: - include/net/netfilter/ipv6/nf_defrag_ipv6.h - net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c - net/ipv6/netfilter/nf_defrag_ipv6_hooks.c - net/netfilter/ipvs/ip_vs_core.c ---- - include/linux/skbuff.h | 32 --------------- - include/net/ip_vs.h | 32 +-------------- - include/net/netfilter/ipv6/nf_defrag_ipv6.h | 5 +-- - net/core/skbuff.c | 3 -- - net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 54 +------------------------ - net/ipv6/netfilter/nf_conntrack_reasm.c | 19 +-------- - net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 7 +++- - net/netfilter/ipvs/ip_vs_core.c | 55 +------------------------- - net/netfilter/ipvs/ip_vs_pe_sip.c | 8 +--- - 9 files changed, 13 insertions(+), 202 deletions(-) - -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 6bd165b..37b4517 100644 ---- a/include/linux/skbuff.h -+++ b/include/linux/skbuff.h -@@ -333,11 +333,6 @@ typedef unsigned int sk_buff_data_t; - typedef unsigned char *sk_buff_data_t; - #endif - --#if defined(CONFIG_NF_DEFRAG_IPV4) || defined(CONFIG_NF_DEFRAG_IPV4_MODULE) || \ -- defined(CONFIG_NF_DEFRAG_IPV6) || defined(CONFIG_NF_DEFRAG_IPV6_MODULE) --#define NET_SKBUFF_NF_DEFRAG_NEEDED 1 --#endif -- - /** - * struct sk_buff - socket buffer - * @next: Next buffer in list -@@ -370,7 +365,6 @@ typedef unsigned char *sk_buff_data_t; - * @protocol: Packet protocol from driver - * @destructor: Destruct function - * @nfct: Associated connection, if any -- * @nfct_reasm: netfilter conntrack re-assembly pointer - * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c - * @skb_iif: ifindex of device we arrived on - * @tc_index: Traffic control index -@@ -459,9 +453,6 @@ struct sk_buff { - #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) - struct nf_conntrack *nfct; - #endif --#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED -- struct sk_buff *nfct_reasm; --#endif - #ifdef CONFIG_BRIDGE_NETFILTER - struct nf_bridge_info *nf_bridge; - #endif -@@ -2603,18 +2594,6 @@ static inline void nf_conntrack_get(struct nf_conntrack *nfct) - atomic_inc(&nfct->use); - } - #endif --#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED --static inline void nf_conntrack_get_reasm(struct sk_buff *skb) --{ -- if (skb) -- atomic_inc(&skb->users); --} --static inline void nf_conntrack_put_reasm(struct sk_buff *skb) --{ -- if (skb) -- kfree_skb(skb); --} --#endif - #ifdef CONFIG_BRIDGE_NETFILTER - static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge) - { -@@ -2633,10 +2612,6 @@ static inline void nf_reset(struct sk_buff *skb) - nf_conntrack_put(skb->nfct); - skb->nfct = NULL; - #endif --#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED -- nf_conntrack_put_reasm(skb->nfct_reasm); -- skb->nfct_reasm = NULL; --#endif - #ifdef CONFIG_BRIDGE_NETFILTER - nf_bridge_put(skb->nf_bridge); - skb->nf_bridge = NULL; -@@ -2658,10 +2633,6 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) - nf_conntrack_get(src->nfct); - dst->nfctinfo = src->nfctinfo; - #endif --#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED -- dst->nfct_reasm = src->nfct_reasm; -- nf_conntrack_get_reasm(src->nfct_reasm); --#endif - #ifdef CONFIG_BRIDGE_NETFILTER - dst->nf_bridge = src->nf_bridge; - nf_bridge_get(src->nf_bridge); -@@ -2673,9 +2644,6 @@ static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) - #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) - nf_conntrack_put(dst->nfct); - #endif --#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED -- nf_conntrack_put_reasm(dst->nfct_reasm); --#endif - #ifdef CONFIG_BRIDGE_NETFILTER - nf_bridge_put(dst->nf_bridge); - #endif -diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h -index f0d70f0..ff21521 100644 ---- a/include/net/ip_vs.h -+++ b/include/net/ip_vs.h -@@ -109,7 +109,6 @@ extern int ip_vs_conn_tab_size; - struct ip_vs_iphdr { - __u32 len; /* IPv4 simply where L4 starts - IPv6 where L4 Transport Header starts */ -- __u32 thoff_reasm; /* Transport Header Offset in nfct_reasm skb */ - __u16 fragoffs; /* IPv6 fragment offset, 0 if first frag (or not frag)*/ - __s16 protocol; - __s32 flags; -@@ -117,34 +116,12 @@ struct ip_vs_iphdr { - union nf_inet_addr daddr; - }; - --/* Dependency to module: nf_defrag_ipv6 */ --#if defined(CONFIG_NF_DEFRAG_IPV6) || defined(CONFIG_NF_DEFRAG_IPV6_MODULE) --static inline struct sk_buff *skb_nfct_reasm(const struct sk_buff *skb) --{ -- return skb->nfct_reasm; --} --static inline void *frag_safe_skb_hp(const struct sk_buff *skb, int offset, -- int len, void *buffer, -- const struct ip_vs_iphdr *ipvsh) --{ -- if (unlikely(ipvsh->fragoffs && skb_nfct_reasm(skb))) -- return skb_header_pointer(skb_nfct_reasm(skb), -- ipvsh->thoff_reasm, len, buffer); -- -- return skb_header_pointer(skb, offset, len, buffer); --} --#else --static inline struct sk_buff *skb_nfct_reasm(const struct sk_buff *skb) --{ -- return NULL; --} - static inline void *frag_safe_skb_hp(const struct sk_buff *skb, int offset, - int len, void *buffer, - const struct ip_vs_iphdr *ipvsh) - { - return skb_header_pointer(skb, offset, len, buffer); - } --#endif - - static inline void - ip_vs_fill_ip4hdr(const void *nh, struct ip_vs_iphdr *iphdr) -@@ -171,19 +148,12 @@ ip_vs_fill_iph_skb(int af, const struct sk_buff *skb, struct ip_vs_iphdr *iphdr) - (struct ipv6hdr *)skb_network_header(skb); - iphdr->saddr.in6 = iph->saddr; - iphdr->daddr.in6 = iph->daddr; -- /* ipv6_find_hdr() updates len, flags, thoff_reasm */ -- iphdr->thoff_reasm = 0; -+ /* ipv6_find_hdr() updates len, flags */ - iphdr->len = 0; - iphdr->flags = 0; - iphdr->protocol = ipv6_find_hdr(skb, &iphdr->len, -1, - &iphdr->fragoffs, - &iphdr->flags); -- /* get proto from re-assembled packet and it's offset */ -- if (skb_nfct_reasm(skb)) -- iphdr->protocol = ipv6_find_hdr(skb_nfct_reasm(skb), -- &iphdr->thoff_reasm, -- -1, NULL, NULL); -- - } else - #endif - { -diff --git a/include/net/netfilter/ipv6/nf_defrag_ipv6.h b/include/net/netfilter/ipv6/nf_defrag_ipv6.h -index fd79c9a..17920d8 100644 ---- a/include/net/netfilter/ipv6/nf_defrag_ipv6.h -+++ b/include/net/netfilter/ipv6/nf_defrag_ipv6.h -@@ -6,10 +6,7 @@ extern void nf_defrag_ipv6_enable(void); - extern int nf_ct_frag6_init(void); - extern void nf_ct_frag6_cleanup(void); - extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user); --extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, -- struct net_device *in, -- struct net_device *out, -- int (*okfn)(struct sk_buff *)); -+extern void nf_ct_frag6_consume_orig(struct sk_buff *skb); - - struct inet_frags_ctl; - -diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 2c3d0f5..a75022e 100644 ---- a/net/core/skbuff.c -+++ b/net/core/skbuff.c -@@ -580,9 +580,6 @@ static void skb_release_head_state(struct sk_buff *skb) - #if IS_ENABLED(CONFIG_NF_CONNTRACK) - nf_conntrack_put(skb->nfct); - #endif --#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED -- nf_conntrack_put_reasm(skb->nfct_reasm); --#endif - #ifdef CONFIG_BRIDGE_NETFILTER - nf_bridge_put(skb->nf_bridge); - #endif -diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c -index c9b6a6e..97cd750 100644 ---- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c -+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c -@@ -172,63 +172,13 @@ out: - return nf_conntrack_confirm(skb); - } - --static unsigned int __ipv6_conntrack_in(struct net *net, -- unsigned int hooknum, -- struct sk_buff *skb, -- const struct net_device *in, -- const struct net_device *out, -- int (*okfn)(struct sk_buff *)) --{ -- struct sk_buff *reasm = skb->nfct_reasm; -- const struct nf_conn_help *help; -- struct nf_conn *ct; -- enum ip_conntrack_info ctinfo; -- -- /* This packet is fragmented and has reassembled packet. */ -- if (reasm) { -- /* Reassembled packet isn't parsed yet ? */ -- if (!reasm->nfct) { -- unsigned int ret; -- -- ret = nf_conntrack_in(net, PF_INET6, hooknum, reasm); -- if (ret != NF_ACCEPT) -- return ret; -- } -- -- /* Conntrack helpers need the entire reassembled packet in the -- * POST_ROUTING hook. In case of unconfirmed connections NAT -- * might reassign a helper, so the entire packet is also -- * required. -- */ -- ct = nf_ct_get(reasm, &ctinfo); -- if (ct != NULL && !nf_ct_is_untracked(ct)) { -- help = nfct_help(ct); -- if ((help && help->helper) || !nf_ct_is_confirmed(ct)) { -- nf_conntrack_get_reasm(reasm); -- NF_HOOK_THRESH(NFPROTO_IPV6, hooknum, reasm, -- (struct net_device *)in, -- (struct net_device *)out, -- okfn, NF_IP6_PRI_CONNTRACK + 1); -- return NF_DROP_ERR(-ECANCELED); -- } -- } -- -- nf_conntrack_get(reasm->nfct); -- skb->nfct = reasm->nfct; -- skb->nfctinfo = reasm->nfctinfo; -- return NF_ACCEPT; -- } -- -- return nf_conntrack_in(net, PF_INET6, hooknum, skb); --} -- - static unsigned int ipv6_conntrack_in(unsigned int hooknum, - struct sk_buff *skb, - const struct net_device *in, - const struct net_device *out, - int (*okfn)(struct sk_buff *)) - { -- return __ipv6_conntrack_in(dev_net(in), hooknum, skb, in, out, okfn); -+ return nf_conntrack_in(dev_net(in), PF_INET6, hooknum, skb); - } - - static unsigned int ipv6_conntrack_local(unsigned int hooknum, -@@ -242,7 +192,7 @@ static unsigned int ipv6_conntrack_local(unsigned int hooknum, - net_notice_ratelimited("ipv6_conntrack_local: packet too short\n"); - return NF_ACCEPT; - } -- return __ipv6_conntrack_in(dev_net(out), hooknum, skb, in, out, okfn); -+ return nf_conntrack_in(dev_net(out), PF_INET6, hooknum, skb); - } - - static struct nf_hook_ops ipv6_conntrack_ops[] __read_mostly = { -diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c -index dffdc1a..253566a 100644 ---- a/net/ipv6/netfilter/nf_conntrack_reasm.c -+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c -@@ -621,31 +621,16 @@ ret_orig: - return skb; - } - --void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, -- struct net_device *in, struct net_device *out, -- int (*okfn)(struct sk_buff *)) -+void nf_ct_frag6_consume_orig(struct sk_buff *skb) - { - struct sk_buff *s, *s2; -- unsigned int ret = 0; - - for (s = NFCT_FRAG6_CB(skb)->orig; s;) { -- nf_conntrack_put_reasm(s->nfct_reasm); -- nf_conntrack_get_reasm(skb); -- s->nfct_reasm = skb; -- - s2 = s->next; - s->next = NULL; -- -- if (ret != -ECANCELED) -- ret = NF_HOOK_THRESH(NFPROTO_IPV6, hooknum, s, -- in, out, okfn, -- NF_IP6_PRI_CONNTRACK_DEFRAG + 1); -- else -- kfree_skb(s); -- -+ consume_skb(s); - s = s2; - } -- nf_conntrack_put_reasm(skb); - } - - static int nf_ct_net_init(struct net *net) -diff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c -index aacd121..581dd9e 100644 ---- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c -+++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c -@@ -75,8 +75,11 @@ static unsigned int ipv6_defrag(unsigned int hooknum, - if (reasm == skb) - return NF_ACCEPT; - -- nf_ct_frag6_output(hooknum, reasm, (struct net_device *)in, -- (struct net_device *)out, okfn); -+ nf_ct_frag6_consume_orig(reasm); -+ -+ NF_HOOK_THRESH(NFPROTO_IPV6, hooknum, reasm, -+ (struct net_device *) in, (struct net_device *) out, -+ okfn, NF_IP6_PRI_CONNTRACK_DEFRAG + 1); - - return NF_STOLEN; - } -diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c -index 4f69e83..1517b50 100644 ---- a/net/netfilter/ipvs/ip_vs_core.c -+++ b/net/netfilter/ipvs/ip_vs_core.c -@@ -1131,12 +1131,6 @@ ip_vs_out(unsigned int hooknum, struct sk_buff *skb, int af) - ip_vs_fill_iph_skb(af, skb, &iph); - #ifdef CONFIG_IP_VS_IPV6 - if (af == AF_INET6) { -- if (!iph.fragoffs && skb_nfct_reasm(skb)) { -- struct sk_buff *reasm = skb_nfct_reasm(skb); -- /* Save fw mark for coming frags */ -- reasm->ipvs_property = 1; -- reasm->mark = skb->mark; -- } - if (unlikely(iph.protocol == IPPROTO_ICMPV6)) { - int related; - int verdict = ip_vs_out_icmp_v6(skb, &related, -@@ -1606,12 +1600,6 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) - - #ifdef CONFIG_IP_VS_IPV6 - if (af == AF_INET6) { -- if (!iph.fragoffs && skb_nfct_reasm(skb)) { -- struct sk_buff *reasm = skb_nfct_reasm(skb); -- /* Save fw mark for coming frags. */ -- reasm->ipvs_property = 1; -- reasm->mark = skb->mark; -- } - if (unlikely(iph.protocol == IPPROTO_ICMPV6)) { - int related; - int verdict = ip_vs_in_icmp_v6(skb, &related, hooknum, -@@ -1663,9 +1651,8 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) - /* sorry, all this trouble for a no-hit :) */ - IP_VS_DBG_PKT(12, af, pp, skb, 0, - "ip_vs_in: packet continues traversal as normal"); -- if (iph.fragoffs && !skb_nfct_reasm(skb)) { -+ if (iph.fragoffs) { - /* Fragment that couldn't be mapped to a conn entry -- * and don't have any pointer to a reasm skb - * is missing module nf_defrag_ipv6 - */ - IP_VS_DBG_RL("Unhandled frag, load nf_defrag_ipv6\n"); -@@ -1748,38 +1735,6 @@ ip_vs_local_request4(unsigned int hooknum, struct sk_buff *skb, - #ifdef CONFIG_IP_VS_IPV6 - - /* -- * AF_INET6 fragment handling -- * Copy info from first fragment, to the rest of them. -- */ --static unsigned int --ip_vs_preroute_frag6(unsigned int hooknum, struct sk_buff *skb, -- const struct net_device *in, -- const struct net_device *out, -- int (*okfn)(struct sk_buff *)) --{ -- struct sk_buff *reasm = skb_nfct_reasm(skb); -- struct net *net; -- -- /* Skip if not a "replay" from nf_ct_frag6_output or first fragment. -- * ipvs_property is set when checking first fragment -- * in ip_vs_in() and ip_vs_out(). -- */ -- if (reasm) -- IP_VS_DBG(2, "Fragment recv prop:%d\n", reasm->ipvs_property); -- if (!reasm || !reasm->ipvs_property) -- return NF_ACCEPT; -- -- net = skb_net(skb); -- if (!net_ipvs(net)->enable) -- return NF_ACCEPT; -- -- /* Copy stored fw mark, saved in ip_vs_{in,out} */ -- skb->mark = reasm->mark; -- -- return NF_ACCEPT; --} -- --/* - * AF_INET6 handler in NF_INET_LOCAL_IN chain - * Schedule and forward packets from remote clients - */ -@@ -1916,14 +1871,6 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { - .priority = 100, - }, - #ifdef CONFIG_IP_VS_IPV6 -- /* After mangle & nat fetch 2:nd fragment and following */ -- { -- .hook = ip_vs_preroute_frag6, -- .owner = THIS_MODULE, -- .pf = NFPROTO_IPV6, -- .hooknum = NF_INET_PRE_ROUTING, -- .priority = NF_IP6_PRI_NAT_DST + 1, -- }, - /* After packet filtering, change source only for VS/NAT */ - { - .hook = ip_vs_reply6, -diff --git a/net/netfilter/ipvs/ip_vs_pe_sip.c b/net/netfilter/ipvs/ip_vs_pe_sip.c -index 9ef22bd..bed5f70 100644 ---- a/net/netfilter/ipvs/ip_vs_pe_sip.c -+++ b/net/netfilter/ipvs/ip_vs_pe_sip.c -@@ -65,7 +65,6 @@ static int get_callid(const char *dptr, unsigned int dataoff, - static int - ip_vs_sip_fill_param(struct ip_vs_conn_param *p, struct sk_buff *skb) - { -- struct sk_buff *reasm = skb_nfct_reasm(skb); - struct ip_vs_iphdr iph; - unsigned int dataoff, datalen, matchoff, matchlen; - const char *dptr; -@@ -79,15 +78,10 @@ ip_vs_sip_fill_param(struct ip_vs_conn_param *p, struct sk_buff *skb) - /* todo: IPv6 fragments: - * I think this only should be done for the first fragment. /HS - */ -- if (reasm) { -- skb = reasm; -- dataoff = iph.thoff_reasm + sizeof(struct udphdr); -- } else -- dataoff = iph.len + sizeof(struct udphdr); -+ dataoff = iph.len + sizeof(struct udphdr); - - if (dataoff >= skb->len) - return -EINVAL; -- /* todo: Check if this will mess-up the reasm skb !!! /HS */ - retc = skb_linearize(skb); - if (retc < 0) - return retc; --- -1.8.3.1 - diff --git a/Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch b/Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch deleted file mode 100644 index da1b92ed8..000000000 --- a/Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 92eb77d0ffbaa71b501a0a8dabf09a351bf4267f Mon Sep 17 00:00:00 2001 -From: Daniel Stone -Date: Thu, 31 Oct 2013 07:25:34 +0000 -Subject: Input: evdev - fall back to vmalloc for client event buffer - -evdev always tries to allocate the event buffer for clients using -kzalloc rather than vmalloc, presumably to avoid mapping overhead where -possible. However, drivers like bcm5974, which claims support for -reporting 16 fingers simultaneously, can have an extraordinarily large -buffer. The resultant contiguous order-4 allocation attempt fails due -to fragmentation, and the device is thus unusable until reboot. - -Try kzalloc if we can to avoid the mapping overhead, but if that fails, -fall back to vzalloc. - -Signed-off-by: Daniel Stone -Signed-off-by: Dmitry Torokhov ---- -diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c -index b6ded17..a06e125 100644 ---- a/drivers/input/evdev.c -+++ b/drivers/input/evdev.c -@@ -18,6 +18,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -369,7 +371,11 @@ static int evdev_release(struct inode *inode, struct file *file) - mutex_unlock(&evdev->mutex); - - evdev_detach_client(evdev, client); -- kfree(client); -+ -+ if (is_vmalloc_addr(client)) -+ vfree(client); -+ else -+ kfree(client); - - evdev_close_device(evdev); - -@@ -389,12 +395,14 @@ static int evdev_open(struct inode *inode, struct file *file) - { - struct evdev *evdev = container_of(inode->i_cdev, struct evdev, cdev); - unsigned int bufsize = evdev_compute_buffer_size(evdev->handle.dev); -+ unsigned int size = sizeof(struct evdev_client) + -+ bufsize * sizeof(struct input_event); - struct evdev_client *client; - int error; - -- client = kzalloc(sizeof(struct evdev_client) + -- bufsize * sizeof(struct input_event), -- GFP_KERNEL); -+ client = kzalloc(size, GFP_KERNEL | __GFP_NOWARN); -+ if (!client) -+ client = vzalloc(size); - if (!client) - return -ENOMEM; - --- -cgit v0.9.2 diff --git a/KVM-x86-fix-emulation-of-movzbl-bpl-eax.patch b/KVM-x86-fix-emulation-of-movzbl-bpl-eax.patch deleted file mode 100644 index 65a48c349..000000000 --- a/KVM-x86-fix-emulation-of-movzbl-bpl-eax.patch +++ /dev/null @@ -1,53 +0,0 @@ -Bugzilla: 967652 -Upstream-status: 3.13 (should hit stable) - -From daf727225b8abfdfe424716abac3d15a3ac5626a Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Thu, 31 Oct 2013 23:05:24 +0100 -Subject: [PATCH] KVM: x86: fix emulation of "movzbl %bpl, %eax" - -When I was looking at RHEL5.9's failure to start with -unrestricted_guest=0/emulate_invalid_guest_state=1, I got it working with a -slightly older tree than kvm.git. I now debugged the remaining failure, -which was introduced by commit 660696d1 (KVM: X86 emulator: fix -source operand decoding for 8bit mov[zs]x instructions, 2013-04-24) -introduced a similar mis-emulation to the one in commit 8acb4207 (KVM: -fix sil/dil/bpl/spl in the mod/rm fields, 2013-05-30). The incorrect -decoding occurs in 8-bit movzx/movsx instructions whose 8-bit operand -is sil/dil/bpl/spl. - -Needless to say, "movzbl %bpl, %eax" does occur in RHEL5.9's decompression -prolog, just a handful of instructions before finally giving control to -the decompressed vmlinux and getting out of the invalid guest state. - -Because OpMem8 bypasses decode_modrm, the same handling of the REX prefix -must be applied to OpMem8. - -Reported-by: Michele Baldessari -Cc: stable@vger.kernel.org -Cc: Gleb Natapov -Signed-off-by: Paolo Bonzini -Signed-off-by: Gleb Natapov ---- - arch/x86/kvm/emulate.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c -index 16c037e..282d28c 100644 ---- a/arch/x86/kvm/emulate.c -+++ b/arch/x86/kvm/emulate.c -@@ -4117,7 +4117,10 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, - case OpMem8: - ctxt->memop.bytes = 1; - if (ctxt->memop.type == OP_REG) { -- ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm, 1); -+ int highbyte_regs = ctxt->rex_prefix == 0; -+ -+ ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm, -+ highbyte_regs); - fetch_register_operand(&ctxt->memop); - } - goto mem_common; --- -1.8.3.1 - diff --git a/alps-Support-for-Dell-XT2-model.patch b/alps-Support-for-Dell-XT2-model.patch deleted file mode 100644 index 453a6983a..000000000 --- a/alps-Support-for-Dell-XT2-model.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7673be51f16e978a438bca8ac1bf9e939b7ed7a6 Mon Sep 17 00:00:00 2001 -From: Yunkang Tang -Date: Thu, 24 Oct 2013 13:39:08 +0800 -Subject: [PATCH] Support for Dell XT2 model - -Signed-off-by: Yunkang Tang ---- - drivers/input/mouse/alps.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index ca7a26f..24b3626 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -103,6 +103,7 @@ static const struct alps_model_info alps_model_data[] = { - /* Dell Latitude E5500, E6400, E6500, Precision M4400 */ - { { 0x62, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, - ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, -+ { { 0x73, 0x00, 0x14 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_DUALPOINT }, /* Dell XT2 */ - { { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ - { { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff, - ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ --- -1.8.1.2 - diff --git a/am335x-bone.patch b/am335x-bone.patch deleted file mode 100644 index 4e12673ff..000000000 --- a/am335x-bone.patch +++ /dev/null @@ -1,2580 +0,0 @@ - .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 26 +- - .../devicetree/bindings/reset/gpio-reset.txt | 35 +++ - arch/arm/boot/dts/Makefile | 3 +- - arch/arm/boot/dts/am335x-bone.dts | 7 + - arch/arm/boot/dts/am335x-boneblack.dts | 285 ++++++++++++++++++++ - arch/arm/boot/dts/am335x-evm.dts | 7 + - arch/arm/boot/dts/am335x-evmsk.dts | 7 + - arch/arm/boot/dts/am33xx.dtsi | 60 +++++ - arch/arm/common/edma.c | 31 ++- - arch/arm/mach-davinci/da830.c | 8 +- - arch/arm/mach-davinci/da850.c | 8 +- - arch/arm/mach-davinci/devices-da8xx.c | 42 ++- - arch/arm/mach-davinci/devices-tnetv107x.c | 37 ++- - arch/arm/mach-davinci/dm355.c | 52 +++- - arch/arm/mach-davinci/dm365.c | 38 ++- - arch/arm/mach-davinci/dm644x.c | 52 +++- - arch/arm/mach-davinci/dm646x.c | 52 +++- - arch/arm/mach-davinci/include/mach/da8xx.h | 2 +- - arch/arm/mach-davinci/include/mach/tnetv107x.h | 2 +- - arch/arm/mach-davinci/serial.c | 19 +- - arch/arm/mach-davinci/tnetv107x.c | 8 +- - arch/arm/mach-omap2/Makefile | 3 + - arch/arm/mach-omap2/am33xx-cpsw.c | 94 +++++++ - arch/arm/mach-omap2/control.h | 4 + - drivers/dma/edma.c | 299 ++++++++++++++++----- - drivers/mmc/host/omap_hsmmc.c | 178 +++++++++--- - drivers/reset/Kconfig | 11 + - drivers/reset/Makefile | 1 + - drivers/reset/gpio-reset.c | 169 ++++++++++++ - include/linux/dmaengine.h | 39 +++ - include/linux/platform_data/mmc-omap.h | 3 + - sound/soc/soc-dmaengine-pcm.c | 22 ++ - 32 files changed, 1409 insertions(+), 195 deletions(-) - -diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt -index ed271fc..8c8908a 100644 ---- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt -+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt -@@ -20,8 +20,29 @@ ti,dual-volt: boolean, supports dual voltage cards - ti,non-removable: non-removable slot (like eMMC) - ti,needs-special-reset: Requires a special softreset sequence - ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed -+dmas: List of DMA specifiers with the controller specific format -+as described in the generic DMA client binding. A tx and rx -+specifier is required. -+dma-names: List of DMA request names. These strings correspond -+1:1 with the DMA specifiers listed in dmas. The string naming is -+to be "rx" and "tx" for RX and TX DMA requests, respectively. -+ -+Examples: -+ -+[hwmod populated DMA resources] -+ -+ mmc1: mmc@0x4809c000 { -+ compatible = "ti,omap4-hsmmc"; -+ reg = <0x4809c000 0x400>; -+ ti,hwmods = "mmc1"; -+ ti,dual-volt; -+ bus-width = <4>; -+ vmmc-supply = <&vmmc>; /* phandle to regulator node */ -+ ti,non-removable; -+ }; -+ -+[generic DMA request binding] - --Example: - mmc1: mmc@0x4809c000 { - compatible = "ti,omap4-hsmmc"; - reg = <0x4809c000 0x400>; -@@ -30,4 +51,7 @@ Example: - bus-width = <4>; - vmmc-supply = <&vmmc>; /* phandle to regulator node */ - ti,non-removable; -+ dmas = <&edma 24 -+ &edma 25>; -+ dma-names = "tx", "rx"; - }; -diff --git a/Documentation/devicetree/bindings/reset/gpio-reset.txt b/Documentation/devicetree/bindings/reset/gpio-reset.txt -new file mode 100644 -index 0000000..bca5348 ---- /dev/null -+++ b/Documentation/devicetree/bindings/reset/gpio-reset.txt -@@ -0,0 +1,35 @@ -+GPIO reset controller -+===================== -+ -+A GPIO reset controller controls a single GPIO that is connected to the reset -+pin of a peripheral IC. Please also refer to reset.txt in this directory for -+common reset controller binding usage. -+ -+Required properties: -+- compatible: Should be "gpio-reset" -+- reset-gpios: A gpio used as reset line. The gpio specifier for this property -+ depends on the gpio controller that provides the gpio. -+- #reset-cells: 0, see below -+ -+Optional properties: -+- reset-delay-us: delay in microseconds. The gpio reset line will be asserted for -+ this duration to reset. -+- initially-in-reset: boolean. If not set, the initial state should be a -+ deasserted reset line. If this property exists, the -+ reset line should be kept in reset. -+ -+example: -+ -+sii902x_reset: gpio-reset { -+ compatible = "gpio-reset"; -+ reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; -+ reset-delay-us = <10000>; -+ initially-in-reset; -+ #reset-cells = <0>; -+}; -+ -+/* Device with nRESET pin connected to GPIO5_0 */ -+sii902x@39 { -+ /* ... */ -+ resets = <&sii902x_reset>; /* active-low GPIO5_0, 10 ms delay */ -+}; -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 641b3c9..1b60731 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -173,7 +173,8 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ - am335x-bone.dtb \ - am3517-evm.dtb \ - am3517_mt_ventoux.dtb \ -- am43x-epos-evm.dtb -+ am43x-epos-evm.dtb \ -+ am335x-boneblack.dtb - dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb - dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb - dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \ -diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts -index 444b4ed..b8debea 100644 ---- a/arch/arm/boot/dts/am335x-bone.dts -+++ b/arch/arm/boot/dts/am335x-bone.dts -@@ -203,6 +203,8 @@ - }; - - ldo3_reg: regulator@5 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - -@@ -234,3 +236,8 @@ - pinctrl-0 = <&davinci_mdio_default>; - pinctrl-1 = <&davinci_mdio_sleep>; - }; -+ -+&mmc1 { -+ status = "okay"; -+ vmmc-supply = <&ldo3_reg>; -+}; -diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -new file mode 100644 -index 0000000..75a924d ---- /dev/null -+++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -0,0 +1,285 @@ -+/* -+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.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. -+ */ -+/dts-v1/; -+ -+#include "am33xx.dtsi" -+ -+/ { -+ model = "TI AM335x BeagleBone"; -+ compatible = "ti,am335x-bone", "ti,am33xx"; -+ -+ cpus { -+ cpu@0 { -+ cpu0-supply = <&dcdc2_reg>; -+ -+ /* -+ * To consider voltage drop between PMIC and SoC, -+ * tolerance value is reduced to 2% from 4% and -+ * voltage value is increased as a precaution. -+ */ -+ operating-points = < -+ /* kHz uV */ -+ 1000000 1350000 -+ 800000 1300000 -+ 600000 1112000 -+ 300000 969000 -+ >; -+ }; -+ }; -+ -+ memory { -+ device_type = "memory"; -+ reg = <0x80000000 0x20000000>; /* 512 MB */ -+ }; -+ -+ am33xx_pinmux: pinmux@44e10800 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&clkout2_pin>; -+ -+ user_leds_s0: user_leds_s0 { -+ pinctrl-single,pins = < -+ 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ -+ 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ -+ 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ -+ 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ -+ >; -+ }; -+ -+ i2c0_pins: pinmux_i2c0_pins { -+ pinctrl-single,pins = < -+ 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ -+ 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ -+ >; -+ }; -+ -+ uart0_pins: pinmux_uart0_pins { -+ pinctrl-single,pins = < -+ 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ -+ 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ -+ >; -+ }; -+ -+ clkout2_pin: pinmux_clkout2_pin { -+ pinctrl-single,pins = < -+ 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ -+ >; -+ }; -+ -+ cpsw_default: cpsw_default { -+ pinctrl-single,pins = < -+ /* Slave 1 */ -+ 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ -+ 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ -+ 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ -+ 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ -+ 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ -+ 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ -+ 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ -+ 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ -+ 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ -+ 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ -+ 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ -+ 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ -+ 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ -+ >; -+ }; -+ -+ cpsw_sleep: cpsw_sleep { -+ pinctrl-single,pins = < -+ /* Slave 1 reset value */ -+ 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ >; -+ }; -+ -+ davinci_mdio_default: davinci_mdio_default { -+ pinctrl-single,pins = < -+ /* MDIO */ -+ 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ -+ 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ -+ >; -+ }; -+ -+ davinci_mdio_sleep: davinci_mdio_sleep { -+ pinctrl-single,pins = < -+ /* MDIO reset value */ -+ 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) -+ >; -+ }; -+ -+ emmc_pins: pinmux_emmc_pins { -+ pinctrl-single,pins = < -+ 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ -+ 0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ -+ 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ -+ 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ -+ 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ -+ 0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ -+ 0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ -+ 0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ -+ 0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ -+ 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ -+ /* eMMC_RSTn */ -+ 0x50 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a4.gpio1_20 */ -+ >; -+ }; -+ }; -+ -+ ocp { -+ uart0: serial@44e09000 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins>; -+ -+ status = "okay"; -+ }; -+ -+ i2c0: i2c@44e0b000 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ -+ status = "okay"; -+ clock-frequency = <400000>; -+ -+ tps: tps@24 { -+ reg = <0x24>; -+ }; -+ -+ }; -+ }; -+ -+ leds { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&user_leds_s0>; -+ -+ compatible = "gpio-leds"; -+ -+ led@2 { -+ label = "beaglebone:blue:heartbeat"; -+ gpios = <&gpio1 21 0>; -+ linux,default-trigger = "heartbeat"; -+ default-state = "off"; -+ }; -+ -+ led@3 { -+ label = "beaglebone:blue:mmc0"; -+ gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "mmc0"; -+ default-state = "off"; -+ }; -+ -+ led@4 { -+ label = "beaglebone:blue:usr2"; -+ gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; -+ default-state = "off"; -+ }; -+ -+ led@5 { -+ label = "beaglebone:blue:usr3"; -+ gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; -+ default-state = "off"; -+ }; -+ }; -+ -+ vmmcsd_fixed: fixedregulator@0 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vmmcsd_fixed"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ -+}; -+ -+/include/ "tps65217.dtsi" -+ -+&tps { -+ regulators { -+ dcdc1_reg: regulator@0 { -+ regulator-always-on; -+ }; -+ -+ dcdc2_reg: regulator@1 { -+ /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ -+ regulator-name = "vdd_mpu"; -+ regulator-min-microvolt = <925000>; -+ regulator-max-microvolt = <1325000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ dcdc3_reg: regulator@2 { -+ /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ -+ regulator-name = "vdd_core"; -+ regulator-min-microvolt = <925000>; -+ regulator-max-microvolt = <1150000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ ldo1_reg: regulator@3 { -+ regulator-always-on; -+ }; -+ -+ ldo2_reg: regulator@4 { -+ regulator-always-on; -+ }; -+ -+ ldo3_reg: regulator@5 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; /* orig 3.3V*/ -+ regulator-always-on; -+ }; -+ -+ ldo4_reg: regulator@6 { -+ regulator-always-on; -+ }; -+ }; -+}; -+ -+&cpsw_emac0 { -+ phy_id = <&davinci_mdio>, <0>; -+}; -+ -+&cpsw_emac1 { -+ phy_id = <&davinci_mdio>, <1>; -+}; -+ -+&mac { -+ pinctrl-names = "default", "sleep"; -+ pinctrl-0 = <&cpsw_default>; -+ pinctrl-1 = <&cpsw_sleep>; -+}; -+ -+&mmc1 { -+ status = "okay"; -+ vmmc-supply = <&vmmcsd_fixed>; -+ ti,vcc-aux-disable-is-sleep; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emmc_pins>; -+ vmmc-supply = <&ldo3_reg>; -+ bus-width = <8>; -+ ti,non-removable; -+ status = "okay"; -+ ti,vcc-aux-disable-is-sleep; -+ -+ reset-gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>; -+}; -diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts -index 3aee1a4..44e69d9 100644 ---- a/arch/arm/boot/dts/am335x-evm.dts -+++ b/arch/arm/boot/dts/am335x-evm.dts -@@ -448,6 +448,8 @@ - }; - - vmmc_reg: regulator@12 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - }; -@@ -488,3 +490,8 @@ - ti,adc-channels = <4 5 6 7>; - }; - }; -+ -+&mmc1 { -+ status = "okay"; -+ vmmc-supply = <&vmmc_reg>; -+}; -diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts -index 0c8ad17..4e355d6 100644 ---- a/arch/arm/boot/dts/am335x-evmsk.dts -+++ b/arch/arm/boot/dts/am335x-evmsk.dts -@@ -376,6 +376,8 @@ - }; - - vmmc_reg: regulator@12 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - }; -@@ -402,3 +404,8 @@ - phy_id = <&davinci_mdio>, <1>; - phy-mode = "rgmii-txid"; - }; -+ -+&mmc1 { -+ status = "okay"; -+ vmmc-supply = <&vmmc_reg>; -+}; -diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 38b446b..969c81b 100644 ---- a/arch/arm/boot/dts/am33xx.dtsi -+++ b/arch/arm/boot/dts/am33xx.dtsi -@@ -96,6 +96,18 @@ - reg = <0x48200000 0x1000>; - }; - -+ edma: edma@49000000 { -+ compatible = "ti,edma3"; -+ ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; -+ reg = <0x49000000 0x10000>, -+ <0x44e10f90 0x10>; -+ interrupts = <12 13 14>; -+ #dma-cells = <1>; -+ dma-channels = <64>; -+ ti,edma-regions = <4>; -+ ti,edma-slots = <256>; -+ }; -+ - gpio0: gpio@44e07000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio1"; -@@ -224,6 +236,44 @@ - status = "disabled"; - }; - -+ mmc1: mmc@48060000 { -+ compatible = "ti,omap4-hsmmc"; -+ ti,hwmods = "mmc1"; -+ ti,dual-volt; -+ ti,needs-special-reset; -+ ti,needs-special-hs-handling; -+ dmas = <&edma 24 -+ &edma 25>; -+ dma-names = "tx", "rx"; -+ interrupts = <64>; -+ interrupt-parent = <&intc>; -+ reg = <0x48060000 0x1000>; -+ status = "disabled"; -+ }; -+ -+ mmc2: mmc@481d8000 { -+ compatible = "ti,omap4-hsmmc"; -+ ti,hwmods = "mmc2"; -+ ti,needs-special-reset; -+ dmas = <&edma 2 -+ &edma 3>; -+ dma-names = "tx", "rx"; -+ interrupts = <28>; -+ interrupt-parent = <&intc>; -+ reg = <0x481d8000 0x1000>; -+ status = "disabled"; -+ }; -+ -+ mmc3: mmc@47810000 { -+ compatible = "ti,omap4-hsmmc"; -+ ti,hwmods = "mmc3"; -+ ti,needs-special-reset; -+ interrupts = <29>; -+ interrupt-parent = <&intc>; -+ reg = <0x47810000 0x1000>; -+ status = "disabled"; -+ }; -+ - wdt2: wdt@44e35000 { - compatible = "ti,omap3-wdt"; - ti,hwmods = "wd_timer2"; -@@ -319,6 +369,11 @@ - interrupts = <65>; - ti,spi-num-cs = <2>; - ti,hwmods = "spi0"; -+ dmas = <&edma 16 -+ &edma 17 -+ &edma 18 -+ &edma 19>; -+ dma-names = "tx0", "rx0", "tx1", "rx1"; - status = "disabled"; - }; - -@@ -330,6 +385,11 @@ - interrupts = <125>; - ti,spi-num-cs = <2>; - ti,hwmods = "spi1"; -+ dmas = <&edma 42 -+ &edma 43 -+ &edma 44 -+ &edma 45>; -+ dma-names = "tx0", "rx0", "tx1", "rx1"; - status = "disabled"; - }; - -diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c -index 39ad030..18159d7 100644 ---- a/arch/arm/common/edma.c -+++ b/arch/arm/common/edma.c -@@ -560,14 +560,29 @@ static int reserve_contiguous_slots(int ctlr, unsigned int id, - static int prepare_unused_channel_list(struct device *dev, void *data) - { - struct platform_device *pdev = to_platform_device(dev); -- int i, ctlr; -- -- for (i = 0; i < pdev->num_resources; i++) { -- if ((pdev->resource[i].flags & IORESOURCE_DMA) && -- (int)pdev->resource[i].start >= 0) { -- ctlr = EDMA_CTLR(pdev->resource[i].start); -- clear_bit(EDMA_CHAN_SLOT(pdev->resource[i].start), -- edma_cc[ctlr]->edma_unused); -+ int i = 0, ctlr; -+ u32 dma_chan; -+ __be32 *dma_chan_p; -+ struct property *prop; -+ -+ if (dev->of_node) { -+ of_property_for_each_u32(dev->of_node, "dmas", prop, \ -+ dma_chan_p, dma_chan) { -+ if (i++ & 1) { -+ ctlr = EDMA_CTLR(dma_chan); -+ clear_bit(EDMA_CHAN_SLOT(dma_chan), -+ edma_cc[ctlr]->edma_unused); -+ } -+ } -+ } else { -+ for (; i < pdev->num_resources; i++) { -+ if ((pdev->resource[i].flags & IORESOURCE_DMA) && -+ (int)pdev->resource[i].start >= 0) { -+ ctlr = EDMA_CTLR(pdev->resource[i].start); -+ clear_bit(EDMA_CHAN_SLOT( -+ pdev->resource[i].start), -+ edma_cc[ctlr]->edma_unused); -+ } - } - } - -diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c -index abbaf02..a3ffd52 100644 ---- a/arch/arm/mach-davinci/da830.c -+++ b/arch/arm/mach-davinci/da830.c -@@ -395,9 +395,9 @@ static struct clk_lookup da830_clks[] = { - CLK(NULL, "tptc0", &tptc0_clk), - CLK(NULL, "tptc1", &tptc1_clk), - CLK("da830-mmc.0", NULL, &mmcsd_clk), -- CLK(NULL, "uart0", &uart0_clk), -- CLK(NULL, "uart1", &uart1_clk), -- CLK(NULL, "uart2", &uart2_clk), -+ CLK("serial8250.0", NULL, &uart0_clk), -+ CLK("serial8250.1", NULL, &uart1_clk), -+ CLK("serial8250.2", NULL, &uart2_clk), - CLK("spi_davinci.0", NULL, &spi0_clk), - CLK("spi_davinci.1", NULL, &spi1_clk), - CLK(NULL, "ecap0", &ecap0_clk), -@@ -1199,7 +1199,7 @@ static struct davinci_soc_info davinci_soc_info_da830 = { - .gpio_base = DA8XX_GPIO_BASE, - .gpio_num = 128, - .gpio_irq = IRQ_DA8XX_GPIO0, -- .serial_dev = &da8xx_serial_device, -+ .serial_dev = da8xx_serial_device, - .emac_pdata = &da8xx_emac_pdata, - }; - -diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c -index a0d4f60..d4274ab 100644 ---- a/arch/arm/mach-davinci/da850.c -+++ b/arch/arm/mach-davinci/da850.c -@@ -451,9 +451,9 @@ static struct clk_lookup da850_clks[] = { - CLK(NULL, "tpcc1", &tpcc1_clk), - CLK(NULL, "tptc2", &tptc2_clk), - CLK("pruss_uio", "pruss", &pruss_clk), -- CLK(NULL, "uart0", &uart0_clk), -- CLK(NULL, "uart1", &uart1_clk), -- CLK(NULL, "uart2", &uart2_clk), -+ CLK("serial8250.0", NULL, &uart0_clk), -+ CLK("serial8250.1", NULL, &uart1_clk), -+ CLK("serial8250.2", NULL, &uart2_clk), - CLK(NULL, "aintc", &aintc_clk), - CLK(NULL, "gpio", &gpio_clk), - CLK("i2c_davinci.2", NULL, &i2c1_clk), -@@ -1301,7 +1301,7 @@ static struct davinci_soc_info davinci_soc_info_da850 = { - .gpio_base = DA8XX_GPIO_BASE, - .gpio_num = 144, - .gpio_irq = IRQ_DA8XX_GPIO0, -- .serial_dev = &da8xx_serial_device, -+ .serial_dev = da8xx_serial_device, - .emac_pdata = &da8xx_emac_pdata, - .sram_dma = DA8XX_SHARED_RAM_BASE, - .sram_len = SZ_128K, -diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c -index 71a46a3..280f67d 100644 ---- a/arch/arm/mach-davinci/devices-da8xx.c -+++ b/arch/arm/mach-davinci/devices-da8xx.c -@@ -68,7 +68,7 @@ - void __iomem *da8xx_syscfg0_base; - void __iomem *da8xx_syscfg1_base; - --static struct plat_serial8250_port da8xx_serial_pdata[] = { -+static struct plat_serial8250_port da8xx_serial0_pdata[] = { - { - .mapbase = DA8XX_UART0_BASE, - .irq = IRQ_DA8XX_UARTINT0, -@@ -78,6 +78,11 @@ static struct plat_serial8250_port da8xx_serial_pdata[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port da8xx_serial1_pdata[] = { -+ { - .mapbase = DA8XX_UART1_BASE, - .irq = IRQ_DA8XX_UARTINT1, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -86,6 +91,11 @@ static struct plat_serial8250_port da8xx_serial_pdata[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port da8xx_serial2_pdata[] = { -+ { - .mapbase = DA8XX_UART2_BASE, - .irq = IRQ_DA8XX_UARTINT2, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -95,15 +105,33 @@ static struct plat_serial8250_port da8xx_serial_pdata[] = { - }, - { - .flags = 0, -- }, -+ } - }; - --struct platform_device da8xx_serial_device = { -- .name = "serial8250", -- .id = PLAT8250_DEV_PLATFORM, -- .dev = { -- .platform_data = da8xx_serial_pdata, -+struct platform_device da8xx_serial_device[] = { -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM, -+ .dev = { -+ .platform_data = da8xx_serial0_pdata, -+ } -+ }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM1, -+ .dev = { -+ .platform_data = da8xx_serial1_pdata, -+ } - }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM2, -+ .dev = { -+ .platform_data = da8xx_serial2_pdata, -+ } -+ }, -+ { -+ } - }; - - static s8 da8xx_queue_tc_mapping[][2] = { -diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c -index 128cb9a..fc4a0fe 100644 ---- a/arch/arm/mach-davinci/devices-tnetv107x.c -+++ b/arch/arm/mach-davinci/devices-tnetv107x.c -@@ -126,7 +126,7 @@ static struct platform_device edma_device = { - .dev.platform_data = tnetv107x_edma_info, - }; - --static struct plat_serial8250_port serial_data[] = { -+static struct plat_serial8250_port serial0_platform_data[] = { - { - .mapbase = TNETV107X_UART0_BASE, - .irq = IRQ_TNETV107X_UART0, -@@ -137,6 +137,11 @@ static struct plat_serial8250_port serial_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port serial1_platform_data[] = { -+ { - .mapbase = TNETV107X_UART1_BASE, - .irq = IRQ_TNETV107X_UART1, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -146,6 +151,11 @@ static struct plat_serial8250_port serial_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port serial2_platform_data[] = { -+ { - .mapbase = TNETV107X_UART2_BASE, - .irq = IRQ_TNETV107X_UART2, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -156,13 +166,28 @@ static struct plat_serial8250_port serial_data[] = { - }, - { - .flags = 0, -- }, -+ } - }; - --struct platform_device tnetv107x_serial_device = { -- .name = "serial8250", -- .id = PLAT8250_DEV_PLATFORM, -- .dev.platform_data = serial_data, -+ -+struct platform_device tnetv107x_serial_device[] = { -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM, -+ .dev.platform_data = serial0_platform_data, -+ }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM1, -+ .dev.platform_data = serial1_platform_data, -+ }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM2, -+ .dev.platform_data = serial2_platform_data, -+ }, -+ { -+ } - }; - - static struct resource mmc0_resources[] = { -diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c -index 86100d1..1701a2d 100644 ---- a/arch/arm/mach-davinci/dm355.c -+++ b/arch/arm/mach-davinci/dm355.c -@@ -357,9 +357,9 @@ static struct clk_lookup dm355_clks[] = { - CLK(NULL, "clkout3", &clkout3_clk), - CLK(NULL, "arm", &arm_clk), - CLK(NULL, "mjcp", &mjcp_clk), -- CLK(NULL, "uart0", &uart0_clk), -- CLK(NULL, "uart1", &uart1_clk), -- CLK(NULL, "uart2", &uart2_clk), -+ CLK("serial8250.0", NULL, &uart0_clk), -+ CLK("serial8250.1", NULL, &uart1_clk), -+ CLK("serial8250.2", NULL, &uart2_clk), - CLK("i2c_davinci.1", NULL, &i2c_clk), - CLK("davinci-mcbsp.0", NULL, &asp0_clk), - CLK("davinci-mcbsp.1", NULL, &asp1_clk), -@@ -922,7 +922,7 @@ static struct davinci_timer_info dm355_timer_info = { - .clocksource_id = T0_TOP, - }; - --static struct plat_serial8250_port dm355_serial_platform_data[] = { -+static struct plat_serial8250_port dm355_serial0_platform_data[] = { - { - .mapbase = DAVINCI_UART0_BASE, - .irq = IRQ_UARTINT0, -@@ -932,6 +932,11 @@ static struct plat_serial8250_port dm355_serial_platform_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port dm355_serial1_platform_data[] = { -+ { - .mapbase = DAVINCI_UART1_BASE, - .irq = IRQ_UARTINT1, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -940,6 +945,11 @@ static struct plat_serial8250_port dm355_serial_platform_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port dm355_serial2_platform_data[] = { -+ { - .mapbase = DM355_UART2_BASE, - .irq = IRQ_DM355_UARTINT2, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -948,16 +958,34 @@ static struct plat_serial8250_port dm355_serial_platform_data[] = { - .regshift = 2, - }, - { -- .flags = 0 -- }, -+ .flags = 0, -+ } - }; - --static struct platform_device dm355_serial_device = { -- .name = "serial8250", -- .id = PLAT8250_DEV_PLATFORM, -- .dev = { -- .platform_data = dm355_serial_platform_data, -+static struct platform_device dm355_serial_device[] = { -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM, -+ .dev = { -+ .platform_data = dm355_serial0_platform_data, -+ } -+ }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM1, -+ .dev = { -+ .platform_data = dm355_serial1_platform_data, -+ } - }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM2, -+ .dev = { -+ .platform_data = dm355_serial2_platform_data, -+ } -+ }, -+ { -+ } - }; - - static struct davinci_soc_info davinci_soc_info_dm355 = { -@@ -981,7 +1009,7 @@ static struct davinci_soc_info davinci_soc_info_dm355 = { - .gpio_base = DAVINCI_GPIO_BASE, - .gpio_num = 104, - .gpio_irq = IRQ_DM355_GPIOBNK0, -- .serial_dev = &dm355_serial_device, -+ .serial_dev = dm355_serial_device, - .sram_dma = 0x00010000, - .sram_len = SZ_32K, - }; -diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c -index dad2802..5b3a1bc 100644 ---- a/arch/arm/mach-davinci/dm365.c -+++ b/arch/arm/mach-davinci/dm365.c -@@ -455,8 +455,8 @@ static struct clk_lookup dm365_clks[] = { - CLK("vpss", "master", &vpss_master_clk), - CLK("vpss", "slave", &vpss_slave_clk), - CLK(NULL, "arm", &arm_clk), -- CLK(NULL, "uart0", &uart0_clk), -- CLK(NULL, "uart1", &uart1_clk), -+ CLK("serial8250.0", NULL, &uart0_clk), -+ CLK("serial8250.1", NULL, &uart1_clk), - CLK("i2c_davinci.1", NULL, &i2c_clk), - CLK("da830-mmc.0", NULL, &mmcsd0_clk), - CLK("da830-mmc.1", NULL, &mmcsd1_clk), -@@ -1041,7 +1041,7 @@ static struct davinci_timer_info dm365_timer_info = { - - #define DM365_UART1_BASE (IO_PHYS + 0x106000) - --static struct plat_serial8250_port dm365_serial_platform_data[] = { -+static struct plat_serial8250_port dm365_serial0_platform_data[] = { - { - .mapbase = DAVINCI_UART0_BASE, - .irq = IRQ_UARTINT0, -@@ -1051,6 +1051,11 @@ static struct plat_serial8250_port dm365_serial_platform_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port dm365_serial1_platform_data[] = { -+ { - .mapbase = DM365_UART1_BASE, - .irq = IRQ_UARTINT1, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -1059,16 +1064,27 @@ static struct plat_serial8250_port dm365_serial_platform_data[] = { - .regshift = 2, - }, - { -- .flags = 0 -- }, -+ .flags = 0, -+ } - }; - --static struct platform_device dm365_serial_device = { -- .name = "serial8250", -- .id = PLAT8250_DEV_PLATFORM, -- .dev = { -- .platform_data = dm365_serial_platform_data, -+static struct platform_device dm365_serial_device[] = { -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM, -+ .dev = { -+ .platform_data = dm365_serial0_platform_data, -+ } -+ }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM1, -+ .dev = { -+ .platform_data = dm365_serial1_platform_data, -+ } - }, -+ { -+ } - }; - - static struct davinci_soc_info davinci_soc_info_dm365 = { -@@ -1093,7 +1109,7 @@ static struct davinci_soc_info davinci_soc_info_dm365 = { - .gpio_num = 104, - .gpio_irq = IRQ_DM365_GPIO0, - .gpio_unbanked = 8, /* really 16 ... skip muxed GPIOs */ -- .serial_dev = &dm365_serial_device, -+ .serial_dev = dm365_serial_device, - .emac_pdata = &dm365_emac_pdata, - .sram_dma = 0x00010000, - .sram_len = SZ_32K, -diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c -index a49d182..490eb8c 100644 ---- a/arch/arm/mach-davinci/dm644x.c -+++ b/arch/arm/mach-davinci/dm644x.c -@@ -303,9 +303,9 @@ static struct clk_lookup dm644x_clks[] = { - CLK("vpss", "master", &vpss_master_clk), - CLK("vpss", "slave", &vpss_slave_clk), - CLK(NULL, "arm", &arm_clk), -- CLK(NULL, "uart0", &uart0_clk), -- CLK(NULL, "uart1", &uart1_clk), -- CLK(NULL, "uart2", &uart2_clk), -+ CLK("serial8250.0", NULL, &uart0_clk), -+ CLK("serial8250.1", NULL, &uart1_clk), -+ CLK("serial8250.2", NULL, &uart2_clk), - CLK("davinci_emac.1", NULL, &emac_clk), - CLK("i2c_davinci.1", NULL, &i2c_clk), - CLK("palm_bk3710", NULL, &ide_clk), -@@ -813,7 +813,7 @@ static struct davinci_timer_info dm644x_timer_info = { - .clocksource_id = T0_TOP, - }; - --static struct plat_serial8250_port dm644x_serial_platform_data[] = { -+static struct plat_serial8250_port dm644x_serial0_platform_data[] = { - { - .mapbase = DAVINCI_UART0_BASE, - .irq = IRQ_UARTINT0, -@@ -823,6 +823,11 @@ static struct plat_serial8250_port dm644x_serial_platform_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port dm644x_serial1_platform_data[] = { -+ { - .mapbase = DAVINCI_UART1_BASE, - .irq = IRQ_UARTINT1, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -831,6 +836,11 @@ static struct plat_serial8250_port dm644x_serial_platform_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port dm644x_serial2_platform_data[] = { -+ { - .mapbase = DAVINCI_UART2_BASE, - .irq = IRQ_UARTINT2, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -839,16 +849,34 @@ static struct plat_serial8250_port dm644x_serial_platform_data[] = { - .regshift = 2, - }, - { -- .flags = 0 -- }, -+ .flags = 0, -+ } - }; - --static struct platform_device dm644x_serial_device = { -- .name = "serial8250", -- .id = PLAT8250_DEV_PLATFORM, -- .dev = { -- .platform_data = dm644x_serial_platform_data, -+static struct platform_device dm644x_serial_device[] = { -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM, -+ .dev = { -+ .platform_data = dm644x_serial0_platform_data, -+ } - }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM1, -+ .dev = { -+ .platform_data = dm644x_serial1_platform_data, -+ } -+ }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM2, -+ .dev = { -+ .platform_data = dm644x_serial2_platform_data, -+ } -+ }, -+ { -+ } - }; - - static struct davinci_soc_info davinci_soc_info_dm644x = { -@@ -872,7 +900,7 @@ static struct davinci_soc_info davinci_soc_info_dm644x = { - .gpio_base = DAVINCI_GPIO_BASE, - .gpio_num = 71, - .gpio_irq = IRQ_GPIOBNK0, -- .serial_dev = &dm644x_serial_device, -+ .serial_dev = dm644x_serial_device, - .emac_pdata = &dm644x_emac_pdata, - .sram_dma = 0x00008000, - .sram_len = SZ_16K, -diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c -index d1259e8..23609b1 100644 ---- a/arch/arm/mach-davinci/dm646x.c -+++ b/arch/arm/mach-davinci/dm646x.c -@@ -342,9 +342,9 @@ static struct clk_lookup dm646x_clks[] = { - CLK(NULL, "edma_tc1", &edma_tc1_clk), - CLK(NULL, "edma_tc2", &edma_tc2_clk), - CLK(NULL, "edma_tc3", &edma_tc3_clk), -- CLK(NULL, "uart0", &uart0_clk), -- CLK(NULL, "uart1", &uart1_clk), -- CLK(NULL, "uart2", &uart2_clk), -+ CLK("serial8250.0", NULL, &uart0_clk), -+ CLK("serial8250.1", NULL, &uart1_clk), -+ CLK("serial8250.2", NULL, &uart2_clk), - CLK("i2c_davinci.1", NULL, &i2c_clk), - CLK(NULL, "gpio", &gpio_clk), - CLK("davinci-mcasp.0", NULL, &mcasp0_clk), -@@ -790,7 +790,7 @@ static struct davinci_timer_info dm646x_timer_info = { - .clocksource_id = T0_TOP, - }; - --static struct plat_serial8250_port dm646x_serial_platform_data[] = { -+static struct plat_serial8250_port dm646x_serial0_platform_data[] = { - { - .mapbase = DAVINCI_UART0_BASE, - .irq = IRQ_UARTINT0, -@@ -800,6 +800,11 @@ static struct plat_serial8250_port dm646x_serial_platform_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port dm646x_serial1_platform_data[] = { -+ { - .mapbase = DAVINCI_UART1_BASE, - .irq = IRQ_UARTINT1, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -808,6 +813,11 @@ static struct plat_serial8250_port dm646x_serial_platform_data[] = { - .regshift = 2, - }, - { -+ .flags = 0, -+ } -+}; -+static struct plat_serial8250_port dm646x_serial2_platform_data[] = { -+ { - .mapbase = DAVINCI_UART2_BASE, - .irq = IRQ_DM646X_UARTINT2, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | -@@ -816,16 +826,34 @@ static struct plat_serial8250_port dm646x_serial_platform_data[] = { - .regshift = 2, - }, - { -- .flags = 0 -- }, -+ .flags = 0, -+ } - }; - --static struct platform_device dm646x_serial_device = { -- .name = "serial8250", -- .id = PLAT8250_DEV_PLATFORM, -- .dev = { -- .platform_data = dm646x_serial_platform_data, -+static struct platform_device dm646x_serial_device[] = { -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM, -+ .dev = { -+ .platform_data = dm646x_serial0_platform_data, -+ } -+ }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM1, -+ .dev = { -+ .platform_data = dm646x_serial1_platform_data, -+ } - }, -+ { -+ .name = "serial8250", -+ .id = PLAT8250_DEV_PLATFORM2, -+ .dev = { -+ .platform_data = dm646x_serial2_platform_data, -+ } -+ }, -+ { -+ } - }; - - static struct davinci_soc_info davinci_soc_info_dm646x = { -@@ -849,7 +877,7 @@ static struct davinci_soc_info davinci_soc_info_dm646x = { - .gpio_base = DAVINCI_GPIO_BASE, - .gpio_num = 43, /* Only 33 usable */ - .gpio_irq = IRQ_DM646X_GPIOBNK0, -- .serial_dev = &dm646x_serial_device, -+ .serial_dev = dm646x_serial_device, - .emac_pdata = &dm646x_emac_pdata, - .sram_dma = 0x10010000, - .sram_len = SZ_32K, -diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h -index 7b41a5e..aae5307 100644 ---- a/arch/arm/mach-davinci/include/mach/da8xx.h -+++ b/arch/arm/mach-davinci/include/mach/da8xx.h -@@ -111,7 +111,7 @@ void da8xx_restart(enum reboot_mode mode, const char *cmd); - void da8xx_rproc_reserve_cma(void); - int da8xx_register_rproc(void); - --extern struct platform_device da8xx_serial_device; -+extern struct platform_device da8xx_serial_device[]; - extern struct emac_platform_data da8xx_emac_pdata; - extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata; - extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata; -diff --git a/arch/arm/mach-davinci/include/mach/tnetv107x.h b/arch/arm/mach-davinci/include/mach/tnetv107x.h -index 16314c6..beb7c0e 100644 ---- a/arch/arm/mach-davinci/include/mach/tnetv107x.h -+++ b/arch/arm/mach-davinci/include/mach/tnetv107x.h -@@ -50,7 +50,7 @@ struct tnetv107x_device_info { - }; - - extern struct platform_device tnetv107x_wdt_device; --extern struct platform_device tnetv107x_serial_device; -+extern struct platform_device tnetv107x_serial_device[]; - - extern void tnetv107x_init(void); - extern void tnetv107x_devices_init(struct tnetv107x_device_info *); -diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c -index f262581..57e6150 100644 ---- a/arch/arm/mach-davinci/serial.c -+++ b/arch/arm/mach-davinci/serial.c -@@ -76,7 +76,7 @@ int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate) - char name[16]; - struct clk *clk; - struct davinci_soc_info *soc_info = &davinci_soc_info; -- struct device *dev = &soc_info->serial_dev->dev; -+ struct device *dev = &soc_info->serial_dev[instance].dev; - - sprintf(name, "uart%d", instance); - clk = clk_get(dev, name); -@@ -96,19 +96,25 @@ int __init davinci_serial_setup_clk(unsigned instance, unsigned int *rate) - - int __init davinci_serial_init(struct davinci_uart_config *info) - { -- int i, ret; -+ int i, ret = 0; - struct davinci_soc_info *soc_info = &davinci_soc_info; -- struct device *dev = &soc_info->serial_dev->dev; -- struct plat_serial8250_port *p = dev->platform_data; -+ struct device *dev; -+ struct plat_serial8250_port *p; - - /* - * Make sure the serial ports are muxed on at this point. - * You have to mux them off in device drivers later on if not needed. - */ -- for (i = 0; p->flags; i++, p++) { -+ for (i = 0; soc_info->serial_dev[i].dev.platform_data != NULL; i++) { -+ dev = &soc_info->serial_dev[i].dev; -+ p = dev->platform_data; - if (!(info->enabled_uarts & (1 << i))) - continue; - -+ ret = platform_device_register(&soc_info->serial_dev[i]); -+ if (ret) -+ continue; -+ - ret = davinci_serial_setup_clk(i, &p->uartclk); - if (ret) - continue; -@@ -125,6 +131,5 @@ int __init davinci_serial_init(struct davinci_uart_config *info) - if (p->membase && p->type != PORT_AR7) - davinci_serial_reset(p); - } -- -- return platform_device_register(soc_info->serial_dev); -+ return ret; - } -diff --git a/arch/arm/mach-davinci/tnetv107x.c b/arch/arm/mach-davinci/tnetv107x.c -index 4545667..f4d7fbb 100644 ---- a/arch/arm/mach-davinci/tnetv107x.c -+++ b/arch/arm/mach-davinci/tnetv107x.c -@@ -264,7 +264,7 @@ static struct clk_lookup clks[] = { - CLK(NULL, "clk_chipcfg", &clk_chipcfg), - CLK("tnetv107x-ts.0", NULL, &clk_tsc), - CLK(NULL, "clk_rom", &clk_rom), -- CLK(NULL, "uart2", &clk_uart2), -+ CLK("serial8250.2", NULL, &clk_uart2), - CLK(NULL, "clk_pktsec", &clk_pktsec), - CLK("tnetv107x-rng.0", NULL, &clk_rng), - CLK("tnetv107x-pka.0", NULL, &clk_pka), -@@ -274,8 +274,8 @@ static struct clk_lookup clks[] = { - CLK(NULL, "clk_gpio", &clk_gpio), - CLK(NULL, "clk_mdio", &clk_mdio), - CLK("dm6441-mmc.0", NULL, &clk_sdio0), -- CLK(NULL, "uart0", &clk_uart0), -- CLK(NULL, "uart1", &clk_uart1), -+ CLK("serial8250.0", NULL, &clk_uart0), -+ CLK("serial8250.1", NULL, &clk_uart1), - CLK(NULL, "timer0", &clk_timer0), - CLK(NULL, "timer1", &clk_timer1), - CLK("tnetv107x_wdt.0", NULL, &clk_wdt_arm), -@@ -757,7 +757,7 @@ static struct davinci_soc_info tnetv107x_soc_info = { - .gpio_type = GPIO_TYPE_TNETV107X, - .gpio_num = TNETV107X_N_GPIO, - .timer_info = &timer_info, -- .serial_dev = &tnetv107x_serial_device, -+ .serial_dev = tnetv107x_serial_device, - }; - - void __init tnetv107x_init(void) -diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile -index d4f6715..7c0ef46 100644 ---- a/arch/arm/mach-omap2/Makefile -+++ b/arch/arm/mach-omap2/Makefile -@@ -295,4 +295,7 @@ endif - emac-$(CONFIG_TI_DAVINCI_EMAC) := am35xx-emac.o - obj-y += $(emac-m) $(emac-y) - -+cpsw-$(CONFIG_TI_CPSW) := am33xx-cpsw.o -+obj-y += $(cpsw-m) $(cpsw-y) -+ - obj-y += common-board-devices.o twl-common.o dss-common.o -diff --git a/arch/arm/mach-omap2/am33xx-cpsw.c b/arch/arm/mach-omap2/am33xx-cpsw.c -new file mode 100644 -index 0000000..5a674d9 ---- /dev/null -+++ b/arch/arm/mach-omap2/am33xx-cpsw.c -@@ -0,0 +1,94 @@ -+/* -+ * am335x specific cpsw dt fixups -+ * -+ * 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 -+#include -+#include -+#include -+#include -+ -+#include "soc.h" -+#include "control.h" -+ -+/** -+ * am33xx_dt_cpsw_set_mac_from_efuse - Add mac-address property using -+ * ethernet hwaddr from efuse -+ * @np: Pointer to the cpsw slave to set mac address of -+ * @idx: Mac address index to use from efuse -+ */ -+static void am33xx_dt_cpsw_set_mac_from_efuse(struct device_node *np, int idx) -+{ -+ struct property *prop; -+ u32 lo, hi; -+ u8 *mac; -+ -+ switch (idx) { -+ case 0: -+ lo = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID0_LOW); -+ hi = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID0_HIGH); -+ break; -+ -+ case 1: -+ lo = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID1_LOW); -+ hi = omap_ctrl_readl(AM33XX_CONTROL_MAC_ID1_HIGH); -+ break; -+ -+ default: -+ pr_err("cpsw.%d: too many slaves found\n", idx); -+ return; -+ } -+ -+ prop = kzalloc(sizeof(*prop) + ETH_ALEN, GFP_KERNEL); -+ if (!prop) -+ return; -+ -+ prop->value = prop + 1; -+ prop->length = ETH_ALEN; -+ prop->name = kstrdup("mac-address", GFP_KERNEL); -+ if (!prop->name) { -+ kfree(prop); -+ return; -+ } -+ -+ mac = prop->value; -+ -+ mac[0] = hi; -+ mac[1] = hi >> 8; -+ mac[2] = hi >> 16; -+ mac[3] = hi >> 24; -+ mac[4] = lo; -+ mac[5] = lo >> 8; -+ -+ of_update_property(np, prop); -+ -+ pr_info("cpsw.%d: No hwaddr in dt. Using %pM from efuse\n", idx, mac); -+} -+ -+static int __init am33xx_dt_cpsw_mac_fixup(void) -+{ -+ struct device_node *np, *slave; -+ int idx = 0; -+ -+ if (!soc_is_am33xx()) -+ return -ENODEV; -+ -+ for_each_compatible_node(np, NULL, "ti,cpsw") -+ for_each_node_by_name(slave, "slave") { -+ if (!of_get_mac_address(slave)) -+ am33xx_dt_cpsw_set_mac_from_efuse(slave, idx); -+ idx++; -+ } -+ -+ return 0; -+} -+arch_initcall(am33xx_dt_cpsw_mac_fixup); -diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h -index f7d7c2e..5d684b7 100644 ---- a/arch/arm/mach-omap2/control.h -+++ b/arch/arm/mach-omap2/control.h -@@ -352,6 +352,10 @@ - /* AM33XX CONTROL_STATUS register */ - #define AM33XX_CONTROL_STATUS 0x040 - #define AM33XX_CONTROL_SEC_CLK_CTRL 0x1bc -+#define AM33XX_CONTROL_MAC_ID0_LOW 0x630 -+#define AM33XX_CONTROL_MAC_ID0_HIGH 0x634 -+#define AM33XX_CONTROL_MAC_ID1_LOW 0x638 -+#define AM33XX_CONTROL_MAC_ID1_HIGH 0x63c - - /* AM33XX CONTROL_STATUS bitfields (partial) */ - #define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT 22 -diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c -index 5f3e532..cec9a12 100644 ---- a/drivers/dma/edma.c -+++ b/drivers/dma/edma.c -@@ -70,6 +70,7 @@ struct edma_chan { - bool alloced; - int slot[EDMA_MAX_SLOTS]; - struct dma_slave_config cfg; -+ struct dma_slave_sg_limits sg_limits; - }; - - struct edma_cc { -@@ -210,6 +211,198 @@ static int edma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, - return ret; - } - -+/* -+ * A clean implementation of a PaRAM set configuration abstraction -+ * @chan: Channel who's PaRAM set we're configuring -+ * @src_addr: Source address of the DMA -+ * @dst_addr: Destination address of the DMA -+ * @burst: In units of dev_width, how much to send -+ * @dev_width: How much is the dev_width -+ * @dma_length: Total length of the DMA transfer -+ * @direction: Direction of the transfer -+ */ -+static int edma_config_pset(struct dma_chan *chan, struct edmacc_param *pset, -+ dma_addr_t src_addr, dma_addr_t dst_addr, u32 burst, -+ enum dma_slave_buswidth dev_width, unsigned int dma_length, -+ enum dma_transfer_direction direction) -+{ -+ struct edma_chan *echan = to_edma_chan(chan); -+ struct device *dev = chan->device->dev; -+ int acnt, bcnt, ccnt, cidx; -+ int src_bidx, dst_bidx, src_cidx, dst_cidx; -+ int absync; -+ -+ acnt = dev_width; -+ /* -+ * If the maxburst is equal to the fifo width, use -+ * A-synced transfers. This allows for large contiguous -+ * buffer transfers using only one PaRAM set. -+ */ -+ if (burst == 1) { -+ absync = false; -+ /* -+ * For the A-sync case, bcnt and ccnt are the remainder -+ * and quotient respectively of the division of: -+ * (dma_length / acnt) by (SZ_64K -1). This is so -+ * that in case bcnt over flows, we have ccnt to use. -+ * Note: In A-sync tranfer only, bcntrld is used, but it -+ * only applies for sg_dma_len(sg) >= SZ_64K. -+ * In this case, the best way adopted is- bccnt for the -+ * first frame will be the remainder below. Then for -+ * every successive frame, bcnt will be SZ_64K-1. This -+ * is assured as bcntrld = 0xffff in end of function. -+ */ -+ ccnt = dma_length / acnt / (SZ_64K - 1); -+ bcnt = dma_length / acnt - ccnt * (SZ_64K - 1); -+ /* -+ * If bcnt is non-zero, we have a remainder and hence an -+ * extra frame to transfer, so increment ccnt. -+ */ -+ if (bcnt) -+ ccnt++; -+ else -+ bcnt = SZ_64K - 1; -+ cidx = acnt; -+ /* -+ * If maxburst is greater than the fifo address_width, -+ * use AB-synced transfers where A count is the fifo -+ * address_width and B count is the maxburst. In this -+ * case, we are limited to transfers of C count frames -+ * of (address_width * maxburst) where C count is limited -+ * to SZ_64K-1. This places an upper bound on the length -+ * of an SG segment that can be handled. -+ */ -+ } else { -+ absync = true; -+ bcnt = burst; -+ ccnt = dma_length / (acnt * bcnt); -+ if (ccnt > (SZ_64K - 1)) { -+ dev_err(dev, "Exceeded max SG segment size\n"); -+ return -EINVAL; -+ } -+ cidx = acnt * bcnt; -+ } -+ -+ if (direction == DMA_MEM_TO_DEV) { -+ src_bidx = acnt; -+ src_cidx = cidx; -+ dst_bidx = 0; -+ dst_cidx = 0; -+ } else if (direction == DMA_DEV_TO_MEM) { -+ src_bidx = 0; -+ src_cidx = 0; -+ dst_bidx = acnt; -+ dst_cidx = cidx; -+ } else { -+ dev_err(dev, "%s: direction not implemented yet\n", __func__); -+ return -EINVAL; -+ } -+ -+ pset->opt = EDMA_TCC(EDMA_CHAN_SLOT(echan->ch_num)); -+ /* Configure A or AB synchronized transfers */ -+ if (absync) -+ pset->opt |= SYNCDIM; -+ -+ pset->src = src_addr; -+ pset->dst = dst_addr; -+ -+ pset->src_dst_bidx = (dst_bidx << 16) | src_bidx; -+ pset->src_dst_cidx = (dst_cidx << 16) | src_cidx; -+ -+ pset->a_b_cnt = bcnt << 16 | acnt; -+ pset->ccnt = ccnt; -+ /* -+ * Only time when (bcntrld) auto reload is required is for -+ * A-sync case, and in this case, a requirement of reload value -+ * of SZ_64K-1 only is assured. 'link' is initially set to NULL -+ * and then later will be populated by edma_execute. -+ */ -+ pset->link_bcntrld = 0xffffffff; -+ return absync; -+} -+ -+static struct dma_async_tx_descriptor *edma_prep_dma_cyclic( -+ struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, -+ size_t period_len, enum dma_transfer_direction direction, unsigned long flags, -+ void *context) -+{ -+ struct edma_chan *echan = to_edma_chan(chan); -+ struct device *dev = chan->device->dev; -+ struct edma_desc *edesc; -+ dma_addr_t src_addr, dst_addr; -+ enum dma_slave_buswidth dev_width; -+ u32 burst; -+ int i, ret, nr_periods; -+ -+ if (unlikely(!echan || !buf_len || !period_len)) -+ return NULL; -+ -+ if (direction == DMA_DEV_TO_MEM) { -+ src_addr = echan->cfg.src_addr; -+ dst_addr = buf_addr; -+ dev_width = echan->cfg.src_addr_width; -+ burst = echan->cfg.src_maxburst; -+ } else if (direction == DMA_MEM_TO_DEV) { -+ src_addr = buf_addr; -+ dst_addr = echan->cfg.dst_addr; -+ dev_width = echan->cfg.dst_addr_width; -+ burst = echan->cfg.dst_maxburst; -+ } else { -+ dev_err(dev, "%s: bad direction?\n", __func__); -+ return NULL; -+ } -+ -+ if (dev_width == DMA_SLAVE_BUSWIDTH_UNDEFINED) { -+ dev_err(dev, "Undefined slave buswidth\n"); -+ return NULL; -+ } -+ -+ if(unlikely(period_len % buf_len)) { -+ dev_err(dev, "Period should be multiple of Buf length\n"); -+ return NULL; -+ } -+ -+ nr_periods = period_len / buf_len; -+ -+ edesc = kzalloc(sizeof(*edesc) + nr_periods * -+ sizeof(edesc->pset[0]), GFP_ATOMIC); -+ if (!edesc) { -+ dev_dbg(dev, "Failed to allocate a descriptor\n"); -+ return NULL; -+ } -+ -+ edesc->pset_nr = nr_periods; -+ -+ for(i = 0; i < nr_periods; i++) { -+ /* Allocate a PaRAM slot, if needed */ -+ if (echan->slot[i] < 0) { -+ echan->slot[i] = -+ edma_alloc_slot(EDMA_CTLR(echan->ch_num), -+ EDMA_SLOT_ANY); -+ if (echan->slot[i] < 0) { -+ dev_err(dev, "Failed to allocate slot\n"); -+ return NULL; -+ } -+ } -+ -+ if (direction == DMA_DEV_TO_MEM) -+ dst_addr += period_len; -+ else -+ src_addr += period_len; -+ -+ ret = edma_config_pset(chan, &edesc->pset[i], src_addr, dst_addr, -+ burst, dev_width, period_len, direction); -+ if(ret < 0) -+ return NULL; -+ -+ edesc->absync = ret; -+ if (i == nr_periods - 1) -+ edesc->pset[i].opt |= TCINTEN; -+ } -+ /* TODO tx_flags (last parameter) needs to be investigated...\n" */ -+ return vchan_tx_prep(&echan->vchan, &edesc->vdesc, 0); -+} -+ - static struct dma_async_tx_descriptor *edma_prep_slave_sg( - struct dma_chan *chan, struct scatterlist *sgl, - unsigned int sg_len, enum dma_transfer_direction direction, -@@ -218,23 +411,21 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg( - struct edma_chan *echan = to_edma_chan(chan); - struct device *dev = chan->device->dev; - struct edma_desc *edesc; -- dma_addr_t dev_addr; -+ dma_addr_t src_addr = 0, dst_addr = 0; - enum dma_slave_buswidth dev_width; - u32 burst; - struct scatterlist *sg; -- int i; -- int acnt, bcnt, ccnt, src, dst, cidx; -- int src_bidx, dst_bidx, src_cidx, dst_cidx; -+ int i, ret; - - if (unlikely(!echan || !sgl || !sg_len)) - return NULL; - - if (direction == DMA_DEV_TO_MEM) { -- dev_addr = echan->cfg.src_addr; -+ src_addr = echan->cfg.src_addr; - dev_width = echan->cfg.src_addr_width; - burst = echan->cfg.src_maxburst; - } else if (direction == DMA_MEM_TO_DEV) { -- dev_addr = echan->cfg.dst_addr; -+ dst_addr = echan->cfg.dst_addr; - dev_width = echan->cfg.dst_addr_width; - burst = echan->cfg.dst_maxburst; - } else { -@@ -262,7 +453,14 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg( - - edesc->pset_nr = sg_len; - -+ /* Configure PaRAM sets for each SG */ - for_each_sg(sgl, sg, sg_len, i) { -+ /* Get address for each SG */ -+ if (direction == DMA_DEV_TO_MEM) -+ dst_addr = sg_dma_address(sg); -+ else -+ src_addr = sg_dma_address(sg); -+ - /* Allocate a PaRAM slot, if needed */ - if (echan->slot[i] < 0) { - echan->slot[i] = -@@ -274,76 +472,16 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg( - } - } - -- acnt = dev_width; -- -- /* -- * If the maxburst is equal to the fifo width, use -- * A-synced transfers. This allows for large contiguous -- * buffer transfers using only one PaRAM set. -- */ -- if (burst == 1) { -- edesc->absync = false; -- ccnt = sg_dma_len(sg) / acnt / (SZ_64K - 1); -- bcnt = sg_dma_len(sg) / acnt - ccnt * (SZ_64K - 1); -- if (bcnt) -- ccnt++; -- else -- bcnt = SZ_64K - 1; -- cidx = acnt; -- /* -- * If maxburst is greater than the fifo address_width, -- * use AB-synced transfers where A count is the fifo -- * address_width and B count is the maxburst. In this -- * case, we are limited to transfers of C count frames -- * of (address_width * maxburst) where C count is limited -- * to SZ_64K-1. This places an upper bound on the length -- * of an SG segment that can be handled. -- */ -- } else { -- edesc->absync = true; -- bcnt = burst; -- ccnt = sg_dma_len(sg) / (acnt * bcnt); -- if (ccnt > (SZ_64K - 1)) { -- dev_err(dev, "Exceeded max SG segment size\n"); -- return NULL; -- } -- cidx = acnt * bcnt; -- } -+ ret = edma_config_pset(chan, &edesc->pset[i], src_addr, dst_addr, -+ burst, dev_width, sg_dma_len(sg), direction); -+ if(ret < 0) -+ return NULL; - -- if (direction == DMA_MEM_TO_DEV) { -- src = sg_dma_address(sg); -- dst = dev_addr; -- src_bidx = acnt; -- src_cidx = cidx; -- dst_bidx = 0; -- dst_cidx = 0; -- } else { -- src = dev_addr; -- dst = sg_dma_address(sg); -- src_bidx = 0; -- src_cidx = 0; -- dst_bidx = acnt; -- dst_cidx = cidx; -- } -+ edesc->absync = ret; - -- edesc->pset[i].opt = EDMA_TCC(EDMA_CHAN_SLOT(echan->ch_num)); -- /* Configure A or AB synchronized transfers */ -- if (edesc->absync) -- edesc->pset[i].opt |= SYNCDIM; - /* If this is the last set, enable completion interrupt flag */ - if (i == sg_len - 1) - edesc->pset[i].opt |= TCINTEN; -- -- edesc->pset[i].src = src; -- edesc->pset[i].dst = dst; -- -- edesc->pset[i].src_dst_bidx = (dst_bidx << 16) | src_bidx; -- edesc->pset[i].src_dst_cidx = (dst_cidx << 16) | src_cidx; -- -- edesc->pset[i].a_b_cnt = bcnt << 16 | acnt; -- edesc->pset[i].ccnt = ccnt; -- edesc->pset[i].link_bcntrld = 0xffffffff; -- - } - - return vchan_tx_prep(&echan->vchan, &edesc->vdesc, tx_flags); -@@ -368,6 +506,8 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data) - edesc = echan->edesc; - if (edesc) { - edma_execute(echan); -+ /* Note: that desc->callback must be setup by EDMA users so that -+ the virt-dma layer calls their callback on vchan_cookie_complete() */ - vchan_cookie_complete(&edesc->vdesc); - } - -@@ -462,6 +602,20 @@ static void edma_issue_pending(struct dma_chan *chan) - spin_unlock_irqrestore(&echan->vchan.lock, flags); - } - -+static struct dma_slave_sg_limits -+*edma_get_slave_sg_limits(struct dma_chan *chan, -+ enum dma_slave_buswidth addr_width, -+ u32 maxburst) -+{ -+ struct edma_chan *echan; -+ -+ echan = to_edma_chan(chan); -+ echan->sg_limits.max_seg_len = -+ (SZ_64K - 1) * addr_width * maxburst; -+ -+ return &echan->sg_limits; -+} -+ - static size_t edma_desc_size(struct edma_desc *edesc) - { - int i; -@@ -521,6 +675,7 @@ static void __init edma_chan_init(struct edma_cc *ecc, - echan->ch_num = EDMA_CTLR_CHAN(ecc->ctlr, i); - echan->ecc = ecc; - echan->vchan.desc_free = edma_desc_free; -+ echan->sg_limits.max_seg_nr = MAX_NR_SG; - - vchan_init(&echan->vchan, dma); - -@@ -534,9 +689,11 @@ static void edma_dma_init(struct edma_cc *ecc, struct dma_device *dma, - struct device *dev) - { - dma->device_prep_slave_sg = edma_prep_slave_sg; -+ dma->device_prep_dma_cyclic = edma_prep_dma_cyclic; - dma->device_alloc_chan_resources = edma_alloc_chan_resources; - dma->device_free_chan_resources = edma_free_chan_resources; - dma->device_issue_pending = edma_issue_pending; -+ dma->device_slave_sg_limits = edma_get_slave_sg_limits; - dma->device_tx_status = edma_tx_status; - dma->device_control = edma_control; - dma->dev = dev; -diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c -index 1865321..1fe7469 100644 ---- a/drivers/mmc/host/omap_hsmmc.c -+++ b/drivers/mmc/host/omap_hsmmc.c -@@ -40,6 +40,8 @@ - #include - #include - #include -+#include -+#include - - /* OMAP HSMMC Host Controller Registers */ - #define OMAP_HSMMC_SYSSTATUS 0x0014 -@@ -171,7 +173,7 @@ struct omap_hsmmc_host { - unsigned char power_mode; - int suspended; - int irq; -- int use_dma, dma_ch; -+ int use_dma; - struct dma_chan *tx_chan; - struct dma_chan *rx_chan; - int slot_id; -@@ -180,10 +182,15 @@ struct omap_hsmmc_host { - int protect_card; - int reqs_blocked; - int use_reg; -- int req_in_progress; - struct omap_hsmmc_next next_data; - - struct omap_mmc_platform_data *pdata; -+ -+ unsigned int req_flags; -+#define RQF_REQ_IN_PROGRESS (1 << 0) -+#define RQF_DMA_IN_PROGRESS (1 << 1) -+#define RQF_REQ_DONE (1 << 2) -+#define RQF_DMA_DONE (1 << 3) - }; - - static int omap_hsmmc_card_detect(struct device *dev, int slot) -@@ -391,6 +398,7 @@ static inline int omap_hsmmc_have_reg(void) - static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) - { - int ret; -+ unsigned long flags; - - if (gpio_is_valid(pdata->slots[0].switch_pin)) { - if (pdata->slots[0].cover) -@@ -420,6 +428,24 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) - } else - pdata->slots[0].gpio_wp = -EINVAL; - -+ if (gpio_is_valid(pdata->slots[0].gpio_reset)) { -+ flags = pdata->slots[0].gpio_reset_active_low ? -+ GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH; -+ ret = gpio_request_one(pdata->slots[0].gpio_reset, flags, -+ "mmc_reset"); -+ if (ret) -+ goto err_free_wp; -+ -+ /* hold reset */ -+ udelay(pdata->slots[0].gpio_reset_hold_us); -+ -+ gpio_set_value(pdata->slots[0].gpio_reset, -+ !pdata->slots[0].gpio_reset_active_low); -+ -+ } else -+ pdata->slots[0].gpio_reset = -EINVAL; -+ -+ - return 0; - - err_free_wp: -@@ -433,6 +459,8 @@ err_free_sp: - - static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata) - { -+ if (gpio_is_valid(pdata->slots[0].gpio_reset)) -+ gpio_free(pdata->slots[0].gpio_reset); - if (gpio_is_valid(pdata->slots[0].gpio_wp)) - gpio_free(pdata->slots[0].gpio_wp); - if (gpio_is_valid(pdata->slots[0].switch_pin)) -@@ -787,7 +815,7 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, - * ac, bc, adtc, bcr. Only commands ending an open ended transfer need - * a val of 0x3, rest 0x0. - */ -- if (cmd == host->mrq->stop) -+ if (host->mrq && cmd == host->mrq->stop) - cmdtype = 0x3; - - cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22); -@@ -803,7 +831,8 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, - if (host->use_dma) - cmdreg |= DMAE; - -- host->req_in_progress = 1; -+ host->req_flags |= RQF_REQ_IN_PROGRESS; -+ host->req_flags &= ~RQF_REQ_DONE; - - OMAP_HSMMC_WRITE(host->base, ARG, cmd->arg); - OMAP_HSMMC_WRITE(host->base, CMD, cmdreg); -@@ -826,19 +855,36 @@ static struct dma_chan *omap_hsmmc_get_dma_chan(struct omap_hsmmc_host *host, - - static void omap_hsmmc_request_done(struct omap_hsmmc_host *host, struct mmc_request *mrq) - { -- int dma_ch; -+ int completed; - unsigned long flags; - -+ BUG_ON(mrq == NULL); -+ - spin_lock_irqsave(&host->irq_lock, flags); -- host->req_in_progress = 0; -- dma_ch = host->dma_ch; -- spin_unlock_irqrestore(&host->irq_lock, flags); -+ -+ host->req_flags &= ~RQF_REQ_IN_PROGRESS; -+ host->req_flags |= RQF_REQ_DONE; -+ -+ /* completed? */ -+ if (mrq->data && host->use_dma) -+ completed = (host->req_flags & RQF_DMA_DONE) == RQF_DMA_DONE; -+ else -+ completed = 1; - - omap_hsmmc_disable_irq(host); -+ - /* Do not complete the request if DMA is still in progress */ -- if (mrq->data && host->use_dma && dma_ch != -1) -+ if (!completed) { -+ spin_unlock_irqrestore(&host->irq_lock, flags); -+ pr_debug("%s: not completed!\n", __func__); - return; -+ } -+ -+ /* clear the flags now */ -+ host->req_flags &= ~(RQF_REQ_DONE | RQF_DMA_DONE); - host->mrq = NULL; -+ spin_unlock_irqrestore(&host->irq_lock, flags); -+ - mmc_request_done(host->mmc, mrq); - } - -@@ -855,6 +901,7 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data) - if (host->cmd && host->cmd->opcode == 6 && - host->response_busy) { - host->response_busy = 0; -+ pr_debug("%s: response_busy = 0\n", __func__); - return; - } - -@@ -870,9 +917,11 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data) - data->bytes_xfered = 0; - - if (!data->stop) { -+ pr_debug("%s: calling omap_hsmmc_request_done\n", __func__); - omap_hsmmc_request_done(host, data->mrq); - return; - } -+ pr_debug("%s: calling omap_hsmmc_start_command\n", __func__); - omap_hsmmc_start_command(host, data->stop, NULL); - } - -@@ -882,6 +931,8 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data) - static void - omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) - { -+ unsigned long flags; -+ - host->cmd = NULL; - - if (cmd->flags & MMC_RSP_PRESENT) { -@@ -898,6 +949,18 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) - } - if ((host->data == NULL && !host->response_busy) || cmd->error) - omap_hsmmc_request_done(host, cmd->mrq); -+ else { -+ spin_lock_irqsave(&host->irq_lock, flags); -+ /* we use DMA, and DMA is completed - kick the can */ -+ if ((host->req_flags & RQF_DMA_DONE) != 0) { -+ host->req_flags &= ~(RQF_REQ_IN_PROGRESS | RQF_REQ_DONE | RQF_DMA_DONE); -+ host->mrq = NULL; -+ mmc_request_done(host->mmc, cmd->mrq); -+ } else { -+ pr_debug("%s: not calling omap_hsmmc_request_done!\n", __func__); -+ } -+ spin_unlock_irqrestore(&host->irq_lock, flags); -+ } - } - - /* -@@ -905,17 +968,19 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) - */ - static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno) - { -- int dma_ch; -+ int dma_in_progress; - unsigned long flags; - - host->data->error = errno; - - spin_lock_irqsave(&host->irq_lock, flags); -- dma_ch = host->dma_ch; -- host->dma_ch = -1; -+ dma_in_progress = host->use_dma && -+ (host->req_flags & RQF_DMA_IN_PROGRESS) != 0; -+ host->req_flags &= ~RQF_DMA_IN_PROGRESS; -+ host->req_flags |= RQF_DMA_DONE; - spin_unlock_irqrestore(&host->irq_lock, flags); - -- if (host->use_dma && dma_ch != -1) { -+ if (dma_in_progress) { - struct dma_chan *chan = omap_hsmmc_get_dma_chan(host, host->data); - - dmaengine_terminate_all(chan); -@@ -1005,16 +1070,22 @@ static void hsmmc_command_incomplete(struct omap_hsmmc_host *host, - int err, int end_cmd) - { - if (end_cmd) { -+ pr_debug("%s end_cmd\n", __func__); - omap_hsmmc_reset_controller_fsm(host, SRC); - if (host->cmd) - host->cmd->error = err; - } - - if (host->data) { -+ pr_debug("%s host->data; resetting dma\n", __func__); - omap_hsmmc_reset_controller_fsm(host, SRD); - omap_hsmmc_dma_cleanup(host, err); -- } else if (host->mrq && host->mrq->cmd) -+ } else if (host->mrq && host->mrq->cmd) { -+ pr_debug("%s error\n", __func__); - host->mrq->cmd->error = err; -+ } else { -+ pr_debug("%s nothing\n", __func__); -+ } - } - - static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) -@@ -1055,13 +1126,13 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) - struct omap_hsmmc_host *host = dev_id; - int status; - -- status = OMAP_HSMMC_READ(host->base, STAT); -- while (status & INT_EN_MASK && host->req_in_progress) { -- omap_hsmmc_do_irq(host, status); -+ while ((status = OMAP_HSMMC_READ(host->base, STAT)) & INT_EN_MASK) { -+ -+ if (host->req_flags & RQF_REQ_IN_PROGRESS) -+ omap_hsmmc_do_irq(host, status); - - /* Flush posted write */ - OMAP_HSMMC_WRITE(host->base, STAT, status); -- status = OMAP_HSMMC_READ(host->base, STAT); - } - - return IRQ_HANDLED; -@@ -1199,13 +1270,15 @@ static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id) - static void omap_hsmmc_dma_callback(void *param) - { - struct omap_hsmmc_host *host = param; -+ struct mmc_request *mrq = host->mrq; - struct dma_chan *chan; - struct mmc_data *data; -- int req_in_progress; -+ int completed; - - spin_lock_irq(&host->irq_lock); -- if (host->dma_ch < 0) { -+ if ((host->req_flags & RQF_DMA_IN_PROGRESS) == 0) { - spin_unlock_irq(&host->irq_lock); -+ pr_debug("%s: No DMA in progress!\n", __func__); - return; - } - -@@ -1216,17 +1289,22 @@ static void omap_hsmmc_dma_callback(void *param) - data->sg, data->sg_len, - omap_hsmmc_get_dma_dir(host, data)); - -- req_in_progress = host->req_in_progress; -- host->dma_ch = -1; -- spin_unlock_irq(&host->irq_lock); -+ host->req_flags &= ~RQF_DMA_IN_PROGRESS; -+ host->req_flags |= RQF_DMA_DONE; - -- /* If DMA has finished after TC, complete the request */ -- if (!req_in_progress) { -- struct mmc_request *mrq = host->mrq; -+ completed = (host->req_flags & RQF_REQ_DONE) != 0; - -- host->mrq = NULL; -- mmc_request_done(host->mmc, mrq); -+ if (!completed) { -+ spin_unlock_irq(&host->irq_lock); -+ pr_debug("%s: not completed\n", __func__); -+ return; - } -+ -+ host->req_flags &= ~(RQF_REQ_DONE | RQF_DMA_DONE); -+ host->mrq = NULL; -+ spin_unlock_irq(&host->irq_lock); -+ -+ mmc_request_done(host->mmc, mrq); - } - - static int omap_hsmmc_pre_dma_transfer(struct omap_hsmmc_host *host, -@@ -1294,7 +1372,7 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, - */ - return -EINVAL; - -- BUG_ON(host->dma_ch != -1); -+ BUG_ON((host->req_flags & RQF_DMA_IN_PROGRESS) != 0); - - chan = omap_hsmmc_get_dma_chan(host, data); - -@@ -1328,7 +1406,7 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, - /* Does not fail */ - dmaengine_submit(tx); - -- host->dma_ch = 1; -+ host->req_flags |= RQF_DMA_IN_PROGRESS; - - dma_async_issue_pending(chan); - -@@ -1448,8 +1526,11 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) - struct omap_hsmmc_host *host = mmc_priv(mmc); - int err; - -- BUG_ON(host->req_in_progress); -- BUG_ON(host->dma_ch != -1); -+ BUG_ON((host->req_flags & RQF_REQ_IN_PROGRESS) != 0); -+ BUG_ON((host->req_flags & RQF_REQ_DONE) != 0); -+ BUG_ON((host->req_flags & RQF_DMA_IN_PROGRESS) != 0); -+ BUG_ON((host->req_flags & RQF_DMA_DONE) != 0); -+ - if (host->protect_card) { - if (host->reqs_blocked < 3) { - /* -@@ -1719,6 +1800,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) - struct device_node *np = dev->of_node; - u32 bus_width, max_freq; - int cd_gpio, wp_gpio; -+ enum of_gpio_flags reset_flags; - - cd_gpio = of_get_named_gpio(np, "cd-gpios", 0); - wp_gpio = of_get_named_gpio(np, "wp-gpios", 0); -@@ -1736,6 +1818,14 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) - pdata->nr_slots = 1; - pdata->slots[0].switch_pin = cd_gpio; - pdata->slots[0].gpio_wp = wp_gpio; -+ reset_flags = 0; -+ pdata->slots[0].gpio_reset = of_get_named_gpio_flags(np, -+ "reset-gpios", 0, &reset_flags); -+ pdata->slots[0].gpio_reset_active_low = -+ (reset_flags & OF_GPIO_ACTIVE_LOW) != 0; -+ pdata->slots[0].gpio_reset_hold_us = 100; /* default */ -+ of_property_read_u32(np, "reset-gpio-hold-us", -+ &pdata->slots[0].gpio_reset_hold_us); - - if (of_find_property(np, "ti,non-removable", NULL)) { - pdata->slots[0].nonremovable = true; -@@ -1776,6 +1866,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) - const struct of_device_id *match; - dma_cap_mask_t mask; - unsigned tx_req, rx_req; -+ struct dma_slave_sg_limits *dma_sg_limits; - struct pinctrl *pinctrl; - - match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev); -@@ -1801,6 +1892,10 @@ static int omap_hsmmc_probe(struct platform_device *pdev) - return -ENXIO; - } - -+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev); -+ if (IS_ERR(pinctrl)) -+ dev_warn(&pdev->dev, "unable to select pin group\n"); -+ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - irq = platform_get_irq(pdev, 0); - if (res == NULL || irq < 0) -@@ -1825,13 +1920,13 @@ static int omap_hsmmc_probe(struct platform_device *pdev) - host->pdata = pdata; - host->dev = &pdev->dev; - host->use_dma = 1; -- host->dma_ch = -1; - host->irq = irq; - host->slot_id = 0; - host->mapbase = res->start + pdata->reg_offset; - host->base = ioremap(host->mapbase, SZ_4K); - host->power_mode = MMC_POWER_OFF; - host->next_data.cookie = 1; -+ host->req_flags = 0; - - platform_set_drvdata(pdev, host); - -@@ -1892,6 +1987,16 @@ static int omap_hsmmc_probe(struct platform_device *pdev) - * as we want. */ - mmc->max_segs = 1024; - -+ /* Eventually we should get our max_segs limitation for EDMA by -+ * querying the dmaengine API */ -+ if (pdev->dev.of_node) { -+ struct device_node *parent = of_node_get(pdev->dev.of_node->parent); -+ struct device_node *node; -+ node = of_find_node_by_name(parent, "edma"); -+ if (node) -+ mmc->max_segs = 16; -+ } -+ - mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ - mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ - mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; -@@ -1952,6 +2057,13 @@ static int omap_hsmmc_probe(struct platform_device *pdev) - goto err_irq; - } - -+ /* Some DMA Engines only handle a limited number of SG segments */ -+ dma_sg_limits = dma_get_slave_sg_limits(host->rx_chan, -+ DMA_SLAVE_BUSWIDTH_4_BYTES, -+ mmc->max_blk_size / 4); -+ if (dma_sg_limits && dma_sg_limits->max_seg_nr) -+ mmc->max_segs = dma_sg_limits->max_seg_nr; -+ - /* Request IRQ for MMC operations */ - ret = request_irq(host->irq, omap_hsmmc_irq, 0, - mmc_hostname(mmc), host); -diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig -index c9d04f7..1a862df 100644 ---- a/drivers/reset/Kconfig -+++ b/drivers/reset/Kconfig -@@ -11,3 +11,14 @@ menuconfig RESET_CONTROLLER - via GPIOs or SoC-internal reset controller modules. - - If unsure, say no. -+ -+if RESET_CONTROLLER -+ -+config RESET_GPIO -+ tristate "GPIO reset controller support" -+ depends on GPIOLIB && OF -+ help -+ This driver provides support for reset lines that are controlled -+ directly by GPIOs. -+ -+endif -diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile -index 1e2d83f..b854f20 100644 ---- a/drivers/reset/Makefile -+++ b/drivers/reset/Makefile -@@ -1 +1,2 @@ - obj-$(CONFIG_RESET_CONTROLLER) += core.o -+obj-$(CONFIG_RESET_GPIO) += gpio-reset.o -diff --git a/drivers/reset/gpio-reset.c b/drivers/reset/gpio-reset.c -new file mode 100644 -index 0000000..acc1076 ---- /dev/null -+++ b/drivers/reset/gpio-reset.c -@@ -0,0 +1,169 @@ -+/* -+ * GPIO Reset Controller driver -+ * -+ * Copyright 2013 Philipp Zabel, Pengutronix -+ * -+ * 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 -+#include -+#include -+#include -+#include -+#include -+#include -+ -+struct gpio_reset_data { -+ struct reset_controller_dev rcdev; -+ unsigned int gpio; -+ bool active_low; -+ u32 delay_us; -+}; -+ -+static void __gpio_reset_set(struct reset_controller_dev *rcdev, int asserted) -+{ -+ struct gpio_reset_data *drvdata = container_of(rcdev, -+ struct gpio_reset_data, rcdev); -+ int value = asserted; -+ -+ if (drvdata->active_low) -+ value = !value; -+ -+ gpio_set_value(drvdata->gpio, value); -+} -+ -+static int gpio_reset(struct reset_controller_dev *rcdev, unsigned long id) -+{ -+ struct gpio_reset_data *drvdata = container_of(rcdev, -+ struct gpio_reset_data, rcdev); -+ -+ if (drvdata->delay_us < 0) -+ return -ENOSYS; -+ -+ __gpio_reset_set(rcdev, 1); -+ udelay(drvdata->delay_us); -+ __gpio_reset_set(rcdev, 0); -+ -+ return 0; -+} -+ -+static int gpio_reset_assert(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ __gpio_reset_set(rcdev, 1); -+ -+ return 0; -+} -+ -+static int gpio_reset_deassert(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ __gpio_reset_set(rcdev, 0); -+ -+ return 0; -+} -+ -+static struct reset_control_ops gpio_reset_ops = { -+ .reset = gpio_reset, -+ .assert = gpio_reset_assert, -+ .deassert = gpio_reset_deassert, -+}; -+ -+static int of_gpio_reset_xlate(struct reset_controller_dev *rcdev, -+ const struct of_phandle_args *reset_spec) -+{ -+ if (WARN_ON(reset_spec->args_count != 0)) -+ return -EINVAL; -+ -+ return 0; -+} -+ -+static int gpio_reset_probe(struct platform_device *pdev) -+{ -+ struct device_node *np = pdev->dev.of_node; -+ struct gpio_reset_data *drvdata; -+ enum of_gpio_flags flags; -+ unsigned long gpio_flags; -+ bool initially_in_reset; -+ int ret; -+ -+ drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); -+ if (drvdata == NULL) -+ return -ENOMEM; -+ -+ if (of_gpio_named_count(np, "reset-gpios") != 1) -+ return -EINVAL; -+ -+ drvdata->gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, &flags); -+ if (drvdata->gpio == -EPROBE_DEFER) { -+ return drvdata->gpio; -+ } else if (!gpio_is_valid(drvdata->gpio)) { -+ dev_err(&pdev->dev, "invalid reset gpio: %d\n", drvdata->gpio); -+ return drvdata->gpio; -+ } -+ -+ drvdata->active_low = flags & OF_GPIO_ACTIVE_LOW; -+ -+ ret = of_property_read_u32(np, "reset-delay-us", &drvdata->delay_us); -+ if (ret < 0) -+ return ret; -+ -+ initially_in_reset = of_property_read_bool(np, "initially-in-reset"); -+ if (drvdata->active_low ^ initially_in_reset) -+ gpio_flags = GPIOF_OUT_INIT_HIGH; -+ else -+ gpio_flags = GPIOF_OUT_INIT_LOW; -+ -+ ret = devm_gpio_request_one(&pdev->dev, drvdata->gpio, gpio_flags, NULL); -+ if (ret < 0) { -+ dev_err(&pdev->dev, "failed to request gpio %d: %d\n", -+ drvdata->gpio, ret); -+ return ret; -+ } -+ -+ drvdata->rcdev.of_node = np; -+ drvdata->rcdev.owner = THIS_MODULE; -+ drvdata->rcdev.nr_resets = 1; -+ drvdata->rcdev.ops = &gpio_reset_ops; -+ drvdata->rcdev.of_xlate = of_gpio_reset_xlate; -+ reset_controller_register(&drvdata->rcdev); -+ -+ platform_set_drvdata(pdev, drvdata); -+ -+ return 0; -+} -+ -+static int gpio_reset_remove(struct platform_device *pdev) -+{ -+ struct gpio_reset_data *drvdata = platform_get_drvdata(pdev); -+ -+ reset_controller_unregister(&drvdata->rcdev); -+ -+ return 0; -+} -+ -+static struct of_device_id gpio_reset_dt_ids[] = { -+ { .compatible = "gpio-reset" }, -+ { } -+}; -+ -+static struct platform_driver gpio_reset_driver = { -+ .probe = gpio_reset_probe, -+ .remove = gpio_reset_remove, -+ .driver = { -+ .name = "gpio-reset", -+ .owner = THIS_MODULE, -+ .of_match_table = of_match_ptr(gpio_reset_dt_ids), -+ }, -+}; -+ -+module_platform_driver(gpio_reset_driver); -+ -+MODULE_AUTHOR("Philipp Zabel "); -+MODULE_DESCRIPTION("gpio reset controller"); -+MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:gpio-reset"); -+MODULE_DEVICE_TABLE(of, gpio_reset_dt_ids); -diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h -index cb286b1..d71fe5d 100644 ---- a/include/linux/dmaengine.h -+++ b/include/linux/dmaengine.h -@@ -370,6 +370,18 @@ struct dma_slave_config { - unsigned int slave_id; - }; - -+/* struct dma_slave_sg_limits - expose SG transfer limits of a channel -+ * -+ * @max_seg_nr: maximum number of SG segments supported on a SG/SLAVE -+ * channel (0 for no maximum or not a SG/SLAVE channel) -+ * @max_seg_len: maximum length of SG segments supported on a SG/SLAVE -+ * channel (0 for no maximum or not a SG/SLAVE channel) -+ */ -+struct dma_slave_sg_limits { -+ u32 max_seg_nr; -+ u32 max_seg_len; -+}; -+ - static inline const char *dma_chan_name(struct dma_chan *chan) - { - return dev_name(&chan->dev->device); -@@ -532,6 +544,7 @@ struct dma_tx_state { - * struct with auxiliary transfer status information, otherwise the call - * will just return a simple status code - * @device_issue_pending: push pending transactions to hardware -+ * @device_slave_sg_limits: return the slave SG capabilities - */ - struct dma_device { - -@@ -597,6 +610,9 @@ struct dma_device { - dma_cookie_t cookie, - struct dma_tx_state *txstate); - void (*device_issue_pending)(struct dma_chan *chan); -+ struct dma_slave_sg_limits *(*device_slave_sg_limits)( -+ struct dma_chan *chan, enum dma_slave_buswidth addr_width, -+ u32 maxburst); - }; - - static inline int dmaengine_device_control(struct dma_chan *chan, -@@ -958,6 +974,29 @@ dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, - } - } - -+/** -+ * dma_get_slave_sg_limits - get DMAC SG transfer capabilities -+ * @chan: target DMA channel -+ * @addr_width: address width of the DMA transfer -+ * @maxburst: maximum DMA transfer burst size -+ * -+ * Get SG transfer capabilities for a specified channel. If the dmaengine -+ * driver does not implement SG transfer capabilities then NULL is -+ * returned. -+ */ -+static inline struct dma_slave_sg_limits -+*dma_get_slave_sg_limits(struct dma_chan *chan, -+ enum dma_slave_buswidth addr_width, -+ u32 maxburst) -+{ -+ if (chan->device->device_slave_sg_limits) -+ return chan->device->device_slave_sg_limits(chan, -+ addr_width, -+ maxburst); -+ -+ return NULL; -+} -+ - enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); - #ifdef CONFIG_DMA_ENGINE - enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); -diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h -index 2bf1b30..d5489941 100644 ---- a/include/linux/platform_data/mmc-omap.h -+++ b/include/linux/platform_data/mmc-omap.h -@@ -115,6 +115,9 @@ struct omap_mmc_platform_data { - - int switch_pin; /* gpio (card detect) */ - int gpio_wp; /* gpio (write protect) */ -+ int gpio_reset; /* gpio (reset) */ -+ int gpio_reset_active_low; /* 1 if reset is active low */ -+ u32 gpio_reset_hold_us; /* time to hold in us */ - - int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); - int (*set_power)(struct device *dev, int slot, -diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c -index aa924d9..461fe4f 100644 ---- a/sound/soc/soc-dmaengine-pcm.c -+++ b/sound/soc/soc-dmaengine-pcm.c -@@ -276,6 +276,16 @@ struct dma_chan *snd_dmaengine_pcm_request_channel(dma_filter_fn filter_fn, - } - EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_request_channel); - -+struct dma_chan *snd_dmaengine_pcm_request_slave_channel( -+ struct snd_pcm_substream *substream, char *name) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct device *dev = snd_soc_dai_get_drvdata(rtd->cpu_dai); -+ -+ return dma_request_slave_channel(dev, name); -+} -+EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_request_slave_channel); -+ - /** - * snd_dmaengine_pcm_open - Open a dmaengine based PCM substream - * @substream: PCM substream -@@ -334,6 +344,18 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream, - } - EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan); - -+int snd_dmaengine_pcm_open_request_slave_chan(struct snd_pcm_substream *substream, char *name) -+{ -+ if(substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ return snd_dmaengine_pcm_open(substream, -+ snd_dmaengine_pcm_request_slave_channel(substream, "tx")); -+ } else { -+ return snd_dmaengine_pcm_open(substream, -+ snd_dmaengine_pcm_request_slave_channel(substream, "rx")); -+ } -+} -+EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_slave_chan); -+ - /** - * snd_dmaengine_pcm_close - Close a dmaengine based PCM substream - * @substream: PCM substream diff --git a/arm-am33xx-arm-soc-upstream.patch b/arm-am33xx-arm-soc-upstream.patch new file mode 100644 index 000000000..3129c1a7a --- /dev/null +++ b/arm-am33xx-arm-soc-upstream.patch @@ -0,0 +1,2468 @@ +Bugzilla: 1012025 +Upstream-status: Landed in 3.13-rc1 + +From 9096ef3ab805b2e9fda732f3128a761810c1dea4 Mon Sep 17 00:00:00 2001 +From: Alexandre Belloni +Date: Sat, 3 Aug 2013 20:00:54 +0200 +Subject: [PATCH 01/15] ARM: dts: AM33XX: Add PMU support + +ARM Performance Monitor Units are available on the am33xx, +add the support in the dtsi. + +Tested with perf and oprofile on a regular beaglebone. + +Signed-off-by: Alexandre Belloni +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am33xx.dtsi | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index f9c5da9..4d1c632 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -57,6 +57,11 @@ + }; + }; + ++ pmu { ++ compatible = "arm,cortex-a8-pmu"; ++ interrupts = <3>; ++ }; ++ + /* + * The soc node represents the soc top level view. It is uses for IPs + * that are not memory mapped in the MPU view or for the MPU itself. +-- +1.8.4.rc3 + +From 41bae5a6301ff1cd48fd0c4ff32146059b8e1b73 Mon Sep 17 00:00:00 2001 +From: Lars Poeschel +Date: Wed, 7 Aug 2013 13:06:32 +0200 +Subject: [PATCH 02/15] ARM: dts: AM33xx: Correct gpio #interrupt-cells + property + +Following commit ff5c9059 and therefore other omap platforms using +the gpio-omap driver correct the #interrupt-cells property on am33xx +too. The omap gpio binding documentaion also states that +the #interrupt-cells property should be 2. + +Signed-off-by: Lars Poeschel +Reviewed-by: Javier Martinez Canillas +Acked-by: Mark Rutland +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am33xx.dtsi | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index 4d1c632..a7731ea 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -111,7 +111,7 @@ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; +- #interrupt-cells = <1>; ++ #interrupt-cells = <2>; + reg = <0x44e07000 0x1000>; + interrupts = <96>; + }; +@@ -122,7 +122,7 @@ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; +- #interrupt-cells = <1>; ++ #interrupt-cells = <2>; + reg = <0x4804c000 0x1000>; + interrupts = <98>; + }; +@@ -133,7 +133,7 @@ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; +- #interrupt-cells = <1>; ++ #interrupt-cells = <2>; + reg = <0x481ac000 0x1000>; + interrupts = <32>; + }; +@@ -144,7 +144,7 @@ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; +- #interrupt-cells = <1>; ++ #interrupt-cells = <2>; + reg = <0x481ae000 0x1000>; + interrupts = <62>; + }; +-- +1.8.4.rc3 + +From 200835d6072367d401cc6eb76b05fef2a2919291 Mon Sep 17 00:00:00 2001 +From: Matt Porter +Date: Tue, 10 Sep 2013 14:24:37 -0500 +Subject: [PATCH 03/15] ARM: dts: AM33XX: Add EDMA support + +Adds AM33XX EDMA support to the am33xx.dtsi as documented in +Documentation/devicetree/bindings/dma/ti-edma.txt + +[Joel Fernandes ] +Drop DT entries that are non-hardware-description as discussed in [1] + +[1] https://patchwork.kernel.org/patch/2226761/ + +Signed-off-by: Matt Porter +Signed-off-by: Joel A Fernandes +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am33xx.dtsi | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index a7731ea..7a53e07 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -105,6 +105,18 @@ + reg = <0x48200000 0x1000>; + }; + ++ edma: edma@49000000 { ++ compatible = "ti,edma3"; ++ ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; ++ reg = <0x49000000 0x10000>, ++ <0x44e10f90 0x10>; ++ interrupts = <12 13 14>; ++ #dma-cells = <1>; ++ dma-channels = <64>; ++ ti,edma-regions = <4>; ++ ti,edma-slots = <256>; ++ }; ++ + gpio0: gpio@44e07000 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio1"; +-- +1.8.4.rc3 + +From 62ca70c0e2dfc1a4e9225b801cd769fd92f6de7c Mon Sep 17 00:00:00 2001 +From: Matt Porter +Date: Tue, 10 Sep 2013 14:24:38 -0500 +Subject: [PATCH 04/15] ARM: dts: AM33XX: Add SPI DMA support + +Adds DMA resources to the AM33XX SPI nodes. + +Signed-off-by: Matt Porter +Signed-off-by: Joel A Fernandes +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index 7a53e07..9cd60bf 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -340,6 +340,11 @@ + interrupts = <65>; + ti,spi-num-cs = <2>; + ti,hwmods = "spi0"; ++ dmas = <&edma 16 ++ &edma 17 ++ &edma 18 ++ &edma 19>; ++ dma-names = "tx0", "rx0", "tx1", "rx1"; + status = "disabled"; + }; + +@@ -351,6 +356,11 @@ + interrupts = <125>; + ti,spi-num-cs = <2>; + ti,hwmods = "spi1"; ++ dmas = <&edma 42 ++ &edma 43 ++ &edma 44 ++ &edma 45>; ++ dma-names = "tx0", "rx0", "tx1", "rx1"; + status = "disabled"; + }; + +-- +1.8.4.rc3 + +From de80038efb2254fd72e77f848eb867fc193b5a74 Mon Sep 17 00:00:00 2001 +From: Matt Porter +Date: Tue, 10 Sep 2013 14:24:39 -0500 +Subject: [PATCH 05/15] ARM: dts: AM33XX: Add MMC support and documentation + +Adds AM33XX MMC support for am335x-bone, am335x-evm and am335x-evmsk boards. + +Also added is the DMA binding definitions based on the generic DMA request +binding. + +Additional changes made to DTS: +* Interrupt, reg and compatible properties added +* ti,needs-special-hs-handling added + +Signed-off-by: Matt Porter +Acked-by: Tony Lindgren +Signed-off-by: Joel Fernandes +Signed-off-by: Benoit Cousson +--- + .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 26 ++++++++++++++- + arch/arm/boot/dts/am335x-bone.dts | 11 +++++++ + arch/arm/boot/dts/am335x-evm.dts | 7 ++++ + arch/arm/boot/dts/am335x-evmsk.dts | 7 ++++ + arch/arm/boot/dts/am33xx.dtsi | 38 ++++++++++++++++++++++ + 5 files changed, 88 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +index ed271fc..8c8908a 100644 +--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt ++++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +@@ -20,8 +20,29 @@ ti,dual-volt: boolean, supports dual voltage cards + ti,non-removable: non-removable slot (like eMMC) + ti,needs-special-reset: Requires a special softreset sequence + ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed ++dmas: List of DMA specifiers with the controller specific format ++as described in the generic DMA client binding. A tx and rx ++specifier is required. ++dma-names: List of DMA request names. These strings correspond ++1:1 with the DMA specifiers listed in dmas. The string naming is ++to be "rx" and "tx" for RX and TX DMA requests, respectively. ++ ++Examples: ++ ++[hwmod populated DMA resources] ++ ++ mmc1: mmc@0x4809c000 { ++ compatible = "ti,omap4-hsmmc"; ++ reg = <0x4809c000 0x400>; ++ ti,hwmods = "mmc1"; ++ ti,dual-volt; ++ bus-width = <4>; ++ vmmc-supply = <&vmmc>; /* phandle to regulator node */ ++ ti,non-removable; ++ }; ++ ++[generic DMA request binding] + +-Example: + mmc1: mmc@0x4809c000 { + compatible = "ti,omap4-hsmmc"; + reg = <0x4809c000 0x400>; +@@ -30,4 +51,7 @@ Example: + bus-width = <4>; + vmmc-supply = <&vmmc>; /* phandle to regulator node */ + ti,non-removable; ++ dmas = <&edma 24 ++ &edma 25>; ++ dma-names = "tx", "rx"; + }; +diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts +index 7993c48..d5f43fe 100644 +--- a/arch/arm/boot/dts/am335x-bone.dts ++++ b/arch/arm/boot/dts/am335x-bone.dts +@@ -9,3 +9,14 @@ + + #include "am33xx.dtsi" + #include "am335x-bone-common.dtsi" ++ ++&ldo3_reg { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++}; ++ ++&mmc1 { ++ status = "okay"; ++ vmmc-supply = <&ldo3_reg>; ++}; +diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts +index e8ec875..bc4a69d 100644 +--- a/arch/arm/boot/dts/am335x-evm.dts ++++ b/arch/arm/boot/dts/am335x-evm.dts +@@ -477,6 +477,8 @@ + }; + + vmmc_reg: regulator@12 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; +@@ -517,3 +519,8 @@ + ti,adc-channels = <4 5 6 7>; + }; + }; ++ ++&mmc1 { ++ status = "okay"; ++ vmmc-supply = <&vmmc_reg>; ++}; +diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts +index 4f339fa..55fd194 100644 +--- a/arch/arm/boot/dts/am335x-evmsk.dts ++++ b/arch/arm/boot/dts/am335x-evmsk.dts +@@ -393,6 +393,8 @@ + }; + + vmmc_reg: regulator@12 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; +@@ -419,3 +421,8 @@ + phy_id = <&davinci_mdio>, <1>; + phy-mode = "rgmii-txid"; + }; ++ ++&mmc1 { ++ status = "okay"; ++ vmmc-supply = <&vmmc_reg>; ++}; +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index 9cd60bf..553adc6 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -245,6 +245,44 @@ + status = "disabled"; + }; + ++ mmc1: mmc@48060000 { ++ compatible = "ti,omap4-hsmmc"; ++ ti,hwmods = "mmc1"; ++ ti,dual-volt; ++ ti,needs-special-reset; ++ ti,needs-special-hs-handling; ++ dmas = <&edma 24 ++ &edma 25>; ++ dma-names = "tx", "rx"; ++ interrupts = <64>; ++ interrupt-parent = <&intc>; ++ reg = <0x48060000 0x1000>; ++ status = "disabled"; ++ }; ++ ++ mmc2: mmc@481d8000 { ++ compatible = "ti,omap4-hsmmc"; ++ ti,hwmods = "mmc2"; ++ ti,needs-special-reset; ++ dmas = <&edma 2 ++ &edma 3>; ++ dma-names = "tx", "rx"; ++ interrupts = <28>; ++ interrupt-parent = <&intc>; ++ reg = <0x481d8000 0x1000>; ++ status = "disabled"; ++ }; ++ ++ mmc3: mmc@47810000 { ++ compatible = "ti,omap4-hsmmc"; ++ ti,hwmods = "mmc3"; ++ ti,needs-special-reset; ++ interrupts = <29>; ++ interrupt-parent = <&intc>; ++ reg = <0x47810000 0x1000>; ++ status = "disabled"; ++ }; ++ + wdt2: wdt@44e35000 { + compatible = "ti,omap3-wdt"; + ti,hwmods = "wd_timer2"; +-- +1.8.4.rc3 + +From 889d5b18a88681d7d1e5a1d1b5d2ffda07c506df Mon Sep 17 00:00:00 2001 +From: Alexander Holler +Date: Thu, 12 Sep 2013 20:35:32 +0200 +Subject: [PATCH 06/15] ARM: dts: am335x-bone: add CD for mmc1 + +This enables the use of MMC cards even when no card was inserted at boot. + +Signed-off-by: Alexander Holler +Signed-off-by: Koen Kooi +Tested-by: Kevin Hilman +Reviewed-by: Nishanth Menon +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 14 ++++++++++++++ + arch/arm/boot/dts/am335x-bone.dts | 1 - + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index 2f66ded..0d95d54 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -107,6 +107,12 @@ + 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; ++ ++ mmc1_pins: pinmux_mmc1_pins { ++ pinctrl-single,pins = < ++ 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */ ++ >; ++ }; + }; + + ocp { +@@ -260,3 +266,11 @@ + pinctrl-0 = <&davinci_mdio_default>; + pinctrl-1 = <&davinci_mdio_sleep>; + }; ++ ++&mmc1 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; ++ cd-inverted; ++}; +diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts +index d5f43fe..0d63348 100644 +--- a/arch/arm/boot/dts/am335x-bone.dts ++++ b/arch/arm/boot/dts/am335x-bone.dts +@@ -17,6 +17,5 @@ + }; + + &mmc1 { +- status = "okay"; + vmmc-supply = <&ldo3_reg>; + }; +-- +1.8.4.rc3 + +From 7e60fa2391c2e89f07452c2037209235dee67aee Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 12 Sep 2013 20:35:33 +0200 +Subject: [PATCH 07/15] ARM: dts: am335x-boneblack: add eMMC DT entry + +The pinmux is specified in am335x-bone-common.dtsi to be +reused by the eMMC cape. + +Signed-off-by: Koen Kooi +Tested-by: Kevin Hilman +Reviewed-by: Nishanth Menon +[bcousson@baylibre.com: Fix traling spaces and useless comments] +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 22 ++++++++++++++++++++++ + arch/arm/boot/dts/am335x-boneblack.dts | 13 +++++++++++++ + 2 files changed, 35 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index 0d95d54..c560cb7 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -113,6 +113,21 @@ + 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */ + >; + }; ++ ++ emmc_pins: pinmux_emmc_pins { ++ pinctrl-single,pins = < ++ 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ ++ 0x84 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_csn2.mmc1_cmd */ ++ 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ ++ 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ ++ 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ ++ 0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ ++ 0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ ++ 0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ ++ 0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ ++ 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ ++ >; ++ }; + }; + + ocp { +@@ -242,6 +257,13 @@ + regulator-always-on; + }; + }; ++ ++ vmmcsd_fixed: fixedregulator@0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "vmmcsd_fixed"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; + }; + + &cpsw_emac0 { +diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts +index 197cadf..16b3bea 100644 +--- a/arch/arm/boot/dts/am335x-boneblack.dts ++++ b/arch/arm/boot/dts/am335x-boneblack.dts +@@ -15,3 +15,16 @@ + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; ++ ++&mmc1 { ++ vmmc-supply = <&vmmcsd_fixed>; ++}; ++ ++&mmc2 { ++ vmmc-supply = <&vmmcsd_fixed>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_pins>; ++ bus-width = <8>; ++ status = "okay"; ++ ti,vcc-aux-disable-is-sleep; ++}; +-- +1.8.4.rc3 + +From 2b3a35fea12469734e2216a06c7fea6d5cb0d4d8 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 12 Sep 2013 20:35:34 +0200 +Subject: [PATCH 08/15] ARM: dts: am335x-bone-common: switch mmc1 to 4-bit mode + +The micro-SD slot hooks up all four data pins so lets' use them. + +Signed-off-by: Koen Kooi +Tested-by: Kevin Hilman +Reviewed-by: Nishanth Menon +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index c560cb7..fbb11dd 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -291,6 +291,7 @@ + + &mmc1 { + status = "okay"; ++ bus-width = <0x4>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; +-- +1.8.4.rc3 + +From 387d315741b4126f228ee788094f9a00ecf8fde0 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 12 Sep 2013 20:35:35 +0200 +Subject: [PATCH 09/15] ARM: dts: am335x-bone-common: add cpu0 and mmc1 + triggers + +This matches the vendor 3.8.x configuration that is shipping +with the boards. + +The LED layout is now: + USR0: heartbeat + USR1: mmc0 (micro-SD slot) + USR2: cpu0 + USR3: mmc1 (eMMC) + +The cpu0 triggers was put in between the mmc triggers to make +is easier to see where the disk activity is. + +Signed-off-by: Koen Kooi +Tested-by: Kevin Hilman +Reviewed-by: Nishanth Menon +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index fbb11dd..56361ce 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -204,12 +204,14 @@ + led@4 { + label = "beaglebone:green:usr2"; + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "cpu0"; + default-state = "off"; + }; + + led@5 { + label = "beaglebone:green:usr3"; + gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "mmc1"; + default-state = "off"; + }; + }; +-- +1.8.4.rc3 + +From 28d36734db6d9682208ced9032de9ebda568da96 Mon Sep 17 00:00:00 2001 +From: Javier Martinez Canillas +Date: Fri, 20 Sep 2013 17:00:00 +0200 +Subject: [PATCH 10/15] ARM: dts: AM33XX: use pinmux node defined in included + file + +am33xx boards DTS include the am33xx.dtsi Device Tree +source file that already define a pinmux device node for +the AM33XX SoC Pin Multiplex. + +Redefining this for each board makes the Device Tree files +harder to modify and maintain so let's just use what is +already defined in the included .dtsi file. + +Signed-off-by: Javier Martinez Canillas +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 218 ++++++++++++------------- + arch/arm/boot/dts/am335x-evm.dts | 254 ++++++++++++++--------------- + arch/arm/boot/dts/am335x-evmsk.dts | 258 +++++++++++++++--------------- + 3 files changed, 365 insertions(+), 365 deletions(-) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index 56361ce..29799ac 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -21,115 +21,6 @@ + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + +- am33xx_pinmux: pinmux@44e10800 { +- pinctrl-names = "default"; +- pinctrl-0 = <&clkout2_pin>; +- +- user_leds_s0: user_leds_s0 { +- pinctrl-single,pins = < +- 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ +- 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ +- 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ +- 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ +- >; +- }; +- +- i2c0_pins: pinmux_i2c0_pins { +- pinctrl-single,pins = < +- 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ +- 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ +- >; +- }; +- +- uart0_pins: pinmux_uart0_pins { +- pinctrl-single,pins = < +- 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ +- 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ +- >; +- }; +- +- clkout2_pin: pinmux_clkout2_pin { +- pinctrl-single,pins = < +- 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ +- >; +- }; +- +- cpsw_default: cpsw_default { +- pinctrl-single,pins = < +- /* Slave 1 */ +- 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ +- 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ +- 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ +- 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ +- 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ +- 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ +- 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ +- 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ +- 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ +- 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ +- 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ +- 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ +- 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ +- >; +- }; +- +- cpsw_sleep: cpsw_sleep { +- pinctrl-single,pins = < +- /* Slave 1 reset value */ +- 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- >; +- }; +- +- davinci_mdio_default: davinci_mdio_default { +- pinctrl-single,pins = < +- /* MDIO */ +- 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ +- 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ +- >; +- }; +- +- davinci_mdio_sleep: davinci_mdio_sleep { +- pinctrl-single,pins = < +- /* MDIO reset value */ +- 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- >; +- }; +- +- mmc1_pins: pinmux_mmc1_pins { +- pinctrl-single,pins = < +- 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */ +- >; +- }; +- +- emmc_pins: pinmux_emmc_pins { +- pinctrl-single,pins = < +- 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ +- 0x84 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_csn2.mmc1_cmd */ +- 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ +- 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ +- 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ +- 0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ +- 0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ +- 0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ +- 0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ +- 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ +- >; +- }; +- }; +- + ocp { + uart0: serial@44e09000 { + pinctrl-names = "default"; +@@ -217,6 +108,115 @@ + }; + }; + ++&am33xx_pinmux { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&clkout2_pin>; ++ ++ user_leds_s0: user_leds_s0 { ++ pinctrl-single,pins = < ++ 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ ++ 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ ++ 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ ++ 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ ++ >; ++ }; ++ ++ i2c0_pins: pinmux_i2c0_pins { ++ pinctrl-single,pins = < ++ 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ ++ 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ ++ >; ++ }; ++ ++ uart0_pins: pinmux_uart0_pins { ++ pinctrl-single,pins = < ++ 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ ++ 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ ++ >; ++ }; ++ ++ clkout2_pin: pinmux_clkout2_pin { ++ pinctrl-single,pins = < ++ 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ ++ >; ++ }; ++ ++ cpsw_default: cpsw_default { ++ pinctrl-single,pins = < ++ /* Slave 1 */ ++ 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ ++ 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ ++ 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ ++ 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ ++ 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ ++ 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ ++ 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ ++ 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ ++ 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ ++ 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ ++ 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ ++ 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ ++ 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ ++ >; ++ }; ++ ++ cpsw_sleep: cpsw_sleep { ++ pinctrl-single,pins = < ++ /* Slave 1 reset value */ ++ 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ >; ++ }; ++ ++ davinci_mdio_default: davinci_mdio_default { ++ pinctrl-single,pins = < ++ /* MDIO */ ++ 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ ++ 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ ++ >; ++ }; ++ ++ davinci_mdio_sleep: davinci_mdio_sleep { ++ pinctrl-single,pins = < ++ /* MDIO reset value */ ++ 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ >; ++ }; ++ ++ mmc1_pins: pinmux_mmc1_pins { ++ pinctrl-single,pins = < ++ 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */ ++ >; ++ }; ++ ++ emmc_pins: pinmux_emmc_pins { ++ pinctrl-single,pins = < ++ 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ ++ 0x84 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_csn2.mmc1_cmd */ ++ 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ ++ 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ ++ 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ ++ 0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ ++ 0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ ++ 0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ ++ 0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ ++ 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ ++ >; ++ }; ++}; ++ + /include/ "tps65217.dtsi" + + &tps { +diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts +index bc4a69d..1525cd6 100644 +--- a/arch/arm/boot/dts/am335x-evm.dts ++++ b/arch/arm/boot/dts/am335x-evm.dts +@@ -24,133 +24,6 @@ + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + +- am33xx_pinmux: pinmux@44e10800 { +- pinctrl-names = "default"; +- pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>; +- +- matrix_keypad_s0: matrix_keypad_s0 { +- pinctrl-single,pins = < +- 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ +- 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a6.gpio1_22 */ +- 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.gpio1_25 */ +- 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a10.gpio1_26 */ +- 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.gpio1_27 */ +- >; +- }; +- +- volume_keys_s0: volume_keys_s0 { +- pinctrl-single,pins = < +- 0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_sclk.gpio0_2 */ +- 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d0.gpio0_3 */ +- >; +- }; +- +- i2c0_pins: pinmux_i2c0_pins { +- pinctrl-single,pins = < +- 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ +- 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ +- >; +- }; +- +- i2c1_pins: pinmux_i2c1_pins { +- pinctrl-single,pins = < +- 0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */ +- 0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */ +- >; +- }; +- +- uart0_pins: pinmux_uart0_pins { +- pinctrl-single,pins = < +- 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ +- 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ +- >; +- }; +- +- clkout2_pin: pinmux_clkout2_pin { +- pinctrl-single,pins = < +- 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ +- >; +- }; +- +- nandflash_pins_s0: nandflash_pins_s0 { +- pinctrl-single,pins = < +- 0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ +- 0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ +- 0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ +- 0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ +- 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ +- 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ +- 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ +- 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ +- 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ +- 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ +- 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ +- 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ +- 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ +- 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ +- 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ +- >; +- }; +- +- ecap0_pins: backlight_pins { +- pinctrl-single,pins = < +- 0x164 0x0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */ +- >; +- }; +- +- cpsw_default: cpsw_default { +- pinctrl-single,pins = < +- /* Slave 1 */ +- 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */ +- 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ +- 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ +- 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ +- 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ +- 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ +- 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ +- 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ +- 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ +- 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ +- 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ +- 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ +- >; +- }; +- +- cpsw_sleep: cpsw_sleep { +- pinctrl-single,pins = < +- /* Slave 1 reset value */ +- 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- >; +- }; +- +- davinci_mdio_default: davinci_mdio_default { +- pinctrl-single,pins = < +- /* MDIO */ +- 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ +- 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ +- >; +- }; +- +- davinci_mdio_sleep: davinci_mdio_sleep { +- pinctrl-single,pins = < +- /* MDIO reset value */ +- 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- >; +- }; +- }; +- + ocp { + uart0: serial@44e09000 { + pinctrl-names = "default"; +@@ -405,6 +278,133 @@ + }; + }; + ++&am33xx_pinmux { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>; ++ ++ matrix_keypad_s0: matrix_keypad_s0 { ++ pinctrl-single,pins = < ++ 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ ++ 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a6.gpio1_22 */ ++ 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.gpio1_25 */ ++ 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a10.gpio1_26 */ ++ 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.gpio1_27 */ ++ >; ++ }; ++ ++ volume_keys_s0: volume_keys_s0 { ++ pinctrl-single,pins = < ++ 0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_sclk.gpio0_2 */ ++ 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d0.gpio0_3 */ ++ >; ++ }; ++ ++ i2c0_pins: pinmux_i2c0_pins { ++ pinctrl-single,pins = < ++ 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ ++ 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ ++ >; ++ }; ++ ++ i2c1_pins: pinmux_i2c1_pins { ++ pinctrl-single,pins = < ++ 0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */ ++ 0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */ ++ >; ++ }; ++ ++ uart0_pins: pinmux_uart0_pins { ++ pinctrl-single,pins = < ++ 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ ++ 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ ++ >; ++ }; ++ ++ clkout2_pin: pinmux_clkout2_pin { ++ pinctrl-single,pins = < ++ 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ ++ >; ++ }; ++ ++ nandflash_pins_s0: nandflash_pins_s0 { ++ pinctrl-single,pins = < ++ 0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ ++ 0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ ++ 0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ ++ 0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ ++ 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ ++ 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ ++ 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ ++ 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ ++ 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ ++ 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ ++ 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ ++ 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ ++ 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ ++ 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ ++ 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ ++ >; ++ }; ++ ++ ecap0_pins: backlight_pins { ++ pinctrl-single,pins = < ++ 0x164 0x0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */ ++ >; ++ }; ++ ++ cpsw_default: cpsw_default { ++ pinctrl-single,pins = < ++ /* Slave 1 */ ++ 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */ ++ 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ ++ 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ ++ 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ ++ 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ ++ 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ ++ 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ ++ 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ ++ 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ ++ 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ ++ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ ++ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ ++ >; ++ }; ++ ++ cpsw_sleep: cpsw_sleep { ++ pinctrl-single,pins = < ++ /* Slave 1 reset value */ ++ 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ >; ++ }; ++ ++ davinci_mdio_default: davinci_mdio_default { ++ pinctrl-single,pins = < ++ /* MDIO */ ++ 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ ++ 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ ++ >; ++ }; ++ ++ davinci_mdio_sleep: davinci_mdio_sleep { ++ pinctrl-single,pins = < ++ /* MDIO reset value */ ++ 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ >; ++ }; ++}; ++ + #include "tps65910.dtsi" + + &tps { +diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts +index 55fd194..f0066fe 100644 +--- a/arch/arm/boot/dts/am335x-evmsk.dts ++++ b/arch/arm/boot/dts/am335x-evmsk.dts +@@ -31,135 +31,6 @@ + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + +- am33xx_pinmux: pinmux@44e10800 { +- pinctrl-names = "default"; +- pinctrl-0 = <&gpio_keys_s0 &clkout2_pin>; +- +- user_leds_s0: user_leds_s0 { +- pinctrl-single,pins = < +- 0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */ +- 0x14 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */ +- 0x18 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */ +- 0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */ +- >; +- }; +- +- gpio_keys_s0: gpio_keys_s0 { +- pinctrl-single,pins = < +- 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_oen_ren.gpio2_3 */ +- 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_advn_ale.gpio2_2 */ +- 0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_wait0.gpio0_30 */ +- 0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ben0_cle.gpio2_5 */ +- >; +- }; +- +- i2c0_pins: pinmux_i2c0_pins { +- pinctrl-single,pins = < +- 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ +- 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ +- >; +- }; +- +- uart0_pins: pinmux_uart0_pins { +- pinctrl-single,pins = < +- 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ +- 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ +- >; +- }; +- +- clkout2_pin: pinmux_clkout2_pin { +- pinctrl-single,pins = < +- 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ +- >; +- }; +- +- ecap2_pins: backlight_pins { +- pinctrl-single,pins = < +- 0x19c 0x4 /* mcasp0_ahclkr.ecap2_in_pwm2_out MODE4 */ +- >; +- }; +- +- cpsw_default: cpsw_default { +- pinctrl-single,pins = < +- /* Slave 1 */ +- 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */ +- 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ +- 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ +- 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ +- 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ +- 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ +- 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ +- 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ +- 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ +- 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ +- 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ +- 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ +- +- /* Slave 2 */ +- 0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ +- 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ +- 0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ +- 0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ +- 0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ +- 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ +- 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ +- 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ +- 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ +- 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ +- 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ +- 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ +- >; +- }; +- +- cpsw_sleep: cpsw_sleep { +- pinctrl-single,pins = < +- /* Slave 1 reset value */ +- 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- +- /* Slave 2 reset value*/ +- 0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- >; +- }; +- +- davinci_mdio_default: davinci_mdio_default { +- pinctrl-single,pins = < +- /* MDIO */ +- 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ +- 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ +- >; +- }; +- +- davinci_mdio_sleep: davinci_mdio_sleep { +- pinctrl-single,pins = < +- /* MDIO reset value */ +- 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) +- 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) +- >; +- }; +- }; +- + ocp { + uart0: serial@44e09000 { + pinctrl-names = "default"; +@@ -321,6 +192,135 @@ + }; + }; + ++&am33xx_pinmux { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio_keys_s0 &clkout2_pin>; ++ ++ user_leds_s0: user_leds_s0 { ++ pinctrl-single,pins = < ++ 0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */ ++ 0x14 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */ ++ 0x18 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */ ++ 0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */ ++ >; ++ }; ++ ++ gpio_keys_s0: gpio_keys_s0 { ++ pinctrl-single,pins = < ++ 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_oen_ren.gpio2_3 */ ++ 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_advn_ale.gpio2_2 */ ++ 0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_wait0.gpio0_30 */ ++ 0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ben0_cle.gpio2_5 */ ++ >; ++ }; ++ ++ i2c0_pins: pinmux_i2c0_pins { ++ pinctrl-single,pins = < ++ 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ ++ 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ ++ >; ++ }; ++ ++ uart0_pins: pinmux_uart0_pins { ++ pinctrl-single,pins = < ++ 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ ++ 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ ++ >; ++ }; ++ ++ clkout2_pin: pinmux_clkout2_pin { ++ pinctrl-single,pins = < ++ 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ ++ >; ++ }; ++ ++ ecap2_pins: backlight_pins { ++ pinctrl-single,pins = < ++ 0x19c 0x4 /* mcasp0_ahclkr.ecap2_in_pwm2_out MODE4 */ ++ >; ++ }; ++ ++ cpsw_default: cpsw_default { ++ pinctrl-single,pins = < ++ /* Slave 1 */ ++ 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */ ++ 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ ++ 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ ++ 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ ++ 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ ++ 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ ++ 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ ++ 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ ++ 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ ++ 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ ++ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ ++ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ ++ ++ /* Slave 2 */ ++ 0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */ ++ 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */ ++ 0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */ ++ 0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */ ++ 0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */ ++ 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */ ++ 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */ ++ 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */ ++ 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */ ++ 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */ ++ 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */ ++ 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */ ++ >; ++ }; ++ ++ cpsw_sleep: cpsw_sleep { ++ pinctrl-single,pins = < ++ /* Slave 1 reset value */ ++ 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ ++ /* Slave 2 reset value*/ ++ 0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ >; ++ }; ++ ++ davinci_mdio_default: davinci_mdio_default { ++ pinctrl-single,pins = < ++ /* MDIO */ ++ 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ ++ 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ ++ >; ++ }; ++ ++ davinci_mdio_sleep: davinci_mdio_sleep { ++ pinctrl-single,pins = < ++ /* MDIO reset value */ ++ 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) ++ >; ++ }; ++}; ++ + #include "tps65910.dtsi" + + &tps { +-- +1.8.4.rc3 + +From ff7a46710ffc245a5c8e32cf1843aa3fea7aa1ff Mon Sep 17 00:00:00 2001 +From: Javier Martinez Canillas +Date: Fri, 20 Sep 2013 17:42:19 +0200 +Subject: [PATCH 11/15] ARM: dts: AM33XX: don't redefine OCP bus and device + nodes + +The On Chip Peripherals (OCP) device node is a simplified +representation of the AM33XX SoC interconnect. An OCP dev +node is already defined in the am33xx.dtsi Device Tree +source file included by am33xx based boards so there is +no need to redefine this on each board DT file. + +Also, the OCP and IP modules directly connected to it are SoC +internal details that is better to keep outside of board files. + +Signed-off-by: Javier Martinez Canillas +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 100 ++++---- + arch/arm/boot/dts/am335x-evm.dts | 380 +++++++++++++++--------------- + arch/arm/boot/dts/am335x-evmsk.dts | 148 ++++++------ + 3 files changed, 311 insertions(+), 317 deletions(-) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index 29799ac..ff5c3ca 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -21,57 +21,6 @@ + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + +- ocp { +- uart0: serial@44e09000 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins>; +- +- status = "okay"; +- }; +- +- musb: usb@47400000 { +- status = "okay"; +- +- control@44e10000 { +- status = "okay"; +- }; +- +- usb-phy@47401300 { +- status = "okay"; +- }; +- +- usb-phy@47401b00 { +- status = "okay"; +- }; +- +- usb@47401000 { +- status = "okay"; +- }; +- +- usb@47401800 { +- status = "okay"; +- dr_mode = "host"; +- }; +- +- dma-controller@07402000 { +- status = "okay"; +- }; +- }; +- +- i2c0: i2c@44e0b000 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c0_pins>; +- +- status = "okay"; +- clock-frequency = <400000>; +- +- tps: tps@24 { +- reg = <0x24>; +- }; +- +- }; +- }; +- + leds { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_s0>; +@@ -217,6 +166,55 @@ + }; + }; + ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ ++ status = "okay"; ++}; ++ ++&usb { ++ status = "okay"; ++ ++ control@44e10000 { ++ status = "okay"; ++ }; ++ ++ usb-phy@47401300 { ++ status = "okay"; ++ }; ++ ++ usb-phy@47401b00 { ++ status = "okay"; ++ }; ++ ++ usb@47401000 { ++ status = "okay"; ++ }; ++ ++ usb@47401800 { ++ status = "okay"; ++ dr_mode = "host"; ++ }; ++ ++ dma-controller@07402000 { ++ status = "okay"; ++ }; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins>; ++ ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ tps: tps@24 { ++ reg = <0x24>; ++ }; ++ ++}; ++ + /include/ "tps65217.dtsi" + + &tps { +diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts +index 1525cd6..23b0a3e 100644 +--- a/arch/arm/boot/dts/am335x-evm.dts ++++ b/arch/arm/boot/dts/am335x-evm.dts +@@ -24,197 +24,6 @@ + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + +- ocp { +- uart0: serial@44e09000 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins>; +- +- status = "okay"; +- }; +- +- i2c0: i2c@44e0b000 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c0_pins>; +- +- status = "okay"; +- clock-frequency = <400000>; +- +- tps: tps@2d { +- reg = <0x2d>; +- }; +- }; +- +- musb: usb@47400000 { +- status = "okay"; +- +- control@44e10000 { +- status = "okay"; +- }; +- +- usb-phy@47401300 { +- status = "okay"; +- }; +- +- usb-phy@47401b00 { +- status = "okay"; +- }; +- +- usb@47401000 { +- status = "okay"; +- }; +- +- usb@47401800 { +- status = "okay"; +- dr_mode = "host"; +- }; +- +- dma-controller@07402000 { +- status = "okay"; +- }; +- }; +- +- i2c1: i2c@4802a000 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c1_pins>; +- +- status = "okay"; +- clock-frequency = <100000>; +- +- lis331dlh: lis331dlh@18 { +- compatible = "st,lis331dlh", "st,lis3lv02d"; +- reg = <0x18>; +- Vdd-supply = <&lis3_reg>; +- Vdd_IO-supply = <&lis3_reg>; +- +- st,click-single-x; +- st,click-single-y; +- st,click-single-z; +- st,click-thresh-x = <10>; +- st,click-thresh-y = <10>; +- st,click-thresh-z = <10>; +- st,irq1-click; +- st,irq2-click; +- st,wakeup-x-lo; +- st,wakeup-x-hi; +- st,wakeup-y-lo; +- st,wakeup-y-hi; +- st,wakeup-z-lo; +- st,wakeup-z-hi; +- st,min-limit-x = <120>; +- st,min-limit-y = <120>; +- st,min-limit-z = <140>; +- st,max-limit-x = <550>; +- st,max-limit-y = <550>; +- st,max-limit-z = <750>; +- }; +- +- tsl2550: tsl2550@39 { +- compatible = "taos,tsl2550"; +- reg = <0x39>; +- }; +- +- tmp275: tmp275@48 { +- compatible = "ti,tmp275"; +- reg = <0x48>; +- }; +- }; +- +- elm: elm@48080000 { +- status = "okay"; +- }; +- +- epwmss0: epwmss@48300000 { +- status = "okay"; +- +- ecap0: ecap@48300100 { +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&ecap0_pins>; +- }; +- }; +- +- gpmc: gpmc@50000000 { +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&nandflash_pins_s0>; +- ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ +- nand@0,0 { +- reg = <0 0 0>; /* CS0, offset 0 */ +- nand-bus-width = <8>; +- ti,nand-ecc-opt = "bch8"; +- gpmc,device-nand = "true"; +- gpmc,device-width = <1>; +- gpmc,sync-clk-ps = <0>; +- gpmc,cs-on-ns = <0>; +- gpmc,cs-rd-off-ns = <44>; +- gpmc,cs-wr-off-ns = <44>; +- gpmc,adv-on-ns = <6>; +- gpmc,adv-rd-off-ns = <34>; +- gpmc,adv-wr-off-ns = <44>; +- gpmc,we-on-ns = <0>; +- gpmc,we-off-ns = <40>; +- gpmc,oe-on-ns = <0>; +- gpmc,oe-off-ns = <54>; +- gpmc,access-ns = <64>; +- gpmc,rd-cycle-ns = <82>; +- gpmc,wr-cycle-ns = <82>; +- gpmc,wait-on-read = "true"; +- gpmc,wait-on-write = "true"; +- gpmc,bus-turnaround-ns = <0>; +- gpmc,cycle2cycle-delay-ns = <0>; +- gpmc,clk-activation-ns = <0>; +- gpmc,wait-monitoring-ns = <0>; +- gpmc,wr-access-ns = <40>; +- gpmc,wr-data-mux-bus-ns = <0>; +- +- #address-cells = <1>; +- #size-cells = <1>; +- elm_id = <&elm>; +- +- /* MTD partition table */ +- partition@0 { +- label = "SPL1"; +- reg = <0x00000000 0x000020000>; +- }; +- +- partition@1 { +- label = "SPL2"; +- reg = <0x00020000 0x00020000>; +- }; +- +- partition@2 { +- label = "SPL3"; +- reg = <0x00040000 0x00020000>; +- }; +- +- partition@3 { +- label = "SPL4"; +- reg = <0x00060000 0x00020000>; +- }; +- +- partition@4 { +- label = "U-boot"; +- reg = <0x00080000 0x001e0000>; +- }; +- +- partition@5 { +- label = "environment"; +- reg = <0x00260000 0x00020000>; +- }; +- +- partition@6 { +- label = "Kernel"; +- reg = <0x00280000 0x00500000>; +- }; +- +- partition@7 { +- label = "File-System"; +- reg = <0x00780000 0x0F880000>; +- }; +- }; +- }; +- }; +- + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; +@@ -405,6 +214,195 @@ + }; + }; + ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ ++ status = "okay"; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins>; ++ ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ tps: tps@2d { ++ reg = <0x2d>; ++ }; ++}; ++ ++&usb { ++ status = "okay"; ++ ++ control@44e10000 { ++ status = "okay"; ++ }; ++ ++ usb-phy@47401300 { ++ status = "okay"; ++ }; ++ ++ usb-phy@47401b00 { ++ status = "okay"; ++ }; ++ ++ usb@47401000 { ++ status = "okay"; ++ }; ++ ++ usb@47401800 { ++ status = "okay"; ++ dr_mode = "host"; ++ }; ++ ++ dma-controller@07402000 { ++ status = "okay"; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ ++ status = "okay"; ++ clock-frequency = <100000>; ++ ++ lis331dlh: lis331dlh@18 { ++ compatible = "st,lis331dlh", "st,lis3lv02d"; ++ reg = <0x18>; ++ Vdd-supply = <&lis3_reg>; ++ Vdd_IO-supply = <&lis3_reg>; ++ ++ st,click-single-x; ++ st,click-single-y; ++ st,click-single-z; ++ st,click-thresh-x = <10>; ++ st,click-thresh-y = <10>; ++ st,click-thresh-z = <10>; ++ st,irq1-click; ++ st,irq2-click; ++ st,wakeup-x-lo; ++ st,wakeup-x-hi; ++ st,wakeup-y-lo; ++ st,wakeup-y-hi; ++ st,wakeup-z-lo; ++ st,wakeup-z-hi; ++ st,min-limit-x = <120>; ++ st,min-limit-y = <120>; ++ st,min-limit-z = <140>; ++ st,max-limit-x = <550>; ++ st,max-limit-y = <550>; ++ st,max-limit-z = <750>; ++ }; ++ ++ tsl2550: tsl2550@39 { ++ compatible = "taos,tsl2550"; ++ reg = <0x39>; ++ }; ++ ++ tmp275: tmp275@48 { ++ compatible = "ti,tmp275"; ++ reg = <0x48>; ++ }; ++}; ++ ++&elm { ++ status = "okay"; ++}; ++ ++&epwmss0 { ++ status = "okay"; ++ ++ ecap0: ecap@48300100 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ecap0_pins>; ++ }; ++}; ++ ++&gpmc { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&nandflash_pins_s0>; ++ ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ ++ nand@0,0 { ++ reg = <0 0 0>; /* CS0, offset 0 */ ++ nand-bus-width = <8>; ++ ti,nand-ecc-opt = "bch8"; ++ gpmc,device-nand = "true"; ++ gpmc,device-width = <1>; ++ gpmc,sync-clk-ps = <0>; ++ gpmc,cs-on-ns = <0>; ++ gpmc,cs-rd-off-ns = <44>; ++ gpmc,cs-wr-off-ns = <44>; ++ gpmc,adv-on-ns = <6>; ++ gpmc,adv-rd-off-ns = <34>; ++ gpmc,adv-wr-off-ns = <44>; ++ gpmc,we-on-ns = <0>; ++ gpmc,we-off-ns = <40>; ++ gpmc,oe-on-ns = <0>; ++ gpmc,oe-off-ns = <54>; ++ gpmc,access-ns = <64>; ++ gpmc,rd-cycle-ns = <82>; ++ gpmc,wr-cycle-ns = <82>; ++ gpmc,wait-on-read = "true"; ++ gpmc,wait-on-write = "true"; ++ gpmc,bus-turnaround-ns = <0>; ++ gpmc,cycle2cycle-delay-ns = <0>; ++ gpmc,clk-activation-ns = <0>; ++ gpmc,wait-monitoring-ns = <0>; ++ gpmc,wr-access-ns = <40>; ++ gpmc,wr-data-mux-bus-ns = <0>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ elm_id = <&elm>; ++ ++ /* MTD partition table */ ++ partition@0 { ++ label = "SPL1"; ++ reg = <0x00000000 0x000020000>; ++ }; ++ ++ partition@1 { ++ label = "SPL2"; ++ reg = <0x00020000 0x00020000>; ++ }; ++ ++ partition@2 { ++ label = "SPL3"; ++ reg = <0x00040000 0x00020000>; ++ }; ++ ++ partition@3 { ++ label = "SPL4"; ++ reg = <0x00060000 0x00020000>; ++ }; ++ ++ partition@4 { ++ label = "U-boot"; ++ reg = <0x00080000 0x001e0000>; ++ }; ++ ++ partition@5 { ++ label = "environment"; ++ reg = <0x00260000 0x00020000>; ++ }; ++ ++ partition@6 { ++ label = "Kernel"; ++ reg = <0x00280000 0x00500000>; ++ }; ++ ++ partition@7 { ++ label = "File-System"; ++ reg = <0x00780000 0x0F880000>; ++ }; ++ }; ++}; ++ + #include "tps65910.dtsi" + + &tps { +diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts +index f0066fe..bc93895 100644 +--- a/arch/arm/boot/dts/am335x-evmsk.dts ++++ b/arch/arm/boot/dts/am335x-evmsk.dts +@@ -31,81 +31,6 @@ + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + +- ocp { +- uart0: serial@44e09000 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins>; +- +- status = "okay"; +- }; +- +- i2c0: i2c@44e0b000 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c0_pins>; +- +- status = "okay"; +- clock-frequency = <400000>; +- +- tps: tps@2d { +- reg = <0x2d>; +- }; +- +- lis331dlh: lis331dlh@18 { +- compatible = "st,lis331dlh", "st,lis3lv02d"; +- reg = <0x18>; +- Vdd-supply = <&lis3_reg>; +- Vdd_IO-supply = <&lis3_reg>; +- +- st,click-single-x; +- st,click-single-y; +- st,click-single-z; +- st,click-thresh-x = <10>; +- st,click-thresh-y = <10>; +- st,click-thresh-z = <10>; +- st,irq1-click; +- st,irq2-click; +- st,wakeup-x-lo; +- st,wakeup-x-hi; +- st,wakeup-y-lo; +- st,wakeup-y-hi; +- st,wakeup-z-lo; +- st,wakeup-z-hi; +- st,min-limit-x = <120>; +- st,min-limit-y = <120>; +- st,min-limit-z = <140>; +- st,max-limit-x = <550>; +- st,max-limit-y = <550>; +- st,max-limit-z = <750>; +- }; +- }; +- +- musb: usb@47400000 { +- status = "okay"; +- +- control@44e10000 { +- status = "okay"; +- }; +- +- usb-phy@47401300 { +- status = "okay"; +- }; +- +- usb@47401000 { +- status = "okay"; +- }; +- }; +- +- epwmss2: epwmss@48304000 { +- status = "okay"; +- +- ecap2: ecap@48304100 { +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&ecap2_pins>; +- }; +- }; +- }; +- + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; +@@ -321,6 +246,79 @@ + }; + }; + ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ ++ status = "okay"; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins>; ++ ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ tps: tps@2d { ++ reg = <0x2d>; ++ }; ++ ++ lis331dlh: lis331dlh@18 { ++ compatible = "st,lis331dlh", "st,lis3lv02d"; ++ reg = <0x18>; ++ Vdd-supply = <&lis3_reg>; ++ Vdd_IO-supply = <&lis3_reg>; ++ ++ st,click-single-x; ++ st,click-single-y; ++ st,click-single-z; ++ st,click-thresh-x = <10>; ++ st,click-thresh-y = <10>; ++ st,click-thresh-z = <10>; ++ st,irq1-click; ++ st,irq2-click; ++ st,wakeup-x-lo; ++ st,wakeup-x-hi; ++ st,wakeup-y-lo; ++ st,wakeup-y-hi; ++ st,wakeup-z-lo; ++ st,wakeup-z-hi; ++ st,min-limit-x = <120>; ++ st,min-limit-y = <120>; ++ st,min-limit-z = <140>; ++ st,max-limit-x = <550>; ++ st,max-limit-y = <550>; ++ st,max-limit-z = <750>; ++ }; ++}; ++ ++&usb { ++ status = "okay"; ++ ++ control@44e10000 { ++ status = "okay"; ++ }; ++ ++ usb-phy@47401300 { ++ status = "okay"; ++ }; ++ ++ usb@47401000 { ++ status = "okay"; ++ }; ++}; ++ ++&epwmss2 { ++ status = "okay"; ++ ++ ecap2: ecap@48304100 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ecap2_pins>; ++ }; ++}; ++ + #include "tps65910.dtsi" + + &tps { +-- +1.8.4.rc3 + +From a9a966a91ca0304de63c03ef5131c08b1d19f60d Mon Sep 17 00:00:00 2001 +From: Dan Murphy +Date: Wed, 2 Oct 2013 12:58:33 -0500 +Subject: [PATCH 12/15] ARM: dts: AM33XX: add ethernet alias's for am33xx + +Set the alias for ethernet0 and ethernet1 so that uBoot +can set the MAC address appropriately. + +Currently u-boot cannot find the alias and there for does +not set the MAC address. + +Signed-off-by: Dan Murphy +Tested-by: Mugunthan V N +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am33xx.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index 553adc6..8aabaa0 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -30,6 +30,8 @@ + usb1 = &usb1; + phy0 = &usb0_phy; + phy1 = &usb1_phy; ++ ethernet0 = &cpsw_emac0; ++ ethernet1 = &cpsw_emac1; + }; + + cpus { +-- +1.8.4.rc3 + +From 5339e0ba31b312715a5542a53c6a46c3e9a5f53b Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Mon, 30 Sep 2013 09:40:16 -0500 +Subject: [PATCH 13/15] ARM: dts: am335x-boneblack: move fixed regulator to + board level + +3.3V fixed regulator does not belong to TPS node - as a result +the fixed regulator is never probed and MMC is continually deferred +due to lack of regulator. + +Move the fixed regulator to be at root of platform. + +Cc: Joel Fernandes +Cc: Sekhar Nori +Cc: Koen Kooi +Signed-off-by: Nishanth Menon +Tested-by: Felipe Balbi +Tested-by: Balaji T K +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index ff5c3ca..b3e6fcf 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -55,6 +55,13 @@ + default-state = "off"; + }; + }; ++ ++ vmmcsd_fixed: fixedregulator@0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "vmmcsd_fixed"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; + }; + + &am33xx_pinmux { +@@ -257,13 +264,6 @@ + regulator-always-on; + }; + }; +- +- vmmcsd_fixed: fixedregulator@0 { +- compatible = "regulator-fixed"; +- regulator-name = "vmmcsd_fixed"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- }; + }; + + &cpsw_emac0 { +-- +1.8.4.rc3 + +From 085e4e139ae508aab69c568d6bf2a6860a0bd607 Mon Sep 17 00:00:00 2001 +From: Balaji T K +Date: Fri, 27 Sep 2013 17:05:09 +0530 +Subject: [PATCH 14/15] ARM: dts: am335x-bone-common: correct mux mode for cmd + line + +Set pinmux_emmc_pins mux mode for cmd line to MODE2 in order +to detect eMMC on BBB and BBW + eMMC cape. + +Signed-off-by: Balaji T K +Tested-by: Felipe Balbi +Signed-off-by: Benoit Cousson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index b3e6fcf..e3f27ec 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -160,7 +160,7 @@ + emmc_pins: pinmux_emmc_pins { + pinctrl-single,pins = < + 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ +- 0x84 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_csn2.mmc1_cmd */ ++ 0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ + 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ + 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ +-- +1.8.4.rc3 + +commit d6cfc1e266d34d5b1f8a26bb272d2d2c466d89b8 +Author: Benoit Parrot +Date: Thu Aug 8 18:28:14 2013 -0500 + + ARM: dts: AM33XX: Add LCDC info into am335x-evm + + Add LCDC device node in DT for am33xx + Add LCDC and Panel info in DT for am335x-evm + + Changes: + - remove redundant/unnecessary SoC specific setting in the board dts + - resolved conflicts on for_3.13/dts + + Signed-off-by: Benoit Parrot + Signed-off-by: Joel Fernandes + Signed-off-by: Benoit Cousson + +diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts +index ff834ad..eabacf9 100644 +--- a/arch/arm/boot/dts/am335x-evm.dts ++++ b/arch/arm/boot/dts/am335x-evm.dts +@@ -85,6 +85,40 @@ + brightness-levels = <0 51 53 56 62 75 101 152 255>; + default-brightness-level = <8>; + }; ++ ++ panel { ++ compatible = "ti,tilcdc,panel"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lcd_pins_s0>; ++ panel-info { ++ ac-bias = <255>; ++ ac-bias-intrpt = <0>; ++ dma-burst-sz = <16>; ++ bpp = <32>; ++ fdd = <0x80>; ++ sync-edge = <0>; ++ sync-ctrl = <1>; ++ raster-order = <0>; ++ fifo-th = <0>; ++ }; ++ ++ display-timings { ++ 800x480p62 { ++ clock-frequency = <30000000>; ++ hactive = <800>; ++ vactive = <480>; ++ hfront-porch = <39>; ++ hback-porch = <39>; ++ hsync-len = <47>; ++ vback-porch = <29>; ++ vfront-porch = <13>; ++ vsync-len = <2>; ++ hsync-active = <1>; ++ vsync-active = <1>; ++ }; ++ }; ++ }; + }; + + &am33xx_pinmux { +@@ -212,6 +246,39 @@ + 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; ++ ++ lcd_pins_s0: lcd_pins_s0 { ++ pinctrl-single,pins = < ++ 0x20 0x01 /* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */ ++ 0x24 0x01 /* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */ ++ 0x28 0x01 /* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */ ++ 0x2c 0x01 /* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */ ++ 0x30 0x01 /* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */ ++ 0x34 0x01 /* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */ ++ 0x38 0x01 /* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */ ++ 0x3c 0x01 /* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */ ++ 0xa0 0x00 /* lcd_data0.lcd_data0, OUTPUT | MODE0 */ ++ 0xa4 0x00 /* lcd_data1.lcd_data1, OUTPUT | MODE0 */ ++ 0xa8 0x00 /* lcd_data2.lcd_data2, OUTPUT | MODE0 */ ++ 0xac 0x00 /* lcd_data3.lcd_data3, OUTPUT | MODE0 */ ++ 0xb0 0x00 /* lcd_data4.lcd_data4, OUTPUT | MODE0 */ ++ 0xb4 0x00 /* lcd_data5.lcd_data5, OUTPUT | MODE0 */ ++ 0xb8 0x00 /* lcd_data6.lcd_data6, OUTPUT | MODE0 */ ++ 0xbc 0x00 /* lcd_data7.lcd_data7, OUTPUT | MODE0 */ ++ 0xc0 0x00 /* lcd_data8.lcd_data8, OUTPUT | MODE0 */ ++ 0xc4 0x00 /* lcd_data9.lcd_data9, OUTPUT | MODE0 */ ++ 0xc8 0x00 /* lcd_data10.lcd_data10, OUTPUT | MODE0 */ ++ 0xcc 0x00 /* lcd_data11.lcd_data11, OUTPUT | MODE0 */ ++ 0xd0 0x00 /* lcd_data12.lcd_data12, OUTPUT | MODE0 */ ++ 0xd4 0x00 /* lcd_data13.lcd_data13, OUTPUT | MODE0 */ ++ 0xd8 0x00 /* lcd_data14.lcd_data14, OUTPUT | MODE0 */ ++ 0xdc 0x00 /* lcd_data15.lcd_data15, OUTPUT | MODE0 */ ++ 0xe0 0x00 /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */ ++ 0xe4 0x00 /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */ ++ 0xe8 0x00 /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */ ++ 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */ ++ >; ++ }; + }; + + &uart0 { +@@ -308,6 +375,10 @@ + }; + }; + ++&lcdc { ++ status = "okay"; ++}; ++ + &elm { + status = "okay"; + }; +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index c87bf4b..7db3c81 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -684,6 +684,15 @@ + status = "disabled"; + }; + ++ lcdc: lcdc@4830e000 { ++ compatible = "ti,am33xx-tilcdc"; ++ reg = <0x4830e000 0x1000>; ++ interrupt-parent = <&intc>; ++ interrupts = <36>; ++ ti,hwmods = "lcdc"; ++ status = "disabled"; ++ }; ++ + tscadc: tscadc@44e0d000 { + compatible = "ti,am3359-tscadc"; + reg = <0x44e0d000 0x1000>; +commit 559a08e89350e269a4bba93629f39da5dd8e4fef +Author: Darren Etheridge +Date: Fri Sep 20 15:01:42 2013 -0500 + + ARM: dts: AM33XX beagle black: add pinmux and hdmi node to enable display + + Enable the hdmi output and the LCD Controller on BeagleBone + Black. Also configure the correct pinmux for output of + video data from the SoC to the HDMI encoder. + + Signed-off-by: Darren Etheridge + Signed-off-by: Joel Fernandes + Signed-off-by: Benoit Cousson + +diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts +index 16b3bea..6b71ad9 100644 +--- a/arch/arm/boot/dts/am335x-boneblack.dts ++++ b/arch/arm/boot/dts/am335x-boneblack.dts +@@ -28,3 +28,51 @@ + status = "okay"; + ti,vcc-aux-disable-is-sleep; + }; ++ ++&am33xx_pinmux { ++ nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { ++ pinctrl-single,pins = < ++ 0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ ++ 0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ ++ 0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ ++ 0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ ++ 0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ ++ 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ ++ >; ++ }; ++ nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { ++ pinctrl-single,pins = < ++ 0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ ++ >; ++ }; ++}; ++ ++&lcdc { ++ status = "okay"; ++}; ++ ++/ { ++ hdmi { ++ compatible = "ti,tilcdc,slave"; ++ i2c = <&i2c0>; ++ pinctrl-names = "default", "off"; ++ pinctrl-0 = <&nxp_hdmi_bonelt_pins>; ++ pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; ++ status = "okay"; ++ }; ++}; +commit d4cbe80db468dcfaa058f9f00a332784e5dff316 +Author: Suman Anna +Date: Thu Oct 10 16:15:35 2013 -0500 + + ARM: dts: AM33XX: Add hwspinlock node + + Add the hwspinlock device tree node for AM33xx family + of SoCs. + + Signed-off-by: Suman Anna + Signed-off-by: Tony Lindgren + +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index 0ca13ad..9ae258e 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -288,6 +288,12 @@ + status = "disabled"; + }; + ++ hwspinlock: spinlock@480ca000 { ++ compatible = "ti,omap4-hwspinlock"; ++ reg = <0x480ca000 0x1000>; ++ ti,hwmods = "spinlock"; ++ }; ++ + wdt2: wdt@44e35000 { + compatible = "ti,omap3-wdt"; + ti,hwmods = "wd_timer2"; diff --git a/arm-am33xx-bblack.patch b/arm-am33xx-bblack.patch new file mode 100644 index 000000000..4f62c9dd5 --- /dev/null +++ b/arm-am33xx-bblack.patch @@ -0,0 +1,610 @@ +Bugzilla: 1012025 +Upstream-status: In beagle github repository https://github.com/beagleboard/kernel + +From 82fe302f565e00cfde3e96c6132df93b39525e7b Mon Sep 17 00:00:00 2001 +From: Philipp Zabel +Date: Tue, 28 May 2013 17:06:15 +0200 +Subject: [PATCH] reset: Add driver for gpio-controlled reset pins + +This driver implements a reset controller device that toggle a gpio +connected to a reset pin of a peripheral IC. The delay between assertion +and de-assertion of the reset signal can be configured via device tree. + +Signed-off-by: Philipp Zabel +Reviewed-by: Stephen Warren +--- + .../devicetree/bindings/reset/gpio-reset.txt | 35 +++++ + drivers/reset/Kconfig | 11 ++ + drivers/reset/Makefile | 1 + + drivers/reset/gpio-reset.c | 169 +++++++++++++++++++++ + 4 files changed, 216 insertions(+) + create mode 100644 Documentation/devicetree/bindings/reset/gpio-reset.txt + create mode 100644 drivers/reset/gpio-reset.c + +diff --git a/Documentation/devicetree/bindings/reset/gpio-reset.txt b/Documentation/devicetree/bindings/reset/gpio-reset.txt +new file mode 100644 +index 0000000..bca5348 +--- /dev/null ++++ b/Documentation/devicetree/bindings/reset/gpio-reset.txt +@@ -0,0 +1,35 @@ ++GPIO reset controller ++===================== ++ ++A GPIO reset controller controls a single GPIO that is connected to the reset ++pin of a peripheral IC. Please also refer to reset.txt in this directory for ++common reset controller binding usage. ++ ++Required properties: ++- compatible: Should be "gpio-reset" ++- reset-gpios: A gpio used as reset line. The gpio specifier for this property ++ depends on the gpio controller that provides the gpio. ++- #reset-cells: 0, see below ++ ++Optional properties: ++- reset-delay-us: delay in microseconds. The gpio reset line will be asserted for ++ this duration to reset. ++- initially-in-reset: boolean. If not set, the initial state should be a ++ deasserted reset line. If this property exists, the ++ reset line should be kept in reset. ++ ++example: ++ ++sii902x_reset: gpio-reset { ++ compatible = "gpio-reset"; ++ reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; ++ reset-delay-us = <10000>; ++ initially-in-reset; ++ #reset-cells = <0>; ++}; ++ ++/* Device with nRESET pin connected to GPIO5_0 */ ++sii902x@39 { ++ /* ... */ ++ resets = <&sii902x_reset>; /* active-low GPIO5_0, 10 ms delay */ ++}; +diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig +index c9d04f7..1a862df 100644 +--- a/drivers/reset/Kconfig ++++ b/drivers/reset/Kconfig +@@ -11,3 +11,14 @@ menuconfig RESET_CONTROLLER + via GPIOs or SoC-internal reset controller modules. + + If unsure, say no. ++ ++if RESET_CONTROLLER ++ ++config RESET_GPIO ++ tristate "GPIO reset controller support" ++ depends on GPIOLIB && OF ++ help ++ This driver provides support for reset lines that are controlled ++ directly by GPIOs. ++ ++endif +diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile +index 1e2d83f..b854f20 100644 +--- a/drivers/reset/Makefile ++++ b/drivers/reset/Makefile +@@ -1 +1,2 @@ + obj-$(CONFIG_RESET_CONTROLLER) += core.o ++obj-$(CONFIG_RESET_GPIO) += gpio-reset.o +diff --git a/drivers/reset/gpio-reset.c b/drivers/reset/gpio-reset.c +new file mode 100644 +index 0000000..acc1076 +--- /dev/null ++++ b/drivers/reset/gpio-reset.c +@@ -0,0 +1,169 @@ ++/* ++ * GPIO Reset Controller driver ++ * ++ * Copyright 2013 Philipp Zabel, Pengutronix ++ * ++ * 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 ++#include ++#include ++#include ++#include ++#include ++#include ++ ++struct gpio_reset_data { ++ struct reset_controller_dev rcdev; ++ unsigned int gpio; ++ bool active_low; ++ u32 delay_us; ++}; ++ ++static void __gpio_reset_set(struct reset_controller_dev *rcdev, int asserted) ++{ ++ struct gpio_reset_data *drvdata = container_of(rcdev, ++ struct gpio_reset_data, rcdev); ++ int value = asserted; ++ ++ if (drvdata->active_low) ++ value = !value; ++ ++ gpio_set_value(drvdata->gpio, value); ++} ++ ++static int gpio_reset(struct reset_controller_dev *rcdev, unsigned long id) ++{ ++ struct gpio_reset_data *drvdata = container_of(rcdev, ++ struct gpio_reset_data, rcdev); ++ ++ if (drvdata->delay_us < 0) ++ return -ENOSYS; ++ ++ __gpio_reset_set(rcdev, 1); ++ udelay(drvdata->delay_us); ++ __gpio_reset_set(rcdev, 0); ++ ++ return 0; ++} ++ ++static int gpio_reset_assert(struct reset_controller_dev *rcdev, ++ unsigned long id) ++{ ++ __gpio_reset_set(rcdev, 1); ++ ++ return 0; ++} ++ ++static int gpio_reset_deassert(struct reset_controller_dev *rcdev, ++ unsigned long id) ++{ ++ __gpio_reset_set(rcdev, 0); ++ ++ return 0; ++} ++ ++static struct reset_control_ops gpio_reset_ops = { ++ .reset = gpio_reset, ++ .assert = gpio_reset_assert, ++ .deassert = gpio_reset_deassert, ++}; ++ ++static int of_gpio_reset_xlate(struct reset_controller_dev *rcdev, ++ const struct of_phandle_args *reset_spec) ++{ ++ if (WARN_ON(reset_spec->args_count != 0)) ++ return -EINVAL; ++ ++ return 0; ++} ++ ++static int gpio_reset_probe(struct platform_device *pdev) ++{ ++ struct device_node *np = pdev->dev.of_node; ++ struct gpio_reset_data *drvdata; ++ enum of_gpio_flags flags; ++ unsigned long gpio_flags; ++ bool initially_in_reset; ++ int ret; ++ ++ drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); ++ if (drvdata == NULL) ++ return -ENOMEM; ++ ++ if (of_gpio_named_count(np, "reset-gpios") != 1) ++ return -EINVAL; ++ ++ drvdata->gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, &flags); ++ if (drvdata->gpio == -EPROBE_DEFER) { ++ return drvdata->gpio; ++ } else if (!gpio_is_valid(drvdata->gpio)) { ++ dev_err(&pdev->dev, "invalid reset gpio: %d\n", drvdata->gpio); ++ return drvdata->gpio; ++ } ++ ++ drvdata->active_low = flags & OF_GPIO_ACTIVE_LOW; ++ ++ ret = of_property_read_u32(np, "reset-delay-us", &drvdata->delay_us); ++ if (ret < 0) ++ return ret; ++ ++ initially_in_reset = of_property_read_bool(np, "initially-in-reset"); ++ if (drvdata->active_low ^ initially_in_reset) ++ gpio_flags = GPIOF_OUT_INIT_HIGH; ++ else ++ gpio_flags = GPIOF_OUT_INIT_LOW; ++ ++ ret = devm_gpio_request_one(&pdev->dev, drvdata->gpio, gpio_flags, NULL); ++ if (ret < 0) { ++ dev_err(&pdev->dev, "failed to request gpio %d: %d\n", ++ drvdata->gpio, ret); ++ return ret; ++ } ++ ++ drvdata->rcdev.of_node = np; ++ drvdata->rcdev.owner = THIS_MODULE; ++ drvdata->rcdev.nr_resets = 1; ++ drvdata->rcdev.ops = &gpio_reset_ops; ++ drvdata->rcdev.of_xlate = of_gpio_reset_xlate; ++ reset_controller_register(&drvdata->rcdev); ++ ++ platform_set_drvdata(pdev, drvdata); ++ ++ return 0; ++} ++ ++static int gpio_reset_remove(struct platform_device *pdev) ++{ ++ struct gpio_reset_data *drvdata = platform_get_drvdata(pdev); ++ ++ reset_controller_unregister(&drvdata->rcdev); ++ ++ return 0; ++} ++ ++static struct of_device_id gpio_reset_dt_ids[] = { ++ { .compatible = "gpio-reset" }, ++ { } ++}; ++ ++static struct platform_driver gpio_reset_driver = { ++ .probe = gpio_reset_probe, ++ .remove = gpio_reset_remove, ++ .driver = { ++ .name = "gpio-reset", ++ .owner = THIS_MODULE, ++ .of_match_table = of_match_ptr(gpio_reset_dt_ids), ++ }, ++}; ++ ++module_platform_driver(gpio_reset_driver); ++ ++MODULE_AUTHOR("Philipp Zabel "); ++MODULE_DESCRIPTION("gpio reset controller"); ++MODULE_LICENSE("GPL"); ++MODULE_ALIAS("platform:gpio-reset"); ++MODULE_DEVICE_TABLE(of, gpio_reset_dt_ids); +-- +1.8.2.1 + +From 03664ac63b20b55af9522449bbad048476d259d5 Mon Sep 17 00:00:00 2001 +From: Joel Fernandes +Date: Wed, 3 Jul 2013 17:29:44 -0500 +Subject: [PATCH 2/2] sound: soc: soc-dmaengine-pcm: Add support for new + DMAEngine request API + +Formerly these resources were coming HWMOD on OMAP-like SoCs. With the +impending removal of HWMOD data, drivers are being converted to use the +"of-dma" method of requesting DMA channels which from DT and can be obtained +using the dma_request_slave_channel API. Add support to the soc-dmaengine-pcm +helpers so that we can fetch and open channels using this method. + +Signed-off-by: Joel Fernandes +--- + sound/core/pcm_dmaengine.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c +index aa924d9..461fe4f 100644 +--- a/sound/core/pcm_dmaengine.c ++++ b/sound/core/pcm_dmaengine.c +@@ -276,6 +276,16 @@ struct dma_chan *snd_dmaengine_pcm_request_channel(dma_filter_fn filter_fn, + } + EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_request_channel); + ++struct dma_chan *snd_dmaengine_pcm_request_slave_channel( ++ struct snd_pcm_substream *substream, char *name) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct device *dev = snd_soc_dai_get_drvdata(rtd->cpu_dai); ++ ++ return dma_request_slave_channel(dev, name); ++} ++EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_request_slave_channel); ++ + /** + * snd_dmaengine_pcm_open - Open a dmaengine based PCM substream + * @substream: PCM substream +@@ -334,6 +344,18 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream, + } + EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan); + ++int snd_dmaengine_pcm_open_request_slave_chan(struct snd_pcm_substream *substream, char *name) ++{ ++ if(substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ return snd_dmaengine_pcm_open(substream, ++ snd_dmaengine_pcm_request_slave_channel(substream, "tx")); ++ } else { ++ return snd_dmaengine_pcm_open(substream, ++ snd_dmaengine_pcm_request_slave_channel(substream, "rx")); ++ } ++} ++EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_slave_chan); ++ + /** + * snd_dmaengine_pcm_close - Close a dmaengine based PCM substream + * @substream: PCM substream +-- +1.8.4.rc3 + +From ae38683badc8c80b29ccc8aa4e059f900b603551 Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Fri, 26 Oct 2012 15:48:00 +0300 +Subject: [PATCH 1/2] omap-hsmmc: Correct usage of of_find_node_by_name + +of_find_node_by_name expect to have the parent node reference taken. +--- + drivers/mmc/host/omap_hsmmc.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index 6ac63df..f5b660c 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -1893,6 +1893,16 @@ static int omap_hsmmc_probe(struct platform_device *pdev) + * as we want. */ + mmc->max_segs = 1024; + ++ /* Eventually we should get our max_segs limitation for EDMA by ++ * querying the dmaengine API */ ++ if (pdev->dev.of_node) { ++ struct device_node *parent = of_node_get(pdev->dev.of_node->parent); ++ struct device_node *node; ++ node = of_find_node_by_name(parent, "edma"); ++ if (node) ++ mmc->max_segs = 16; ++ } ++ + mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ + mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ + mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; +-- +1.8.2.1 + +From 5d93a65cfc4ff6aaf78ab49f71daa2a644ea2ace Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Fri, 30 Nov 2012 12:18:16 +0200 +Subject: [PATCH 2/2] omap_hsmmc: Add reset gpio + +Add a gpio property for controlling reset of the mmc device. +eMMC on the beaglebone black requires it. + +Signed-off-by: Pantelis Antoniou +--- + drivers/mmc/host/omap_hsmmc.c | 40 +++++++++++++++++++++++++++++++++- + include/linux/platform_data/mmc-omap.h | 3 +++ + 2 files changed, 42 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index f5b660c..1bdb90f 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -41,6 +41,8 @@ + #include + #include + #include ++#include ++#include + + /* OMAP HSMMC Host Controller Registers */ + #define OMAP_HSMMC_SYSSTATUS 0x0014 +@@ -392,6 +394,7 @@ static inline int omap_hsmmc_have_reg(void) + static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) + { + int ret; ++ unsigned long flags; + + if (gpio_is_valid(pdata->slots[0].switch_pin)) { + if (pdata->slots[0].cover) +@@ -421,6 +424,24 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) + } else + pdata->slots[0].gpio_wp = -EINVAL; + ++ if (gpio_is_valid(pdata->slots[0].gpio_reset)) { ++ flags = pdata->slots[0].gpio_reset_active_low ? ++ GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH; ++ ret = gpio_request_one(pdata->slots[0].gpio_reset, flags, ++ "mmc_reset"); ++ if (ret) ++ goto err_free_wp; ++ ++ /* hold reset */ ++ udelay(pdata->slots[0].gpio_reset_hold_us); ++ ++ gpio_set_value(pdata->slots[0].gpio_reset, ++ !pdata->slots[0].gpio_reset_active_low); ++ ++ } else ++ pdata->slots[0].gpio_reset = -EINVAL; ++ ++ + return 0; + + err_free_wp: +@@ -434,6 +455,8 @@ err_free_sp: + + static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata) + { ++ if (gpio_is_valid(pdata->slots[0].gpio_reset)) ++ gpio_free(pdata->slots[0].gpio_reset); + if (gpio_is_valid(pdata->slots[0].gpio_wp)) + gpio_free(pdata->slots[0].gpio_wp); + if (gpio_is_valid(pdata->slots[0].switch_pin)) +@@ -788,7 +811,7 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, + * ac, bc, adtc, bcr. Only commands ending an open ended transfer need + * a val of 0x3, rest 0x0. + */ +- if (cmd == host->mrq->stop) ++ if (host->mrq && cmd == host->mrq->stop) + cmdtype = 0x3; + + cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22); +@@ -830,6 +853,8 @@ static void omap_hsmmc_request_done(struct omap_hsmmc_host *host, struct mmc_req + int dma_ch; + unsigned long flags; + ++ BUG_ON(mrq == NULL); ++ + spin_lock_irqsave(&host->irq_lock, flags); + host->req_in_progress = 0; + dma_ch = host->dma_ch; +@@ -1720,6 +1745,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) + struct device_node *np = dev->of_node; + u32 bus_width, max_freq; + int cd_gpio, wp_gpio; ++ enum of_gpio_flags reset_flags; + + cd_gpio = of_get_named_gpio(np, "cd-gpios", 0); + wp_gpio = of_get_named_gpio(np, "wp-gpios", 0); +@@ -1737,6 +1763,14 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) + pdata->nr_slots = 1; + pdata->slots[0].switch_pin = cd_gpio; + pdata->slots[0].gpio_wp = wp_gpio; ++ reset_flags = 0; ++ pdata->slots[0].gpio_reset = of_get_named_gpio_flags(np, ++ "reset-gpios", 0, &reset_flags); ++ pdata->slots[0].gpio_reset_active_low = ++ (reset_flags & OF_GPIO_ACTIVE_LOW) != 0; ++ pdata->slots[0].gpio_reset_hold_us = 100; /* default */ ++ of_property_read_u32(np, "reset-gpio-hold-us", ++ &pdata->slots[0].gpio_reset_hold_us); + + if (of_find_property(np, "ti,non-removable", NULL)) { + pdata->slots[0].nonremovable = true; +@@ -1802,6 +1836,10 @@ static int omap_hsmmc_probe(struct platform_device *pdev) + return -ENXIO; + } + ++ pinctrl = devm_pinctrl_get_select_default(&pdev->dev); ++ if (IS_ERR(pinctrl)) ++ dev_warn(&pdev->dev, "unable to select pin group\n"); ++ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + irq = platform_get_irq(pdev, 0); + if (res == NULL || irq < 0) +diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h +index 2bf1b30..d548994 100644 +--- a/include/linux/platform_data/mmc-omap.h ++++ b/include/linux/platform_data/mmc-omap.h +@@ -115,6 +115,9 @@ struct omap_mmc_platform_data { + + int switch_pin; /* gpio (card detect) */ + int gpio_wp; /* gpio (write protect) */ ++ int gpio_reset; /* gpio (reset) */ ++ int gpio_reset_active_low; /* 1 if reset is active low */ ++ u32 gpio_reset_hold_us; /* time to hold in us */ + + int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); + int (*set_power)(struct device *dev, int slot, +-- +1.8.2.1 + +From b45e4df71f07f2178db133db540e3f15e0b4ec05 Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Sat, 15 Sep 2012 12:00:41 +0300 +Subject: [PATCH] pinctrl: pinctrl-single must be initialized early. + +When using pinctrl-single to handle i2c initialization, it has +to be done early. Whether this is the best way to do so, is an +exercise left to the reader. +--- + drivers/pinctrl/pinctrl-single.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c +index a82ace4..aeef35d 100644 +--- a/drivers/pinctrl/pinctrl-single.c ++++ b/drivers/pinctrl/pinctrl-single.c +@@ -1673,7 +1673,17 @@ static struct platform_driver pcs_driver = { + #endif + }; + +-module_platform_driver(pcs_driver); ++static int __init pcs_init(void) ++{ ++ return platform_driver_register(&pcs_driver); ++} ++postcore_initcall(pcs_init); ++ ++static void __exit pcs_exit(void) ++{ ++ platform_driver_unregister(&pcs_driver); ++} ++module_exit(pcs_exit); + + MODULE_AUTHOR("Tony Lindgren "); + MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver"); +-- +1.8.2.1 + +From e5e7abd2de7d8d4c74b5a1ccc6d47988250bd17d Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Fri, 28 Jun 2013 18:39:55 +0300 +Subject: [PATCH 1/4] dts: beaglebone: Add I2C definitions for EEPROMs & capes + +Add the I2C definitions for the EEPROM devices on the baseboard +and on the possibly connected capes. + +Signed-off-by: Pantelis Antoniou +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 39 +++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index e3f27ec..2d12775 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -84,6 +84,13 @@ + >; + }; + ++ i2c2_pins: pinmux_i2c2_pins { ++ pinctrl-single,pins = < ++ 0x178 0x73 /* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */ ++ 0x17c 0x73 /* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */ ++ >; ++ }; ++ + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ +@@ -220,6 +227,38 @@ + reg = <0x24>; + }; + ++ baseboard_eeprom: baseboard_eeprom@50 { ++ compatible = "at,24c256"; ++ reg = <0x50>; ++ }; ++}; ++ ++&i2c2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins>; ++ ++ status = "okay"; ++ clock-frequency = <100000>; ++ ++ cape_eeprom0: cape_eeprom0@54 { ++ compatible = "at,24c256"; ++ reg = <0x54>; ++ }; ++ ++ cape_eeprom1: cape_eeprom1@55 { ++ compatible = "at,24c256"; ++ reg = <0x55>; ++ }; ++ ++ cape_eeprom2: cape_eeprom2@56 { ++ compatible = "at,24c256"; ++ reg = <0x56>; ++ }; ++ ++ cape_eeprom3: cape_eeprom3@57 { ++ compatible = "at,24c256"; ++ reg = <0x57>; ++ }; + }; + + /include/ "tps65217.dtsi" +-- +1.8.4.rc3 diff --git a/arm-am33xx-cpsw.patch b/arm-am33xx-cpsw.patch new file mode 100644 index 000000000..1a38cdd2b --- /dev/null +++ b/arm-am33xx-cpsw.patch @@ -0,0 +1,23 @@ +Bugzilla: 1012025 +Upstream-status: An initial work around for the cpsw driver issue trying to access HW registers +with clock disabled. Upstream is working on a proper fix with the hope to land it in 3.13. + +--- linux-3.12.4-1.fc20.x86_64/drivers/net/ethernet/ti/cpsw.c.orig 2013-12-11 20:52:41.576478796 +0000 ++++ linux-3.12.4-1.fc20.x86_64/drivers/net/ethernet/ti/cpsw.c 2013-12-11 20:55:14.418692261 +0000 +@@ -2001,6 +2001,8 @@ + goto clean_cpsw_iores_ret; + } + priv->regs = ss_regs; ++ ++ pm_runtime_get_sync(&pdev->dev); + priv->version = __raw_readl(&priv->regs->id_ver); + priv->host_port = HOST_PORT_NUM; + +@@ -2161,6 +2163,7 @@ + goto clean_irq_ret; + } + } ++ pm_runtime_put_sync(&pdev->dev); + + return 0; + diff --git a/arm-exynos-mp.patch b/arm-exynos-mp.patch deleted file mode 100644 index 74b92e7cc..000000000 --- a/arm-exynos-mp.patch +++ /dev/null @@ -1,439 +0,0 @@ -commit 8b806e0201b97844d0eff4713eb88f0a6d0f689d -Author: Arnd Bergmann -Date: Fri Jun 14 17:16:30 2013 +0200 - - ARM: exynos multiplatform, next try - - Signed-off-by: Arnd Bergmann - -diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug -index e401a76..fad9324 100644 ---- a/arch/arm/Kconfig.debug -+++ b/arch/arm/Kconfig.debug -@@ -422,7 +422,7 @@ choice - - config DEBUG_S3C_UART0 - depends on PLAT_SAMSUNG -- select DEBUG_EXYNOS_UART if ARCH_EXYNOS -+ select DEBUG_EXYNOS_UART if ARCH_EXYNOS_COMMON - bool "Use S3C UART 0 for low-level debug" - help - Say Y here if you want the debug print routines to direct -@@ -434,7 +434,7 @@ choice - - config DEBUG_S3C_UART1 - depends on PLAT_SAMSUNG -- select DEBUG_EXYNOS_UART if ARCH_EXYNOS -+ select DEBUG_EXYNOS_UART if ARCH_EXYNOS_COMMON - bool "Use S3C UART 1 for low-level debug" - help - Say Y here if you want the debug print routines to direct -@@ -446,7 +446,7 @@ choice - - config DEBUG_S3C_UART2 - depends on PLAT_SAMSUNG -- select DEBUG_EXYNOS_UART if ARCH_EXYNOS -+ select DEBUG_EXYNOS_UART if ARCH_EXYNOS_COMMON - bool "Use S3C UART 2 for low-level debug" - help - Say Y here if you want the debug print routines to direct -@@ -457,7 +457,7 @@ choice - by CONFIG_S3C_LOWLEVEL_UART_PORT. - - config DEBUG_S3C_UART3 -- depends on PLAT_SAMSUNG && ARCH_EXYNOS -+ depends on PLAT_SAMSUNG && ARCH_EXYNOS_COMMON - select DEBUG_EXYNOS_UART - bool "Use S3C UART 3 for low-level debug" - help -diff --git a/arch/arm/include/debug/samsung.S b/arch/arm/include/debug/samsung.S -index f3a9cff..8d8d922 100644 ---- a/arch/arm/include/debug/samsung.S -+++ b/arch/arm/include/debug/samsung.S -@@ -9,7 +9,7 @@ - * published by the Free Software Foundation. - */ - --#include -+#include - - /* The S5PV210/S5PC110 implementations are as belows. */ - -diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig -index 855d4a7..8744890 100644 ---- a/arch/arm/mach-exynos/Kconfig -+++ b/arch/arm/mach-exynos/Kconfig -@@ -7,13 +7,24 @@ - - # Configuration options for the EXYNOS4 - --if ARCH_EXYNOS -+config ARCH_EXYNOS_MULTI -+ bool "Samsung EXYNOS" if ARCH_MULTI_V7 -+ select ARCH_HAS_CPUFREQ -+ select CPU_V7 -+ select GENERIC_CLOCKEVENTS -+ select HAVE_CLK -+ select HAVE_S3C2410_I2C if I2C -+ select HAVE_S3C_RTC if RTC_CLASS -+ help -+ Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) -+ -+if ARCH_EXYNOS || ARCH_EXYNOS_MULTI - - menu "SAMSUNG EXYNOS SoCs Support" - - config ARCH_EXYNOS4 - bool "SAMSUNG EXYNOS4" -- default y -+ default ARCH_EXYNOS - select GIC_NON_BANKED - select HAVE_ARM_SCU if SMP - select HAVE_SMP -@@ -24,12 +35,16 @@ config ARCH_EXYNOS4 - - config ARCH_EXYNOS5 - bool "SAMSUNG EXYNOS5" -+ default ARCH_EXYNOS - select HAVE_ARM_SCU if SMP - select HAVE_SMP - select PINCTRL - help - Samsung EXYNOS5 (Cortex-A15) SoC based systems - -+config ARCH_EXYNOS_COMMON -+ def_bool ARCH_EXYNOS4 || ARCH_EXYNOS5 -+ - comment "EXYNOS SoCs" - - config CPU_EXYNOS4210 -@@ -41,7 +56,7 @@ config CPU_EXYNOS4210 - select PM_GENERIC_DOMAINS if PM - select S5P_PM if PM - select S5P_SLEEP if PM -- select SAMSUNG_DMADEV -+ select SAMSUNG_DMADEV if !ARCH_MULTIPLATFORM - help - Enable EXYNOS4210 CPU support - -@@ -49,10 +64,11 @@ config SOC_EXYNOS4212 - bool "SAMSUNG EXYNOS4212" - default y - depends on ARCH_EXYNOS4 -+ select MACH_EXYNOS4_DT - select PINCTRL_EXYNOS - select S5P_PM if PM - select S5P_SLEEP if PM -- select SAMSUNG_DMADEV -+ select SAMSUNG_DMADEV if !ARCH_MULTIPLATFORM - help - Enable EXYNOS4212 SoC support - -@@ -60,8 +76,9 @@ config SOC_EXYNOS4412 - bool "SAMSUNG EXYNOS4412" - default y - depends on ARCH_EXYNOS4 -+ select MACH_EXYNOS4_DT - select PINCTRL_EXYNOS -- select SAMSUNG_DMADEV -+ select SAMSUNG_DMADEV if !ARCH_MULTIPLATFORM - help - Enable EXYNOS4412 SoC support - -@@ -70,11 +87,12 @@ config SOC_EXYNOS5250 - default y - depends on ARCH_EXYNOS5 - select PINCTRL_EXYNOS -+ select MACH_EXYNOS5_DT - select PM_GENERIC_DOMAINS if PM - select S5P_PM if PM - select S5P_SLEEP if PM - select S5P_DEV_MFC -- select SAMSUNG_DMADEV -+ select SAMSUNG_DMADEV if !ARCH_MULTIPLATFORM - help - Enable EXYNOS5250 SoC support - -@@ -121,9 +139,7 @@ config MACH_EXYNOS4_DT - with this machine file. - - config MACH_EXYNOS5_DT -- bool "SAMSUNG EXYNOS5 Machine using device tree" -- default y -- depends on ARCH_EXYNOS5 -+ bool - select ARM_AMBA - select CLKSRC_OF - select USB_ARCH_HAS_XHCI -diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile -index e970a7a..ae397bb 100644 ---- a/arch/arm/mach-exynos/Makefile -+++ b/arch/arm/mach-exynos/Makefile -diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig -@@ -5,14 +5,11 @@ - # - # Licensed under GPLv2 - --obj-y := --obj-m := --obj-n := --obj- := -+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung - --# Core -+ifdef CONFIG_ARCH_EXYNOS_COMMON - --obj-$(CONFIG_ARCH_EXYNOS) += common.o -+obj-y += pmu.o - - obj-$(CONFIG_S5P_PM) += pm.o - obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o -@@ -24,8 +21,8 @@ - - obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o - --obj-$(CONFIG_ARCH_EXYNOS) += exynos-smc.o --obj-$(CONFIG_ARCH_EXYNOS) += firmware.o -++obj-y += exynos-smc.o -++obj-y += firmware.o - - plus_sec := $(call as-instr,.arch_extension sec,+sec) - AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) -@@ -34,3 +31,5 @@ - - obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o - obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o -+ -+endif -index 3dc5cbe..e61abdc 100644 ---- a/arch/arm/plat-samsung/Kconfig -+++ b/arch/arm/plat-samsung/Kconfig -@@ -6,7 +6,7 @@ - - config PLAT_SAMSUNG - bool -- depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS -+ depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS_COMMON - default y - select GENERIC_IRQ_CHIP - select NO_IOPORT -@@ -176,6 +176,7 @@ config S5P_DEV_UART - - config S3C_ADC - bool "ADC common driver support" -+ depends on !ARCH_MULTIPLATFORM - help - Core support for the ADC block found in the Samsung SoC systems - for drivers such as the touchscreen and hwmon to use to share -@@ -396,6 +397,7 @@ config S5P_DEV_USB_EHCI - - config S3C24XX_PWM - bool "PWM device support" -+ depends on !ARCH_MULTIPLATFORM - select PWM - select PWM_SAMSUNG - help -@@ -453,7 +455,7 @@ comment "Power management" - config SAMSUNG_PM_DEBUG - bool "S3C2410 PM Suspend debug" - depends on PM -- select DEBUG_LL -+ depends on DEBUG_LL && SERIAL_SAMSUNG - help - Say Y here if you want verbose debugging from the PM Suspend and - Resume code. See -diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile -index 98d07d8..b458e7d 100644 ---- a/arch/arm/plat-samsung/Makefile -+++ b/arch/arm/plat-samsung/Makefile -@@ -4,6 +4,9 @@ - # - # Licensed under GPLv2 - -+ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include -+ccflags-$(CONFIG_ARCH_EXYNOS_COMMON) += -I$(srctree)/arch/arm/mach-exynos/include -+ - obj-y := - obj-m := - obj-n := dummy.o -diff --git a/arch/arm/plat-samsung/s5p-irq-pm.c b/arch/arm/plat-samsung/s5p-irq-pm.c -index 7c1e3b7..dc66bb5 100644 ---- a/arch/arm/plat-samsung/s5p-irq-pm.c -+++ b/arch/arm/plat-samsung/s5p-irq-pm.c -@@ -40,7 +40,7 @@ int s3c_irq_wake(struct irq_data *data, unsigned int state) - unsigned long irqbit; - unsigned int irq_rtc_tic, irq_rtc_alarm; - --#ifdef CONFIG_ARCH_EXYNOS -+#ifdef CONFIG_ARCH_EXYNOS_COMMON - if (soc_is_exynos5250()) { - irq_rtc_tic = EXYNOS5_IRQ_RTC_TIC; - irq_rtc_alarm = EXYNOS5_IRQ_RTC_ALARM; -diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig -index 81465c2..6bd8b5a 100644 ---- a/drivers/clocksource/Kconfig -+++ b/drivers/clocksource/Kconfig -@@ -75,7 +75,7 @@ config CLKSRC_METAG_GENERIC - This option enables support for the Meta per-thread timers. - - config CLKSRC_EXYNOS_MCT -- def_bool y if ARCH_EXYNOS -+ def_bool y if ARCH_EXYNOS_COMMON - help - Support for Multi Core Timer controller on Exynos SoCs. - -diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm -index de4d5d9..ffe9cb3 100644 ---- a/drivers/cpufreq/Kconfig.arm -+++ b/drivers/cpufreq/Kconfig.arm -@@ -27,6 +27,7 @@ config ARM_EXYNOS_CPUFREQ - - If in doubt, say N. - -+if ARM_EXYNOS_CPUFREQ - config ARM_EXYNOS4210_CPUFREQ - def_bool CPU_EXYNOS4210 - help -@@ -54,6 +55,7 @@ config ARM_EXYNOS5440_CPUFREQ - SoC. The nature of exynos5440 clock controller is - different than previous exynos controllers so not using - the common exynos framework. -+endif - - config ARM_HIGHBANK_CPUFREQ - tristate "Calxeda Highbank-based" -diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig -index 31f3adb..15454ad 100644 ---- a/drivers/devfreq/Kconfig -+++ b/drivers/devfreq/Kconfig -@@ -68,6 +68,7 @@ comment "DEVFREQ Drivers" - config ARM_EXYNOS4_BUS_DEVFREQ - bool "ARM Exynos4210/4212/4412 Memory Bus DEVFREQ Driver" - depends on CPU_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412 -+ depends on !ARCH_MULTIPLATFORM - select ARCH_HAS_OPP - select DEVFREQ_GOV_SIMPLE_ONDEMAND - help -diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig -index 6c6034e..d9ed7c0 100644 ---- a/drivers/iommu/Kconfig -+++ b/drivers/iommu/Kconfig -@@ -168,7 +168,7 @@ config TEGRA_IOMMU_SMMU - - config EXYNOS_IOMMU - bool "Exynos IOMMU Support" -- depends on ARCH_EXYNOS && EXYNOS_DEV_SYSMMU -+ depends on ARCH_EXYNOS_COMMON && EXYNOS_DEV_SYSMMU - select IOMMU_API - help - Support for the IOMMU(System MMU) of Samsung Exynos application -diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig -index 5a8ad51..03688dd 100644 ---- a/drivers/pinctrl/Kconfig -+++ b/drivers/pinctrl/Kconfig -@@ -252,7 +252,7 @@ config PINCTRL_SAMSUNG - - config PINCTRL_EXYNOS - bool "Pinctrl driver data for Samsung EXYNOS SoCs other than 5440" -- depends on OF && GPIOLIB && ARCH_EXYNOS -+ depends on OF && GPIOLIB && ARCH_EXYNOS_COMMON - select PINCTRL_SAMSUNG - - config PINCTRL_EXYNOS5440 -diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig -index 75840b5..746a931 100644 ---- a/drivers/pwm/Kconfig -+++ b/drivers/pwm/Kconfig -@@ -140,7 +140,7 @@ config PWM_RENESAS_TPU - - config PWM_SAMSUNG - tristate "Samsung PWM support" -- depends on PLAT_SAMSUNG -+ depends on PLAT_SAMSUNG && !ARCH_MULTIPLATFORM - help - Generic PWM framework driver for Samsung. - -diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index 89cbbab..830b8e7 100644 ---- a/drivers/spi/Kconfig -+++ b/drivers/spi/Kconfig -@@ -365,7 +365,7 @@ config SPI_S3C24XX_FIQ - - config SPI_S3C64XX - tristate "Samsung S3C64XX series type SPI" -- depends on (ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5P64X0 || ARCH_EXYNOS) -+ depends on (ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5P64X0 || ARCH_EXYNOS_COMMON) - select S3C64XX_DMA if ARCH_S3C64XX - help - SPI driver for Samsung S3C64XX and newer SoCs. -diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 4263d01..d7ad720 100644 ---- a/drivers/usb/host/Kconfig -+++ b/drivers/usb/host/Kconfig -@@ -462,7 +462,7 @@ config USB_OHCI_SH - - config USB_OHCI_EXYNOS - boolean "OHCI support for Samsung EXYNOS SoC Series" -- depends on ARCH_EXYNOS -+ depends on ARCH_EXYNOS_COMMON - help - Enable support for the Samsung Exynos SOC's on-chip OHCI controller. - -diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig -index 2c301f8..0ba3e03 100644 ---- a/drivers/video/Kconfig -+++ b/drivers/video/Kconfig -@@ -2039,7 +2039,7 @@ config FB_TMIO_ACCELL - config FB_S3C - tristate "Samsung S3C framebuffer support" - depends on FB && (CPU_S3C2416 || ARCH_S3C64XX || ARCH_S5P64X0 || \ -- ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) -+ ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS_COMMON) - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT -diff --git a/drivers/video/exynos/Kconfig b/drivers/video/exynos/Kconfig -index b8abda5..216af14 100644 ---- a/drivers/video/exynos/Kconfig -+++ b/drivers/video/exynos/Kconfig -@@ -15,7 +15,7 @@ if EXYNOS_VIDEO - - config EXYNOS_MIPI_DSI - bool "EXYNOS MIPI DSI driver support." -- depends on ARCH_S5PV210 || ARCH_EXYNOS -+ depends on ARCH_S5PV210 || ARCH_EXYNOS_COMMON - help - This enables support for MIPI-DSI device. - -@@ -29,7 +29,7 @@ config EXYNOS_LCD_S6E8AX0 - - config EXYNOS_DP - bool "EXYNOS DP driver support" -- depends on ARCH_EXYNOS -+ depends on ARCH_EXYNOS_COMMON - default n - help - This enables support for DP device. -diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig -index 9855dfc..fcb2045 100644 ---- a/sound/soc/samsung/Kconfig -+++ b/sound/soc/samsung/Kconfig -@@ -1,6 +1,6 @@ - config SND_SOC_SAMSUNG - tristate "ASoC support for Samsung" -- depends on PLAT_SAMSUNG -+ depends on PLAT_SAMSUNG && !ARCH_MULTIPLATFORM - select S3C64XX_DMA if ARCH_S3C64XX - select S3C2410_DMA if ARCH_S3C24XX - help ---- Makefile.orig 2013-11-04 12:47:11.527488114 -0500 -+++ b/arch/arm/boot/dts/Makefile 2013-11-04 12:47:18.933540972 -0500 -@@ -48,7 +48,7 @@ - dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ - dove-cubox.dtb \ - dove-dove-db.dtb --dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ -+dtb-$(CONFIG_ARCH_EXYNOS_COMMON) += exynos4210-origen.dtb \ - exynos4210-smdkv310.dtb \ - exynos4210-trats.dtb \ - exynos4210-universal_c210.dtb \ diff --git a/arm-highbank-for-3.12.patch b/arm-highbank-for-3.12.patch deleted file mode 100644 index 8c1fb41c6..000000000 --- a/arm-highbank-for-3.12.patch +++ /dev/null @@ -1,200 +0,0 @@ -diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h -index 441efc4..d91b168 100644 ---- a/arch/arm/include/asm/mach/arch.h -+++ b/arch/arm/include/asm/mach/arch.h -@@ -35,7 +35,7 @@ struct machine_desc { - unsigned int nr_irqs; /* number of IRQs */ - - #ifdef CONFIG_ZONE_DMA -- unsigned long dma_zone_size; /* size of DMA-able area */ -+ phys_addr_t dma_zone_size; /* size of DMA-able area */ - #endif - - unsigned int video_start; /* start of video RAM */ -diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h -index 12f71a1..f94784f 100644 ---- a/arch/arm/include/asm/outercache.h -+++ b/arch/arm/include/asm/outercache.h -@@ -37,10 +37,10 @@ struct outer_cache_fns { - void (*resume)(void); - }; - --#ifdef CONFIG_OUTER_CACHE -- - extern struct outer_cache_fns outer_cache; - -+#ifdef CONFIG_OUTER_CACHE -+ - static inline void outer_inv_range(phys_addr_t start, phys_addr_t end) - { - if (outer_cache.inv_range) -diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig -index cd9fcb1..b9dd13a 100644 ---- a/arch/arm/mach-highbank/Kconfig -+++ b/arch/arm/mach-highbank/Kconfig -@@ -1,9 +1,14 @@ - config ARCH_HIGHBANK - bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7 -+ select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE - select ARCH_HAS_CPUFREQ -+ select ARCH_HAS_HOLES_MEMORYMODEL - select ARCH_HAS_OPP - select ARCH_WANT_OPTIONAL_GPIOLIB - select ARM_AMBA -+ select ARM_ERRATA_764369 -+ select ARM_ERRATA_775420 -+ select ARM_ERRATA_798181 - select ARM_GIC - select ARM_TIMER_SP804 - select CACHE_L2X0 -@@ -18,3 +23,4 @@ config ARCH_HIGHBANK - select PL320_MBOX - select SPARSE_IRQ - select USE_OF -+ select ZONE_DMA if ARM_LPAE -diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c -index 8881579..8e63ccd 100644 ---- a/arch/arm/mach-highbank/highbank.c -+++ b/arch/arm/mach-highbank/highbank.c -@@ -18,14 +18,11 @@ - #include - #include - #include --#include - #include --#include - #include - #include - #include - #include --#include - #include - #include - -@@ -35,7 +32,6 @@ - #include - #include - #include --#include - - #include "core.h" - #include "sysregs.h" -@@ -65,13 +61,11 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr) - HB_JUMP_TABLE_PHYS(cpu) + 15); - } - --#ifdef CONFIG_CACHE_L2X0 - static void highbank_l2x0_disable(void) - { - /* Disable PL310 L2 Cache controller */ - highbank_smc1(0x102, 0x0); - } --#endif - - static void __init highbank_init_irq(void) - { -@@ -80,12 +74,13 @@ static void __init highbank_init_irq(void) - if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) - highbank_scu_map_io(); - --#ifdef CONFIG_CACHE_L2X0 - /* Enable PL310 L2 Cache controller */ -- highbank_smc1(0x102, 0x1); -- l2x0_of_init(0, ~0UL); -- outer_cache.disable = highbank_l2x0_disable; --#endif -+ if (IS_ENABLED(CONFIG_CACHE_L2X0) && -+ of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) { -+ highbank_smc1(0x102, 0x1); -+ l2x0_of_init(0, ~0UL); -+ outer_cache.disable = highbank_l2x0_disable; -+ } - } - - static void __init highbank_timer_init(void) -@@ -176,6 +171,9 @@ static const char *highbank_match[] __initconst = { - }; - - DT_MACHINE_START(HIGHBANK, "Highbank") -+#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) -+ .dma_zone_size = (4ULL * SZ_1G), -+#endif - .smp = smp_ops(highbank_smp_ops), - .init_irq = highbank_init_irq, - .init_time = highbank_timer_init, -diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c -index 15225d8..c0bb66e 100644 ---- a/arch/arm/mm/init.c -+++ b/arch/arm/mm/init.c -@@ -207,7 +207,7 @@ static void __init arm_bootmem_init(unsigned long start_pfn, - - #ifdef CONFIG_ZONE_DMA - --unsigned long arm_dma_zone_size __read_mostly; -+phys_addr_t arm_dma_zone_size __read_mostly; - EXPORT_SYMBOL(arm_dma_zone_size); - - /* -diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c -index 06fe45c..bff41d4 100644 ---- a/drivers/dma/amba-pl08x.c -+++ b/drivers/dma/amba-pl08x.c -@@ -133,6 +133,8 @@ struct pl08x_bus_data { - u8 buswidth; - }; - -+#define IS_BUS_ALIGNED(bus) IS_ALIGNED((bus)->addr, (bus)->buswidth) -+ - /** - * struct pl08x_phy_chan - holder for the physical channels - * @id: physical index to this channel -@@ -845,10 +847,13 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, - - pl08x_choose_master_bus(&bd, &mbus, &sbus, cctl); - -- dev_vdbg(&pl08x->adev->dev, "src=0x%08x%s/%u dst=0x%08x%s/%u len=%zu\n", -- bd.srcbus.addr, cctl & PL080_CONTROL_SRC_INCR ? "+" : "", -+ dev_vdbg(&pl08x->adev->dev, -+ "src=0x%08llx%s/%u dst=0x%08llx%s/%u len=%zu\n", -+ (u64)bd.srcbus.addr, -+ cctl & PL080_CONTROL_SRC_INCR ? "+" : "", - bd.srcbus.buswidth, -- bd.dstbus.addr, cctl & PL080_CONTROL_DST_INCR ? "+" : "", -+ (u64)bd.dstbus.addr, -+ cctl & PL080_CONTROL_DST_INCR ? "+" : "", - bd.dstbus.buswidth, - bd.remainder); - dev_vdbg(&pl08x->adev->dev, "mbus=%s sbus=%s\n", -@@ -886,8 +891,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, - return 0; - } - -- if ((bd.srcbus.addr % bd.srcbus.buswidth) || -- (bd.dstbus.addr % bd.dstbus.buswidth)) { -+ if (!IS_BUS_ALIGNED(&bd.srcbus) || -+ !IS_BUS_ALIGNED(&bd.dstbus)) { - dev_err(&pl08x->adev->dev, - "%s src & dst address must be aligned to src" - " & dst width if peripheral is flow controller", -@@ -908,9 +913,9 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, - */ - if (bd.remainder < mbus->buswidth) - early_bytes = bd.remainder; -- else if ((mbus->addr) % (mbus->buswidth)) { -- early_bytes = mbus->buswidth - (mbus->addr) % -- (mbus->buswidth); -+ else if (!IS_BUS_ALIGNED(mbus)) { -+ early_bytes = mbus->buswidth - -+ (mbus->addr & (mbus->buswidth - 1)); - if ((bd.remainder - early_bytes) < mbus->buswidth) - early_bytes = bd.remainder; - } -@@ -928,7 +933,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, - * Master now aligned - * - if slave is not then we must set its width down - */ -- if (sbus->addr % sbus->buswidth) { -+ if (!IS_BUS_ALIGNED(sbus)) { - dev_dbg(&pl08x->adev->dev, - "%s set down bus width to one byte\n", - __func__); diff --git a/arm-imx6-utilite.patch b/arm-imx6-utilite.patch new file mode 100644 index 000000000..58a839a6e --- /dev/null +++ b/arm-imx6-utilite.patch @@ -0,0 +1,95 @@ +Add initial support for cm-fx6 module. + +cm-fx6 is a module based on mx6q SoC with the following features: +- Up to 4GB of DDR3 +- 1 LCD/DVI output port +- 1 HDMI output port +- 2 LVDS LCD ports +- Gigabit Ethernet +- Analog Audio +- CAN +- SATA +- NAND +- PCIE + +This patch allows to boot up the module, configures the serial console, +the Ethernet adapter and the hearbeat led. + +Signed-off-by: Valentin Raevsky +Acked-by: Igor Grinberg +--- + arch/arm/boot/dts/imx6q-cm-fx6.dts | 51 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 51 insertions(+) + create mode 100644 arch/arm/boot/dts/imx6q-cm-fx6.dts + +diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts +new file mode 100644 +index 0000000..1080215 +--- /dev/null ++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts +@@ -0,0 +1,51 @@ ++/* ++ * Copyright 2013 CompuLab Ltd. ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/dts-v1/; ++#include "imx6q.dtsi" ++ ++/ { ++ model = "CompuLab CM-FX6"; ++ compatible = "compulab,cm-fx6", "fsl,imx6q"; ++ ++ memory { ++ reg = <0x10000000 0x80000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ debug-led { ++ label = "Heartbeat"; ++ gpios = <&gpio2 31 0>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; ++}; ++ ++&gpmi { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_gpmi_nand_1>; ++ status = "okay"; ++}; ++ ++&fec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_enet_1>; ++ phy-mode = "rgmii"; ++ status = "okay"; ++}; ++ ++&uart4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart4_1>; ++ status = "okay"; ++}; +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -137,6 +137,7 @@ + imx6dl-sabresd.dtb \ + imx6dl-wandboard.dtb \ + imx6q-arm2.dtb \ ++ imx6q-cm-fx6.dtb \ + imx6q-phytec-pbab01.dtb \ + imx6q-sabreauto.dtb \ + imx6q-sabrelite.dtb \ +-- +1.7.9.5 + diff --git a/arm-omap-load-tfp410.patch b/arm-omap-load-tfp410.patch index 0f2ba5457..3ef21a062 100644 --- a/arm-omap-load-tfp410.patch +++ b/arm-omap-load-tfp410.patch @@ -1,14 +1,14 @@ -diff -urNp linux-3.9.4-300.fc19.armv7hl_orig/drivers/video/omap2/dss/core.c linux-3.9.4-300.fc19.armv7hl/drivers/video/omap2/dss/core.c ---- linux-3.9.4-300.fc19.armv7hl_orig/drivers/video/omap2/dss/core.c 2013-04-28 20:36:01.000000000 -0400 -+++ linux-3.9.4-300.fc19.armv7hl/drivers/video/omap2/dss/core.c 2013-05-31 12:24:07.711334359 -0400 -@@ -596,6 +596,9 @@ static int __init omap_dss_init(void) - { - int r; - -+ /* hack to load panel-tfp410 driver */ -+ request_module("panel-tfp410"); -+ - r = omap_dss_bus_register(); - if (r) - return r; -Binary files linux-3.9.4-300.fc19.armv7hl_orig/drivers/video/omap2/dss/.Makefile.swp and linux-3.9.4-300.fc19.armv7hl/drivers/video/omap2/dss/.Makefile.swp differ +diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c +index 60d3958..0e304ce 100644 +--- a/drivers/video/omap2/dss/core.c ++++ b/drivers/video/omap2/dss/core.c +@@ -298,6 +298,9 @@ static int __init omap_dss_init(void) + int r; + int i; + ++ /* hack to load encoder-tfp410 driver */ ++ request_module("encoder-tfp410"); ++ + r = platform_driver_probe(&omap_dss_driver, omap_dss_probe); + if (r) + return r; diff --git a/arm-wandboard-quad.patch b/arm-wandboard-quad.patch deleted file mode 100644 index ff746ed02..000000000 --- a/arm-wandboard-quad.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -uNr linux-3.10.0-0.rc7.git0.2.fc20.x86_64/arch/arm/boot/dts/imx6q-wandboard.dts linux-3.10.0-0.rc7.git0.2.fc20.armv7hl/arch/arm/boot/dts/imx6q-wandboard.dts ---- linux-3.10.0-0.rc7.git0.2.fc20.x86_64/arch/arm/boot/dts/imx6q-wandboard.dts 1969-12-31 18:00:00.000000000 -0600 -+++ linux-3.10.0-0.rc7.git0.2.fc20.armv7hl/arch/arm/boot/dts/imx6q-wandboard.dts 2013-06-30 15:09:21.350610898 -0500 -@@ -0,0 +1,44 @@ -+/* -+ * Copyright 2013 Freescale Semiconductor, Inc. -+ * -+ * Author: Fabio Estevam -+ * -+ * 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. -+ * -+ */ -+/dts-v1/; -+#include "imx6q.dtsi" -+ -+/ { -+ model = "Wandboard i.MX6 Quad Board"; -+ compatible = "wand,imx6q-wandboard", "fsl,imx6q"; -+ -+ memory { -+ reg = <0x10000000 0x80000000>; -+ }; -+}; -+ -+&fec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_enet_1>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart1_1>; -+ status = "okay"; -+}; -+ -+&usbh1 { -+ status = "okay"; -+}; -+ -+&usdhc3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc3_2>; -+ status = "okay"; -+}; ---- linux-3.11.0-0.rc0.git6.2.fc20.x86_64/arch/arm/boot/dts/Makefile.orig 2013-07-12 10:45:40.231087368 -0500 -+++ linux-3.11.0-0.rc0.git6.2.fc20.x86_64/arch/arm/boot/dts/Makefile 2013-07-12 10:48:39.973819470 -0500 -@@ -131,6 +131,7 @@ - imx6q-sabrelite.dtb \ - imx6q-sabresd.dtb \ - imx6q-sbc6x.dtb \ -+ imx6q-wandboard.dtb \ - imx6sl-evk.dtb \ - vf610-twr.dtb - dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \ diff --git a/bonding-driver-alb-learning.patch b/bonding-driver-alb-learning.patch deleted file mode 100644 index c7f8e8f6b..000000000 --- a/bonding-driver-alb-learning.patch +++ /dev/null @@ -1,155 +0,0 @@ -commit 7eacd03810960823393521063734fc8188446bca -Author: Neil Horman -Date: Fri Sep 13 11:05:33 2013 -0400 - - bonding: Make alb learning packet interval configurable - - running bonding in ALB mode requires that learning packets be sent periodically, - so that the switch knows where to send responding traffic. However, depending - on switch configuration, there may not be any need to send traffic at the - default rate of 3 packets per second, which represents little more than wasted - data. Allow the ALB learning packet interval to be made configurable via sysfs - - Signed-off-by: Neil Horman - Acked-by: Acked-by: Veaceslav Falico - CC: Jay Vosburgh - CC: Andy Gospodarek - CC: "David S. Miller" - Signed-off-by: Andy Gospodarek - Signed-off-by: David S. Miller - -diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt -index 87bbcfe..9b28e71 100644 ---- a/Documentation/networking/bonding.txt -+++ b/Documentation/networking/bonding.txt -@@ -1362,6 +1362,12 @@ To add ARP targets: - To remove an ARP target: - # echo -192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target - -+To configure the interval between learning packet transmits: -+# echo 12 > /sys/class/net/bond0/bonding/lp_interval -+ NOTE: the lp_inteval is the number of seconds between instances where -+the bonding driver sends learning packets to each slaves peer switch. The -+default interval is 1 second. -+ - Example Configuration - --------------------- - We begin with the same example that is shown in section 3.3, -diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c -index 91f179d..f428ef57 100644 ---- a/drivers/net/bonding/bond_alb.c -+++ b/drivers/net/bonding/bond_alb.c -@@ -1472,7 +1472,7 @@ void bond_alb_monitor(struct work_struct *work) - bond_info->lp_counter++; - - /* send learning packets */ -- if (bond_info->lp_counter >= BOND_ALB_LP_TICKS) { -+ if (bond_info->lp_counter >= BOND_ALB_LP_TICKS(bond)) { - /* change of curr_active_slave involves swapping of mac addresses. - * in order to avoid this swapping from happening while - * sending the learning packets, the curr_slave_lock must be held for -diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h -index 28d8e4c..c5eff5d 100644 ---- a/drivers/net/bonding/bond_alb.h -+++ b/drivers/net/bonding/bond_alb.h -@@ -36,14 +36,15 @@ struct slave; - * Used for division - never set - * to zero !!! - */ --#define BOND_ALB_LP_INTERVAL 1 /* In seconds, periodic send of -- * learning packets to the switch -- */ -+#define BOND_ALB_DEFAULT_LP_INTERVAL 1 -+#define BOND_ALB_LP_INTERVAL(bond) (bond->params.lp_interval) /* In seconds, periodic send of -+ * learning packets to the switch -+ */ - - #define BOND_TLB_REBALANCE_TICKS (BOND_TLB_REBALANCE_INTERVAL \ - * ALB_TIMER_TICKS_PER_SEC) - --#define BOND_ALB_LP_TICKS (BOND_ALB_LP_INTERVAL \ -+#define BOND_ALB_LP_TICKS(bond) (BOND_ALB_LP_INTERVAL(bond) \ - * ALB_TIMER_TICKS_PER_SEC) - - #define TLB_HASH_TABLE_SIZE 256 /* The size of the clients hash table. -diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c -index 72df399..55bbb8b 100644 ---- a/drivers/net/bonding/bond_main.c -+++ b/drivers/net/bonding/bond_main.c -@@ -4416,6 +4416,7 @@ static int bond_check_params(struct bond_params *params) - params->all_slaves_active = all_slaves_active; - params->resend_igmp = resend_igmp; - params->min_links = min_links; -+ params->lp_interval = BOND_ALB_DEFAULT_LP_INTERVAL; - - if (primary) { - strncpy(params->primary, primary, IFNAMSIZ); -diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c -index eeab40b..c29b836 100644 ---- a/drivers/net/bonding/bond_sysfs.c -+++ b/drivers/net/bonding/bond_sysfs.c -@@ -1699,6 +1699,44 @@ out: - static DEVICE_ATTR(resend_igmp, S_IRUGO | S_IWUSR, - bonding_show_resend_igmp, bonding_store_resend_igmp); - -+ -+static ssize_t bonding_show_lp_interval(struct device *d, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ struct bonding *bond = to_bond(d); -+ return sprintf(buf, "%d\n", bond->params.lp_interval); -+} -+ -+static ssize_t bonding_store_lp_interval(struct device *d, -+ struct device_attribute *attr, -+ const char *buf, size_t count) -+{ -+ struct bonding *bond = to_bond(d); -+ int new_value, ret = count; -+ -+ if (sscanf(buf, "%d", &new_value) != 1) { -+ pr_err("%s: no lp interval value specified.\n", -+ bond->dev->name); -+ ret = -EINVAL; -+ goto out; -+ } -+ -+ if (new_value <= 0) { -+ pr_err ("%s: lp_interval must be between 1 and %d\n", -+ bond->dev->name, INT_MAX); -+ ret = -EINVAL; -+ goto out; -+ } -+ -+ bond->params.lp_interval = new_value; -+out: -+ return ret; -+} -+ -+static DEVICE_ATTR(lp_interval, S_IRUGO | S_IWUSR, -+ bonding_show_lp_interval, bonding_store_lp_interval); -+ - static struct attribute *per_bond_attrs[] = { - &dev_attr_slaves.attr, - &dev_attr_mode.attr, -@@ -1729,6 +1767,7 @@ static struct attribute *per_bond_attrs[] = { - &dev_attr_all_slaves_active.attr, - &dev_attr_resend_igmp.attr, - &dev_attr_min_links.attr, -+ &dev_attr_lp_interval.attr, - NULL, - }; - -diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h -index 7ad8bd5..03cf3fd 100644 ---- a/drivers/net/bonding/bonding.h -+++ b/drivers/net/bonding/bonding.h -@@ -176,6 +176,7 @@ struct bond_params { - int tx_queues; - int all_slaves_active; - int resend_igmp; -+ int lp_interval; - }; - - struct bond_parm_tbl { diff --git a/cifs-Allow-LANMAN-auth-for-unencapsulated-auth-methods.patch b/cifs-Allow-LANMAN-auth-for-unencapsulated-auth-methods.patch deleted file mode 100644 index 51ce50f87..000000000 --- a/cifs-Allow-LANMAN-auth-for-unencapsulated-auth-methods.patch +++ /dev/null @@ -1,39 +0,0 @@ -From dde2356c8466298bd77fa699e0ea296372eed47b Mon Sep 17 00:00:00 2001 -From: Sachin Prabhu -Date: Fri, 27 Sep 2013 17:35:42 +0000 -Subject: cifs: Allow LANMAN auth method for servers supporting unencapsulated authentication methods - -This allows users to use LANMAN authentication on servers which support -unencapsulated authentication. - -The patch fixes a regression where users using plaintext authentication -were no longer able to do so because of changed bought in by patch -3f618223dc0bdcbc8d510350e78ee2195ff93768 - -https://bugzilla.redhat.com/show_bug.cgi?id=1011621 - -Reported-by: Panos Kavalagios -Reviewed-by: Jeff Layton -Signed-off-by: Sachin Prabhu -Signed-off-by: Steve French ---- -(limited to 'fs/cifs') - -diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c -index 352358d..e87387d 100644 ---- a/fs/cifs/sess.c -+++ b/fs/cifs/sess.c -@@ -500,9 +500,9 @@ select_sectype(struct TCP_Server_Info *server, enum securityEnum requested) - return NTLMv2; - if (global_secflags & CIFSSEC_MAY_NTLM) - return NTLM; -- /* Fallthrough */ - default: -- return Unspecified; -+ /* Fallthrough to attempt LANMAN authentication next */ -+ break; - } - case CIFS_NEGFLAVOR_LANMAN: - switch (requested) { --- -cgit v0.9.2 diff --git a/config-arm-generic b/config-arm-generic index 64561f88b..a0cf6e6f8 100644 --- a/config-arm-generic +++ b/config-arm-generic @@ -7,7 +7,13 @@ CONFIG_HW_PERF_EVENTS=y CONFIG_MMC=y CONFIG_NFS_FS=y # CONFIG_PID_IN_CONTEXTIDR is not set + CONFIG_PWM=y +CONFIG_PWM_SYSFS=y + +CONFIG_RESET_CONTROLLER=y +CONFIG_RESET_GPIO=y + CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RTC_DRV_SNVS is not set CONFIG_BACKLIGHT_PWM=m @@ -17,6 +23,7 @@ CONFIG_ARM_ARCH_TIMER=y # CONFIG_ARM_DT_BL_CPUFREQ is not set CONFIG_NR_CPUS=8 CONFIG_ARM_DMA_USE_IOMMU=y +CONFIG_DMA_VIRTUAL_CHANNELS=y # ARM AMBA generic HW CONFIG_ARM_AMBA=y @@ -44,10 +51,11 @@ CONFIG_PROC_DEVICETREE=y CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_DEVICE=y +CONFIG_OF_DYNAMIC=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_FLATTREE=y CONFIG_OF_GPIO=y -CONFIG_OF_I2C=y +CONFIG_OF_I2C=m CONFIG_OF_IRQ=y CONFIG_OF_MDIO=m CONFIG_OF_MTD=y @@ -61,6 +69,7 @@ CONFIG_SERIAL_OF_PLATFORM=y CONFIG_EXTCON=m CONFIG_OF_EXTCON=m CONFIG_EXTCON_GPIO=m +CONFIG_EXTCON_ADC_JACK=m # MTD CONFIG_MTD_BLKDEVS=m @@ -75,14 +84,29 @@ CONFIG_MTD_OF_PARTS=m CONFIG_MTD_PHYSMAP=m CONFIG_MTD_PHYSMAP_OF=m # CONFIG_MTD_PHYSMAP_COMPAT is not set -CONFIG_OF_MTD=y # GPIO -CONFIG_GENERIC_GPIO=y +CONFIG_GPIO_DEVRES=y +CONFIG_GPIO_GENERIC=m CONFIG_GPIOLIB=y CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_MDIO_GPIO=m CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_RESTART=y + +#i2c +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_GPIO=m +CONFIG_I2C_MUX=m +# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set +CONFIG_I2C_MUX_GPIO=m +CONFIG_I2C_MUX_PINCTRL=m +CONFIG_I2C_MUX_PCA9541=m + +# Sensors +CONFIG_SENSORS_IIO_HWMON=m +CONFIG_IIO_SYSFS_TRIGGER=m # MFD CONFIG_MFD_CORE=m @@ -101,9 +125,6 @@ CONFIG_SMC911X=m # CONFIG_IRQ_DOMAIN_DEBUG is not set # CONFIG_LEDS_RENESAS_TPU is not set # CONFIG_LOCK_STAT is not set -# CONFIG_PCIEPORTBUS is not set - -CONFIG_I2C=y ### turn off things which make no sense on embedded SoC diff --git a/config-arm64 b/config-arm64 index 46cf8306d..850295082 100644 --- a/config-arm64 +++ b/config-arm64 @@ -30,7 +30,6 @@ CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_IO=y CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GPIO_DEVRES=y CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y CONFIG_HAVE_ARCH_PFN_VALID=y CONFIG_HAVE_ARCH_TRACEHOOK=y @@ -67,7 +66,6 @@ CONFIG_VM_EVENT_COUNTERS=y # not arm64 # CONFIG_HW_RANDOM_ATMEL is not set # CONFIG_HW_RANDOM_EXYNOS is not set -# CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_ADNP is not set # CONFIG_GPIO_MCP23S08 is not set # CONFIG_MDIO_BUS_MUX_GPIO is not set @@ -81,33 +79,4 @@ CONFIG_VM_EVENT_COUNTERS=y # dma issues in headers # CONFIG_PARPORT_PC is not set # CONFIG_VGA_CONSOLE is not set - -# CONFIG_CHARGER_MAX8997 is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_REGULATOR_LP872X is not set -# CONFIG_REGULATOR_S2MPS11 is not set -# CONFIG_LEDS_MAX8997 is not set -# CONFIG_RTC_DRV_MAX8997 is not set -# CONFIG_EXTCON_MAX8997 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_SEC_CORE is not set +CONFIG_POWER_RESET_XGENE=y diff --git a/config-armv7 b/config-armv7 index 4fca3bb0a..5df800c14 100644 --- a/config-armv7 +++ b/config-armv7 @@ -10,7 +10,7 @@ CONFIG_ARCH_ROCKCHIP=y CONFIG_ARCH_SOCFPGA=y CONFIG_ARCH_SUNXI=y CONFIG_ARCH_TEGRA=y -# CONFIG_ARCH_U8500 is not set +CONFIG_ARCH_U8500=y # CONFIG_ARCH_VIRT is not set CONFIG_ARCH_ZYNQ=y @@ -19,9 +19,6 @@ CONFIG_ARCH_ZYNQ=y # CONFIG_XEN is not set # CONFIG_ARM_VIRT_EXT is not set -# Generic -CONFIG_REMOTEPROC=m - # mvebu CONFIG_MACH_ARMADA_370_XP=y CONFIG_MACH_ARMADA_370=y @@ -58,12 +55,11 @@ CONFIG_ARCH_OMAP2PLUS_TYPICAL=y CONFIG_ARCH_OMAP3=y CONFIG_ARCH_OMAP4=y CONFIG_SOC_OMAP5=y +# CONFIG_SOC_DRA7XX is not set # CONFIG_SOC_OMAP2420 is not set # CONFIG_SOC_OMAP2430 is not set CONFIG_SOC_OMAP3430=y CONFIG_SOC_TI81XX=y -CONFIG_SOC_AM33XX=y -CONFIG_SOC_AM43XX=y CONFIG_MACH_OMAP_GENERIC=y CONFIG_MACH_OMAP3_BEAGLE=y CONFIG_MACH_DEVKIT8000=y @@ -71,8 +67,8 @@ CONFIG_MACH_OMAP_LDP=y CONFIG_MACH_OMAP3530_LV_SOM=y CONFIG_MACH_OMAP3_TORPEDO=y CONFIG_MACH_OVERO=y -CONFIG_MACH_OMAP3EVM=y -CONFIG_MACH_OMAP3517EVM=y +# CONFIG_MACH_OMAP3EVM is not set +# CONFIG_MACH_OMAP3517EVM is not set CONFIG_MACH_CRANEBOARD=y CONFIG_MACH_OMAP3_PANDORA=y CONFIG_MACH_TOUCHBOOK=y @@ -87,8 +83,8 @@ CONFIG_MACH_CM_T3517=y CONFIG_MACH_IGEP0030=y CONFIG_MACH_SBC3530=y CONFIG_MACH_OMAP_3630SDP=y -CONFIG_MACH_TI8168EVM=y -CONFIG_MACH_TI8148EVM=y +# CONFIG_MACH_TI8168EVM is not set +# CONFIG_MACH_TI8148EVM is not set CONFIG_SOC_HAS_REALTIME_COUNTER=y CONFIG_OMAP_RESET_CLOCKS=y @@ -113,17 +109,6 @@ CONFIG_OMAP3_EMU=y CONFIG_OMAP_WATCHDOG=m CONFIG_TWL4030_WATCHDOG=m -CONFIG_TI_ST=m -CONFIG_TI_EDMA=y -CONFIG_TI_DAC7512=m -CONFIG_TI_DAVINCI_EMAC=y -CONFIG_TI_DAVINCI_MDIO=y -CONFIG_TI_DAVINCI_CPDMA=y -CONFIG_TI_CPSW=y -CONFIG_TI_CPTS=y -CONFIG_TI_EMIF=m -CONFIG_REGULATOR_TI_ABB=y - CONFIG_SERIAL_OMAP=y CONFIG_SERIAL_OMAP_CONSOLE=y @@ -136,31 +121,26 @@ CONFIG_TWL4030_CORE=y CONFIG_TWL4030_MADC=m CONFIG_TWL4030_POWER=y CONFIG_TWL4030_WATCHDOG=m +CONFIG_BATTERY_TWL4030_MADC=m +CONFIG_OMAP_USB2=m +CONFIG_OMAP_USB3=m CONFIG_TWL4030_USB=m CONFIG_TWL6030_USB=m CONFIG_TWL6030_PWM=m CONFIG_TWL6040_CORE=y CONFIG_CLK_TWL6040=m CONFIG_OMAP_INTERCONNECT=m -CONFIG_MFD_TI_AM335X_TSCADC=y CONFIG_MFD_OMAP_USB_HOST=y CONFIG_MTD_ONENAND_OMAP2=m CONFIG_HDQ_MASTER_OMAP=m CONFIG_REGULATOR_TWL4030=y CONFIG_BACKLIGHT_PANDORA=m CONFIG_OMAP_OCP2SCP=m -CONFIG_OMAP_USB2=m -CONFIG_OMAP_USB3=m CONFIG_USB_EHCI_HCD_OMAP=m CONFIG_USB_OHCI_HCD_PLATFORM=m CONFIG_USB_OHCI_HCD_OMAP3=y CONFIG_USB_MUSB_AM35X=m CONFIG_USB_MUSB_OMAP2PLUS=m -CONFIG_USB_TI_CPPI41_DMA=m -CONFIG_AM335X_PHY_USB=m -CONFIG_USB_MUSB_HDRC=m -# CONFIG_USB_GADGET_MUSB_HDRC is not set -# CONFIG_USB_MUSB_DEBUG is not set CONFIG_OMAP_CONTROL_USB=m CONFIG_MMC_OMAP=y CONFIG_MMC_OMAP_HS=y @@ -169,6 +149,7 @@ CONFIG_RTC_DRV_MAX8907=m CONFIG_RTC_DRV_TWL4030=y CONFIG_RTC_DRV_OMAP=y CONFIG_SENSORS_TWL4030_MADC=m +CONFIG_TWL6030_GPADC=m # OMAP5 (possibly other devices too) CONFIG_MFD_PALMAS=y @@ -181,19 +162,16 @@ CONFIG_GPIO_PALMAS=y CONFIG_WL_TI=y CONFIG_WLCORE_SDIO=m CONFIG_WLCORE_SPI=m -CONFIG_WL1251_SPI=m -CONFIG_WL12XX_SPI=m -CONFIG_WL12XX_SDIO_TEST=m CONFIG_WL18XX=m CONFIG_WILINK_PLATFORM_DATA=y CONFIG_MFD_WL1273_CORE=m CONFIG_NFC_WILINK=m CONFIG_MTD_NAND_OMAP2=m -CONFIG_SPI_DAVINCI=m CONFIG_SPI_OMAP24XX=m CONFIG_MFD_TI_SSP=m CONFIG_SPI_TI_SSP=m +CONFIG_SPI_TI_QSPI=m CONFIG_INPUT_TWL4030_PWRBUTTON=m CONFIG_INPUT_TWL4030_VIBRA=m @@ -225,7 +203,6 @@ CONFIG_CRYPTO_DEV_OMAP_SHAM=m CONFIG_CRYPTO_DEV_OMAP_AES=m CONFIG_HW_RANDOM_OMAP=m -CONFIG_DRM_TILCDC=m CONFIG_DRM_OMAP=m CONFIG_DRM_OMAP_NUM_CRTCS=2 CONFIG_OMAP2_VRFB=y @@ -248,17 +225,6 @@ CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET=y CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y -CONFIG_PANEL_GENERIC_DPI=m -CONFIG_PANEL_TFP410=m -CONFIG_PANEL_SHARP_LS037V7DW01=m -CONFIG_PANEL_PICODLP=m -CONFIG_PANEL_TAAL=m -CONFIG_PANEL_NEC_NL8048HL11_01B=m -CONFIG_PANEL_TPO_TD043MTEA1=m -CONFIG_PANEL_LGPHILIPS_LB035Q02=m -CONFIG_PANEL_ACX565AKM=m -# CONFIG_PANEL_N8X0 is not set - CONFIG_DISPLAY_ENCODER_TFP410=m CONFIG_DISPLAY_ENCODER_TPD12S015=m CONFIG_DISPLAY_CONNECTOR_DVI=m @@ -293,6 +259,7 @@ CONFIG_SND_OMAP_SOC=m CONFIG_SND_SOC_I2C_AND_SPI=m CONFIG_SND_OMAP_SOC_AM3517EVM=m CONFIG_SND_OMAP_SOC_DMIC=m +CONFIG_SND_OMAP_SOC_HDMI=m CONFIG_SND_OMAP_SOC_IGEP0020=m CONFIG_SND_OMAP_SOC_MCBSP=m CONFIG_SND_OMAP_SOC_MCPDM=m @@ -329,13 +296,43 @@ CONFIG_OMAP_REMOTEPROC=m # CONFIG_OMAP_MUX_DEBUG is not set # CONFIG_VIDEO_OMAP3_DEBUG is not set +# AM33xx +CONFIG_SOC_AM33XX=y +CONFIG_SOC_AM43XX=y +CONFIG_AM335X_CONTROL_USB=m +CONFIG_AM335X_PHY_USB=m +CONFIG_USB_MUSB_AM335X_CHILD=y +CONFIG_MFD_TI_AM335X_TSCADC=m +CONFIG_TI_ST=m +CONFIG_TI_DAC7512=m +CONFIG_TI_DAVINCI_EMAC=m +CONFIG_TI_DAVINCI_MDIO=m +CONFIG_TI_DAVINCI_CPDMA=m +CONFIG_TI_CPSW=m +CONFIG_TI_CPTS=y +CONFIG_TI_EMIF=m +CONFIG_DRM_TILCDC=m +CONFIG_SPI_DAVINCI=m +CONFIG_REGULATOR_TI_ABB=m +CONFIG_TI_PRIV_EDMA=y +CONFIG_TI_EDMA=y +# Terribly unstable so disable for now +# CONFIG_USB_TI_CPPI41_DMA is not set +# CONFIG_TI_CPPI41 is not set +CONFIG_MFD_TI_AM335X_TSCADC=m +CONFIG_CHARGER_BQ24190=m +CONFIG_TI_ADC081C=m +CONFIG_TI_AM335X_ADC=m +CONFIG_PWM_TIPWMSS=y + # Allwinner a1x CONFIG_PINCTRL_SUNXI=y +CONFIG_SUNXI_WATCHDOG=m CONFIG_MDIO_SUN4I=m CONFIG_NET_VENDOR_ALLWINNER=y CONFIG_SUN4I_EMAC=m -# imx +# i.MX CONFIG_MXC_IRQ_PRIOR=y # CONFIG_MXC_DEBUG_BOARD is not set CONFIG_SOC_IMX53=y @@ -345,6 +342,7 @@ CONFIG_MACH_IMX51_DT=y # CONFIG_MACH_MX51_BABBAGE is not set # CONFIG_MACH_EUKREA_CPUIMX51SD is not set CONFIG_ARM_IMX6Q_CPUFREQ=m +CONFIG_IMX_THERMAL=m CONFIG_PATA_IMX=m CONFIG_USB_CHIPIDEA=m CONFIG_USB_CHIPIDEA_UDC=y @@ -356,6 +354,7 @@ CONFIG_FEC=m CONFIG_KEYBOARD_IMX=m CONFIG_SERIAL_IMX=y CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_PINCTRL_IMX6SL=y CONFIG_I2C_IMX=m CONFIG_SPI_IMX=m CONFIG_MFD_MC13783=m @@ -365,6 +364,7 @@ CONFIG_IMX_WEIM=y CONFIG_IMX2_WDT=m CONFIG_HW_RANDOM_MXC_RNGA=m CONFIG_CRYPTO_DEV_SAHARA=m +CONFIG_RTC_DRV_SNVS=m # CONFIG_FB_MX3 is not set CONFIG_SND_IMX_SOC=m @@ -377,6 +377,7 @@ CONFIG_SND_SOC_IMX_PCM_DMA=m CONFIG_SND_SOC_IMX_SGTL5000=m CONFIG_SND_SOC_IMX_WM8962=m CONFIG_SND_SOC_IMX_MC13783=m +CONFIG_SND_SOC_IMX_SPDIF=m CONFIG_USB_EHCI_MXC=m CONFIG_USB_IMX21_HCD=m @@ -398,6 +399,7 @@ CONFIG_PWM_IMX=m CONFIG_BACKLIGHT_PWM=m CONFIG_DRM_IMX=m CONFIG_DRM_IMX_FB_HELPER=m +CONFIG_DRM_IMX_HDMI=m CONFIG_DRM_IMX_IPUV3_CORE=m CONFIG_DRM_IMX_IPUV3=m # CONFIG_DRM_IMX_LDB is not set @@ -412,11 +414,12 @@ CONFIG_REGULATOR_MC13783=m CONFIG_REGULATOR_MC13892=m CONFIG_LEDS_MC13783=m CONFIG_RTC_DRV_MC13XXX=m +CONFIG_CAN_FLEXCAN=m CONFIG_INPUT_PWM_BEEPER=m CONFIG_INPUT_88PM80X_ONKEY=m -# i.MX6Q (and likely Samsung among others) +# i.MX6Q (and likely Samsung among others) CONFIG_MFD_DA9052_I2C=y CONFIG_MFD_DA9052_SPI=y CONFIG_MFD_DA9055=y @@ -437,11 +440,6 @@ CONFIG_RTC_DRV_DA9055=m CONFIG_REGULATOR_DA9052=m CONFIG_REGULATOR_DA9055=m -# exynos -# CONFIG_DRM_EXYNOS is not set -# CONFIG_PINCTRL_EXYNOS5440 is not set -# CONFIG_PINCTRL_EXYNOS is not set - # picoxcell CONFIG_CRYPTO_DEV_PICOXCELL=m CONFIG_HW_RANDOM_PICOXCELL=m @@ -452,6 +450,7 @@ CONFIG_MACH_SNOWBALL=y CONFIG_MACH_UX500_DT=y CONFIG_ABX500_CORE=y +CONFIG_ARM_U8500_CPUIDLE=y CONFIG_UX500_DEBUG_UART=2 CONFIG_AB8500_CORE=y CONFIG_STE_DMA40=y @@ -485,6 +484,19 @@ CONFIG_CW1200=m CONFIG_CW1200_WLAN_SDIO=m CONFIG_CW1200_WLAN_SPI=m CONFIG_UX500_WATCHDOG=m +CONFIG_IIO_ST_ACCEL_3AXIS=m +CONFIG_IIO_ST_GYRO_3AXIS=m +CONFIG_IIO_ST_GYRO_I2C_3AXIS=m +CONFIG_IIO_ST_GYRO_SPI_3AXIS=m +CONFIG_IIO_ST_MAGN_3AXIS=m +CONFIG_IIO_ST_MAGN_I2C_3AXIS=m +CONFIG_IIO_ST_MAGN_SPI_3AXIS=m +CONFIG_IIO_ST_PRESS=m +CONFIG_IIO_ST_PRESS_I2C=m +CONFIG_IIO_ST_PRESS_SPI=m +CONFIG_IIO_ST_SENSORS_I2C=m +CONFIG_IIO_ST_SENSORS_SPI=m +CONFIG_IIO_ST_SENSORS_CORE=m # tegra CONFIG_ARCH_TEGRA_2x_SOC=y @@ -496,7 +508,7 @@ CONFIG_TEGRA30_MC=y CONFIG_SERIAL_TEGRA=y -CONFIG_TEGRA_PCI=y +CONFIG_PCI_TEGRA=y CONFIG_TEGRA_IOMMU_GART=y CONFIG_TEGRA_IOMMU_SMMU=y CONFIG_MMC_SDHCI_TEGRA=m @@ -567,7 +579,7 @@ CONFIG_SERIAL_UARTLITE_CONSOLE=y CONFIG_SERIAL_XILINX_PS_UART=y CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y CONFIG_COMMON_CLK_AXI_CLKGEN=m -CONFIG_CPU_IDLE_ZYNQ=y +CONFIG_ARM_ZYNQ_CPUIDLE=y CONFIG_LATTICE_ECP3_CONFIG=m CONFIG_NET_VENDOR_XILINX=y CONFIG_XILINX_EMACLITE=m @@ -582,6 +594,7 @@ CONFIG_MFD_T7L66XB=y CONFIG_MFD_TC6387XB=y # Generic drivers +CONFIG_REMOTEPROC=m # Regulator drivers CONFIG_REGULATOR_FAN53555=m @@ -634,7 +647,6 @@ CONFIG_REGULATOR_MAX8973=m # CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set # CONFIG_VIRTUALIZATION is not set -# CONFIG_CHARGER_MANAGER is not set # CONFIG_POWER_RESET_QNAP is not set # CONFIG_OMAP2_DSS_DEBUG is not set # CONFIG_DRM_TEGRA_DEBUG is not set diff --git a/config-armv7-generic b/config-armv7-generic index 254ae3bdf..7800af27f 100644 --- a/config-armv7-generic +++ b/config-armv7-generic @@ -14,6 +14,7 @@ CONFIG_AEABI=y CONFIG_VFP=y CONFIG_VFPv3=y CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y CONFIG_ARM_UNWIND=y CONFIG_ARM_THUMB=y @@ -56,14 +57,15 @@ CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y # CONFIG_ARCH_SIRF is not set # CONFIG_ARCH_U8500 is not set # CONFIG_ARCH_WM8850 is not set +# CONFIG_ARCH_SHMOBILE_MULTI is not set # highbank # 2013/04/19 - stability issues -# CONFIG_CPU_IDLE_CALXEDA is not set CONFIG_EDAC_HIGHBANK_MC=m CONFIG_EDAC_HIGHBANK_L2=m CONFIG_SATA_HIGHBANK=m CONFIG_ARM_HIGHBANK_CPUFREQ=m +CONFIG_ARM_HIGHBANK_CPUIDLE=y # errata # v5/v6 @@ -93,6 +95,7 @@ CONFIG_PL310_ERRATA_769419=y CONFIG_PJ4B_ERRATA_4742=y # Cortex-A15 # CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_ARM_ERRATA_773022 is not set # generic that deviates from or should be merged into config-generic CONFIG_SMP_ON_UP=y @@ -104,13 +107,10 @@ CONFIG_SCHED_SMT=y CONFIG_RCU_FANOUT=32 -CONFIG_VIRTIO_CONSOLE=m - -# 2013/04/19 - disable due to stability issues in 3.9 for the moment -# CONFIG_CPU_IDLE is not set -## CONFIG_CPU_IDLE_GOV_LADDER is not set -# CONFIG_CPU_IDLE_GOV_MENU is not set -# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set +CONFIG_CPU_IDLE=y +# CONFIG_CPU_IDLE_GOV_LADDER is not set +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y # CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set @@ -138,7 +138,6 @@ CONFIG_LBDAF=y CONFIG_USE_OF=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_ARM_APPENDED_DTB=y -CONFIG_I2C_MUX_PINCTRL=m # General vexpress ARM drivers CONFIG_ARM_TIMER_SP804=y @@ -156,6 +155,7 @@ CONFIG_PL330_DMA=m CONFIG_AMBA_PL08X=y CONFIG_ARM_SP805_WATCHDOG=m CONFIG_GPIO_PL061=y +CONFIG_PL320_MBOX=y # usb CONFIG_USB_OTG=y @@ -167,7 +167,7 @@ CONFIG_AX88796_93CX6=y CONFIG_USB_ISP1760_HCD=m # CONFIG_USB_EHCI_HCD_ORION is not set -# usb gadget +# usb gadget CONFIG_USB_GADGET=m CONFIG_USB_GADGET_MUSB_HDRC=m CONFIG_USB_GADGET_VBUS_DRAW=100 @@ -240,6 +240,7 @@ CONFIG_PINMUX=y CONFIG_PINCONF=y CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y +CONFIG_GENERIC_PINCONF=y # CONFIG_PINCTRL_SAMSUNG is not set # CONFIG_PINCTRL_EXYNOS4 is not set @@ -248,7 +249,6 @@ CONFIG_GPIO_GENERIC_PLATFORM=m # CONFIG_GPIO_EM is not set CONFIG_GPIO_ADNP=m CONFIG_GPIO_MCP23S08=m -CONFIG_POWER_RESET_GPIO=y CONFIG_SERIAL_8250_EM=m CONFIG_INPUT_GPIO_TILT_POLLED=m CONFIG_MDIO_BUS_MUX_GPIO=m @@ -302,9 +302,11 @@ CONFIG_MPCORE_WATCHDOG=m # Thermal / powersaving CONFIG_THERMAL=y -CONFIG_POWER_RESET_RESTART=y CONFIG_ARM_PSCI=y +# Mailbox +CONFIG_MAILBOX=y + # MTD # CONFIG_MG_DISK is not set CONFIG_MTD_DATAFLASH=m @@ -328,20 +330,28 @@ CONFIG_SPI_DW_PCI=m # CONFIG_MMC_DW_EXYNOS is not set # CONFIG_MMC_DW_IDMAC is not set CONFIG_USB_DWC2=m +# CONFIG_USB_DWC2_DEBUG is not set +# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set CONFIG_USB_DWC3=m +CONFIG_USB_DWC3_OMAP=m +CONFIG_USB_DWC3_EXYNOS=m +CONFIG_USB_DWC3_PCI=m # CONFIG_USB_DWC3_DEBUG is not set CONFIG_DW_WATCHDOG=m # Sound -CONFIG_SND_ARM=y -CONFIG_SND_ARMAACI=m CONFIG_SND_SOC=m CONFIG_SND_SPI=y +CONFIG_SND_ARM=y +CONFIG_SND_ARMAACI=m +CONFIG_SND_COMPRESS_OFFLOAD=m CONFIG_SND_DESIGNWARE_I2S=m +CONFIG_SND_DMAENGINE_PCM=m +CONFIG_SND_JACK=y CONFIG_SND_SIMPLE_CARD=m -CONFIG_SND_SOC_CACHE_LZO=y CONFIG_SND_SOC_ALL_CODECS=m -CONFIG_SND_SOC_DMAENGINE_PCM=y +CONFIG_SND_SOC_CACHE_LZO=y +CONFIG_SND_SOC_DMIC=m CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y # CONFIG_SND_ATMEL_SOC is not set @@ -365,10 +375,8 @@ CONFIG_RTC_DRV_TPS80031=m # Regulators CONFIG_REGULATOR=y CONFIG_RFKILL_REGULATOR=m -CONFIG_CHARGER_MANAGER=y # CONFIG_REGULATOR_DUMMY is not set CONFIG_REGULATOR_FIXED_VOLTAGE=m -CONFIG_REGULATOR_FIXED_VOLTAGE=m CONFIG_REGULATOR_VIRTUAL_CONSUMER=m CONFIG_REGULATOR_USERSPACE_CONSUMER=m CONFIG_REGULATOR_GPIO=m @@ -378,6 +386,7 @@ CONFIG_REGULATOR_FAN53555=m CONFIG_REGULATOR_ISL6271A=m CONFIG_REGULATOR_LP3971=m CONFIG_REGULATOR_LP3972=m +CONFIG_REGULATOR_LP872X=m CONFIG_REGULATOR_LP8755=m CONFIG_REGULATOR_MAX1586=m CONFIG_REGULATOR_MAX8649=m @@ -396,16 +405,25 @@ CONFIG_REGULATOR_TPS6586X=m CONFIG_REGULATOR_TPS65910=m CONFIG_REGULATOR_TPS65912=m CONFIG_REGULATOR_TPS80031=m -CONFIG_CHARGER_TPS65090=m +CONFIG_CHARGER_MANAGER=y +CONFIG_CHARGER_TPS65090=m +CONFIG_PDA_POWER=m +CONFIG_GENERIC_ADC_BATTERY=m + +# Sensors +CONFIG_TMP006=m +CONFIG_BMP085=y +CONFIG_BMP085_I2C=m +CONFIG_BMP085_SPI=m CONFIG_SENSORS_AD7314=m CONFIG_SENSORS_ADCXX=m -CONFIG_SENSORS_LM70=m -CONFIG_SENSORS_MAX1111=m CONFIG_SENSORS_ADS7871=m -CONFIG_SENSORS_LIS3_SPI=m CONFIG_SENSORS_GPIO_FAN=m CONFIG_SENSORS_HTU21=m +CONFIG_SENSORS_LIS3_SPI=m +CONFIG_SENSORS_LM70=m +CONFIG_SENSORS_MAX1111=m CONFIG_LCD_L4F00242T03=m CONFIG_LCD_LMS283GF05=m @@ -434,9 +452,10 @@ CONFIG_LEDS_DAC124S085=m CONFIG_LEDS_PWM=m CONFIG_BMP085_SPI=m -# Display - +# Contiguous Memory Allocator +CONFIG_OF_RESERVED_MEM=y CONFIG_CMA=y +CONFIG_DMA_CMA=y # CONFIG_CMA_DEBUG is not set CONFIG_CMA_SIZE_MBYTES=16 CONFIG_CMA_SIZE_SEL_MBYTES=y @@ -445,6 +464,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y # CONFIG_CMA_SIZE_SEL_MAX is not set CONFIG_CMA_ALIGNMENT=8 CONFIG_CMA_AREAS=7 +CONFIG_SRAM=y # Ethernet CONFIG_KS8851=m @@ -479,6 +499,9 @@ CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y # CONFIG_UBIFS_FS_DEBUG is not set +# Sensors +CONFIG_SENSORS_HTU21=m + # Should be in generic CONFIG_BPF_JIT=y # CONFIG_NET_VENDOR_CIRRUS is not set @@ -512,6 +535,7 @@ CONFIG_BPF_JIT=y # CONFIG_COMMON_CLK_AXI_CLKGEN is not set # CONFIG_SPI_TOPCLIFF_PCH is not set # CONFIG_SPI_PXA2XX is not set +# CONFIG_SPI_FSL_DSPI is not set # these modules all fail with missing __bad_udelay # http://www.spinics.net/lists/arm/msg15615.html provides some background diff --git a/config-armv7-lpae b/config-armv7-lpae index 16aa0edc7..f2cfb02f2 100644 --- a/config-armv7-lpae +++ b/config-armv7-lpae @@ -32,6 +32,7 @@ CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 # Cortex-A15 CONFIG_ARM_ERRATA_798181=y +CONFIG_ARM_ERRATA_773022=y CONFIG_KVM=y CONFIG_KVM_ARM_HOST=y @@ -65,7 +66,9 @@ CONFIG_SERIAL_SAMSUNG_CONSOLE=y CONFIG_SOC_EXYNOS5250=y CONFIG_SOC_EXYNOS5420=y CONFIG_SOC_EXYNOS5440=y -CONFIG_ARM_EXYNOS_CPUFREQ=y +# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5440_CPUFREQ is not set +# CONFIG_ARM_EXYNOS_CPUFREQ is not set # CONFIG_GENERIC_CPUFREQ_CPU0 is not set CONFIG_EXYNOS_THERMAL=m CONFIG_PCI_EXYNOS=y @@ -134,31 +137,6 @@ CONFIG_S3C_LOWLEVEL_UART_PORT=1 # CONFIG_S3C2410_WATCHDOG is not set # CONFIG_MMC_SDHCI_S3C is not set # CONFIG_TEGRA_HOST1X is not set - -# CONFIG_CHARGER_MAX8997 is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_REGULATOR_LP872X is not set -# CONFIG_REGULATOR_S2MPS11 is not set -# CONFIG_LEDS_MAX8997 is not set -# CONFIG_RTC_DRV_MAX8997 is not set -# CONFIG_EXTCON_MAX8997 is not set +# CONFIG_SPI_DAVINCI is not set +# CONFIG_I2C_DAVINCI is not set +# CONFIG_TI_SOC_THERMAL is not set diff --git a/config-generic b/config-generic index 079ad75c6..c2f589b17 100644 --- a/config-generic +++ b/config-generic @@ -61,6 +61,8 @@ CONFIG_PID_NS=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y CONFIG_NET_NS=y +# CONFIG_USER_NS is not set +# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set CONFIG_POSIX_MQUEUE=y # CONFIG_PREEMPT_NONE is not set @@ -146,6 +148,7 @@ CONFIG_MMC_VUB300=m # CONFIG_MMC_SDHCI_PXAV2 is not set # CONFIG_MMC_SDHCI_PXAV3 is not set + CONFIG_CB710_CORE=m # CONFIG_CB710_DEBUG is not set @@ -160,6 +163,7 @@ CONFIG_INFINIBAND_SRP=m CONFIG_INFINIBAND_SRPT=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m +# CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING is not set #staging CONFIG_INFINIBAND_IPATH=m CONFIG_INFINIBAND_ISER=m CONFIG_INFINIBAND_ISERT=m @@ -205,6 +209,7 @@ CONFIG_EXTRA_FIRMWARE="" # CONFIG_FW_LOADER_USER_HELPER is not set # CONFIG_CMA is not set +# CONFIG_DMA_CMA is not set # CONFIG_SPI is not set @@ -331,6 +336,7 @@ CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y CONFIG_BLK_DEV_THROTTLING=y +# CONFIG_BLK_CMDLINE_PARSER is not set # @@ -438,6 +444,7 @@ CONFIG_MEGARAID_MM=m CONFIG_MEGARAID_MAILBOX=m CONFIG_MEGARAID_LEGACY=m CONFIG_MEGARAID_SAS=m +CONFIG_SCSI_ESAS2R=m CONFIG_SCSI_MVSAS=m # CONFIG_SCSI_MVSAS_DEBUG is not set CONFIG_SCSI_MVSAS_TASKLET=y @@ -935,6 +942,7 @@ CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_SYNPROXY=m CONFIG_IP_NF_TARGET_TTL=m CONFIG_NF_NAT_IPV4=m CONFIG_IP_NF_TARGET_MASQUERADE=m @@ -968,6 +976,7 @@ CONFIG_IP6_NF_RAW=m CONFIG_IP6_NF_SECURITY=m CONFIG_IP6_NF_TARGET_LOG=m CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m CONFIG_IP6_NF_TARGET_HL=m CONFIG_NF_NAT_IPV6=m CONFIG_IP6_NF_TARGET_MASQUERADE=m @@ -1097,6 +1106,7 @@ CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_FQ=m CONFIG_NET_SCH_PLUG=m CONFIG_NET_CLS=y CONFIG_NET_CLS_ACT=y @@ -1143,6 +1153,7 @@ CONFIG_BATMAN_ADV_NC=y # CONFIG_BATMAN_ADV_DEBUG is not set CONFIG_OPENVSWITCH=m CONFIG_OPENVSWITCH_GRE=y +CONFIG_OPENVSWITCH_VXLAN=y CONFIG_VSOCKETS=m CONFIG_NETPRIO_CGROUP=m @@ -1331,7 +1342,7 @@ CONFIG_IXGBE_DCA=y CONFIG_IXGBE_DCB=y CONFIG_IXGBE_HWMON=y CONFIG_IXGBE_PTP=y - +CONFIG_I40E=m # CONFIG_NET_VENDOR_I825XX is not set CONFIG_NET_VENDOR_MARVELL=y @@ -1376,6 +1387,7 @@ CONFIG_NET_VENDOR_QLOGIC=y CONFIG_QLA3XXX=m CONFIG_QLCNIC=m CONFIG_QLCNIC_SRIOV=y +CONFIG_QLCNIC_DCB=y CONFIG_QLGE=m CONFIG_NETXEN_NIC=m @@ -1679,6 +1691,7 @@ CONFIG_RT2500USB=m CONFIG_RT2800USB=m CONFIG_RT2800USB_RT33XX=y CONFIG_RT2800USB_RT35XX=y +CONFIG_RT2800USB_RT3573=y CONFIG_RT2800USB_RT53XX=y CONFIG_RT2800USB_RT55XX=y CONFIG_RT2800USB_UNKNOWN=y @@ -1699,12 +1712,9 @@ CONFIG_USB_NET_SMSC75XX=m CONFIG_ZD1211RW=m # CONFIG_ZD1211RW_DEBUG is not set -CONFIG_WL12XX_MENU=m CONFIG_WL12XX=m -# CONFIG_WL12XX_HT is not set CONFIG_WL12XX_SPI=m CONFIG_WL12XX_SDIO=m -# CONFIG_WL12XX_SDIO_TEST is not set CONFIG_WL1251=m CONFIG_WL1251_SPI=m @@ -2017,6 +2027,7 @@ CONFIG_INPUT_SPARSEKMAP=m # CONFIG_INPUT_IMS_PCU is not set CONFIG_INPUT_CMA3000=m CONFIG_INPUT_CMA3000_I2C=m +CONFIG_INPUT_IDEAPAD_SLIDEBAR=m # # Input I/O drivers @@ -2200,6 +2211,7 @@ CONFIG_TCG_NSC=m CONFIG_TCG_ATMEL=m # CONFIG_TCG_INFINEON is not set # CONFIG_TCG_ST33_I2C is not set +# CONFIG_TCG_XEN is not set CONFIG_TELCLOCK=m # @@ -2238,6 +2250,13 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_XILINX_PS_UART is not set # CONFIG_SERIAL_TIMBERDALE is not set +CONFIG_SERIAL_ARC=m +CONFIG_SERIAL_ARC_NR_PORTS=1 +# CONFIG_SERIAL_RP2 is not set +# CONFIG_SERIAL_FSL_LPUART is not set +# CONFIG_SERIAL_ST_ASC is not set +# CONFIG_SERIAL_PCH_UART is not set + CONFIG_UNIX98_PTYS=y CONFIG_DEVPTS_MULTIPLE_INSTANCES=y # CONFIG_LEGACY_PTYS is not set @@ -2347,10 +2366,12 @@ CONFIG_SENSORS_GL518SM=m CONFIG_SENSORS_GL520SM=m CONFIG_SENSORS_HDAPS=m # CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_HTU21 is not set # CONFIG_SENSORS_I5K_AMB is not set # FIXME: IBMAEM x86 only? CONFIG_SENSORS_IBMAEM=m CONFIG_SENSORS_IBMPEX=m +# CONFIG_SENSORS_IIO_HWMON is not set CONFIG_SENSORS_IT87=m CONFIG_SENSORS_K8TEMP=m CONFIG_SENSORS_K10TEMP=m @@ -2452,17 +2473,125 @@ CONFIG_SENSORS_MAX8688=m CONFIG_SENSORS_MAX1668=m CONFIG_SENSORS_MAX197=m +# Industrial I/O subsystem configuration +CONFIG_IIO=m +CONFIG_IIO_BUFFER=y +CONFIG_IIO_BUFFER_CB=y +# CONFIG_IIO_KFIFO_BUF is not set +CONFIG_IIO_TRIGGERED_BUFFER=m +CONFIG_IIO_TRIGGER=y +CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 +CONFIG_IIO_INTERRUPT_TRIGGER=m +CONFIG_HID_SENSOR_IIO_COMMON=m +CONFIG_HID_SENSOR_IIO_TRIGGER=m +CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS=y +# CONFIG_IIO_SYSFS_TRIGGER is not set +# CONFIG_AD5446 is not set +# CONFIG_AD5380 is not set +# CONFIG_AD5064 is not set +# CONFIG_BMA180 is not set +# CONFIG_MAX1363 is not set +# CONFIG_MAX517 is not set +# CONFIG_MCP4725 is not set +# CONFIG_ITG3200 is not set +# CONFIG_APDS9300 is not set +# CONFIG_TSL2583 is not set +# CONFIG_TSL2x7x is not set +# CONFIG_NAU7802 is not set +# CONFIG_TI_ADC081C is not set +# CONFIG_EXYNOS_ADC is not set +# CONFIG_VIPERBOARD_ADC is not set +# CONFIG_INV_MPU6050_IIO is not set +CONFIG_IIO_ST_GYRO_3AXIS=m +CONFIG_IIO_ST_MAGN_3AXIS=m +CONFIG_IIO_ST_ACCEL_3AXIS=m +# CONFIG_ADJD_S311 is not set +# CONFIG_SENSORS_TSL2563 is not set +# CONFIG_VCNL4000 is not set +# CONFIG_AK8975 is not set +# CONFIG_TMP006 is not set +# CONFIG_IIO_ST_PRESS is not set +# CONFIG_KXSD9 is not set +# CONFIG_AD7266 is not set +# CONFIG_AD7298 is not set +# CONFIG_AD7476 is not set +# CONFIG_AD7791 is not set +# CONFIG_AD7793 is not set +# CONFIG_AD7887 is not set +# CONFIG_AD7923 is not set +# CONFIG_MCP320X is not set +# CONFIG_AD8366 is not set +# CONFIG_AD5360 is not set +# CONFIG_AD5421 is not set +# CONFIG_AD5449 is not set +# CONFIG_AD5504 is not set +# CONFIG_AD5624R_SPI is not set +# CONFIG_AD5686 is not set +# CONFIG_AD5755 is not set +# CONFIG_AD5764 is not set +# CONFIG_AD5791 is not set +# CONFIG_AD7303 is not set +# CONFIG_AD9523 is not set +# CONFIG_ADF4350 is not set +# CONFIG_ADIS16080 is not set +# CONFIG_ADIS16130 is not set +# CONFIG_ADIS16136 is not set +# CONFIG_ADIS16260 is not set +# CONFIG_ADXRS450 is not set +# CONFIG_ADIS16400 is not set +# CONFIG_ADIS16480 is not set + +# staging IIO drivers +# CONFIG_AD7291 is not set +# CONFIG_AD7606 is not set +# CONFIG_AD799X is not set +# CONFIG_ADT7316 is not set +# CONFIG_AD7150 is not set +# CONFIG_AD7152 is not set +# CONFIG_AD7746 is not set +# CONFIG_AD5933 is not set +# CONFIG_ADE7854 is not set +# CONFIG_SENSORS_ISL29018 is not set +# CONFIG_SENSORS_ISL29028 is not set +# CONFIG_SENSORS_HMC5843 is not set +# CONFIG_IIO_PERIODIC_RTC_TRIGGER is not set +# CONFIG_IIO_SIMPLE_DUMMY is not set +# CONFIG_ADIS16201 is not set +# CONFIG_ADIS16203 is not set +# CONFIG_ADIS16204 is not set +# CONFIG_ADIS16209 is not set +# CONFIG_ADIS16220 is not set +# CONFIG_ADIS16240 is not set +# CONFIG_LIS3L02DQ is not set +# CONFIG_SCA3000 is not set +# CONFIG_AD7780 is not set +# CONFIG_AD7816 is not set +# CONFIG_AD7192 is not set +# CONFIG_AD7280 is not set +# CONFIG_AD5930 is not set +# CONFIG_AD9832 is not set +# CONFIG_AD9834 is not set +# CONFIG_AD9850 is not set +# CONFIG_AD9852 is not set +# CONFIG_AD9910 is not set +# CONFIG_AD9951 is not set +# CONFIG_ADIS16060 is not set +# CONFIG_ADE7753 is not set +# CONFIG_ADE7754 is not set +# CONFIG_ADE7758 is not set +# CONFIG_ADE7759 is not set +# CONFIG_AD2S90 is not set +# CONFIG_AD2S1200 is not set +# CONFIG_AD2S1210 is not set + + + # CONFIG_HMC6352 is not set # CONFIG_BMP085 is not set # CONFIG_BMP085_I2C is not set # CONFIG_PCH_PHUB is not set -# CONFIG_SERIAL_PCH_UART is not set # CONFIG_USB_SWITCH_FSA9480 is not set # CONFIG_SRAM is not set -CONFIG_SERIAL_ARC=m -CONFIG_SERIAL_ARC_NR_PORTS=1 -# CONFIG_SERIAL_RP2 is not set -# CONFIG_SERIAL_FSL_LPUART is not set CONFIG_W1=m CONFIG_W1_CON=y @@ -2604,6 +2733,7 @@ CONFIG_RTC_DRV_PCF50633=m CONFIG_RTC_DRV_DS3232=m CONFIG_RTC_DRV_ISL12022=m # CONFIG_RTC_DRV_HID_SENSOR_TIME is not set +# CONFIG_RTC_DRV_MOXART is not set CONFIG_R3964=m # CONFIG_APPLICOM is not set @@ -2645,6 +2775,7 @@ CONFIG_DRM_MGAG200=m # do not enable on f17 or older # CONFIG_DRM_SAVAGE is not set CONFIG_DRM_I915=m CONFIG_DRM_I915_KMS=y +# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set CONFIG_DRM_VIA=m CONFIG_DRM_NOUVEAU=m CONFIG_NOUVEAU_DEBUG=5 @@ -2722,6 +2853,7 @@ CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_ALSA=m CONFIG_VIDEO_CX88_BLACKBIRD=m +CONFIG_VIDEO_CX88_ENABLE_VP3054=y CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_EM28XX=m CONFIG_VIDEO_EM28XX_ALSA=m @@ -2746,6 +2878,7 @@ CONFIG_VIDEO_SAA7134_ALSA=m CONFIG_VIDEO_SAA7134_DVB=m CONFIG_VIDEO_SAA7134_RC=y CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_STK1160_COMMON=m CONFIG_VIDEO_STK1160=m CONFIG_VIDEO_STK1160_AC97=y CONFIG_VIDEO_W9966=m @@ -2926,6 +3059,7 @@ CONFIG_IR_GPIO_CIR=m CONFIG_V4L_MEM2MEM_DRIVERS=y # CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set # CONFIG_VIDEO_SH_VEU is not set +# CONFIG_VIDEO_RENESAS_VSP1 is not set # CONFIG_V4L_TEST_DRIVERS is not set # CONFIG_VIDEO_MEM2MEM_TESTDEV is not set @@ -3231,9 +3365,15 @@ CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_EHCI_TT_NEWSCHED=y # CONFIG_USB_EHCI_MV is not set # CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +CONFIG_USB_ISP1362_HCD=m +CONFIG_USB_FUSBH200_HCD=m +# CONFIG_USB_FOTG210_HCD is not set CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PCI=y # CONFIG_USB_OHCI_HCD_SSB is not set +# CONFIG_USB_HCD_TEST_MODE is not set # CONFIG_USB_OHCI_HCD_PLATFORM is not set CONFIG_USB_UHCI_HCD=y CONFIG_USB_SL811_HCD=m @@ -3242,8 +3382,6 @@ CONFIG_USB_SL811_HCD_ISO=y # CONFIG_USB_R8A66597_HCD is not set CONFIG_USB_XHCI_HCD=y # CONFIG_USB_XHCI_HCD_DEBUGGING is not set -CONFIG_USB_ISP1362_HCD=m -CONFIG_USB_FUSBH200_HCD=m # # USB Device Class drivers @@ -3333,9 +3471,14 @@ CONFIG_HID_SMARTJOYPLUS=m CONFIG_HID_TOPSEED=m CONFIG_HID_THINGM=m CONFIG_HID_THRUSTMASTER=m +CONFIG_HID_XINMO=m CONFIG_HID_ZEROPLUS=m CONFIG_HID_ZYDACRON=m CONFIG_HID_SENSOR_HUB=m +CONFIG_HID_SENSOR_GYRO_3D=m +CONFIG_HID_SENSOR_MAGNETOMETER_3D=m +CONFIG_HID_SENSOR_ALS=m +CONFIG_HID_SENSOR_ACCEL_3D=m CONFIG_HID_EMS_FF=m CONFIG_HID_ELECOM=m CONFIG_HID_ELO=m @@ -3403,6 +3546,7 @@ CONFIG_USB_GSPCA_SPCA506=m CONFIG_USB_GSPCA_SPCA508=m CONFIG_USB_GSPCA_SPCA561=m CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STK1135=m CONFIG_USB_GSPCA_SUNPLUS=m CONFIG_USB_GSPCA_T613=m CONFIG_USB_GSPCA_TOPRO=m @@ -3446,6 +3590,7 @@ CONFIG_USB_SPEEDTOUCH=m CONFIG_USB_NET_AX8817X=m CONFIG_USB_NET_AX88179_178A=m CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m CONFIG_USB_NET_SMSC95XX=m CONFIG_USB_NET_GL620A=m CONFIG_USB_NET_NET1080=m @@ -3490,6 +3635,7 @@ CONFIG_USB_USS720=m # CONFIG_USB_SERIAL=y CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_SIMPLE=m CONFIG_USB_SERIAL_AIRCABLE=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m @@ -3584,6 +3730,7 @@ CONFIG_USB_PHY=y # CONFIG_OMAP_USB2 is not set # CONFIG_OMAP_USB3 is not set # CONFIG_OMAP_CONTROL_USB is not set +# CONFIG_AM335X_PHY_USB is not set # CONFIG_SAMSUNG_USBPHY is not set # CONFIG_SAMSUNG_USB2PHY is not set # CONFIG_SAMSUNG_USB3PHY is not set @@ -3600,8 +3747,6 @@ CONFIG_USB_FILE_STORAGE=m # CONFIG_USB_GADGET is not set # CONFIG_USB_DWC3 is not set # CONFIG_USB_GADGETFS is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set # CONFIG_USB_OXU210HP_HCD is not set CONFIG_USB_IOWARRIOR=m CONFIG_USB_ISIGHTFW=m @@ -3628,6 +3773,7 @@ CONFIG_RADIO_SI4713=m CONFIG_USB_MR800=m CONFIG_USB_STKWEBCAM=m # CONFIG_USB_TEST is not set +# CONFIG_USB_EHSET_TEST_FIXTURE is not set CONFIG_USB_TRANCEVIBRATOR=m CONFIG_USB_U132_HCD=m CONFIG_USB_UEAGLEATM=m @@ -3706,6 +3852,7 @@ CONFIG_MFD_VIPERBOARD=m # CONFIG_MFD_SI476X_CORE is not set # CONFIG_MFD_TPS65912 is not set # CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_DA9063 is not set # # File systems @@ -3755,6 +3902,7 @@ CONFIG_AUTOFS4_FS=y CONFIG_NILFS2_FS=m # CONFIG_LOGFS is not set CONFIG_CEPH_FS=m +CONFIG_CEPH_FSCACHE=y CONFIG_BLK_DEV_RBD=m CONFIG_CEPH_LIB=m # CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set @@ -3809,6 +3957,7 @@ CONFIG_ECRYPT_FS=m # CONFIG_ECRYPT_FS_MESSAGING is not set CONFIG_HFS_FS=m CONFIG_HFSPLUS_FS=m +# CONFIG_HFSPLUS_FS_POSIX_ACL is not set CONFIG_BEFS_FS=m # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -3910,6 +4059,7 @@ CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set # CONFIG_BTRFS_DEBUG is not set +# CONFIG_BTRFS_ASSERT is not set CONFIG_CONFIGFS_FS=y @@ -3947,6 +4097,7 @@ CONFIG_SUN_PARTITION=y # CONFIG_SYSV68_PARTITION is not set CONFIG_UNIXWARE_DISKLABEL=y # CONFIG_ULTRIX_PARTITION is not set +# CONFIG_CMDLINE_PARTITION is not set CONFIG_NLS=y @@ -4035,6 +4186,9 @@ CONFIG_HEADERS_CHECK=y # This generates a huge amount of dmesg spew # CONFIG_DEBUG_KOBJECT is not set # +# This breaks booting until the module patches are in-tree +# CONFIG_DEBUG_KOBJECT_RELEASE is not set +# # # These debug options are deliberatly left on (even in 'make release' kernels). # They aren't that much of a performance impact, and the value @@ -4236,6 +4390,9 @@ CONFIG_FB_ATY_BACKLIGHT=y # CONFIG_BACKLIGHT_SAHARA is not set CONFIG_BACKLIGHT_WM831X=m CONFIG_BACKLIGHT_LP855X=m +# CONFIG_BACKLIGHT_GPIO is not set +# CONFIG_BACKLIGHT_LV5207LP is not set +# CONFIG_BACKLIGHT_BD6107 is not set CONFIG_LCD_CLASS_DEVICE=m CONFIG_LCD_PLATFORM=m @@ -4385,7 +4542,8 @@ CONFIG_LEDS_DELL_NETBOOKS=m # CONFIG_LEDS_LM355x is not set # CONFIG_LEDS_OT200 is not set # CONFIG_LEDS_PWM is not set -# CONFIG_LEDS_RENESAS_TPU is not set +# CONFIG_LEDS_LP8501 is not set +# CONFIG_LEDS_PCA963X is not set CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=m CONFIG_LEDS_TRIGGER_ONESHOT=m @@ -4475,6 +4633,7 @@ CONFIG_POWER_SUPPLY=y # CONFIG_TEST_POWER is not set CONFIG_APM_POWER=m +# CONFIG_GENERIC_ADC_BATTERY is not set # CONFIG_WM831X_POWER is not set # CONFIG_BATTERY_DS2760 is not set @@ -4494,6 +4653,7 @@ CONFIG_APM_POWER=m # CONFIG_CHARGER_GPIO is not set # CONFIG_CHARGER_PCF50633 is not set # CONFIG_CHARGER_BQ2415X is not set +# CONFIG_CHARGER_BQ24190 is not set CONFIG_POWER_RESET=y # CONFIG_PDA_POWER is not set @@ -4509,6 +4669,7 @@ CONFIG_UIO_AEC=m CONFIG_UIO_SERCOS3=m CONFIG_UIO_PCI_GENERIC=m # CONFIG_UIO_NETX is not set +# CONFIG_UIO_MF624 is not set CONFIG_VFIO=m CONFIG_VFIO_IOMMU_TYPE1=m @@ -4548,6 +4709,7 @@ CONFIG_MEMSTICK=m # CONFIG_MEMSTICK_DEBUG is not set # CONFIG_MEMSTICK_UNSAFE_RESUME is not set CONFIG_MSPRO_BLOCK=m +# CONFIG_MS_BLOCK is not set CONFIG_MEMSTICK_TIFM_MS=m CONFIG_MEMSTICK_JMICRON_38X=m CONFIG_MEMSTICK_R592=m @@ -4616,6 +4778,7 @@ CONFIG_STAGING_MEDIA=y # CONFIG_TI_ST is not set # CONFIG_FB_XGI is not set # CONFIG_VIDEO_GO7007 is not set +# CONFIG_USB_MSI3101 is not set # CONFIG_DT3155 is not set # CONFIG_W35UND is not set # CONFIG_PRISM2_USB is not set @@ -4628,7 +4791,6 @@ CONFIG_USB_ATMEL=m # CONFIG_POHMELFS is not set # CONFIG_IDE_PHISON is not set # CONFIG_LINE6_USB is not set -# CONFIG_IIO is not set # CONFIG_VME_BUS is not set # CONFIG_RAR_REGISTER is not set # CONFIG_VT6656 is not set @@ -4642,6 +4804,7 @@ CONFIG_RTL8192E=m # CONFIG_INPUT_GPIO is not set # CONFIG_VIDEO_CX25821 is not set # CONFIG_R8187SE is not set +# CONFIG_R8188EU is not set # CONFIG_RTL8192U is not set # CONFIG_FB_SM7XX is not set # CONFIG_SPECTRA is not set @@ -4649,6 +4812,7 @@ CONFIG_RTL8192E=m # CONFIG_EASYCAP is not set # CONFIG_SOLO6X10 is not set # CONFIG_ACPI_QUICKSTART is not set +# CONFIG_LTE_GDM724X is not set CONFIG_R8712U=m # Larry Finger maintains this (rhbz 699618) # CONFIG_R8712_AP is not set # CONFIG_ATH6K_LEGACY is not set @@ -4682,6 +4846,10 @@ CONFIG_ALTERA_STAPL=m # CONFIG_CED1401 is not set # CONFIG_DGRP is not set # CONFIG_SB105X is not set +# CONFIG_LUSTRE_FS is not set +# CONFIG_XILLYBUS is not set +# CONFIG_DGAP is not set +# CONFIG_DGNC is not set # END OF STAGING # @@ -4737,6 +4905,7 @@ CONFIG_MAC802154=m CONFIG_NET_MPLS_GSO=m # CONFIG_EXTCON is not set +# CONFIG_EXTCON_ADC_JACK is not set # CONFIG_MEMORY is not set CONFIG_PPS=m @@ -4766,6 +4935,7 @@ CONFIG_ZSWAP=y # CONFIG_W1_MASTER_GPIO is not set # CONFIG_LEDS_GPIO is not set CONFIG_GPIO_SYSFS=y +# CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_MAX732X is not set # CONFIG_GPIO_PCA953X is not set # CONFIG_GPIO_PCF857X is not set @@ -4834,6 +5004,7 @@ CONFIG_BCMA=m CONFIG_BCMA_BLOCKIO=y CONFIG_BCMA_HOST_PCI_POSSIBLE=y CONFIG_BCMA_HOST_PCI=y +# CONFIG_BCMA_HOST_SOC is not set CONFIG_BCMA_DRIVER_GMAC_CMN=y CONFIG_BCMA_DRIVER_GPIO=y # CONFIG_BCMA_DEBUG is not set @@ -4862,5 +5033,3 @@ CONFIG_FMC_CHARDEV=m # CONFIG_CRYPTO_KEY_TYPE is not set # CONFIG_PGP_LIBRARY is not set # CONFIG_PGP_PRELOAD is not set - -# CONFIG_AM335X_PHY_USB is not set diff --git a/config-no-extra b/config-no-extra new file mode 100644 index 000000000..7539a173f --- /dev/null +++ b/config-no-extra @@ -0,0 +1,27 @@ +### config-no-extra: only (to a first approximation) modules listed in +### mod-extra.list should be listed here. + +# CONFIG_ISDN is not set +# CONFIG_RDS is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_ATALK is not set +# CONFIG_HAMRADIO is not set + +# CONFIG_DEV_APPLETALK is not set + +# CONFIG_FUSION is not set +# CONFIG_I2O is not set + +# CONFIG_NET_TULIP is not set + +# CONFIG_HERMES is not set + +# CONFIG_OCFS2_FS is not set +# CONFIG_CUSE is not set +# CONFIG_AFFS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set diff --git a/config-powerpc-generic b/config-powerpc-generic index f24becf02..7ba1a5da5 100644 --- a/config-powerpc-generic +++ b/config-powerpc-generic @@ -334,7 +334,6 @@ CONFIG_I2C_MPC=m # CONFIG_CRYPTO_DEV_FSL_CAAM is not set # CONFIG_CRYPTO_SHA1_PPC is not set -# CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_MCP23S08 is not set # CONFIG_CAN_FLEXCAN is not set @@ -380,3 +379,5 @@ CONFIG_BACKLIGHT_PWM=m CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=n CONFIG_XZ_DEC_POWERPC=y + +CONFIG_CRASH=m diff --git a/config-powerpc64 b/config-powerpc64 index c3f57b176..b430449e0 100644 --- a/config-powerpc64 +++ b/config-powerpc64 @@ -136,6 +136,8 @@ CONFIG_RELOCATABLE=y CONFIG_RCU_FANOUT=64 +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set CONFIG_KVM_BOOK3S_64=m CONFIG_KVM_BOOK3S_64_HV=y # CONFIG_KVM_EXIT_TIMING is not set @@ -176,5 +178,3 @@ CONFIG_BPF_JIT=y # CONFIG_PPC_TRANSACTIONAL_MEM is not set # CONFIG_SND_HDA_INTEL is not set CONFIG_BLK_DEV_RSXX=m - -CONFIG_CRASH=m diff --git a/config-powerpc64p7 b/config-powerpc64p7 index 8f09bc86f..0e0d957ec 100644 --- a/config-powerpc64p7 +++ b/config-powerpc64p7 @@ -127,6 +127,8 @@ CONFIG_RELOCATABLE=y CONFIG_RCU_FANOUT=64 +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set CONFIG_KVM_BOOK3S_64=m CONFIG_KVM_BOOK3S_64_HV=y # CONFIG_KVM_EXIT_TIMING is not set diff --git a/config-s390x b/config-s390x index eced08b37..6f3d3253e 100644 --- a/config-s390x +++ b/config-s390x @@ -235,8 +235,6 @@ CONFIG_SCM_BLOCK_CLUSTER_WRITE=y # CONFIG_S390_PTDUMP is not set # CONFIG_ASYMMETRIC_KEY_TYPE is not set # CONFIG_PCI is not set -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_MCP23S08 is not set # CONFIG_NEW_LEDS is not set # CONFIG_HID is not set @@ -249,6 +247,7 @@ CONFIG_SCM_BLOCK_CLUSTER_WRITE=y # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set +# CONFIG_SERIO is not set # CONFIG_ACCESSIBILITY is not set # CONFIG_AUXDISPLAY is not set @@ -267,6 +266,8 @@ CONFIG_SCM_BLOCK_CLUSTER_WRITE=y # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_NFORCE2 is not set +# CONFIG_PTP_1588_CLOCK is not set +# CONFIG_PPS is not set # CONFIG_PHYLIB is not set # CONFIG_ATM_DRIVERS is not set diff --git a/config-x86-generic b/config-x86-generic index 9418475f7..a21ec7aae 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -40,6 +40,8 @@ CONFIG_EFI_VARS_PSTORE=y CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y CONFIG_EFI_PCDP=y CONFIG_FB_EFI=y +# needs FB_SIMPLE to work correctly +# CONFIG_X86_SYSFB is not set # FIXME: 32bit only? # CONFIG_FB_N411 is not set @@ -254,6 +256,7 @@ CONFIG_PARAVIRT_TIME_ACCOUNTING=y CONFIG_KVM_CLOCK=y CONFIG_KVM_GUEST=y CONFIG_KVM_MMU_AUDIT=y # default $x would be nice... +# CONFIG_KVM_DEBUG_FS is not set CONFIG_XEN=y # CONFIG_XEN_DEBUG is not set @@ -362,6 +365,9 @@ CONFIG_LPC_ICH=m CONFIG_GPIO_ICH=m # CONFIG_GPIO_LYNXPOINT is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_F7188X is not set + CONFIG_PCI_CNB20LE_QUIRK=y @@ -398,9 +404,6 @@ CONFIG_HP_ACCEL=m # CONFIG_RAPIDIO is not set -# CONFIG_GPIO_GENERIC_PLATFORM is not set -# CONFIG_GPIO_MCP23S08 is not set - CONFIG_SCHED_SMT=y CONFIG_CC_STACKPROTECTOR=y CONFIG_RELOCATABLE=y @@ -459,3 +462,5 @@ CONFIG_MODULE_SIG_UEFI=y CONFIG_VMXNET3=m CONFIG_VFIO_PCI_VGA=y + +# CONFIG_NTB is not set diff --git a/config-x86_64-generic b/config-x86_64-generic index 0d85873ad..4f36d4d89 100644 --- a/config-x86_64-generic +++ b/config-x86_64-generic @@ -16,8 +16,10 @@ CONFIG_X86_64_ACPI_NUMA=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_NUMA_BALANCING=y -CONFIG_NR_CPUS=128 +# https://lists.fedoraproject.org/pipermail/kernel/2013-November/004601.html +CONFIG_NR_CPUS=1024 CONFIG_PHYSICAL_START=0x1000000 +CONFIG_PHYSICAL_ALIGN=0x1000000 CONFIG_IA32_EMULATION=y # CONFIG_IA32_AOUT is not set diff --git a/debug-bad-pte-modules.patch b/debug-bad-pte-modules.patch deleted file mode 100644 index 8dbf6db40..000000000 --- a/debug-bad-pte-modules.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 3cd4fefa1d614debf75f059def34ac1aaaf96501 Mon Sep 17 00:00:00 2001 -From: Josh Boyer -Date: Tue, 30 Apr 2013 14:01:57 -0400 -Subject: [PATCH] When we encounter a bad PTE, print out what modules were - loaded, so we can see if there is a common driver potentially at fault. - -Signed-off-by: Dave Jones ---- - mm/memory.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/mm/memory.c b/mm/memory.c -index 6dc1882..99564df 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -57,6 +57,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -720,6 +721,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr, - if (vma->vm_file && vma->vm_file->f_op) - printk(KERN_ALERT "vma->vm_file->f_op->mmap: %pSR\n", - vma->vm_file->f_op->mmap); -+ print_modules(); - dump_stack(); - add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); - } --- -1.8.1.4 - diff --git a/drm-i915-hush-check-crtc-state.patch b/drm-i915-hush-check-crtc-state.patch deleted file mode 100644 index 295cad7b7..000000000 --- a/drm-i915-hush-check-crtc-state.patch +++ /dev/null @@ -1,20 +0,0 @@ -Bugzilla: 1027037 1028785 -Upstream-status: http://lists.freedesktop.org/archives/intel-gfx/2013-November/035948.html - -This is _by far_ the most common backtrace for i915 on retrace.fp.o, and -it's mostly useless noise. There's not enough context when it's generated -to know if something actually went wrong. Downgrade the message to -KMS debugging so we can still get it if we want it. - -diff -up linux-3.13.0-0.rc0.git2.1.fc21.x86_64/drivers/gpu/drm/i915/intel_display.c.jx linux-3.13.0-0.rc0.git2.1.fc21.x86_64/drivers/gpu/drm/i915/intel_display.c ---- linux-3.13.0-0.rc0.git2.1.fc21.x86_64/drivers/gpu/drm/i915/intel_display.c.jx 2013-11-03 18:41:51.000000000 -0500 -+++ linux-3.13.0-0.rc0.git2.1.fc21.x86_64/drivers/gpu/drm/i915/intel_display.c 2013-11-13 10:12:05.781301624 -0500 -@@ -8803,7 +8803,7 @@ check_crtc_state(struct drm_device *dev) - - if (active && - !intel_pipe_config_compare(dev, &crtc->config, &pipe_config)) { -- WARN(1, "pipe state doesn't match!\n"); -+ DRM_DEBUG_KMS("pipe state doesn't match!\n"); - intel_dump_pipe_config(crtc, &pipe_config, - "[hw state]"); - intel_dump_pipe_config(crtc, &crtc->config, diff --git a/drm-intel-next.patch b/drm-intel-next.patch deleted file mode 100644 index c6cac6926..000000000 --- a/drm-intel-next.patch +++ /dev/null @@ -1 +0,0 @@ -empty diff --git a/drm-qxl-backport-fixes-for-Fedora.patch b/drm-qxl-backport-fixes-for-Fedora.patch index c46060d64..04848b529 100644 --- a/drm-qxl-backport-fixes-for-Fedora.patch +++ b/drm-qxl-backport-fixes-for-Fedora.patch @@ -150,19 +150,6 @@ index 7e96f4f..18c599d 100644 }; /* forward declaration for QXL_INFO_IO */ -diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c -index 88722f2..f437b30 100644 ---- a/drivers/gpu/drm/qxl/qxl_fb.c -+++ b/drivers/gpu/drm/qxl/qxl_fb.c -@@ -108,7 +108,7 @@ static void qxl_fb_dirty_flush(struct fb_info *info) - u32 x1, x2, y1, y2; - - /* TODO: hard coding 32 bpp */ -- int stride = qfbdev->qfb.base.pitches[0] * 4; -+ int stride = qfbdev->qfb.base.pitches[0]; - - x1 = qfbdev->dirty.x1; - x2 = qfbdev->dirty.x2; diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 9e8da9e..e0ddd5b 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c diff --git a/drm-qxl-fix-memory-leak-in-release-list-handling.patch b/drm-qxl-fix-memory-leak-in-release-list-handling.patch deleted file mode 100644 index 8ed4819f2..000000000 --- a/drm-qxl-fix-memory-leak-in-release-list-handling.patch +++ /dev/null @@ -1,30 +0,0 @@ -Bugzilla: N/A -Upstream-status: 3.13 - -From 1b28c3e628315ac0d9ef2d3fac0403f05ae692db Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Thu, 28 Nov 2013 05:39:03 +0000 -Subject: drm/qxl: fix memory leak in release list handling - -wow no idea how I got this far without seeing this, -leaking the entries in the list makes kmalloc-64 slab grow. - -References: https://bugzilla.kernel.org/show_bug.cgi?id=65121 -Cc: stable@vger.kernel.org -Reported-by: Matthew Stapleton -Signed-off-by: Dave Airlie ---- -diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c -index 0109a96..821ab7b 100644 ---- a/drivers/gpu/drm/qxl/qxl_release.c -+++ b/drivers/gpu/drm/qxl/qxl_release.c -@@ -92,6 +92,7 @@ qxl_release_free(struct qxl_device *qdev, - - DRM_FILE_OFFSET); - qxl_fence_remove_release(&bo->fence, release->id); - qxl_bo_unref(&bo); -+ kfree(entry); - } - spin_lock(&qdev->release_idr_lock); - idr_remove(&qdev->release_idr, release->id); --- -cgit v0.9.0.2-2-gbebe diff --git a/drm-radeon-24hz-audio-fixes.patch b/drm-radeon-24hz-audio-fixes.patch deleted file mode 100644 index 4fd8341ed..000000000 --- a/drm-radeon-24hz-audio-fixes.patch +++ /dev/null @@ -1,173 +0,0 @@ -Bugzilla: 1010679 -Upstream-status: 3.13 - -From 908171aa738b5bbcc6241cec46f73fcd57dd00d4 Mon Sep 17 00:00:00 2001 -From: Pierre Ossman -Date: Wed, 6 Nov 2013 20:00:32 +0100 -Subject: [PATCH 1/2] drm/radeon/audio: correct ACR table - -The values were taken from the HDMI spec, but they assumed -exact x/1.001 clocks. Since we round the clocks, we also need -to calculate different N and CTS values. - -Note that the N for 25.2/1.001 MHz at 44.1 kHz audio is out of -spec. Hopefully this mode is rarely used and/or HDMI sinks -tolerate overly large values of N. - -bug: -https://bugs.freedesktop.org/show_bug.cgi?id=69675 - -Signed-off-by: Pierre Ossman -Signed-off-by: Alex Deucher ---- - drivers/gpu/drm/radeon/r600_hdmi.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c -index 4140fe8..e8ca095 100644 ---- a/drivers/gpu/drm/radeon/r600_hdmi.c -+++ b/drivers/gpu/drm/radeon/r600_hdmi.c -@@ -57,15 +57,15 @@ enum r600_hdmi_iec_status_bits { - static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = { - /* 32kHz 44.1kHz 48kHz */ - /* Clock N CTS N CTS N CTS */ -- { 25175, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */ -+ { 25175, 4096, 25175, 28224, 125875, 6144, 25175 }, /* 25,20/1.001 MHz */ - { 25200, 4096, 25200, 6272, 28000, 6144, 25200 }, /* 25.20 MHz */ - { 27000, 4096, 27000, 6272, 30000, 6144, 27000 }, /* 27.00 MHz */ - { 27027, 4096, 27027, 6272, 30030, 6144, 27027 }, /* 27.00*1.001 MHz */ - { 54000, 4096, 54000, 6272, 60000, 6144, 54000 }, /* 54.00 MHz */ - { 54054, 4096, 54054, 6272, 60060, 6144, 54054 }, /* 54.00*1.001 MHz */ -- { 74176, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */ -+ { 74176, 4096, 74176, 5733, 75335, 6144, 74176 }, /* 74.25/1.001 MHz */ - { 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */ -- { 148352, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */ -+ { 148352, 4096, 148352, 5733, 150670, 6144, 148352 }, /* 148.50/1.001 MHz */ - { 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */ - { 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */ - }; --- -1.8.3.1 - - -From 05e4776357fe7217e531cbaaa163e24f688d10ce Mon Sep 17 00:00:00 2001 -From: Pierre Ossman -Date: Wed, 6 Nov 2013 20:09:08 +0100 -Subject: [PATCH 2/2] drm/radeon/audio: improve ACR calculation - -In order to have any realistic chance of calculating proper -ACR values, we need to be able to calculate both N and CTS, -not just CTS. We still aim for the ideal N as specified in -the HDMI spec though. - -bug: -https://bugs.freedesktop.org/show_bug.cgi?id=69675 - -Signed-off-by: Pierre Ossman -Signed-off-by: Alex Deucher ---- - drivers/gpu/drm/radeon/r600_hdmi.c | 68 ++++++++++++++++++++++++++------------ - 1 file changed, 46 insertions(+), 22 deletions(-) - -diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c -index e8ca095..92c6df7 100644 ---- a/drivers/gpu/drm/radeon/r600_hdmi.c -+++ b/drivers/gpu/drm/radeon/r600_hdmi.c -@@ -24,6 +24,7 @@ - * Authors: Christian König - */ - #include -+#include - #include - #include - #include "radeon.h" -@@ -67,25 +68,47 @@ static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = { - { 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */ - { 148352, 4096, 148352, 5733, 150670, 6144, 148352 }, /* 148.50/1.001 MHz */ - { 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */ -- { 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */ - }; - -+ - /* -- * calculate CTS value if it's not found in the table -+ * calculate CTS and N values if they are not found in the table - */ --static void r600_hdmi_calc_cts(uint32_t clock, int *CTS, int N, int freq) -+static void r600_hdmi_calc_cts(uint32_t clock, int *CTS, int *N, int freq) - { -- u64 n; -- u32 d; -- -- if (*CTS == 0) { -- n = (u64)clock * (u64)N * 1000ULL; -- d = 128 * freq; -- do_div(n, d); -- *CTS = n; -- } -- DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", -- N, *CTS, freq); -+ int n, cts; -+ unsigned long div, mul; -+ -+ /* Safe, but overly large values */ -+ n = 128 * freq; -+ cts = clock * 1000; -+ -+ /* Smallest valid fraction */ -+ div = gcd(n, cts); -+ -+ n /= div; -+ cts /= div; -+ -+ /* -+ * The optimal N is 128*freq/1000. Calculate the closest larger -+ * value that doesn't truncate any bits. -+ */ -+ mul = ((128*freq/1000) + (n-1))/n; -+ -+ n *= mul; -+ cts *= mul; -+ -+ /* Check that we are in spec (not always possible) */ -+ if (n < (128*freq/1500)) -+ printk(KERN_WARNING "Calculated ACR N value is too small. You may experience audio problems.\n"); -+ if (n > (128*freq/300)) -+ printk(KERN_WARNING "Calculated ACR N value is too large. You may experience audio problems.\n"); -+ -+ *N = n; -+ *CTS = cts; -+ -+ DRM_DEBUG("Calculated ACR timing N=%d CTS=%d for frequency %d\n", -+ *N, *CTS, freq); - } - - struct radeon_hdmi_acr r600_hdmi_acr(uint32_t clock) -@@ -93,15 +116,16 @@ struct radeon_hdmi_acr r600_hdmi_acr(uint32_t clock) - struct radeon_hdmi_acr res; - u8 i; - -- for (i = 0; r600_hdmi_predefined_acr[i].clock != clock && -- r600_hdmi_predefined_acr[i].clock != 0; i++) -- ; -- res = r600_hdmi_predefined_acr[i]; -+ /* Precalculated values for common clocks */ -+ for (i = 0; i < ARRAY_SIZE(r600_hdmi_predefined_acr); i++) { -+ if (r600_hdmi_predefined_acr[i].clock == clock) -+ return r600_hdmi_predefined_acr[i]; -+ } - -- /* In case some CTS are missing */ -- r600_hdmi_calc_cts(clock, &res.cts_32khz, res.n_32khz, 32000); -- r600_hdmi_calc_cts(clock, &res.cts_44_1khz, res.n_44_1khz, 44100); -- r600_hdmi_calc_cts(clock, &res.cts_48khz, res.n_48khz, 48000); -+ /* And odd clocks get manually calculated */ -+ r600_hdmi_calc_cts(clock, &res.cts_32khz, &res.n_32khz, 32000); -+ r600_hdmi_calc_cts(clock, &res.cts_44_1khz, &res.n_44_1khz, 44100); -+ r600_hdmi_calc_cts(clock, &res.cts_48khz, &res.n_48khz, 48000); - - return res; - } --- -1.8.3.1 - diff --git a/elevator-Fix-a-race-in-elevator-switching-and-md.patch b/elevator-Fix-a-race-in-elevator-switching-and-md.patch deleted file mode 100644 index 5517687ff..000000000 --- a/elevator-Fix-a-race-in-elevator-switching-and-md.patch +++ /dev/null @@ -1,162 +0,0 @@ - -Delivered-To: jwboyer@gmail.com -Received: by 10.76.168.104 with SMTP id zv8csp55663oab; - Fri, 30 Aug 2013 15:52:46 -0700 (PDT) -X-Received: by 10.68.244.168 with SMTP id xh8mr12419215pbc.3.1377903166373; - Fri, 30 Aug 2013 15:52:46 -0700 (PDT) -Return-Path: -Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) - by mx.google.com with ESMTP id qc9si280431pac.269.1969.12.31.16.00.00; - Fri, 30 Aug 2013 15:52:46 -0700 (PDT) -Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; -Authentication-Results: mx.google.com; - spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org; - dkim=neutral (bad format) header.i=@hds.com -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1753535Ab3H3WrV (ORCPT - + 99 others); Fri, 30 Aug 2013 18:47:21 -0400 -Received: from usindpps04.hds.com ([207.126.252.17]:35636 "EHLO - usindpps04.hds.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S1752650Ab3H3WrU (ORCPT - ); - Fri, 30 Aug 2013 18:47:20 -0400 -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hds.com; h=subject : to : from : cc - : date : message-id : mime-version : content-type : - content-transfer-encoding; s=mail1; - bh=VofHN8IMnygn2hbqnFjLmX0PPEPbvpzE377u1RxpGOY=; - b=piW6J78W57qDXBPJJuodWw/tvf0T//JbxKX6sLPvpuaOG2nBLMHzDqUeTYwFEQqUvdmf - ZTkiwsKi0WEku3MKcxJ7veR7wvTZcQ4fGMETFTf1c2J/1JOKpXLnft4ERuW89/FAxw25 - wQM1ulsuQ3Cncl0I/sIaqMlaMOtvuQ/C8rsHorp+75eFiL6yx1jU5wMbuti4D/NprIET - 3r57cPZ0YCh6sLjvOgjay6mKyktMToyjHPx6X1TWCSWcwes33Popc1hpadxUdFI/0npL - mN3Tttbe7e2RcmkXAZbwg8xj+FwSu3nIRC4G9UpFCsMz518C/AWZj4puwWE6VHZWVvVZ Rg== -Received: from usindmail01.hds.com (usindmail03 [207.126.252.22]) - by usindpps04.hds.com (8.14.5/8.14.5) with ESMTP id r7UMlBjr025492; - Fri, 30 Aug 2013 18:47:11 -0400 -Received: from hds.com (usindnetf5d-vlan47float.corp.hds.com [10.74.73.11]) - by usindmail01.hds.com (8.14.1/8.14.1) with ESMTP id r7UMl8SG058466; - Fri, 30 Aug 2013 18:47:10 -0400 (EDT) -Subject: [PATCH v2 1/2] elevator: Fix a race in elevator switching and md - device initialization -To: linux-kernel@vger.kernel.org -From: Tomoki Sekiyama -Cc: axboe@kernel.dk, tj@kernel.org, seiji.aguchi@hds.com, - vgoyal@redhat.com, majianpeng@gmail.com -Date: Fri, 30 Aug 2013 18:47:07 -0400 -Message-ID: <20130830224707.21812.63516.stgit@hds.com> -User-Agent: StGit/0.16 -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 7bit -X-Proofpoint-SPF-Result: pass -X-Proofpoint-SPF-Record: v=spf1 mx ip4:207.126.244.0/26 ip4:207.126.252.0/25 include:mktomail.com - include:cloud.hds.com ~all -X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 - definitions=2013-08-30_09:2013-08-30,2013-08-30,1970-01-01 signatures=0 -X-Proofpoint-Spam-Details: rule=notspam policy=outbound_policy score=0 spamscore=0 suspectscore=1 - phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx - scancount=1 engine=7.0.1-1305240000 definitions=main-1308300162 -Sender: linux-kernel-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: linux-kernel@vger.kernel.org - -The soft lockup below happens at the boot time of the system using dm -multipath and the udev rules to switch scheduler. - -[ 356.127001] BUG: soft lockup - CPU#3 stuck for 22s! [sh:483] -[ 356.127001] RIP: 0010:[] [] lock_timer_base.isra.35+0x1d/0x50 -... -[ 356.127001] Call Trace: -[ 356.127001] [] try_to_del_timer_sync+0x20/0x70 -[ 356.127001] [] ? kmem_cache_alloc_node_trace+0x20a/0x230 -[ 356.127001] [] del_timer_sync+0x52/0x60 -[ 356.127001] [] cfq_exit_queue+0x32/0xf0 -[ 356.127001] [] elevator_exit+0x2f/0x50 -[ 356.127001] [] elevator_change+0xf1/0x1c0 -[ 356.127001] [] elv_iosched_store+0x20/0x50 -[ 356.127001] [] queue_attr_store+0x59/0xb0 -[ 356.127001] [] sysfs_write_file+0xc6/0x140 -[ 356.127001] [] vfs_write+0xbd/0x1e0 -[ 356.127001] [] SyS_write+0x49/0xa0 -[ 356.127001] [] system_call_fastpath+0x16/0x1b - -This is caused by a race between md device initialization by multipathd and -shell script to switch the scheduler using sysfs. - - - multipathd: - SyS_ioctl -> do_vfs_ioctl -> dm_ctl_ioctl -> ctl_ioctl -> table_load - -> dm_setup_md_queue -> blk_init_allocated_queue -> elevator_init - q->elevator = elevator_alloc(q, e); // not yet initialized - - - sh -c 'echo deadline > /sys/$DEVPATH/queue/scheduler': - elevator_switch (in the call trace above) - struct elevator_queue *old = q->elevator; - q->elevator = elevator_alloc(q, new_e); - elevator_exit(old); // lockup! (*) - - - multipathd: (cont.) - err = e->ops.elevator_init_fn(q); // init fails; q->elevator is modified - -(*) When del_timer_sync() is called, lock_timer_base() will loop infinitely -while timer->base == NULL. In this case, as timer will never initialized, -it results in lockup. - -This patch introduces acquisition of q->sysfs_lock around elevator_init() -into blk_init_allocated_queue(), to provide mutual exclusion between -initialization of the q->scheduler and switching of the scheduler. - -This should fix this bugzilla: -https://bugzilla.redhat.com/show_bug.cgi?id=902012 - -Signed-off-by: Tomoki Sekiyama ---- - block/blk-core.c | 10 +++++++++- - block/elevator.c | 6 ++++++ - 2 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/block/blk-core.c b/block/blk-core.c -index 93a18d1..2f6275f 100644 ---- a/block/blk-core.c -+++ b/block/blk-core.c -@@ -739,9 +739,17 @@ blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, - - q->sg_reserved_size = INT_MAX; - -+ /* Protect q->elevator from elevator_change */ -+ mutex_lock(&q->sysfs_lock); -+ - /* init elevator */ -- if (elevator_init(q, NULL)) -+ if (elevator_init(q, NULL)) { -+ mutex_unlock(&q->sysfs_lock); - return NULL; -+ } -+ -+ mutex_unlock(&q->sysfs_lock); -+ - return q; - } - EXPORT_SYMBOL(blk_init_allocated_queue); -diff --git a/block/elevator.c b/block/elevator.c -index 668394d..02d4390 100644 ---- a/block/elevator.c -+++ b/block/elevator.c -@@ -186,6 +186,12 @@ int elevator_init(struct request_queue *q, char *name) - struct elevator_type *e = NULL; - int err; - -+ /* -+ * q->sysfs_lock must be held to provide mutual exclusion between -+ * elevator_switch() and here. -+ */ -+ lockdep_assert_held(&q->sysfs_lock); -+ - if (unlikely(q->elevator)) - return 0; - - --- -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html -Please read the FAQ at http://www.tux.org/lkml/ diff --git a/elevator-acquire-q-sysfs_lock-in-elevator_change.patch b/elevator-acquire-q-sysfs_lock-in-elevator_change.patch deleted file mode 100644 index 6f112b81c..000000000 --- a/elevator-acquire-q-sysfs_lock-in-elevator_change.patch +++ /dev/null @@ -1,121 +0,0 @@ - -Delivered-To: jwboyer@gmail.com -Received: by 10.76.168.104 with SMTP id zv8csp55623oab; - Fri, 30 Aug 2013 15:51:42 -0700 (PDT) -X-Received: by 10.67.30.70 with SMTP id kc6mr13149193pad.32.1377903101609; - Fri, 30 Aug 2013 15:51:41 -0700 (PDT) -Return-Path: -Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) - by mx.google.com with ESMTP id gg2si304840pac.217.1969.12.31.16.00.00; - Fri, 30 Aug 2013 15:51:41 -0700 (PDT) -Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; -Authentication-Results: mx.google.com; - spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org; - dkim=neutral (bad format) header.i=@hds.com -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1756106Ab3H3WrX (ORCPT - + 99 others); Fri, 30 Aug 2013 18:47:23 -0400 -Received: from usindpps04.hds.com ([207.126.252.17]:35640 "EHLO - usindpps04.hds.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S1752650Ab3H3WrW (ORCPT - ); - Fri, 30 Aug 2013 18:47:22 -0400 -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hds.com; h=subject : to : from : cc - : date : message-id : in-reply-to : references : mime-version : - content-type : content-transfer-encoding; s=mail1; - bh=xbQuWVaSJrPfWG5E7bXFAbOFjf/sBaRZsPmpVgy0CYk=; - b=NW/A8Imu32MXoBi5FLrQ0FsK66RTWMQo1bFRtgQplVEQQIAXyf1XhCaAZyTkTplc0iEx - ovyGZHvLbmGL6w3I3pxkCFz1BPJCqoZtvQITir/WvfzyadYOK1cz+vuBUQSCmfkacvS/ - w37h1jLAjsvWXkl0GY7pxB9HJMXdeLnhhuWxtNU8m8rKZ7t3LSByMeQi5/3OTkNojDEe - 70cKeZXCPQ/UIDJAF4cpSVXia5FwoJISjXvQIrvqkYhFelzq3OHMcC482PdpqNB475h3 - yHHJ83HFOLRulUQdOG5ZVTB9qRg0zxRx/oedeXwzturFke68noRRa4f4izQ8sCwsWOCI Dw== -Received: from usindmail01.hds.com (usindmail03 [207.126.252.22]) - by usindpps04.hds.com (8.14.5/8.14.5) with ESMTP id r7UMlHIc025543; - Fri, 30 Aug 2013 18:47:17 -0400 -Received: from hds.com (usindnetf5d-vlan47float.corp.hds.com [10.74.73.11]) - by usindmail01.hds.com (8.14.1/8.14.1) with ESMTP id r7UMlGiC058545; - Fri, 30 Aug 2013 18:47:17 -0400 (EDT) -Subject: [PATCH v2 2/2] elevator: acquire q->sysfs_lock in elevator_change() -To: linux-kernel@vger.kernel.org -From: Tomoki Sekiyama -Cc: axboe@kernel.dk, tj@kernel.org, seiji.aguchi@hds.com, - vgoyal@redhat.com, majianpeng@gmail.com -Date: Fri, 30 Aug 2013 18:47:16 -0400 -Message-ID: <20130830224716.21812.99333.stgit@hds.com> -In-Reply-To: <20130830224707.21812.63516.stgit@hds.com> -References: <20130830224707.21812.63516.stgit@hds.com> -User-Agent: StGit/0.16 -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 7bit -X-Proofpoint-SPF-Result: pass -X-Proofpoint-SPF-Record: v=spf1 mx ip4:207.126.244.0/26 ip4:207.126.252.0/25 include:mktomail.com - include:cloud.hds.com ~all -X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 - definitions=2013-08-30_09:2013-08-30,2013-08-30,1970-01-01 signatures=0 -X-Proofpoint-Spam-Details: rule=notspam policy=outbound_policy score=0 spamscore=0 suspectscore=1 - phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx - scancount=1 engine=7.0.1-1305240000 definitions=main-1308300162 -Sender: linux-kernel-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: linux-kernel@vger.kernel.org - -Add locking of q->sysfs_lock into elevator_change() (an exported function) -to ensure it is held to protect q->elevator from elevator_init(), even if -elevator_change() is called from non-sysfs paths. -sysfs path (elv_iosched_store) uses __elevator_change(), non-locking -version, as the lock is already taken by elv_iosched_store(). - -Signed-off-by: Tomoki Sekiyama ---- - block/elevator.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/block/elevator.c b/block/elevator.c -index 02d4390..6d765f7 100644 ---- a/block/elevator.c -+++ b/block/elevator.c -@@ -965,7 +965,7 @@ fail_init: - /* - * Switch this queue to the given IO scheduler. - */ --int elevator_change(struct request_queue *q, const char *name) -+static int __elevator_change(struct request_queue *q, const char *name) - { - char elevator_name[ELV_NAME_MAX]; - struct elevator_type *e; -@@ -987,6 +987,18 @@ int elevator_change(struct request_queue *q, const char *name) - - return elevator_switch(q, e); - } -+ -+int elevator_change(struct request_queue *q, const char *name) -+{ -+ int ret; -+ -+ /* Protect q->elevator from elevator_init() */ -+ mutex_lock(&q->sysfs_lock); -+ ret = __elevator_change(q, name); -+ mutex_unlock(&q->sysfs_lock); -+ -+ return ret; -+} - EXPORT_SYMBOL(elevator_change); - - ssize_t elv_iosched_store(struct request_queue *q, const char *name, -@@ -997,7 +1009,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name, - if (!q->elevator) - return count; - -- ret = elevator_change(q, name); -+ ret = __elevator_change(q, name); - if (!ret) - return count; - - --- -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html -Please read the FAQ at http://www.tux.org/lkml/ diff --git a/fix-child-thread-introspection.patch b/fix-child-thread-introspection.patch deleted file mode 100644 index 4c0bad1a6..000000000 --- a/fix-child-thread-introspection.patch +++ /dev/null @@ -1,76 +0,0 @@ -Allow threads other than the main thread to do introspection of files in -proc without relying on read permissions. proc_pid_follow_link() calls -proc_fd_access_allowed() which ultimately calls __ptrace_may_access(). - -Though this allows additional access to some proc files, we do not -believe that this has any unintended security implications. However it -probably needs to be looked at carefully. - -The original problem was a thread of a process whose permissions were -111 couldn't open its own /proc/self/exe This was interfering with a -special purpose debugging tool. A simple reproducer is below.: - -#include -#include -#include -#include -#include -#include - -#define BUFSIZE 2048 - -void *thread_main(void *arg){ - char *str=(char*)arg; - char buf[BUFSIZE]; - ssize_t len=readlink("/proc/self/exe", buf, BUFSIZE); - if(len==-1) - printf("/proc/self/exe in %s: %s\n", str,sys_errlist[errno]); - else - printf("/proc/self/exe in %s: OK\n", str); - - return 0; -} - -int main(){ - pthread_t thread; - - int retval=pthread_create( &thread, NULL, thread_main, "thread"); - if(retval!=0) - exit(1); - - thread_main("main"); - pthread_join(thread, NULL); - - exit(0); -} - -Signed-off-by: Ben Woodard -Signed-off-by: Mark Grondona ---- - kernel/ptrace.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/kernel/ptrace.c b/kernel/ptrace.c -index acbd284..347c4c7 100644 ---- a/kernel/ptrace.c -+++ b/kernel/ptrace.c -diff -ruNp linux-3.8.4-103.fc17.noarch/kernel/ptrace.c linux-3.8.4-103.fc17.ptrace/kernel/ptrace.c ---- linux-3.8.4-103.fc17.noarch/kernel/ptrace.c 2013-02-18 17:58:34.000000000 -0600 -+++ linux-3.8.4-103.fc17.ptrace/kernel/ptrace.c 2013-03-26 14:59:01.939396346 -0500 -@@ -234,7 +234,7 @@ static int __ptrace_may_access(struct ta - */ - int dumpable = 0; - /* Don't let security modules deny introspection */ -- if (task == current) -+ if (same_thread_group(task, current)) - return 0; - rcu_read_lock(); - tcred = __task_cred(task); --- -1.8.1.4 - --- -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html -Please read the FAQ at http://www.tux.org/lkml/ diff --git a/fix-radeon-sound.patch b/fix-radeon-sound.patch deleted file mode 100644 index 6e59256bb..000000000 --- a/fix-radeon-sound.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 062c2e4363451d49ef840232fe65e8bff0dde2a5 Mon Sep 17 00:00:00 2001 -From: Alex Deucher -Date: Fri, 27 Sep 2013 18:09:54 -0400 -Subject: [PATCH 1/4] drm/radeon: use 64-bit math to calculate CTS values for - audio (v2) - -Avoid losing precision. See bug: -https://bugs.freedesktop.org/show_bug.cgi?id=69675 - -v2: fix math as per Anssi's comments. - -Signed-off-by: Alex Deucher ---- - drivers/gpu/drm/radeon/r600_hdmi.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c -index b0fa600..49043a5 100644 ---- a/drivers/gpu/drm/radeon/r600_hdmi.c -+++ b/drivers/gpu/drm/radeon/r600_hdmi.c -@@ -75,8 +75,15 @@ static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = { - */ - static void r600_hdmi_calc_cts(uint32_t clock, int *CTS, int N, int freq) - { -- if (*CTS == 0) -- *CTS = clock * N / (128 * freq) * 1000; -+ u64 n; -+ u32 d; -+ -+ if (*CTS == 0) { -+ n = (u64)clock * (u64)N * 1000ULL; -+ d = 128 * freq; -+ do_div(n, d); -+ *CTS = n; -+ } - DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", - N, *CTS, freq); - } --- -1.8.3.1 - - -From e7d12c2f98ae1e68c7298e5028048d150fa553a1 Mon Sep 17 00:00:00 2001 -From: Alex Deucher -Date: Fri, 27 Sep 2013 18:19:42 -0400 -Subject: [PATCH 2/4] drm/radeon: fix N/CTS clock matching for audio - -The drm code that calculates the 1001 clocks rounds up -rather than truncating. This allows the table to match -properly on those modes. - -See bug: -https://bugs.freedesktop.org/show_bug.cgi?id=69675 - -Signed-off-by: Alex Deucher ---- - drivers/gpu/drm/radeon/r600_hdmi.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c -index 49043a5..567703f 100644 ---- a/drivers/gpu/drm/radeon/r600_hdmi.c -+++ b/drivers/gpu/drm/radeon/r600_hdmi.c -@@ -57,15 +57,15 @@ enum r600_hdmi_iec_status_bits { - static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = { - /* 32kHz 44.1kHz 48kHz */ - /* Clock N CTS N CTS N CTS */ -- { 25174, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */ -+ { 25175, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */ - { 25200, 4096, 25200, 6272, 28000, 6144, 25200 }, /* 25.20 MHz */ - { 27000, 4096, 27000, 6272, 30000, 6144, 27000 }, /* 27.00 MHz */ - { 27027, 4096, 27027, 6272, 30030, 6144, 27027 }, /* 27.00*1.001 MHz */ - { 54000, 4096, 54000, 6272, 60000, 6144, 54000 }, /* 54.00 MHz */ - { 54054, 4096, 54054, 6272, 60060, 6144, 54054 }, /* 54.00*1.001 MHz */ -- { 74175, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */ -+ { 74176, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */ - { 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */ -- { 148351, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */ -+ { 148352, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */ - { 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */ - { 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */ - }; --- -1.8.3.1 - - -From ee0fec312a1c4e26f255955da942562cd8908a4b Mon Sep 17 00:00:00 2001 -From: Alex Deucher -Date: Fri, 27 Sep 2013 18:22:15 -0400 -Subject: [PATCH 3/4] drm/radeon: use hw generated CTS/N values for audio - -Use the hw generated values rather than calculating -them in the driver. There may be some older r6xx -asics where this doesn't work correctly. This remains -to be seen. - -See bug: -https://bugs.freedesktop.org/show_bug.cgi?id=69675 - -Signed-off-by: Alex Deucher ---- - drivers/gpu/drm/radeon/r600_hdmi.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c -index 567703f..e2ae1c2 100644 ---- a/drivers/gpu/drm/radeon/r600_hdmi.c -+++ b/drivers/gpu/drm/radeon/r600_hdmi.c -@@ -451,8 +451,7 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod - } - - WREG32(HDMI0_ACR_PACKET_CONTROL + offset, -- HDMI0_ACR_AUTO_SEND | /* allow hw to sent ACR packets when required */ -- HDMI0_ACR_SOURCE); /* select SW CTS value */ -+ HDMI0_ACR_AUTO_SEND); /* allow hw to sent ACR packets when required */ - - WREG32(HDMI0_VBI_PACKET_CONTROL + offset, - HDMI0_NULL_SEND | /* send null packets when required */ --- -1.8.3.1 - - -From b852c985010a77c850b7548d64bbb964ca462b02 Mon Sep 17 00:00:00 2001 -From: Alex Deucher -Date: Thu, 10 Oct 2013 11:47:01 -0400 -Subject: [PATCH 4/4] drm/radeon: re-enable sw ACR support on pre-DCE4 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -HW ACR support may have issues on some older chips, so -use SW ACR for now until we've tested further. - -Signed-off-by: Alex Deucher -CC: Rafał Miłecki ---- - drivers/gpu/drm/radeon/r600_hdmi.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c -index e2ae1c2..5b72931 100644 ---- a/drivers/gpu/drm/radeon/r600_hdmi.c -+++ b/drivers/gpu/drm/radeon/r600_hdmi.c -@@ -451,6 +451,7 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod - } - - WREG32(HDMI0_ACR_PACKET_CONTROL + offset, -+ HDMI0_ACR_SOURCE | /* select SW CTS value - XXX verify that hw CTS works on all families */ - HDMI0_ACR_AUTO_SEND); /* allow hw to sent ACR packets when required */ - - WREG32(HDMI0_VBI_PACKET_CONTROL + offset, --- -1.8.3.1 - diff --git a/inet-fix-addr_len-msg_namelen-assignment-in-recv_error-and-rxpmtu-functions.patch b/inet-fix-addr_len-msg_namelen-assignment-in-recv_error-and-rxpmtu-functions.patch deleted file mode 100644 index b76fd2a36..000000000 --- a/inet-fix-addr_len-msg_namelen-assignment-in-recv_error-and-rxpmtu-functions.patch +++ /dev/null @@ -1,253 +0,0 @@ -Bugzilla: 1035887 -Upstream-status: 3.13 - -From 4be402ba6158068d53ab0268f1affa9d82dae2ec Mon Sep 17 00:00:00 2001 -From: Hannes Frederic Sowa -Date: Fri, 22 Nov 2013 23:46:12 +0000 -Subject: [PATCH] inet: fix addr_len/msg->msg_namelen assignment in recv_error - and rxpmtu functions - -Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage -of uninitialized memory to user in recv syscalls") conditionally updated -addr_len if the msg_name is written to. The recv_error and rxpmtu -functions relied on the recvmsg functions to set up addr_len before. - -As this does not happen any more we have to pass addr_len to those -functions as well and set it to the size of the corresponding sockaddr -length. - -This broke traceroute and such. - -Fixes: bceaa90240b6 ("inet: prevent leakage of uninitialized memory to user in recv syscalls") -Reported-by: Brad Spengler -Reported-by: Tom Labanowski -Cc: mpb -Cc: David S. Miller -Cc: Eric Dumazet -Signed-off-by: Hannes Frederic Sowa -Signed-off-by: David S. Miller ---- - include/net/ip.h | 2 +- - include/net/ipv6.h | 4 ++-- - include/net/ping.h | 3 ++- - net/ipv4/ip_sockglue.c | 3 ++- - net/ipv4/ping.c | 5 +++-- - net/ipv4/raw.c | 2 +- - net/ipv4/udp.c | 2 +- - net/ipv6/datagram.c | 7 +++++-- - net/ipv6/ping.c | 3 ++- - net/ipv6/raw.c | 4 ++-- - net/ipv6/udp.c | 4 ++-- - net/l2tp/l2tp_ip6.c | 2 +- - 12 files changed, 24 insertions(+), 17 deletions(-) - -diff --git a/include/net/ip.h b/include/net/ip.h -index 5e52688..301f10c 100644 ---- a/include/net/ip.h -+++ b/include/net/ip.h -@@ -464,7 +464,7 @@ extern int compat_ip_getsockopt(struct sock *sk, int level, - int optname, char __user *optval, int __user *optlen); - extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *)); - --extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len); -+extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len); - extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, - __be16 port, u32 info, u8 *payload); - extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, -diff --git a/include/net/ipv6.h b/include/net/ipv6.h -index bbf1c8f..5529d79 100644 ---- a/include/net/ipv6.h -+++ b/include/net/ipv6.h -@@ -802,8 +802,8 @@ extern int compat_ipv6_getsockopt(struct sock *sk, - extern int ip6_datagram_connect(struct sock *sk, - struct sockaddr *addr, int addr_len); - --extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); --extern int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len); -+extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len); -+extern int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len, int *addr_len); - extern void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, - u32 info, u8 *payload); - extern void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info); -diff --git a/include/net/ping.h b/include/net/ping.h -index 5db0224..2b496e9 100644 ---- a/include/net/ping.h -+++ b/include/net/ping.h -@@ -31,7 +31,8 @@ - - /* Compatibility glue so we can support IPv6 when it's compiled as a module */ - struct pingv6_ops { -- int (*ipv6_recv_error)(struct sock *sk, struct msghdr *msg, int len); -+ int (*ipv6_recv_error)(struct sock *sk, struct msghdr *msg, int len, -+ int *addr_len); - int (*ip6_datagram_recv_ctl)(struct sock *sk, struct msghdr *msg, - struct sk_buff *skb); - int (*icmpv6_err_convert)(u8 type, u8 code, int *err); -diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c -index d9c4f11..23e6ab0 100644 ---- a/net/ipv4/ip_sockglue.c -+++ b/net/ipv4/ip_sockglue.c -@@ -368,7 +368,7 @@ void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 port, u32 inf - /* - * Handle MSG_ERRQUEUE - */ --int ip_recv_error(struct sock *sk, struct msghdr *msg, int len) -+int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) - { - struct sock_exterr_skb *serr; - struct sk_buff *skb, *skb2; -@@ -405,6 +405,7 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len) - serr->addr_offset); - sin->sin_port = serr->port; - memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); -+ *addr_len = sizeof(*sin); - } - - memcpy(&errhdr.ee, &serr->ee, sizeof(struct sock_extended_err)); -diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c -index 92fb6ff..ac31877 100644 ---- a/net/ipv4/ping.c -+++ b/net/ipv4/ping.c -@@ -838,10 +838,11 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - - if (flags & MSG_ERRQUEUE) { - if (family == AF_INET) { -- return ip_recv_error(sk, msg, len); -+ return ip_recv_error(sk, msg, len, addr_len); - #if IS_ENABLED(CONFIG_IPV6) - } else if (family == AF_INET6) { -- return pingv6_ops.ipv6_recv_error(sk, msg, len); -+ return pingv6_ops.ipv6_recv_error(sk, msg, len, -+ addr_len); - #endif - } - } -diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c -index ca4c3f1..7d3db78 100644 ---- a/net/ipv4/raw.c -+++ b/net/ipv4/raw.c -@@ -695,7 +695,7 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - goto out; - - if (flags & MSG_ERRQUEUE) { -- err = ip_recv_error(sk, msg, len); -+ err = ip_recv_error(sk, msg, len, addr_len); - goto out; - } - -diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c -index a7003de..1ef8794 100644 ---- a/net/ipv4/udp.c -+++ b/net/ipv4/udp.c -@@ -1210,7 +1210,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - bool slow; - - if (flags & MSG_ERRQUEUE) -- return ip_recv_error(sk, msg, len); -+ return ip_recv_error(sk, msg, len, addr_len); - - try_again: - skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), -diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c -index 48b6bd2..7a0fd80 100644 ---- a/net/ipv6/datagram.c -+++ b/net/ipv6/datagram.c -@@ -318,7 +318,7 @@ void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu) - /* - * Handle MSG_ERRQUEUE - */ --int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) -+int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) - { - struct ipv6_pinfo *np = inet6_sk(sk); - struct sock_exterr_skb *serr; -@@ -369,6 +369,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) - &sin->sin6_addr); - sin->sin6_scope_id = 0; - } -+ *addr_len = sizeof(*sin); - } - - memcpy(&errhdr.ee, &serr->ee, sizeof(struct sock_extended_err)); -@@ -423,7 +424,8 @@ EXPORT_SYMBOL_GPL(ipv6_recv_error); - /* - * Handle IPV6_RECVPATHMTU - */ --int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len) -+int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len, -+ int *addr_len) - { - struct ipv6_pinfo *np = inet6_sk(sk); - struct sk_buff *skb; -@@ -457,6 +459,7 @@ int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len) - sin->sin6_port = 0; - sin->sin6_scope_id = mtu_info.ip6m_addr.sin6_scope_id; - sin->sin6_addr = mtu_info.ip6m_addr.sin6_addr; -+ *addr_len = sizeof(*sin); - } - - put_cmsg(msg, SOL_IPV6, IPV6_PATHMTU, sizeof(mtu_info), &mtu_info); -diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c -index 18f19df..7856e96 100644 ---- a/net/ipv6/ping.c -+++ b/net/ipv6/ping.c -@@ -57,7 +57,8 @@ static struct inet_protosw pingv6_protosw = { - - - /* Compatibility glue so we can support IPv6 when it's compiled as a module */ --static int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) -+static int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, -+ int *addr_len) - { - return -EAFNOSUPPORT; - } -diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c -index 2f303bf..430067c 100644 ---- a/net/ipv6/raw.c -+++ b/net/ipv6/raw.c -@@ -467,10 +467,10 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, - return -EOPNOTSUPP; - - if (flags & MSG_ERRQUEUE) -- return ipv6_recv_error(sk, msg, len); -+ return ipv6_recv_error(sk, msg, len, addr_len); - - if (np->rxpmtu && np->rxopt.bits.rxpmtu) -- return ipv6_recv_rxpmtu(sk, msg, len); -+ return ipv6_recv_rxpmtu(sk, msg, len, addr_len); - - skb = skb_recv_datagram(sk, flags, noblock, &err); - if (!skb) -diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c -index a59beed..3d2758d 100644 ---- a/net/ipv6/udp.c -+++ b/net/ipv6/udp.c -@@ -375,10 +375,10 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, - bool slow; - - if (flags & MSG_ERRQUEUE) -- return ipv6_recv_error(sk, msg, len); -+ return ipv6_recv_error(sk, msg, len, addr_len); - - if (np->rxpmtu && np->rxopt.bits.rxpmtu) -- return ipv6_recv_rxpmtu(sk, msg, len); -+ return ipv6_recv_rxpmtu(sk, msg, len, addr_len); - - try_again: - skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), -diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c -index b8a6039..e6e8408 100644 ---- a/net/l2tp/l2tp_ip6.c -+++ b/net/l2tp/l2tp_ip6.c -@@ -665,7 +665,7 @@ static int l2tp_ip6_recvmsg(struct kiocb *iocb, struct sock *sk, - *addr_len = sizeof(*lsa); - - if (flags & MSG_ERRQUEUE) -- return ipv6_recv_error(sk, msg, len); -+ return ipv6_recv_error(sk, msg, len, addr_len); - - skb = skb_recv_datagram(sk, flags, noblock, &err); - if (!skb) --- -1.8.3.1 - diff --git a/inet-prevent-leakage-of-uninitialized-memory-to-user.patch b/inet-prevent-leakage-of-uninitialized-memory-to-user.patch deleted file mode 100644 index c5b941134..000000000 --- a/inet-prevent-leakage-of-uninitialized-memory-to-user.patch +++ /dev/null @@ -1,256 +0,0 @@ -Bugzilla: 1035887 -Upstream-status: 3.13 - -From bceaa90240b6019ed73b49965eac7d167610be69 Mon Sep 17 00:00:00 2001 -From: Hannes Frederic Sowa -Date: Mon, 18 Nov 2013 04:20:45 +0100 -Subject: [PATCH] inet: prevent leakage of uninitialized memory to user in recv - syscalls - -Only update *addr_len when we actually fill in sockaddr, otherwise we -can return uninitialized memory from the stack to the caller in the -recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) -checks because we only get called with a valid addr_len pointer either -from sock_common_recvmsg or inet_recvmsg. - -If a blocking read waits on a socket which is concurrently shut down we -now return zero and set msg_msgnamelen to 0. - -Reported-by: mpb -Suggested-by: Eric Dumazet -Signed-off-by: Hannes Frederic Sowa -Signed-off-by: David S. Miller ---- - net/ieee802154/dgram.c | 3 +-- - net/ipv4/ping.c | 19 +++++++------------ - net/ipv4/raw.c | 4 +--- - net/ipv4/udp.c | 7 +------ - net/ipv6/raw.c | 4 +--- - net/ipv6/udp.c | 5 +---- - net/l2tp/l2tp_ip.c | 4 +--- - net/phonet/datagram.c | 9 ++++----- - 8 files changed, 17 insertions(+), 38 deletions(-) - -diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c -index 581a595..1865fdf 100644 ---- a/net/ieee802154/dgram.c -+++ b/net/ieee802154/dgram.c -@@ -315,9 +315,8 @@ static int dgram_recvmsg(struct kiocb *iocb, struct sock *sk, - if (saddr) { - saddr->family = AF_IEEE802154; - saddr->addr = mac_cb(skb)->sa; -- } -- if (addr_len) - *addr_len = sizeof(*saddr); -+ } - - if (flags & MSG_TRUNC) - copied = skb->len; -diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c -index 9afbdb1..aacefa0 100644 ---- a/net/ipv4/ping.c -+++ b/net/ipv4/ping.c -@@ -830,8 +830,6 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - { - struct inet_sock *isk = inet_sk(sk); - int family = sk->sk_family; -- struct sockaddr_in *sin; -- struct sockaddr_in6 *sin6; - struct sk_buff *skb; - int copied, err; - -@@ -841,13 +839,6 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - if (flags & MSG_OOB) - goto out; - -- if (addr_len) { -- if (family == AF_INET) -- *addr_len = sizeof(*sin); -- else if (family == AF_INET6 && addr_len) -- *addr_len = sizeof(*sin6); -- } -- - if (flags & MSG_ERRQUEUE) { - if (family == AF_INET) { - return ip_recv_error(sk, msg, len); -@@ -877,11 +868,13 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - - /* Copy the address and add cmsg data. */ - if (family == AF_INET) { -- sin = (struct sockaddr_in *) msg->msg_name; -+ struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name; -+ - sin->sin_family = AF_INET; - sin->sin_port = 0 /* skb->h.uh->source */; - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); -+ *addr_len = sizeof(*sin); - - if (isk->cmsg_flags) - ip_cmsg_recv(msg, skb); -@@ -890,17 +883,19 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - } else if (family == AF_INET6) { - struct ipv6_pinfo *np = inet6_sk(sk); - struct ipv6hdr *ip6 = ipv6_hdr(skb); -- sin6 = (struct sockaddr_in6 *) msg->msg_name; -+ struct sockaddr_in6 *sin6 = -+ (struct sockaddr_in6 *)msg->msg_name; -+ - sin6->sin6_family = AF_INET6; - sin6->sin6_port = 0; - sin6->sin6_addr = ip6->saddr; -- - sin6->sin6_flowinfo = 0; - if (np->sndflow) - sin6->sin6_flowinfo = ip6_flowinfo(ip6); - - sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr, - IP6CB(skb)->iif); -+ *addr_len = sizeof(*sin6); - - if (inet6_sk(sk)->rxopt.all) - pingv6_ops.ip6_datagram_recv_ctl(sk, msg, skb); -diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c -index 41e1d28..5cb8ddb 100644 ---- a/net/ipv4/raw.c -+++ b/net/ipv4/raw.c -@@ -696,9 +696,6 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - if (flags & MSG_OOB) - goto out; - -- if (addr_len) -- *addr_len = sizeof(*sin); -- - if (flags & MSG_ERRQUEUE) { - err = ip_recv_error(sk, msg, len); - goto out; -@@ -726,6 +723,7 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - sin->sin_port = 0; - memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); -+ *addr_len = sizeof(*sin); - } - if (inet->cmsg_flags) - ip_cmsg_recv(msg, skb); -diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c -index 89909dd..998431c 100644 ---- a/net/ipv4/udp.c -+++ b/net/ipv4/udp.c -@@ -1235,12 +1235,6 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, - int is_udplite = IS_UDPLITE(sk); - bool slow; - -- /* -- * Check any passed addresses -- */ -- if (addr_len) -- *addr_len = sizeof(*sin); -- - if (flags & MSG_ERRQUEUE) - return ip_recv_error(sk, msg, len); - -@@ -1302,6 +1296,7 @@ try_again: - sin->sin_port = udp_hdr(skb)->source; - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); -+ *addr_len = sizeof(*sin); - } - if (inet->cmsg_flags) - ip_cmsg_recv(msg, skb); -diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c -index 3c00842..e24ff1d 100644 ---- a/net/ipv6/raw.c -+++ b/net/ipv6/raw.c -@@ -465,9 +465,6 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, - if (flags & MSG_OOB) - return -EOPNOTSUPP; - -- if (addr_len) -- *addr_len=sizeof(*sin6); -- - if (flags & MSG_ERRQUEUE) - return ipv6_recv_error(sk, msg, len); - -@@ -506,6 +503,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, - sin6->sin6_flowinfo = 0; - sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr, - IP6CB(skb)->iif); -+ *addr_len = sizeof(*sin6); - } - - sock_recv_ts_and_drops(msg, sk, skb); -diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c -index f3893e8..81eb8cf 100644 ---- a/net/ipv6/udp.c -+++ b/net/ipv6/udp.c -@@ -392,9 +392,6 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, - int is_udp4; - bool slow; - -- if (addr_len) -- *addr_len = sizeof(struct sockaddr_in6); -- - if (flags & MSG_ERRQUEUE) - return ipv6_recv_error(sk, msg, len); - -@@ -480,7 +477,7 @@ try_again: - ipv6_iface_scope_id(&sin6->sin6_addr, - IP6CB(skb)->iif); - } -- -+ *addr_len = sizeof(*sin6); - } - if (is_udp4) { - if (inet->cmsg_flags) -diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c -index 571db8d..da1a1ce 100644 ---- a/net/l2tp/l2tp_ip.c -+++ b/net/l2tp/l2tp_ip.c -@@ -518,9 +518,6 @@ static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m - if (flags & MSG_OOB) - goto out; - -- if (addr_len) -- *addr_len = sizeof(*sin); -- - skb = skb_recv_datagram(sk, flags, noblock, &err); - if (!skb) - goto out; -@@ -543,6 +540,7 @@ static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m - sin->sin_addr.s_addr = ip_hdr(skb)->saddr; - sin->sin_port = 0; - memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); -+ *addr_len = sizeof(*sin); - } - if (inet->cmsg_flags) - ip_cmsg_recv(msg, skb); -diff --git a/net/phonet/datagram.c b/net/phonet/datagram.c -index 12c30f3..38946b2 100644 ---- a/net/phonet/datagram.c -+++ b/net/phonet/datagram.c -@@ -139,9 +139,6 @@ static int pn_recvmsg(struct kiocb *iocb, struct sock *sk, - MSG_CMSG_COMPAT)) - goto out_nofree; - -- if (addr_len) -- *addr_len = sizeof(sa); -- - skb = skb_recv_datagram(sk, flags, noblock, &rval); - if (skb == NULL) - goto out_nofree; -@@ -162,8 +159,10 @@ static int pn_recvmsg(struct kiocb *iocb, struct sock *sk, - - rval = (flags & MSG_TRUNC) ? skb->len : copylen; - -- if (msg->msg_name != NULL) -- memcpy(msg->msg_name, &sa, sizeof(struct sockaddr_pn)); -+ if (msg->msg_name != NULL) { -+ memcpy(msg->msg_name, &sa, sizeof(sa)); -+ *addr_len = sizeof(sa); -+ } - - out: - skb_free_datagram(sk, skb); --- -1.8.3.1 - diff --git a/iommu-Remove-stack-trace-from-broken-irq-remapping-warning.patch b/iommu-Remove-stack-trace-from-broken-irq-remapping-warning.patch deleted file mode 100644 index 9e88893ae..000000000 --- a/iommu-Remove-stack-trace-from-broken-irq-remapping-warning.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 05104a4e8713b27291c7bb49c1e7e68b4e243571 Mon Sep 17 00:00:00 2001 -From: Neil Horman -Date: Fri, 27 Sep 2013 16:53:35 +0000 -Subject: iommu: Remove stack trace from broken irq remapping warning - -The warning for the irq remapping broken check in intel_irq_remapping.c is -pretty pointless. We need the warning, but we know where its comming from, the -stack trace will always be the same, and it needlessly triggers things like -Abrt. This changes the warning to just print a text warning about BIOS being -broken, without the stack trace, then sets the appropriate taint bit. Since we -automatically disable irq remapping, theres no need to contiue making Abrt jump -at this problem - -Signed-off-by: Neil Horman -CC: Joerg Roedel -CC: Bjorn Helgaas -CC: Andy Lutomirski -CC: Konrad Rzeszutek Wilk -CC: Sebastian Andrzej Siewior -Signed-off-by: Joerg Roedel ---- -diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c -index f71673d..b97d70b 100644 ---- a/drivers/iommu/intel_irq_remapping.c -+++ b/drivers/iommu/intel_irq_remapping.c -@@ -525,12 +525,13 @@ static int __init intel_irq_remapping_supported(void) - if (disable_irq_remap) - return 0; - if (irq_remap_broken) { -- WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND, -- "This system BIOS has enabled interrupt remapping\n" -- "on a chipset that contains an erratum making that\n" -- "feature unstable. To maintain system stability\n" -- "interrupt remapping is being disabled. Please\n" -- "contact your BIOS vendor for an update\n"); -+ printk(KERN_WARNING -+ "This system BIOS has enabled interrupt remapping\n" -+ "on a chipset that contains an erratum making that\n" -+ "feature unstable. To maintain system stability\n" -+ "interrupt remapping is being disabled. Please\n" -+ "contact your BIOS vendor for an update\n"); -+ add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK); - disable_irq_remap = 1; - return 0; - } --- -cgit v0.9.2 diff --git a/ipv6-fix-headroom-calculation-in-udp6_ufo_fragment.patch b/ipv6-fix-headroom-calculation-in-udp6_ufo_fragment.patch deleted file mode 100644 index 2b030387b..000000000 --- a/ipv6-fix-headroom-calculation-in-udp6_ufo_fragment.patch +++ /dev/null @@ -1,43 +0,0 @@ -Bugzilla: 1030015 1030017 -Upstream-status: 3.13 - -From aeb45260747b0a1bf4d374d5e65298cc254cb4f5 Mon Sep 17 00:00:00 2001 -From: Hannes Frederic Sowa -Date: Tue, 5 Nov 2013 02:41:27 +0100 -Subject: [PATCH] ipv6: fix headroom calculation in udp6_ufo_fragment - -Commit 1e2bd517c108816220f262d7954b697af03b5f9c ("udp6: Fix udp -fragmentation for tunnel traffic.") changed the calculation if -there is enough space to include a fragment header in the skb from a -skb->mac_header dervived one to skb_headroom. Because we already peeled -off the skb to transport_header this is wrong. Change this back to check -if we have enough room before the mac_header. - -This fixes a panic Saran Neti reported. He used the tbf scheduler which -skb_gso_segments the skb. The offsets get negative and we panic in memcpy -because the skb was erroneously not expanded at the head. - -Reported-by: Saran Neti -Cc: Pravin B Shelar -Signed-off-by: Hannes Frederic Sowa -Signed-off-by: David S. Miller ---- - net/ipv6/udp_offload.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c -index 5d1b8d7..657914b 100644 ---- a/net/ipv6/udp_offload.c -+++ b/net/ipv6/udp_offload.c -@@ -86,7 +86,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, - - /* Check if there is enough headroom to insert fragment header. */ - tnl_hlen = skb_tnl_header_len(skb); -- if (skb_headroom(skb) < (tnl_hlen + frag_hdr_sz)) { -+ if (skb->mac_header < (tnl_hlen + frag_hdr_sz)) { - if (gso_pskb_expand_head(skb, tnl_hlen + frag_hdr_sz)) - goto out; - } --- -1.8.3.1 - diff --git a/iwl3945-better-skb-management-in-rx-path.patch b/iwl3945-better-skb-management-in-rx-path.patch deleted file mode 100644 index 5d85af7d4..000000000 --- a/iwl3945-better-skb-management-in-rx-path.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Eric Dumazet - -Steinar reported reallocations of skb->head with IPv6, leading to -a warning in skb_try_coalesce() - -It turns out iwl3945 has several problems : - -1) skb->truesize is underestimated. - We really consume PAGE_SIZE bytes for a fragment, - not the frame length. -2) 128 bytes of initial headroom is a bit low and forces reallocations. -3) We can avoid consuming a full page for small enough frames. - -Reported-by: Steinar H. Gunderson -Signed-off-by: Eric Dumazet -Cc: Paul Stewart ---- -v3: use regular memcpy(skb_put(...),...) -v2: SMALL_PACKET_SIZE define - - drivers/net/wireless/iwlegacy/3945.c | 31 +++++++++++++++---------- - 1 file changed, 19 insertions(+), 12 deletions(-) - -diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c -index c092033..f09e257 100644 ---- a/drivers/net/wireless/iwlegacy/3945.c -+++ b/drivers/net/wireless/iwlegacy/3945.c -@@ -475,6 +475,8 @@ il3945_is_network_packet(struct il_priv *il, struct ieee80211_hdr *header) - } - } - -+#define SMALL_PACKET_SIZE 256 -+ - static void - il3945_pass_packet_to_mac80211(struct il_priv *il, struct il_rx_buf *rxb, - struct ieee80211_rx_status *stats) -@@ -483,14 +485,13 @@ il3945_pass_packet_to_mac80211(struct il_priv *il, struct il_rx_buf *rxb, - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IL_RX_DATA(pkt); - struct il3945_rx_frame_hdr *rx_hdr = IL_RX_HDR(pkt); - struct il3945_rx_frame_end *rx_end = IL_RX_END(pkt); -- u16 len = le16_to_cpu(rx_hdr->len); -+ u32 len = le16_to_cpu(rx_hdr->len); - struct sk_buff *skb; - __le16 fc = hdr->frame_control; -+ u32 fraglen = PAGE_SIZE << il->hw_params.rx_page_order; - - /* We received data from the HW, so stop the watchdog */ -- if (unlikely -- (len + IL39_RX_FRAME_SIZE > -- PAGE_SIZE << il->hw_params.rx_page_order)) { -+ if (unlikely(len + IL39_RX_FRAME_SIZE > fraglen)) { - D_DROP("Corruption detected!\n"); - return; - } -@@ -506,26 +507,32 @@ il3945_pass_packet_to_mac80211(struct il_priv *il, struct il_rx_buf *rxb, - D_INFO("Woke queues - frame received on passive channel\n"); - } - -- skb = dev_alloc_skb(128); -+ skb = dev_alloc_skb(SMALL_PACKET_SIZE); - if (!skb) { - IL_ERR("dev_alloc_skb failed\n"); - return; - } - - if (!il3945_mod_params.sw_crypto) -- il_set_decrypted_flag(il, (struct ieee80211_hdr *)rxb_addr(rxb), -+ il_set_decrypted_flag(il, (struct ieee80211_hdr *)pkt, - le32_to_cpu(rx_end->status), stats); - -- skb_add_rx_frag(skb, 0, rxb->page, -- (void *)rx_hdr->payload - (void *)pkt, len, -- len); -- -+ /* If frame is small enough to fit into skb->head, copy it -+ * and do not consume a full page -+ */ -+ if (len <= SMALL_PACKET_SIZE) { -+ memcpy(skb_put(skb, len), rx_hdr->payload, len); -+ } else { -+ skb_add_rx_frag(skb, 0, rxb->page, -+ (void *)rx_hdr->payload - (void *)pkt, len, -+ fraglen); -+ il->alloc_rxb_page--; -+ rxb->page = NULL; -+ } - il_update_stats(il, false, fc, len); - memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats)); - - ieee80211_rx(il->hw, skb); -- il->alloc_rxb_page--; -- rxb->page = NULL; - } - - #define IL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) - - diff --git a/iwl4965-better-skb-management-in-rx-path.patch b/iwl4965-better-skb-management-in-rx-path.patch deleted file mode 100644 index 904ff04f6..000000000 --- a/iwl4965-better-skb-management-in-rx-path.patch +++ /dev/null @@ -1,65 +0,0 @@ -4965 version of Eric patch "iwl3945: better skb management in rx path". -It fixes several problems : - -1) skb->truesize is underestimated. - We really consume PAGE_SIZE bytes for a fragment, - not the frame length. -2) 128 bytes of initial headroom is a bit low and forces reallocations. -3) We can avoid consuming a full page for small enough frames. - -Signed-off-by: Stanislaw Gruszka ---- - drivers/net/wireless/iwlegacy/4965-mac.c | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c -index d287fd2..4e5d408 100644 ---- a/drivers/net/wireless/iwlegacy/4965-mac.c -+++ b/drivers/net/wireless/iwlegacy/4965-mac.c -@@ -574,9 +574,11 @@ il4965_translate_rx_status(struct il_priv *il, u32 decrypt_in) - return decrypt_out; - } - -+#define SMALL_PACKET_SIZE 256 -+ - static void - il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr, -- u16 len, u32 ampdu_status, struct il_rx_buf *rxb, -+ u32 len, u32 ampdu_status, struct il_rx_buf *rxb, - struct ieee80211_rx_status *stats) - { - struct sk_buff *skb; -@@ -598,21 +600,25 @@ il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr, - il_set_decrypted_flag(il, hdr, ampdu_status, stats)) - return; - -- skb = dev_alloc_skb(128); -+ skb = dev_alloc_skb(SMALL_PACKET_SIZE); - if (!skb) { - IL_ERR("dev_alloc_skb failed\n"); - return; - } - -- skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb), len, -- len); -+ if (len <= SMALL_PACKET_SIZE) { -+ memcpy(skb_put(skb, len), hdr, len); -+ } else { -+ skb_add_rx_frag(skb, 0, rxb->page, (void *)hdr - rxb_addr(rxb), -+ len, PAGE_SIZE << il->hw_params.rx_page_order); -+ il->alloc_rxb_page--; -+ rxb->page = NULL; -+ } - - il_update_stats(il, false, fc, len); - memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats)); - - ieee80211_rx(il->hw, skb); -- il->alloc_rxb_page--; -- rxb->page = NULL; - } - - /* Called for N_RX (legacy ABG frames), or --- -1.7.11.7 - diff --git a/iwlwifi-dvm-dont-override-mac80211-queue-setting.patch b/iwlwifi-dvm-dont-override-mac80211-queue-setting.patch deleted file mode 100644 index ce5f00b0b..000000000 --- a/iwlwifi-dvm-dont-override-mac80211-queue-setting.patch +++ /dev/null @@ -1,98 +0,0 @@ -From f6b129527ca15bae29ffb9417ddaa1c9d99ffc5d Mon Sep 17 00:00:00 2001 -From: Emmanuel Grumbach -Date: Tue, 15 Oct 2013 19:04:54 +0000 -Subject: iwlwifi: dvm: don't override mac80211's queue setting - -Since we set IEEE80211_HW_QUEUE_CONTROL, we can let -mac80211 do the queue assignement and don't need to -override its decisions. -While reassiging the same values is harmless of course, -it triggered a WARNING when iwlwifi and mac80211 came -to different conclusions. This happened when mac80211 set -IEEE80211_TX_CTL_SEND_AFTER_DTIM, but didn't route the -packet to the cab_queue because no stations were asleep. - -iwlwifi should not override mac80211's decicions for -offchannel packets and packets to be sent after DTIM, -but it should override mac80211's decision for AMPDUs -since we have a special queue for them. So for AMPDU, -we still override info->hw_queue by the AMPDU queue. - -This avoids: -------------[ cut here ]------------ -WARNING: CPU: 0 PID: 2531 at drivers/net/wireless/iwlwifi/dvm/tx.c:456 iwlagn_tx_skb+0x6c5/0x883() -Modules linked in: -CPU: 0 PID: 2531 Comm: hostapd Not tainted 3.12.0-rc5+ #1 -Hardware name: /D53427RKE, BIOS RKPPT10H.86A.0017.2013.0425.1251 04/25/2013 - 0000000000000000 0000000000000009 ffffffff8189aa62 0000000000000000 - ffffffff8105a4f2 ffff880058339a48 ffffffff815f8a04 0000000000000000 - ffff8800560097b0 0000000000000208 0000000000000000 ffff8800561a9e5e -Call Trace: - [] ? dump_stack+0x41/0x51 - [] ? warn_slowpath_common+0x78/0x90 - [] ? iwlagn_tx_skb+0x6c5/0x883 - [] ? iwlagn_tx_skb+0x6c5/0x883 - [] ? put_cred+0x15/0x15 - [] ? iwlagn_mac_tx+0x19/0x2f - [] ? __ieee80211_tx+0x226/0x29b - [] ? ieee80211_tx+0xa6/0xb5 - [] ? ieee80211_monitor_start_xmit+0x1e9/0x204 - [] ? dev_hard_start_xmit+0x271/0x3ec - [] ? sch_direct_xmit+0x66/0x164 - [] ? dev_queue_xmit+0x1e5/0x3c8 - [] ? packet_sendmsg+0xac5/0xb3d - [] ? sock_sendmsg+0x37/0x52 - [] ? __do_fault+0x338/0x36b - [] ? verify_iovec+0x44/0x94 - [] ? ___sys_sendmsg+0x1f1/0x283 - [] ? __inode_wait_for_writeback+0x67/0xae - [] ? __cache_free.isra.46+0x178/0x187 - [] ? kmem_cache_free+0x44/0x84 - [] ? dentry_kill+0x13d/0x149 - [] ? dput+0xe5/0xef - [] ? fget_light+0x2e/0x7c - [] ? __sys_sendmsg+0x39/0x57 - [] ? system_call_fastpath+0x16/0x1b ----[ end trace 1b3eb79359c1d1e6 ]--- - -Reported-by: Sander Eikelenboom -Reviewed-by: Johannes Berg -Signed-off-by: Johannes Berg ---- -diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c -index da442b8..1fef524 100644 ---- a/drivers/net/wireless/iwlwifi/dvm/tx.c -+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c -@@ -433,27 +433,19 @@ int iwlagn_tx_skb(struct iwl_priv *priv, - /* Copy MAC header from skb into command buffer */ - memcpy(tx_cmd->hdr, hdr, hdr_len); - -+ txq_id = info->hw_queue; -+ - if (is_agg) - txq_id = priv->tid_data[sta_id][tid].agg.txq_id; - else if (info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) { - /* -- * Send this frame after DTIM -- there's a special queue -- * reserved for this for contexts that support AP mode. -- */ -- txq_id = ctx->mcast_queue; -- -- /* - * The microcode will clear the more data - * bit in the last frame it transmits. - */ - hdr->frame_control |= - cpu_to_le16(IEEE80211_FCTL_MOREDATA); -- } else if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) -- txq_id = IWL_AUX_QUEUE; -- else -- txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)]; -+ } - -- WARN_ON_ONCE(!is_agg && txq_id != info->hw_queue); - WARN_ON_ONCE(is_agg && - priv->queue_to_mac80211[txq_id] != info->hw_queue); - --- -cgit v0.9.2 diff --git a/kernel.spec b/kernel.spec index a670495a5..cac37d75c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -62,19 +62,19 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 301 +%global baserelease 300 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching # on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base, # which yields a base_sublevel of 0. -%define base_sublevel 11 +%define base_sublevel 12 ## If this is a released kernel ## %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 10 +%define stable_update 5 # Is it a -stable RC? %define stable_rc 0 # Set rpm version accordingly @@ -493,13 +493,13 @@ ExclusiveOS: Linux # # List the packages used during the kernel build # -BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar -BuildRequires: bzip2, xz, findutils, gzip, m4, perl, perl-Carp, make >= 3.78, diffutils, gawk -BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config, hmaccalc +BuildRequires: kmod, patch, bash, sh-utils, tar +BuildRequires: bzip2, xz, findutils, gzip, m4, perl, perl-Carp, make, diffutils, gawk +BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc BuildRequires: net-tools, hostname, bc BuildRequires: xmlto, asciidoc %if %{with_sparse} -BuildRequires: sparse >= 0.4.1 +BuildRequires: sparse %endif %if %{with_perf} BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) bison @@ -510,11 +510,7 @@ BuildRequires: pciutils-devel gettext %endif BuildConflicts: rhbuildsys(DiskFree) < 500Mb %if %{with_debuginfo} -# Fancy new debuginfo generation introduced in Fedora 8/RHEL 6. -# The -r flag to find-debuginfo.sh invokes eu-strip --reloc-debug-sections -# which reduces the number of relocations in kernel module .ko.debug files and -# was introduced with rpm 4.9 and elfutils 0.153. -BuildRequires: rpm-build >= 4.9.0-1, elfutils >= elfutils-0.153-1 +BuildRequires: rpm-build, elfutils %define debuginfo_args --strict-build-id -r %endif @@ -543,6 +539,7 @@ Source20: Makefile.config Source21: config-debug Source22: config-nodebug Source23: config-generic +Source24: config-no-extra Source30: config-x86-generic Source31: config-i686-PAE @@ -624,15 +621,6 @@ Patch09: upstream-reverts.patch # Standalone patches -#drop with next rebase -Patch100: taint-vbox.patch - -#drop with next rebase -Patch110: vmbugon-warnon.patch - -#drop with next rebase -Patch201: debug-bad-pte-modules.patch - Patch390: defaults-acpi-video.patch Patch396: acpi-sony-nonvs-blacklist.patch @@ -646,6 +634,8 @@ Patch470: die-floppy-die.patch Patch510: silence-noise.patch Patch530: silence-fbcon-logo.patch +Patch600: x86-allow-1024-cpus.patch + Patch800: crash-driver.patch # crypto/ @@ -668,19 +658,12 @@ Patch1003: sysrq-secure-boot.patch # nouveau + drm fixes # intel drm is all merged upstream -Patch1824: drm-intel-next.patch Patch1825: drm-i915-dp-stfu.patch -Patch1826: drm-i915-hush-check-crtc-state.patch # Quiet boot fixes # silence the ACPI blacklist code Patch2802: silence-acpi-blacklist.patch -# media patches -Patch2899: v4l-dvb-fixes.patch -Patch2900: v4l-dvb-update.patch -Patch2901: v4l-dvb-experimental.patch - # fs fixes # NFSv4 @@ -703,8 +686,6 @@ Patch15000: nowatchdog-on-virt.patch # lpae Patch21001: arm-lpae-ax88796.patch Patch21004: arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch -Patch21005: arm-exynos-mp.patch -Patch21006: arm-highbank-for-3.12.patch # ARM omap Patch21010: arm-omap-load-tfp410.patch @@ -712,12 +693,17 @@ Patch21010: arm-omap-load-tfp410.patch # ARM tegra Patch21020: arm-tegra-usb-no-reset-linux33.patch -# ARM wandboard -Patch21030: arm-wandboard-quad.patch -# https://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/patch/?id=3f1a91aa25579ba5e7268a47a73d2a83e4802c62 +# ARM i.MX6 +# http://www.spinics.net/lists/devicetree/msg08276.html +Patch21025: arm-imx6-utilite.patch -# AM33xx -Patch21100: am335x-bone.patch +# am33xx (BeagleBone) +# https://github.com/beagleboard/kernel +# Pulled primarily from the above git repo. First patch is all in arm-soc +# scheduled for 3.13. The others should be landing via other trees +Patch21030: arm-am33xx-arm-soc-upstream.patch +Patch21031: arm-am33xx-bblack.patch +Patch21032: arm-am33xx-cpsw.patch #rhbz 754518 Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch @@ -730,42 +716,9 @@ Patch21247: ath9k_rx_dma_stop_check.patch Patch22000: weird-root-dentry-name-debug.patch -#rhbz 927469 -Patch23006: fix-child-thread-introspection.patch - Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch -#rhbz 977040 -Patch25056: iwl3945-better-skb-management-in-rx-path.patch -Patch25057: iwl4965-better-skb-management-in-rx-path.patch - -#rhbz 963715 -Patch25077: media-cx23885-Fix-TeVii-S471-regression-since-introduction-of-ts2020.patch - -#rhbz 985522 -Patch25107: ntp-Make-periodic-RTC-update-more-reliable.patch - -#rhbz 971893 -Patch25109: bonding-driver-alb-learning.patch - -#rhbz 902012 -Patch25114: elevator-Fix-a-race-in-elevator-switching-and-md.patch -Patch25115: elevator-acquire-q-sysfs_lock-in-elevator_change.patch - -#rhbz 974072 -Patch25117: rt2800-add-support-for-rf3070.patch - -#rhbz 1015989 -Patch25122: netfilter-nf_conntrack-use-RCU-safe-kfree-for-conntr.patch - -#rhbz 982153 -Patch25123: iommu-Remove-stack-trace-from-broken-irq-remapping-warning.patch - -#rhbz 998732 -Patch25125: vfio-iommu-Fixed-interaction-of-VFIO_IOMMU_MAP_DMA.patch - #rhbz 896695 -Patch25126: 0001-iwlwifi-don-t-WARN-on-host-commands-sent-when-firmwa.patch Patch25127: 0002-iwlwifi-don-t-WARN-on-bad-firmware-state.patch #rhbz 993744 @@ -774,43 +727,11 @@ Patch25128: dm-cache-policy-mq_fix-large-scale-table-allocation-bug.patch #rhbz 1000439 Patch25129: cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch -#rhbz 1010679 -Patch25130: fix-radeon-sound.patch -Patch25149: drm-radeon-24hz-audio-fixes.patch - -#rhbz 984696 -Patch25132: rt2800usb-slow-down-TX-status-polling.patch - -#rhbz 1023413 -Patch25135: alps-Support-for-Dell-XT2-model.patch - -#rhbz 1011621 -Patch25137: cifs-Allow-LANMAN-auth-for-unencapsulated-auth-methods.patch - -#rhbz 1025769 -Patch25142: iwlwifi-dvm-dont-override-mac80211-queue-setting.patch - -Patch25143: drm-qxl-backport-fixes-for-Fedora.patch -Patch25160: drm-qxl-fix-memory-leak-in-release-list-handling.patch - -Patch25144: Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch - -#CVE-2013-4563 rhbz 1030015 1030017 -Patch25145: ipv6-fix-headroom-calculation-in-udp6_ufo_fragment.patch - -#rhbz 1015905 -Patch25146: 0001-ip6_output-fragment-outgoing-reassembled-skb-properl.patch -Patch25147: 0002-netfilter-push-reasm-skb-through-instead-of-original.patch +Patch25140: drm-qxl-backport-fixes-for-Fedora.patch #rhbz 1011362 Patch25148: alx-Reset-phy-speed-after-resume.patch -#rhbz 1031086 -Patch25150: slab_common-Do-not-check-for-duplicate-slab-names.patch - -#rhbz 967652 -Patch25151: KVM-x86-fix-emulation-of-movzbl-bpl-eax.patch - # Fix 15sec NFS mount delay Patch25152: sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch Patch25153: sunrpc-replace-gssd_running-with-more-reliable-check.patch @@ -819,22 +740,9 @@ Patch25154: nfs-check-gssd-running-before-krb5i-auth.patch #CVE-2013-6382 rhbz 1033603 1034670 Patch25157: xfs-underflow-bug-in-xfs_attrlist_by_handle.patch -#rhbz 1022733 -Patch25158: via-velocity-fix-netif_receive_skb-use-in-irq-disable.patch - -#rhbz 998342 -Patch25159: usbnet-fix-status-interrupt-urb-handling.patch - -#CVE-2013-6405 rhbz 1035875 1035887 -Patch25161: inet-prevent-leakage-of-uninitialized-memory-to-user.patch -Patch25162: inet-fix-addr_len-msg_namelen-assignment-in-recv_error-and-rxpmtu-functions.patch - #rhbz 958826 Patch25164: dell-laptop.patch -#CVE-2013-XXXX rhbz 1039845 1039874 -Patch25165: net-rework-recvmsg-handler-msg_name-and-msg_namelen-.patch - #rhbz 1030802 Patch25170: Input-elantech-add-support-for-newer-August-2013-dev.patch Patch25171: elantech-Properly-differentiate-between-clickpads-an.patch @@ -1391,17 +1299,9 @@ ApplyOptionalPatch compile-fixes.patch # revert patches from upstream that conflict or that we get via other means ApplyOptionalPatch upstream-reverts.patch -R -#drop with next rebase -ApplyPatch taint-vbox.patch - -#drop with next rebase -ApplyPatch vmbugon-warnon.patch - -#drop with next rebase -ApplyPatch debug-bad-pte-modules.patch - # Architecture patches # x86(-64) +ApplyPatch x86-allow-1024-cpus.patch # ARM64 @@ -1410,14 +1310,13 @@ ApplyPatch debug-bad-pte-modules.patch # ApplyPatch arm-lpae-ax88796.patch ApplyPatch arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch -ApplyPatch arm-exynos-mp.patch -ApplyPatch arm-highbank-for-3.12.patch ApplyPatch arm-omap-load-tfp410.patch ApplyPatch arm-tegra-usb-no-reset-linux33.patch -ApplyPatch arm-wandboard-quad.patch +ApplyPatch arm-imx6-utilite.patch -# Fix OMAP and AM33xx (BeagleBone) -ApplyPatch am335x-bone.patch +ApplyPatch arm-am33xx-arm-soc-upstream.patch +ApplyPatch arm-am33xx-bblack.patch +ApplyPatch arm-am33xx-cpsw.patch # # bugfixes to drivers and filesystems @@ -1500,21 +1399,13 @@ ApplyPatch sysrq-secure-boot.patch # Nouveau DRM # Intel DRM -ApplyOptionalPatch drm-intel-next.patch ApplyPatch drm-i915-dp-stfu.patch -ApplyPatch drm-i915-hush-check-crtc-state.patch # Radeon DRM # silence the ACPI blacklist code ApplyPatch silence-acpi-blacklist.patch -# V4L/DVB updates/fixes/experimental drivers -# apply if non-empty -ApplyOptionalPatch v4l-dvb-fixes.patch -ApplyOptionalPatch v4l-dvb-update.patch -ApplyOptionalPatch v4l-dvb-experimental.patch - # Patches headed upstream ApplyPatch fs-proc-devtree-remove_proc_entry.patch @@ -1531,7 +1422,7 @@ ApplyPatch nowatchdog-on-virt.patch #rhbz 754518 ApplyPatch scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch -ApplyPatch weird-root-dentry-name-debug.patch +#pplyPatch weird-root-dentry-name-debug.patch # https://fedoraproject.org/wiki/Features/Checkpoint_Restore ApplyPatch criu-no-expert.patch @@ -1539,42 +1430,9 @@ ApplyPatch criu-no-expert.patch #rhbz 892811 ApplyPatch ath9k_rx_dma_stop_check.patch -#rhbz 927469 -ApplyPatch fix-child-thread-introspection.patch - ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch -#rhbz 977040 -ApplyPatch iwl3945-better-skb-management-in-rx-path.patch -ApplyPatch iwl4965-better-skb-management-in-rx-path.patch - -#rhbz 963715 -ApplyPatch media-cx23885-Fix-TeVii-S471-regression-since-introduction-of-ts2020.patch - -#rhbz 985522 -ApplyPatch ntp-Make-periodic-RTC-update-more-reliable.patch - -#rhbz 971893 -ApplyPatch bonding-driver-alb-learning.patch - -#rhbz 902012 -ApplyPatch elevator-Fix-a-race-in-elevator-switching-and-md.patch -ApplyPatch elevator-acquire-q-sysfs_lock-in-elevator_change.patch - -#rhbz 974072 -ApplyPatch rt2800-add-support-for-rf3070.patch - -#rhbz 1015989 -ApplyPatch netfilter-nf_conntrack-use-RCU-safe-kfree-for-conntr.patch - -#rhbz 982153 -ApplyPatch iommu-Remove-stack-trace-from-broken-irq-remapping-warning.patch - -#rhbz 998732 -ApplyPatch vfio-iommu-Fixed-interaction-of-VFIO_IOMMU_MAP_DMA.patch - #rhbz 896695 -ApplyPatch 0001-iwlwifi-don-t-WARN-on-host-commands-sent-when-firmwa.patch ApplyPatch 0002-iwlwifi-don-t-WARN-on-bad-firmware-state.patch #rhbz 993744 @@ -1583,43 +1441,11 @@ ApplyPatch dm-cache-policy-mq_fix-large-scale-table-allocation-bug.patch #rhbz 1000439 ApplyPatch cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch -#rhbz 1010679 -ApplyPatch fix-radeon-sound.patch -ApplyPatch drm-radeon-24hz-audio-fixes.patch - -#rhbz 984696 -ApplyPatch rt2800usb-slow-down-TX-status-polling.patch - -#rhbz 1023413 -ApplyPatch alps-Support-for-Dell-XT2-model.patch - -#rhbz 1011621 -ApplyPatch cifs-Allow-LANMAN-auth-for-unencapsulated-auth-methods.patch - -#rhbz 1025769 -ApplyPatch iwlwifi-dvm-dont-override-mac80211-queue-setting.patch - ApplyPatch drm-qxl-backport-fixes-for-Fedora.patch -ApplyPatch drm-qxl-fix-memory-leak-in-release-list-handling.patch - -ApplyPatch Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch - -#CVE-2013-4563 rhbz 1030015 1030017 -ApplyPatch ipv6-fix-headroom-calculation-in-udp6_ufo_fragment.patch - -#rhbz 1015905 -ApplyPatch 0001-ip6_output-fragment-outgoing-reassembled-skb-properl.patch -ApplyPatch 0002-netfilter-push-reasm-skb-through-instead-of-original.patch #rhbz 1011362 ApplyPatch alx-Reset-phy-speed-after-resume.patch -#rhbz 1031086 -ApplyPatch slab_common-Do-not-check-for-duplicate-slab-names.patch - -#rhbz 967652 -ApplyPatch KVM-x86-fix-emulation-of-movzbl-bpl-eax.patch - # Fix 15sec NFS mount delay ApplyPatch sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch ApplyPatch sunrpc-replace-gssd_running-with-more-reliable-check.patch @@ -1628,22 +1454,9 @@ ApplyPatch nfs-check-gssd-running-before-krb5i-auth.patch #CVE-2013-6382 rhbz 1033603 1034670 ApplyPatch xfs-underflow-bug-in-xfs_attrlist_by_handle.patch -#rhbz 1022733 -ApplyPatch via-velocity-fix-netif_receive_skb-use-in-irq-disable.patch - -#rhbz 998342 -ApplyPatch usbnet-fix-status-interrupt-urb-handling.patch - -#CVE-2013-6405 rhbz 1035875 1035887 -ApplyPatch inet-prevent-leakage-of-uninitialized-memory-to-user.patch -ApplyPatch inet-fix-addr_len-msg_namelen-assignment-in-recv_error-and-rxpmtu-functions.patch - #rhbz 958826 ApplyPatch dell-laptop.patch -#CVE-2013-XXXX rhbz 1039845 1039874 -ApplyPatch net-rework-recvmsg-handler-msg_name-and-msg_namelen-.patch - #rhbz 1030802 ApplyPatch Input-elantech-add-support-for-newer-August-2013-dev.patch ApplyPatch elantech-Properly-differentiate-between-clickpads-an.patch @@ -2012,7 +1825,7 @@ BuildKernel %make_target %kernel_image smp %endif %global perf_make \ - make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 prefix=%{_prefix} + make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} %if %{with_perf} # perf %{perf_make} all @@ -2462,6 +2275,9 @@ fi # ||----w | # || || %changelog +* Fri Dec 13 2013 Justin M. Forbes - CVE-2013-4587 kvm: out-of-bounds access (rhbz 1030986 1042071) - CVE-2013-6376 kvm: BUG_ON in apic_cluster_id (rhbz 1033106 1042099) diff --git a/keys-krb-support.patch b/keys-krb-support.patch index 07a909daa..8bffaae8b 100644 --- a/keys-krb-support.patch +++ b/keys-krb-support.patch @@ -1,4 +1,4 @@ -From 64160c504842a359801cff17464931fa028ff164 Mon Sep 17 00:00:00 2001 +From d7ccdaa17aab12a49f5e9e327b55167c4af26bf8 Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 15:37:54 +0100 Subject: [PATCH 1/2] KEYS: Implement a big key type that can save to tmpfs @@ -308,7 +308,7 @@ index 0000000..5f9defc 1.8.3.1 -From b1e5b74e060add16de8d6005802644fa1700167f Mon Sep 17 00:00:00 2001 +From 862e98313b10123fa4352117b0b0c0f5a530cefb Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 15:37:54 +0100 Subject: [PATCH 2/2] KEYS: Add per-user_namespace registers for persistent @@ -377,7 +377,7 @@ Tested-by: Simo Sorce cc: Serge E. Hallyn cc: Eric W. Biederman --- - include/linux/user_namespace.h | 6 ++ + include/linux/user_namespace.h | 7 ++ include/uapi/linux/keyctl.h | 1 + kernel/user.c | 4 + kernel/user_namespace.c | 6 ++ @@ -388,23 +388,24 @@ cc: Eric W. Biederman security/keys/keyctl.c | 3 + security/keys/persistent.c | 169 +++++++++++++++++++++++++++++++++++++++++ security/keys/sysctl.c | 11 +++ - 11 files changed, 230 insertions(+) + 11 files changed, 231 insertions(+) create mode 100644 security/keys/persistent.c diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h -index b6b215f..cf21958 100644 +index 4db2985..bb0639d 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h -@@ -28,6 +28,12 @@ struct user_namespace { +@@ -27,6 +27,13 @@ struct user_namespace { + kuid_t owner; + kgid_t group; unsigned int proc_inum; - bool may_mount_sysfs; - bool may_mount_proc; + + /* Register of per-UID persistent keyrings for this namespace */ +#ifdef CONFIG_PERSISTENT_KEYRINGS + struct key *persistent_keyring_register; + struct rw_semaphore persistent_keyring_register_sem; +#endif ++ }; extern struct user_namespace init_user_ns; @@ -420,13 +421,13 @@ index c9b7f4fa..840cb99 100644 #endif /* _LINUX_KEYCTL_H */ diff --git a/kernel/user.c b/kernel/user.c -index 69b4c3d..6c9e1b9 100644 +index 5bbb919..a3a0dbf 100644 --- a/kernel/user.c +++ b/kernel/user.c -@@ -53,6 +53,10 @@ struct user_namespace init_user_ns = { +@@ -51,6 +51,10 @@ struct user_namespace init_user_ns = { + .owner = GLOBAL_ROOT_UID, + .group = GLOBAL_ROOT_GID, .proc_inum = PROC_USER_INIT_INO, - .may_mount_sysfs = true, - .may_mount_proc = true, +#ifdef CONFIG_KEYS_KERBEROS_CACHE + .krb_cache_register_sem = + __RWSEM_INITIALIZER(init_user_ns.krb_cache_register_sem), @@ -435,12 +436,12 @@ index 69b4c3d..6c9e1b9 100644 EXPORT_SYMBOL_GPL(init_user_ns); diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index d8c30db..ef7985e 100644 +index 13fb113..2dbc299 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c -@@ -99,6 +99,9 @@ int create_user_ns(struct cred *new) +@@ -101,6 +101,9 @@ int create_user_ns(struct cred *new) - update_mnt_policy(ns); + set_cred_user_ns(new, ns); +#ifdef CONFIG_PERSISTENT_KEYRINGS + rwsem_init(&ns->persistent_keyring_register_sem); @@ -448,7 +449,7 @@ index d8c30db..ef7985e 100644 return 0; } -@@ -123,6 +126,9 @@ void free_user_ns(struct user_namespace *ns) +@@ -130,6 +133,9 @@ void free_user_ns(struct user_namespace *ns) do { parent = ns->parent; diff --git a/keys-x509-improv.patch b/keys-x509-improv.patch index b3341cf50..db07ea348 100644 --- a/keys-x509-improv.patch +++ b/keys-x509-improv.patch @@ -1,653 +1,7 @@ -From abaac4978b6719e7ae12babb6be5e35184b61cde Mon Sep 17 00:00:00 2001 -From: David Howells -Date: Fri, 30 Aug 2013 16:07:13 +0100 -Subject: [PATCH 01/14] KEYS: Load *.x509 files into kernel keyring - -Load all the files matching the pattern "*.x509" that are to be found in kernel -base source dir and base build dir into the module signing keyring. - -The "extra_certificates" file is then redundant. - -Signed-off-by: David Howells ---- - kernel/Makefile | 35 +++++++++++++++++++++++++++++------ - kernel/modsign_certificate.S | 3 +-- - 2 files changed, 30 insertions(+), 8 deletions(-) - -diff --git a/kernel/Makefile b/kernel/Makefile -index 470839d..4a2ee4e 100644 ---- a/kernel/Makefile -+++ b/kernel/Makefile -@@ -141,17 +141,40 @@ $(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE - $(call if_changed,bc) - - ifeq ($(CONFIG_MODULE_SIG),y) -+############################################################################### - # --# Pull the signing certificate and any extra certificates into the kernel -+# Roll all the X.509 certificates that we can find together and pull -+# them into the kernel. - # -+############################################################################### -+X509_CERTIFICATES-y := $(wildcard *.x509) $(wildcard $(srctree)/*.x509) -+X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509 -+X509_CERTIFICATES := $(sort $(X509_CERTIFICATES-y)) -+ -+ifeq ($(X509_CERTIFICATES),) -+$(warning *** No X.509 certificates found ***) -+endif -+ -+ifneq ($(wildcard $(obj)/.x509.list),) -+ifneq ($(shell cat $(obj)/.x509.list),$(X509_CERTIFICATES)) -+$(info X.509 certificate list changed) -+$(shell rm $(obj)/.x509.list) -+endif -+endif -+ -+kernel/modsign_certificate.o: $(obj)/x509_certificate_list - --quiet_cmd_touch = TOUCH $@ -- cmd_touch = touch $@ -+quiet_cmd_x509certs = CERTS $@ -+ cmd_x509certs = cat $(X509_CERTIFICATES) /dev/null >$@ -+targets += $(obj)/x509_certificate_list -+$(obj)/x509_certificate_list: $(X509_CERTIFICATES) $(obj)/.x509.list -+ $(call if_changed,x509certs) - --extra_certificates: -- $(call cmd,touch) -+targets += $(obj)/.x509.list -+$(obj)/.x509.list: -+ @echo $(X509_CERTIFICATES) >$@ - --kernel/modsign_certificate.o: signing_key.x509 extra_certificates -+clean-files := x509_certificate_list .x509.list - - ############################################################################### - # -diff --git a/kernel/modsign_certificate.S b/kernel/modsign_certificate.S -index 4a9a86d..6fe03c7 100644 ---- a/kernel/modsign_certificate.S -+++ b/kernel/modsign_certificate.S -@@ -7,6 +7,5 @@ - .section ".init.data","aw" - - GLOBAL(modsign_certificate_list) -- .incbin "signing_key.x509" -- .incbin "extra_certificates" -+ .incbin "kernel/x509_certificate_list" - GLOBAL(modsign_certificate_list_end) --- -1.8.3.1 - - - -From 2d6ac2896c3b4b48be96b7dbdfda1668609e35aa Mon Sep 17 00:00:00 2001 -From: David Howells -Date: Fri, 30 Aug 2013 16:07:30 +0100 -Subject: [PATCH 03/14] KEYS: Separate the kernel signature checking keyring - from module signing - -Separate the kernel signature checking keyring from module signing so that it -can be used by code other than the module-signing code. - -Signed-off-by: David Howells ---- - include/keys/system_keyring.h | 23 ++++++++++ - init/Kconfig | 13 ++++++ - kernel/Makefile | 17 ++++--- - kernel/modsign_certificate.S | 11 ----- - kernel/modsign_pubkey.c | 104 ------------------------------------------ - kernel/module-internal.h | 2 - - kernel/module_signing.c | 3 +- - kernel/system_certificates.S | 11 +++++ - kernel/system_keyring.c | 103 +++++++++++++++++++++++++++++++++++++++++ - 9 files changed, 163 insertions(+), 124 deletions(-) - create mode 100644 include/keys/system_keyring.h - delete mode 100644 kernel/modsign_certificate.S - delete mode 100644 kernel/modsign_pubkey.c - create mode 100644 kernel/system_certificates.S - create mode 100644 kernel/system_keyring.c - -diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h -new file mode 100644 -index 0000000..8dabc39 ---- /dev/null -+++ b/include/keys/system_keyring.h -@@ -0,0 +1,23 @@ -+/* System keyring containing trusted public keys. -+ * -+ * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. -+ * Written by David Howells (dhowells@redhat.com) -+ * -+ * 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. -+ */ -+ -+#ifndef _KEYS_SYSTEM_KEYRING_H -+#define _KEYS_SYSTEM_KEYRING_H -+ -+#ifdef CONFIG_SYSTEM_TRUSTED_KEYRING -+ -+#include -+ -+extern struct key *system_trusted_keyring; -+ -+#endif -+ -+#endif /* _KEYS_SYSTEM_KEYRING_H */ -diff --git a/init/Kconfig b/init/Kconfig -index 247084b..6abf0e0 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1664,6 +1664,18 @@ config BASE_SMALL - default 0 if BASE_FULL - default 1 if !BASE_FULL - -+config SYSTEM_TRUSTED_KEYRING -+ bool "Provide system-wide ring of trusted keys" -+ depends on KEYS -+ help -+ Provide a system keyring to which trusted keys can be added. Keys in -+ the keyring are considered to be trusted. Keys may be added at will -+ by the kernel from compiled-in data and from hardware key stores, but -+ userspace may only add extra keys if those keys can be verified by -+ keys already in the keyring. -+ -+ Keys in this keyring are used by module signature checking. -+ - menuconfig MODULES - bool "Enable loadable module support" - help -@@ -1736,6 +1748,7 @@ config MODULE_SRCVERSION_ALL - config MODULE_SIG - bool "Module signature verification" - depends on MODULES -+ select SYSTEM_TRUSTED_KEYRING - select KEYS - select CRYPTO - select ASYMMETRIC_KEY_TYPE -diff --git a/kernel/Makefile b/kernel/Makefile -index 7bd1565..68f7182 100644 ---- a/kernel/Makefile -+++ b/kernel/Makefile -@@ -52,8 +52,9 @@ obj-$(CONFIG_SMP) += spinlock.o - obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o - obj-$(CONFIG_PROVE_LOCKING) += spinlock.o - obj-$(CONFIG_UID16) += uid16.o -+obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o - obj-$(CONFIG_MODULES) += module.o --obj-$(CONFIG_MODULE_SIG) += module_signing.o modsign_pubkey.o modsign_certificate.o -+obj-$(CONFIG_MODULE_SIG) += module_signing.o - obj-$(CONFIG_KALLSYMS) += kallsyms.o - obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o - obj-$(CONFIG_KEXEC) += kexec.o -@@ -140,13 +141,14 @@ targets += timeconst.h - $(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE - $(call if_changed,bc) - --ifeq ($(CONFIG_MODULE_SIG),y) - ############################################################################### - # --# Roll all the X.509 certificates that we can find together and pull --# them into the kernel. -+# Roll all the X.509 certificates that we can find together and pull them into -+# the kernel so that they get loaded into the system trusted keyring during -+# boot. - # - ############################################################################### -+ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y) - X509_CERTIFICATES-y := $(wildcard *.x509) $(wildcard $(srctree)/*.x509) - X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509 - X509_CERTIFICATES := $(sort $(realpath $(X509_CERTIFICATES-y))) -@@ -162,10 +164,11 @@ $(shell rm $(obj)/.x509.list) - endif - endif - --kernel/modsign_certificate.o: $(obj)/x509_certificate_list -+kernel/system_certificates.o: $(obj)/x509_certificate_list - - quiet_cmd_x509certs = CERTS $@ -- cmd_x509certs = cat $(X509_CERTIFICATES) /dev/null >$@ -+ cmd_x509certs = cat $(X509_CERTIFICATES) /dev/null >$@ $(foreach X509,$(X509_CERTIFICATES),; echo " - Including cert $(X509)") -+ - targets += $(obj)/x509_certificate_list - $(obj)/x509_certificate_list: $(X509_CERTIFICATES) $(obj)/.x509.list - $(call if_changed,x509certs) -@@ -175,7 +178,9 @@ $(obj)/.x509.list: - @echo $(X509_CERTIFICATES) >$@ - - clean-files := x509_certificate_list .x509.list -+endif - -+ifeq ($(CONFIG_MODULE_SIG),y) - ############################################################################### - # - # If module signing is requested, say by allyesconfig, but a key has not been -diff --git a/kernel/modsign_certificate.S b/kernel/modsign_certificate.S -deleted file mode 100644 -index 6fe03c7..0000000 ---- a/kernel/modsign_certificate.S -+++ /dev/null -@@ -1,11 +0,0 @@ --#include -- --#define GLOBAL(name) \ -- .globl VMLINUX_SYMBOL(name); \ -- VMLINUX_SYMBOL(name): -- -- .section ".init.data","aw" -- --GLOBAL(modsign_certificate_list) -- .incbin "kernel/x509_certificate_list" --GLOBAL(modsign_certificate_list_end) -diff --git a/kernel/modsign_pubkey.c b/kernel/modsign_pubkey.c -deleted file mode 100644 -index 2b6e699..0000000 ---- a/kernel/modsign_pubkey.c -+++ /dev/null -@@ -1,104 +0,0 @@ --/* Public keys for module signature verification -- * -- * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. -- * Written by David Howells (dhowells@redhat.com) -- * -- * 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 --#include --#include --#include --#include --#include "module-internal.h" -- --struct key *modsign_keyring; -- --extern __initdata const u8 modsign_certificate_list[]; --extern __initdata const u8 modsign_certificate_list_end[]; -- --/* -- * We need to make sure ccache doesn't cache the .o file as it doesn't notice -- * if modsign.pub changes. -- */ --static __initdata const char annoy_ccache[] = __TIME__ "foo"; -- --/* -- * Load the compiled-in keys -- */ --static __init int module_verify_init(void) --{ -- pr_notice("Initialise module verification\n"); -- -- modsign_keyring = keyring_alloc(".module_sign", -- KUIDT_INIT(0), KGIDT_INIT(0), -- current_cred(), -- ((KEY_POS_ALL & ~KEY_POS_SETATTR) | -- KEY_USR_VIEW | KEY_USR_READ), -- KEY_ALLOC_NOT_IN_QUOTA, NULL); -- if (IS_ERR(modsign_keyring)) -- panic("Can't allocate module signing keyring\n"); -- -- return 0; --} -- --/* -- * Must be initialised before we try and load the keys into the keyring. -- */ --device_initcall(module_verify_init); -- --/* -- * Load the compiled-in keys -- */ --static __init int load_module_signing_keys(void) --{ -- key_ref_t key; -- const u8 *p, *end; -- size_t plen; -- -- pr_notice("Loading module verification certificates\n"); -- -- end = modsign_certificate_list_end; -- p = modsign_certificate_list; -- while (p < end) { -- /* Each cert begins with an ASN.1 SEQUENCE tag and must be more -- * than 256 bytes in size. -- */ -- if (end - p < 4) -- goto dodgy_cert; -- if (p[0] != 0x30 && -- p[1] != 0x82) -- goto dodgy_cert; -- plen = (p[2] << 8) | p[3]; -- plen += 4; -- if (plen > end - p) -- goto dodgy_cert; -- -- key = key_create_or_update(make_key_ref(modsign_keyring, 1), -- "asymmetric", -- NULL, -- p, -- plen, -- (KEY_POS_ALL & ~KEY_POS_SETATTR) | -- KEY_USR_VIEW, -- KEY_ALLOC_NOT_IN_QUOTA); -- if (IS_ERR(key)) -- pr_err("MODSIGN: Problem loading in-kernel X.509 certificate (%ld)\n", -- PTR_ERR(key)); -- else -- pr_notice("MODSIGN: Loaded cert '%s'\n", -- key_ref_to_ptr(key)->description); -- p += plen; -- } -- -- return 0; -- --dodgy_cert: -- pr_err("MODSIGN: Problem parsing in-kernel X.509 certificate list\n"); -- return 0; --} --late_initcall(load_module_signing_keys); -diff --git a/kernel/module-internal.h b/kernel/module-internal.h -index 24f9247..915e123 100644 ---- a/kernel/module-internal.h -+++ b/kernel/module-internal.h -@@ -9,6 +9,4 @@ - * 2 of the Licence, or (at your option) any later version. - */ - --extern struct key *modsign_keyring; -- - extern int mod_verify_sig(const void *mod, unsigned long *_modlen); -diff --git a/kernel/module_signing.c b/kernel/module_signing.c -index f2970bd..0034e36 100644 ---- a/kernel/module_signing.c -+++ b/kernel/module_signing.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include "module-internal.h" - - /* -@@ -157,7 +158,7 @@ static struct key *request_asymmetric_key(const char *signer, size_t signer_len, - - pr_debug("Look up: \"%s\"\n", id); - -- key = keyring_search(make_key_ref(modsign_keyring, 1), -+ key = keyring_search(make_key_ref(system_trusted_keyring, 1), - &key_type_asymmetric, id); - if (IS_ERR(key)) - pr_warn("Request for unknown module key '%s' err %ld\n", -diff --git a/kernel/system_certificates.S b/kernel/system_certificates.S -new file mode 100644 -index 0000000..5cffe86 ---- /dev/null -+++ b/kernel/system_certificates.S -@@ -0,0 +1,11 @@ -+#include -+ -+#define GLOBAL(name) \ -+ .globl VMLINUX_SYMBOL(name); \ -+ VMLINUX_SYMBOL(name): -+ -+ .section ".init.data","aw" -+ -+GLOBAL(system_certificate_list) -+ .incbin "kernel/x509_certificate_list" -+GLOBAL(system_certificate_list_end) -diff --git a/kernel/system_keyring.c b/kernel/system_keyring.c -new file mode 100644 -index 0000000..cd5cd3f ---- /dev/null -+++ b/kernel/system_keyring.c -@@ -0,0 +1,103 @@ -+/* System trusted keyring for trusted public keys -+ * -+ * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. -+ * Written by David Howells (dhowells@redhat.com) -+ * -+ * 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 -+#include -+#include -+#include -+#include -+#include -+#include -+#include "module-internal.h" -+ -+struct key *system_trusted_keyring; -+EXPORT_SYMBOL_GPL(system_trusted_keyring); -+ -+extern __initdata const u8 system_certificate_list[]; -+extern __initdata const u8 system_certificate_list_end[]; -+ -+/* -+ * Load the compiled-in keys -+ */ -+static __init int system_trusted_keyring_init(void) -+{ -+ pr_notice("Initialise system trusted keyring\n"); -+ -+ system_trusted_keyring = -+ keyring_alloc(".system_keyring", -+ KUIDT_INIT(0), KGIDT_INIT(0), current_cred(), -+ ((KEY_POS_ALL & ~KEY_POS_SETATTR) | -+ KEY_USR_VIEW | KEY_USR_READ), -+ KEY_ALLOC_NOT_IN_QUOTA, NULL); -+ if (IS_ERR(system_trusted_keyring)) -+ panic("Can't allocate system trusted keyring\n"); -+ -+ return 0; -+} -+ -+/* -+ * Must be initialised before we try and load the keys into the keyring. -+ */ -+device_initcall(system_trusted_keyring_init); -+ -+/* -+ * Load the compiled-in list of X.509 certificates. -+ */ -+static __init int load_system_certificate_list(void) -+{ -+ key_ref_t key; -+ const u8 *p, *end; -+ size_t plen; -+ -+ pr_notice("Loading compiled-in X.509 certificates\n"); -+ -+ end = system_certificate_list_end; -+ p = system_certificate_list; -+ while (p < end) { -+ /* Each cert begins with an ASN.1 SEQUENCE tag and must be more -+ * than 256 bytes in size. -+ */ -+ if (end - p < 4) -+ goto dodgy_cert; -+ if (p[0] != 0x30 && -+ p[1] != 0x82) -+ goto dodgy_cert; -+ plen = (p[2] << 8) | p[3]; -+ plen += 4; -+ if (plen > end - p) -+ goto dodgy_cert; -+ -+ key = key_create_or_update(make_key_ref(system_trusted_keyring, 1), -+ "asymmetric", -+ NULL, -+ p, -+ plen, -+ (KEY_POS_ALL & ~KEY_POS_SETATTR) | -+ KEY_USR_VIEW, -+ KEY_ALLOC_NOT_IN_QUOTA); -+ if (IS_ERR(key)) { -+ pr_err("Problem loading in-kernel X.509 certificate (%ld)\n", -+ PTR_ERR(key)); -+ } else { -+ pr_notice("Loaded X.509 cert '%s'\n", -+ key_ref_to_ptr(key)->description); -+ key_ref_put(key); -+ } -+ p += plen; -+ } -+ -+ return 0; -+ -+dodgy_cert: -+ pr_err("Problem parsing in-kernel X.509 certificate list\n"); -+ return 0; -+} -+late_initcall(load_system_certificate_list); --- -1.8.3.1 - - -From 6f90d07a776d7babf30a3322dafd66c8c25db681 Mon Sep 17 00:00:00 2001 -From: David Howells -Date: Fri, 30 Aug 2013 16:07:37 +0100 -Subject: [PATCH 04/14] KEYS: Add a 'trusted' flag and a 'trusted only' flag - -Add KEY_FLAG_TRUSTED to indicate that a key either comes from a trusted source -or had a cryptographic signature chain that led back to a trusted key the -kernel already possessed. - -Add KEY_FLAGS_TRUSTED_ONLY to indicate that a keyring will only accept links to -keys marked with KEY_FLAGS_TRUSTED. - -Signed-off-by: David Howells -Reviewed-by: Kees Cook ---- - include/linux/key-type.h | 1 + - include/linux/key.h | 3 +++ - kernel/system_keyring.c | 4 +++- - security/keys/key.c | 8 ++++++++ - security/keys/keyring.c | 4 ++++ - 5 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/include/linux/key-type.h b/include/linux/key-type.h -index f58737b..a74c3a8 100644 ---- a/include/linux/key-type.h -+++ b/include/linux/key-type.h -@@ -45,6 +45,7 @@ struct key_preparsed_payload { - const void *data; /* Raw data */ - size_t datalen; /* Raw datalen */ - size_t quotalen; /* Quota length for proposed payload */ -+ bool trusted; /* True if key is trusted */ - }; - - typedef int (*request_key_actor_t)(struct key_construction *key, -diff --git a/include/linux/key.h b/include/linux/key.h -index 010dbb6..80d6774 100644 ---- a/include/linux/key.h -+++ b/include/linux/key.h -@@ -168,6 +168,8 @@ struct key { - #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */ - #define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */ - #define KEY_FLAG_INVALIDATED 7 /* set if key has been invalidated */ -+#define KEY_FLAG_TRUSTED 8 /* set if key is trusted */ -+#define KEY_FLAG_TRUSTED_ONLY 9 /* set if keyring only accepts links to trusted keys */ - - /* the key type and key description string - * - the desc is used to match a key against search criteria -@@ -218,6 +220,7 @@ extern struct key *key_alloc(struct key_type *type, - #define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */ - #define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */ - #define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */ -+#define KEY_ALLOC_TRUSTED 0x0004 /* Key should be flagged as trusted */ - - extern void key_revoke(struct key *key); - extern void key_invalidate(struct key *key); -diff --git a/kernel/system_keyring.c b/kernel/system_keyring.c -index cd5cd3f..4ca7072 100644 ---- a/kernel/system_keyring.c -+++ b/kernel/system_keyring.c -@@ -40,6 +40,7 @@ static __init int system_trusted_keyring_init(void) - if (IS_ERR(system_trusted_keyring)) - panic("Can't allocate system trusted keyring\n"); - -+ set_bit(KEY_FLAG_TRUSTED_ONLY, &system_trusted_keyring->flags); - return 0; - } - -@@ -82,7 +83,8 @@ static __init int load_system_certificate_list(void) - plen, - (KEY_POS_ALL & ~KEY_POS_SETATTR) | - KEY_USR_VIEW, -- KEY_ALLOC_NOT_IN_QUOTA); -+ KEY_ALLOC_NOT_IN_QUOTA | -+ KEY_ALLOC_TRUSTED); - if (IS_ERR(key)) { - pr_err("Problem loading in-kernel X.509 certificate (%ld)\n", - PTR_ERR(key)); -diff --git a/security/keys/key.c b/security/keys/key.c -index a819b5c..d331ea9 100644 ---- a/security/keys/key.c -+++ b/security/keys/key.c -@@ -300,6 +300,8 @@ struct key *key_alloc(struct key_type *type, const char *desc, - - if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) - key->flags |= 1 << KEY_FLAG_IN_QUOTA; -+ if (flags & KEY_ALLOC_TRUSTED) -+ key->flags |= 1 << KEY_FLAG_TRUSTED; - - memset(&key->type_data, 0, sizeof(key->type_data)); - -@@ -813,6 +815,7 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref, - prep.data = payload; - prep.datalen = plen; - prep.quotalen = index_key.type->def_datalen; -+ prep.trusted = flags & KEY_ALLOC_TRUSTED; - if (index_key.type->preparse) { - ret = index_key.type->preparse(&prep); - if (ret < 0) { -@@ -827,6 +830,11 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref, - } - index_key.desc_len = strlen(index_key.description); - -+ key_ref = ERR_PTR(-EPERM); -+ if (!prep.trusted && test_bit(KEY_FLAG_TRUSTED_ONLY, &keyring->flags)) -+ goto error_free_prep; -+ flags |= prep.trusted ? KEY_ALLOC_TRUSTED : 0; -+ - ret = __key_link_begin(keyring, &index_key, &edit); - if (ret < 0) { - key_ref = ERR_PTR(ret); -diff --git a/security/keys/keyring.c b/security/keys/keyring.c -index f7cdea2..9b6f6e0 100644 ---- a/security/keys/keyring.c -+++ b/security/keys/keyring.c -@@ -1183,6 +1183,10 @@ int key_link(struct key *keyring, struct key *key) - key_check(keyring); - key_check(key); - -+ if (test_bit(KEY_FLAG_TRUSTED_ONLY, &keyring->flags) && -+ !test_bit(KEY_FLAG_TRUSTED, &key->flags)) -+ return -EPERM; -+ - ret = __key_link_begin(keyring, &key->index_key, &edit); - if (ret == 0) { - kdebug("begun {%d,%d}", keyring->serial, atomic_read(&keyring->usage)); --- -1.8.3.1 - - -From 559cc3ad765e1b443bc89965be9ef9ff3caabdcc Mon Sep 17 00:00:00 2001 +From 775d395f8bd8ef08971c77f54c38ec7b9355ba4f Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:15:10 +0100 -Subject: [PATCH 05/14] KEYS: Rename public key parameter name arrays +Subject: [PATCH 01/18] KEYS: Rename public key parameter name arrays Rename the arrays of public key parameters (public key algorithm names, hash algorithm names and ID type names) so that the array name ends in "_name". @@ -774,10 +128,10 @@ index f5b0224..619d570 100644 /* * Cryptographic data for the public-key subtype of the asymmetric key type. diff --git a/kernel/module_signing.c b/kernel/module_signing.c -index 0034e36..0b6b870 100644 +index f2970bd..ee47640 100644 --- a/kernel/module_signing.c +++ b/kernel/module_signing.c -@@ -55,7 +55,7 @@ static struct public_key_signature *mod_make_digest(enum pkey_hash_algo hash, +@@ -54,7 +54,7 @@ static struct public_key_signature *mod_make_digest(enum pkey_hash_algo hash, /* Allocate the hashing algorithm we're going to need and find out how * big the hash operational data will be. */ @@ -786,7 +140,7 @@ index 0034e36..0b6b870 100644 if (IS_ERR(tfm)) return (PTR_ERR(tfm) == -ENOENT) ? ERR_PTR(-ENOPKG) : ERR_CAST(tfm); -@@ -218,7 +218,7 @@ int mod_verify_sig(const void *mod, unsigned long *_modlen) +@@ -217,7 +217,7 @@ int mod_verify_sig(const void *mod, unsigned long *_modlen) return -ENOPKG; if (ms.hash >= PKEY_HASH__LAST || @@ -799,10 +153,10 @@ index 0034e36..0b6b870 100644 1.8.3.1 -From a0aab2065bbdd0bc56ae6d7767e1df7c58b8997f Mon Sep 17 00:00:00 2001 +From d12f06db05dacb455714f00f070cce844fb3e44c Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:15:18 +0100 -Subject: [PATCH 06/14] KEYS: Move the algorithm pointer array from x509 to +Subject: [PATCH 02/18] KEYS: Move the algorithm pointer array from x509 to public_key.c Move the public-key algorithm pointer array from x509_public_key.c to @@ -881,10 +235,10 @@ index 619d570..46bde25 100644 1.8.3.1 -From 7009b65ddc1d8bf62dc017795265b9cf331a4d70 Mon Sep 17 00:00:00 2001 +From 8d2905bce58b356e9b5313a4aaebb5085bb4c151 Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:15:24 +0100 -Subject: [PATCH 07/14] KEYS: Store public key algo ID in public_key struct +Subject: [PATCH 03/18] KEYS: Store public key algo ID in public_key struct Store public key algo ID in public_key struct for reference purposes. This allows it to be removed from the x509_certificate struct and used to find a @@ -966,10 +320,10 @@ index 46bde25..05778df 100644 1.8.3.1 -From cad6ff6b429f31611ccb231cfe6adcb69d891352 Mon Sep 17 00:00:00 2001 +From df1662a5b9f37a88c1e112d4052eca79efc8e6fc Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:15:30 +0100 -Subject: [PATCH 08/14] KEYS: Split public_key_verify_signature() and make +Subject: [PATCH 04/18] KEYS: Split public_key_verify_signature() and make available Modify public_key_verify_signature() so that it now takes a public_key struct @@ -1082,10 +436,10 @@ index fac574c..8cb2f70 100644 1.8.3.1 -From 87854340605a64fcc54109ea415d9e54c45e8533 Mon Sep 17 00:00:00 2001 +From 322d3b7e2debb3c7983dce2b80a5aefa4e7b1bda Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:15:37 +0100 -Subject: [PATCH 09/14] KEYS: Store public key algo ID in public_key_signature +Subject: [PATCH 05/18] KEYS: Store public key algo ID in public_key_signature struct Store public key algorithm ID in public_key_signature struct for reference @@ -1115,10 +469,10 @@ index 05778df..b34fda4 100644 1.8.3.1 -From ae4684a05d87123de310b69c616922dc993694ca Mon Sep 17 00:00:00 2001 +From 743143dd12661df376dcfc916b626b01d8ec84a4 Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:16:34 +0100 -Subject: [PATCH 10/14] X.509: struct x509_certificate needs struct tm +Subject: [PATCH 06/18] X.509: struct x509_certificate needs struct tm declaring struct x509_certificate needs struct tm declaring by #inclusion of linux/time.h @@ -1147,10 +501,10 @@ index e583ad0..2d01182 100644 1.8.3.1 -From dacde6f44ebe5a5c89bd1a25b35b1b63c139b375 Mon Sep 17 00:00:00 2001 +From a326ca89468c73dacb00fa247e92873d09e1387b Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:18:02 +0100 -Subject: [PATCH 11/14] X.509: Embed public_key_signature struct and create +Subject: [PATCH 07/18] X.509: Embed public_key_signature struct and create filler function Embed a public_key_signature struct in struct x509_certificate, eliminating @@ -1410,10 +764,10 @@ index 8cb2f70..b7c81d8 100644 1.8.3.1 -From 650fdcb141f65f3a03dc7eba1179c823fd1a3a54 Mon Sep 17 00:00:00 2001 +From 2857db9154b0fcfb8ba490c12f98cd47cc3f46fc Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:18:15 +0100 -Subject: [PATCH 12/14] X.509: Check the algorithm IDs obtained from parsing an +Subject: [PATCH 08/18] X.509: Check the algorithm IDs obtained from parsing an X.509 certificate Check that the algorithm IDs obtained from the ASN.1 parse by OID lookup @@ -1451,10 +805,10 @@ index b7c81d8..eb368d4 100644 1.8.3.1 -From 8671bdd55802c4b93b9205b6ecd02c7e351ac5c5 Mon Sep 17 00:00:00 2001 +From f78f0e8694517a3b1e5393d6ea0d46084bdc816a Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 30 Aug 2013 16:18:31 +0100 -Subject: [PATCH 13/14] X.509: Handle certificates that lack an +Subject: [PATCH 09/18] X.509: Handle certificates that lack an authorityKeyIdentifier field Handle certificates that lack an authorityKeyIdentifier field by assuming @@ -1498,83 +852,957 @@ index eb368d4..0f55e3b 100644 1.8.3.1 -From e2d665556f4b60ce76e880a62f98c81622271e71 Mon Sep 17 00:00:00 2001 +From 33f859fea67ab5307da4049e947fbc23cdd13a27 Mon Sep 17 00:00:00 2001 From: David Howells -Date: Tue, 18 Jun 2013 17:40:44 +0100 -Subject: [PATCH 14/14] X.509: Remove certificate date checks +Date: Fri, 30 Aug 2013 16:07:13 +0100 +Subject: [PATCH 11/18] KEYS: Load *.x509 files into kernel keyring -Remove the certificate date checks that are performed when a certificate is -parsed. There are two checks: a valid from and a valid to. The first check is -causing a lot of problems with system clocks that don't keep good time and the -second places an implicit expiry date upon the kernel when used for module -signing, so do we really need them? +Load all the files matching the pattern "*.x509" that are to be found in kernel +base source dir and base build dir into the module signing keyring. + +The "extra_certificates" file is then redundant. Signed-off-by: David Howells -cc: David Woodhouse -cc: Rusty Russell -cc: Josh Boyer -cc: Alexander Holler -cc: stable@vger.kernel.org --- - crypto/asymmetric_keys/x509_public_key.c | 38 -------------------------------- - 1 file changed, 38 deletions(-) + kernel/Makefile | 35 +++++++++++++++++++++++++++++------ + kernel/modsign_certificate.S | 3 +-- + 2 files changed, 30 insertions(+), 8 deletions(-) -diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c -index 0f55e3b..c1540e8 100644 ---- a/crypto/asymmetric_keys/x509_public_key.c -+++ b/crypto/asymmetric_keys/x509_public_key.c -@@ -108,7 +108,6 @@ EXPORT_SYMBOL_GPL(x509_check_signature); - static int x509_key_preparse(struct key_preparsed_payload *prep) - { - struct x509_certificate *cert; -- struct tm now; - size_t srlen, sulen; - char *desc = NULL; - int ret; -@@ -150,43 +149,6 @@ static int x509_key_preparse(struct key_preparsed_payload *prep) - goto error_free_cert; - } +diff --git a/kernel/Makefile b/kernel/Makefile +index 1ce4755..c34e5f9 100644 +--- a/kernel/Makefile ++++ b/kernel/Makefile +@@ -142,17 +142,40 @@ $(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE + $(call if_changed,bc) -- time_to_tm(CURRENT_TIME.tv_sec, 0, &now); -- pr_devel("Now: %04ld-%02d-%02d %02d:%02d:%02d\n", -- now.tm_year + 1900, now.tm_mon + 1, now.tm_mday, -- now.tm_hour, now.tm_min, now.tm_sec); -- if (now.tm_year < cert->valid_from.tm_year || -- (now.tm_year == cert->valid_from.tm_year && -- (now.tm_mon < cert->valid_from.tm_mon || -- (now.tm_mon == cert->valid_from.tm_mon && -- (now.tm_mday < cert->valid_from.tm_mday || -- (now.tm_mday == cert->valid_from.tm_mday && -- (now.tm_hour < cert->valid_from.tm_hour || -- (now.tm_hour == cert->valid_from.tm_hour && -- (now.tm_min < cert->valid_from.tm_min || -- (now.tm_min == cert->valid_from.tm_min && -- (now.tm_sec < cert->valid_from.tm_sec -- ))))))))))) { -- pr_warn("Cert %s is not yet valid\n", cert->fingerprint); -- ret = -EKEYREJECTED; -- goto error_free_cert; -- } -- if (now.tm_year > cert->valid_to.tm_year || -- (now.tm_year == cert->valid_to.tm_year && -- (now.tm_mon > cert->valid_to.tm_mon || -- (now.tm_mon == cert->valid_to.tm_mon && -- (now.tm_mday > cert->valid_to.tm_mday || -- (now.tm_mday == cert->valid_to.tm_mday && -- (now.tm_hour > cert->valid_to.tm_hour || -- (now.tm_hour == cert->valid_to.tm_hour && -- (now.tm_min > cert->valid_to.tm_min || -- (now.tm_min == cert->valid_to.tm_min && -- (now.tm_sec > cert->valid_to.tm_sec -- ))))))))))) { -- pr_warn("Cert %s has expired\n", cert->fingerprint); -- ret = -EKEYEXPIRED; -- goto error_free_cert; + ifeq ($(CONFIG_MODULE_SIG),y) ++############################################################################### + # +-# Pull the signing certificate and any extra certificates into the kernel ++# Roll all the X.509 certificates that we can find together and pull ++# them into the kernel. + # ++############################################################################### ++X509_CERTIFICATES-y := $(wildcard *.x509) $(wildcard $(srctree)/*.x509) ++X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509 ++X509_CERTIFICATES := $(sort $(X509_CERTIFICATES-y)) ++ ++ifeq ($(X509_CERTIFICATES),) ++$(warning *** No X.509 certificates found ***) ++endif ++ ++ifneq ($(wildcard $(obj)/.x509.list),) ++ifneq ($(shell cat $(obj)/.x509.list),$(X509_CERTIFICATES)) ++$(info X.509 certificate list changed) ++$(shell rm $(obj)/.x509.list) ++endif ++endif ++ ++kernel/modsign_certificate.o: $(obj)/x509_certificate_list + +-quiet_cmd_touch = TOUCH $@ +- cmd_touch = touch $@ ++quiet_cmd_x509certs = CERTS $@ ++ cmd_x509certs = cat $(X509_CERTIFICATES) /dev/null >$@ ++targets += $(obj)/x509_certificate_list ++$(obj)/x509_certificate_list: $(X509_CERTIFICATES) $(obj)/.x509.list ++ $(call if_changed,x509certs) + +-extra_certificates: +- $(call cmd,touch) ++targets += $(obj)/.x509.list ++$(obj)/.x509.list: ++ @echo $(X509_CERTIFICATES) >$@ + +-kernel/modsign_certificate.o: signing_key.x509 extra_certificates ++clean-files := x509_certificate_list .x509.list + + ############################################################################### + # +diff --git a/kernel/modsign_certificate.S b/kernel/modsign_certificate.S +index 4a9a86d..6fe03c7 100644 +--- a/kernel/modsign_certificate.S ++++ b/kernel/modsign_certificate.S +@@ -7,6 +7,5 @@ + .section ".init.data","aw" + + GLOBAL(modsign_certificate_list) +- .incbin "signing_key.x509" +- .incbin "extra_certificates" ++ .incbin "kernel/x509_certificate_list" + GLOBAL(modsign_certificate_list_end) +-- +1.8.3.1 + + +From 068606ba7df3206e5a09b544b4b89ed09cd30f44 Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Fri, 30 Aug 2013 17:13:15 +0100 +Subject: [PATCH 12/18] KEYS: Have make canonicalise the paths of the X.509 + certs better to deduplicate + +Have make canonicalise the paths of the X.509 certificates before we sort them +as this allows $(sort) to better remove duplicates. + +Signed-off-by: David Howells +--- + kernel/Makefile | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/kernel/Makefile b/kernel/Makefile +index c34e5f9..2c24195 100644 +--- a/kernel/Makefile ++++ b/kernel/Makefile +@@ -144,13 +144,19 @@ $(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE + ifeq ($(CONFIG_MODULE_SIG),y) + ############################################################################### + # +-# Roll all the X.509 certificates that we can find together and pull +-# them into the kernel. ++# Roll all the X.509 certificates that we can find together and pull them into ++# the kernel. ++# ++# We look in the source root and the build root for all files whose name ends ++# in ".x509". Unfortunately, this will generate duplicate filenames, so we ++# have make canonicalise the pathnames and then sort them to discard the ++# duplicates. + # + ############################################################################### + X509_CERTIFICATES-y := $(wildcard *.x509) $(wildcard $(srctree)/*.x509) + X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509 +-X509_CERTIFICATES := $(sort $(X509_CERTIFICATES-y)) ++X509_CERTIFICATES := $(sort $(foreach CERT,$(X509_CERTIFICATES-y), \ ++ $(or $(realpath $(CERT)),$(CERT)))) + + ifeq ($(X509_CERTIFICATES),) + $(warning *** No X.509 certificates found ***) +-- +1.8.3.1 + + +From 9006cfbd669e9ba52d1a91db2ffd9482ad8a6090 Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Fri, 30 Aug 2013 16:07:30 +0100 +Subject: [PATCH 13/18] KEYS: Separate the kernel signature checking keyring + from module signing + +Separate the kernel signature checking keyring from module signing so that it +can be used by code other than the module-signing code. + +Signed-off-by: David Howells +--- + include/keys/system_keyring.h | 23 ++++++++++ + init/Kconfig | 13 ++++++ + kernel/Makefile | 15 ++++-- + kernel/modsign_certificate.S | 11 ----- + kernel/modsign_pubkey.c | 104 ------------------------------------------ + kernel/module-internal.h | 2 - + kernel/module_signing.c | 3 +- + kernel/system_certificates.S | 11 +++++ + kernel/system_keyring.c | 103 +++++++++++++++++++++++++++++++++++++++++ + 9 files changed, 162 insertions(+), 123 deletions(-) + create mode 100644 include/keys/system_keyring.h + delete mode 100644 kernel/modsign_certificate.S + delete mode 100644 kernel/modsign_pubkey.c + create mode 100644 kernel/system_certificates.S + create mode 100644 kernel/system_keyring.c + +diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h +new file mode 100644 +index 0000000..8dabc39 +--- /dev/null ++++ b/include/keys/system_keyring.h +@@ -0,0 +1,23 @@ ++/* System keyring containing trusted public keys. ++ * ++ * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. ++ * Written by David Howells (dhowells@redhat.com) ++ * ++ * 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. ++ */ ++ ++#ifndef _KEYS_SYSTEM_KEYRING_H ++#define _KEYS_SYSTEM_KEYRING_H ++ ++#ifdef CONFIG_SYSTEM_TRUSTED_KEYRING ++ ++#include ++ ++extern struct key *system_trusted_keyring; ++ ++#endif ++ ++#endif /* _KEYS_SYSTEM_KEYRING_H */ +diff --git a/init/Kconfig b/init/Kconfig +index 18bd9e3..cf14d07 100644 +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -1668,6 +1668,18 @@ config BASE_SMALL + default 0 if BASE_FULL + default 1 if !BASE_FULL + ++config SYSTEM_TRUSTED_KEYRING ++ bool "Provide system-wide ring of trusted keys" ++ depends on KEYS ++ help ++ Provide a system keyring to which trusted keys can be added. Keys in ++ the keyring are considered to be trusted. Keys may be added at will ++ by the kernel from compiled-in data and from hardware key stores, but ++ userspace may only add extra keys if those keys can be verified by ++ keys already in the keyring. ++ ++ Keys in this keyring are used by module signature checking. ++ + menuconfig MODULES + bool "Enable loadable module support" + option modules +@@ -1741,6 +1753,7 @@ config MODULE_SRCVERSION_ALL + config MODULE_SIG + bool "Module signature verification" + depends on MODULES ++ select SYSTEM_TRUSTED_KEYRING + select KEYS + select CRYPTO + select ASYMMETRIC_KEY_TYPE +diff --git a/kernel/Makefile b/kernel/Makefile +index 2c24195..6313698 100644 +--- a/kernel/Makefile ++++ b/kernel/Makefile +@@ -54,8 +54,9 @@ obj-$(CONFIG_SMP) += spinlock.o + obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o + obj-$(CONFIG_PROVE_LOCKING) += spinlock.o + obj-$(CONFIG_UID16) += uid16.o ++obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o + obj-$(CONFIG_MODULES) += module.o +-obj-$(CONFIG_MODULE_SIG) += module_signing.o modsign_pubkey.o modsign_certificate.o ++obj-$(CONFIG_MODULE_SIG) += module_signing.o + obj-$(CONFIG_KALLSYMS) += kallsyms.o + obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o + obj-$(CONFIG_KEXEC) += kexec.o +@@ -141,11 +142,11 @@ targets += timeconst.h + $(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE + $(call if_changed,bc) + +-ifeq ($(CONFIG_MODULE_SIG),y) + ############################################################################### + # + # Roll all the X.509 certificates that we can find together and pull them into +-# the kernel. ++# the kernel so that they get loaded into the system trusted keyring during ++# boot. + # + # We look in the source root and the build root for all files whose name ends + # in ".x509". Unfortunately, this will generate duplicate filenames, so we +@@ -153,6 +154,7 @@ ifeq ($(CONFIG_MODULE_SIG),y) + # duplicates. + # + ############################################################################### ++ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y) + X509_CERTIFICATES-y := $(wildcard *.x509) $(wildcard $(srctree)/*.x509) + X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509 + X509_CERTIFICATES := $(sort $(foreach CERT,$(X509_CERTIFICATES-y), \ +@@ -169,10 +171,11 @@ $(shell rm $(obj)/.x509.list) + endif + endif + +-kernel/modsign_certificate.o: $(obj)/x509_certificate_list ++kernel/system_certificates.o: $(obj)/x509_certificate_list + + quiet_cmd_x509certs = CERTS $@ +- cmd_x509certs = cat $(X509_CERTIFICATES) /dev/null >$@ ++ cmd_x509certs = cat $(X509_CERTIFICATES) /dev/null >$@ $(foreach X509,$(X509_CERTIFICATES),; echo " - Including cert $(X509)") ++ + targets += $(obj)/x509_certificate_list + $(obj)/x509_certificate_list: $(X509_CERTIFICATES) $(obj)/.x509.list + $(call if_changed,x509certs) +@@ -182,7 +185,9 @@ $(obj)/.x509.list: + @echo $(X509_CERTIFICATES) >$@ + + clean-files := x509_certificate_list .x509.list ++endif + ++ifeq ($(CONFIG_MODULE_SIG),y) + ############################################################################### + # + # If module signing is requested, say by allyesconfig, but a key has not been +diff --git a/kernel/modsign_certificate.S b/kernel/modsign_certificate.S +deleted file mode 100644 +index 6fe03c7..0000000 +--- a/kernel/modsign_certificate.S ++++ /dev/null +@@ -1,11 +0,0 @@ +-#include +- +-#define GLOBAL(name) \ +- .globl VMLINUX_SYMBOL(name); \ +- VMLINUX_SYMBOL(name): +- +- .section ".init.data","aw" +- +-GLOBAL(modsign_certificate_list) +- .incbin "kernel/x509_certificate_list" +-GLOBAL(modsign_certificate_list_end) +diff --git a/kernel/modsign_pubkey.c b/kernel/modsign_pubkey.c +deleted file mode 100644 +index 7cbd450..0000000 +--- a/kernel/modsign_pubkey.c ++++ /dev/null +@@ -1,104 +0,0 @@ +-/* Public keys for module signature verification +- * +- * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. +- * Written by David Howells (dhowells@redhat.com) +- * +- * 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 +-#include +-#include +-#include +-#include +-#include "module-internal.h" +- +-struct key *modsign_keyring; +- +-extern __initconst const u8 modsign_certificate_list[]; +-extern __initconst const u8 modsign_certificate_list_end[]; +- +-/* +- * We need to make sure ccache doesn't cache the .o file as it doesn't notice +- * if modsign.pub changes. +- */ +-static __initconst const char annoy_ccache[] = __TIME__ "foo"; +- +-/* +- * Load the compiled-in keys +- */ +-static __init int module_verify_init(void) +-{ +- pr_notice("Initialise module verification\n"); +- +- modsign_keyring = keyring_alloc(".module_sign", +- KUIDT_INIT(0), KGIDT_INIT(0), +- current_cred(), +- ((KEY_POS_ALL & ~KEY_POS_SETATTR) | +- KEY_USR_VIEW | KEY_USR_READ), +- KEY_ALLOC_NOT_IN_QUOTA, NULL); +- if (IS_ERR(modsign_keyring)) +- panic("Can't allocate module signing keyring\n"); +- +- return 0; +-} +- +-/* +- * Must be initialised before we try and load the keys into the keyring. +- */ +-device_initcall(module_verify_init); +- +-/* +- * Load the compiled-in keys +- */ +-static __init int load_module_signing_keys(void) +-{ +- key_ref_t key; +- const u8 *p, *end; +- size_t plen; +- +- pr_notice("Loading module verification certificates\n"); +- +- end = modsign_certificate_list_end; +- p = modsign_certificate_list; +- while (p < end) { +- /* Each cert begins with an ASN.1 SEQUENCE tag and must be more +- * than 256 bytes in size. +- */ +- if (end - p < 4) +- goto dodgy_cert; +- if (p[0] != 0x30 && +- p[1] != 0x82) +- goto dodgy_cert; +- plen = (p[2] << 8) | p[3]; +- plen += 4; +- if (plen > end - p) +- goto dodgy_cert; +- +- key = key_create_or_update(make_key_ref(modsign_keyring, 1), +- "asymmetric", +- NULL, +- p, +- plen, +- (KEY_POS_ALL & ~KEY_POS_SETATTR) | +- KEY_USR_VIEW, +- KEY_ALLOC_NOT_IN_QUOTA); +- if (IS_ERR(key)) +- pr_err("MODSIGN: Problem loading in-kernel X.509 certificate (%ld)\n", +- PTR_ERR(key)); +- else +- pr_notice("MODSIGN: Loaded cert '%s'\n", +- key_ref_to_ptr(key)->description); +- p += plen; - } - - cert->pub->algo = pkey_algo[cert->pub->pkey_algo]; - cert->pub->id_type = PKEY_ID_X509; +- return 0; +- +-dodgy_cert: +- pr_err("MODSIGN: Problem parsing in-kernel X.509 certificate list\n"); +- return 0; +-} +-late_initcall(load_module_signing_keys); +diff --git a/kernel/module-internal.h b/kernel/module-internal.h +index 24f9247..915e123 100644 +--- a/kernel/module-internal.h ++++ b/kernel/module-internal.h +@@ -9,6 +9,4 @@ + * 2 of the Licence, or (at your option) any later version. + */ + +-extern struct key *modsign_keyring; +- + extern int mod_verify_sig(const void *mod, unsigned long *_modlen); +diff --git a/kernel/module_signing.c b/kernel/module_signing.c +index ee47640..0b6b870 100644 +--- a/kernel/module_signing.c ++++ b/kernel/module_signing.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include "module-internal.h" + + /* +@@ -157,7 +158,7 @@ static struct key *request_asymmetric_key(const char *signer, size_t signer_len, + + pr_debug("Look up: \"%s\"\n", id); + +- key = keyring_search(make_key_ref(modsign_keyring, 1), ++ key = keyring_search(make_key_ref(system_trusted_keyring, 1), + &key_type_asymmetric, id); + if (IS_ERR(key)) + pr_warn("Request for unknown module key '%s' err %ld\n", +diff --git a/kernel/system_certificates.S b/kernel/system_certificates.S +new file mode 100644 +index 0000000..5cffe86 +--- /dev/null ++++ b/kernel/system_certificates.S +@@ -0,0 +1,11 @@ ++#include ++ ++#define GLOBAL(name) \ ++ .globl VMLINUX_SYMBOL(name); \ ++ VMLINUX_SYMBOL(name): ++ ++ .section ".init.data","aw" ++ ++GLOBAL(system_certificate_list) ++ .incbin "kernel/x509_certificate_list" ++GLOBAL(system_certificate_list_end) +diff --git a/kernel/system_keyring.c b/kernel/system_keyring.c +new file mode 100644 +index 0000000..51c3514 +--- /dev/null ++++ b/kernel/system_keyring.c +@@ -0,0 +1,103 @@ ++/* System trusted keyring for trusted public keys ++ * ++ * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. ++ * Written by David Howells (dhowells@redhat.com) ++ * ++ * 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 ++#include ++#include ++#include ++#include ++#include ++#include ++#include "module-internal.h" ++ ++struct key *system_trusted_keyring; ++EXPORT_SYMBOL_GPL(system_trusted_keyring); ++ ++extern __initconst const u8 system_certificate_list[]; ++extern __initconst const u8 system_certificate_list_end[]; ++ ++/* ++ * Load the compiled-in keys ++ */ ++static __init int system_trusted_keyring_init(void) ++{ ++ pr_notice("Initialise system trusted keyring\n"); ++ ++ system_trusted_keyring = ++ keyring_alloc(".system_keyring", ++ KUIDT_INIT(0), KGIDT_INIT(0), current_cred(), ++ ((KEY_POS_ALL & ~KEY_POS_SETATTR) | ++ KEY_USR_VIEW | KEY_USR_READ), ++ KEY_ALLOC_NOT_IN_QUOTA, NULL); ++ if (IS_ERR(system_trusted_keyring)) ++ panic("Can't allocate system trusted keyring\n"); ++ ++ return 0; ++} ++ ++/* ++ * Must be initialised before we try and load the keys into the keyring. ++ */ ++device_initcall(system_trusted_keyring_init); ++ ++/* ++ * Load the compiled-in list of X.509 certificates. ++ */ ++static __init int load_system_certificate_list(void) ++{ ++ key_ref_t key; ++ const u8 *p, *end; ++ size_t plen; ++ ++ pr_notice("Loading compiled-in X.509 certificates\n"); ++ ++ end = system_certificate_list_end; ++ p = system_certificate_list; ++ while (p < end) { ++ /* Each cert begins with an ASN.1 SEQUENCE tag and must be more ++ * than 256 bytes in size. ++ */ ++ if (end - p < 4) ++ goto dodgy_cert; ++ if (p[0] != 0x30 && ++ p[1] != 0x82) ++ goto dodgy_cert; ++ plen = (p[2] << 8) | p[3]; ++ plen += 4; ++ if (plen > end - p) ++ goto dodgy_cert; ++ ++ key = key_create_or_update(make_key_ref(system_trusted_keyring, 1), ++ "asymmetric", ++ NULL, ++ p, ++ plen, ++ (KEY_POS_ALL & ~KEY_POS_SETATTR) | ++ KEY_USR_VIEW, ++ KEY_ALLOC_NOT_IN_QUOTA); ++ if (IS_ERR(key)) { ++ pr_err("Problem loading in-kernel X.509 certificate (%ld)\n", ++ PTR_ERR(key)); ++ } else { ++ pr_notice("Loaded X.509 cert '%s'\n", ++ key_ref_to_ptr(key)->description); ++ key_ref_put(key); ++ } ++ p += plen; ++ } ++ ++ return 0; ++ ++dodgy_cert: ++ pr_err("Problem parsing in-kernel X.509 certificate list\n"); ++ return 0; ++} ++late_initcall(load_system_certificate_list); +-- +1.8.3.1 + + +From c0522b3236c27359bd61fee0f0b74be9f8e2ad60 Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Fri, 30 Aug 2013 16:07:37 +0100 +Subject: [PATCH 14/18] KEYS: Add a 'trusted' flag and a 'trusted only' flag + +Add KEY_FLAG_TRUSTED to indicate that a key either comes from a trusted source +or had a cryptographic signature chain that led back to a trusted key the +kernel already possessed. + +Add KEY_FLAGS_TRUSTED_ONLY to indicate that a keyring will only accept links to +keys marked with KEY_FLAGS_TRUSTED. + +Signed-off-by: David Howells +Reviewed-by: Kees Cook +--- + include/linux/key-type.h | 1 + + include/linux/key.h | 3 +++ + kernel/system_keyring.c | 4 +++- + security/keys/key.c | 8 ++++++++ + security/keys/keyring.c | 4 ++++ + 5 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/include/linux/key-type.h b/include/linux/key-type.h +index f58737b..a74c3a8 100644 +--- a/include/linux/key-type.h ++++ b/include/linux/key-type.h +@@ -45,6 +45,7 @@ struct key_preparsed_payload { + const void *data; /* Raw data */ + size_t datalen; /* Raw datalen */ + size_t quotalen; /* Quota length for proposed payload */ ++ bool trusted; /* True if key is trusted */ + }; + + typedef int (*request_key_actor_t)(struct key_construction *key, +diff --git a/include/linux/key.h b/include/linux/key.h +index 010dbb6..80d6774 100644 +--- a/include/linux/key.h ++++ b/include/linux/key.h +@@ -168,6 +168,8 @@ struct key { + #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */ + #define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */ + #define KEY_FLAG_INVALIDATED 7 /* set if key has been invalidated */ ++#define KEY_FLAG_TRUSTED 8 /* set if key is trusted */ ++#define KEY_FLAG_TRUSTED_ONLY 9 /* set if keyring only accepts links to trusted keys */ + + /* the key type and key description string + * - the desc is used to match a key against search criteria +@@ -218,6 +220,7 @@ extern struct key *key_alloc(struct key_type *type, + #define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */ + #define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */ + #define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */ ++#define KEY_ALLOC_TRUSTED 0x0004 /* Key should be flagged as trusted */ + + extern void key_revoke(struct key *key); + extern void key_invalidate(struct key *key); +diff --git a/kernel/system_keyring.c b/kernel/system_keyring.c +index 51c3514..5296721 100644 +--- a/kernel/system_keyring.c ++++ b/kernel/system_keyring.c +@@ -40,6 +40,7 @@ static __init int system_trusted_keyring_init(void) + if (IS_ERR(system_trusted_keyring)) + panic("Can't allocate system trusted keyring\n"); + ++ set_bit(KEY_FLAG_TRUSTED_ONLY, &system_trusted_keyring->flags); + return 0; + } + +@@ -82,7 +83,8 @@ static __init int load_system_certificate_list(void) + plen, + (KEY_POS_ALL & ~KEY_POS_SETATTR) | + KEY_USR_VIEW, +- KEY_ALLOC_NOT_IN_QUOTA); ++ KEY_ALLOC_NOT_IN_QUOTA | ++ KEY_ALLOC_TRUSTED); + if (IS_ERR(key)) { + pr_err("Problem loading in-kernel X.509 certificate (%ld)\n", + PTR_ERR(key)); +diff --git a/security/keys/key.c b/security/keys/key.c +index a819b5c..d331ea9 100644 +--- a/security/keys/key.c ++++ b/security/keys/key.c +@@ -300,6 +300,8 @@ struct key *key_alloc(struct key_type *type, const char *desc, + + if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) + key->flags |= 1 << KEY_FLAG_IN_QUOTA; ++ if (flags & KEY_ALLOC_TRUSTED) ++ key->flags |= 1 << KEY_FLAG_TRUSTED; + + memset(&key->type_data, 0, sizeof(key->type_data)); + +@@ -813,6 +815,7 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref, + prep.data = payload; + prep.datalen = plen; + prep.quotalen = index_key.type->def_datalen; ++ prep.trusted = flags & KEY_ALLOC_TRUSTED; + if (index_key.type->preparse) { + ret = index_key.type->preparse(&prep); + if (ret < 0) { +@@ -827,6 +830,11 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref, + } + index_key.desc_len = strlen(index_key.description); + ++ key_ref = ERR_PTR(-EPERM); ++ if (!prep.trusted && test_bit(KEY_FLAG_TRUSTED_ONLY, &keyring->flags)) ++ goto error_free_prep; ++ flags |= prep.trusted ? KEY_ALLOC_TRUSTED : 0; ++ + ret = __key_link_begin(keyring, &index_key, &edit); + if (ret < 0) { + key_ref = ERR_PTR(ret); +diff --git a/security/keys/keyring.c b/security/keys/keyring.c +index f7cdea2..9b6f6e0 100644 +--- a/security/keys/keyring.c ++++ b/security/keys/keyring.c +@@ -1183,6 +1183,10 @@ int key_link(struct key *keyring, struct key *key) + key_check(keyring); + key_check(key); + ++ if (test_bit(KEY_FLAG_TRUSTED_ONLY, &keyring->flags) && ++ !test_bit(KEY_FLAG_TRUSTED, &key->flags)) ++ return -EPERM; ++ + ret = __key_link_begin(keyring, &key->index_key, &edit); + if (ret == 0) { + kdebug("begun {%d,%d}", keyring->serial, atomic_read(&keyring->usage)); +-- +1.8.3.1 + + +From e8e9a6af1d2de6aca01751ccaf0475ed46f9bdb2 Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Wed, 4 Sep 2013 19:28:03 +0100 +Subject: [PATCH 15/18] KEYS: Set the asymmetric-key type default search method + +The keyring expansion patches introduces a new search method by which +key_search() attempts to walk directly to the key that has exactly the same +description as the requested one. + +However, this causes inexact matching of asymmetric keys to fail. The +solution to this is to select iterative rather than direct search as the +default search type for asymmetric keys. + +As an example, the kernel might have a key like this: + + Magrathea: Glacier signing key: 6a2a0f82bad7e396665f465e4e3e1f9bd24b1226 + +and: + + keyctl search asymmetric id:d24b1226 + +should find the key, despite that not being its exact description. + +Signed-off-by: David Howells +--- + crypto/asymmetric_keys/asymmetric_type.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c +index cf80765..b77eb53 100644 +--- a/crypto/asymmetric_keys/asymmetric_type.c ++++ b/crypto/asymmetric_keys/asymmetric_type.c +@@ -209,6 +209,7 @@ struct key_type key_type_asymmetric = { + .match = asymmetric_key_match, + .destroy = asymmetric_key_destroy, + .describe = asymmetric_key_describe, ++ .def_lookup_type = KEYRING_SEARCH_LOOKUP_ITERATE, + }; + EXPORT_SYMBOL_GPL(key_type_asymmetric); -- 1.8.3.1 + +From dfb7781ebba28004f95f7af4e039d8b44697c87c Mon Sep 17 00:00:00 2001 +From: Mimi Zohar +Date: Tue, 20 Aug 2013 14:36:26 -0400 +Subject: [PATCH 16/18] KEYS: Make the system 'trusted' keyring viewable by + userspace + +Give the root user the ability to read the system keyring and put read +permission on the trusted keys added during boot. The latter is actually more +theoretical than real for the moment as asymmetric keys do not currently +provide a read operation. + +Signed-off-by: Mimi Zohar +Signed-off-by: David Howells +--- + kernel/system_keyring.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/kernel/system_keyring.c b/kernel/system_keyring.c +index 5296721..564dd93 100644 +--- a/kernel/system_keyring.c ++++ b/kernel/system_keyring.c +@@ -35,7 +35,7 @@ static __init int system_trusted_keyring_init(void) + keyring_alloc(".system_keyring", + KUIDT_INIT(0), KGIDT_INIT(0), current_cred(), + ((KEY_POS_ALL & ~KEY_POS_SETATTR) | +- KEY_USR_VIEW | KEY_USR_READ), ++ KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH), + KEY_ALLOC_NOT_IN_QUOTA, NULL); + if (IS_ERR(system_trusted_keyring)) + panic("Can't allocate system trusted keyring\n"); +@@ -81,8 +81,8 @@ static __init int load_system_certificate_list(void) + NULL, + p, + plen, +- (KEY_POS_ALL & ~KEY_POS_SETATTR) | +- KEY_USR_VIEW, ++ ((KEY_POS_ALL & ~KEY_POS_SETATTR) | ++ KEY_USR_VIEW | KEY_USR_READ), + KEY_ALLOC_NOT_IN_QUOTA | + KEY_ALLOC_TRUSTED); + if (IS_ERR(key)) { +-- +1.8.3.1 + + +From 052744b12209e66ede2a04ec31b9bb7ff40bbc9a Mon Sep 17 00:00:00 2001 +From: Mimi Zohar +Date: Tue, 20 Aug 2013 14:36:27 -0400 +Subject: [PATCH 17/18] KEYS: verify a certificate is signed by a 'trusted' key + +Only public keys, with certificates signed by an existing +'trusted' key on the system trusted keyring, should be added +to a trusted keyring. This patch adds support for verifying +a certificate's signature. + +This is derived from David Howells pkcs7_request_asymmetric_key() patch. + +Signed-off-by: Mimi Zohar +Signed-off-by: David Howells +--- + crypto/asymmetric_keys/x509_public_key.c | 81 +++++++++++++++++++++++++++++++- + 1 file changed, 80 insertions(+), 1 deletion(-) + +diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c +index c1540e8..8761264 100644 +--- a/crypto/asymmetric_keys/x509_public_key.c ++++ b/crypto/asymmetric_keys/x509_public_key.c +@@ -18,12 +18,60 @@ + #include + #include + #include ++#include + #include + #include "asymmetric_keys.h" + #include "public_key.h" + #include "x509_parser.h" + + /* ++ * Find a key in the given keyring by issuer and authority. ++ */ ++static struct key *x509_request_asymmetric_key( ++ struct key *keyring, ++ const char *signer, size_t signer_len, ++ const char *authority, size_t auth_len) ++{ ++ key_ref_t key; ++ char *id; ++ ++ /* Construct an identifier. */ ++ id = kmalloc(signer_len + 2 + auth_len + 1, GFP_KERNEL); ++ if (!id) ++ return ERR_PTR(-ENOMEM); ++ ++ memcpy(id, signer, signer_len); ++ id[signer_len + 0] = ':'; ++ id[signer_len + 1] = ' '; ++ memcpy(id + signer_len + 2, authority, auth_len); ++ id[signer_len + 2 + auth_len] = 0; ++ ++ pr_debug("Look up: \"%s\"\n", id); ++ ++ key = keyring_search(make_key_ref(keyring, 1), ++ &key_type_asymmetric, id); ++ if (IS_ERR(key)) ++ pr_debug("Request for module key '%s' err %ld\n", ++ id, PTR_ERR(key)); ++ kfree(id); ++ ++ if (IS_ERR(key)) { ++ switch (PTR_ERR(key)) { ++ /* Hide some search errors */ ++ case -EACCES: ++ case -ENOTDIR: ++ case -EAGAIN: ++ return ERR_PTR(-ENOKEY); ++ default: ++ return ERR_CAST(key); ++ } ++ } ++ ++ pr_devel("<==%s() = 0 [%x]\n", __func__, key_serial(key_ref_to_ptr(key))); ++ return key_ref_to_ptr(key); ++} ++ ++/* + * Set up the signature parameters in an X.509 certificate. This involves + * digesting the signed data and extracting the signature. + */ +@@ -103,6 +151,33 @@ int x509_check_signature(const struct public_key *pub, + EXPORT_SYMBOL_GPL(x509_check_signature); + + /* ++ * Check the new certificate against the ones in the trust keyring. If one of ++ * those is the signing key and validates the new certificate, then mark the ++ * new certificate as being trusted. ++ * ++ * Return 0 if the new certificate was successfully validated, 1 if we couldn't ++ * find a matching parent certificate in the trusted list and an error if there ++ * is a matching certificate but the signature check fails. ++ */ ++static int x509_validate_trust(struct x509_certificate *cert, ++ struct key *trust_keyring) ++{ ++ const struct public_key *pk; ++ struct key *key; ++ int ret = 1; ++ ++ key = x509_request_asymmetric_key(trust_keyring, ++ cert->issuer, strlen(cert->issuer), ++ cert->authority, ++ strlen(cert->authority)); ++ if (!IS_ERR(key)) { ++ pk = key->payload.data; ++ ret = x509_check_signature(pk, cert); ++ } ++ return ret; ++} ++ ++/* + * Attempt to parse a data blob for a key as an X509 certificate. + */ + static int x509_key_preparse(struct key_preparsed_payload *prep) +@@ -155,9 +230,13 @@ static int x509_key_preparse(struct key_preparsed_payload *prep) + /* Check the signature on the key if it appears to be self-signed */ + if (!cert->authority || + strcmp(cert->fingerprint, cert->authority) == 0) { +- ret = x509_check_signature(cert->pub, cert); ++ ret = x509_check_signature(cert->pub, cert); /* self-signed */ + if (ret < 0) + goto error_free_cert; ++ } else { ++ ret = x509_validate_trust(cert, system_trusted_keyring); ++ if (!ret) ++ prep->trusted = 1; + } + + /* Propose a description */ +-- +1.8.3.1 + + +From 8b39d9a6d9f805f6a2e837bf8b9595f701ea4a1c Mon Sep 17 00:00:00 2001 +From: Mimi Zohar +Date: Wed, 4 Sep 2013 13:26:22 +0100 +Subject: [PATCH 18/18] KEYS: initialize root uid and session keyrings early + +In order to create the integrity keyrings (eg. _evm, _ima), root's +uid and session keyrings need to be initialized early. + +Signed-off-by: Mimi Zohar +Signed-off-by: David Howells +--- + security/keys/process_keys.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c +index 68548ea..0cf8a13 100644 +--- a/security/keys/process_keys.c ++++ b/security/keys/process_keys.c +@@ -857,3 +857,13 @@ void key_change_session_keyring(struct callback_head *twork) + + commit_creds(new); + } ++ ++/* ++ * Make sure that root's user and user-session keyrings exist. ++ */ ++static int __init init_root_keyring(void) ++{ ++ return install_user_keyrings(); ++} ++ ++late_initcall(init_root_keyring); +-- +1.8.3.1 + diff --git a/media-cx23885-Fix-TeVii-S471-regression-since-introduction-of-ts2020.patch b/media-cx23885-Fix-TeVii-S471-regression-since-introduction-of-ts2020.patch deleted file mode 100644 index 2a28a2fe1..000000000 --- a/media-cx23885-Fix-TeVii-S471-regression-since-introduction-of-ts2020.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b43ea8068d2090cb1e44632c8a938ab40d2c7419 Mon Sep 17 00:00:00 2001 -From: Johannes Koch -Date: Wed, 17 Jul 2013 17:28:16 +0000 -Subject: [media] cx23885: Fix TeVii S471 regression since introduction of ts2020 - -Patch to make TeVii S471 cards use the ts2020 tuner, since ds3000 driver no -longer contains tuning code. - -Signed-off-by: Johannes Koch -Signed-off-by: Mauro Carvalho Chehab ---- -(limited to 'drivers/media/pci/cx23885/cx23885-dvb.c') - -diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c -index 9c5ed10..bb291c6 100644 ---- a/drivers/media/pci/cx23885/cx23885-dvb.c -+++ b/drivers/media/pci/cx23885/cx23885-dvb.c -@@ -1249,6 +1249,10 @@ static int dvb_register(struct cx23885_tsport *port) - fe0->dvb.frontend = dvb_attach(ds3000_attach, - &tevii_ds3000_config, - &i2c_bus->i2c_adap); -+ if (fe0->dvb.frontend != NULL) { -+ dvb_attach(ts2020_attach, fe0->dvb.frontend, -+ &tevii_ts2020_config, &i2c_bus->i2c_adap); -+ } - break; - case CX23885_BOARD_PROF_8000: - i2c_bus = &dev->i2c_bus[0]; --- -cgit v0.9.2 diff --git a/modsign-uefi.patch b/modsign-uefi.patch index 836d0d175..17009c196 100644 --- a/modsign-uefi.patch +++ b/modsign-uefi.patch @@ -321,8 +321,8 @@ index 564dd93..389b50d 100644 +struct key *system_blacklist_keyring; +#endif - extern __initdata const u8 system_certificate_list[]; - extern __initdata const u8 system_certificate_list_end[]; + extern __initconst const u8 system_certificate_list[]; + extern __initconst const u8 system_certificate_list_end[]; @@ -41,6 +44,20 @@ static __init int system_trusted_keyring_init(void) panic("Can't allocate system trusted keyring\n"); diff --git a/net-rework-recvmsg-handler-msg_name-and-msg_namelen-.patch b/net-rework-recvmsg-handler-msg_name-and-msg_namelen-.patch deleted file mode 100644 index 3ec6d0194..000000000 --- a/net-rework-recvmsg-handler-msg_name-and-msg_namelen-.patch +++ /dev/null @@ -1,774 +0,0 @@ -Bugzilla: 1039874 -Upstream-status: 3.13 and 3.12.4 - -From 9cb9fb275f8794546dc31a79f2f02127fed5baf2 Mon Sep 17 00:00:00 2001 -From: Hannes Frederic Sowa -Date: Thu, 21 Nov 2013 03:14:22 +0100 -Subject: [PATCH] net: rework recvmsg handler msg_name and msg_namelen logic - -[ Upstream commit f3d3342602f8bcbf37d7c46641cb9bca7618eb1c ] - -This patch now always passes msg->msg_namelen as 0. recvmsg handlers must -set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) -to return msg_name to the user. - -This prevents numerous uninitialized memory leaks we had in the -recvmsg handlers and makes it harder for new code to accidentally leak -uninitialized memory. - -Optimize for the case recvfrom is called with NULL as address. We don't -need to copy the address at all, so set it to NULL before invoking the -recvmsg handler. We can do so, because all the recvmsg handlers must -cope with the case a plain read() is called on them. read() also sets -msg_name to NULL. - -Also document these changes in include/linux/net.h as suggested by David -Miller. - -Changes since RFC: - -Set msg->msg_name = NULL if user specified a NULL in msg_name but had a -non-null msg_namelen in verify_iovec/verify_compat_iovec. This doesn't -affect sendto as it would bail out earlier while trying to copy-in the -address. It also more naturally reflects the logic by the callers of -verify_iovec. - -With this change in place I could remove " -if (!uaddr || msg_sys->msg_namelen == 0) - msg->msg_name = NULL -". - -This change does not alter the user visible error logic as we ignore -msg_namelen as long as msg_name is NULL. - -Also remove two unnecessary curly brackets in ___sys_recvmsg and change -comments to netdev style. - -Cc: David Miller -Suggested-by: Eric Dumazet -Signed-off-by: Hannes Frederic Sowa -Signed-off-by: David S. Miller -Signed-off-by: Greg Kroah-Hartman ---- - crypto/algif_hash.c | 2 -- - crypto/algif_skcipher.c | 1 - - drivers/isdn/mISDN/socket.c | 13 ++++--------- - drivers/net/ppp/pppoe.c | 2 -- - include/linux/net.h | 8 ++++++++ - net/appletalk/ddp.c | 16 +++++++--------- - net/atm/common.c | 2 -- - net/ax25/af_ax25.c | 4 ++-- - net/bluetooth/af_bluetooth.c | 4 ---- - net/bluetooth/hci_sock.c | 2 -- - net/bluetooth/rfcomm/sock.c | 1 - - net/bluetooth/sco.c | 1 - - net/caif/caif_socket.c | 4 ---- - net/compat.c | 3 ++- - net/core/iovec.c | 3 ++- - net/ipx/af_ipx.c | 3 +-- - net/irda/af_irda.c | 4 ---- - net/iucv/af_iucv.c | 2 -- - net/key/af_key.c | 1 - - net/l2tp/l2tp_ppp.c | 2 -- - net/llc/af_llc.c | 2 -- - net/netlink/af_netlink.c | 2 -- - net/netrom/af_netrom.c | 3 +-- - net/nfc/llcp_sock.c | 2 -- - net/nfc/rawsock.c | 2 -- - net/packet/af_packet.c | 32 +++++++++++++++----------------- - net/rds/recv.c | 2 -- - net/rose/af_rose.c | 8 +++++--- - net/rxrpc/ar-recvmsg.c | 9 ++++++--- - net/socket.c | 19 +++++++++++-------- - net/tipc/socket.c | 6 ------ - net/unix/af_unix.c | 5 ----- - net/vmw_vsock/af_vsock.c | 2 -- - net/vmw_vsock/vmci_transport.c | 2 -- - net/x25/af_x25.c | 3 +-- - 35 files changed, 65 insertions(+), 112 deletions(-) - -diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c -index 0262210..ef5356c 100644 ---- a/crypto/algif_hash.c -+++ b/crypto/algif_hash.c -@@ -161,8 +161,6 @@ static int hash_recvmsg(struct kiocb *unused, struct socket *sock, - else if (len < ds) - msg->msg_flags |= MSG_TRUNC; - -- msg->msg_namelen = 0; -- - lock_sock(sk); - if (ctx->more) { - ctx->more = 0; -diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c -index a1c4f0a..6a6dfc0 100644 ---- a/crypto/algif_skcipher.c -+++ b/crypto/algif_skcipher.c -@@ -432,7 +432,6 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, - long copied = 0; - - lock_sock(sk); -- msg->msg_namelen = 0; - for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0; - iovlen--, iov++) { - unsigned long seglen = iov->iov_len; -diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c -index e47dcb9..5cefb47 100644 ---- a/drivers/isdn/mISDN/socket.c -+++ b/drivers/isdn/mISDN/socket.c -@@ -117,7 +117,6 @@ mISDN_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - { - struct sk_buff *skb; - struct sock *sk = sock->sk; -- struct sockaddr_mISDN *maddr; - - int copied, err; - -@@ -135,9 +134,9 @@ mISDN_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - if (!skb) - return err; - -- if (msg->msg_namelen >= sizeof(struct sockaddr_mISDN)) { -- msg->msg_namelen = sizeof(struct sockaddr_mISDN); -- maddr = (struct sockaddr_mISDN *)msg->msg_name; -+ if (msg->msg_name) { -+ struct sockaddr_mISDN *maddr = msg->msg_name; -+ - maddr->family = AF_ISDN; - maddr->dev = _pms(sk)->dev->id; - if ((sk->sk_protocol == ISDN_P_LAPD_TE) || -@@ -150,11 +149,7 @@ mISDN_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - maddr->sapi = _pms(sk)->ch.addr & 0xFF; - maddr->tei = (_pms(sk)->ch.addr >> 8) & 0xFF; - } -- } else { -- if (msg->msg_namelen) -- printk(KERN_WARNING "%s: too small namelen %d\n", -- __func__, msg->msg_namelen); -- msg->msg_namelen = 0; -+ msg->msg_namelen = sizeof(*maddr); - } - - copied = skb->len + MISDN_HEADER_LEN; -diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c -index 5f66e30..82ee6ed 100644 ---- a/drivers/net/ppp/pppoe.c -+++ b/drivers/net/ppp/pppoe.c -@@ -979,8 +979,6 @@ static int pppoe_recvmsg(struct kiocb *iocb, struct socket *sock, - if (error < 0) - goto end; - -- m->msg_namelen = 0; -- - if (skb) { - total_len = min_t(size_t, total_len, skb->len); - error = skb_copy_datagram_iovec(skb, 0, m->msg_iov, total_len); -diff --git a/include/linux/net.h b/include/linux/net.h -index 4f27575..8bd9d92 100644 ---- a/include/linux/net.h -+++ b/include/linux/net.h -@@ -163,6 +163,14 @@ struct proto_ops { - #endif - int (*sendmsg) (struct kiocb *iocb, struct socket *sock, - struct msghdr *m, size_t total_len); -+ /* Notes for implementing recvmsg: -+ * =============================== -+ * msg->msg_namelen should get updated by the recvmsg handlers -+ * iff msg_name != NULL. It is by default 0 to prevent -+ * returning uninitialized memory to user space. The recvfrom -+ * handlers can assume that msg.msg_name is either NULL or has -+ * a minimum size of sizeof(struct sockaddr_storage). -+ */ - int (*recvmsg) (struct kiocb *iocb, struct socket *sock, - struct msghdr *m, size_t total_len, - int flags); -diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c -index 7fee50d..7d424ac 100644 ---- a/net/appletalk/ddp.c -+++ b/net/appletalk/ddp.c -@@ -1735,7 +1735,6 @@ static int atalk_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr - size_t size, int flags) - { - struct sock *sk = sock->sk; -- struct sockaddr_at *sat = (struct sockaddr_at *)msg->msg_name; - struct ddpehdr *ddp; - int copied = 0; - int offset = 0; -@@ -1764,14 +1763,13 @@ static int atalk_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr - } - err = skb_copy_datagram_iovec(skb, offset, msg->msg_iov, copied); - -- if (!err) { -- if (sat) { -- sat->sat_family = AF_APPLETALK; -- sat->sat_port = ddp->deh_sport; -- sat->sat_addr.s_node = ddp->deh_snode; -- sat->sat_addr.s_net = ddp->deh_snet; -- } -- msg->msg_namelen = sizeof(*sat); -+ if (!err && msg->msg_name) { -+ struct sockaddr_at *sat = msg->msg_name; -+ sat->sat_family = AF_APPLETALK; -+ sat->sat_port = ddp->deh_sport; -+ sat->sat_addr.s_node = ddp->deh_snode; -+ sat->sat_addr.s_net = ddp->deh_snet; -+ msg->msg_namelen = sizeof(*sat); - } - - skb_free_datagram(sk, skb); /* Free the datagram. */ -diff --git a/net/atm/common.c b/net/atm/common.c -index 737bef5..7b49100 100644 ---- a/net/atm/common.c -+++ b/net/atm/common.c -@@ -531,8 +531,6 @@ int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, - struct sk_buff *skb; - int copied, error = -EINVAL; - -- msg->msg_namelen = 0; -- - if (sock->state != SS_CONNECTED) - return -ENOTCONN; - -diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c -index 4b4d2b7..78c474f 100644 ---- a/net/ax25/af_ax25.c -+++ b/net/ax25/af_ax25.c -@@ -1636,11 +1636,11 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock, - - skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); - -- if (msg->msg_namelen != 0) { -- struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name; -+ if (msg->msg_name) { - ax25_digi digi; - ax25_address src; - const unsigned char *mac = skb_mac_header(skb); -+ struct sockaddr_ax25 *sax = msg->msg_name; - - memset(sax, 0, sizeof(struct full_sockaddr_ax25)); - ax25_addr_parse(mac + 1, skb->data - mac - 1, &src, NULL, -diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c -index 9096137..6629cdc 100644 ---- a/net/bluetooth/af_bluetooth.c -+++ b/net/bluetooth/af_bluetooth.c -@@ -221,8 +221,6 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - if (flags & (MSG_OOB)) - return -EOPNOTSUPP; - -- msg->msg_namelen = 0; -- - skb = skb_recv_datagram(sk, flags, noblock, &err); - if (!skb) { - if (sk->sk_shutdown & RCV_SHUTDOWN) -@@ -287,8 +285,6 @@ int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, - if (flags & MSG_OOB) - return -EOPNOTSUPP; - -- msg->msg_namelen = 0; -- - BT_DBG("sk %p size %zu", sk, size); - - lock_sock(sk); -diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c -index 9bd7d95..fa4bf66 100644 ---- a/net/bluetooth/hci_sock.c -+++ b/net/bluetooth/hci_sock.c -@@ -752,8 +752,6 @@ static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - if (!skb) - return err; - -- msg->msg_namelen = 0; -- - copied = skb->len; - if (len < copied) { - msg->msg_flags |= MSG_TRUNC; -diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c -index 30b3721..c1c6028 100644 ---- a/net/bluetooth/rfcomm/sock.c -+++ b/net/bluetooth/rfcomm/sock.c -@@ -608,7 +608,6 @@ static int rfcomm_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - - if (test_and_clear_bit(RFCOMM_DEFER_SETUP, &d->flags)) { - rfcomm_dlc_accept(d); -- msg->msg_namelen = 0; - return 0; - } - -diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c -index e7bd4ee..2bb1d3a 100644 ---- a/net/bluetooth/sco.c -+++ b/net/bluetooth/sco.c -@@ -700,7 +700,6 @@ static int sco_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) { - sco_conn_defer_accept(pi->conn->hcon, 0); - sk->sk_state = BT_CONFIG; -- msg->msg_namelen = 0; - - release_sock(sk); - return 0; -diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c -index 05a41c7..d6be3ed 100644 ---- a/net/caif/caif_socket.c -+++ b/net/caif/caif_socket.c -@@ -286,8 +286,6 @@ static int caif_seqpkt_recvmsg(struct kiocb *iocb, struct socket *sock, - if (m->msg_flags&MSG_OOB) - goto read_error; - -- m->msg_namelen = 0; -- - skb = skb_recv_datagram(sk, flags, 0 , &ret); - if (!skb) - goto read_error; -@@ -361,8 +359,6 @@ static int caif_stream_recvmsg(struct kiocb *iocb, struct socket *sock, - if (flags&MSG_OOB) - goto out; - -- msg->msg_namelen = 0; -- - /* - * Lock the socket to prevent queue disordering - * while sleeps in memcpy_tomsg -diff --git a/net/compat.c b/net/compat.c -index 8903258..618c6a8 100644 ---- a/net/compat.c -+++ b/net/compat.c -@@ -93,7 +93,8 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, - if (err < 0) - return err; - } -- kern_msg->msg_name = kern_address; -+ if (kern_msg->msg_name) -+ kern_msg->msg_name = kern_address; - } else - kern_msg->msg_name = NULL; - -diff --git a/net/core/iovec.c b/net/core/iovec.c -index de178e4..9a31515 100644 ---- a/net/core/iovec.c -+++ b/net/core/iovec.c -@@ -48,7 +48,8 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a - if (err < 0) - return err; - } -- m->msg_name = address; -+ if (m->msg_name) -+ m->msg_name = address; - } else { - m->msg_name = NULL; - } -diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c -index 7a1e0fc..e096025 100644 ---- a/net/ipx/af_ipx.c -+++ b/net/ipx/af_ipx.c -@@ -1823,8 +1823,6 @@ static int ipx_recvmsg(struct kiocb *iocb, struct socket *sock, - if (skb->tstamp.tv64) - sk->sk_stamp = skb->tstamp; - -- msg->msg_namelen = sizeof(*sipx); -- - if (sipx) { - sipx->sipx_family = AF_IPX; - sipx->sipx_port = ipx->ipx_source.sock; -@@ -1832,6 +1830,7 @@ static int ipx_recvmsg(struct kiocb *iocb, struct socket *sock, - sipx->sipx_network = IPX_SKB_CB(skb)->ipx_source_net; - sipx->sipx_type = ipx->ipx_type; - sipx->sipx_zero = 0; -+ msg->msg_namelen = sizeof(*sipx); - } - rc = copied; - -diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c -index 0578d4f..a5e62ef5 100644 ---- a/net/irda/af_irda.c -+++ b/net/irda/af_irda.c -@@ -1385,8 +1385,6 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, - - IRDA_DEBUG(4, "%s()\n", __func__); - -- msg->msg_namelen = 0; -- - skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, - flags & MSG_DONTWAIT, &err); - if (!skb) -@@ -1451,8 +1449,6 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, - target = sock_rcvlowat(sk, flags & MSG_WAITALL, size); - timeo = sock_rcvtimeo(sk, noblock); - -- msg->msg_namelen = 0; -- - do { - int chunk; - struct sk_buff *skb = skb_dequeue(&sk->sk_receive_queue); -diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c -index 168aff5..c4b7218 100644 ---- a/net/iucv/af_iucv.c -+++ b/net/iucv/af_iucv.c -@@ -1324,8 +1324,6 @@ static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - int err = 0; - u32 offset; - -- msg->msg_namelen = 0; -- - if ((sk->sk_state == IUCV_DISCONN) && - skb_queue_empty(&iucv->backlog_skb_q) && - skb_queue_empty(&sk->sk_receive_queue) && -diff --git a/net/key/af_key.c b/net/key/af_key.c -index ab8bd2c..66f51c5 100644 ---- a/net/key/af_key.c -+++ b/net/key/af_key.c -@@ -3623,7 +3623,6 @@ static int pfkey_recvmsg(struct kiocb *kiocb, - if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT)) - goto out; - -- msg->msg_namelen = 0; - skb = skb_recv_datagram(sk, flags, flags & MSG_DONTWAIT, &err); - if (skb == NULL) - goto out; -diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c -index 8c46b27..44441c0 100644 ---- a/net/l2tp/l2tp_ppp.c -+++ b/net/l2tp/l2tp_ppp.c -@@ -197,8 +197,6 @@ static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock, - if (sk->sk_state & PPPOX_BOUND) - goto end; - -- msg->msg_namelen = 0; -- - err = 0; - skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, - flags & MSG_DONTWAIT, &err); -diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c -index 48aaa89..8870988 100644 ---- a/net/llc/af_llc.c -+++ b/net/llc/af_llc.c -@@ -720,8 +720,6 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, - int target; /* Read at least this many bytes */ - long timeo; - -- msg->msg_namelen = 0; -- - lock_sock(sk); - copied = -ENOTCONN; - if (unlikely(sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_LISTEN)) -diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c -index 0c61b59..90b654b 100644 ---- a/net/netlink/af_netlink.c -+++ b/net/netlink/af_netlink.c -@@ -2317,8 +2317,6 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, - } - #endif - -- msg->msg_namelen = 0; -- - copied = data_skb->len; - if (len < copied) { - msg->msg_flags |= MSG_TRUNC; -diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c -index 698814b..53c19a3 100644 ---- a/net/netrom/af_netrom.c -+++ b/net/netrom/af_netrom.c -@@ -1179,10 +1179,9 @@ static int nr_recvmsg(struct kiocb *iocb, struct socket *sock, - sax->sax25_family = AF_NETROM; - skb_copy_from_linear_data_offset(skb, 7, sax->sax25_call.ax25_call, - AX25_ADDR_LEN); -+ msg->msg_namelen = sizeof(*sax); - } - -- msg->msg_namelen = sizeof(*sax); -- - skb_free_datagram(sk, skb); - - release_sock(sk); -diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c -index d308402..824c605 100644 ---- a/net/nfc/llcp_sock.c -+++ b/net/nfc/llcp_sock.c -@@ -807,8 +807,6 @@ static int llcp_sock_recvmsg(struct kiocb *iocb, struct socket *sock, - - pr_debug("%p %zu\n", sk, len); - -- msg->msg_namelen = 0; -- - lock_sock(sk); - - if (sk->sk_state == LLCP_CLOSED && -diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c -index 313bf1b..5d11f4a 100644 ---- a/net/nfc/rawsock.c -+++ b/net/nfc/rawsock.c -@@ -241,8 +241,6 @@ static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock, - if (!skb) - return rc; - -- msg->msg_namelen = 0; -- - copied = skb->len; - if (len < copied) { - msg->msg_flags |= MSG_TRUNC; -diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c -index 75c8bbf..739c50d 100644 ---- a/net/packet/af_packet.c -+++ b/net/packet/af_packet.c -@@ -2694,7 +2694,6 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock, - struct sock *sk = sock->sk; - struct sk_buff *skb; - int copied, err; -- struct sockaddr_ll *sll; - int vnet_hdr_len = 0; - - err = -EINVAL; -@@ -2777,22 +2776,10 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock, - goto out_free; - } - -- /* -- * If the address length field is there to be filled in, we fill -- * it in now. -- */ -- -- sll = &PACKET_SKB_CB(skb)->sa.ll; -- if (sock->type == SOCK_PACKET) -- msg->msg_namelen = sizeof(struct sockaddr_pkt); -- else -- msg->msg_namelen = sll->sll_halen + offsetof(struct sockaddr_ll, sll_addr); -- -- /* -- * You lose any data beyond the buffer you gave. If it worries a -- * user program they can ask the device for its MTU anyway. -+ /* You lose any data beyond the buffer you gave. If it worries -+ * a user program they can ask the device for its MTU -+ * anyway. - */ -- - copied = skb->len; - if (copied > len) { - copied = len; -@@ -2805,9 +2792,20 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock, - - sock_recv_ts_and_drops(msg, sk, skb); - -- if (msg->msg_name) -+ if (msg->msg_name) { -+ /* If the address length field is there to be filled -+ * in, we fill it in now. -+ */ -+ if (sock->type == SOCK_PACKET) { -+ msg->msg_namelen = sizeof(struct sockaddr_pkt); -+ } else { -+ struct sockaddr_ll *sll = &PACKET_SKB_CB(skb)->sa.ll; -+ msg->msg_namelen = sll->sll_halen + -+ offsetof(struct sockaddr_ll, sll_addr); -+ } - memcpy(msg->msg_name, &PACKET_SKB_CB(skb)->sa, - msg->msg_namelen); -+ } - - if (pkt_sk(sk)->auxdata) { - struct tpacket_auxdata aux; -diff --git a/net/rds/recv.c b/net/rds/recv.c -index 9f0f17c..de339b2 100644 ---- a/net/rds/recv.c -+++ b/net/rds/recv.c -@@ -410,8 +410,6 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, - - rdsdebug("size %zu flags 0x%x timeo %ld\n", size, msg_flags, timeo); - -- msg->msg_namelen = 0; -- - if (msg_flags & MSG_OOB) - goto out; - -diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c -index e98fcfb..33af772 100644 ---- a/net/rose/af_rose.c -+++ b/net/rose/af_rose.c -@@ -1216,7 +1216,6 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, - { - struct sock *sk = sock->sk; - struct rose_sock *rose = rose_sk(sk); -- struct sockaddr_rose *srose = (struct sockaddr_rose *)msg->msg_name; - size_t copied; - unsigned char *asmptr; - struct sk_buff *skb; -@@ -1252,8 +1251,11 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, - - skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); - -- if (srose != NULL) { -- memset(srose, 0, msg->msg_namelen); -+ if (msg->msg_name) { -+ struct sockaddr_rose *srose; -+ -+ memset(msg->msg_name, 0, sizeof(struct full_sockaddr_rose)); -+ srose = msg->msg_name; - srose->srose_family = AF_ROSE; - srose->srose_addr = rose->dest_addr; - srose->srose_call = rose->dest_call; -diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c -index 4b48687..898492a 100644 ---- a/net/rxrpc/ar-recvmsg.c -+++ b/net/rxrpc/ar-recvmsg.c -@@ -143,10 +143,13 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock, - - /* copy the peer address and timestamp */ - if (!continue_call) { -- if (msg->msg_name && msg->msg_namelen > 0) -+ if (msg->msg_name) { -+ size_t len = -+ sizeof(call->conn->trans->peer->srx); - memcpy(msg->msg_name, -- &call->conn->trans->peer->srx, -- sizeof(call->conn->trans->peer->srx)); -+ &call->conn->trans->peer->srx, len); -+ msg->msg_namelen = len; -+ } - sock_recv_ts_and_drops(msg, &rx->sk, skb); - } - -diff --git a/net/socket.c b/net/socket.c -index 4b94643..5158ff7 100644 ---- a/net/socket.c -+++ b/net/socket.c -@@ -1849,8 +1849,10 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, - msg.msg_iov = &iov; - iov.iov_len = size; - iov.iov_base = ubuf; -- msg.msg_name = (struct sockaddr *)&address; -- msg.msg_namelen = sizeof(address); -+ /* Save some cycles and don't copy the address if not needed */ -+ msg.msg_name = addr ? (struct sockaddr *)&address : NULL; -+ /* We assume all kernel code knows the size of sockaddr_storage */ -+ msg.msg_namelen = 0; - if (sock->file->f_flags & O_NONBLOCK) - flags |= MSG_DONTWAIT; - err = sock_recvmsg(sock, &msg, size, flags); -@@ -2230,16 +2232,14 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, - goto out; - } - -- /* -- * Save the user-mode address (verify_iovec will change the -- * kernel msghdr to use the kernel address space) -+ /* Save the user-mode address (verify_iovec will change the -+ * kernel msghdr to use the kernel address space) - */ -- - uaddr = (__force void __user *)msg_sys->msg_name; - uaddr_len = COMPAT_NAMELEN(msg); -- if (MSG_CMSG_COMPAT & flags) { -+ if (MSG_CMSG_COMPAT & flags) - err = verify_compat_iovec(msg_sys, iov, &addr, VERIFY_WRITE); -- } else -+ else - err = verify_iovec(msg_sys, iov, &addr, VERIFY_WRITE); - if (err < 0) - goto out_freeiov; -@@ -2248,6 +2248,9 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, - cmsg_ptr = (unsigned long)msg_sys->msg_control; - msg_sys->msg_flags = flags & (MSG_CMSG_CLOEXEC|MSG_CMSG_COMPAT); - -+ /* We assume all kernel code knows the size of sockaddr_storage */ -+ msg_sys->msg_namelen = 0; -+ - if (sock->file->f_flags & O_NONBLOCK) - flags |= MSG_DONTWAIT; - err = (nosec ? sock_recvmsg_nosec : sock_recvmsg)(sock, msg_sys, -diff --git a/net/tipc/socket.c b/net/tipc/socket.c -index 6cc7ddd..dffdbea 100644 ---- a/net/tipc/socket.c -+++ b/net/tipc/socket.c -@@ -984,9 +984,6 @@ static int recv_msg(struct kiocb *iocb, struct socket *sock, - goto exit; - } - -- /* will be updated in set_orig_addr() if needed */ -- m->msg_namelen = 0; -- - timeout = sock_rcvtimeo(sk, flags & MSG_DONTWAIT); - restart: - -@@ -1095,9 +1092,6 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, - goto exit; - } - -- /* will be updated in set_orig_addr() if needed */ -- m->msg_namelen = 0; -- - target = sock_rcvlowat(sk, flags & MSG_WAITALL, buf_len); - timeout = sock_rcvtimeo(sk, flags & MSG_DONTWAIT); - -diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c -index e64bbcf..6c66e8d 100644 ---- a/net/unix/af_unix.c -+++ b/net/unix/af_unix.c -@@ -1762,7 +1762,6 @@ static void unix_copy_addr(struct msghdr *msg, struct sock *sk) - { - struct unix_sock *u = unix_sk(sk); - -- msg->msg_namelen = 0; - if (u->addr) { - msg->msg_namelen = u->addr->len; - memcpy(msg->msg_name, u->addr->name, u->addr->len); -@@ -1786,8 +1785,6 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock, - if (flags&MSG_OOB) - goto out; - -- msg->msg_namelen = 0; -- - err = mutex_lock_interruptible(&u->readlock); - if (err) { - err = sock_intr_errno(sock_rcvtimeo(sk, noblock)); -@@ -1927,8 +1924,6 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock, - target = sock_rcvlowat(sk, flags&MSG_WAITALL, size); - timeo = sock_rcvtimeo(sk, flags&MSG_DONTWAIT); - -- msg->msg_namelen = 0; -- - /* Lock the socket to prevent queue disordering - * while sleeps in memcpy_tomsg - */ -diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c -index 4d93346..16f721c 100644 ---- a/net/vmw_vsock/af_vsock.c -+++ b/net/vmw_vsock/af_vsock.c -@@ -1663,8 +1663,6 @@ vsock_stream_recvmsg(struct kiocb *kiocb, - vsk = vsock_sk(sk); - err = 0; - -- msg->msg_namelen = 0; -- - lock_sock(sk); - - if (sk->sk_state != SS_CONNECTED) { -diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c -index ffc11df..73ca104 100644 ---- a/net/vmw_vsock/vmci_transport.c -+++ b/net/vmw_vsock/vmci_transport.c -@@ -1746,8 +1746,6 @@ static int vmci_transport_dgram_dequeue(struct kiocb *kiocb, - if (flags & MSG_OOB || flags & MSG_ERRQUEUE) - return -EOPNOTSUPP; - -- msg->msg_namelen = 0; -- - /* Retrieve the head sk_buff from the socket's receive queue. */ - err = 0; - skb = skb_recv_datagram(&vsk->sk, flags, noblock, &err); -diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c -index 45a3ab5..7622789 100644 ---- a/net/x25/af_x25.c -+++ b/net/x25/af_x25.c -@@ -1340,10 +1340,9 @@ static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, - if (sx25) { - sx25->sx25_family = AF_X25; - sx25->sx25_addr = x25->dest_addr; -+ msg->msg_namelen = sizeof(*sx25); - } - -- msg->msg_namelen = sizeof(struct sockaddr_x25); -- - x25_check_rbuf(sk); - rc = copied; - out_free_dgram: --- -1.8.3.1 - diff --git a/netfilter-nf_conntrack-use-RCU-safe-kfree-for-conntr.patch b/netfilter-nf_conntrack-use-RCU-safe-kfree-for-conntr.patch deleted file mode 100644 index fd8351fa4..000000000 --- a/netfilter-nf_conntrack-use-RCU-safe-kfree-for-conntr.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c13a84a830a208fb3443628773c8ca0557773cc7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michal=20Kube=C4=8Dek?= -Date: Wed, 11 Sep 2013 10:17:27 +0200 -Subject: [PATCH] netfilter: nf_conntrack: use RCU safe kfree for conntrack - extensions - -Commit 68b80f11 (netfilter: nf_nat: fix RCU races) introduced -RCU protection for freeing extension data when reallocation -moves them to a new location. We need the same protection when -freeing them in nf_ct_ext_free() in order to prevent a -use-after-free by other threads referencing a NAT extension data -via bysource list. - -Signed-off-by: Michal Kubecek -Signed-off-by: Pablo Neira Ayuso ---- - include/net/netfilter/nf_conntrack_extend.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h -index ff95434..88a1d40 100644 ---- a/include/net/netfilter/nf_conntrack_extend.h -+++ b/include/net/netfilter/nf_conntrack_extend.h -@@ -86,7 +86,7 @@ static inline void nf_ct_ext_destroy(struct nf_conn *ct) - static inline void nf_ct_ext_free(struct nf_conn *ct) - { - if (ct->ext) -- kfree(ct->ext); -+ kfree_rcu(ct->ext, rcu); - } - - /* Add this type, returns pointer to data or NULL. */ --- -1.8.3.1 - diff --git a/ntp-Make-periodic-RTC-update-more-reliable.patch b/ntp-Make-periodic-RTC-update-more-reliable.patch deleted file mode 100644 index 59179e719..000000000 --- a/ntp-Make-periodic-RTC-update-more-reliable.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a97ad0c4b447a132a322cedc3a5f7fa4cab4b304 Mon Sep 17 00:00:00 2001 -From: Miroslav Lichvar -Date: Thu, 1 Aug 2013 19:31:35 +0200 -Subject: [PATCH] ntp: Make periodic RTC update more reliable - -The current code requires that the scheduled update of the RTC happens -in the closest tick to the half of the second. This seems to be -difficult to achieve reliably. The scheduled work may be missing the -target time by a tick or two and be constantly rescheduled every second. - -Relax the limit to 10 ticks. As a typical RTC drifts in the 11-minute -update interval by several milliseconds, this shouldn't affect the -overall accuracy of the RTC much. - -Signed-off-by: Miroslav Lichvar -Signed-off-by: John Stultz ---- - kernel/time/ntp.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c -index 8f5b3b9..ab1fa7c 100644 ---- a/kernel/time/ntp.c -+++ b/kernel/time/ntp.c -@@ -475,6 +475,7 @@ static void sync_cmos_clock(struct work_struct *work) - * called as close as possible to 500 ms before the new second starts. - * This code is run on a timer. If the clock is set, that timer - * may not expire at the correct time. Thus, we adjust... -+ * We want the clock to be within a couple of ticks from the target. - */ - if (!ntp_synced()) { - /* -@@ -485,7 +486,7 @@ static void sync_cmos_clock(struct work_struct *work) - } - - getnstimeofday(&now); -- if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) { -+ if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec * 5) { - struct timespec adjust = now; - - fail = -ENODEV; --- -1.7.9.5 - diff --git a/rt2800-add-support-for-rf3070.patch b/rt2800-add-support-for-rf3070.patch deleted file mode 100644 index 24c16cb9c..000000000 --- a/rt2800-add-support-for-rf3070.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h -index d78c495..2132830 100644 ---- a/drivers/net/wireless/rt2x00/rt2800.h -+++ b/drivers/net/wireless/rt2x00/rt2800.h -@@ -65,6 +65,7 @@ - #define RF3021 0x0007 - #define RF3022 0x0008 - #define RF3052 0x0009 -+#define RF3070 0x3070 - #define RF2853 0x000a - #define RF3320 0x000b - #define RF3322 0x000c -diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c -index 1b41c8e..2958265 100644 ---- a/drivers/net/wireless/rt2x00/rt2800lib.c -+++ b/drivers/net/wireless/rt2x00/rt2800lib.c -@@ -2597,6 +2597,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, - case RF3322: - rt2800_config_channel_rf3322(rt2x00dev, conf, rf, info); - break; -+ case RF3070: - case RF5360: - case RF5370: - case RF5372: -@@ -2611,7 +2612,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, - rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info); - } - -- if (rt2x00_rf(rt2x00dev, RF3290) || -+ if (rt2x00_rf(rt2x00dev, RF3070) || -+ rt2x00_rf(rt2x00dev, RF3290) || - rt2x00_rf(rt2x00dev, RF3322) || - rt2x00_rf(rt2x00dev, RF5360) || - rt2x00_rf(rt2x00dev, RF5370) || -@@ -3219,6 +3221,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev) - rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1); - rt2800_rfcsr_write(rt2x00dev, 7, rfcsr); - break; -+ case RF3070: - case RF3290: - case RF5360: - case RF5370: -@@ -5731,6 +5734,7 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) - case RF3021: - case RF3022: - case RF3052: -+ case RF3070: - case RF3290: - case RF3320: - case RF3322: -@@ -6186,6 +6190,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) - rt2x00_rf(rt2x00dev, RF2020) || - rt2x00_rf(rt2x00dev, RF3021) || - rt2x00_rf(rt2x00dev, RF3022) || -+ rt2x00_rf(rt2x00dev, RF3070) || - rt2x00_rf(rt2x00dev, RF3290) || - rt2x00_rf(rt2x00dev, RF3320) || - rt2x00_rf(rt2x00dev, RF3322) || -@@ -6219,10 +6224,11 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) - /* - * Initialize HT information. - */ -- if (!rt2x00_rf(rt2x00dev, RF2020)) -+ if (!rt2x00_rf(rt2x00dev, RF2020)) { - spec->ht.ht_supported = true; -- else -+ } else { - spec->ht.ht_supported = false; -+ } - - spec->ht.cap = - IEEE80211_HT_CAP_SUP_WIDTH_20_40 | -@@ -6290,6 +6296,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) - case RF3022: - case RF3320: - case RF3052: -+ case RF3070: - case RF3290: - case RF5360: - case RF5370: diff --git a/rt2800usb-slow-down-TX-status-polling.patch b/rt2800usb-slow-down-TX-status-polling.patch deleted file mode 100644 index a76f9b847..000000000 --- a/rt2800usb-slow-down-TX-status-polling.patch +++ /dev/null @@ -1,53 +0,0 @@ -Polling TX statuses too frequently has two negative effects. First is -randomly peek CPU usage, causing overall system functioning delays. -Second bad effect is that device is not able to fill TX statuses in -H/W register on some workloads and we get lot of timeouts like below: - -ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2 -ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2 -ieee80211 phy4: rt2800usb_txdone: Warning - Got TX status for an empty queue 2, dropping - -This not only cause flood of messages in dmesg, but also bad throughput, -since rate scaling algorithm can not work optimally. - -In the future, we should probably make polling interval be adjusted -automatically, but for now just increase values, this make mentioned -problems gone. - -Resolve: -https://bugzilla.kernel.org/show_bug.cgi?id=62781 - -Cc: stable@vger.kernel.org -Signed-off-by: Stanislaw Gruszka ---- - drivers/net/wireless/rt2x00/rt2800usb.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c -index 96677ce5..e095e61 100644 ---- a/drivers/net/wireless/rt2x00/rt2800usb.c -+++ b/drivers/net/wireless/rt2x00/rt2800usb.c -@@ -176,8 +176,8 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, - queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); - - if (rt2800usb_txstatus_pending(rt2x00dev)) { -- /* Read register after 250 us */ -- hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000), -+ /* Read register after 1 ms */ -+ hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 1000000), - HRTIMER_MODE_REL); - return false; - } -@@ -202,8 +202,8 @@ static void rt2800usb_async_read_tx_status(struct rt2x00_dev *rt2x00dev) - if (test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags)) - return; - -- /* Read TX_STA_FIFO register after 500 us */ -- hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 500000), -+ /* Read TX_STA_FIFO register after 2 ms */ -+ hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 2000000), - HRTIMER_MODE_REL); - } - --- -1.8.3.1 diff --git a/silence-noise.patch b/silence-noise.patch index 1e4d7c57f..a8032597e 100644 --- a/silence-noise.patch +++ b/silence-noise.patch @@ -7,28 +7,20 @@ Some systems, such as EFI-based Apple systems, won't necessarily have an i8042 to initialize. We shouldn't be printing an error message in this case, since not detecting the chip is the correct behavior. --- - drivers/input/serio/i8042.c | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) - diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c -index 170f71e..4f3e632 100644 +index 52c9ebf..c374a96 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c -@@ -701,10 +701,8 @@ static int __devinit i8042_check_aux(void) - +@@ -855,7 +855,6 @@ static int __init i8042_check_aux(void) static int i8042_controller_check(void) { -- if (i8042_flush() == I8042_BUFFER_SIZE) { + if (i8042_flush()) { - pr_err("No controller found\n"); -+ if (i8042_flush() == I8042_BUFFER_SIZE) return -ENODEV; -- } - - return 0; - } --- -1.6.0.1 + } +-- + Socket fuzzers like sfuzz will trigger this printk a lot, even though it's ratelimited. It isn't particularly useful, so just remove it. diff --git a/slab_common-Do-not-check-for-duplicate-slab-names.patch b/slab_common-Do-not-check-for-duplicate-slab-names.patch deleted file mode 100644 index c99303cc0..000000000 --- a/slab_common-Do-not-check-for-duplicate-slab-names.patch +++ /dev/null @@ -1,71 +0,0 @@ -Bugzilla: 1031086 -Upstream-status: 3.12 - -From cd8fa0170867ce6e6e2d7edba1dc1a0b87485854 Mon Sep 17 00:00:00 2001 -From: Christoph Lameter -Date: Sat, 21 Sep 2013 21:56:34 +0000 -Subject: [PATCH] slab_common: Do not check for duplicate slab names - -SLUB can alias multiple slab kmem_create_requests to one slab cache to save -memory and increase the cache hotness. As a result the name of the slab can be -stale. Only check the name for duplicates if we are in debug mode where we do -not merge multiple caches. - -This fixes the following problem reported by Jonathan Brassow: - - The problem with kmem_cache* is this: - - *) Assume CONFIG_SLUB is set - 1) kmem_cache_create(name="foo-a") - - creates new kmem_cache structure - 2) kmem_cache_create(name="foo-b") - - If identical cache characteristics, it will be merged with the previously - created cache associated with "foo-a". The cache's refcount will be - incremented and an alias will be created via sysfs_slab_alias(). - 3) kmem_cache_destroy() - - Attempting to destroy cache associated with "foo-a", but instead the - refcount is simply decremented. I don't even think the sysfs aliases are - ever removed... - 4) kmem_cache_create(name="foo-a") - - This FAILS because kmem_cache_sanity_check colides with the existing - name ("foo-a") associated with the non-removed cache. - - This is a problem for RAID (specifically dm-raid) because the name used - for the kmem_cache_create is ("raid%d-%p", level, mddev). If the cache - persists for long enough, the memory address of an old mddev will be - reused for a new mddev - causing an identical formulation of the cache - name. Even though kmem_cache_destory had long ago been used to delete - the old cache, the merging of caches has cause the name and cache of that - old instance to be preserved and causes a colision (and thus failure) in - kmem_cache_create(). I see this regularly in my testing. - -Reported-by: Jonathan Brassow -Signed-off-by: Christoph Lameter -Signed-off-by: Pekka Enberg ---- - mm/slab_common.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/mm/slab_common.c b/mm/slab_common.c -index 538bade..d434771 100644 ---- a/mm/slab_common.c -+++ b/mm/slab_common.c -@@ -55,6 +55,7 @@ static int kmem_cache_sanity_check(struct mem_cgroup *memcg, const char *name, - continue; - } - -+#if !defined(CONFIG_SLUB) || !defined(CONFIG_SLUB_DEBUG_ON) - /* - * For simplicity, we won't check this in the list of memcg - * caches. We have control over memcg naming, and if there -@@ -68,6 +69,7 @@ static int kmem_cache_sanity_check(struct mem_cgroup *memcg, const char *name, - s = NULL; - return -EINVAL; - } -+#endif - } - - WARN_ON(strchr(name, ' ')); /* It confuses parsers */ --- -1.8.3.1 - diff --git a/sources b/sources index c634d10c0..df0f7b616 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -fea363551ff45fbe4cb88497b863b261 linux-3.11.tar.xz -c918da07cf5ad4240945ae56c4de3bc0 patch-3.11.10.xz +cc6ee608854e0da4b64f6c1ff8b6398c linux-3.12.tar.xz +70e456d21f7e7c0dc2f9bd170f1ae4ee patch-3.12.5.xz diff --git a/sunrpc-replace-gssd_running-with-more-reliable-check.patch b/sunrpc-replace-gssd_running-with-more-reliable-check.patch index f2ca18555..8cd5c0090 100644 --- a/sunrpc-replace-gssd_running-with-more-reliable-check.patch +++ b/sunrpc-replace-gssd_running-with-more-reliable-check.patch @@ -14,16 +14,19 @@ extraneous newline from the message. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust --- + Fixed up to apply to 3.12.1 by Josh Boyer + include/linux/sunrpc/rpc_pipe_fs.h | 2 ++ net/sunrpc/auth_gss/auth_gss.c | 17 +++++++---------- net/sunrpc/netns.h | 2 -- net/sunrpc/rpc_pipe.c | 14 ++++++++++---- 4 files changed, 19 insertions(+), 16 deletions(-) -diff -up linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h.orig linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h ---- linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h.orig 2013-11-21 10:11:17.893026000 -0500 -+++ linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h 2013-11-21 10:14:17.709348000 -0500 -@@ -94,5 +94,7 @@ extern int rpc_unlink(struct dentry *); +diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h +index 85f1342..7f490be 100644 +--- a/include/linux/sunrpc/rpc_pipe_fs.h ++++ b/include/linux/sunrpc/rpc_pipe_fs.h +@@ -131,5 +131,7 @@ extern int rpc_unlink(struct dentry *); extern int register_rpc_pipefs(void); extern void unregister_rpc_pipefs(void); @@ -31,10 +34,11 @@ diff -up linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h.orig li + #endif #endif -diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c ---- linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c.orig 2013-09-02 16:46:10.000000000 -0400 -+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c 2013-11-21 10:18:33.681923000 -0500 -@@ -507,8 +507,7 @@ static void warn_gssd(void) +diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c +index 0846566..1ada878 100644 +--- a/net/sunrpc/auth_gss/auth_gss.c ++++ b/net/sunrpc/auth_gss/auth_gss.c +@@ -517,8 +517,7 @@ static void warn_gssd(void) unsigned long now = jiffies; if (time_after(now, ratelimit)) { @@ -44,7 +48,7 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c.orig linux- ratelimit = now + 15*HZ; } } -@@ -571,7 +570,6 @@ gss_create_upcall(struct gss_auth *gss_a +@@ -581,7 +580,6 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred) struct rpc_pipe *pipe; struct rpc_cred *cred = &gss_cred->gc_base; struct gss_upcall_msg *gss_msg; @@ -52,7 +56,7 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c.orig linux- DEFINE_WAIT(wait); int err; -@@ -579,17 +577,16 @@ gss_create_upcall(struct gss_auth *gss_a +@@ -589,17 +587,16 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred) __func__, from_kuid(&init_user_ns, cred->cr_uid)); retry: err = 0; @@ -65,7 +69,7 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c.orig linux- + warn_gssd(); + return -EACCES; + } - gss_msg = gss_setup_upcall(gss_auth->client, gss_auth, cred); + gss_msg = gss_setup_upcall(gss_auth, cred); if (PTR_ERR(gss_msg) == -EAGAIN) { err = wait_event_interruptible_timeout(pipe_version_waitqueue, - sn->pipe_version >= 0, timeout); @@ -76,9 +80,10 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/auth_gss/auth_gss.c.orig linux- warn_gssd(); err = -EACCES; } -diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h ---- linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h.orig 2013-11-21 10:11:17.897029000 -0500 -+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h 2013-11-21 10:14:17.722351000 -0500 +diff --git a/net/sunrpc/netns.h b/net/sunrpc/netns.h +index 8a8e841..94e506f 100644 +--- a/net/sunrpc/netns.h ++++ b/net/sunrpc/netns.h @@ -33,8 +33,6 @@ struct sunrpc_net { int pipe_version; atomic_t pipe_users; @@ -88,9 +93,10 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h.orig linux-3.11.9-200.f }; extern int sunrpc_net_id; -diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c ---- linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig 2013-11-21 10:11:17.903026000 -0500 -+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c 2013-11-21 10:14:17.727348000 -0500 +diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c +index 40aef18..ad444f3 100644 +--- a/net/sunrpc/rpc_pipe.c ++++ b/net/sunrpc/rpc_pipe.c @@ -216,14 +216,11 @@ rpc_destroy_inode(struct inode *inode) static int rpc_pipe_open(struct inode *inode, struct file *filp) @@ -106,7 +112,7 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig linux-3.11.9-20 pipe = RPC_I(inode)->pipe; if (pipe == NULL) goto out; -@@ -1082,7 +1079,6 @@ int rpc_pipefs_init_net(struct net *net) +@@ -1231,7 +1228,6 @@ int rpc_pipefs_init_net(struct net *net) return PTR_ERR(sn->gssd_dummy); mutex_init(&sn->pipefs_sb_lock); @@ -114,7 +120,7 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig linux-3.11.9-20 sn->pipe_version = -1; return 0; } -@@ -1236,6 +1232,16 @@ err_depopulate: +@@ -1385,6 +1381,16 @@ err_depopulate: return err; } @@ -131,4 +137,3 @@ diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig linux-3.11.9-20 static struct dentry * rpc_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) - diff --git a/taint-vbox.patch b/taint-vbox.patch deleted file mode 100644 index b0ab4f6e6..000000000 --- a/taint-vbox.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/kernel/module.c b/kernel/module.c -index 921bed4..382414e 100644 ---- a/kernel/module.c -+++ b/kernel/module.c -@@ -2873,6 +2873,10 @@ static int check_module_license_and_versions(struct module *mod) - if (strcmp(mod->name, "ndiswrapper") == 0) - add_taint(TAINT_PROPRIETARY_MODULE, LOCKDEP_NOW_UNRELIABLE); - -+ /* vbox is garbage. */ -+ if (strcmp(mod->name, "vboxdrv") == 0) -+ add_taint(TAINT_CRAP, LOCKDEP_NOW_UNRELIABLE); -+ - /* driverloader was caught wrongly pretending to be under GPL */ - if (strcmp(mod->name, "driverloader") == 0) - add_taint_module(mod, TAINT_PROPRIETARY_MODULE, diff --git a/usbnet-fix-status-interrupt-urb-handling.patch b/usbnet-fix-status-interrupt-urb-handling.patch deleted file mode 100644 index 74bf3978d..000000000 --- a/usbnet-fix-status-interrupt-urb-handling.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 52f48d0d9aaa621ffa5e08d79da99a3f8c93b848 Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Tue, 12 Nov 2013 16:34:41 +0100 -Subject: [PATCH] usbnet: fix status interrupt urb handling - -Since commit 7b0c5f21f348a66de495868b8df0284e8dfd6bbf -"sierra_net: keep status interrupt URB active", sierra_net triggers -status interrupt polling before the net_device is opened (in order to -properly receive the sync message response). - -To be able to receive further interrupts, the interrupt urb needs to be -re-submitted, so this patch removes the bogus check for netif_running(). - -Signed-off-by: Felix Fietkau -Tested-by: Dan Williams -Signed-off-by: David S. Miller ---- - drivers/net/usb/usbnet.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c -index 90a429b..8494bb5 100644 ---- a/drivers/net/usb/usbnet.c -+++ b/drivers/net/usb/usbnet.c -@@ -204,9 +204,6 @@ static void intr_complete (struct urb *urb) - break; - } - -- if (!netif_running (dev->net)) -- return; -- - status = usb_submit_urb (urb, GFP_ATOMIC); - if (status != 0) - netif_err(dev, timer, dev->net, --- -1.8.3.1 - diff --git a/v4l-dvb-experimental.patch b/v4l-dvb-experimental.patch deleted file mode 100644 index e69de29bb..000000000 diff --git a/v4l-dvb-fixes.patch b/v4l-dvb-fixes.patch deleted file mode 100644 index e69de29bb..000000000 diff --git a/v4l-dvb-update.patch b/v4l-dvb-update.patch deleted file mode 100644 index e69de29bb..000000000 diff --git a/vfio-iommu-Fixed-interaction-of-VFIO_IOMMU_MAP_DMA.patch b/vfio-iommu-Fixed-interaction-of-VFIO_IOMMU_MAP_DMA.patch deleted file mode 100644 index 0b5fa8a7a..000000000 --- a/vfio-iommu-Fixed-interaction-of-VFIO_IOMMU_MAP_DMA.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Julian Stecklina -Subject: [PATCH] vfio, iommu: Fixed interaction of VFIO_IOMMU_MAP_DMA with IOMMU address limits - -The BUG_ON in drivers/iommu/intel-iommu.c:785 can be triggered from userspace via -VFIO by calling the VFIO_IOMMU_MAP_DMA ioctl on a vfio device with any address -beyond the addressing capabilities of the IOMMU. The problem is that the ioctl code -calls iommu_iova_to_phys before it calls iommu_map. iommu_map handles the case that -it gets addresses beyond the addressing capabilities of its IOMMU. -intel_iommu_iova_to_phys does not. - -This patch fixes iommu_iova_to_phys to return NULL for addresses beyond what the -IOMMU can handle. This in turn causes the ioctl call to fail in iommu_map and -(correctly) return EFAULT to the user with a helpful warning message in the kernel -log. - -Signed-off-by: Julian Stecklina ---- - drivers/iommu/intel-iommu.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c -index eec0d3e..61303db 100644 ---- a/drivers/iommu/intel-iommu.c -+++ b/drivers/iommu/intel-iommu.c -@@ -782,7 +782,11 @@ static struct dma_pte *pfn_to_dma_pte(struct dmar_domain *domain, - int offset; - - BUG_ON(!domain->pgd); -- BUG_ON(addr_width < BITS_PER_LONG && pfn >> addr_width); -+ -+ if (addr_width < BITS_PER_LONG && pfn >> addr_width) -+ /* Address beyond IOMMU's addressing capabilities. */ -+ return NULL; -+ - parent = domain->pgd; - - while (level > 0) { --- -1.8.3.1 diff --git a/via-velocity-fix-netif_receive_skb-use-in-irq-disable.patch b/via-velocity-fix-netif_receive_skb-use-in-irq-disable.patch deleted file mode 100644 index 820f47056..000000000 --- a/via-velocity-fix-netif_receive_skb-use-in-irq-disable.patch +++ /dev/null @@ -1,121 +0,0 @@ -Bugzilla: 1022733 -Upstream: Submitted for 3.13 and 3.12.y stable -Delivered-To: jwboyer@gmail.com -Received: by 10.76.104.107 with SMTP id gd11csp116929oab; - Mon, 25 Nov 2013 15:45:36 -0800 (PST) -X-Received: by 10.68.254.105 with SMTP id ah9mr20726084pbd.87.1385423136297; - Mon, 25 Nov 2013 15:45:36 -0800 (PST) -Return-Path: -Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) - by mx.google.com with ESMTP id am2si28999873pad.96.2013.11.25.15.44.53 - for ; - Mon, 25 Nov 2013 15:45:36 -0800 (PST) -Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; -Authentication-Results: mx.google.com; - spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=netdev-owner@vger.kernel.org -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1753536Ab3KYXl6 (ORCPT + 99 others); - Mon, 25 Nov 2013 18:41:58 -0500 -Received: from violet.fr.zoreil.com ([92.243.8.30]:57806 "EHLO - violet.fr.zoreil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S1751913Ab3KYXlz (ORCPT - ); Mon, 25 Nov 2013 18:41:55 -0500 -Received: from violet.fr.zoreil.com (localhost [127.0.0.1]) - by violet.fr.zoreil.com (8.14.5/8.14.5) with ESMTP id rAPNewrt012676; - Tue, 26 Nov 2013 00:40:58 +0100 -Received: (from romieu@localhost) - by violet.fr.zoreil.com (8.14.5/8.14.5/Submit) id rAPNewbX012675; - Tue, 26 Nov 2013 00:40:58 +0100 -Date: Tue, 26 Nov 2013 00:40:58 +0100 -From: Francois Romieu -To: netdev@vger.kernel.org -Cc: David Miller , - "Alex A. Schmidt" , - Michele Baldessari , - Jamie Heilman , - Julia Lawall -Subject: [PATCH net 1/1] via-velocity: fix netif_receive_skb use in irq - disabled section. -Message-ID: <20131125234058.GA12566@electric-eye.fr.zoreil.com> -MIME-Version: 1.0 -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline -X-Organisation: Land of Sunshine Inc. -User-Agent: Mutt/1.5.21 (2010-09-15) -Sender: netdev-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org - -2fdac010bdcf10a30711b6924612dfc40daf19b8 ("via-velocity.c: update napi -implementation") overlooked an irq disabling spinlock when the Rx part -of the NAPI poll handler was converted from netif_rx to netif_receive_skb. - -NAPI Rx processing can be taken out of the locked section with a pair of -napi_{disable / enable} since it only races with the MTU change function. - -An heavier rework of the NAPI locking would be able to perform NAPI Tx -before Rx where I simply removed one of velocity_tx_srv calls. - -References: https://bugzilla.redhat.com/show_bug.cgi?id=1022733 -Fixes: 2fdac010bdcf (via-velocity.c: update napi implementation) -Signed-off-by: Francois Romieu -Tested-by: Alex A. Schmidt -Cc: Jamie Heilman -Cc: Michele Baldessari -Cc: Julia Lawall ---- - - It is relevant for stable 3.11.x and 3.12.y. - - drivers/net/ethernet/via/via-velocity.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c -index d022bf9..ad61d26 100644 ---- a/drivers/net/ethernet/via/via-velocity.c -+++ b/drivers/net/ethernet/via/via-velocity.c -@@ -2172,16 +2172,13 @@ static int velocity_poll(struct napi_struct *napi, int budget) - unsigned int rx_done; - unsigned long flags; - -- spin_lock_irqsave(&vptr->lock, flags); - /* - * Do rx and tx twice for performance (taken from the VIA - * out-of-tree driver). - */ -- rx_done = velocity_rx_srv(vptr, budget / 2); -- velocity_tx_srv(vptr); -- rx_done += velocity_rx_srv(vptr, budget - rx_done); -+ rx_done = velocity_rx_srv(vptr, budget); -+ spin_lock_irqsave(&vptr->lock, flags); - velocity_tx_srv(vptr); -- - /* If budget not fully consumed, exit the polling mode */ - if (rx_done < budget) { - napi_complete(napi); -@@ -2342,6 +2339,8 @@ static int velocity_change_mtu(struct net_device *dev, int new_mtu) - if (ret < 0) - goto out_free_tmp_vptr_1; - -+ napi_disable(&vptr->napi); -+ - spin_lock_irqsave(&vptr->lock, flags); - - netif_stop_queue(dev); -@@ -2362,6 +2361,8 @@ static int velocity_change_mtu(struct net_device *dev, int new_mtu) - - velocity_give_many_rx_descs(vptr); - -+ napi_enable(&vptr->napi); -+ - mac_enable_int(vptr->mac_regs); - netif_start_queue(dev); - --- -1.8.3.1 - --- -To unsubscribe from this list: send the line "unsubscribe netdev" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/vmbugon-warnon.patch b/vmbugon-warnon.patch deleted file mode 100644 index fd8efc769..000000000 --- a/vmbugon-warnon.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h -index 580bd58..3d908e9 100644 ---- a/include/linux/mmdebug.h -+++ b/include/linux/mmdebug.h -@@ -2,13 +2,13 @@ - #define LINUX_MM_DEBUG_H 1 - - #ifdef CONFIG_DEBUG_VM --#define VM_BUG_ON(cond) BUG_ON(cond) -+#define VM_BUG_ON(cond) WARN_ON(cond) - #else - #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond) - #endif - - #ifdef CONFIG_DEBUG_VIRTUAL --#define VIRTUAL_BUG_ON(cond) BUG_ON(cond) -+#define VIRTUAL_BUG_ON(cond) WARN_ON(cond) - #else - #define VIRTUAL_BUG_ON(cond) do { } while (0) - #endif diff --git a/x86-allow-1024-cpus.patch b/x86-allow-1024-cpus.patch new file mode 100644 index 000000000..decafd6ef --- /dev/null +++ b/x86-allow-1024-cpus.patch @@ -0,0 +1,13 @@ +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig +index f67e839..d726b2d 100644 +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -825,7 +825,7 @@ config MAXSMP + config NR_CPUS + int "Maximum number of CPUs" if SMP && !MAXSMP + range 2 8 if SMP && X86_32 && !X86_BIGSMP +- range 2 512 if SMP && !MAXSMP ++ range 2 1024 if SMP && !MAXSMP + default "1" if !SMP + default "4096" if MAXSMP + default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000)