1. 06 3月, 2018 1 次提交
  2. 22 2月, 2018 1 次提交
    • M
      powerpc/pseries: Revert support for ibm,drc-info devtree property · c7a3275e
      Michael Bringmann 提交于
      This reverts commit 02ef6dd8.
      
      The earlier patch tried to enable support for a new property
      "ibm,drc-info" on powerpc systems.
      
      Unfortunately, some errors in the associated patch set break things
      in some of the DLPAR operations.  In particular when attempting to
      hot-add a new CPU or set of CPUs, the original patch failed to
      properly calculate the available resources, and aborted the operation.
      In addition, the original set missed several opportunities to compress
      and reuse common code.
      
      As the associated patch set was meant to provide an optimization of
      storage and performance of a set of device-tree properties for future
      systems with large amounts of resources, reverting just restores
      the previous behavior for existing systems.  It seems unnecessary
      to enable this feature and introduce the consequent problems in the
      field that it will cause at this time, so please revert it for now
      until testing of the corrections are finished properly.
      
      Fixes: 02ef6dd8 ("powerpc: Enable support for ibm,drc-info devtree property")
      Signed-off-by: NMichael W. Bringmann <mwb@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c7a3275e
  3. 21 2月, 2018 1 次提交
  4. 15 2月, 2018 1 次提交
  5. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  6. 11 2月, 2018 1 次提交
  7. 08 2月, 2018 1 次提交
    • N
      powerpc/64s: Fix may_hard_irq_enable() for PMI soft masking · 6cc3f91b
      Nicholas Piggin 提交于
      The soft IRQ masking code has to hard-disable interrupts in cases
      where the exception is not cleared by the masked handler. External
      interrupts used this approach for soft masking. Now recently PMU
      interrupts do the same thing.
      
      The soft IRQ masking code additionally allowed for interrupt handlers
      to hard-enable interrupts after soft-disabling them. The idea is to
      allow PMU interrupts through to profile interrupt handlers.
      
      So when interrupts are being replayed when there is a pending
      interrupt that requires hard-disabling, there is a test to prevent
      those handlers from hard-enabling them if there is a pending external
      interrupt. may_hard_irq_enable() handles this.
      
      After f442d004 ("powerpc/64s: Add support to mask perf interrupts
      and replay them"), may_hard_irq_enable() could prematurely enable
      MSR[EE] when a PMU exception exists, which would result in the
      interrupt firing again while masked, and MSR[EE] being disabled again.
      
      I haven't seen that this could cause a serious problem, but it's
      more consistent to handle these soft-masked interrupts in the same
      way. So introduce a define for all types of interrupts that require
      MSR[EE] masking in their soft-disable handlers, and use that in
      may_hard_irq_enable().
      
      Fixes: f442d004 ("powerpc/64s: Add support to mask perf interrupts and replay them")
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Reviewed-by: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      6cc3f91b
  8. 28 1月, 2018 3 次提交
  9. 27 1月, 2018 5 次提交
  10. 23 1月, 2018 3 次提交
  11. 22 1月, 2018 4 次提交
    • N
      powerpc/pseries, ps3: panic flush kernel messages before halting system · 35adacd6
      Nicholas Piggin 提交于
      Platforms with a panic handler that halts the system can have problems
      getting kernel messages out, because the panic notifiers are called
      before kernel/panic.c does its flushing of printk buffers an console
      etc.
      
      This was attempted to be solved with commit a3b2cb30 ("powerpc: Do
      not call ppc_md.panic in fadump panic notifier"), but that wasn't the
      right approach and caused other problems, and was reverted by commit
      ab9dbf77.
      
      Instead, the powernv shutdown paths have already had a similar
      problem, fixed by taking the message flushing sequence from
      kernel/panic.c. That's a little bit ugly, but while we have the code
      duplicated, it will work for this case as well. So have ppc panic
      handlers do the same flushing before they terminate.
      
      Without this patch, a qemu pseries_le_defconfig guest stops silently
      when issued the nmi command when xmon is off and no crash dumpers
      enabled. Afterwards, an oops is printed by each CPU as expected.
      
      Fixes: ab9dbf77 ("Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier"")
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      35adacd6
    • G
      powerpc/tm: Fix endianness flip on trap · 1c200e63
      Gustavo Romero 提交于
      Currently it's possible that a thread on PPC64 LE has its endianness
      flipped inadvertently to Big-Endian resulting in a crash once the process
      is back from the signal handler.
      
      If giveup_all() is called when regs->msr has the bits MSR.FP and MSR.VEC
      disabled (and hence MSR.VSX disabled too) it returns without calling
      check_if_tm_restore_required() which copies regs->msr to ckpt_regs->msr if
      the process caught a signal whilst in transactional mode. Then once in
      setup_tm_sigcontexts() MSR from ckpt_regs.msr is used, but since
      check_if_tm_restore_required() was not called previuosly, gp_regs[PT_MSR]
      gets a copy of invalid MSR bits as MSR in ckpt_regs was not updated from
      regs->msr and so is zeroed. Later when leaving the signal handler once in
      sys_rt_sigreturn() the TS bits of gp_regs[PT_MSR] are checked to determine
      if restore_tm_sigcontexts() must be called to pull in the correct MSR state
      into the user context. Because TS bits are zeroed
      restore_tm_sigcontexts() is never called and MSR restored from the user
      context on returning from the signal handler has the MSR.LE (the endianness
      bit) forced to zero (Big-Endian). That leads, for instance, to 'nop' being
      treated as an illegal instruction in the following sequence:
      
      	tbegin.
      	beq	1f
      	trap
      	tend.
      1:	nop
      
      on PPC64 LE machines and the process dies just after returning from the
      signal handler.
      
      PPC64 BE is also affected but in a subtle way since forcing Big-Endian on
      a BE machine does not change the endianness.
      
      This commit fixes the issue described above by ensuring that once in
      setup_tm_sigcontexts() the MSR used is from regs->msr instead of from
      ckpt_regs->msr and by ensuring that we pull in only the MSR.FP, MSR.VEC,
      and MSR.VSX bits from ckpt_regs->msr.
      
      The fix was tested both on LE and BE machines and no regression regarding
      the powerpc/tm selftests was observed.
      Signed-off-by: NGustavo Romero <gromero@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1c200e63
    • A
      powerpc: Expose TSCR via sysfs · b6d34eb4
      Anton Blanchard 提交于
      The thread switch control register (TSCR) is a per core register
      that configures how the CPU shares resources between SMT threads.
      
      Exposing it via sysfs allows us to tune it at run time.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b6d34eb4
    • R
      powerpc: Use octal numbers for file permissions · 57ad583f
      Russell Currey 提交于
      Symbolic macros are unintuitive and hard to read, whereas octal constants
      are much easier to interpret.  Replace macros for the basic permission
      flags (user/group/other read/write/execute) with numeric constants
      instead, across the whole powerpc tree.
      
      Introducing a significant number of changes across the tree for no runtime
      benefit isn't exactly desirable, but so long as these macros are still
      used in the tree people will keep sending patches that add them.  Not only
      are they hard to parse at a glance, there are multiple ways of coming to
      the same value (as you can see with 0444 and 0644 in this patch) which
      hurts readability.
      Signed-off-by: NRussell Currey <ruscur@russell.cc>
      Reviewed-by: NCyril Bur <cyrilbur@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      57ad583f
  12. 21 1月, 2018 2 次提交
  13. 20 1月, 2018 4 次提交
  14. 19 1月, 2018 12 次提交