diff options
| author | Ting Liu <ting.liu@nxp.com> | 2016-06-16 17:07:46 +0800 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-08-12 11:41:02 -0300 |
| commit | 81ab9b5e13b39c504005b77fe094d9853fae9915 (patch) | |
| tree | cf87550b8d40dc26ba159cda4c15670ee29086ca | |
| parent | 74b810c4d5aabc6ef2d2bbd2b82dc1f6e283a434 (diff) | |
| download | meta-freescale-81ab9b5e13b39c504005b77fe094d9853fae9915.tar.gz | |
linux-qoriq: upgrade to 4.1 plus fsl patches
The main features are:
* Linux kernel 4.1.8
* ARM A7 (AARCH32), A53 and A57 (AARCH64), Little Endian (default)
* Power Architecture e500mc, e5500, e6500
* Multicore SMP support and multithread (e6500)
* 32-bit effective kernel addressing [e500mc, e5500, A57]
* 64-bit effective addressing [e6500, A53, A57]
* Huge Pages (hugetlbfs)
* Linux Real-Time (RT) [P4080, B4860, LS1021A]
* Kernel-based Virtual Machine (KVM)
* Libvirt 1.2.19
* Linux Containers (LXC) 1.1.4 function support
Detailed commit log can be found at:
http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/log/?h=sdk-v2.0.x
Signed-off-by: Ting Liu <ting.liu@nxp.com>
| -rw-r--r-- | recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch | 145 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch | 48 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch | 59 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq/0001-powerpc-Align-TOC-to-256-bytes.patch | 37 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch | 16 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch (renamed from recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch) | 0 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq/module-remove-MODULE_GENERIC_TABLE.patch | 77 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch | 32 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-qoriq_4.1.bb (renamed from recipes-kernel/linux/linux-qoriq_3.12.bb) | 22 |
9 files changed, 42 insertions, 394 deletions
diff --git a/recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch b/recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch deleted file mode 100644 index ddcb6c5d8..000000000 --- a/recipes-kernel/linux/files/net-sctp-CVE-2014-0101.patch +++ /dev/null | |||
| @@ -1,145 +0,0 @@ | |||
| 1 | From 00c53b02cb01976b35d37670a4b5c5d7a6ad3c62 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Borkmann <dborkman@redhat.com> | ||
| 3 | Date: Mon, 3 Mar 2014 17:23:04 +0100 | ||
| 4 | Subject: [PATCH] net: sctp: fix sctp_sf_do_5_1D_ce to verify if we/peer is | ||
| 5 | AUTH capable | ||
| 6 | |||
| 7 | [ Upstream commit ec0223ec48a90cb605244b45f7c62de856403729 ] | ||
| 8 | |||
| 9 | RFC4895 introduced AUTH chunks for SCTP; during the SCTP | ||
| 10 | handshake RANDOM; CHUNKS; HMAC-ALGO are negotiated (CHUNKS | ||
| 11 | being optional though): | ||
| 12 | |||
| 13 | ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> | ||
| 14 | <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- | ||
| 15 | -------------------- COOKIE-ECHO --------------------> | ||
| 16 | <-------------------- COOKIE-ACK --------------------- | ||
| 17 | |||
| 18 | A special case is when an endpoint requires COOKIE-ECHO | ||
| 19 | chunks to be authenticated: | ||
| 20 | |||
| 21 | ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> | ||
| 22 | <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- | ||
| 23 | ------------------ AUTH; COOKIE-ECHO ----------------> | ||
| 24 | <-------------------- COOKIE-ACK --------------------- | ||
| 25 | |||
| 26 | RFC4895, section 6.3. Receiving Authenticated Chunks says: | ||
| 27 | |||
| 28 | The receiver MUST use the HMAC algorithm indicated in | ||
| 29 | the HMAC Identifier field. If this algorithm was not | ||
| 30 | specified by the receiver in the HMAC-ALGO parameter in | ||
| 31 | the INIT or INIT-ACK chunk during association setup, the | ||
| 32 | AUTH chunk and all the chunks after it MUST be discarded | ||
| 33 | and an ERROR chunk SHOULD be sent with the error cause | ||
| 34 | defined in Section 4.1. [...] If no endpoint pair shared | ||
| 35 | key has been configured for that Shared Key Identifier, | ||
| 36 | all authenticated chunks MUST be silently discarded. [...] | ||
| 37 | |||
| 38 | When an endpoint requires COOKIE-ECHO chunks to be | ||
| 39 | authenticated, some special procedures have to be followed | ||
| 40 | because the reception of a COOKIE-ECHO chunk might result | ||
| 41 | in the creation of an SCTP association. If a packet arrives | ||
| 42 | containing an AUTH chunk as a first chunk, a COOKIE-ECHO | ||
| 43 | chunk as the second chunk, and possibly more chunks after | ||
| 44 | them, and the receiver does not have an STCB for that | ||
| 45 | packet, then authentication is based on the contents of | ||
| 46 | the COOKIE-ECHO chunk. In this situation, the receiver MUST | ||
| 47 | authenticate the chunks in the packet by using the RANDOM | ||
| 48 | parameters, CHUNKS parameters and HMAC_ALGO parameters | ||
| 49 | obtained from the COOKIE-ECHO chunk, and possibly a local | ||
| 50 | shared secret as inputs to the authentication procedure | ||
| 51 | specified in Section 6.3. If authentication fails, then | ||
| 52 | the packet is discarded. If the authentication is successful, | ||
| 53 | the COOKIE-ECHO and all the chunks after the COOKIE-ECHO | ||
| 54 | MUST be processed. If the receiver has an STCB, it MUST | ||
| 55 | process the AUTH chunk as described above using the STCB | ||
| 56 | from the existing association to authenticate the | ||
| 57 | COOKIE-ECHO chunk and all the chunks after it. [...] | ||
| 58 | |||
| 59 | Commit bbd0d59809f9 introduced the possibility to receive | ||
| 60 | and verification of AUTH chunk, including the edge case for | ||
| 61 | authenticated COOKIE-ECHO. On reception of COOKIE-ECHO, | ||
| 62 | the function sctp_sf_do_5_1D_ce() handles processing, | ||
| 63 | unpacks and creates a new association if it passed sanity | ||
| 64 | checks and also tests for authentication chunks being | ||
| 65 | present. After a new association has been processed, it | ||
| 66 | invokes sctp_process_init() on the new association and | ||
| 67 | walks through the parameter list it received from the INIT | ||
| 68 | chunk. It checks SCTP_PARAM_RANDOM, SCTP_PARAM_HMAC_ALGO | ||
| 69 | and SCTP_PARAM_CHUNKS, and copies them into asoc->peer | ||
| 70 | meta data (peer_random, peer_hmacs, peer_chunks) in case | ||
| 71 | sysctl -w net.sctp.auth_enable=1 is set. If in INIT's | ||
| 72 | SCTP_PARAM_SUPPORTED_EXT parameter SCTP_CID_AUTH is set, | ||
| 73 | peer_random != NULL and peer_hmacs != NULL the peer is to be | ||
| 74 | assumed asoc->peer.auth_capable=1, in any other case | ||
| 75 | asoc->peer.auth_capable=0. | ||
| 76 | |||
| 77 | Now, if in sctp_sf_do_5_1D_ce() chunk->auth_chunk is | ||
| 78 | available, we set up a fake auth chunk and pass that on to | ||
| 79 | sctp_sf_authenticate(), which at latest in | ||
| 80 | sctp_auth_calculate_hmac() reliably dereferences a NULL pointer | ||
| 81 | at position 0..0008 when setting up the crypto key in | ||
| 82 | crypto_hash_setkey() by using asoc->asoc_shared_key that is | ||
| 83 | NULL as condition key_id == asoc->active_key_id is true if | ||
| 84 | the AUTH chunk was injected correctly from remote. This | ||
| 85 | happens no matter what net.sctp.auth_enable sysctl says. | ||
| 86 | |||
| 87 | The fix is to check for net->sctp.auth_enable and for | ||
| 88 | asoc->peer.auth_capable before doing any operations like | ||
| 89 | sctp_sf_authenticate() as no key is activated in | ||
| 90 | sctp_auth_asoc_init_active_key() for each case. | ||
| 91 | |||
| 92 | Now as RFC4895 section 6.3 states that if the used HMAC-ALGO | ||
| 93 | passed from the INIT chunk was not used in the AUTH chunk, we | ||
| 94 | SHOULD send an error; however in this case it would be better | ||
| 95 | to just silently discard such a maliciously prepared handshake | ||
| 96 | as we didn't even receive a parameter at all. Also, as our | ||
| 97 | endpoint has no shared key configured, section 6.3 says that | ||
| 98 | MUST silently discard, which we are doing from now onwards. | ||
| 99 | |||
| 100 | Before calling sctp_sf_pdiscard(), we need not only to free | ||
| 101 | the association, but also the chunk->auth_chunk skb, as | ||
| 102 | commit bbd0d59809f9 created a skb clone in that case. | ||
| 103 | |||
| 104 | I have tested this locally by using netfilter's nfqueue and | ||
| 105 | re-injecting packets into the local stack after maliciously | ||
| 106 | modifying the INIT chunk (removing RANDOM; HMAC-ALGO param) | ||
| 107 | and the SCTP packet containing the COOKIE_ECHO (injecting | ||
| 108 | AUTH chunk before COOKIE_ECHO). Fixed with this patch applied. | ||
| 109 | |||
| 110 | This fixes CVE-2014-0101 | ||
| 111 | Upstream-Status: Backport | ||
| 112 | |||
| 113 | Fixes: bbd0d59809f9 ("[SCTP]: Implement the receive and verification of AUTH chunk") | ||
| 114 | Signed-off-by: Daniel Borkmann <dborkman@redhat.com> | ||
| 115 | Cc: Vlad Yasevich <yasevich@gmail.com> | ||
| 116 | Cc: Neil Horman <nhorman@tuxdriver.com> | ||
| 117 | Acked-by: Vlad Yasevich <vyasevich@gmail.com> | ||
| 118 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
| 119 | Signed-off-by: Jiri Slaby <jslaby@suse.cz> | ||
| 120 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
| 121 | --- | ||
| 122 | net/sctp/sm_statefuns.c | 7 +++++++ | ||
| 123 | 1 file changed, 7 insertions(+) | ||
| 124 | |||
| 125 | diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c | ||
| 126 | index dfe3f36..56ebe71 100644 | ||
| 127 | --- a/net/sctp/sm_statefuns.c | ||
| 128 | +++ b/net/sctp/sm_statefuns.c | ||
| 129 | @@ -768,6 +768,13 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, | ||
| 130 | return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | ||
| 131 | } | ||
| 132 | |||
| 133 | + /* Make sure that we and the peer are AUTH capable */ | ||
| 134 | + if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) { | ||
| 135 | + kfree_skb(chunk->auth_chunk); | ||
| 136 | + sctp_association_free(new_asoc); | ||
| 137 | + return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | /* set-up our fake chunk so that we can process it */ | ||
| 141 | auth.skb = chunk->auth_chunk; | ||
| 142 | auth.asoc = chunk->asoc; | ||
| 143 | -- | ||
| 144 | 1.9.1 | ||
| 145 | |||
diff --git a/recipes-kernel/linux/linux-qoriq/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch b/recipes-kernel/linux/linux-qoriq/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch deleted file mode 100644 index 47f13c71d..000000000 --- a/recipes-kernel/linux/linux-qoriq/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Behan Webster <behanw@converseincode.com> | ||
| 3 | Date: Wed, 24 Sep 2014 01:06:46 +0100 | ||
| 4 | Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h | ||
| 5 | |||
| 6 | With compilers which follow the C99 standard (like modern versions of gcc and | ||
| 7 | clang), "extern inline" does the wrong thing (emits code for an externally | ||
| 8 | linkable version of the inline function). In this case using static inline | ||
| 9 | and removing the NULL version of return_address in return_address.c does | ||
| 10 | the right thing. | ||
| 11 | |||
| 12 | Signed-off-by: Behan Webster <behanw@converseincode.com> | ||
| 13 | Reviewed-by: Mark Charlebois <charlebm@gmail.com> | ||
| 14 | Acked-by: Steven Rostedt <rostedt@goodmis.org> | ||
| 15 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
| 16 | |||
| 17 | diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h | ||
| 18 | index 39eb16b..bfe2a2f 100644 | ||
| 19 | --- a/arch/arm/include/asm/ftrace.h | ||
| 20 | +++ b/arch/arm/include/asm/ftrace.h | ||
| 21 | @@ -45,7 +45,7 @@ void *return_address(unsigned int); | ||
| 22 | |||
| 23 | #else | ||
| 24 | |||
| 25 | -extern inline void *return_address(unsigned int level) | ||
| 26 | +static inline void *return_address(unsigned int level) | ||
| 27 | { | ||
| 28 | return NULL; | ||
| 29 | } | ||
| 30 | diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c | ||
| 31 | index fafedd8..f6aa84d 100644 | ||
| 32 | --- a/arch/arm/kernel/return_address.c | ||
| 33 | +++ b/arch/arm/kernel/return_address.c | ||
| 34 | @@ -63,11 +63,6 @@ void *return_address(unsigned int level) | ||
| 35 | #warning "TODO: return_address should use unwind tables" | ||
| 36 | #endif | ||
| 37 | |||
| 38 | -void *return_address(unsigned int level) | ||
| 39 | -{ | ||
| 40 | - return NULL; | ||
| 41 | -} | ||
| 42 | - | ||
| 43 | #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */ | ||
| 44 | |||
| 45 | EXPORT_SYMBOL_GPL(return_address); | ||
| 46 | -- | ||
| 47 | cgit v0.10.2 | ||
| 48 | |||
diff --git a/recipes-kernel/linux/linux-qoriq/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch b/recipes-kernel/linux/linux-qoriq/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch deleted file mode 100644 index 0ab03fb9d..000000000 --- a/recipes-kernel/linux/linux-qoriq/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | From a2561791169351cbf1ac5ca0c4299a0eef7eca65 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Behan Webster <behanw@converseincode.com> | ||
| 3 | Date: Tue, 3 Sep 2013 22:27:26 -0400 | ||
| 4 | Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in | ||
| 5 | glue-cache.h | ||
| 6 | |||
| 7 | With compilers which follow the C99 standard (like modern versions of gcc and | ||
| 8 | clang), "extern inline" does the wrong thing (emits code for an externally | ||
| 9 | linkable version of the inline function). "static inline" is the correct choice | ||
| 10 | instead. | ||
| 11 | |||
| 12 | Author: Behan Webster <behanw@converseincode.com> | ||
| 13 | Signed-off-by: Behan Webster <behanw@converseincode.com> | ||
| 14 | Reviewed-by: Mark Charlebois <charlebm@gmail.com> | ||
| 15 | --- | ||
| 16 | arch/arm/include/asm/glue-cache.h | 22 +++++++++++----------- | ||
| 17 | 1 file changed, 11 insertions(+), 11 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h | ||
| 20 | index c81adc0..a3c24cd 100644 | ||
| 21 | --- a/arch/arm/include/asm/glue-cache.h | ||
| 22 | +++ b/arch/arm/include/asm/glue-cache.h | ||
| 23 | @@ -130,22 +130,22 @@ | ||
| 24 | #endif | ||
| 25 | |||
| 26 | #ifndef __ASSEMBLER__ | ||
| 27 | -extern inline void nop_flush_icache_all(void) { } | ||
| 28 | -extern inline void nop_flush_kern_cache_all(void) { } | ||
| 29 | -extern inline void nop_flush_kern_cache_louis(void) { } | ||
| 30 | -extern inline void nop_flush_user_cache_all(void) { } | ||
| 31 | -extern inline void nop_flush_user_cache_range(unsigned long a, | ||
| 32 | +static inline void nop_flush_icache_all(void) { } | ||
| 33 | +static inline void nop_flush_kern_cache_all(void) { } | ||
| 34 | +static inline void nop_flush_kern_cache_louis(void) { } | ||
| 35 | +static inline void nop_flush_user_cache_all(void) { } | ||
| 36 | +static inline void nop_flush_user_cache_range(unsigned long a, | ||
| 37 | unsigned long b, unsigned int c) { } | ||
| 38 | |||
| 39 | -extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { } | ||
| 40 | -extern inline int nop_coherent_user_range(unsigned long a, | ||
| 41 | +static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { } | ||
| 42 | +static inline int nop_coherent_user_range(unsigned long a, | ||
| 43 | unsigned long b) { return 0; } | ||
| 44 | -extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { } | ||
| 45 | +static inline void nop_flush_kern_dcache_area(void *a, size_t s) { } | ||
| 46 | |||
| 47 | -extern inline void nop_dma_flush_range(const void *a, const void *b) { } | ||
| 48 | +static inline void nop_dma_flush_range(const void *a, const void *b) { } | ||
| 49 | |||
| 50 | -extern inline void nop_dma_map_area(const void *s, size_t l, int f) { } | ||
| 51 | -extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { } | ||
| 52 | +static inline void nop_dma_map_area(const void *s, size_t l, int f) { } | ||
| 53 | +static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { } | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #ifndef MULTI_CACHE | ||
| 57 | -- | ||
| 58 | 2.1.4 | ||
| 59 | |||
diff --git a/recipes-kernel/linux/linux-qoriq/0001-powerpc-Align-TOC-to-256-bytes.patch b/recipes-kernel/linux/linux-qoriq/0001-powerpc-Align-TOC-to-256-bytes.patch deleted file mode 100644 index 2131c9d5a..000000000 --- a/recipes-kernel/linux/linux-qoriq/0001-powerpc-Align-TOC-to-256-bytes.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | From 7d4d16a6ccdd6d965b84284262a67d5b63426d50 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
| 3 | Date: Mon, 9 Nov 2015 04:36:29 -0600 | ||
| 4 | Subject: [PATCH] powerpc: Align TOC to 256 bytes | ||
| 5 | |||
| 6 | Recent toolchains(gcc-5.2) force the TOC to be 256 byte aligned. We need | ||
| 7 | to enforce this alignment in our linker script, otherwise pointers | ||
| 8 | to our TOC variables (__toc_start, __prom_init_toc_start) could | ||
| 9 | be incorrect. | ||
| 10 | |||
| 11 | If they are bad, we die a few hundred instructions into boot. | ||
| 12 | |||
| 13 | Upstream-Status: Backport | ||
| 14 | |||
| 15 | Backport from https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5e95235 | ||
| 16 | |||
| 17 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
| 18 | --- | ||
| 19 | arch/powerpc/kernel/vmlinux.lds.S | 2 ++ | ||
| 20 | 1 file changed, 2 insertions(+) | ||
| 21 | |||
| 22 | diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S | ||
| 23 | index f096e72..3266864 100644 | ||
| 24 | --- a/arch/powerpc/kernel/vmlinux.lds.S | ||
| 25 | +++ b/arch/powerpc/kernel/vmlinux.lds.S | ||
| 26 | @@ -213,6 +213,8 @@ SECTIONS | ||
| 27 | *(.opd) | ||
| 28 | } | ||
| 29 | |||
| 30 | + . = ALIGN(256); | ||
| 31 | + | ||
| 32 | .got : AT(ADDR(.got) - LOAD_OFFSET) { | ||
| 33 | __toc_start = .; | ||
| 34 | #ifndef CONFIG_RELOCATABLE | ||
| 35 | -- | ||
| 36 | 2.3.3 | ||
| 37 | |||
diff --git a/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch b/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch index 6d067764d..161bada62 100644 --- a/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch +++ b/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch | |||
| @@ -4,24 +4,10 @@ Date: Thu, 8 Oct 2015 22:48:22 -0500 | |||
| 4 | Subject: [PATCH] use static inline in ARM lifeboot.h | 4 | Subject: [PATCH] use static inline in ARM lifeboot.h |
| 5 | 5 | ||
| 6 | --- | 6 | --- |
| 7 | drivers/input/mouse/lifebook.h | 2 +- | ||
| 8 | drivers/input/mouse/sentelic.h | 2 +- | 7 | drivers/input/mouse/sentelic.h | 2 +- |
| 9 | drivers/input/mouse/trackpoint.h | 2 +- | 8 | drivers/input/mouse/trackpoint.h | 2 +- |
| 10 | 3 files changed, 3 insertions(+), 3 deletions(-) | 9 | 2 files changed, 2 insertions(+), 2 deletions(-) |
| 11 | 10 | ||
| 12 | diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h | ||
| 13 | index 4c4326c..e4c2453 100644 | ||
| 14 | --- a/drivers/input/mouse/lifebook.h | ||
| 15 | +++ b/drivers/input/mouse/lifebook.h | ||
| 16 | @@ -19,7 +19,7 @@ int lifebook_init(struct psmouse *psmouse); | ||
| 17 | inline void lifebook_module_init(void) | ||
| 18 | { | ||
| 19 | } | ||
| 20 | -inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) | ||
| 21 | +static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) | ||
| 22 | { | ||
| 23 | return -ENOSYS; | ||
| 24 | } | ||
| 25 | diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h | 11 | diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h |
| 26 | index aa697ec..9e69e94 100644 | 12 | index aa697ec..9e69e94 100644 |
| 27 | --- a/drivers/input/mouse/sentelic.h | 13 | --- a/drivers/input/mouse/sentelic.h |
diff --git a/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch b/recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch index 7d109edb5..7d109edb5 100644 --- a/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch +++ b/recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch | |||
diff --git a/recipes-kernel/linux/linux-qoriq/module-remove-MODULE_GENERIC_TABLE.patch b/recipes-kernel/linux/linux-qoriq/module-remove-MODULE_GENERIC_TABLE.patch deleted file mode 100644 index 5a671559f..000000000 --- a/recipes-kernel/linux/linux-qoriq/module-remove-MODULE_GENERIC_TABLE.patch +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | module: remove MODULE_GENERIC_TABLE | ||
| 2 | |||
| 3 | MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the | ||
| 4 | work directly. This also removes a wart introduced in the last patch, | ||
| 5 | where the alias is defined to be an unknown struct type "struct | ||
| 6 | type##__##name##_device_id" instead of "struct type##_device_id" (it's | ||
| 7 | an extern so GCC doesn't care, but it's wrong). | ||
| 8 | |||
| 9 | The other user of MODULE_GENERIC_TABLE (ISAPNP_CARD_TABLE) is unused, | ||
| 10 | so delete it. | ||
| 11 | |||
| 12 | <Backport from cff26a51da5d206d3baf871e75778da44710219d> | ||
| 13 | |||
| 14 | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> | ||
| 15 | Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com> | ||
| 16 | |||
| 17 | Upstream-Status: Backport | ||
| 18 | --- | ||
| 19 | include/linux/isapnp.h | 4 ---- | ||
| 20 | include/linux/module.h | 19 ++++++++----------- | ||
| 21 | 2 files changed, 8 insertions(+), 15 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h | ||
| 24 | index e2d28b0..3c77bf9 100644 | ||
| 25 | --- a/include/linux/isapnp.h | ||
| 26 | +++ b/include/linux/isapnp.h | ||
| 27 | @@ -56,10 +56,6 @@ | ||
| 28 | #define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \ | ||
| 29 | { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) } | ||
| 30 | |||
| 31 | -/* export used IDs outside module */ | ||
| 32 | -#define ISAPNP_CARD_TABLE(name) \ | ||
| 33 | - MODULE_GENERIC_TABLE(isapnp_card, name) | ||
| 34 | - | ||
| 35 | struct isapnp_card_id { | ||
| 36 | unsigned long driver_data; /* data private to the driver */ | ||
| 37 | unsigned short card_vendor, card_device; | ||
| 38 | diff --git a/include/linux/module.h b/include/linux/module.h | ||
| 39 | index 54aef1b..a9f6812 100644 | ||
| 40 | --- a/include/linux/module.h | ||
| 41 | +++ b/include/linux/module.h | ||
| 42 | @@ -83,15 +83,6 @@ void sort_extable(struct exception_table_entry *start, | ||
| 43 | void sort_main_extable(void); | ||
| 44 | void trim_init_extable(struct module *m); | ||
| 45 | |||
| 46 | -#ifdef MODULE | ||
| 47 | -#define MODULE_GENERIC_TABLE(gtype,name) \ | ||
| 48 | -extern const struct gtype##_id __mod_##gtype##_table \ | ||
| 49 | - __attribute__ ((unused, alias(__stringify(name)))) | ||
| 50 | - | ||
| 51 | -#else /* !MODULE */ | ||
| 52 | -#define MODULE_GENERIC_TABLE(gtype,name) | ||
| 53 | -#endif | ||
| 54 | - | ||
| 55 | /* Generic info of form tag = "info" */ | ||
| 56 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) | ||
| 57 | |||
| 58 | @@ -142,8 +133,14 @@ extern const struct gtype##_id __mod_##gtype##_table \ | ||
| 59 | /* What your module does. */ | ||
| 60 | #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) | ||
| 61 | |||
| 62 | -#define MODULE_DEVICE_TABLE(type,name) \ | ||
| 63 | - MODULE_GENERIC_TABLE(type##__##name##_device, name) | ||
| 64 | +#ifdef MODULE | ||
| 65 | +/* Creates an alias so file2alias.c can find device table. */ | ||
| 66 | +#define MODULE_DEVICE_TABLE(type, name) \ | ||
| 67 | + extern const struct type##_device_id __mod_##type##__##name##_device_table \ | ||
| 68 | + __attribute__ ((unused, alias(__stringify(name)))) | ||
| 69 | +#else /* !MODULE */ | ||
| 70 | +#define MODULE_DEVICE_TABLE(type, name) | ||
| 71 | +#endif | ||
| 72 | |||
| 73 | /* Version of form [<epoch>:]<version>[-<extra-version>]. | ||
| 74 | Or for CVS/RCS ID version, everything but the number is stripped. | ||
| 75 | -- | ||
| 76 | 2.5.0 | ||
| 77 | |||
diff --git a/recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch b/recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch new file mode 100644 index 000000000..5f3220d9d --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 15895f6880829ee502f0a48412173fb452b23c0b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ting Liu <ting.liu@nxp.com> | ||
| 3 | Date: Fri, 17 Jun 2016 10:57:35 +0800 | ||
| 4 | Subject: [PATCH] only set vmpic_msi_feature if CONFIG_EPAPR_PARAVIRT defined | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Ting Liu <ting.liu@nxp.com> | ||
| 9 | --- | ||
| 10 | arch/powerpc/sysdev/fsl_msi.c | 2 ++ | ||
| 11 | 1 file changed, 2 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c | ||
| 14 | index 963661a..95d7111 100644 | ||
| 15 | --- a/arch/powerpc/sysdev/fsl_msi.c | ||
| 16 | +++ b/arch/powerpc/sysdev/fsl_msi.c | ||
| 17 | @@ -658,10 +658,12 @@ static const struct fsl_msi_feature ipic_msi_feature = { | ||
| 18 | .msiir_offset = 0x38, | ||
| 19 | }; | ||
| 20 | |||
| 21 | +#ifdef CONFIG_EPAPR_PARAVIRT | ||
| 22 | static const struct fsl_msi_feature vmpic_msi_feature = { | ||
| 23 | .fsl_pic_ip = FSL_PIC_IP_VMPIC, | ||
| 24 | .msiir_offset = 0, | ||
| 25 | }; | ||
| 26 | +#endif | ||
| 27 | |||
| 28 | static const struct of_device_id fsl_of_msi_ids[] = { | ||
| 29 | { | ||
| 30 | -- | ||
| 31 | 1.9.2 | ||
| 32 | |||
diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bb b/recipes-kernel/linux/linux-qoriq_4.1.bb index 5d892556c..d2c821f26 100644 --- a/recipes-kernel/linux/linux-qoriq_3.12.bb +++ b/recipes-kernel/linux/linux-qoriq_4.1.bb | |||
| @@ -1,33 +1,30 @@ | |||
| 1 | inherit kernel kernel-arch qoriq_build_64bit_kernel | 1 | inherit kernel qoriq_build_64bit_kernel |
| 2 | inherit fsl-kernel-localversion | 2 | inherit fsl-kernel-localversion |
| 3 | require recipes-kernel/linux/linux-dtb.inc | 3 | require recipes-kernel/linux/linux-dtb.inc |
| 4 | 4 | ||
| 5 | DESCRIPTION = "Linux kernel for Freescale platforms" | 5 | SUMMARY = "Linux Kernel for Freescale QorIQ platforms" |
| 6 | SECTION = "kernel" | ||
| 6 | LICENSE = "GPLv2" | 7 | LICENSE = "GPLv2" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
| 8 | 9 | ||
| 9 | SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=sdk-v1.9.x \ | 10 | SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=sdk-v2.0.x \ |
| 10 | file://modify-defconfig-t1040-nr-cpus.patch \ | 11 | file://modify-defconfig-t1040-nr-cpus.patch \ |
| 11 | file://net-sctp-CVE-2014-0101.patch \ | ||
| 12 | file://0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \ | ||
| 13 | file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch \ | ||
| 14 | file://0003-use-static-inline-in-ARM-lifeboot.h.patch \ | 12 | file://0003-use-static-inline-in-ARM-lifeboot.h.patch \ |
| 15 | file://0001-powerpc-Align-TOC-to-256-bytes.patch \ | ||
| 16 | file://fix-the-compile-issue-under-gcc6.patch \ | 13 | file://fix-the-compile-issue-under-gcc6.patch \ |
| 17 | file://module-remove-MODULE_GENERIC_TABLE.patch \ | 14 | file://only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch \ |
| 18 | " | 15 | " |
| 19 | SRCREV = "43cecda943a6c40a833b588801b0929e8bd48813" | 16 | SRCREV = "bd51baffc04ecc73f933aee1c3a37c8b44b889a7" |
| 20 | 17 | ||
| 21 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
| 22 | 19 | ||
| 23 | DEPENDS_append = " libgcc" | 20 | DEPENDS_append = " libgcc" |
| 24 | # not put uImage into /boot of rootfs, install kernel-image if needed | 21 | # not put Images into /boot of rootfs, install kernel-image if needed |
| 25 | RDEPENDS_kernel-base = "" | 22 | RDEPENDS_kernel-base = "" |
| 26 | 23 | ||
| 27 | KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" | 24 | KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" |
| 28 | KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" | 25 | KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" |
| 29 | |||
| 30 | KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" | 26 | KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" |
| 27 | |||
| 31 | ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" | 28 | ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" |
| 32 | ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME" | 29 | ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME" |
| 33 | 30 | ||
| @@ -38,6 +35,7 @@ DELTA_KERNEL_DEFCONFIG ?= "" | |||
| 38 | do_configure_prepend() { | 35 | do_configure_prepend() { |
| 39 | # copy desired defconfig so we pick it up for the real kernel_do_configure | 36 | # copy desired defconfig so we pick it up for the real kernel_do_configure |
| 40 | cp ${KERNEL_DEFCONFIG} .config | 37 | cp ${KERNEL_DEFCONFIG} .config |
| 38 | |||
| 41 | # add config fragments | 39 | # add config fragments |
| 42 | for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do | 40 | for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do |
| 43 | if [ -f "${deltacfg}" ]; then | 41 | if [ -f "${deltacfg}" ]; then |
| @@ -63,6 +61,4 @@ do_deploy_append_qoriq-arm() { | |||
| 63 | } | 61 | } |
| 64 | 62 | ||
| 65 | FILES_kernel-image += "/boot/zImage*" | 63 | FILES_kernel-image += "/boot/zImage*" |
| 66 | |||
| 67 | # make everything compatible for the time being | ||
| 68 | COMPATIBLE_MACHINE = "(qoriq)" | 64 | COMPATIBLE_MACHINE = "(qoriq)" |
