From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Mon, 9 Feb 2015 11:27:02 +0100 Subject: [U-Boot] [RFC PATCH] dm: Add support for all targets which requires MANUAL_RELOC In-Reply-To: References: <0bffcc9abcb77c1f8cc27bb845370cee8e812d73.1422891117.git.michal.simek@xilinx.com> <20150203110242.452E.AA925319@jp.panasonic.com> Message-ID: <2fd4e1dbda6e426c9c47408e9098f1aa@BL2FFO11FD023.protection.gbl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 02/06/2015 06:45 AM, Simon Glass wrote: > On 4 February 2015 at 23:31, Michal Simek wrote: >> Hi, >> >> On 02/05/2015 04:07 AM, Simon Glass wrote: >>> Hi Michal, >>> >>> On 3 February 2015 at 17:40, Simon Glass wrote: >>>> Hi Michal, >>>> >>>> On 3 February 2015 at 02:11, Michal Simek wrote: >>>>> Hi Simon, >>>>> >>>>> On 02/03/2015 03:02 AM, Masahiro Yamada wrote: >>>>>> Hi. >>>>>> >>>>>> >>>>>> On Mon, 2 Feb 2015 16:57:15 -0700 >>>>>> Simon Glass wrote: >>>>>> >>>>>>> Hi Michal, >>>>>>> >>>>>>> On 2 February 2015 at 08:31, Michal Simek wrote: >>>>>>>> Targets with CONFIG_NEEDS_MANUAL_RELOC do not use REL/RELA >>>>>>>> relocation (mostly only GOT) where functions aray are not >>>>>>>> updated. This patch is fixing function pointers for DM core >>>>>>>> and serial-uclass to ensure that relocated functions are called. >>>>>>>> >>>>>>>> Signed-off-by: Michal Simek >>>>>>>> --- >>>>>>>> >>>>>>>> drivers/core/root.c | 64 ++++++++++++++++++++++++++++++++++++++++++ >>>>>>>> drivers/serial/serial-uclass.c | 16 +++++++++++ >>>>>>>> 2 files changed, 80 insertions(+) >>>>>>> >>>>>>> How long will we have to carry this patch? It seems that if we add any >>>>>>> new driver we will have to add more code like this? >>>>>> >>>>>> >>>>>> >>>>>> This patch is unfortunate. >>>>>> Can we discontinue CONFIG_NEEDS_MANUAL_RELOC some day? >>>>> >>>>> This patch (or similar one) has to be alive when we have platform >>>>> which requires CONFIG_NEEDS_MANUAL_RELOC for full u-boot. >>>>> There is an option to move to REL/RELA but the question is if >>>>> all platforms have it/support it. Unfortunately I think that >>>>> it will be in the tree for a long time. >>>>> >>>>>> >>>>>> If we use SPL, we do not have to relocate code, I think. >>>>> >>>>> SPL doesn't have relocation that's why this code is not used there. >>>> >>>> Maybe I asked this before, but when can we remove >>>> CONFIG_NEEDS_MANUAL_RELOC? What platforms need it? >>> >>> Sorry if you answered these questions but can you please resend if so >>> as I missed it. >> >> Graeme has answered it + my response here. >> http://lists.denx.de/pipermail/u-boot/2015-February/203911.html >> >> removing: When all platforms are moved to REL/RELA we can remove this >> manual reloc option. > > With a heavy heart: > > Acked-by: Simon Glass > Are you going to take this patch to your DM tree? Thanks, Michal