1. 06 3月, 2017 1 次提交
    • S
      powerpc: Update to new option-vector-5 format for CAS · 014d02cb
      Suraj Jitindar Singh 提交于
      On POWER9 the ibm,client-architecture-support (CAS) negotiation process
      has been updated to change how the host to guest negotiation is done for
      the new hash/radix mmu as well as the nest mmu, process tables and guest
      translation shootdown (GTSE).
      
      This is documented in the unreleased PAPR ACR "CAS option vector
      additions for P9".
      
      The host tells the guest which options it supports in
      ibm,arch-vec-5-platform-support. The guest then chooses a subset of these
      to request in the CAS call and these are agreed to in the
      ibm,architecture-vec-5 property of the chosen node.
      
      Thus we read ibm,arch-vec-5-platform-support and make our selection before
      calling CAS. We then parse the ibm,architecture-vec-5 property of the
      chosen node to check whether we should run as hash or radix.
      
      ibm,arch-vec-5-platform-support format:
      
      index value pairs: <index, val> ... <index, val>
      
      index: Option vector 5 byte number
      val:   Some representation of supported values
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Acked-by: NPaul Mackerras <paulus@ozlabs.org>
      [mpe: Don't print about unknown options, be consistent with OV5_FEAT]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      014d02cb
  2. 21 2月, 2017 1 次提交
    • M
      powerpc/pseries: Advertise Hot Plug Event support to firmware · 3dbbaf20
      Michael Roth 提交于
      With the inclusion of commit 333f7b76 ("powerpc/pseries: Implement
      indexed-count hotplug memory add") and commit 75384347
      ("powerpc/pseries: Implement indexed-count hotplug memory remove"), we
      now have complete handling of the RTAS hotplug event format as described
      by PAPR via ACR "PAPR Changes for Hotplug RTAS Events".
      
      This capability is indicated by byte 6, bit 2 (5 in IBM numbering) of
      architecture option vector 5, and allows for greater control over
      cpu/memory/pci hot plug/unplug operations.
      
      Existing pseries kernels will utilize this capability based on the
      existence of the /event-sources/hot-plug-events DT property, so we
      only need to advertise it via CAS and do not need a corresponding
      FW_FEATURE_* value to test for.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      3dbbaf20
  3. 10 2月, 2017 1 次提交
  4. 31 1月, 2017 2 次提交
    • P
      powerpc/64: Enable use of radix MMU under hypervisor on POWER9 · cc3d2940
      Paul Mackerras 提交于
      To use radix as a guest, we first need to tell the hypervisor via
      the ibm,client-architecture call first that we support POWER9 and
      architecture v3.00, and that we can do either radix or hash and
      that we would like to choose later using an hcall (the
      H_REGISTER_PROC_TBL hcall).
      
      Then we need to check whether the hypervisor agreed to us using
      radix.  We need to do this very early on in the kernel boot process
      before any of the MMU initialization is done.  If the hypervisor
      doesn't agree, we can't use radix and therefore clear the radix
      MMU feature bit.
      
      Later, when we have set up our process table, which points to the
      radix tree for each process, we need to install that using the
      H_REGISTER_PROC_TBL hcall.
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      cc3d2940
    • P
      powerpc/pseries: Fixes for the "ibm,architecture-vec-5" options · 3f4ab2f8
      Paul Mackerras 提交于
      This fixes the byte index values for some of the option bits in
      the "ibm,architectur-vec-5" property. The "platform facilities options"
      bits are in byte 17 not byte 14, so the upper 8 bits of their
      definitions need to be 0x11 not 0x0E. The "sub processor support" option
      is in byte 21 not byte 15.
      
      Note none of these options are actually looked up in
      "ibm,architecture-vec-5" at this time, so there is no bug.
      
      When checking whether option bits are set, we should check that
      the offset of the byte being checked is less than the vector
      length that we got from the hypervisor.
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      3f4ab2f8
  5. 30 11月, 2016 1 次提交
    • M
      powerpc/prom: Switch to using structs for ibm_architecture_vec · 76ffb578
      Michael Ellerman 提交于
      Now that we've defined structures to describe each of the client
      architecture vectors, we can use those to construct the value we pass to
      firmware.
      
      This avoids the tricks we previously played with the W() macro, allows
      us to properly endian annotate fields, and should help to avoid bugs
      introduced by failing to have the correct number of zero pad bytes
      between fields.
      
      It also means we can avoid hard coding IBM_ARCH_VEC_NRCORES_OFFSET in
      order to update the max_cpus value and instead just set it.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      76ffb578
  6. 25 9月, 2014 1 次提交
  7. 30 4月, 2014 1 次提交
  8. 31 10月, 2013 1 次提交
  9. 10 10月, 2013 5 次提交
  10. 21 8月, 2013 1 次提交
    • 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
  11. 14 8月, 2013 2 次提交
  12. 26 4月, 2013 3 次提交
  13. 15 11月, 2012 1 次提交
  14. 27 7月, 2011 1 次提交
  15. 08 6月, 2011 1 次提交
    • B
      pci/of: Match PCI devices to OF nodes dynamically · 98d9f30c
      Benjamin Herrenschmidt 提交于
      powerpc has two different ways of matching PCI devices to their
      corresponding OF node (if any) for historical reasons. The ppc64 one
      does a scan looking for matching bus/dev/fn, while the ppc32 one does a
      scan looking only for matching dev/fn on each level in order to be
      agnostic to busses being renumbered (which Linux does on some
      platforms).
      
      This removes both and instead moves the matching code to the PCI core
      itself. It's the most logical place to do it: when a pci_dev is created,
      we know the parent and thus can do a single level scan for the matching
      device_node (if any).
      
      The benefit is that all archs now get the matching for free. There's one
      hook the arch might want to provide to match a PHB bus to its device
      node. A default weak implementation is provided that looks for the
      parent device device node, but it's not entirely reliable on powerpc for
      various reasons so powerpc provides its own.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NMichal Simek <monstr@monstr.eu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      98d9f30c
  16. 05 2月, 2011 1 次提交
  17. 24 12月, 2010 1 次提交
  18. 09 12月, 2010 1 次提交
  19. 01 11月, 2010 1 次提交
  20. 01 8月, 2010 1 次提交
    • G
      of/address: Clean up function declarations · 22ae782f
      Grant Likely 提交于
      This patch moves the declaration of of_get_address(), of_get_pci_address(),
      and of_pci_address_to_resource() out of arch code and into the common
      linux/of_address header file.
      
      This patch also fixes some of the asm/prom.h ordering issues.  It still
      includes some header files that it ideally shouldn't be, but at least the
      ordering is consistent now so that of_* overrides work.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      22ae782f
  21. 30 7月, 2010 1 次提交
  22. 24 7月, 2010 1 次提交
  23. 06 7月, 2010 5 次提交
    • G
      of/address: Merge all of the bus translation code · dbbdee94
      Grant Likely 提交于
      Microblaze and PowerPC share a large chunk of code for translating
      OF device tree data into usable addresses.  Differences between the two
      consist of cosmetic differences, and the addition of dma-ranges support
      code to powerpc but not microblaze.  This patch moves the powerpc
      version into common code and applies many of the cosmetic (non-functional)
      changes from the microblaze version.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Wolfram Sang <w.sang@pengutronix.de>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      dbbdee94
    • G
      of/address: merge of_address_to_resource() · 1f5bef30
      Grant Likely 提交于
      Merge common code between PowerPC and Microblaze.  This patch also
      moves the prototype of pci_address_to_pio() out of pci-bridge.h and
      into prom.h because the only user of pci_address_to_pio() is
      of_address_to_resource().
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      1f5bef30
    • G
      of/address: merge of_iomap() · 6b884a8d
      Grant Likely 提交于
      Merge common code between Microblaze and PowerPC.  This patch creates
      new of_address.h and address.c files to containing address translation
      and mapping routines.  First routine to be moved it of_iomap()
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      6b884a8d
    • G
      of/irq: merge irq mapping code · 7dc2e113
      Grant Likely 提交于
      Merge common irq mapping code between PowerPC and Microblaze.
      
      This patch merges of_irq_find_parent(), of_irq_map_raw() and
      of_irq_map_one().  The functions are dependent on one another, so all
      three are merged in a single patch.  Other than cosmetic difference
      (ie. DBG() vs. pr_debug()), the implementations are identical.
      
      of_irq_to_resource() is also merged, but in this case the
      implementations are different.  This patch drops the microblaze version
      and uses the powerpc implementation unchanged.  The microblaze version
      essentially open-coded irq_of_parse_and_map() which it does not need
      to do.  Therefore the powerpc version is safe to adopt.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      7dc2e113
    • G
      of/powerpc: Move Powermac irq quirk code into powermac pic driver code · b83da291
      Grant Likely 提交于
      The code that figures out what is wrong with the powermac irq device
      tree data belongs with the rest of the powermac irq code.  This patch
      moves it out of prom_parse.c and into powermac/pic.c so that it is only
      compiled in when actually needed.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      b83da291
  24. 29 6月, 2010 1 次提交
  25. 15 2月, 2010 1 次提交
  26. 14 2月, 2010 2 次提交
  27. 09 2月, 2010 1 次提交