1. 07 3月, 2016 1 次提交
  2. 17 12月, 2015 1 次提交
  3. 26 11月, 2015 1 次提交
  4. 29 9月, 2015 1 次提交
    • B
      powerpc: Kconfig: remove BE-only platforms from LE kernel build · e5e16d8f
      Boqun Feng 提交于
      Currently, little endian is only supported on powernv and pseries,
      however, Kconfigs still allow us to include other platforms in a LE
      kernel, this may result in space wasting or even build error if some
      BE-only platforms always assume they are built for a BE kernel. So just
      modify the Kconfigs of BE-only platforms to remove them from being built
      for a LE kernel.
      
      For 32bit only platforms, nothing needs to be done, because
      CPU_LITTLE_ENDIAN depends on PPC64. For 64bit supported platforms, add
      CPU_BIG_ENDIAN to dependencies explicitly, so that these platforms will
      be disabled for LE [Suggested-by: Cédric Le Goater <clg@fr.ibm.com>].
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Acked-by: NGeoff Levand <geoff@infradead.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e5e16d8f
  5. 30 7月, 2015 1 次提交
    • M
      genirq/irqdomain: Allow irq domain aliasing · ad3aedfb
      Marc Zyngier 提交于
      It is not uncommon (at least with the ARM stuff) to have a piece
      of hardware that implements different flavours of "interrupts".
      A typical example of this is the GICv3 ITS, which implements
      standard PCI/MSI support, but also some form of "generic MSI".
      
      So far, the PCI/MSI domain is registered using the ITS device_node,
      so that irq_find_host can return it. On the contrary, the raw MSI
      domain is not registered with an device_node, making it impossible
      to be looked up by another subsystem (obviously, using the same
      device_node twice would only result in confusion, as it is not
      defined which one irq_find_host would return).
      
      A solution to this is to "type" domains that may be aliasing, and
      to be able to lookup an device_node that matches a given type.
      For this, we introduce irq_find_matching_host() as a superset
      of irq_find_host:
      
      struct irq_domain *irq_find_matching_host(struct device_node *node,
                                      enum irq_domain_bus_token bus_token);
      
      where bus_token is the "type" we want to match the domain against
      (so far, only DOMAIN_BUS_ANY is defined). This result in some
      moderately invasive changes on the PPC side (which is the only
      user of the .match method).
      
      This has otherwise no functionnal change.
      Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: <linux-arm-kernel@lists.infradead.org>
      Cc: Yijing Wang <wangyijing@huawei.com>
      Cc: Ma Jun <majun258@huawei.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Duc Dang <dhdang@apm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1438091186-10244-2-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      ad3aedfb
  6. 15 4月, 2015 1 次提交
  7. 11 4月, 2015 4 次提交
  8. 10 4月, 2015 1 次提交
    • M
      powerpc: Drop return value of smp_ops->probe() · a7f4ee1f
      Michael Ellerman 提交于
      smp_ops->probe() is currently supposed to return the number of cpus in
      the system.
      
      The last actual usage of the value was removed in May 2007 in e147ec8f
      "[POWERPC] Simplify smp_space_timers". We still passed the value around
      until June 2010 when even that was finally removed in c1aa687d
      "powerpc: Clean up obsolete code relating to decrementer and timebase".
      
      So drop that requirement, probe() now returns void, and update all
      implementations.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a7f4ee1f
  9. 25 3月, 2015 1 次提交
  10. 17 3月, 2015 1 次提交
  11. 31 1月, 2015 1 次提交
  12. 19 11月, 2014 1 次提交
    • M
      powerpc: Remove more traces of bootmem · e39f223f
      Michael Ellerman 提交于
      Although we are now selecting NO_BOOTMEM, we still have some traces of
      bootmem lying around. That is because even with NO_BOOTMEM there is
      still a shim that converts bootmem calls into memblock calls, but
      ultimately we want to remove all traces of bootmem.
      
      Most of the patch is conversions from alloc_bootmem() to
      memblock_virt_alloc(). In general a call such as:
      
        p = (struct foo *)alloc_bootmem(x);
      
      Becomes:
      
        p = memblock_virt_alloc(x, 0);
      
      We don't need the cast because memblock_virt_alloc() returns a void *.
      The alignment value of zero tells memblock to use the default alignment,
      which is SMP_CACHE_BYTES, the same value alloc_bootmem() uses.
      
      We remove a number of NULL checks on the result of
      memblock_virt_alloc(). That is because memblock_virt_alloc() will panic
      if it can't allocate, in exactly the same way as alloc_bootmem(), so the
      NULL checks are and always have been redundant.
      
      The memory returned by memblock_virt_alloc() is already zeroed, so we
      remove several memsets of the result of memblock_virt_alloc().
      
      Finally we convert a few uses of __alloc_bootmem(x, y, MAX_DMA_ADDRESS)
      to just plain memblock_virt_alloc(). We don't use memblock_alloc_base()
      because MAX_DMA_ADDRESS is ~0ul on powerpc, so limiting the allocation
      to that is pointless, 16XB ought to be enough for anyone.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e39f223f
  13. 10 11月, 2014 1 次提交
  14. 03 11月, 2014 1 次提交
    • A
      powerpc: Convert power off logic to pm_power_off · 9178ba29
      Alexander Graf 提交于
      The generic Linux framework to power off the machine is a function pointer
      called pm_power_off. The trick about this pointer is that device drivers can
      potentially implement it rather than board files.
      
      Today on powerpc we set pm_power_off to invoke our generic full machine power
      off logic which then calls ppc_md.power_off to invoke machine specific power
      off.
      
      However, when we want to add a power off GPIO via the "gpio-poweroff" driver,
      this card house falls apart. That driver only registers itself if pm_power_off
      is NULL to ensure it doesn't override board specific logic. However, since we
      always set pm_power_off to the generic power off logic (which will just not
      power off the machine if no ppc_md.power_off call is implemented), we can't
      implement power off via the generic GPIO power off driver.
      
      To fix this up, let's get rid of the ppc_md.power_off logic and just always use
      pm_power_off as was intended. Then individual drivers such as the GPIO power off
      driver can implement power off logic via that function pointer.
      
      With this patch set applied and a few patches on top of QEMU that implement a
      power off GPIO on the virt e500 machine, I can successfully turn off my virtual
      machine after halt.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      [mpe: Squash into one patch and update changelog based on cover letter]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      9178ba29
  15. 02 10月, 2014 1 次提交
  16. 28 7月, 2014 1 次提交
  17. 27 6月, 2014 1 次提交
    • G
      of: Migrate of_find_node_by_name() users to for_each_node_by_name() · ccdb8ed3
      Grant Likely 提交于
      There are a bunch of users open coding the for_each_node_by_name() by
      calling of_find_node_by_name() directly instead of using the macro. This
      is getting in the way of some cleanups, and the possibility of removing
      of_find_node_by_name() entirely. Clean it up so that all the users are
      consistent.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Takashi Iwai <tiwai@suse.de>
      ccdb8ed3
  18. 15 1月, 2014 1 次提交
  19. 15 11月, 2013 1 次提交
  20. 24 10月, 2013 2 次提交
    • G
      of/irq: Replace of_irq with of_phandle_args · 530210c7
      Grant Likely 提交于
      struct of_irq and struct of_phandle_args are exactly the same structure.
      This patch makes the kernel use of_phandle_args everywhere. This in
      itself isn't a big deal, but it makes some follow-on patches simpler.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Acked-by: NMichal Simek <monstr@monstr.eu>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      530210c7
    • G
      of/irq: Rename of_irq_map_* functions to of_irq_parse_* · 0c02c800
      Grant Likely 提交于
      The OF irq handling code has been overloading the term 'map' to refer to
      both parsing the data in the device tree and mapping it to the internal
      linux irq system. This is probably because the device tree does have the
      concept of an 'interrupt-map' function for translating interrupt
      references from one node to another, but 'map' is still confusing when
      the primary purpose of some of the functions are to parse the DT data.
      
      This patch renames all the of_irq_map_* functions to of_irq_parse_*
      which makes it clear that there is a difference between the parsing
      phase and the mapping phase. Kernel code can make use of just the
      parsing or just the mapping support as needed by the subsystem.
      
      The patch was generated mechanically with a handful of sed commands.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Acked-by: NMichal Simek <monstr@monstr.eu>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      0c02c800
  21. 10 10月, 2013 1 次提交
    • R
      powerpc: add explicit OF includes · 26a2056e
      Rob Herring 提交于
      When removing prom.h include by of.h, several OF headers will no longer
      be implicitly included. Add explicit includes of of_*.h as needed.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: linuxppc-dev@lists.ozlabs.org
      26a2056e
  22. 01 7月, 2013 1 次提交
    • P
      powerpc: Delete __cpuinit usage from all users · 061d19f2
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      This removes all the powerpc uses of the __cpuinit macros.  There
      are no __CPUINIT users in assembly files in powerpc.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      061d19f2
  23. 10 6月, 2013 1 次提交
  24. 07 6月, 2013 1 次提交
  25. 06 5月, 2013 1 次提交
    • B
      powerpc/pci: Support per-aperture memory offset · 3fd47f06
      Benjamin Herrenschmidt 提交于
      The PCI core supports an offset per aperture nowadays but our arch
      code still has a single offset per host bridge representing the
      difference betwen CPU memory addresses and PCI MMIO addresses.
      
      This is a problem as new machines and hypervisor versions are
      coming out where the 64-bit windows will have a different offset
      (basically mapped 1:1) from the 32-bit windows.
      
      This fixes it by using separate offsets. In the long run, we probably
      want to get rid of that intermediary struct pci_controller and have
      those directly stored into the pci_host_bridge as they are parsed
      but this will be a more invasive change.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3fd47f06
  26. 02 4月, 2013 1 次提交
  27. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  28. 19 11月, 2012 1 次提交
  29. 17 11月, 2012 1 次提交
  30. 15 11月, 2012 1 次提交
  31. 30 4月, 2012 2 次提交
    • B
      i2c/powermac: Register i2c devices from device-tree · 81e5d864
      Benjamin Herrenschmidt 提交于
      This causes i2c-powermac to register i2c devices exposed in the
      device-tree, enabling new-style probing of devices.
      
      Note that we prefix the IDs with "MAC," in order to prevent the
      generic drivers from matching. This is done on purpose as we only
      want drivers specifically tested/designed to operate on powermacs
      to match.
      
      This removes the special case we had for the AMS driver, and updates
      the driver's match table instead.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      81e5d864
    • G
      powerpc/irqdomain: Fix broken NR_IRQ references · 4013369f
      Grant Likely 提交于
      The switch from using irq_map to irq_alloc_desc*() for managing irq
      number allocations introduced new bugs in some of the powerpc
      interrupt code.  Several functions rely on the value of NR_IRQS to
      determine the maximum irq number that could get allocated.  However,
      with sparse_irq and using irq_alloc_desc*() the maximum possible irq
      number is now specified with 'nr_irqs' which may be a number larger
      than NR_IRQS.  This has caused breakage on powermac when
      CONFIG_NR_IRQS is set to 32.
      
      This patch removes most of the direct references to NR_IRQS in the
      powerpc code and replaces them with either a nr_irqs reference or by
      using the common for_each_irq_desc() macro.  The powerpc-specific
      for_each_irq() macro is removed at the same time.
      
      Also, the Cell axon_msi driver is refactored to remove the global
      build assumption on the size of NR_IRQS and instead add a limit to the
      maximum irq number when calling irq_domain_add_nomap().
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4013369f
  32. 23 4月, 2012 1 次提交
    • B
      powerpc/pmac: Don't add_timer() twice · 3027691e
      Benjamin Herrenschmidt 提交于
      If the interrupt and the timeout happen roughly at the same
      time, we can get into a situation where the timer function
      is run while the interrupt has already been processed. In
      this case, the timer function might end up doing an add_timer
      on an already pending timer, causing a BUG_ON() to trigger.
      
      Instead, just skip the whole timeout operation if we see that
      the timer is pending. The spinlock ensures that the only way
      that happens is if we already started a new operation and thus
      the timeout can be ignored.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3027691e
  33. 12 4月, 2012 1 次提交
    • G
      irq_domain: Move irq_virq_count into NOMAP revmap · 6fa6c8e2
      Grant Likely 提交于
      This patch replaces the old global setting of irq_virq_count that is only
      used by the NOMAP mapping and instead uses a revmap_data property so that
      the maximum NOMAP allocation can be set per NOMAP irq_domain.
      
      There is exactly one user of irq_virq_count in-tree right now: PS3.
      Also, irq_virq_count is only useful for the NOMAP mapping.  So,
      instead of having a single global irq_virq_count values, this change
      drops it entirely and added a max_irq argument to irq_domain_add_nomap().
      That makes it a property of an individual nomap irq domain instead of
      a global system settting.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Tested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      6fa6c8e2
  34. 29 3月, 2012 1 次提交
  35. 07 3月, 2012 1 次提交