1. 10 1月, 2013 1 次提交
  2. 20 12月, 2012 1 次提交
  3. 29 11月, 2012 1 次提交
  4. 15 10月, 2012 1 次提交
  5. 09 10月, 2012 2 次提交
  6. 01 10月, 2012 1 次提交
  7. 28 9月, 2012 1 次提交
    • D
      Make most arch asm/module.h files use asm-generic/module.h · 786d35d4
      David Howells 提交于
      Use the mapping of Elf_[SPE]hdr, Elf_Addr, Elf_Sym, Elf_Dyn, Elf_Rel/Rela,
      ELF_R_TYPE() and ELF_R_SYM() to either the 32-bit version or the 64-bit version
      into asm-generic/module.h for all arches bar MIPS.
      
      Also, use the generic definition mod_arch_specific where possible.
      
      To this end, I've defined three new config bools:
      
       (*) HAVE_MOD_ARCH_SPECIFIC
      
           Arches define this if they don't want to use the empty generic
           mod_arch_specific struct.
      
       (*) MODULES_USE_ELF_RELA
      
           Arches define this if their modules can contain RELA records.  This causes
           the Elf_Rela mapping to be emitted and allows apply_relocate_add() to be
           defined by the arch rather than have the core emit an error message.
      
       (*) MODULES_USE_ELF_REL
      
           Arches define this if their modules can contain REL records.  This causes
           the Elf_Rel mapping to be emitted and allows apply_relocate() to be
           defined by the arch rather than have the core emit an error message.
      
      Note that it is possible to allow both REL and RELA records: m68k and mips are
      two arches that do this.
      
      With this, some arch asm/module.h files can be deleted entirely and replaced
      with a generic-y marker in the arch Kbuild file.
      
      Additionally, I have removed the bits from m32r and score that handle the
      unsupported type of relocation record as that's now handled centrally.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      786d35d4
  8. 25 9月, 2012 1 次提交
    • J
      time: Convert CONFIG_GENERIC_TIME_VSYSCALL to CONFIG_GENERIC_TIME_VSYSCALL_OLD · 70639421
      John Stultz 提交于
      To help migrate archtectures over to the new update_vsyscall method,
      redfine CONFIG_GENERIC_TIME_VSYSCALL as CONFIG_GENERIC_TIME_VSYSCALL_OLD
      
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Turner <pjt@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      70639421
  9. 17 9月, 2012 1 次提交
  10. 13 9月, 2012 1 次提交
  11. 05 9月, 2012 1 次提交
    • A
      powerpc: Uprobes port to powerpc · 8b7b80b9
      Ananth N Mavinakayanahalli 提交于
      This is the port of uprobes to powerpc. Usage is similar to x86.
      
      [root@xxxx ~]# ./bin/perf probe -x /lib64/libc.so.6 malloc
      Added new event:
        probe_libc:malloc    (on 0xb4860)
      
      You can now use it in all perf tools, such as:
      
      	perf record -e probe_libc:malloc -aR sleep 1
      
      [root@xxxx ~]# ./bin/perf record -e probe_libc:malloc -aR sleep 20
      [ perf record: Woken up 22 times to write data ]
      [ perf record: Captured and wrote 5.843 MB perf.data (~255302 samples) ]
      [root@xxxx ~]# ./bin/perf report --stdio
      ...
      
          69.05%           tar  libc-2.12.so   [.] malloc
          28.57%            rm  libc-2.12.so   [.] malloc
           1.32%  avahi-daemon  libc-2.12.so   [.] malloc
           0.58%          bash  libc-2.12.so   [.] malloc
           0.28%          sshd  libc-2.12.so   [.] malloc
           0.08%    irqbalance  libc-2.12.so   [.] malloc
           0.05%         bzip2  libc-2.12.so   [.] malloc
           0.04%         sleep  libc-2.12.so   [.] malloc
           0.03%    multipathd  libc-2.12.so   [.] malloc
           0.01%      sendmail  libc-2.12.so   [.] malloc
           0.01%     automount  libc-2.12.so   [.] malloc
      
      The trap_nr addition patch is a prereq.
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8b7b80b9
  12. 31 7月, 2012 2 次提交
  13. 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
  14. 28 5月, 2012 1 次提交
  15. 22 5月, 2012 2 次提交
  16. 21 5月, 2012 1 次提交
  17. 08 5月, 2012 1 次提交
  18. 05 5月, 2012 2 次提交
  19. 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
  20. 26 4月, 2012 1 次提交
  21. 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
  22. 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
  23. 27 2月, 2012 1 次提交
  24. 23 2月, 2012 2 次提交
  25. 16 2月, 2012 1 次提交
  26. 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
  27. 05 1月, 2012 1 次提交
  28. 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
  29. 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