Re: [PATCH] mm/doc: add usage description for migrate_vma_*()

2020-09-14 Thread Alistair Popple
with my understanding based on the code. The description of pgmap_owner is good as it's usage wasn't immediately clear on the first code read through. So feel free to add: Reviewed-by: Alistair Popple > Jason

Re: [PATCH] fsi: sbefifo: Don't fail operations when in SBE IPL state

2019-06-16 Thread Alistair Popple
This fixed the problem I was having trying to issue istep operations to the SBE. Tested-by: Alistair Popple On Monday, 21 January 2019 11:15:58 AM AEST Eddie James wrote: > SBE fifo operations should be allowed while the SBE is in any of the > "IPL" states. Operations should

[PATCH v2 2/3] powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev

2017-04-03 Thread Alistair Popple
-off-by: Alistair Popple --- arch/powerpc/platforms/powernv/npu-dma.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c index 1c383f3..050bd5d 100644 --- a/arch/powerpc/platforms/powernv/npu-dma.c

[PATCH v2 1/3] drivers/of/base.c: Add of_property_read_u64_index

2017-04-03 Thread Alistair Popple
There is of_property_read_u32_index but no u64 variant. This patch adds one similar to the u32 version for u64. Signed-off-by: Alistair Popple Acked-by: Rob Herring --- drivers/of/base.c | 31 +++ include/linux/of.h | 3 +++ 2 files changed, 34 insertions(+) diff

[PATCH v2 3/3] powerpc/powernv: Introduce address translation services for Nvlink2

2017-04-03 Thread Alistair Popple
when a device should stop issuing address translation requests (ATRs). It also adds a fault handler to allow device drivers to demand fault pages in. Signed-off-by: Alistair Popple --- Changes since v1: - Moved exported function call prototypes to an externally accessable header. - Fixed

Re: [PATCH v3 4/4] 44x/fsp2: add irq error handlers

2017-12-11 Thread Alistair Popple
On Friday, 8 December 2017 6:41:02 PM AEDT Ivan Mikhaylov wrote: > add irq error handlers for cmu, plb, opb, mcue, conf > with debug information output in case of problems. > > Signed-off-by: Ivan Mikhaylov Acked-by: Alistair Popple > --- > arch/powerpc/platforms

[PATCH] powerpc/powernv: Fix TCE kill on NVLink2

2017-05-02 Thread Alistair Popple
This patch adds an equivalent IODA2 version of the function which uses the correct invalidation method depending on PHB model and changes all external callers to use it instead. Fixes: 616badd2fb49 ("powerpc/powernv: Use OPAL call for TCE kill on NVLink2") Signed-off-by: Alis

Re: [PATCH 3/4] 44x/fsp2: tvsense workaround for dd1

2017-11-26 Thread Alistair Popple
Again, I'm not familiar with this specific hardware so can only provide general comments. On Thursday, 2 November 2017 4:07:05 PM AEDT Ivan Mikhaylov wrote: > * tvsense(temperature and voltage sensors) may provide > erratic sense values which may result in parity errors > on CMU. It would be

Re: [PATCH 2/4] 44x/fsp2: l2 setup with error clear

2017-11-26 Thread Alistair Popple
I'm not familiar with the hardware setup going on here so I can't comment on it's correctness but the code looks ok. A commit message describing why this particular setup is needed would be nice though. Reviewed-by: Alistair Popple On Thursday, 2 November 2017 4:07:04 PM AEDT

Re: [PATCH 1/4] 44x/fsp2: add fsp2 headers

2017-11-26 Thread Alistair Popple
Hi Ivan, Does it make sense to have these in a seperate include file? From what I could see these defines were only used in fsp2.c so you could just put them directly in there. - Alistair On Thursday, 2 November 2017 4:07:03 PM AEDT Ivan Mikhaylov wrote: > * add cmu, plbX, l2 register definition

Re: [PATCH 4/4] 44x/fsp2: add irq error handlers

