1. 14 Oct, 2021 1 commit
    • Athira Rajeev's avatar
      powerpc/perf: Fix cycles/instructions as PM_CYC/PM_INST_CMPL in power10 · 8f6aca0e
      Athira Rajeev authored
      On power9 and earlier platforms, the default event used for cyles and
      instructions is PM_CYC (0x0001e) and PM_INST_CMPL (0x00002)
      respectively. These events use two programmable PMCs and by default will
      count irrespective of the run latch state (idle state). But since they
      use programmable PMCs, these events can lead to multiplexing with other
      events, because there are only 4 programmable PMCs. Hence in power10,
      performance monitoring unit (PMU) driver uses performance monitor
      counter 5 (PMC5) and performance monitor counter6 (PMC6) for counting
      instructions and cycles.
      
      Currently on power10, the event used for cycles is PM_RUN_CYC (0x600F4)
      and instructions uses PM_RUN_INST_CMPL (0x500fa). But counting of these
      events in idle state is controlled by the CC56RUN bit setting in Monitor
      Mode Control Register0 (MMCR0). If the CC56RUN bit is zero, PMC5/6 will
      not count when CTRL[RUN] (run latch) is zero. This could lead to missing
      some counts if a thread is in idle state during system wide profiling.
      
      To fix it, set the CC56RUN bit in MMCR0 for power10, which makes PMC5
      and PMC6 count instructions and cycles regardless of the run latch
      state. Since this change make PMC5/6 count as PM_INST_CMPL/PM_CYC,
      rename the event code 0x600f4 as PM_CYC instead of PM_RUN_CYC and event
      code 0x500fa as PM_INST_CMPL instead of PM_RUN_INST_CMPL. The changes
      are only for PMC5/6 event codes and will not affect the behaviour of
      PM_RUN_CYC/PM_RUN_INST_CMPL if progammed in other PMC's.
      
      Fixes: a64e697c ("powerpc/perf: power10 Performance Monitoring support")
      Signed-off-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.cm>
      Reviewed-by: default avatarMadhavan Srinivasan <maddy@linux.ibm.com>
      [mpe: Tweak change log wording for style and consistency]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20211007075121.28497-1-atrajeev@linux.vnet.ibm.com
      8f6aca0e
  2. 13 Oct, 2021 3 commits
  3. 12 Oct, 2021 2 commits
  4. 08 Oct, 2021 18 commits
  5. 20 Sep, 2021 2 commits
    • Linus Torvalds's avatar
      Linux 5.15-rc2 · e4e737bb
      Linus Torvalds authored
      e4e737bb
    • Linus Torvalds's avatar
      pci_iounmap'2: Electric Boogaloo: try to make sense of it all · 316e8d79
      Linus Torvalds authored
      Nathan Chancellor reports that the recent change to pci_iounmap in
      commit 9caea000 ("parisc: Declare pci_iounmap() parisc version only
      when CONFIG_PCI enabled") causes build errors on arm64.
      
      It took me about two hours to convince myself that I think I know what
      the logic of that mess of #ifdef's in the <asm-generic/io.h> header file
      really aim to do, and rewrite it to be easier to follow.
      
      Famous last words.
      
      Anyway, the code has now been lifted from that grotty header file into
      lib/pci_iomap.c, and has fairly extensive comments about what the logic
      is.  It also avoids indirecting through another confusing (and badly
      named) helper function that has other preprocessor config conditionals.
      
      Let's see what odd architecture did something else strange in this area
      to break things.  But my arm64 cross build is clean.
      
      Fixes: 9caea000 ("parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled")
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Ulrich Teichert <krypton@ulrich-teichert.org>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      316e8d79
  6. 19 Sep, 2021 14 commits