All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Cochran <yocto@mindchasers.com>
To: Daiane Angolini <daiane.list@gmail.com>, chun guo <b40290@freescale.com>
Cc: "meta-freescale@yoctoproject.org" <meta-freescale@yoctoproject.org>
Subject: Re: [meta-fsl-arm][PATCH] linux-ls1: Patches to fix gcc 5.2 build issues
Date: Tue, 20 Oct 2015 16:24:28 -0400	[thread overview]
Message-ID: <5626A2FC.8050006@mindchasers.com> (raw)
In-Reply-To: <CA+jg_OWCc=Kuy=T8dKXxRisLKUbTETtLQQdsWEBBXf2wUrnt9A@mail.gmail.com>

On 10/09/2015 08:36 AM, Daiane Angolini wrote:
> On Fri, Oct 9, 2015 at 2:48 AM,  <b40290@freescale.com> wrote:
>> From: Chunrong Guo <B40290@freescale.com>
>>
>> Cherry picked patches from future kernel versions to fix gcc5.2
>> build errors
>>
>> Signed-off-by: Chunrong Guo <B40290@freescale.com>
>> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> Are it a duplication mistake or are you willing to point someone else
> and forgot?
>
>
> I appreciate to see some tested-by or acked-by from people having
> problem with this kernel

Hi Daiane,

I just tested this using the linux-qoriq recipe in the meta-freescale 
repo @ https://github.com/Freescale/meta-freescale.git

Booted OK on my rev2.0 TWR board, and I can do basic things like ping 
and access my SD card.

Boot hung on my rev1.0 TWR board ( @ Starting kernel... ).


Is this as expected?  I'm not clear yet on what's needed to boot a 1.0 
SoC vs. a 2.0 SoC.  However, please note that the ls1021atwr.conf file 
specifies that the layer works with the rev1.0 TWR boards, which doesn't 
seem to be the case.

It would be good to straighten out the 1.0 vs. 2.0 issues.  I assume it 
could be handled with some customization of .config and dts files?  Any 
guidance will be appreciated.

Bob



