1. 11 5月, 2016 1 次提交
  2. 12 4月, 2016 1 次提交
  3. 28 10月, 2015 1 次提交
  4. 21 10月, 2015 1 次提交
    • C
      powerpc/prom: Avoid reference to potentially freed memory · 1856f50c
      Christophe Jaillet 提交于
      of_get_property() is used inside the loop, but then the reference to the
      node is dropped before dereferencing the prop pointer, which could by then
      point to junk if the node has been freed.
      
      Instead use of_property_read_u32() to actually read the property
      value before dropping the reference.
      
      of_property_read_u32() requires at least one cell (u32) to be present,
      which is stricter than the old logic which would happily dereference a
      property of any size. However we believe all device trees in the wild
      have at least one cell.
      
      Skiboot may produce memory nodes with more than one cell, but that is
      OK, of_property_read_u32() will return the first one.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      [mpe: Expand change log with device tree details]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1856f50c
  5. 12 8月, 2015 2 次提交
  6. 08 6月, 2015 1 次提交
  7. 02 6月, 2015 1 次提交
  8. 11 5月, 2015 1 次提交
  9. 07 3月, 2015 1 次提交
  10. 02 2月, 2015 1 次提交
  11. 14 11月, 2014 1 次提交
  12. 10 11月, 2014 1 次提交
  13. 02 10月, 2014 1 次提交
  14. 25 9月, 2014 2 次提交
  15. 30 7月, 2014 1 次提交
    • A
      powerpc/e6500: Add support for hardware threads · e16c8765
      Andy Fleming 提交于
      The general idea is that each core will release all of its
      threads into the secondary thread startup code, which will
      eventually wait in the secondary core holding area, for the
      appropriate bit in the PACA to be set. The kick_cpu function
      pointer will set that bit in the PACA, and thus "release"
      the core/thread to boot. We also need to do a few things that
      U-Boot normally does for CPUs (like enable branch prediction).
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      [scottwood@freescale.com: various changes, including only enabling
       threads if Linux wants to kick them]
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      e16c8765
  16. 28 7月, 2014 1 次提交
  17. 24 7月, 2014 1 次提交
    • G
      of: Move dynamic node fixups out of powerpc and into common code · a25095d4
      Grant Likely 提交于
      PowerPC does an odd thing with dynamic nodes. It uses a notifier to
      catch new node additions and set some of the values like name and type.
      This makes no sense since that same code can be put directly into
      of_attach_node(). Besides, all dynamic node users need this, not just
      powerpc. Fix this problem by moving the logic out of arch/powerpc and
      into drivers/of/dynamic.c.
      
      It is also important to remove this notifier because we want to move the
      firing of notifiers from before the tree is modified to after so that
      the receiver gets a consistent view of the tree, but that is
      incompatible with notifiers that modify the node.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Nathan Fontenot <nfont@austin.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      a25095d4
  18. 25 6月, 2014 1 次提交
    • M
      powerpc/powernv: Remove OPAL v1 takeover · e2500be2
      Michael Ellerman 提交于
      In commit 27f44888 "Add OPAL takeover from PowerVM" we added support
      for "takeover" on OPAL v1 machines.
      
      This was a mode of operation where we would boot under pHyp, and query
      for the presence of OPAL. If detected we would then do a special
      sequence to take over the machine, and the kernel would end up running
      in hypervisor mode.
      
      OPAL v1 was never a supported product, and was never shipped outside
      IBM. As far as we know no one is still using it.
      
      Newer versions of OPAL do not use the takeover mechanism. Although the
      query for OPAL should be harmless on machines with newer OPAL, we have
      seen a machine where it causes a crash in Open Firmware.
      
      The code in early_init_devtree() to copy boot_command_line into cmd_line
      was added in commit 817c21ad "Get kernel command line accross OPAL
      takeover", and AFAIK is only used by takeover, so should also be
      removed.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e2500be2
  19. 30 4月, 2014 5 次提交
  20. 07 4月, 2014 3 次提交
  21. 13 3月, 2014 1 次提交
  22. 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
  23. 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
  24. 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
  25. 31 10月, 2013 2 次提交
  26. 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
  27. 29 8月, 2013 1 次提交
  28. 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
  29. 14 8月, 2013 2 次提交