1. 03 Aug, 2017 12 commits
  2. 02 Aug, 2017 5 commits
  3. 01 Aug, 2017 3 commits
    • Victor Aoqui's avatar
      powerpc/kernel: Avoid preemption check in iommu_range_alloc() · 75f327c6
      Victor Aoqui authored
      Replace the __this_cpu_read() with raw_cpu_read() in
      iommu_range_alloc(). Otherwise we get a warning about using
      __this_cpu_read() in preemptible code:
      
        BUG: using __this_cpu_read() in preemptible
        caller is iommu_range_alloc+0xa8/0x3d0
      
      Preemption doesn't need to be disabled since according to the comment
      any CPU can safely use any IOMMU pool.
      Signed-off-by: default avatarVictor Aoqui <victora@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      75f327c6
    • Gautham R. Shenoy's avatar
      powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug · 24be85a2
      Gautham R. Shenoy authored
      Currently we use the stop-api provided by the firmware to program the
      SLW engine to restore the values of hypervisor resources that get lost
      on deeper idle states (such as winkle). Since the deep states were
      only used for CPU-Hotplug on POWER8 systems, we would program the LPCR
      to have the PECE1 bit since Hotplugged CPUs shouldn't be spuriously
      woken up by decrementer.
      
      On POWER9, some of the deep platform idle states such as stop4 can be
      used in cpuidle as well. In this case, we want the CPU in stop4 to be
      woken up by the decrementer when some timer on the CPU expires.
      
      In this patch, we program the stop-api for LPCR with PECE1
      bit cleared only when we are offlining the CPU and set it
      back once the CPU is online.
      Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      24be85a2
    • Gautham R. Shenoy's avatar
      powerpc/powernv: Save/Restore additional SPRs for stop4 cpuidle · e1c1cfed
      Gautham R. Shenoy authored
      The stop4 idle state on POWER9 is a deep idle state which loses
      hypervisor resources, but whose latency is low enough that it can be
      exposed via cpuidle.
      
      Until now, the deep idle states which lose hypervisor resources (eg:
      winkle) were only exposed via CPU-Hotplug.  Hence currently on wakeup
      from such states, barring a few SPRs which need to be restored to
      their older value, rest of the SPRS are reinitialized to their values
      corresponding to that at boot time.
      
      When stop4 is used in the context of cpuidle, we want these additional
      SPRs to be restored to their older value, to ensure that the context
      on the CPU coming back from idle is same as it was before going idle.
      
      In this patch, we define a SPR save area in PACA (since we have used
      up the volatile register space in the stack) and on POWER9, we restore
      SPRN_PID, SPRN_LDBAR, SPRN_FSCR, SPRN_HFSCR, SPRN_MMCRA, SPRN_MMCR1,
      SPRN_MMCR2 to the values they had before entering stop.
      Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      e1c1cfed
  4. 31 Jul, 2017 3 commits
    • Rui Teng's avatar
      powerpc/mm: Fix check of multiple 16G pages from device tree · 23493c12
      Rui Teng authored
      The offset of hugepage block will not be 16G, if the expected
      page is more than one. Calculate the totol size instead of the
      hardcode value.
      
      Fixes: 4792adba ("powerpc: Don't use a 16G page if beyond mem= limits")
      Signed-off-by: default avatarRui Teng <rui.teng@linux.vnet.ibm.com>
      Tested-by: default avatarAnshuman Khandual <khandual@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      23493c12
    • Michael Ellerman's avatar
      powerpc/udbg: Reduce the footgun potential of EARLY_DEBUG_LPAR(_HVSI) · 9227f043
      Michael Ellerman authored
      For debugging very early boot problems we have CONFIG_PPC_EARLY_DEBUG,
      which allows configuring the kernel such that it unconditionally writes
      to a particular type of console, regardless of whether that console
      exists or not. This is useful sometimes when the kernel crashes before
      it can even determine what platform it's on, and therefore what consoles
      exist.
      
      However if you boot a kernel built this way on a different platform, it
      will generally crash because it writes to a console that doesn't exist.
      
      A particularly nasty instance of this is if you enable the hypervisor
      console early debug, and then boot that kernel on bare metal. The result
      is that the kernel calls "the hypervisor" very early in boot, but the
      kernel *is* the hypervisor, so we jump to the system call handler and
      start executing all sorts of code that isn't ready to be run. This may
      lead to a machine check or check stop depending on how lucky you are.
      
      Luckily there is an easy way to avoid this particular case. We simply
      read the MSR before installing the hooks, and if we see MSR_HV is set
      then we are the hypervisor and we definitely should not use the
      hypervisor console.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      9227f043
    • Michael Ellerman's avatar
      powerpc/configs: Add a powernv_be_defconfig · 3603c52f
      Michael Ellerman authored
      Although pretty much everyone using powernv is running little endian,
      we should still test we can build for big endian. So add a
      powernv_be_defconfig, which is autogenerated by flipping the endian
      symbol in powernv_defconfig.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Reviewed-by: default avatarCyril Bur <cyrilbur@gmail.com>
      3603c52f
  5. 25 Jul, 2017 4 commits
  6. 24 Jul, 2017 8 commits
  7. 23 Jul, 2017 5 commits
    • Linus Torvalds's avatar
      Linux 4.13-rc2 · 520eccdf
      Linus Torvalds authored
      520eccdf
    • Linus Torvalds's avatar
      Properly alphabetize MAINTAINERS file · 7683e9e5
      Linus Torvalds authored
      This adds a perl script to actually parse the MAINTAINERS file, clean up
      some whitespace in it, warn about errors in it, and then properly sort
      the end result.
      
      My perl-fu is atrocious, so the script has basically been created by
      randomly putting various characters in a pile, mixing them around, and
      then looking it the end result does anything interesting when used as a
      perl script.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7683e9e5
    • Linus Torvalds's avatar
      Fix up MAINTAINERS file problems · f47e07bc
      Linus Torvalds authored
      Prepping for scripting the MAINTAINERS file cleanup (and possible split)
      showed a couple of cases where the headers for a couple of entries were
      bogus.
      
      There's a few different kinds of bogosities:
      
       - the X-GENE SOC EDAC case was confused and split over two lines
      
       - there were four entries for "GREYBUS PROTOCOLS DRIVERS" that were all
         different things.
      
       - the NOKIA N900 CAMERA SUPPORT" was duplicated
      
      all of which were more obvious when you started doing associative arrays
      in perl to track these things by the header (so that we can alphabetize
      this thing properly, and so that we might split it up by the data too).
      
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f47e07bc
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · a56e88ec
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Some fixes and cleanups for running under Xen"
      
      * tag 'for-linus-4.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/balloon: don't online new memory initially
        xen/x86: fix cpu hotplug
        xen/grant-table: log the lack of grants
        xen/x86: Don't BUG on CPU0 offlining
      a56e88ec
    • Juergen Gross's avatar
      xen/balloon: don't online new memory initially · 96edd61d
      Juergen Gross authored
      When setting up the Xenstore watch for the memory target size the new
      watch will fire at once. Don't try to reach the configured target size
      by onlining new memory in this case, as the current memory size will
      be smaller in almost all cases due to e.g. BIOS reserved pages.
      
      Onlining new memory will lead to more problems e.g. undesired conflicts
      with NVMe devices meant to be operated as block devices.
      
      Instead remember the difference between target size and current size
      when the watch fires for the first time and apply it to any further
      size changes, too.
      
      In order to avoid races between balloon.c and xen-balloon.c init calls
      do the xen-balloon.c initialization from balloon.c.
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      96edd61d