>
> Daiane
>
>> ---
>>   recipes-kernel/linux/linux-ls1.inc                 |  6 +++
>>   ...LLVMLinux-use-static-inline-in-ARM-ftrace.patch | 48 ++++++++++++++++++
>>   ...nux-Change-extern-inline-to-static-inline.patch | 59 ++++++++++++++++++++++
>>   .../0003-use-static-inline-in-ARM-lifeboot.h.patch | 53 +++++++++++++++++++
>>   4 files changed, 166 insertions(+)
>>   create mode 100644 recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
>>   create mode 100644 recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
>>   create mode 100644 recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
>>
>> diff --git a/recipes-kernel/linux/linux-ls1.inc b/recipes-kernel/linux/linux-ls1.inc
>> index 08d88f4..971c6de 100644
>> --- a/recipes-kernel/linux/linux-ls1.inc
>> +++ b/recipes-kernel/linux/linux-ls1.inc
>> @@ -8,6 +8,12 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=${SRCBRANCH} \
>>       file://defconfig \
>>   "
>>
>> +SRC_URI += " \
>> +    file://0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \
>> +    file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch \
>> +    file://0003-use-static-inline-in-ARM-lifeboot.h.patch \
>> +"
>> +
>>   KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
>>   ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
>>
>> diff --git a/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch b/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
>> new file mode 100644
>> index 0000000..47f13c7
>> --- /dev/null
>> +++ b/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
>> @@ -0,0 +1,48 @@
>> +From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
>> +From: Behan Webster <behanw@converseincode.com>
>> +Date: Wed, 24 Sep 2014 01:06:46 +0100
>> +Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
>> +
>> +With compilers which follow the C99 standard (like modern versions of gcc and
>> +clang), "extern inline" does the wrong thing (emits code for an externally
>> +linkable version of the inline function). In this case using static inline
>> +and removing the NULL version of return_address in return_address.c does
>> +the right thing.
>> +
>> +Signed-off-by: Behan Webster <behanw@converseincode.com>
>> +Reviewed-by: Mark Charlebois <charlebm@gmail.com>
>> +Acked-by: Steven Rostedt <rostedt@goodmis.org>
>> +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> +
>> +diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
>> +index 39eb16b..bfe2a2f 100644
>> +--- a/arch/arm/include/asm/ftrace.h
>> ++++ b/arch/arm/include/asm/ftrace.h
>> +@@ -45,7 +45,7 @@ void *return_address(unsigned int);
>> +
>> + #else
>> +
>> +-extern inline void *return_address(unsigned int level)
>> ++static inline void *return_address(unsigned int level)
>> + {
>> +       return NULL;
>> + }
>> +diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
>> +index fafedd8..f6aa84d 100644
>> +--- a/arch/arm/kernel/return_address.c
>> ++++ b/arch/arm/kernel/return_address.c
>> +@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
>> + #warning "TODO: return_address should use unwind tables"
>> + #endif
>> +
>> +-void *return_address(unsigned int level)
>> +-{
>> +-      return NULL;
>> +-}
>> +-
>> + #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
>> +
>> + EXPORT_SYMBOL_GPL(return_address);
>> +--
>> +cgit v0.10.2
>> +
>> diff --git a/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch b/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
>> new file mode 100644
>> index 0000000..0ab03fb
>> --- /dev/null
>> +++ b/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
>> @@ -0,0 +1,59 @@
>> +From a2561791169351cbf1ac5ca0c4299a0eef7eca65 Mon Sep 17 00:00:00 2001
>> +From: Behan Webster <behanw@converseincode.com>
>> +Date: Tue, 3 Sep 2013 22:27:26 -0400
>> +Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in
>> + glue-cache.h
>> +
>> +With compilers which follow the C99 standard (like modern versions of gcc and
>> +clang), "extern inline" does the wrong thing (emits code for an externally
>> +linkable version of the inline function). "static inline" is the correct choice
>> +instead.
>> +
>> +Author: Behan Webster <behanw@converseincode.com>
>> +Signed-off-by: Behan Webster <behanw@converseincode.com>
>> +Reviewed-by: Mark Charlebois <charlebm@gmail.com>
>> +---
>> + arch/arm/include/asm/glue-cache.h | 22 +++++++++++-----------
>> + 1 file changed, 11 insertions(+), 11 deletions(-)
>> +
>> +diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
>> +index c81adc0..a3c24cd 100644
>> +--- a/arch/arm/include/asm/glue-cache.h
>> ++++ b/arch/arm/include/asm/glue-cache.h
>> +@@ -130,22 +130,22 @@
>> + #endif
>> +
>> + #ifndef __ASSEMBLER__
>> +-extern inline void nop_flush_icache_all(void) { }
>> +-extern inline void nop_flush_kern_cache_all(void) { }
>> +-extern inline void nop_flush_kern_cache_louis(void) { }
>> +-extern inline void nop_flush_user_cache_all(void) { }
>> +-extern inline void nop_flush_user_cache_range(unsigned long a,
>> ++static inline void nop_flush_icache_all(void) { }
>> ++static inline void nop_flush_kern_cache_all(void) { }
>> ++static inline void nop_flush_kern_cache_louis(void) { }
>> ++static inline void nop_flush_user_cache_all(void) { }
>> ++static inline void nop_flush_user_cache_range(unsigned long a,
>> +               unsigned long b, unsigned int c) { }
>> +
>> +-extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
>> +-extern inline int nop_coherent_user_range(unsigned long a,
>> ++static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
>> ++static inline int nop_coherent_user_range(unsigned long a,
>> +               unsigned long b) { return 0; }
>> +-extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
>> ++static inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
>> +
>> +-extern inline void nop_dma_flush_range(const void *a, const void *b) { }
>> ++static inline void nop_dma_flush_range(const void *a, const void *b) { }
>> +
>> +-extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
>> +-extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
>> ++static inline void nop_dma_map_area(const void *s, size_t l, int f) { }
>> ++static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
>> + #endif
>> +
>> + #ifndef MULTI_CACHE
>> +--
>> +2.1.4
>> +
>> diff --git a/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch b/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
>> new file mode 100644
>> index 0000000..6d06776
>> --- /dev/null
>> +++ b/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
>> @@ -0,0 +1,53 @@
>> +From 16b34c08f43c6e65f21a8cab536c497edb6c886e Mon Sep 17 00:00:00 2001
>> +From: Chunrong Guo <B40290@freescale.com>
>> +Date: Thu, 8 Oct 2015 22:48:22 -0500
>> +Subject: [PATCH] use static inline in ARM lifeboot.h
>> +
>> +---
>> + drivers/input/mouse/lifebook.h   | 2 +-
>> + drivers/input/mouse/sentelic.h   | 2 +-
>> + drivers/input/mouse/trackpoint.h | 2 +-
>> + 3 files changed, 3 insertions(+), 3 deletions(-)
>> +
>> +diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h
>> +index 4c4326c..e4c2453 100644
>> +--- a/drivers/input/mouse/lifebook.h
>> ++++ b/drivers/input/mouse/lifebook.h
>> +@@ -19,7 +19,7 @@ int lifebook_init(struct psmouse *psmouse);
>> + inline void lifebook_module_init(void)
>> + {
>> + }
>> +-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
>> ++static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
>> + {
>> +       return -ENOSYS;
>> + }
>> +diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
>> +index aa697ec..9e69e94 100644
>> +--- a/drivers/input/mouse/sentelic.h
>> ++++ b/drivers/input/mouse/sentelic.h
>> +@@ -123,7 +123,7 @@ struct fsp_data {
>> + extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
>> + extern int fsp_init(struct psmouse *psmouse);
>> + #else
>> +-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
>> ++static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
>> + {
>> +       return -ENOSYS;
>> + }
>> +diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
>> +index ecd0547..693735c 100644
>> +--- a/drivers/input/mouse/trackpoint.h
>> ++++ b/drivers/input/mouse/trackpoint.h
>> +@@ -147,7 +147,7 @@ struct trackpoint_data
>> + #ifdef CONFIG_MOUSE_PS2_TRACKPOINT
>> + int trackpoint_detect(struct psmouse *psmouse, bool set_properties);
>> + #else
>> +-inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
>> ++static inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
>> + {
>> +       return -ENOSYS;
>> + }
>> +--
>> +2.3.3
>> +
>> --
>> 2.3.3
>>
>> --
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale



  reply	other threads:[~2015-10-20 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09  5:48 [meta-fsl-arm][PATCH] linux-ls1: Patches to fix gcc 5.2 build issues b40290
2015-10-09 12:36 ` Daiane Angolini
2015-10-20 20:24   ` Bob Cochran [this message]
2015-10-20 23:30     ` Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5626A2FC.8050006@mindchasers.com \
    --to=yocto@mindchasers.com \
    --cc=b40290@freescale.com \
    --cc=daiane.list@gmail.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.