1. 02 3月, 2017 5 次提交
  2. 28 2月, 2017 1 次提交
  3. 25 2月, 2017 1 次提交
  4. 23 2月, 2017 3 次提交
    • F
      powerpc: Remove leftover cputime_to_nsecs call causing build error · 9f3768e0
      Frédéric Weisbecker 提交于
      This type conversion is a leftover that got ignored during the kcpustat
      conversion to nanosecs, resulting in build breakage with config having
      CONFIG_NO_HZ_FULL=y.
      
      	arch/powerpc/kernel/time.c: In function 'running_clock':
      	arch/powerpc/kernel/time.c:712:2: error: implicit declaration of function 'cputime_to_nsecs' [-Werror=implicit-function-declaration]
      	  return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPUTIME_STEAL]);
      
      All we need is to remove it.
      
      Fixes: e7f340ca ("powerpc, sched/cputime: Remove unused cputime definitions")
      Reported-by: NAbdul Haleem <abdhalee@linux.vnet.ibm.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      9f3768e0
    • A
      powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU · fda2d27d
      Aneesh Kumar K.V 提交于
      We will set LPCR with correct value for radix during int. This make sure we
      start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR
      value based on the previous translation mode we were running.
      
      Fixes: fe036a06 ("powerpc/64/kexec: Fix MMU cleanup on radix")
      Cc: stable@vger.kernel.org # v4.9+
      Acked-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      fda2d27d
    • N
      powerpc/optprobes: Fix TOC handling in optprobes trampoline · f558b37b
      Naveen N. Rao 提交于
      Optprobes on powerpc are limited to kernel text area. We decided to also
      optimize kretprobe_trampoline since that is also in kernel text area.
      However,we failed to take into consideration the fact that the same
      trampoline is also used to catch function returns from kernel modules.
      As an example:
      
        $ sudo modprobe kobject-example
        $ sudo bash -c "echo 'r foo_show+8' > /sys/kernel/debug/tracing/kprobe_events"
        $ sudo bash -c "echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable"
        $ sudo cat /sys/kernel/debug/kprobes/list
        c000000000041350  k  kretprobe_trampoline+0x0    [OPTIMIZED]
        d000000000e00200  r  foo_show+0x8  kobject_example
        $ cat /sys/kernel/kobject_example/foo
        Segmentation fault
      
      With the below (trimmed) splat in dmesg:
      
        Unable to handle kernel paging request for data at address 0xfec40000
        Faulting instruction address: 0xc000000000041540
        Oops: Kernel access of bad area, sig: 11 [#1]
        ...
        NIP [c000000000041540] optimized_callback+0x70/0xe0
        LR [c000000000041e60] optinsn_slot+0xf8/0x10000
        Call Trace:
        [c0000000c7327850] [c000000000289af4] alloc_set_pte+0x1c4/0x860 (unreliable)
        [c0000000c7327890] [c000000000041e60] optinsn_slot+0xf8/0x10000
        --- interrupt: 700 at 0xc0000000c7327a80
      	       LR = kretprobe_trampoline+0x0/0x10
        [c0000000c7327ba0] [c0000000003a30d4] sysfs_kf_seq_show+0x104/0x1d0
        [c0000000c7327bf0] [c0000000003a0bb4] kernfs_seq_show+0x44/0x60
        [c0000000c7327c10] [c000000000330578] seq_read+0xf8/0x560
        [c0000000c7327cb0] [c0000000003a1e64] kernfs_fop_read+0x194/0x260
        [c0000000c7327d00] [c0000000002f9954] __vfs_read+0x44/0x1a0
        [c0000000c7327d90] [c0000000002fb4cc] vfs_read+0xbc/0x1b0
        [c0000000c7327de0] [c0000000002fd138] SyS_read+0x68/0x110
        [c0000000c7327e30] [c00000000000b8e0] system_call+0x38/0xfc
      
      Fix this by loading up the kernel TOC before calling into the kernel.
      The original TOC gets restored as part of the usual pt_regs restore.
      
      Fixes: 762df10b ("powerpc/kprobes: Optimize kprobe in kretprobe_trampoline()")
      Signed-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f558b37b
  5. 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
  6. 17 2月, 2017 2 次提交
  7. 15 2月, 2017 4 次提交
  8. 10 2月, 2017 4 次提交
  9. 07 2月, 2017 4 次提交
  10. 06 2月, 2017 8 次提交
  11. 04 2月, 2017 1 次提交
    • A
      modversions: treat symbol CRCs as 32 bit quantities · 71810db2
      Ard Biesheuvel 提交于
      The modversion symbol CRCs are emitted as ELF symbols, which allows us
      to easily populate the kcrctab sections by relying on the linker to
      associate each kcrctab slot with the correct value.
      
      This has a couple of downsides:
      
       - Given that the CRCs are treated as memory addresses, we waste 4 bytes
         for each CRC on 64 bit architectures,
      
       - On architectures that support runtime relocation, a R_<arch>_RELATIVE
         relocation entry is emitted for each CRC value, which identifies it
         as a quantity that requires fixing up based on the actual runtime
         load offset of the kernel. This results in corrupted CRCs unless we
         explicitly undo the fixup (and this is currently being handled in the
         core module code)
      
       - Such runtime relocation entries take up 24 bytes of __init space
         each, resulting in a x8 overhead in [uncompressed] kernel size for
         CRCs.
      
      Switching to explicit 32 bit values on 64 bit architectures fixes most
      of these issues, given that 32 bit values are not treated as quantities
      that require fixing up based on the actual runtime load offset.  Note
      that on some ELF64 architectures [such as PPC64], these 32-bit values
      are still emitted as [absolute] runtime relocatable quantities, even if
      the value resolves to a build time constant.  Since relative relocations
      are always resolved at build time, this patch enables MODULE_REL_CRCS on
      powerpc when CONFIG_RELOCATABLE=y, which turns the absolute CRC
      references into relative references into .rodata where the actual CRC
      value is stored.
      
      So redefine all CRC fields and variables as u32, and redefine the
      __CRC_SYMBOL() macro for 64 bit builds to emit the CRC reference using
      inline assembler (which is necessary since 64-bit C code cannot use
      32-bit types to hold memory addresses, even if they are ultimately
      resolved using values that do not exceed 0xffffffff).  To avoid
      potential problems with legacy 32-bit architectures using legacy
      toolchains, the equivalent C definition of the kcrctab entry is retained
      for 32-bit architectures.
      
      Note that this mostly reverts commit d4703aef ("module: handle ppc64
      relocating kcrctabs when CONFIG_RELOCATABLE=y")
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      71810db2
  12. 03 2月, 2017 1 次提交
  13. 02 2月, 2017 1 次提交
  14. 01 2月, 2017 4 次提交