在 2025/6/12 18:31, Manivannan Sadhasivam 写道:
On Mon, Feb 17, 2025 at 10:42:17AM +0800, Shuai Xue wrote:
The current implementation of pcie_do_recovery() assumes that the
recovery process is executed on the device that detected the error.
s/on/for
However, the DPC driver currently passes t
WM8524 is a stereo DAC. Add support for this codec in imx-card ASoC
machine driver.
Signed-off-by: Chancel Liu
---
sound/soc/fsl/imx-card.c | 24
1 file changed, 24 insertions(+)
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index ea5dbb54b584..c2c22a
On Wed, Jun 18, 2025 at 08:42:51PM +0100, Lorenzo Stoakes wrote:
> The VMA flags field vma->vm_flags is of type vm_flags_t. Right now this is
> exactly equivalent to unsigned long, but it should not be assumed to be.
>
> Much code that references vma->vm_flags already correctly uses vm_flags_t,
>
On (25/06/18 19:39), David Hildenbrand wrote:
> Let the buddy handle clearing the type.
>
> Signed-off-by: David Hildenbrand
FWIW,
Reviewed-by: Sergey Senozhatsky
On (25/06/18 19:39), David Hildenbrand wrote:
> Let's drop these checks; these are conditions the core migration code
> must make sure will hold either way, no need to double check.
>
> Signed-off-by: David Hildenbrand
Reviewed-by: Sergey Senozhatsky
On Tue, Jun 17, 2025 at 11:30:20AM +0200, David Hildenbrand wrote:
> On 17.06.25 11:25, David Hildenbrand wrote:
> > On 16.06.25 13:58, Alistair Popple wrote:
> > > Previously dax pages were skipped by the pagewalk code as pud_special() or
> > > vm_normal_page{_pmd}() would be false for DAX pages.
- Original Message -
> From: "Bjorn Helgaas"
> To: "Timothy Pearson"
> Cc: "linuxppc-dev" , "linux-kernel"
> , "linux-pci"
> , "Madhavan Srinivasan" ,
> "Michael Ellerman" ,
> "christophe leroy" , "Naveen N Rao"
> , "Bjorn Helgaas"
> , "Shawn Anastasio"
> Sent: Wednesday, June 18,
On Wed, Jun 18, 2025 at 08:42:53PM +0100, Lorenzo Stoakes wrote:
> The core kernel code is currently very inconsistent in its use of
> vm_flags_t vs. unsigned long. This prevents us from changing the type of
> vm_flags_t in the future and is simply not correct, so correct this.
Thank you for doing
On Wed, Jun 18, 2025 at 02:50:04PM -0500, Timothy Pearson wrote:
> - Original Message -
> > From: "Bjorn Helgaas"
> > To: "Timothy Pearson"
> > Cc: "linuxppc-dev" , "linux-kernel"
> > , "linux-pci"
> > , "Madhavan Srinivasan" ,
> > "Michael Ellerman" ,
> > "christophe leroy" , "Naveen N
On Wed, Jun 18, 2025 at 03:25:46PM -0400, Zi Yan wrote:
> On 18 Jun 2025, at 15:18, Matthew Wilcox wrote:
> >> Why not use page version of lock, unlock, and put? Especially you are
> >> thinking about not using folio for these pages. Just a question,
> >> I am OK with current patch.
> >
> > That wo
- Original Message -
> From: "Bjorn Helgaas"
> To: "Timothy Pearson"
> Cc: "linuxppc-dev" , "linux-kernel"
> , "linux-pci"
> , "Madhavan Srinivasan" ,
> "Michael Ellerman" ,
> "christophe leroy" , "Naveen N Rao"
> , "Bjorn Helgaas"
> , "Shawn Anastasio" ,
> "Lukas Wunner"
> Sent:
The core kernel code is currently very inconsistent in its use of
vm_flags_t vs. unsigned long. This prevents us from changing the type of
vm_flags_t in the future and is simply not correct, so correct this.
While this results in rather a lot of churn, it is a critical pre-requisite
for a future p
In future we intend to change the vm_flags_t type, so it isn't correct for
architecture and driver code to assume it is unsigned long. Correct this
assumption across the board.
Overall, this patch does not introduce any functional change.
Signed-off-by: Lorenzo Stoakes
---
arch/arm/mm/fault.c
We abstract the type of the VMA flags to vm_flags_t, however in may places
it is simply assumed this is unsigned long, which is simply incorrect.
At the moment this is simply an incongruity, however in future we plan to
change this type and therefore this change is a critical requirement for
doing
The VMA flags field vma->vm_flags is of type vm_flags_t. Right now this is
exactly equivalent to unsigned long, but it should not be assumed to be.
Much code that references vma->vm_flags already correctly uses vm_flags_t,
but a fairly large chunk of code simply uses unsigned long and assumes that
[+cc Lukas, pciehp expert]
On Wed, Jun 18, 2025 at 11:56:54AM -0500, Timothy Pearson wrote:
> presence detection
(subject/commit wrapping seems to be on all of these patches)
> The Microsemi Switchtec PM8533 PFX 48xG3 [11f8:8533] PCIe switch system
> was observed to incorrectly assert the Prese
On 18 Jun 2025, at 15:18, Matthew Wilcox wrote:
> On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>> + /*
>>> +* TODO: these pages will not be folios in the future. All
>>> +* folio dependencies will have to be removed.
>>> +
On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote:
> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> > + /*
> > +* TODO: these pages will not be folios in the future. All
> > +* folio dependencies will have to be removed.
> > +*/
> > + struct folio *folio = page_folio(page
On Wed, Jun 18, 2025 at 11:58:23AM -0500, Timothy Pearson wrote:
> recovery
Same weird subject/commit wrapping.
> The existing PowerNV hotplug code did not handle suprise plug events
> correctly, leading to a complete failure of the hotplug system after
> device removal and a required reboot to
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> ... and factor the complete handling of movable_ops pages out.
> Convert it similar to isolate_movable_ops_page().
>
> While at it, convert the VM_BUG_ON_FOLIO() into a VM_WARN_ON_PAGE().
>
> Signed-off-by: David Hildenbrand
> ---
> mm/migrate
On Wed, Jun 18, 2025 at 11:58:59AM -0500, Timothy Pearson wrote:
> state
Weird wrapping of last word of subject to here.
> The PCIe specification allows three attention indicator states,
> on, off, and blink. Enable all three states instead of basic
> on / off control.
>
> Signed-off-by: Timot
On 18 Jun 2025, at 14:39, Matthew Wilcox wrote:
> On Wed, Jun 18, 2025 at 02:14:15PM -0400, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>
>>> ... and start moving back to per-page things that will absolutely not be
>>> folio things in the future. Add documentation and a co
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let the buddy handle clearing the type.
Same comment as Patch 5.
>
> Signed-off-by: David Hildenbrand
> ---
> mm/zpdesc.h | 5 -
> mm/zsmalloc.c | 3 +--
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
Acked-by: Zi Yan
Best Regar
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let the buddy handle clearing the type.
The below might be more precise? Since page type is cleared
before the page reaches buddy code.
Let the free page routine handle clearing the type.
>
> Signed-off-by: David Hildenbrand
> ---
> include
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let's allow for not clearing a page type before freeing a page to the
> buddy.
>
> We'll focus on having a type set on the first page of a larger
> allocation only.
>
> With this change, we can reliably identify typed folios even though
> they m
On Wed, Jun 18, 2025 at 02:14:15PM -0400, Zi Yan wrote:
> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>
> > ... and start moving back to per-page things that will absolutely not be
> > folio things in the future. Add documentation and a comment that the
> > remaining folio stuff (lock, refc
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let's drop these checks; these are conditions the core migration code
> must make sure will hold either way, no need to double check.
>
> Signed-off-by: David Hildenbrand
> ---
> mm/zpdesc.h | 5 -
> mm/zsmalloc.c | 5 -
> 2 files ch
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> The core will set PG_isolated only after mops->isolate_page() was
> called. In case of the balloon, that is where we will remove it from
> the balloon list. So we cannot have isolated pages in the balloon list.
>
> Let's drop this unnecessary ch
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> ... and start moving back to per-page things that will absolutely not be
> folio things in the future. Add documentation and a comment that the
> remaining folio stuff (lock, refcount) will have to be reworked as well.
>
> While at it, convert t
On 18 Jun 2025, at 14:06, Matthew Wilcox wrote:
> On Wed, Jun 18, 2025 at 02:04:18PM -0400, Zi Yan wrote:
>>> Let's allow for not clearing a page type before freeing a page to the
>>> buddy.
>>>
>>> We'll focus on having a type set on the first page of a larger
>>> allocation only.
>>>
>>> With th
On 18 Jun 2025, at 14:04, Zi Yan wrote:
> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>
>> Let's allow for not clearing a page type before freeing a page to the
>> buddy.
>>
>> We'll focus on having a type set on the first page of a larger
>> allocation only.
>>
>> With this change, we can
On Wed, Jun 18, 2025 at 02:04:18PM -0400, Zi Yan wrote:
> > Let's allow for not clearing a page type before freeing a page to the
> > buddy.
> >
> > We'll focus on having a type set on the first page of a larger
> > allocation only.
> >
> > With this change, we can reliably identify typed folios ev
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> Let's allow for not clearing a page type before freeing a page to the
> buddy.
>
> We'll focus on having a type set on the first page of a larger
> allocation only.
>
> With this change, we can reliably identify typed folios even though
> they m
Let's bring the docs up-to-date. Setting PG_movable_ops + page->private
very likely still requires to be performed under documented locks:
it's complicated.
We will rework this in the future, as we will try avoiding using the
page lock.
Signed-off-by: David Hildenbrand
---
include/linux/balloon
Let's rename the flag to make it clearer where it applies (not folios
...).
While at it, define the flag only with CONFIG_MIGRATION.
Signed-off-by: David Hildenbrand
---
include/linux/page-flags.h | 16 +++-
mm/compaction.c| 2 +-
mm/migrate.c | 14 +++
Now that the mapping flags are only used for folios, let's rename the
defines.
Signed-off-by: David Hildenbrand
---
fs/proc/page.c | 4 ++--
include/linux/fs.h | 2 +-
include/linux/mm_types.h | 1 -
include/linux/page-flags.h | 20 ++--
include/linux/pag
Now that PAGE_MAPPING_MOVABLE is gone, we can simplify and rely on the
folio_test_anon() test only.
... but staring at the users, this function should never even have been
called on movable_ops pages. E.g.,
* __buffer_migrate_folio() does not make sense for them
* folio_migrate_mapping() does not
Let's just special-case based on IS_ENABLED(CONFIG_BALLOON_COMPACTION
like we did for balloon_page_finalize().
Signed-off-by: David Hildenbrand
---
include/linux/balloon_compaction.h | 42 +++---
1 file changed, 15 insertions(+), 27 deletions(-)
diff --git a/include/linu
Let's bring the docs up-to-date.
Signed-off-by: David Hildenbrand
---
Documentation/mm/page_migration.rst | 39 -
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/Documentation/mm/page_migration.rst
b/Documentation/mm/page_migration.rst
index 519b35a4c
It's unused and the page counterpart is gone, so let's remove it.
Signed-off-by: David Hildenbrand
---
include/linux/page-flags.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index f539bd5e14200..b42986a578b71 100644
--- a/includ
KSM is the only remaining user, let's rename the flag. While at it,
adjust to remaining page -> folio in the doc.
Signed-off-by: David Hildenbrand
---
include/linux/page-flags.h | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/linux/page-flags.h b/include/
We can now simply check for PageAnon() and remove PageMappingFlags().
... and while at it, use the folio instead and operate on
folio->mapping.
Signed-off-by: David Hildenbrand
---
include/linux/page-flags.h | 5 -
mm/page_alloc.c| 7 +++
2 files changed, 3 insertions(+), 9
Instead, let's use a page flag. As the page flag can result in
false-positives, glue it to the page types for which we
support/implement movable_ops page migration.
Signed-off-by: David Hildenbrand
---
include/linux/balloon_compaction.h | 2 +-
include/linux/migrate.h| 8 -
inc
... instead, look them up statically based on the page type. Maybe in the
future we want a registration interface? At least for now, it can be
easily handled using the two page types that actually support page
migration.
The remaining usage of page->mapping is to flag such pages as actually
being
Convert to page_has_movable_ops(). While at it, cleanup relevant code
a bit.
The data_race() in migrate_folio_unmap() is questionable: we already
hold a page reference, and concurrent modifications can no longer
happen (iow: __ClearPageMovable() no longer exists). Drop it for now,
we'll rework pag
Let's make it clearer that we are talking about movable_ops pages.
Signed-off-by: David Hildenbrand
---
include/linux/migrate.h| 2 +-
include/linux/page-flags.h | 2 +-
mm/compaction.c| 7 ++-
mm/memory-failure.c| 4 ++--
mm/memory_hotplug.c| 8 +++-
Currently, we only support migration of individual non-folio pages, so
we can not run into that.
Signed-off-by: David Hildenbrand
---
mm/page_isolation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index b97b965b3ed01..f72b6cd38b9
As __ClearPageMovable() is gone that would have only made
PageMovable()==false but still __PageMovable()==true, now
PageMovable() == __PageMovable().
So we can replace PageMovable() checks by __PageMovable(). In fact,
__PageMovable() cannot change until a page is freed, so we can turn
some PageMov
Unused, let's remove it.
The Chinese docs in Documentation/translations/zh_CN/mm/page_migration.rst
still mention it, but that whole docs is destined to get outdated and
updated by somebody that actually speaks that language.
Signed-off-by: David Hildenbrand
---
include/linux/migrate.h | 4 ---
Instead, let's check in the callbacks if the page was already destroyed,
which can be checked by looking at zpdesc->zspage (see reset_zpdesc()).
If we detect that the page was destroyed:
(1) Fail isolation, just like the migration core would
(2) Fake migration success just like the migration cor
We can just look at the balloon device (stored in page->private), to see
of the page is still part of the balloon.
As isolated balloon pages cannot get released (they are taken off the
balloon list while isolated), we don't have to worry about this case in
the putback and migration callback. Add a
Let's move that handling directly into migrate_folio_move(), so we can
simplify move_to_new_folio(). While at it, fixup the documentation a
bit.
Note that unmap_and_move_huge_page() does not care, because it only
deals with actual folios. (we only support migration of
individual movable_ops pages)
Folios will have nothing to do with movable_ops page migration. These
functions are now unused, so let's remove them.
Signed-off-by: David Hildenbrand
---
include/linux/migrate.h | 14 --
1 file changed, 14 deletions(-)
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
... and factor the complete handling of movable_ops pages out.
Convert it similar to isolate_movable_ops_page().
While at it, convert the VM_BUG_ON_FOLIO() into a VM_WARN_ON_PAGE().
Signed-off-by: David Hildenbrand
---
mm/migrate.c | 37 -
1 file changed, 24
Let's factor it out, simplifying the calling code.
The assumption is that flush_dcache_page() is not required for
movable_ops pages: as documented for flush_dcache_folio(), it really
only applies when the kernel wrote to pagecache pages / pages in
highmem. movable_ops callbacks should be handling
Let the buddy handle clearing the type.
Signed-off-by: David Hildenbrand
---
mm/zpdesc.h | 5 -
mm/zsmalloc.c | 3 +--
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/mm/zpdesc.h b/mm/zpdesc.h
index 5cb7e3de43952..5763f36039736 100644
--- a/mm/zpdesc.h
+++ b/mm/zpdesc.h
@@ -1
... and start moving back to per-page things that will absolutely not be
folio things in the future. Add documentation and a comment that the
remaining folio stuff (lock, refcount) will have to be reworked as well.
While at it, convert the VM_BUG_ON() into a WARN_ON_ONCE() and handle
it gracefully
Let the buddy handle clearing the type.
Signed-off-by: David Hildenbrand
---
include/linux/balloon_compaction.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/balloon_compaction.h
b/include/linux/balloon_compaction.h
index b9f19da37b089..bfc6e50bd004b 100644
-
Let's allow for not clearing a page type before freeing a page to the
buddy.
We'll focus on having a type set on the first page of a larger
allocation only.
With this change, we can reliably identify typed folios even though
they might be in the process of getting freed, which will come in handy
The core will set PG_isolated only after mops->isolate_page() was
called. In case of the balloon, that is where we will remove it from
the balloon list. So we cannot have isolated pages in the balloon list.
Let's drop this unnecessary check.
Signed-off-by: David Hildenbrand
---
mm/balloon_compa
Let's drop these checks; these are conditions the core migration code
must make sure will hold either way, no need to double check.
Signed-off-by: David Hildenbrand
---
mm/zpdesc.h | 5 -
mm/zsmalloc.c | 5 -
2 files changed, 10 deletions(-)
diff --git a/mm/zpdesc.h b/mm/zpdesc.h
inde
Let's move the removal of the page from the balloon list into the single
caller, to remove the dependency on the PG_isolated flag and clarify
locking requirements.
We'll shuffle the operations a bit such that they logically make more sense
(e.g., remove from the list before clearing flags).
In ba
Based on mm/mm-new.
In the future, as we decouple "struct page" from "struct folio", pages
that support "non-lru page migration" -- movable_ops page migration
such as memory balloons and zsmalloc -- will no longer be folios. They
will not have ->mapping, ->lru, and likely no refcount and no
page l
Hi Alexander,
kernel test robot noticed the following build warnings:
url:
https://github.com/intel-lab-lkp/linux/commits/Alexander-Gordeev/mm-Cleanup-apply_to_pte_range-routine/20250613-013835
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
mm-everything
patch link:
state
The PCIe specification allows three attention indicator states,
on, off, and blink. Enable all three states instead of basic
on / off control.
Signed-off-by: Timothy Pearson
---
drivers/pci/hotplug/pnv_php.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --g
recovery
The existing PowerNV hotplug code did not handle suprise plug events
correctly, leading to a complete failure of the hotplug system after
device removal and a required reboot to detect new devices.
This comes down to two issues:
1.) When a device is suprise removed, oftentimes the bridg
Multiple race conditions existed between the PCIe hotplug driver and
the EEH driver, leading to a variety of kernel oopses of the same
general nature:
A second class of oops is also seen when the underling bus disappears
during device recovery.
Refactor the EEH module to be PCI rescan and
The PowerNV hotplug driver needs to be able to clear any frozen PE(s)
on the PHB after suprise removal of a downstream device.
Export the eeh_unfreeze_pe() symbol to allow implementation of this
functionality in the php_nv module.
Signed-off-by: Timothy Pearson
---
arch/powerpc/kernel/eeh.c | 1
presence detection
The Microsemi Switchtec PM8533 PFX 48xG3 [11f8:8533] PCIe switch system
was observed to incorrectly assert the Presence Detect Set bit in its
capabilities when tested on a Raptor Computing Systems Blackbird system,
resulting in the hot insert path never attempting a rescan of t
unplug
In cases where the root of a nested PCIe bridge configuration is
unplugged, the pnv_php driver would leak the allocated IRQ resources for
the child bridges' hotplug event notifications, resulting in a panic.
Fix this by walking all child buses and deallocating all it's IRQ
resources before
- Original Message -
> From: "Timothy Pearson"
> To: "Christoph Hellwig"
> Cc: "linuxppc-dev" , "linux-kernel"
> , "linux-pci"
> , "Madhavan Srinivasan" ,
> "Michael Ellerman" ,
> "christophe leroy" , "Naveen N Rao"
> , "Bjorn Helgaas"
> , "Shawn Anastasio"
> Sent: Wednesday, June
Hello all,
This series includes several fixes for bugs in the PowerNV PCIe hotplug
driver that were discovered in testing with a Microsemi Switchtec PM8533
PFX 48xG3 PCIe switch on a PowerNV system, as well as one workaround for
PCIe switches that don't correctly implement slot presence detection
- Original Message -
> From: "Christoph Hellwig"
> To: "Timothy Pearson"
> Cc: "linuxppc-dev" , "linux-kernel"
> , "linux-pci"
> , "Madhavan Srinivasan" ,
> "Michael Ellerman" ,
> "christophe leroy" , "Naveen N Rao"
> , "Bjorn Helgaas"
> , "Shawn Anastasio"
> Sent: Wednesday, June
On Sat, Jun 14, 2025 at 08:59:24PM +0530, Madhavan Srinivasan wrote:
> Adding myself as the contact for Power
>
> Signed-off-by: Madhavan Srinivasan
> ---
> Documentation/process/embargoed-hardware-issues.rst | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/process/embargo
On 17.06.25 11:49, David Hildenbrand wrote:
On 16.06.25 13:58, Alistair Popple wrote:
DAX no longer requires device PTEs as it always has a ZONE_DEVICE page
associated with the PTE that can be reference counted normally. Other users
of pte_devmap are drivers that set PFN_DEV when calling vmf_ins
75 matches
Mail list logo