<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/platforms, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-09-13T07:48:24Z</updated>
<entry>
<title>powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n</title>
<updated>2023-09-13T07:48:24Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2023-05-09T09:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5287fa4a0cee06bad3292fee388cfe9175aff843'/>
<id>urn:sha1:5287fa4a0cee06bad3292fee388cfe9175aff843</id>
<content type='text'>
[ Upstream commit 750bd41aeaeb1f0e0128aa4f8fcd6dd759713641 ]

With JUMP_LABEL=n, hcall_tracepoint_refcount's address is being tested
instead of its value. This results in the tracing slowpath always being
taken unnecessarily.

Fixes: 9a10ccb29c0a2 ("powerpc/pseries: move hcall_tracepoint_refcount out of .toc")
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230509091600.70994-1-npiggin@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT</title>
<updated>2023-09-13T07:48:24Z</updated>
<author>
<name>Russell Currey</name>
</author>
<published>2023-08-23T05:53:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c5e8e666794d7dde6d14ea846c6c04f2bb34900'/>
<id>urn:sha1:3c5e8e666794d7dde6d14ea846c6c04f2bb34900</id>
<content type='text'>
[ Upstream commit eac030b22ea12cdfcbb2e941c21c03964403c63f ]

lppaca_shared_proc() takes a pointer to the lppaca which is typically
accessed through get_lppaca().  With DEBUG_PREEMPT enabled, this leads
to checking if preemption is enabled, for example:

  BUG: using smp_processor_id() in preemptible [00000000] code: grep/10693
  caller is lparcfg_data+0x408/0x19a0
  CPU: 4 PID: 10693 Comm: grep Not tainted 6.5.0-rc3 #2
  Call Trace:
    dump_stack_lvl+0x154/0x200 (unreliable)
    check_preemption_disabled+0x214/0x220
    lparcfg_data+0x408/0x19a0
    ...

This isn't actually a problem however, as it does not matter which
lppaca is accessed, the shared proc state will be the same.
vcpudispatch_stats_procfs_init() already works around this by disabling
preemption, but the lparcfg code does not, erroring any time
/proc/powerpc/lparcfg is accessed with DEBUG_PREEMPT enabled.

Instead of disabling preemption on the caller side, rework
lppaca_shared_proc() to not take a pointer and instead directly access
the lppaca, bypassing any potential preemption checks.

Fixes: f13c13a00512 ("powerpc: Stop using non-architected shared_proc field in lppaca")
Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
[mpe: Rework to avoid needing a definition in paca.h and lppaca.h]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230823055317.751786-4-mpe@ellerman.id.au
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/powermac: Use early_* IO variants in via_calibrate_decr()</title>
<updated>2023-09-13T07:47:53Z</updated>
<author>
<name>Benjamin Gray</name>
</author>
<published>2023-07-06T01:08:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee66ee99eea6bfe771c37165d4e467930c4bda7b'/>
<id>urn:sha1:ee66ee99eea6bfe771c37165d4e467930c4bda7b</id>
<content type='text'>
[ Upstream commit 86582e6189dd8f9f52c25d46c70fe5d111da6345 ]

On a powermac platform, via the call path:

  start_kernel()
    time_init()
      ppc_md.calibrate_decr() (pmac_calibrate_decr)
        via_calibrate_decr()

ioremap() and iounmap() are called. The unmap can enable interrupts
unexpectedly (cond_resched() in vunmap_pmd_range()), which causes a
warning later in the boot sequence in start_kernel().

Use the early_* variants of these IO functions to prevent this.

The issue is pre-existing, but is surfaced by commit 721255b9826b
("genirq: Use a maple tree for interrupt descriptor management").

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Reviewed-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230706010816.72682-1-bgray@linux.ibm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries/vas: Hold mmap_mutex after mmap lock during window close</title>
<updated>2023-08-03T08:25:41Z</updated>
<author>
<name>Haren Myneni</name>
</author>
<published>2023-07-16T10:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=959dc1b16ea3f1db1d3be0e504e3a2ae126d3b87'/>
<id>urn:sha1:959dc1b16ea3f1db1d3be0e504e3a2ae126d3b87</id>
<content type='text'>
[ Upstream commit b59c9dc4d9d47b3c4572d826603fde507055b656 ]

