Re: [PATCH 03/17] vdso: Add generic time data storage

2024-12-17 Thread Christophe Leroy
Le 16/12/2024 à 15:09, Thomas Weißschuh a écrit : Historically each architecture defined their own way to store the vDSO data page. Add a generic mechanism to provide storage for that page. Furthermore this generic storage will be extended to also provide uniform storage for *non*-time-relate

Re: [PATCH 2/9] cxl: Constify 'struct bin_attribute'

2024-12-17 Thread Andrew Donnellan
On Mon, 2024-12-16 at 12:32 +0100, Thomas Weißschuh wrote: > The sysfs core now allows instances of 'struct bin_attribute' to be > moved into read-only memory. Make use of that to protect them against > accidental or malicious modifications. > > Signed-off-by: Thomas Weißschuh Acked-by: Andrew D

Re: [PATCH 1/9] ocxl: Constify 'struct bin_attribute'

2024-12-17 Thread Andrew Donnellan
On Mon, 2024-12-16 at 12:32 +0100, Thomas Weißschuh wrote: > The sysfs core now allows instances of 'struct bin_attribute' to be > moved into read-only memory. Make use of that to protect them against > accidental or malicious modifications. > > Signed-off-by: Thomas Weißschuh Acked-by: Andrew D

Re: [PATCH 12/17] powerpc/vdso: Switch to generic storage implementation

2024-12-17 Thread Christophe Leroy
Le 16/12/2024 à 15:10, Thomas Weißschuh a écrit : The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh ---

Re: [PATCH] mm/ptdump: Drop GENERIC_PTDUMP

2024-12-17 Thread Anshuman Khandual
On 12/17/24 13:17, Christophe Leroy wrote: > > > Le 17/12/2024 à 04:48, Anshuman Khandual a écrit : >> GENERIC_PTDUMP does not guard any code but instead just used for platform's >> subscription into core ptdump defined under PTDUMP_CORE, which is selected. >> Instead use PTDUMP_CORE for platf

[PATCH v2] macintosh: declare ctl_table as const

