1. 30 4月, 2014 5 次提交
  2. 07 4月, 2014 3 次提交
  3. 13 3月, 2014 1 次提交
  4. 07 3月, 2014 1 次提交
    • M
      powerpc/book3s: Recover from MC in sapphire on SCOM read via MMIO. · 55672ecf
      Mahesh Salgaonkar 提交于
      Detect and recover from machine check when inside opal on a special
      scom load instructions. On specific SCOM read via MMIO we may get a machine
      check exception with SRR0 pointing inside opal. To recover from MC
      in this scenario, get a recovery instruction address and return to it from
      MC.
      
      OPAL will export the machine check recoverable ranges through
      device tree node mcheck-recoverable-ranges under ibm,opal:
      
      # hexdump /proc/device-tree/ibm,opal/mcheck-recoverable-ranges
      0000000 0000 0000 3000 2804 0000 000c 0000 0000
      0000010 3000 2814 0000 0000 3000 27f0 0000 000c
      0000020 0000 0000 3000 2814 xxxx xxxx xxxx xxxx
      0000030 llll llll yyyy yyyy yyyy yyyy
      ...
      ...
      #
      
      where:
      	xxxx xxxx xxxx xxxx = Starting instruction address
      	llll llll           = Length of the address range.
      	yyyy yyyy yyyy yyyy = recovery address
      
      Each recoverable address range entry is (start address, len,
      recovery address), 2 cells each for start and recovery address, 1 cell for
      len, totalling 5 cells per entry. During kernel boot time, build up the
      recovery table with the list of recovery ranges from device-tree node which
      will be used during machine check exception to recover from MMIO SCOM UE.
      Signed-off-by: NMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      55672ecf
  5. 10 1月, 2014 1 次提交
    • K
      powerpc: introduce early_get_first_memblock_info · b27652dd
      Kevin Hao 提交于
      For a relocatable kernel since it can be loaded at any place, there
      is no any relation between the kernel start addr and the memstart_addr.
      So we can't calculate the memstart_addr from kernel start addr. And
      also we can't wait to do the relocation after we get the real
      memstart_addr from device tree because it is so late. So introduce
      a new function we can use to get the first memblock address and size
      in a very early stage (before machine_init).
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      b27652dd
  6. 21 11月, 2013 1 次提交
    • M
      powerpc: Make cpu_to_chip_id() available when SMP=n · 3eb906c6
      Michael Ellerman 提交于
      Up until now we have only used cpu_to_chip_id() in the topology code,
      which is only used on SMP builds. However my recent commit a4da0d50
      "Implement arch_get_random_long/int() for powernv" added a usage when
      SMP=n, breaking the build.
      
      Move cpu_to_chip_id() into prom.c so it is available for SMP=n builds.
      
      We would move the extern to prom.h, but that breaks the include in
      topology.h. Instead we leave it in smp.h, but move it out of the
      CONFIG_SMP #ifdef. We also need to include asm/smp.h in rng.c, because
      the linux version skips asm/smp.h on UP. What a mess.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3eb906c6
  7. 31 10月, 2013 2 次提交
  8. 10 10月, 2013 1 次提交
    • R
      of: remove early_init_dt_setup_initrd_arch · 29eb45a9
      Rob Herring 提交于
      All arches do essentially the same thing now for
      early_init_dt_setup_initrd_arch, so it can now be removed.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.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: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      29eb45a9
  9. 29 8月, 2013 1 次提交
  10. 21 8月, 2013 2 次提交
    • S
      of: move of_get_cpu_node implementation to DT core library · 183912d3
      Sudeep KarkadaNagesha 提交于
      This patch moves the generalized implementation of of_get_cpu_node from
      PowerPC to DT core library, thereby adding support for retrieving cpu
      node for a given logical cpu index on any architecture.
      
      The CPU subsystem can now use this function to assign of_node in the
      cpu device while registering CPUs.
      
      It is recommended to use these helper function only in pre-SMP/early
      initialisation stages to retrieve CPU device node pointers in logical
      ordering. Once the cpu devices are registered, it can be retrieved easily
      from cpu device of_node which avoids unnecessary parsing and matching.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
      183912d3
    • S
      powerpc: refactor of_get_cpu_node to support other architectures · 819d5965
      Sudeep KarkadaNagesha 提交于
      Currently different drivers requiring to access cpu device node are
      parsing the device tree themselves. Since the ordering in the DT need
      not match the logical cpu ordering, the parsing logic needs to consider
      that. However, this has resulted in lots of code duplication and in some
      cases even incorrect logic.
      
      It's better to consolidate them by adding support for getting cpu
      device node for a given logical cpu index in DT core library. However
      logical to physical index mapping can be architecture specific.
      
      PowerPC has it's own implementation to get the cpu node for a given
      logical index.
      
      This patch refactors the current implementation of of_get_cpu_node.
      This in preparation to move the implementation to DT core library.
      It separates out the logical to physical mapping so that a default
      matching of the physical id to the logical cpu index can be added
      when moved to common code. Architecture specific code can override it.
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
      819d5965
  11. 14 8月, 2013 3 次提交
  12. 24 7月, 2013 1 次提交
  13. 02 7月, 2013 1 次提交
    • B
      powerpc: Handle both new style and old style reserve maps · c039e3a8
      Benjamin Herrenschmidt 提交于
      When Jeremy introduced the new device-tree based reserve map, he made
      the code in early_reserve_mem_dt() bail out if it found one, thus not
      reserving the initrd nor processing the old style map.
      
      I hit problems with variants of kexec that didn't put the initrd in
      the new style map either. While these could/will be fixed, I believe
      we should be safe here and rather reserve more than not enough.
      
      We could have a firmware passing stuff via the new style map, and
      in the middle, a kexec that knows nothing about it and adding other
      things to the old style map.
      
      I don't see a big issue with processing both and reserving everything
      that needs to be. memblock_reserve() supports overlaps fine these days.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c039e3a8
  14. 20 6月, 2013 1 次提交
  15. 15 11月, 2012 2 次提交
  16. 07 9月, 2012 1 次提交
  17. 29 3月, 2012 1 次提交
  18. 23 2月, 2012 2 次提交
  19. 09 12月, 2011 3 次提交
    • T
      memblock: s/memblock_analyze()/memblock_allow_resize()/ and update users · 1aadc056
      Tejun Heo 提交于
      The only function of memblock_analyze() is now allowing resize of
      memblock region arrays.  Rename it to memblock_allow_resize() and
      update its users.
      
      * The following users remain the same other than renaming.
      
        arm/mm/init.c::arm_memblock_init()
        microblaze/kernel/prom.c::early_init_devtree()
        powerpc/kernel/prom.c::early_init_devtree()
        openrisc/kernel/prom.c::early_init_devtree()
        sh/mm/init.c::paging_init()
        sparc/mm/init_64.c::paging_init()
        unicore32/mm/init.c::uc32_memblock_init()
      
      * In the following users, analyze was used to update total size which
        is no longer necessary.
      
        powerpc/kernel/machine_kexec.c::reserve_crashkernel()
        powerpc/kernel/prom.c::early_init_devtree()
        powerpc/mm/init_32.c::MMU_init()
        powerpc/mm/tlb_nohash.c::__early_init_mmu()  
        powerpc/platforms/ps3/mm.c::ps3_mm_add_memory()
        powerpc/platforms/embedded6xx/wii.c::wii_memory_fixups()
        sh/kernel/machine_kexec.c::reserve_crashkernel()
      
      * x86/kernel/e820.c::memblock_x86_fill() was directly setting
        memblock_can_resize before populating memblock and calling analyze
        afterwards.  Call memblock_allow_resize() before start populating.
      
      memblock_can_resize is now static inside memblock.c.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      1aadc056
    • T
      powerpc: Cleanup memblock usage · 6fbef13c
      Tejun Heo 提交于
      * early_init_devtree(): Total memory size is aligned to PAGE_SIZE;
        however, alignment isn't enforced if memory_limit is explicitly
        specified.  Simplify the logic and always apply PAGE_SIZE alignment.
      
      * MMU_init(): memblock regions is truncated by directly modifying
        memblock.memory.cnt.  This is incomplete (reserved array is not
        truncated) and unnecessarily low level hindering further memblock
        improvments.  Use memblock_enforce_memory_limit() instead.
      
      * wii_memory_fixups(): Unnecessarily low level direct manipulation of
        memblock regions.  The same result can be achieved using properly
        abstracted operations.  Reimplement using memblock API.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      6fbef13c
    • T
      memblock: Kill memblock_init() · fe091c20
      Tejun Heo 提交于
      memblock_init() initializes arrays for regions and memblock itself;
      however, all these can be done with struct initializers and
      memblock_init() can be removed.  This patch kills memblock_init() and
      initializes memblock with struct initializer.
      
      The only difference is that the first dummy entries don't have .nid
      set to MAX_NUMNODES initially.  This doesn't cause any behavior
      difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      fe091c20
  20. 01 11月, 2011 1 次提交
  21. 12 10月, 2011 1 次提交
    • K
      powerpc: respect mem= setting for early memory limit setup · ba14f649
      Kumar Gala 提交于
      For those MMUs that have some form of bolt'd linear mapping (TLB)
      required its rare that one ever sets mem= smaller than the size of that
      mapping.
      
      However, on Book-E 64 parts the initial linear mapping is quite large
      (1G) so its quite reasonable that mem= is set smaller than that.
      
      We need to parse the command line for mem= limit and constrain the
      amount of memory we map initially by it if need be.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      ba14f649
  22. 20 9月, 2011 2 次提交
  23. 29 6月, 2011 1 次提交
  24. 17 6月, 2011 1 次提交
  25. 09 6月, 2011 1 次提交
    • B
      powerpc: Force page alignment for initrd reserved memory · 307cfe71
      Benjamin Herrenschmidt 提交于
      When using 64K pages with a separate cpio rootfs, U-Boot will align
      the rootfs on a 4K page boundary. When the memory is reserved, and
      subsequent early memblock_alloc is called, it will allocate memory
      between the 64K page alignment and reserved memory. When the reserved
      memory is subsequently freed, it is done so by pages, causing the
      early memblock_alloc requests to be re-used, which in my case, caused
      the device-tree to be clobbered.
      
      This patch forces the reserved memory for initrd to be kernel page
      aligned, and will move the device tree if it overlaps with the range
      extension of initrd. This patch will also consolidate the identical
      function free_initrd_mem() from mm/init_32.c, init_64.c to mm/mem.c,
      and adds the same range extension when freeing initrd. free_initrd_mem()
      is also moved to the __init section.
      
      Many thanks to Milton Miller for his input on this patch.
      
      [BenH: Fixed build without CONFIG_BLK_DEV_INITRD]
      Signed-off-by: NDave Carroll <dcarroll@astekcorp.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      307cfe71