Commit 8ef7b9e1765a ("powerpc/pseries/vas: Close windows with DLPAR
core removal") unmaps the window paste address and issues HCALL to
close window in the hypervisor for migration or DLPAR core removal
events. So holds mmap_mutex and then mmap lock before unmap the
paste address. But if the user space issue mmap paste address at
the same time with the migration event, coproc_mmap() is called
after holding the mmap lock which can trigger deadlock when trying
to acquire mmap_mutex in coproc_mmap().

t1: mmap() call to mmap              t2: Migration event
    window paste address

do_mmap2()                           migration_store()
 ksys_mmap_pgoff()                    pseries_migrate_partition()
  vm_mmap_pgoff()                      vas_migration_handler()
    Acquire mmap lock                   reconfig_close_windows()
    do_mmap()                             lock mmap_mutex
     mmap_region()                        Acquire mmap lock
      call_mmap()                         //Wait for mmap lock
       coproc_mmap()                        unmap vma
         lock mmap_mutex                    update window status
         //wait for mmap_mutex            Release mmap lock
          mmap vma                        unlock mmap_mutex
          update window status
         unlock mmap_mutex
    ...
    Release mmap lock

Fix this deadlock issue by holding mmap lock first before mmap_mutex
in reconfig_close_windows().

Fixes: 8ef7b9e1765a ("powerpc/pseries/vas: Close windows with DLPAR core removal")
Signed-off-by: Haren Myneni &lt;haren@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230716100506.7833-1-haren@linux.ibm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/powernv/sriov: perform null check on iov before dereferencing iov</title>
<updated>2023-07-19T14:36:16Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2023-06-08T09:58:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72990144e17e5e2cb378f1d9b10530b85b9bc382'/>
<id>urn:sha1:72990144e17e5e2cb378f1d9b10530b85b9bc382</id>
<content type='text'>
[ Upstream commit f4f913c980bc6abe0ccfe88fe3909c125afe4a2d ]

Currently pointer iov is being dereferenced before the null check of iov
which can lead to null pointer dereference errors. Fix this by moving the
iov null check before the dereferencing.

Detected using cppcheck static analysis:
linux/arch/powerpc/platforms/powernv/pci-sriov.c:597:12: warning: Either
the condition '!iov' is redundant or there is possible null pointer
dereference: iov. [nullPointerRedundantCheck]
 num_vfs = iov-&gt;num_vfs;
           ^

Fixes: 052da31d45fc ("powerpc/powernv/sriov: De-indent setup and teardown")
Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230608095849.1147969-1-colin.i.king@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/64s: Fix VAS mm use after free</title>
<updated>2023-07-19T14:36:15Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2023-06-07T10:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=421cd1544480f2458042fe7f4913a2069c4d7251'/>
<id>urn:sha1:421cd1544480f2458042fe7f4913a2069c4d7251</id>
<content type='text'>
[ Upstream commit b4bda59b47879cce38a6ec5a01cd3cac702b5331 ]

The refcount on mm is dropped before the coprocessor is detached.

Reported-by: Sachin Sant &lt;sachinp@linux.ibm.com&gt;
Fixes: 7bc6f71bdff5f ("powerpc/vas: Define and use common vas_window struct")
Fixes: b22f2d88e435c ("powerpc/pseries/vas: Integrate API with open/close windows")
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Tested-by: Sachin Sant &lt;sachinp@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230607101024.14559-1-npiggin@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>watchdog/hardlockup: rename some "NMI watchdog" constants/function</title>
<updated>2023-07-19T14:35:32Z</updated>
<author>
<name>Douglas Anderson</name>
</author>
<published>2023-05-19T17:18:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9b02a122b6b756d229a06d1fcdfcea5437c7dec'/>
<id>urn:sha1:f9b02a122b6b756d229a06d1fcdfcea5437c7dec</id>
<content type='text'>
[ Upstream commit df95d3085caa5b99a60eb033d7ad6c2ff2b43dbf ]

Do a search and replace of:
- NMI_WATCHDOG_ENABLED =&gt; WATCHDOG_HARDLOCKUP_ENABLED
- SOFT_WATCHDOG_ENABLED =&gt; WATCHDOG_SOFTOCKUP_ENABLED
- watchdog_nmi_ =&gt; watchdog_hardlockup_
- nmi_watchdog_available =&gt; watchdog_hardlockup_available
- nmi_watchdog_user_enabled =&gt; watchdog_hardlockup_user_enabled
- soft_watchdog_user_enabled =&gt; watchdog_softlockup_user_enabled
- NMI_WATCHDOG_DEFAULT =&gt; WATCHDOG_HARDLOCKUP_DEFAULT

Then update a few comments near where names were changed.

This is specifically to make it less confusing when we want to introduce
the buddy hardlockup detector, which isn't using NMIs.  As part of this,
we sanitized a few names for consistency.

[trix@redhat.com: make variables static]
  Link: https://lkml.kernel.org/r/20230525162822.1.I0fb41d138d158c9230573eaa37dc56afa2fb14ee@changeid
Link: https://lkml.kernel.org/r/20230519101840.v5.12.I91f7277bab4bf8c0cb238732ed92e7ce7bbd71a6@changeid
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Reviewed-by: Tom Rix &lt;trix@redhat.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Chen-Yu Tsai &lt;wens@csie.org&gt;
Cc: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Guenter Roeck &lt;groeck@chromium.org&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Lecopzer Chen &lt;lecopzer.chen@mediatek.com&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Masayoshi Mizuma &lt;msys.mizuma@gmail.com&gt;
Cc: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Cc: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Pingfan Liu &lt;kernelfans@gmail.com&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: "Ravi V. Shankar" &lt;ravi.v.shankar@intel.com&gt;
Cc: Ricardo Neri &lt;ricardo.neri@intel.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Stephen Boyd &lt;swboyd@chromium.org&gt;
Cc: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Cc: Tzung-Bi Shih &lt;tzungbi@chromium.org&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Stable-dep-of: 9ec272c586b0 ("watchdog/hardlockup: keep kernel.nmi_watchdog sysctl as 0444 if probe fails")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/iommu: Limit number of TCEs to 512 for H_STUFF_TCE hcall</title>
<updated>2023-05-30T06:33:10Z</updated>
<author>
<name>Gaurav Batra</name>
</author>
<published>2023-05-25T14:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d2ccf00bddc268045e3d65a8108d61ada0e4b4e'/>
<id>urn:sha1:9d2ccf00bddc268045e3d65a8108d61ada0e4b4e</id>
<content type='text'>
Currently in tce_freemulti_pSeriesLP() there is no limit on how many
TCEs are passed to the H_STUFF_TCE hcall. This has not caused an issue
until now, but newer firmware releases have started enforcing a limit of
512 TCEs per call.

The limit is correct per the specification (PAPR v2.12 § 14.5.4.2.3).

The code has been in it's current form since it was initially merged.

Cc: stable@vger.kernel.org
Signed-off-by: Gaurav Batra &lt;gbatra@linux.vnet.ibm.com&gt;
Reviewed-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
[mpe: Tweak change log wording &amp; add PAPR reference]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230525143454.56878-1-gbatra@linux.vnet.ibm.com
</content>
</entry>
<entry>
<title>powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device</title>
<updated>2023-05-16T14:54:55Z</updated>
<author>
<name>Gaurav Batra</name>
</author>
<published>2023-05-05T18:47:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f7aacc5eb9ed2cc17be7a90da5cd559effb9d59'/>
<id>urn:sha1:1f7aacc5eb9ed2cc17be7a90da5cd559effb9d59</id>
<content type='text'>
For an SR-IOV device, while enabling DDW, a new table is created and
added at index 1 in the group. In the below 2 scenarios, the table is
incorrectly referenced at index 0 (which is where the table is for
default DMA window).

1. When adding DDW

   This issue is exposed with "slub_debug". Error thrown out from
   dma_iommu_dma_supported()

   Warning: IOMMU offset too big for device mask
   mask: 0xffffffff, table offset: 0x800000000000000

2. During Dynamic removal of the PCI device.

   Error is from iommu_tce_table_put() since a NULL table pointer is
   passed in.

Fixes: 381ceda88c4c ("powerpc/pseries/iommu: Make use of DDW for indirect mapping")
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Gaurav Batra &lt;gbatra@linux.vnet.ibm.com&gt;
Reviewed-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230505184701.91613-1-gbatra@linux.vnet.ibm.com
</content>
</entry>
<entry>
<title>powerpc/iommu: Remove iommu_del_device()</title>
<updated>2023-05-16T14:51:06Z</updated>
<author>
<name>Jason Gunthorpe</name>
</author>
<published>2023-05-16T00:12:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad593827db9b73f15eb65416ec975ec0311f773a'/>
<id>urn:sha1:ad593827db9b73f15eb65416ec975ec0311f773a</id>
<content type='text'>
Now that power calls iommu_device_register() and populates its groups
using iommu_ops-&gt;device_group it should not be calling
iommu_group_remove_device().

The core code owns the groups and all the other related iommu data, it
will clean it up automatically.

Remove the bus notifiers and explicit calls to
iommu_group_remove_device().

Fixes: a940904443e4 ("powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains")
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/0-v1-1421774b874b+167-ppc_device_group_jgg@nvidia.com
</content>
</entry>
</feed>