2017-11-26 Thread Alistair Popple
On Thursday, 2 November 2017 4:07:06 PM AEDT Ivan Mikhaylov wrote: > * add irq error handlers for cmu, plb, opb, mcue, conf > with debug information output in case of problem. > > Signed-off-by: Ivan Mikhaylov > --- > arch/powerpc/platforms/44x/fsp2.c | 204 >

Re: [PATCH] powerpc/powernv: Initialise nest mmu

2016-08-15 Thread Alistair Popple
Balbir, > > + /* Update partition table control register on all Nest MMUs */ > > + opal_nmmu_set_ptcr(-1UL, __pa(partition_tb) | (PATB_SIZE_SHIFT - 12)); > > + > > Just wondering if > > 1. Instead of using -1 for all cpus, we should do > for_each_online_cpu() { > opal_

[PATCH] powerpc/powernv: Initialise nest mmu

2016-08-14 Thread Alistair Popple
address of the partition table (ie. the PTCR) which needs to be programmed into the NMMU. This patch adds a call to OPAL to set the PTCR for the nest mmu in opal_init(). Signed-off-by: Alistair Popple --- This patch depends on a new OPAL call which has yet to be added to skiboot, although the

[RFC 2/4] mm: Remove uses of PFN_DEV

2025-01-07 Thread Alistair Popple
unnecessary as it is no longer checked, instead relying on pfn_valid() to determine if there is an associated page or not. Signed-off-by: Alistair Popple --- drivers/gpu/drm/gma500/fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 5 ++--- drivers/s390/block/dcssblk.c | 3 +-- drivers

[RFC 0/4] mm: Remove pfn_t type

2025-01-07 Thread Alistair Popple
org Cc: da...@redhat.com Cc: linux-kernel@vger.kernel.org Cc: nvd...@lists.linux.dev Cc: linux-fsde...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-e...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: jhubb...@nvidia.com Cc: h...@lst.de Alistair Popple (4): mm: Remove PFN_MAP, PFN_SG

[RFC 1/4] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST

2025-01-07 Thread Alistair Popple
The PFN_MAP flag is no longer used for anything, so remove it. The PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so also remove them. Signed-off-by: Alistair Popple --- include/linux/pfn_t.h | 10 ++ tools/testing/nvdimm/test/iomap.c | 4 2 files

[RFC 4/4] mm: Remove include/linux/pfn_t.h

2025-01-07 Thread Alistair Popple
None of the functionality in pfn_t.h is required so delete it. Signed-off-by: Alistair Popple --- include/linux/pfn.h | 10 +- include/linux/pfn_t.h | 88 + 2 files changed, 98 deletions(-) delete mode 100644 include/linux/pfn_t.h diff --git a

[RFC 3/4] mm: Remove callers of pfn_t functionality

2025-01-07 Thread Alistair Popple
All PFN_* pfn_t flags have been removed. Therefore there is no longer a need for the pfn_t type and all uses can be replaced with normal pfns. Signed-off-by: Alistair Popple --- I'm guessing people will want this split up into several patches for merging/review. If so I will do that onc

Re: [linus:master] [fs/dax] bde708f1a6: WARNING:at_mm/truncate.c:#truncate_folio_batch_exceptionals

2025-04-10 Thread Alistair Popple
On Thu, Apr 10, 2025 at 01:14:42PM +0800, kernel test robot wrote: > > > Hello, > > kernel test robot noticed > "WARNING:at_mm/truncate.c:#truncate_folio_batch_exceptionals" on: > > commit: bde708f1a65d025c45575bfe1e7bf7bdf7e71e87 ("fs/dax: always remove DAX > page-cache entries when breaking

Re: [PATCH v1] fs/dax: fix folio splitting issue by resetting old folio order + _nr_pages

2025-04-13 Thread Alistair Popple
On Fri, Apr 11, 2025 at 10:37:17AM +0200, David Hildenbrand wrote: > (adding CC list again, because I assume it was dropped by accident) Whoops. Thanks. > > > diff --git a/fs/dax.c b/fs/dax.c > > > index af5045b0f476e..676303419e9e8 100644 > > > --- a/fs/dax.c > > > +++ b/fs/dax.c > > > @@ -396,6

[PATCH RFC v2 02/12] mm: Convert pXd_devmap checks to vma_is_dax

2025-02-18 Thread Alistair Popple
pXd_devmap to skip DAX pages continue to do so by adding explicit checks of the VMA instead. Signed-off-by: Alistair Popple --- fs/userfaultfd.c | 2 +- mm/hmm.c | 2 +- mm/userfaultfd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c

[PATCH RFC v2 00/12] mm: Remove pXX_devmap page table bit and pfn_t type

2025-02-18 Thread Alistair Popple
nel.org Cc: nvd...@lists.linux.dev Cc: linux-fsde...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-e...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: jhubb...@nvidia.com Cc: h...@lst.de Cc: zhang.l...@gmail.com Cc: de...@rivosinc.com Cc: bj...@kernel.org Cc: balb...@nvidia.com Alistair Po

[PATCH RFC v2 04/12] mm: Convert vmf_insert_mixed() from using pte_devmap to pte_special

2025-02-18 Thread Alistair Popple
;t support pte_devmap so those will continue to rely on pfn_valid() to determine if the page can be mapped. Signed-off-by: Alistair Popple --- mm/hmm.c| 3 --- mm/memory.c | 20 ++-- mm/vmscan.c | 2 +- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/mm/hmm.c b/mm/h

[PATCH RFC v2 03/12] mm/pagewalk: Skip dax pages in pagewalk

2025-02-18 Thread Alistair Popple
Previously dax pages were skipped by the pagewalk code as pud_special() or vm_normal_page{_pmd}() would be false for DAX pages. Now that dax pages are refcounted normally that is no longer the case, so add explicit checks to skip them. Signed-off-by: Alistair Popple --- include/linux/memremap.h

[PATCH RFC v2 01/12] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST

2025-02-18 Thread Alistair Popple
The PFN_MAP flag is no longer used for anything, so remove it. The PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so also remove them. Signed-off-by: Alistair Popple Reviewed-by: Christoph Hellwig --- include/linux/pfn_t.h | 31 +++ mm

[PATCH RFC v2 11/12] mm: Remove callers of pfn_t functionality

2025-02-18 Thread Alistair Popple
All PFN_* pfn_t flags have been removed. Therefore there is no longer a need for the pfn_t type and all uses can be replaced with normal pfns. Signed-off-by: Alistair Popple Reviewed-by: Christoph Hellwig --- arch/x86/mm/pat/memtype.c| 6 +- drivers/dax/device.c

[PATCH RFC v2 06/12] mm/gup: Remove pXX_devmap usage from get_user_pages()

2025-02-18 Thread Alistair Popple
memmap so there is no need to hold a reference on the pgmap data structure to ensure this. Furthermore mappings with PFN_DEV are no longer created, hence this effectively dead code anyway so can be removed. Signed-off-by: Alistair Popple --- include/linux/huge_mm.h | 3 +- mm/gup.c

[PATCH RFC v2 09/12] powerpc: Remove checks for devmap pages and PMDs/PUDs

2025-02-18 Thread Alistair Popple
PFN_DEV no longer exists. This means no devmap PMDs or PUDs will be created, so checking for them is redundant. Instead mappings of pages that would have previously returned true for pXd_devmap() will return true for pXd_trans_huge() Signed-off-by: Alistair Popple --- arch/powerpc/mm/book3s64

[PATCH RFC v2 08/12] mm/khugepaged: Remove redundant pmd_devmap() check

2025-02-18 Thread Alistair Popple
The only users of pmd_devmap were device dax and fs dax. The check for pmd_devmap() in check_pmd_state() is therefore redundant as callers explicitly check for is_zone_device_page(), so this check can be dropped. Signed-off-by: Alistair Popple --- mm/khugepaged.c | 2 -- 1 file changed, 2

[PATCH RFC v2 12/12] mm/memremap: Remove unused devmap_managed_key

2025-02-18 Thread Alistair Popple
It's no longer used so remove it. Signed-off-by: Alistair Popple --- mm/memremap.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/mm/memremap.c b/mm/memremap.c index d875534..e40672b 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -38,30 +38,6 @@ unsigned

[PATCH RFC v2 10/12] mm: Remove devmap related functions and page table bits

2025-02-18 Thread Alistair Popple
Now that DAX and all other reference counts to ZONE_DEVICE pages are managed normally there is no need for the special devmap PTE/PMD/PUD page table bits. So drop all references to these, freeing up a software defined page table bit on architectures supporting it. Signed-off-by: Alistair Popple

[PATCH RFC v2 07/12] mm: Remove redundant pXd_devmap calls

2025-02-18 Thread Alistair Popple
behaviour as it will always be false. Signed-off-by: Alistair Popple --- fs/dax.c | 5 ++--- include/linux/huge_mm.h| 10 -- include/linux/pgtable.h| 2 +- mm/hmm.c | 4 ++-- mm/huge_memory.c | 31 +-- mm

[PATCH RFC v2 05/12] mm: Remove remaining uses of PFN_DEV

2025-02-18 Thread Alistair Popple
vmf_insert_mixed(). This is unnecessary as it is no longer checked, instead relying on pfn_valid() to determine if there is an associated page or not. Signed-off-by: Alistair Popple Reviewed-by: Christoph Hellwig --- drivers/gpu/drm/gma500/fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 5

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-27 Thread Alistair Popple
On Thu, Feb 27, 2025 at 11:01:55AM +0100, Danilo Krummrich wrote: > On Thu, Feb 27, 2025 at 11:25:55AM +1100, Alistair Popple wrote: > > On Tue, Feb 25, 2025 at 12:04:35PM +0100, Danilo Krummrich wrote: > > > On Tue, Feb 25, 2025 at 04:50:05PM +1100, Alistair Popple wrote:

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-20 Thread Alistair Popple
On Thu, Dec 19, 2024 at 06:04:09PM +0100, Danilo Krummrich wrote: > I/O memory is typically either mapped through direct calls to ioremap() > or subsystem / bus specific ones such as pci_iomap(). > > Even though subsystem / bus specific functions to map I/O memory are > based on ioremap() / iounma

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-24 Thread Alistair Popple
On Fri, Feb 21, 2025 at 04:58:59AM +0100, Miguel Ojeda wrote: > Hi Alistair, > > On Fri, Feb 21, 2025 at 2:20 AM Alistair Popple wrote: > > > > Is this a known issue or limitation? Or is this a bug/rough edge that still > > needs fixing? Or alternatively am I just d

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-26 Thread Alistair Popple
On Tue, Feb 25, 2025 at 12:04:35PM +0100, Danilo Krummrich wrote: > On Tue, Feb 25, 2025 at 04:50:05PM +1100, Alistair Popple wrote: > > Kind of, but given the current state of build_assert's and the impossiblity > > of > > debugging them should we avoid adding th

Re: [PATCH] fs/dax: Fix "don't skip locked entries when scanning entries"

2025-05-28 Thread Alistair Popple
On Tue, May 27, 2025 at 02:46:28PM -0700, Dan Williams wrote: > Alistair Popple wrote: > > Commit 6be3e21d25ca ("fs/dax: don't skip locked entries when scanning > > entries") introduced a new function, wait_entry_unlocked_exclusive(), > > which waits for

[PATCH] fs/dax: Fix "don't skip locked entries when scanning entries"

2025-05-22 Thread Alistair Popple
which is equivalent in implementation to xas_pause() but does not advance the XArray state. Fixes: 6be3e21d25ca ("fs/dax: don't skip locked entries when scanning entries") Signed-off-by: Alistair Popple Cc: Dan Williams Cc: Alison Schofield Cc: Matthew Wilcow (Oracle) Cc: Balb

Re: [PATCH RFC 07/14] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-06-23 Thread Alistair Popple
On Tue, Jun 17, 2025 at 05:43:38PM +0200, David Hildenbrand wrote: > Let's convert to vmf_insert_folio_pmd(). > > In the unlikely case there is already something mapped, we'll now still > call trace_dax_pmd_load_hole() and return VM_FAULT_NOPAGE. > > That should probably be fine, no need to add s

[PATCH] mm: Remove PFN_MAP, PFN_SPECIAL, PFN_SG_CHAIN and PFN_SG_LAST

2025-06-03 Thread Alistair Popple
The PFN_MAP flag is no longer used for anything, so remove it. The PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so also remove them. The last user of PFN_SPECIAL was removed by 653d7825c149 ("dcssblk: mark DAX broken, remove FS_DAX_LIMITED support"). Signed-off-by

Re: [PATCH] mm: Remove PFN_MAP, PFN_SPECIAL, PFN_SG_CHAIN and PFN_SG_LAST

2025-06-10 Thread Alistair Popple
On Tue, Jun 10, 2025 at 06:18:09PM +0200, Marek Szyprowski wrote: > Dear All, > > On 04.06.2025 05:21, Alistair Popple wrote: > > The PFN_MAP flag is no longer used for anything, so remove it. > > The PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been > > us

Re: [PATCH v2 1/3] mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()

2025-06-11 Thread Alistair Popple
On Wed, Jun 11, 2025 at 02:06:52PM +0200, David Hildenbrand wrote: > We setup the cache mode but ... don't forward the updated pgprot to > insert_pfn_pud(). > > Only a problem on x86-64 PAT when mapping PFNs using PUDs that > require a special cachemode. > > Fix it by using the proper pgprot wher

Re: [PATCH v2 0/3] mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes

2025-06-11 Thread Alistair Popple
> 12/13 ndctl:dax / dm.sh FAIL 0.23s exit > status 1 > 13/13 ndctl:dax / mmap.sh OK 437.86s > > So, no idea if this series breaks something, because the tests are rather > unreliable. I have plenty of other debug setting

Re: [PATCH v2 2/3] mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pmd()

2025-06-11 Thread Alistair Popple
On Wed, Jun 11, 2025 at 02:06:53PM +0200, David Hildenbrand wrote: > Marking PMDs that map a "normal" refcounted folios as special is > against our rules documented for vm_normal_page(). > > Fortunately, there are not that many pmd_special() check that can be > mislead, and most vm_normal_page_pmd

Re: [PATCH] mm: Remove PFN_MAP, PFN_SPECIAL, PFN_SG_CHAIN and PFN_SG_LAST

2025-06-11 Thread Alistair Popple
On Wed, Jun 11, 2025 at 10:42:16AM +0200, Marek Szyprowski wrote: > On 11.06.2025 10:23, David Hildenbrand wrote: > > On 11.06.25 10:03, Marek Szyprowski wrote: > >> On 11.06.2025 04:38, Alistair Popple wrote: > >>> On Tue, Jun 10, 2025 at 06:18:09PM +0200, Mar

Re: [PATCH RFC 07/14] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-07-07 Thread Alistair Popple
On Fri, Jul 04, 2025 at 03:22:28PM +0200, David Hildenbrand wrote: > On 25.06.25 11:03, David Hildenbrand wrote: > > On 24.06.25 03:16, Alistair Popple wrote: > > > On Tue, Jun 17, 2025 at 05:43:38PM +0200, David Hildenbrand wrote: > > > > Let

Re: [PATCH RFC 04/14] mm/huge_memory: move more common code into insert_pmd()

2025-07-06 Thread Alistair Popple
whole struct down. It makes it very obvious what elements insert_pmd() cares about (in this case one of about fourteen fields). Anyway looks good, thanks: Reviewed-by: Alistair Popple > -- > Oscar Salvador > SUSE Labs

Re: [PATCH RFC 05/14] mm/huge_memory: move more common code into insert_pud()

2025-07-06 Thread Alistair Popple
On Tue, Jun 17, 2025 at 05:43:36PM +0200, David Hildenbrand wrote: > Let's clean it all further up. Looks good: Reviewed-by: Alistair Popple > Signed-off-by: David Hildenbrand > --- > mm/huge_memory.c | 36 +--- > 1 file changed, 13 inserti

Re: [PATCH v1 4/9] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-07-17 Thread Alistair Popple
sonable to not handle huge zero folios differently > to inserting PMDs mapping folios when there already is something mapped. Yeah, this all sounds reasonable and I was never able to hit this path with the RFC version of this series anyway. So I suspect it really is impossible to hit and ther

<    1   2   3