1. 19 10月, 2015 1 次提交
    • M
      powerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU · bed08b7e
      Michael Ellerman 提交于
      The TUNE_CELL option allows you to build a kernel that runs on multiple
      CPUs but is tuned (ie. optimised) to run on Cell CPUs. Now days no one
      is building a distro in that fashion, and any users who are building
      custom kernels for their Cell machines are better off building with
      CONFIG_CELL_CPU, which builds a kernel that only runs on Cell and
      therefore can be optimised even more aggresively.
      
      Dropping the option also avoids confusing other users, who are presented
      with an option to tune for Cell when they are not building for a Cell
      CPU at all.
      Suggested-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      bed08b7e
  2. 01 10月, 2015 1 次提交
  3. 04 9月, 2015 1 次提交
  4. 08 8月, 2015 1 次提交
    • S
      powerpc/85xx: Use kconfig fragments · 44d54014
      Scott Wood 提交于
      Unify mpc85xx and corenet configs using fragments, to ease maintenance
      and avoid the sort of drift that the previous patch fixed.
      
      Hardware and software options are separated, with the hope that other
      embedded platforms could share the software options, and to make it
      easier to maintain custom/alternate configs that focus on either
      hardware or software options.
      
      Due to the previous patch, this patch should not affect the results of
      any of the affected defconfigs -- only how those results are achieved.
      The resulting config is more or less the union of the options that any
      of the configs previously selected.  No attempt was made in this (or
      the previous) patch to edit out questionable options, but this patch
      will make it easier to do so in future patches.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      44d54014
  5. 11 6月, 2015 3 次提交
  6. 02 6月, 2015 1 次提交
    • C
      powerpc/configs: Replace pseries_le_defconfig with a Makefile target using merge_config · ea4d1a87
      Cyril Bur 提交于
      Rather than continuing to maintain a copy of pseries_defconfig with
      CONFIG_CPU_LITTLE_ENDIAN enabled, use the generic merge_config script
      and use an le.config to enable little endian on top of pseries_defconfig
      without the need for a duplicated _defconfig file.
      
      This method will require less maintenance in the future and will ensure
      that both 'defconfigs' are always in sync.
      
      It is worth noting that the seemingly more simple approach of:
      
        pseries_le_defconfig: pseries_defconfig
        	$(Q)$(MAKE) le.config
      
      Will not work when building using O=builddir.
      
      The obvious fix to that:
      
        pseries_le_defconfig:
        	$(Q)$(MAKE) -f $(srctree)/Makefile pseries_defconfig le.config
      
      Also does not work. This is because if we have for example:
      
      config FOO
      	depends on CPU_BIG_ENDIAN
      	select BAR
      
      Then BAR will be enabled by the first call to kconfig (via
      pseries_defconfig), and then will remain enabled after we merge
      le.config, even though FOO will have been turned off.
      
      The solution is to ensure to only invoke the kconfig logic once, after
      we have merged all the config fragments. This ensures nothing is
      select'ed on that should then be disabled by the later merged configs.
      This is done through the explicit call to make olddefconfig
      Signed-off-by: NCyril Bur <cyrilbur@gmail.com>
      Reviewed-by: NSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
      [mpe: Massage change log, fix white space and use ARCH not SRCARCH]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ea4d1a87
  7. 11 5月, 2015 2 次提交
    • M
      powerpc: Reject binutils 2.24 when building little endian · 60e065f7
      Michael Ellerman 提交于
      There is a bug in binutils 2.24 which causes miscompilation if we're
      building little endian and using weak symbols (which the kernel does).
      
      It is fixed in binutils commit 57fa7b8c7e59 "Correct elf_merge_st_other
      arguments for weak symbols", which is in binutils 2.25 and has been
      backported to the binutils 2.24 branch and has been picked up by most
      distros it seems.
      
      However if we're running stock 2.24 (no extra version) then the bug is
      present, so check for that and bail.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      60e065f7
    • M
      powerpc: Don't do gcc version checks if we're building with clang · e79c8385
      Michael Ellerman 提交于
      We have several checks for bad gcc versions in our Makefile. These don't
      apply if we're building with clang, so skip them in that case.
      
      The obvious check would be for ${COMPILER} = "gcc", but because of the
      way the logic in the top level Makefile conditionally sets COMPILER,
      it's possible that we're building with gcc but COMPILER was not set.
      
      So instead check for ${COMPILER} != "clang", which we know is currently
      the only other possibility.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e79c8385
  8. 23 3月, 2015 1 次提交
  9. 10 1月, 2015 1 次提交
  10. 25 9月, 2014 1 次提交
  11. 28 5月, 2014 1 次提交
    • G
      powerpc: Fix 64 bit builds with binutils 2.24 · 7998eb3d
      Guenter Roeck 提交于
      With binutils 2.24, various 64 bit builds fail with relocation errors
      such as
      
      arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
      	(.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI
      	against symbol `interrupt_base_book3e' defined in .text section
      	in arch/powerpc/kernel/built-in.o
      arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
      	(.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI
      	against symbol `interrupt_end_book3e' defined in .text section
      	in arch/powerpc/kernel/built-in.o
      
      The assembler maintainer says:
      
       I changed the ABI, something that had to be done but unfortunately
       happens to break the booke kernel code.  When building up a 64-bit
       value with lis, ori, shl, oris, ori or similar sequences, you now
       should use @high and @higha in place of @h and @ha.  @h and @ha
       (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA)
       now report overflow if the value is out of 32-bit signed range.
       ie. @h and @ha assume you're building a 32-bit value. This is needed
       to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h
       and @toc@ha expressions, and for consistency I did the same for all
       other @h and @ha relocs.
      
      Replacing @h with @high in one strategic location fixes the relocation
      errors. This has to be done conditionally since the assembler either
      supports @h or @high but not both.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7998eb3d
  12. 01 5月, 2014 1 次提交
  13. 23 4月, 2014 2 次提交
  14. 09 4月, 2014 1 次提交
  15. 25 11月, 2013 1 次提交
    • M
      powerpc: Fix error when cross building TAGS & cscope · 924dd50b
      Michael Neuling 提交于
      Currently if I cross build TAGS or cscope from x86 I get this:
        % make ARCH=powerpc TAGS
        gcc-4.8.real: error: unrecognized command line option ‘-mbig-endian’
        GEN     TAGS
        %
      
      I'm not setting CROSS_COMPILE= as logically I shouldn't need to and I
      haven't needed to in the past when building TAGS or cscope.  Also, the
      above completess correct as the error is not fatal to the build.
      
      This was caused by:
          commit d72b0801
          Author: Ian Munsie <imunsie@au1.ibm.com>
          powerpc: Add ability to build little endian kernels
      
      The below fixes this by testing for the -mbig-endian option before
      adding it.
      
      I've not done the same thing in the little endian case as if
      -mlittle-endian doesn't exist, we probably want to fail quickly as you
      probably have an old big endian compiler.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      924dd50b
  16. 23 11月, 2013 1 次提交
    • T
      powerpc/corenet64: compile with CONFIG_E{5,6}500_CPU well · cbf8a358
      Tiejun Chen 提交于
      If CONFIG_ALTIVEC is enabled for CoreNet64, and if we also
      select CONFIG_E{5,6}500_CPU this may introduce -mcpu=e500mc64
      into $CFLAGS. But Altivec option not allowed with e500mc64,
      then some compiling errors occur like this:
      
            CC      arch/powerpc/lib/xor_vmx.o
          arch/powerpc/lib/xor_vmx.c:1:0: error: AltiVec not supported in this target
          make[1]: *** [arch/powerpc/lib/xor_vmx.o] Error 1
          make: *** [arch/powerpc/lib] Error 2
      
      So we should restrict e500mc64 in altivec scenario.
      Signed-off-by: NTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      cbf8a358
  17. 21 11月, 2013 1 次提交
  18. 11 10月, 2013 3 次提交
  19. 21 8月, 2013 3 次提交
  20. 14 8月, 2013 1 次提交
  21. 08 8月, 2013 1 次提交
  22. 10 1月, 2013 4 次提交
    • A
      powerpc: Avoid load of static chain register when calling nested functions... · 98679fb0
      Anton Blanchard 提交于
      powerpc: Avoid load of static chain register when calling nested functions through a pointer on 64bit
      
      The ppc64 ABI has a static chain register (r11) which is only used
      when calling nested functions through a pointer. Considering that
      we take a dim view of nested functions in the kernel, we have a lot
      of unnecessary overhead here.
      
      gcc 4.7 has an option to disable loading of r11 so lets use it.
      
      If hell freezes over and hipsters manage to litter the kernel
      with nested functions, gcc will give us an error message and
      won't simply compile bad code:
      
          You cannot take the address of a nested function if you use
          the -mno-pointers-to-nested-functions option.
      
      Furthermore our kernel module trampolines don't setup the static
      chain register so adding this option and forcing gcc to error out
      makes even more sense.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      98679fb0
    • A
      powerpc: Build kernel with -mcmodel=medium · 1fbe9cf2
      Anton Blanchard 提交于
      Finally remove the two level TOC and build with -mcmodel=medium.
      
      Unfortunately we can't build modules with -mcmodel=medium due to
      the tricks the kernel module loader plays with percpu data:
      
      # -mcmodel=medium breaks modules because it uses 32bit offsets from
      # the TOC pointer to create pointers where possible. Pointers into the
      # percpu data area are created by this method.
      #
      # The kernel module loader relocates the percpu data section from the
      # original location (starting with 0xd...) to somewhere in the base
      # kernel percpu data space (starting with 0xc...). We need a full
      # 64bit relocation for this to work, hence -mcmodel=large.
      
      On older kernels we fall back to the two level TOC (-mminimal-toc)
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1fbe9cf2
    • A
      powerpc: Relocate prom_init.c on 64bit · 5ac47f7a
      Anton Blanchard 提交于
      The ppc64 kernel can get loaded at any address which means
      our very early init code in prom_init.c must be relocatable. We do
      this with a pretty nasty RELOC() macro that we wrap accesses of
      variables with. It is very fragile and sometimes we forget to add a
      RELOC() to an uncommon path or sometimes a compiler change breaks it.
      
      32bit has a much more elegant solution where we build prom_init.c
      with -mrelocatable and then process the relocations manually.
      Unfortunately we can't do the equivalent on 64bit and we would
      have to build the entire kernel relocatable (-pie), resulting in a
      large increase in kernel footprint (megabytes of relocation data).
      The relocation data will be marked __initdata but it still creates
      more pressure on our already tight memory layout at boot.
      
      Alan Modra pointed out that the 64bit ABI is relocatable even
      if we don't build with -pie, we just need to relocate the TOC.
      This patch implements that idea and relocates the TOC entries of
      prom_init.c. An added bonus is there are very few relocations to
      process which helps keep boot times on simulators down.
      
      gcc does not put 64bit integer constants into the TOC but to be
      safe we may want a build time script which passes through the
      prom_init.c TOC entries to make sure everything looks reasonable.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5ac47f7a
    • M
      powerpc: Add a powerpc implementation of SHA-1 · 323a6bf1
      Michael Ellerman 提交于
      This patch adds a crypto driver which provides a powerpc accelerated
      implementation of SHA-1, accelerated in that it is written in asm.
      
      Original patch by Paul, minor fixups for upstream by moi.
      
      Lightly tested on 64-bit with the test program here:
      
       http://michael.ellerman.id.au/files/junkcode/sha1test.c
      
      Seems to work, and is "not slower" than the generic version.
      
      Needs testing on 32-bit.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      323a6bf1
  23. 15 11月, 2012 1 次提交
    • M
      powerpc: dtc is required to build dtb files · 8662d0bc
      Matthew McClintock 提交于
      Fixes this following:
      
      $ make distclean; make corenet32_smp_defconfig; make p4080ds.dtb
        CLEAN   arch/powerpc/boot
        CLEAN   scripts/basic
        CLEAN   scripts/dtc
        CLEAN   scripts/genksyms
        CLEAN   scripts/kconfig
        CLEAN   scripts/mod
        CLEAN   scripts
        CLEAN   include/config include/generated
        CLEAN   .config
        HOSTCC  scripts/basic/fixdep
        HOSTCC  scripts/kconfig/conf.o
        SHIPPED scripts/kconfig/zconf.tab.c
        SHIPPED scripts/kconfig/zconf.lex.c
        SHIPPED scripts/kconfig/zconf.hash.c
        HOSTCC  scripts/kconfig/zconf.tab.o
        HOSTLD  scripts/kconfig/conf
      scripts/kconfig/conf --silentoldconfig Kconfig
        DTC     arch/powerpc/boot/p4080ds.dtb
      /bin/sh: /local/home/mattsm/git/linux/scripts/dtc/dtc: No such file or directory
      make[1]: *** [arch/powerpc/boot/p4080ds.dtb] Error 1
      make: *** [p4080ds.dtb] Error 2
      Signed-off-by: NMatthew McClintock <msm@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8662d0bc
  24. 27 6月, 2012 1 次提交
  25. 16 5月, 2012 1 次提交
  26. 30 4月, 2012 3 次提交
  27. 23 2月, 2012 1 次提交