1. 30 8月, 2014 1 次提交
  2. 09 8月, 2014 2 次提交
    • V
      kexec: load and relocate purgatory at kernel load time · 12db5562
      Vivek Goyal 提交于
      Load purgatory code in RAM and relocate it based on the location.
      Relocation code has been inspired by module relocation code and purgatory
      relocation code in kexec-tools.
      
      Also compute the checksums of loaded kexec segments and store them in
      purgatory.
      
      Arch independent code provides this functionality so that arch dependent
      bootloaders can make use of it.
      
      Helper functions are provided to get/set symbol values in purgatory which
      are used by bootloaders later to set things like stack and entry point of
      second kernel etc.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: WANG Chao <chaowang@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12db5562
    • L
      lib/scatterlist: make ARCH_HAS_SG_CHAIN an actual Kconfig · 308c09f1
      Laura Abbott 提交于
      Rather than have architectures #define ARCH_HAS_SG_CHAIN in an
      architecture specific scatterlist.h, make it a proper Kconfig option and
      use that instead.  At same time, remove the header files are are now
      mostly useless and just include asm-generic/scatterlist.h.
      
      [sfr@canb.auug.org.au: powerpc files now need asm/dma.h]
      Signed-off-by: NLaura Abbott <lauraa@codeaurora.org>
      Acked-by: Thomas Gleixner <tglx@linutronix.de>			[x86]
      Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>	[powerpc]
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      308c09f1
  3. 16 7月, 2014 1 次提交
    • P
      locking/mutex: Disable optimistic spinning on some architectures · 4badad35
      Peter Zijlstra 提交于
      The optimistic spin code assumes regular stores and cmpxchg() play nice;
      this is found to not be true for at least: parisc, sparc32, tile32,
      metag-lock1, arc-!llsc and hexagon.
      
      There is further wreckage, but this in particular seemed easy to
      trigger, so blacklist this.
      
      Opt in for known good archs.
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Reported-by: NMikulas Patocka <mpatocka@redhat.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Jason Low <jason.low2@hp.com>
      Cc: Waiman Long <waiman.long@hp.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
      Cc: John David Anglin <dave.anglin@bell.net>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Davidlohr Bueso <davidlohr@hp.com>
      Cc: stable@vger.kernel.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: sparclinux@vger.kernel.org
      Link: http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.netSigned-off-by: NIngo Molnar <mingo@kernel.org>
      4badad35
  4. 11 7月, 2014 1 次提交
    • G
      powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64 · fb43e847
      Guenter Roeck 提交于
      powerpc:allmodconfig has been failing for some time with the following
      error.
      
      arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
      arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards
      make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1
      
      A number of attempts to fix the problem by moving around code have been
      unsuccessful and resulted in failed builds for some configurations and
      the discovery of toolchain bugs.
      
      Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead.
      While this is less than perfect, it avoids substantial code changes
      which would otherwise be necessary just to make COMPILE_TEST builds
      happy and might have undesired side effects.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      fb43e847
  5. 28 5月, 2014 2 次提交
    • N
      powerpc/numa: Enable CONFIG_HAVE_MEMORYLESS_NODES · 64bb80d8
      Nishanth Aravamudan 提交于
      Based off fd1197f1 for ia64, enable CONFIG_HAVE_MEMORYLESS_NODES if
      NUMA. Initialize the local memory node in start_secondary.
      
      With this commit and the preceding to enable
      CONFIG_USER_PERCPU_NUMA_NODE_ID, which is a prerequisite, in a PowerKVM
      guest with the following topology:
      
      numactl --hardware
      available: 3 nodes (0-2)
      node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
      23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
      47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
      71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
      95 96 97 98 99
      node 0 size: 1998 MB
      node 0 free: 521 MB
      node 1 cpus: 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
      115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
      133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
      151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
      169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
      187 188 189 190 191 192 193 194 195 196 197 198 199
      node 1 size: 0 MB
      node 1 free: 0 MB
      node 2 cpus:
      node 2 size: 2039 MB
      node 2 free: 1739 MB
      node distances:
      node   0   1   2
        0:  10  40  40
        1:  40  10  40
        2:  40  40  10
      
      the unreclaimable slab is reduced by close to 130M:
      
      Before:
              Slab:             418176 kB
              SReclaimable:      26624 kB
              SUnreclaim:       391552 kB
      
      After:
              Slab:             298944 kB
              SReclaimable:      31744 kB
              SUnreclaim:       267200 kB
      Signed-off-by: NNishanth Aravamudan <nacc@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      64bb80d8
    • N
      powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID · 8c272261
      Nishanth Aravamudan 提交于
      Based off 3bccd996 for ia64, convert powerpc to use the generic per-CPU
      topology tracking, specifically:
      
          initialize per cpu numa_node entry in start_secondary
          remove the powerpc cpu_to_node()
          define CONFIG_USE_PERCPU_NUMA_NODE_ID if NUMA
      Signed-off-by: NNishanth Aravamudan <nacc@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8c272261
  6. 20 3月, 2014 1 次提交
    • A
      audit: Add CONFIG_HAVE_ARCH_AUDITSYSCALL · 7a017721
      AKASHI Takahiro 提交于
      Currently AUDITSYSCALL has a long list of architecture depencency:
             depends on AUDIT && (X86 || PARISC || PPC || S390 || IA64 || UML ||
      		SPARC64 || SUPERH || (ARM && AEABI && !OABI_COMPAT) || ALPHA)
      The purpose of this patch is to replace it with HAVE_ARCH_AUDITSYSCALL
      for simplicity.
      Signed-off-by: NAKASHI Takahiro <takahiro.akashi@linaro.org>
      Acked-by: Will Deacon <will.deacon@arm.com> (arm)
      Acked-by: Richard Guy Briggs <rgb@redhat.com> (audit)
      Acked-by: Matt Turner <mattst88@gmail.com> (alpha)
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: NEric Paris <eparis@redhat.com>
      7a017721
  7. 13 3月, 2014 1 次提交
  8. 07 3月, 2014 1 次提交
  9. 05 3月, 2014 1 次提交
  10. 01 3月, 2014 1 次提交
    • P
      powerpc: select MEMORY for FSL_IFC to not break existing .config files · 42d87b18
      Paul Gortmaker 提交于
      commit d2ae2e20 ("driver/memory:Move
      Freescale IFC driver to a common driver") introduces this build
      regression into the mpc85xx_defconfig:
      
       drivers/built-in.o: In function `fsl_ifc_nand_remove':
       drivers/mtd/nand/fsl_ifc_nand.c:1147: undefined reference to `fsl_ifc_ctrl_dev'
       drivers/mtd/nand/fsl_ifc_nand.c:1147: undefined reference to `fsl_ifc_ctrl_dev'
       drivers/built-in.o: In function `fsl_ifc_nand_probe':
       drivers/mtd/nand/fsl_ifc_nand.c:1031: undefined reference to `fsl_ifc_ctrl_dev'
       drivers/mtd/nand/fsl_ifc_nand.c:1031: undefined reference to `fsl_ifc_ctrl_dev'
       drivers/built-in.o: In function `match_bank':
       drivers/mtd/nand/fsl_ifc_nand.c:1013: undefined reference to `convert_ifc_address'
       drivers/built-in.o: In function `fsl_ifc_nand_probe':
       drivers/mtd/nand/fsl_ifc_nand.c:1059: undefined reference to `fsl_ifc_ctrl_dev'
       drivers/mtd/nand/fsl_ifc_nand.c:1080: undefined reference to `fsl_ifc_ctrl_dev'
       drivers/mtd/nand/fsl_ifc_nand.c:1069: undefined reference to `fsl_ifc_ctrl_dev'
       drivers/mtd/nand/fsl_ifc_nand.c:1069: undefined reference to `fsl_ifc_ctrl_dev'
       make: *** [vmlinux] Error 1
      
      This happens because there is nothing to descend us into the
      drivers/memory directory in the mpc85xx_defconfig.  It wasn't
      selecting CONFIG_MEMORY.  So we never built drivers/memory/fsl_ifc.o
      and so we have nothing to link the above symbols against.
      
      Since the goal of the original commit was to relocate the driver to
      an arch independent location, it only makes sense to relocate the
      Kconfig setting there as well.  But that alone won't fix the build
      failure; for that we ensure whoever selects FSL_IFC also selects MEMORY.
      
      Cc: Prabhakar Kushwaha <prabhakar@freescale.com>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      42d87b18
  11. 28 1月, 2014 1 次提交
  12. 27 1月, 2014 1 次提交
  13. 24 1月, 2014 1 次提交
  14. 18 1月, 2014 1 次提交
  15. 13 1月, 2014 1 次提交
    • G
      clk: mpc5xxx: switch to COMMON_CLK, retire PPC_CLOCK · 7d71d5b2
      Gerhard Sittig 提交于
      the setup before the change was
      - arch/powerpc/Kconfig had the PPC_CLOCK option, off by default
      - depending on the PPC_CLOCK option the arch/powerpc/kernel/clock.c file
        was built, which implements the clk.h API but always returns -ENOSYS
        unless a platform registers specific callbacks
      - the MPC52xx platform selected PPC_CLOCK but did not register any
        callbacks, thus all clk.h API calls keep resulting in -ENOSYS errors
        (which is OK, all peripheral drivers deal with the situation)
      - the MPC512x platform selected PPC_CLOCK and registered specific
        callbacks implemented in arch/powerpc/platforms/512x/clock.c, thus
        provided real support for the clock API
      - no other powerpc platform did select PPC_CLOCK
      
      the situation after the change is
      - the MPC512x platform implements the COMMON_CLK interface, and thus the
        PPC_CLOCK approach in arch/powerpc/platforms/512x/clock.c has become
        obsolete
      - the MPC52xx platform still lacks genuine support for the clk.h API
        while this is not a change against the previous situation (the error
        code returned from COMMON_CLK stubs differs but every call still
        results in an error)
      - with all references gone, the arch/powerpc/kernel/clock.c wrapper and
        the PPC_CLOCK option have become obsolete, as did the clk_interface.h
        header file
      
      the switch from PPC_CLOCK to COMMON_CLK is done for all platforms within
      the same commit such that multiplatform kernels (the combination of 512x
      and 52xx within one executable) keep working
      
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      7d71d5b2
  16. 10 1月, 2014 2 次提交
  17. 03 1月, 2014 1 次提交
  18. 30 12月, 2013 1 次提交
  19. 09 12月, 2013 1 次提交
  20. 26 11月, 2013 1 次提交
  21. 15 11月, 2013 1 次提交
  22. 30 10月, 2013 1 次提交
    • M
      powerpc: FA_DUMP depends on KEXEC · 90890b1e
      Michael Ellerman 提交于
      If you try and build the FA_DUMP code with CONFIG_KEXEC=n, you see
      errors such as the following:
      
      arch/powerpc/kernel/fadump.c
        408:2: error: 'crashing_cpu' undeclared (first use in this function)
        410:2: error: implicit declaration of function 'crash_save_vmcoreinfo'
        513:22: error: storage size of 'prstatus' isn't known
        520:2: error: implicit declaration of function 'elf_core_copy_kernel_regs'
        521:36: error: 'KEXEC_CORE_NOTE_NAME' undeclared (first use in this function)
        624:49: error: 'note_buf_t' undeclared (first use in this function)
        872:2: error: implicit declaration of function 'paddr_vmcoreinfo_note'
        874:18: error: 'vmcoreinfo_max_size' undeclared (first use in this function)
      
      This is because although FA_DUMP doesn't use kexec as the actual reboot
      mechanism, it does use parts of the kexec code to assemble/disassemble
      the crash image.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      90890b1e
  23. 24 10月, 2013 1 次提交
  24. 17 10月, 2013 1 次提交
  25. 11 10月, 2013 3 次提交
  26. 01 10月, 2013 1 次提交
    • F
      powerpc: Tell about irq stack coverage · 62d26c82
      Frederic Weisbecker 提交于
      Now that powerpc runs irq_exit() under the irq stack,
      let the softirq core know about that so that we spare
      the needless stack switch on irq exit's softirq processing.
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@au1.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Mackerras <paulus@au1.ibm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: James E.J. Bottomley <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      62d26c82
  27. 13 9月, 2013 1 次提交
  28. 27 8月, 2013 1 次提交
    • P
      powerpc: Work around gcc miscompilation of __pa() on 64-bit · bdbc29c1
      Paul Mackerras 提交于
      On 64-bit, __pa(&static_var) gets miscompiled by recent versions of
      gcc as something like:
      
              addis 3,2,.LANCHOR1+4611686018427387904@toc@ha
              addi 3,3,.LANCHOR1+4611686018427387904@toc@l
      
      This ends up effectively ignoring the offset, since its bottom 32 bits
      are zero, and means that the result of __pa() still has 0xC in the top
      nibble.  This happens with gcc 4.8.1, at least.
      
      To work around this, for 64-bit we make __pa() use an AND operator,
      and for symmetry, we make __va() use an OR operator.  Using an AND
      operator rather than a subtraction ends up with slightly shorter code
      since it can be done with a single clrldi instruction, whereas it
      takes three instructions to form the constant (-PAGE_OFFSET) and add
      it on.  (Note that MEMORY_START is always 0 on 64-bit.)
      
      CC: <stable@vger.kernel.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bdbc29c1
  29. 23 8月, 2013 1 次提交
  30. 14 8月, 2013 1 次提交
    • K
      powerpc: split She math emulation into two parts · e05c0e81
      Kevin Hao 提交于
      For some SoC (such as the FSL BookE) even though there does have
      a hardware FPU, but not all floating point instructions are
      implemented. Unfortunately some versions of gcc do use these
      unimplemented instructions. Then we have to enable the math emulation
      to workaround this issue. It seems a little redundant to have the
      support to emulate all the floating point instructions in this case.
      So split the math emulation into two parts. One is for the SoC which
      doesn't have FPU at all and the other for the SoC which does have the
      hardware FPU and only need some special floating point instructions to
      be emulated.
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e05c0e81
  31. 12 8月, 2013 1 次提交
    • T
      PCI: remove ARCH_SUPPORTS_MSI kconfig option · ebd97be6
      Thomas Petazzoni 提交于
      Now that we have weak versions for each of the PCI MSI architecture
      functions, we can actually build the MSI support for all platforms,
      regardless of whether they provide or not architecture-specific
      versions of those functions. For this reason, the ARCH_SUPPORTS_MSI
      hidden kconfig boolean becomes useless, and this patch gets rid of it.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Tested-by: NDaniel Price <daniel.price@gmail.com>
      Tested-by: NThierry Reding <thierry.reding@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux390@de.ibm.com
      Cc: linux-s390@vger.kernel.org
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: linux-ia64@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: David S. Miller <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      ebd97be6
  32. 09 8月, 2013 1 次提交
  33. 05 7月, 2013 1 次提交
  34. 20 6月, 2013 2 次提交