2024-12-17 Thread Luis Felipe Hernandez
_hid_files[] = { { .procname = "mouse_button_emulation", .data = &mouse_emulate_buttons, --- base-commit: fdb298fa865b0136f7be842e6c2e6310dede421a change-id: 20241217-constify_ctl_table-881fcffc8804 Best regards, -- Luis Felipe Hernandez

[PATCH] ASoC: fsl_asrc_m2m: force cast for snd_pcm_format_t type

2024-12-17 Thread Shengjiu Wang
Fix sparse warnings: fsl_asrc_m2m.c:360:45: sparse: warning: incorrect type in argument 1 (different base types) fsl_asrc_m2m.c:360:45: sparse:expected restricted snd_pcm_format_t [usertype] pcm_forma fsl_asrc_m2m.c:360:45: sparse:got unsigned int [usertype] format fsl_asrc_m2m.c:361:41:

Re: [PATCH] macintosh: declare ctl_table as const

2024-12-17 Thread Felipe Hernandez
Will do, thank you for the review Ricardo! Best, Felipe

Re: [PATCH v7 8/8] PCI/AER: Add prefixes to printouts

2024-12-17 Thread Yazen Ghannam
On Tue, Dec 17, 2024 at 03:53:58PM +0200, Ilpo Järvinen wrote: > Only part of the AER diagnostic printouts use "AER:" prefix because > they use low-level pci_printk() directly to allow selecting level. > > Add "AER:" prefix to lines that are printed with pci_printk(). > Can we please include the

Re: [PATCH 0/3] PCI: Add support for logging Flit Mode TLPs (PCIe6)

2024-12-17 Thread Yazen Ghannam
On Fri, Jun 14, 2024 at 06:09:18PM +0300, Ilpo Järvinen wrote: > This series adds support for Flit Mode (PCIe6). The series is built on > top of the TLP Logging refactoring series: > > > https://lore.kernel.org/linux-pci/20240514113109.6690-1-ilpo.jarvi...@linux.intel.com/ > > Important note t

Re: [PATCH v4 18/25] gup: Don't allow FOLL_LONGTERM pinning of FS DAX pages

2024-12-17 Thread David Hildenbrand
On 17.12.24 06:13, Alistair Popple wrote: Longterm pinning of FS DAX pages should already be disallowed by various pXX_devmap checks. However a future change will cause these checks to be invalid for FS DAX pages so make folio_is_longterm_pinnable() return false for FS DAX pages. Nit: I'd consi

Re: [PATCH v4 19/25] proc/task_mmu: Ignore ZONE_DEVICE pages

2024-12-17 Thread David Hildenbrand
On 17.12.24 06:13, Alistair Popple wrote: The procfs mmu files such as smaps currently ignore device dax and fs dax pages because these pages are considered special. To maintain existing behaviour once these pages are treated as normal pages and returned from vm_normal_page() add tests to explici

Re: [PATCH v4 20/25] mm/mlock: Skip ZONE_DEVICE PMDs during mlock

2024-12-17 Thread David Hildenbrand
On 17.12.24 06:13, Alistair Popple wrote: At present mlock skips ptes mapping ZONE_DEVICE pages. A future change to remove pmd_devmap will allow pmd_trans_huge_lock() to return ZONE_DEVICE folios so make sure we continue to skip those. Signed-off-by: Alistair Popple --- mm/mlock.c | 2 ++ 1

Re: [PATCH v4 14/25] rmap: Add support for PUD sized mappings to rmap

2024-12-17 Thread David Hildenbrand
On 17.12.24 06:12, Alistair Popple wrote: The rmap doesn't currently support adding a PUD mapping of a folio. This patch adds support for entire PUD mappings of folios, primarily to allow for more standard refcounting of device DAX folios. Currently DAX is the only user of this and it doesn't req

Re: [PATCH v4 10/25] mm/mm_init: Move p2pdma page refcount initialisation to p2pdma

2024-12-17 Thread David Hildenbrand
On 17.12.24 06:12, Alistair Popple wrote: Currently ZONE_DEVICE page reference counts are initialised by core memory management code in __init_zone_device_page() as part of the memremap() call which driver modules make to obtain ZONE_DEVICE pages. This initialises page refcounts to 1 before retur

Re: [PATCH v4 09/25] mm/gup.c: Remove redundant check for PCI P2PDMA page

2024-12-17 Thread David Hildenbrand
On 17.12.24 06:12, Alistair Popple wrote: PCI P2PDMA pages are not mapped with pXX_devmap PTEs therefore the check in __gup_device_huge() is redundant. Remove it Signed-off-by: Alistair Popple Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Wiliams Acked-by: David Hildenbrand --- Nit: patch

Re: [PATCH v3 00/19] Converge on using secs_to_jiffies()

2024-12-17 Thread Andrew Morton
On Tue, 17 Dec 2024 12:53:22 -0800 Easwar Hariharan wrote: > There have been a couple of comments[1][2] that came in after you queued > the series to mm. Would you rather I send individual patches addressing > these, or just send a v4 of the entire series (-netdev of course) so you > can replace

Re: [PATCH v3 00/19] Converge on using secs_to_jiffies()

2024-12-17 Thread Easwar Hariharan
On 12/10/2024 5:00 PM, Easwar Hariharan wrote: > On 12/10/2024 4:35 PM, Andrew Morton wrote: >> On Tue, 10 Dec 2024 22:02:31 + Easwar Hariharan >> wrote: >> >>> This is a series that follows up on my previous series to introduce >>> secs_to_jiffies() and convert a few initial users. >> >> Tha

Re: [PATCH v3 02/19] coccinelle: misc: Add secs_to_jiffies script

2024-12-17 Thread Easwar Hariharan
On 12/17/2024 9:33 AM, Julia Lawall wrote: > > > On Tue, 17 Dec 2024, Alexander Gordeev wrote: > >> On Tue, Dec 10, 2024 at 10:02:33PM +, Easwar Hariharan wrote: >> >> Hi Easwar, >> >>> This script finds and suggests conversions of timeout patterns that >>> result in seconds-denominated time

Re: [PATCH v3 04/19] s390: kernel: Convert timeouts to use secs_to_jiffies()

2024-12-17 Thread Alexander Gordeev
On Tue, Dec 10, 2024 at 10:02:35PM +, Easwar Hariharan wrote: > Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced > secs_to_jiffies(). As the values here are a multiple of 1000, use > secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. > > This is conv

Re: [PATCH v3 02/19] coccinelle: misc: Add secs_to_jiffies script

2024-12-17 Thread Julia Lawall
On Tue, 17 Dec 2024, Alexander Gordeev wrote: > On Tue, Dec 10, 2024 at 10:02:33PM +, Easwar Hariharan wrote: > > Hi Easwar, > > > This script finds and suggests conversions of timeout patterns that > > result in seconds-denominated timeouts to use the new secs_to_jiffies() > > API in inclu

Re: [PATCH v3 02/19] coccinelle: misc: Add secs_to_jiffies script

2024-12-17 Thread Alexander Gordeev
On Tue, Dec 10, 2024 at 10:02:33PM +, Easwar Hariharan wrote: Hi Easwar, > This script finds and suggests conversions of timeout patterns that > result in seconds-denominated timeouts to use the new secs_to_jiffies() > API in include/linux/jiffies.h for better readability. > > Suggested-by:

Re: [PATCH v7 6/8] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-12-17 Thread Ilpo Järvinen
On Tue, 17 Dec 2024, Ilpo Järvinen wrote: > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log > (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. > > Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also > TLP Prefix Log. The relevant registers are f

[PATCH v7 8/8] PCI/AER: Add prefixes to printouts

2024-12-17 Thread Ilpo Järvinen
Only part of the AER diagnostic printouts use "AER:" prefix because they use low-level pci_printk() directly to allow selecting level. Add "AER:" prefix to lines that are printed with pci_printk(). Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pcie/aer.c | 12 +

[PATCH v7 5/8] PCI: Store # of supported End-End TLP Prefixes

2024-12-17 Thread Ilpo Järvinen
eetlp_prefix_path in the struct pci_dev tells if End-End TLP Prefixes are supported by the path or not, the value is only calculated if CONFIG_PCI_PASID is set. The Max End-End TLP Prefixes field in the Device Capabilities Register 2 also tells how many (1-4) End-End TLP Prefixes are supported (PC

[PATCH v7 7/8] PCI: Create helper to print TLP Header and Prefix Log

2024-12-17 Thread Ilpo Järvinen
Add pcie_print_tlp_log() helper to print TLP Header and Prefix Log. Print End-End Prefixes only if they are non-zero. Consolidate the few places which currently print TLP using custom formatting. The first attempt used pr_cont() instead of building a string first but it turns out pr_cont() is not

[PATCH v7 6/8] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-12-17 Thread Ilpo Järvinen
pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also TLP Prefix Log. The relevant registers are formatted identically in AER and DPC Capability, but h

[PATCH v7 4/8] PCI: Use unsigned int i in pcie_read_tlp_log()

2024-12-17 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/tlp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/tlp.c b/drivers/pci/pcie/tlp.c index 2bf15749cd31..65ac7b5d8a

[PATCH v7 3/8] PCI: Make pcie_read_tlp_log() signature same

2024-12-17 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pcie/tlp.c | 11 +-- 1 file changed, 5 insertions

[PATCH v7 2/8] PCI: Move TLP Log handling to own file

2024-12-17 Thread Ilpo Järvinen
TLP Log is PCIe feature and is processed only by AER and DPC. Configwise, DPC depends AER being enabled. In lack of better place, the TLP Log handling code was initially placed into pci.c but it can be easily placed in a separate file. Move TLP Log handling code to own file under pcie/ subdirector

[PATCH v7 0/8] PCI: Consolidate TLP Log reading and printing

2024-12-17 Thread Ilpo Järvinen
This series has the remaining patches of the AER & DPC TLP Log handling consolidation and now includes a few minor improvements to the earlier accepted TLP Logging code. I only now realized the last patch will conflict with my pci_printk() cleanups series. I'm sorry for the extra hassle. v7: - Ex

[PATCH v7 1/8] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem

2024-12-17 Thread Ilpo Järvinen
pcie_read_tlp_log() was exposed by the commit 0a5a46a6a61b ("PCI/AER: Generalize TLP Header Log reading") but this is now considered a mistake. No drivers outside of PCI subsystem should build their own diagnostic logging but should rely on PCI core doing it for them. There's currently one driver