diff mbox

[2/5] ARM: Makefile: Generalize qcom platform text offset

Message ID 20170118232726.22876-3-sboyd@codeaurora.org (mailing list archive)
State New, archived
Headers show

Commit Message

Stephen Boyd Jan. 18, 2017, 11:27 p.m. UTC
Some qcom platforms need a specific text offset because the first
2MB of memory is reserved for shared memory. Let's just always
shift the text segment up by 2MB when ARCH_QCOM is selected so
that we don't have to specify the specific platforms that exhibit
this problem in Kconfig.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 arch/arm/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Russell King (Oracle) Jan. 18, 2017, 11:31 p.m. UTC | #1
On Wed, Jan 18, 2017 at 03:27:23PM -0800, Stephen Boyd wrote:
> Some qcom platforms need a specific text offset because the first
> 2MB of memory is reserved for shared memory. Let's just always
> shift the text segment up by 2MB when ARCH_QCOM is selected so
> that we don't have to specify the specific platforms that exhibit
> this problem in Kconfig.

I was really hoping that this sillyness would stop, but I guess
expecting it to stop is asking too much...

Is there really no other option?
Stephen Boyd Jan. 18, 2017, 11:51 p.m. UTC | #2
On 01/18, Russell King - ARM Linux wrote:
> On Wed, Jan 18, 2017 at 03:27:23PM -0800, Stephen Boyd wrote:
> > Some qcom platforms need a specific text offset because the first
> > 2MB of memory is reserved for shared memory. Let's just always
> > shift the text segment up by 2MB when ARCH_QCOM is selected so
> > that we don't have to specify the specific platforms that exhibit
> > this problem in Kconfig.
> 
> I was really hoping that this sillyness would stop, but I guess
> expecting it to stop is asking too much...
> 
> Is there really no other option?
> 

The only other option is to make up some qcom specific config
like I_HAVE_A_QCOM_SOC_THAT_NEEDS_2MB_OFFSET that can be selected
when the configurator (not a word) knows that they are using that
SoC.

Overall, this practice has stopped inside the company over 3
years ago and has not continued as far as I know. This patch is
just taking the easy way out and forcing ARCH_QCOM to always do
the shift.
diff mbox

Patch

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index ab30cc634d02..8a6d344e6043 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -145,8 +145,7 @@  textofs-$(CONFIG_PM_H1940)      := 0x00108000
 ifeq ($(CONFIG_ARCH_SA1100),y)
 textofs-$(CONFIG_SA1111) := 0x00208000
 endif
-textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
-textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
+textofs-$(CONFIG_ARCH_QCOM) := 0x00208000
 textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
 
 # Machine directory name.  This list is sorted alphanumerically