1. 28 11月, 2011 1 次提交
  2. 17 11月, 2011 1 次提交
    • K
      powerpc: Remove buggy 9-year-old test for binutils < 2.12.1 · a9a8f77a
      Kyle Moffett 提交于
      Recent binutils refuses to assemble AltiVec opcodes when in e500/SPE
      mode, as some of those opcodes alias the "SPE" instructions.  This
      triggers an ancient binutils version check even when building a kernel
      with CONFIG_ALTIVEC disabled.
      
      In theory, the check could be conditionalized on CONFIG_ALTIVEC, but in
      practice it has long outlived its utility.  It is virtually impossible
      to find binutils older than 2.12.1 (released 2002) in the wild anymore.
      Even ancient RedHat Enterprise Linux 4 has binutils-2.14.
      
      To fix the kernel build when done natively on e500 systems with this new
      binutils, the test is simply removed.
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a9a8f77a
  3. 22 7月, 2011 1 次提交
    • M
      net: filter: BPF 'JIT' compiler for PPC64 · 0ca87f05
      Matt Evans 提交于
      An implementation of a code generator for BPF programs to speed up packet
      filtering on PPC64, inspired by Eric Dumazet's x86-64 version.
      
      Filter code is generated as an ABI-compliant function in module_alloc()'d mem
      with stackframe & prologue/epilogue generated if required (simple filters don't
      need anything more than an li/blr).  The filter's local variables, M[], live in
      registers.  Supports all BPF opcodes, although "complicated" loads from negative
      packet offsets (e.g. SKF_LL_OFF) are not yet supported.
      
      There are a couple of further optimisations left for future work; many-pass
      assembly with branch-reach reduction and a register allocator to push M[]
      variables into volatile registers would improve the code quality further.
      
      This currently supports big-endian 64-bit PowerPC only (but is fairly simple
      to port to PPC32 or LE!).
      
      Enabled in the same way as x86-64:
      
      	echo 1 > /proc/sys/net/core/bpf_jit_enable
      
      Or, enabled with extra debug output:
      
      	echo 2 > /proc/sys/net/core/bpf_jit_enable
      Signed-off-by: NMatt Evans <matt@ozlabs.org>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ca87f05
  4. 01 7月, 2011 1 次提交
  5. 24 8月, 2010 1 次提交
  6. 09 8月, 2010 1 次提交
  7. 03 8月, 2010 1 次提交
    • S
      kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line · 6588169d
      Sam Ravnborg 提交于
      It is now possible to assign options to AS, CC and LD
      on the command line - which is only used when building modules.
      
      {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC, LD when building modules
      without overriding the original value.
      
      Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
      that is used by arch specific files and free up
      {A,C,LD}FLAGS_MODULE so they can be assigned on
      the command line.
      
      All arch Makefiles that used the old variables has been updated.
      
      Note: Previously we had a MODFLAGS variable for both
      AS and CC. But in favour of consistency this was dropped.
      So in some cases arch Makefile has one assignmnet replaced by
      two assignmnets.
      
      Note2: MODFLAGS was not documented and is dropped
      without any notice. I do not expect much/any breakage
      from this.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      6588169d
  8. 08 7月, 2010 1 次提交
  9. 06 2月, 2010 1 次提交
  10. 24 9月, 2009 1 次提交
    • T
      powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE · 144ef909
      Tony Breeds 提交于
      When using CONFIG_RELOCATABLE, we build the kernel as a position
      independent executable. The kernel then uses a little bit of relocation
      code to relocate itself. That code only deals with R_PPC64_RELATIVE
      relocations though. If for some reason you use assembly constructs
      such as LOAD_REG_IMMEDIATE() to load the address of a symbol, you'll
      generate different kinds of relocations that won't be processed properly
      and bad things will happen. (We have 2 such bugs today).
      
      The perl script tries to filter out "known" bad ones. It's possible
      that we are missing some in the case of a weak function that nobody
      implements, we'll see if we get false positive and fix it.
      Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      144ef909
  11. 20 9月, 2009 2 次提交
    • S
      arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 · 51b563fc
      Sam Ravnborg 提交于
      Albin Tonnerre <albin.tonnerre@free-electrons.com> reported:
      
          Bash 4 filters out variables which contain a dot in them.
          This happends to be the case of CPPFLAGS_vmlinux.lds.
          This is rather unfortunate, as it now causes
          build failures when using SHELL=/bin/bash to compile,
          or when bash happens to be used by make (eg when it's /bin/sh)
      
      Remove the common definition of CPPFLAGS_vmlinux.lds by
      pushing relevant stuff to either Makefile.build or the
      arch specific kernel/Makefile where we build the linker script.
      
      This is also nice cleanup as we move the information out where
      it is used.
      
      Notes for the different architectures touched:
      
      arm - we use an already exported symbol
      cris - we use a config symbol aleady available
             [Not build tested]
      mips - the jiffies complexity has moved to vmlinux.lds.S where we need it.
             Added a few variables to CPPFLAGS - they are only used by
             the linker script.
             [Not build tested]
      powerpc - removed assignment that is not needed
                [not build tested]
      sparc - simplified it using $(BITS)
      um - introduced a few new exported variables to deal with this
      xtensa - added options to CPP invocation
               [not build tested]
      
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      51b563fc
    • S
      kbuild: use INSTALLKERNEL to select customized installkernel script · caa27b66
      Sam Ravnborg 提交于
      Replace the use of CROSS_COMPILE to select a customized
      installkernel script with the possibility to set INSTALLKERNEL
      to select a custom installkernel script when running make:
      
          make INSTALLKERNEL=arm-installkernel install
      
      With this patch we are now more consistent across
      different architectures - they did not all support use
      of CROSS_COMPILE.
      
      The use of CROSS_COMPILE was a hack as this really belongs
      to gcc/binutils and the installkernel script does not change
      just because we change toolchain.
      
      The use of CROSS_COMPILE caused troubles with an upcoming patch
      that saves CROSS_COMPILE when a kernel is built - it would no
      longer be installable.
      [Thanks to Peter Z. for this hint]
      
      This patch undos what Ian did in commit:
      
        0f8e2d62
        ("use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh")
      
      The patch has been lightly tested on x86 only - but all changes
      looks obvious.
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
      Acked-by: Russell King <linux@arm.linux.org.uk> [arm]
      Acked-by: Paul Mundt <lethal@linux-sh.org> [sh]
      Acked-by: "H. Peter Anvin" <hpa@zytor.com> [x86]
      Cc: Ian Campbell <icampbell@arcom.com>
      Cc: Tony Luck <tony.luck@intel.com> [ia64]
      Cc: Fenghua Yu <fenghua.yu@intel.com> [ia64]
      Cc: Hirokazu Takata <takata@linux-m32r.org> [m32r]
      Cc: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
      Cc: Kyle McMartin <kyle@mcmartin.ca> [parisc]
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> [powerpc]
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390]
      Cc: Thomas Gleixner <tglx@linutronix.de> [x86]
      Cc: Ingo Molnar <mingo@redhat.com> [x86]
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      caa27b66
  12. 20 8月, 2009 1 次提交
  13. 09 6月, 2009 1 次提交
  14. 11 3月, 2009 1 次提交
  15. 03 12月, 2008 1 次提交
  16. 21 10月, 2008 1 次提交
  17. 16 9月, 2008 2 次提交
    • T
      powerpc: Enforce a non-spe kernel build even on broken compilers · ce400c01
      Thiemo Seufer 提交于
      Those two are required on my fresh gcc 4.3.1.
      Signed-off-by: NThiemo Seufer <ths@linutronix.de>
      Signed-off-by: NSebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ce400c01
    • P
      powerpc: Make the 64-bit kernel as a position-independent executable · 549e8152
      Paul Mackerras 提交于
      This implements CONFIG_RELOCATABLE for 64-bit by making the kernel as
      a position-independent executable (PIE) when it is set.  This involves
      processing the dynamic relocations in the image in the early stages of
      booting, even if the kernel is being run at the address it is linked at,
      since the linker does not necessarily fill in words in the image for
      which there are dynamic relocations.  (In fact the linker does fill in
      such words for 64-bit executables, though not for 32-bit executables,
      so in principle we could avoid calling relocate() entirely when we're
      running a 64-bit kernel at the linked address.)
      
      The dynamic relocations are processed by a new function relocate(addr),
      where the addr parameter is the virtual address where the image will be
      run.  In fact we call it twice; once before calling prom_init, and again
      when starting the main kernel.  This means that reloc_offset() returns
      0 in prom_init (since it has been relocated to the address it is running
      at), which necessitated a few adjustments.
      
      This also changes __va and __pa to use an equivalent definition that is
      simpler.  With the relocatable kernel, PAGE_OFFSET and MEMORY_START are
      constants (for 64-bit) whereas PHYSICAL_START is a variable (and
      KERNELBASE ideally should be too, but isn't yet).
      
      With this, relocatable kernels still copy themselves down to physical
      address 0 and run there.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      549e8152
  18. 03 9月, 2008 1 次提交
    • T
      powerpc: Work around gcc's -fno-omit-frame-pointer bug · 7563dc64
      Tony Breeds 提交于
      This bug is causing random crashes
      (http://bugzilla.kernel.org/show_bug.cgi?id=11414).
      
      -fno-omit-frame-pointer is only needed on powerpc when -pg is also
      supplied, and there is a gcc bug that causes incorrect code generation
      on 32-bit powerpc when -fno-omit-frame-pointer is used---it uses stack
      locations below the stack pointer, which is not allowed by the ABI
      because those locations can and sometimes do get corrupted by an
      interrupt.
      
      This ensures that CONFIG_FRAME_POINTER is only selected by ftrace.
      When CONFIG_FTRACE is enabled we also pass -mno-sched-epilog to work
      around the gcc codegen bug.
      
      Patch based on work by:
      	Andreas Schwab <schwab@suse.de>
      	Segher Boessenkool <segher@kernel.crashing.org>
      Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7563dc64
  19. 04 7月, 2008 1 次提交
  20. 30 6月, 2008 1 次提交
  21. 16 6月, 2008 1 次提交
  22. 11 6月, 2008 1 次提交
  23. 27 4月, 2008 1 次提交
  24. 17 4月, 2008 1 次提交
  25. 03 4月, 2008 1 次提交
  26. 13 3月, 2008 1 次提交
  27. 19 2月, 2008 1 次提交
  28. 07 2月, 2008 1 次提交
    • G
      [POWERPC] bootwrapper: Build multiple cuImages · 25431333
      Grant Likely 提交于
      Currently, the kernel uses CONFIG_DEVICE_TREE to wrap a kernel image
      with a fdt blob which means for any given configuration only one dts
      file can be selected and so support for only one board can be built
      
      This moves the selection of the default .dts file out of the kernel
      config and into the bootwrapper makefile.  The makefile chooses which
      images to build based on the kernel config and the dts source file
      name is taken directly from the image name.  For example "cuImage.ebony"
      will use "ebony.dts" as the device tree source file.
      
      In addition, this patch allows a specific image to be requested from the
      command line by adding "cuImage.%" and "treeImage.%" targets to the list
      of valid built targets in arch/powerpc/Makefile.  This allows the default
      dts selection to be overridden.
      
      Another advantage to this change is it allows a single defconfig to be
      supplied for all boards using the same chip family and only differing in
      the device tree.
      
      Important note: This patch adds two new zImage targets; zImage.dtb.% and
      zImage.dtb.initrd.% for zImages with embedded dtb files.  Currently
      there are 5 platforms which require this: ps3, ep405, mpc885ads, ep88xc,
      adder875-redboot and ep8248e.  This patch *changes the zImage filenames*
      for those platforms.  ie. 'zImage.ps3' is now 'zImage.dtb.ps3'.
      
      This new zImage.dtb targets were added so that the .dts file could be
      part of the dependancies list for building them.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      25431333
  29. 06 12月, 2007 1 次提交
  30. 09 11月, 2007 1 次提交
    • K
      [POWERPC] Add -mno-spe for ARCH=powerpc builds · 0197cd2e
      Kumar Gala 提交于
      Newer GCC's are capable of autovectorization for ISA extensions like
      AltiVec and SPE.  If we happen to build with one of those compilers we
      will get SPE instructions in random kernel code.  Today we only allow
      basic interger code in the kernel and FP, AltiVec, or SPE in special
      explicit locations that have handled the proper saving and restoring of
      the register state (since on uniprocessor we lazy context switch the
      register state for FP, AltiVec, and SPE).
      
      -mno-spe disables the compiler for automatically generating SPE
      instructions without our knowledge.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      0197cd2e
  31. 16 10月, 2007 2 次提交
    • S
      kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP · 06c5040c
      Sam Ravnborg 提交于
      The variable CPPFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      
      This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the
      tree and enabling one to use:
      make CPPFLAGS=...
      to specify additional CPP commandline options.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      06c5040c
    • S
      kbuild: enable 'make AFLAGS=...' to add additional options to AS · 222d394d
      Sam Ravnborg 提交于
      The variable AFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of AFLAGS with KBUILD_AFLAGS all over
      the tree.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      222d394d
  32. 15 10月, 2007 1 次提交
    • S
      kbuild: enable 'make CFLAGS=...' to add additional options to CC · a0f97e06
      Sam Ravnborg 提交于
      The variable CFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
      tree and enabling one to use:
      make CFLAGS=...
      to specify additional gcc commandline options.
      
      One usecase is when trying to find gcc bugs but other
      use cases has been requested too.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k
      
      Test was simple to do a defconfig build, apply the patch and check
      that nothing got rebuild.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a0f97e06
  33. 03 10月, 2007 3 次提交
  34. 22 9月, 2007 1 次提交
  35. 23 8月, 2007 1 次提交