1. 10 7月, 2012 1 次提交
    • S
      powerpc: select PPC_CLOCK unconditionally for FSL_SOC · 6d4ae2dd
      Shawn Guo 提交于
      Freescale PowerPC SoCs share a number of IP blocks with Freescale
      ARM/IMX SoCs, FlexCAN, SSI, FEC, eSDHC, USB, etc.  There are some
      effort consolidating those drivers to make them work for both
      architectures.
      
      One outstanding difference between two architectures is ARM/IMX will
      turn off module clocks during platform initialization for power saving
      and expects drivers manage clocks using clk API, while PowerPC
      mostly does not do that, and thus does not always build in clk API.
      
      Listing all those driver Kconfig options in "select PPC_CLOCK if" seems
      not scalable for long term maintenance, and could easily introduce
      Kconfig recursive dependency.  This patch chooses to select PPC_CLOCK
      unconditionally for FSL_SOC to always build clk API for PowerPC in.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      6d4ae2dd
  2. 28 5月, 2012 1 次提交
  3. 22 5月, 2012 2 次提交
  4. 21 5月, 2012 1 次提交
  5. 08 5月, 2012 1 次提交
  6. 05 5月, 2012 2 次提交
  7. 03 5月, 2012 2 次提交
    • S
      powerpc/47x: Enable CRASH_DUMP · 47da4219
      Suzuki Poulose 提交于
      Now that we have KEXEC and relocatable kernel working on 47x (!SMP)
      enable CRASH_DUMP.
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      47da4219
    • S
      powerpc/47x: Kernel support for KEXEC · 68343020
      Suzuki Poulose 提交于
      This patch adds support for creating 1:1 mapping for the PPC_47x during
      a KEXEC. The implementation is similar to that of the PPC440x which is
      described here :
      
      	http://patchwork.ozlabs.org/patch/104323/
      
      PPC_47x MMU :
      
      The 47x uses Unified TLB 1024 entries, with 4-way associative mapping
      (4 x 256 entries). The index to be used is calculated by the MMU by
      hashing the PID, EPN and TS. The software can choose to specify the way
      by setting bit 0(enable way select) and the way in bits 1-2 in the TLB
      Word 0.
      
      Implementation:
      
      The patch erases all the UTLB entries which includes the tlb covering
      the mapping for our code. The shadow TLB caches the mapping for the
      running code which helps us to continue the execution until we do
      isync/rfi. We then create a tmp mapping for the current code in the
      other address space (TS) and switch to it.
      
      Then we create a 1:1 mapping(EPN=RPN) for 0-2GiB in the original
      address space and switch to the new mapping.
      
      TODO: Add SMP support.
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      68343020
  8. 26 4月, 2012 1 次提交
  9. 16 3月, 2012 1 次提交
    • C
      [PATCH v3] ipc: provide generic compat versions of IPC syscalls · 48b25c43
      Chris Metcalf 提交于
      When using the "compat" APIs, architectures will generally want to
      be able to make direct syscalls to msgsnd(), shmctl(), etc., and
      in the kernel we would want them to be handled directly by
      compat_sys_xxx() functions, as is true for other compat syscalls.
      
      However, for historical reasons, several of the existing compat IPC
      syscalls do not do this.  semctl() expects a pointer to the fourth
      argument, instead of the fourth argument itself.  msgsnd(), msgrcv()
      and shmat() expect arguments in different order.
      
      This change adds an ARCH_WANT_OLD_COMPAT_IPC config option that can be
      set to preserve this behavior for ports that use it (x86, sparc, powerpc,
      s390, and mips).  No actual semantics are changed for those architectures,
      and there is only a minimal amount of code refactoring in ipc/compat.c.
      
      Newer architectures like tile (and perhaps future architectures such
      as arm64 and unicore64) should not select this option, and thus can
      avoid having any IPC-specific code at all in their architecture-specific
      compat layer.  In the same vein, if this option is not selected, IPC_64
      mode is assumed, since that's what the <asm-generic> headers expect.
      
      The workaround code in "tile" for msgsnd() and msgrcv() is removed
      with this change; it also fixes the bug that shmat() and semctl() were
      not being properly handled.
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      48b25c43
  10. 07 3月, 2012 1 次提交
    • G
      powerpc: Make SPARSE_IRQ required · ad5b7f13
      Grant Likely 提交于
      All IRQs on powerpc are managed via irq_domain anyway, there isn't really
      any advantage to turning SPARSE_IRQ off, and it's the direction we want
      to take the kernel design anyway.  This patch makes powerpc always use
      SPARSE_IRQ.
      
      On pseries_defconfig, SPARSE_IRQ adds only about 0x300 bytes to the
      .text sections, and removes about 0x20000 from the data section for the
      static irq_desc table.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Ben Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ad5b7f13
  11. 27 2月, 2012 1 次提交
  12. 23 2月, 2012 2 次提交
  13. 16 2月, 2012 1 次提交
  14. 26 1月, 2012 1 次提交
    • R
      irq: make SPARSE_IRQ an optionally hidden option · 2ed86b16
      Rob Herring 提交于
      On ARM, we don't want SPARSE_IRQ to be a user visible option. Make
      SPARSE_IRQ visible based on MAY_HAVE_SPARSE_IRQ instead of depending
      on HAVE_SPARSE_IRQ.
      
      With this, SPARSE_IRQ is not visible on C6X and ARM.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-c6x-dev@linux-c6x.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-sh@vger.kernel.org
      2ed86b16
  15. 05 1月, 2012 1 次提交
  16. 20 12月, 2011 5 次提交
    • S
      powerpc/44x: Enable CRASH_DUMP for 440x · 5b2e478d
      Suzuki Poulose 提交于
      Now that we have relocatable kernel, supporting CRASH_DUMP only requires
      turning the switches on for UP machines.
      
      We don't have kexec support on 47x yet. Enabling SMP support would be done
      as part of enabling the PPC_47x support.
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      5b2e478d
    • S
      powerpc/44x: Enable CONFIG_RELOCATABLE for PPC44x · 26ecb6c4
      Suzuki Poulose 提交于
      The following patch adds relocatable kernel support - based on processing
      of dynamic relocations - for PPC44x kernel.
      
      We find the runtime address of _stext and relocate ourselves based
      on the following calculation.
      
      	virtual_base = ALIGN(KERNELBASE,256M) +
      			MODULO(_stext.run,256M)
      
      relocate() is called with the Effective Virtual Base Address (as
      shown below)
      
                  | Phys. Addr| Virt. Addr |
      Page (256M) |------------------------|
      Boundary    |           |            |
                  |           |            |
                  |           |            |
      Kernel Load |___________|_ __ _ _ _ _|<- Effective
      Addr(_stext)|           |      ^     |Virt. Base Addr
                  |           |      |     |
                  |           |      |     |
                  |           |reloc_offset|
                  |           |      |     |
                  |           |      |     |
                  |           |______v_____|<-(KERNELBASE)%256M
                  |           |            |
                  |           |            |
                  |           |            |
      Page(256M)  |-----------|------------|
      Boundary    |           |            |
      
      The virt_phys_offset is updated accordingly, i.e,
      
      	virt_phys_offset = effective. kernel virt base - kernstart_addr
      
      I have tested the patches on 440x platforms only. However this should
      work fine for PPC_47x also, as we only depend on the runtime address
      and the current TLB XLAT entry for the startup code, which is available
      in r25. I don't have access to a 47x board yet. So, it would be great if
      somebody could test this on 47x.
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Tony Breeds <tony@bakeyournoodle.com>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      26ecb6c4
    • S
      powerpc: Process dynamic relocations for kernel · 9c5f7d39
      Suzuki Poulose 提交于
      The following patch implements the dynamic relocation processing for
      PPC32 kernel. relocate() accepts the target virtual address and relocates
       the kernel image to the same.
      
      Currently the following relocation types are handled :
      
      	R_PPC_RELATIVE
      	R_PPC_ADDR16_LO
      	R_PPC_ADDR16_HI
      	R_PPC_ADDR16_HA
      
      The last 3 relocations in the above list depends on value of Symbol indexed
      whose index is encoded in the Relocation entry. Hence we need the Symbol
      Table for processing such relocations.
      
      Note: The GNU ld for ppc32 produces buggy relocations for relocation types
      that depend on symbols. The value of the symbols with STB_LOCAL scope
      should be assumed to be zero. - Alan Modra
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: NJosh Poimboeuf <jpoimboe@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Alan Modra <amodra@au1.ibm.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      9c5f7d39
    • S
      powerpc/44x: Enable DYNAMIC_MEMSTART for 440x · 23913245
      Suzuki Poulose 提交于
      DYNAMIC_MEMSTART(old RELOCATABLE) was restricted only to PPC_47x variants
      of 44x. This patch enables DYNAMIC_MEMSTART for 440x based chipsets.
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: linux ppc dev <linuxppc-dev@lists.ozlabs.org>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      23913245
    • S
      powerpc: Rename mapping based RELOCATABLE to DYNAMIC_MEMSTART for BookE · 0f890c8d
      Suzuki Poulose 提交于
      The current implementation of CONFIG_RELOCATABLE in BookE is based
      on mapping the page aligned kernel load address to KERNELBASE. This
      approach however is not enough for platforms, where the TLB page size
      is large (e.g, 256M on 44x). So we are renaming the RELOCATABLE used
      currently in BookE to DYNAMIC_MEMSTART to reflect the actual method.
      
      The CONFIG_RELOCATABLE for PPC32(BookE) based on processing of the
      dynamic relocations will be introduced in the later in the patch series.
      
      This change would allow the use of the old method of RELOCATABLE for
      platforms which can afford to enforce the page alignment (platforms with
      smaller TLB size).
      
      Changes since v3:
      
      * Introduced a new config, NONSTATIC_KERNEL, to denote a kernel which is
        either a RELOCATABLE or DYNAMIC_MEMSTART(Suggested by: Josh Boyer)
      Suggested-by: NScott Wood <scottwood@freescale.com>
      Tested-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: linux ppc dev <linuxppc-dev@lists.ozlabs.org>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      0f890c8d
  17. 09 12月, 2011 2 次提交
    • T
      memblock: Kill early_node_map[] · 0ee332c1
      Tejun Heo 提交于
      Now all ARCH_POPULATES_NODE_MAP archs select HAVE_MEBLOCK_NODE_MAP -
      there's no user of early_node_map[] left.  Kill early_node_map[] and
      replace ARCH_POPULATES_NODE_MAP with HAVE_MEMBLOCK_NODE_MAP.  Also,
      relocate for_each_mem_pfn_range() and helper from mm.h to memblock.h
      as page_alloc.c would no longer host an alternative implementation.
      
      This change is ultimately one to one mapping and shouldn't cause any
      observable difference; however, after the recent changes, there are
      some functions which now would fit memblock.c better than page_alloc.c
      and dependency on HAVE_MEMBLOCK_NODE_MAP instead of HAVE_MEMBLOCK
      doesn't make much sense on some of them.  Further cleanups for
      functions inside HAVE_MEMBLOCK_NODE_MAP in mm.h would be nice.
      
      -v2: Fix compile bug introduced by mis-spelling
       CONFIG_HAVE_MEMBLOCK_NODE_MAP to CONFIG_MEMBLOCK_HAVE_NODE_MAP in
       mmzone.h.  Reported by Stephen Rothwell.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      0ee332c1
    • T
      powerpc: Use HAVE_MEMBLOCK_NODE_MAP · 1d7cfe18
      Tejun Heo 提交于
      powerpc doesn't access early_node_map[] directly and enabling
      HAVE_MEMBLOCK_NODE_MAP is trivial - replacing add_active_range() calls
      with memblock_set_node() and selecting HAVE_MEMBLOCK_NODE_MAP is
      enough.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      1d7cfe18
  18. 08 12月, 2011 1 次提交
  19. 29 11月, 2011 1 次提交
    • M
      powerpc: switch to GENERIC_PCI_IOMAP · 335b8cf7
      Michael S. Tsirkin 提交于
      powerpc copied pci_iomap from generic code, probably to avoid
      pulling the rest of iomap.c in.  Since that's in
      a separate file now, we can reuse the common implementation.
      
      The only difference is handling of nocache flag,
      that turns out to be done correctly by the
      generic code since arch/powerpc/include/asm/io.h
      defines ioremap_nocache same as ioremap.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      335b8cf7
  20. 25 11月, 2011 1 次提交
  21. 16 11月, 2011 1 次提交
  22. 01 11月, 2011 1 次提交
  23. 20 9月, 2011 2 次提交
  24. 18 8月, 2011 1 次提交
  25. 12 8月, 2011 1 次提交
  26. 03 8月, 2011 1 次提交
  27. 22 7月, 2011 2 次提交
    • D
      net: Fix ppc64 BPF JIT dependencies. · 368940d0
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      368940d0
    • M
      net: filter: BPF 'JIT' compiler for PPC64 · 0ca87f05
      Matt Evans 提交于
      An implementation of a code generator for BPF programs to speed up packet
      filtering on PPC64, inspired by Eric Dumazet's x86-64 version.
      
      Filter code is generated as an ABI-compliant function in module_alloc()'d mem
      with stackframe & prologue/epilogue generated if required (simple filters don't
      need anything more than an li/blr).  The filter's local variables, M[], live in
      registers.  Supports all BPF opcodes, although "complicated" loads from negative
      packet offsets (e.g. SKF_LL_OFF) are not yet supported.
      
      There are a couple of further optimisations left for future work; many-pass
      assembly with branch-reach reduction and a register allocator to push M[]
      variables into volatile registers would improve the code quality further.
      
      This currently supports big-endian 64-bit PowerPC only (but is fairly simple
      to port to PPC32 or LE!).
      
      Enabled in the same way as x86-64:
      
      	echo 1 > /proc/sys/net/core/bpf_jit_enable
      
      Or, enabled with extra debug output:
      
      	echo 2 > /proc/sys/net/core/bpf_jit_enable
      Signed-off-by: NMatt Evans <matt@ozlabs.org>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ca87f05
  28. 12 7月, 2011 1 次提交
  29. 01 7月, 2011 1 次提交