[PATCH kernel v2] KVM: PPC: Book3s: Retire H_PUT_TCE/etc real mode handlers

2022-05-05 Thread Alexey Kardashevskiy
LoPAPR defines guest visible IOMMU with hypercalls to use it - H_PUT_TCE/etc. Implemented first on POWER7 where hypercalls would trap in the KVM in the real mode (with MMU off). The problem with the real mode is some memory is not available and some API usage crashed the host but enabling MMU was

Re: [PATCH] powerpc: fix typos in comments

2022-05-05 Thread Michael Ellerman
Julia Lawall writes: > On Thu, 5 May 2022, Joel Stanley wrote: >> On Sat, 30 Apr 2022 at 18:58, Julia Lawall wrote: >> > Various spelling mistakes in comments. >> > Detected with the help of Coccinelle. >> > >> > Signed-off-by: Julia Lawall >> >> I read the patch and it appears that all of the

Re: [PATCH 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-05 Thread Baolin Wang
On 5/6/2022 7:53 AM, Mike Kravetz wrote: On 4/29/22 01:14, Baolin Wang wrote: On some architectures (like ARM64), it can support CONT-PTE/PMD size hugetlb, which means it can support not only PMD/PUD size hugetlb: 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page size

Re: [PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-05-05 Thread Baolin Wang
On 5/6/2022 7:15 AM, Mike Kravetz wrote: On 4/29/22 01:14, Baolin Wang wrote: It is incorrect to use ptep_clear_flush() to nuke a hugetlb page table when unmapping or migrating a hugetlb page, and will change to use huge_ptep_clear_flush() instead in the following patches. So this is a

Re: [PATCH V2 2/2] tools/perf/tests: Fix session topology test to skip the test in guest environment

2022-05-05 Thread Michael Ellerman
Athira Rajeev writes: > The session topology test fails in powerpc pSeries platform. > Test logs: > <<>> > Session topology : FAILED! > <<>> > > This testcases tests cpu topology by checking the core_id and > socket_id stored in perf_env from perf session. The data from > perf session is compared

[PATCH] bug: Use normal relative pointers in 'struct bug_entry'

2022-05-05 Thread Josh Poimboeuf
With CONFIG_GENERIC_BUG_RELATIVE_POINTERS, the addr/file relative pointers are calculated weirdly: based on the beginning of the bug_entry struct address, rather than their respective pointer addresses. Make the relative pointers less surprising to both humans and tools by calculating them the

Re: [PATCH net-next v3] net: ethernet: Prepare cleanup of powerpc's asm/prom.h

2022-05-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski : On Wed, 4 May 2022 13:32:17 +0200 you wrote: > powerpc's asm/prom.h includes some headers that it doesn't > need itself. > > In order to clean powerpc's asm/prom.h up in a further step, > first clean all files

[PATCH v6 29/29] x86/tsc: Switch to perf-based hardlockup detector if TSC become unstable

2022-05-05 Thread Ricardo Neri
The HPET-based hardlockup detector relies on the TSC to determine if an observed NMI interrupt was originated by HPET timer. Hence, this detector can no longer be used with an unstable TSC. In such case, permanently stop the HPET-based hardlockup detector and start the perf-based detector. Cc:

[PATCH v6 28/29] x86/tsc: Restart NMI watchdog after refining tsc_khz

2022-05-05 Thread Ricardo Neri
The HPET hardlockup detector relies on tsc_khz to estimate the value of that the TSC will have when its HPET channel fires. A refined tsc_khz helps to estimate better the expected TSC value. Using the early value of tsc_khz may lead to a large error in the expected TSC value. Restarting the NMI

[PATCH v6 27/29] watchdog: Expose lockup_detector_reconfigure()

2022-05-05 Thread Ricardo Neri
When there are multiple implementations of the NMI watchdog, there may be situations in which switching from one to another is needed. If the time- stamp counter becomes unstable, the HPET-based NMI watchdog can no longer be used. Similarly, the HPET-based NMI watchdog relies on tsc_khz and needs

[PATCH v6 26/29] x86/watchdog: Add a shim hardlockup detector

2022-05-05 Thread Ricardo Neri
The generic hardlockup detector is based on perf. It also provides a set of weak functions that CPU architectures can override. Add a shim hardlockup detector for x86 that overrides such functions and can select between perf and HPET implementations of the detector. For clarity, add the

[PATCH v6 25/29] watchdog/hardlockup/hpet: Only enable the HPET watchdog via a boot parameter

2022-05-05 Thread Ricardo Neri
Keep the HPET-based hardlockup detector disabled unless explicitly enabled via a command-line argument. If such parameter is not given, the initialization of the HPET-based hardlockup detector fails and the NMI watchdog will fall back to use the perf-based implementation. Implement the

[PATCH v6 24/29] watchdog/hardlockup: Use parse_option_str() to handle "nmi_watchdog"

2022-05-05 Thread Ricardo Neri
Prepare hardlockup_panic_setup() to handle a comma-separated list of options. Thus, it can continue parsing its own command-line options while ignoring parameters that are relevant only to specific implementations of the hardlockup detector. Such implementations may use an early_param to parse

[PATCH v6 23/29] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2022-05-05 Thread Ricardo Neri
It is not possible to determine the source of a non-maskable interrupt (NMI) in x86. When dealing with an HPET channel, the only direct method to determine whether it caused an NMI would be to read the Interrupt Status register. However, reading HPET registers is slow and, therefore, not to be

[PATCH v6 22/29] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2022-05-05 Thread Ricardo Neri
Implement a hardlockup detector that uses an HPET channel as the source of the non-maskable interrupt. Implement the basic functionality to start, stop, and configure the timer. Designate as the handling CPU one of the CPUs that the detector monitors. Use it to service the NMI from the HPET

[PATCH v6 21/29] x86/nmi: Add an NMI_WATCHDOG NMI handler category

2022-05-05 Thread Ricardo Neri
Add a NMI_WATCHDOG as a new category of NMI handler. This new category is to be used with the HPET-based hardlockup detector. This detector does not have a direct way of checking if the HPET timer is the source of the NMI. Instead, it indirectly estimates it using the time-stamp counter.

[PATCH v6 20/29] init/main: Delay initialization of the lockup detector after smp_init()

2022-05-05 Thread Ricardo Neri
Certain implementations of the hardlockup detector require support for Inter-Processor Interrupt shorthands. On x86, support for these can only be determined after all the possible CPUs have booted once (in smp_init()). Other architectures may not need such check. lockup_detector_init() only

[PATCH v6 19/29] watchdog/hardlockup: Decouple the hardlockup detector from perf

2022-05-05 Thread Ricardo Neri
The current default implementation of the hardlockup detector assumes that it is implemented using perf events. However, the hardlockup detector can be driven by other sources of non-maskable interrupts (e.g., a properly configured timer). Group and wrap in #ifdef CONFIG_HARDLOCKUP_DETECTOR_PERF

[PATCH v6 18/29] watchdog/hardlockup: Define a generic function to detect hardlockups

2022-05-05 Thread Ricardo Neri
The procedure to detect hardlockups is independent of the underlying mechanism that generates the non-maskable interrupt used to drive the detector. Thus, it can be put in a separate, generic function. In this manner, it can be invoked by various implementations of the NMI watchdog. For this

[PATCH v6 17/29] x86/hpet: Reserve an HPET channel for the hardlockup detector

2022-05-05 Thread Ricardo Neri
The HPET hardlockup detector needs a dedicated HPET channel. Hence, create a new HPET_MODE_NMI_WATCHDOG mode category to indicate that it cannot be used for other purposes. Using MSI interrupts greatly simplifies the implementation of the detector. Specifically, it helps to avoid the complexities

[PATCH v6 16/29] x86/hpet: Prepare IRQ assignments to use the X86_ALLOC_AS_NMI flag

2022-05-05 Thread Ricardo Neri
The flag X86_ALLOC_AS_NMI indicates that the IRQs to be allocated in an IRQ domain need to be configured as NMIs. Add an as_nmi argument to hpet_assign_irq(). Even though the HPET clock events do not need NMI IRQs, the HPET hardlockup detector does. A subsequent changeset will implement the

[PATCH v6 15/29] x86/hpet: Add helper function hpet_set_comparator_periodic()

2022-05-05 Thread Ricardo Neri
Programming an HPET channel as periodic requires setting the HPET_TN_SETVAL bit in the channel configuration. Plus, the comparator register must be written twice (once for the comparator value and once for the periodic value). Since this programming might be needed in several places (e.g., the

[PATCH v6 14/29] x86/hpet: Expose hpet_writel() in header

2022-05-05 Thread Ricardo Neri
In order to allow hpet_writel() to be used by other components (e.g., the HPET-based hardlockup detector), expose it in the HPET header file. Cc: Andi Kleen Cc: Stephane Eranian Cc: "Ravi V. Shankar" Cc: io...@lists.linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org Cc: x...@kernel.org

[PATCH v6 13/29] iommu/amd: Compose MSI messages for NMI irqs in non-IR format

2022-05-05 Thread Ricardo Neri
If NMIPass is enabled in a device's DTE, the IOMMU lets NMI interrupt messages pass through unmapped. Therefore, the contents of the MSI message, not an IRTE, determine how and where the NMI is delivered. Since the IOMMU driver owns the MSI message of the NMI irq, compose it using the

[PATCH v6 12/29] iommu/amd: Enable NMIPass when allocating an NMI irq

2022-05-05 Thread Ricardo Neri
As per the AMD I/O Virtualization Technology (IOMMU) Specification, the AMD IOMMU only remaps fixed and arbitrated MSIs. NMIs are controlled by the NMIPass bit of a Device Table Entry. When set, the IOMMU passes through NMI interrupt messages unmapped. Otherwise, they are aborted. Furthermore,

[PATCH v6 11/29] iommu/amd: Expose [set|get]_dev_entry_bit()

2022-05-05 Thread Ricardo Neri
These functions are used to check and set specific bits in a Device Table Entry. For instance, they can be used to modify the setting of the NMIPass field. Currently, these functions are used only for ACPI-specified devices. However, an interrupt is to be allocated with NMI as delivery mode, the

[PATCH v6 10/29] iommu/vt-d: Implement minor tweaks for NMI irqs

2022-05-05 Thread Ricardo Neri
The Intel IOMMU interrupt remapping driver already programs correctly the delivery mode of individual irqs as per their irq_data. Improve handling of NMIs. Allow only one irq per NMI. Also, it is not necessary to cleanup irq vectors after updating affinity. NMIs do not have associated vectors.

[PATCH v6 09/29] iommu/vt-d: Set the IRTE delivery mode individually for each IRQ

2022-05-05 Thread Ricardo Neri
There are no hardware requirements to use the same delivery mode for all interrupts. Use the mode specified in the provided IRQ hardware configuration data. Since all IRQs are configured to use the delivery mode of the APIC drive, the only functional changes are where IRQs are configured to use a

[PATCH v6 08/29] iommu/vt-d: Rework prepare_irte() to support per-IRQ delivery mode

2022-05-05 Thread Ricardo Neri
struct irq_cfg::delivery_mode specifies the delivery mode of each IRQ separately. Configuring the delivery mode of an IRTE would require adding a third argument to prepare_irte(). Instead, simply take a pointer to the irq_cfg for which an IRTE is being configured. This change does not cause

[PATCH v6 07/29] iommu/vt-d: Clear the redirection hint when the destination mode is physical

2022-05-05 Thread Ricardo Neri
When the destination mode of an interrupt is physical APICID, the interrupt is delivered only to the single CPU of which the physical APICID is specified in the destination ID field. Therefore, the redirection hint is meaningless. Furthermore, on certain processors, the IOMMU does not deliver the

[PATCH v6 06/29] x86/apic/vector: Implement support for NMI delivery mode

2022-05-05 Thread Ricardo Neri
The flag X86_IRQ_ALLOC_AS_NMI indicates to the interrupt controller that it should configure the delivery mode of an IRQ as NMI. Implement such request. This causes irq_domain children in the hierarchy to configure their irq_chips accordingly. When no specific delivery mode is requested, continue

[PATCH v6 05/29] x86/apic/vector: Do not allocate vectors for NMIs

2022-05-05 Thread Ricardo Neri
Vectors are meaningless when allocating IRQs with NMI as the delivery mode. In such case, skip the reservation of IRQ vectors. Do it in the lowest- level functions where the actual IRQ reservation takes place. Since NMIs target specific CPUs, keep the functionality to find the best CPU. Cc: Andi

[PATCH v6 04/29] x86/apic: Add the X86_IRQ_ALLOC_AS_NMI irq allocation flag

2022-05-05 Thread Ricardo Neri
There are cases in which it is necessary to set the delivery mode of an interrupt as NMI. Add a new flag that callers can specify when allocating an IRQ. Cc: Andi Kleen Cc: "Ravi V. Shankar" Cc: Stephane Eranian Cc: io...@lists.linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org Cc:

[PATCH v6 03/29] x86/apic/msi: Set the delivery mode individually for each IRQ

2022-05-05 Thread Ricardo Neri
There are no restrictions in hardware to set MSI messages with its own delivery mode. Use the mode specified in the provided IRQ hardware configuration data. Since most of the IRQs are configured to use the delivery mode of the APIC driver in use (set in all of them to APIC_DELIVERY_MODE_FIXED),

[PATCH v6 02/29] x86/apic: Add irq_cfg::delivery_mode

2022-05-05 Thread Ricardo Neri
Currently, the delivery mode of all interrupts is set to the mode of the APIC driver in use. There are no restrictions in hardware to configure the delivery mode of each interrupt individually. Also, certain IRQs need to be configured with a specific delivery mode (e.g., NMI). Add a new member,

[PATCH v6 01/29] irq/matrix: Expose functions to allocate the best CPU for new vectors

2022-05-05 Thread Ricardo Neri
Certain types of interrupts, such as NMI, do not have an associated vector. They, however, target specific CPUs. Thus, when assigning the destination CPU, it is beneficial to select the one with the lowest number of vectors. Prepend the functions matrix_find_best_cpu_managed() and

[PATCH v6 00/29] x86: Implement an HPET-based hardlockup detector

2022-05-05 Thread Ricardo Neri
Hi, This is the sixth version of this patchset. It again took me a while to post this version as I have been working on other projects and implemented major reworks in the series. This work has gone through several versions. I have incorporated feedback from Thomas Gleixner and others. Many of

Re: [PATCH 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-05 Thread Mike Kravetz
On 4/29/22 01:14, Baolin Wang wrote: > On some architectures (like ARM64), it can support CONT-PTE/PMD size > hugetlb, which means it can support not only PMD/PUD size hugetlb: > 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page > size specified. > diff --git a/mm/rmap.c b/mm/rmap.c

Re: [PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-05-05 Thread Mike Kravetz
On 4/29/22 01:14, Baolin Wang wrote: > It is incorrect to use ptep_clear_flush() to nuke a hugetlb page > table when unmapping or migrating a hugetlb page, and will change > to use huge_ptep_clear_flush() instead in the following patches. > > So this is a preparation patch, which changes the

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-05-05 Thread Pali Rohár
On Thursday 05 May 2022 15:10:01 Tyrel Datwyler wrote: > On 5/5/22 02:31, Pali Rohár wrote: > > Hello! > > > > On Thursday 05 May 2022 07:16:40 Christophe Leroy wrote: > >> Le 04/05/2022 à 19:57, Pali Rohár a écrit : > >>> Since commit 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-05-05 Thread Tyrel Datwyler
On 5/5/22 02:31, Pali Rohár wrote: > Hello! > > On Thursday 05 May 2022 07:16:40 Christophe Leroy wrote: >> Le 04/05/2022 à 19:57, Pali Rohár a écrit : >>> Since commit 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on >>> device-tree properties"), powerpc kernel always fallback to PCI

Re: [PATCH v3 15/15] kbuild: make *.mod rule robust against too long argument error

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:44PM +0900 Masahiro Yamada wrote: > Like built-in.a, the command length of the *.mod rule scales with > the depth of the directory times the number of objects in the Makefile. > > Add $(obj)/ by the shell command (awk) instead of by Make's builtin > function. > >

Re: [PATCH v3 14/15] kbuild: make built-in.a rule robust against too long argument error

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:43PM +0900 Masahiro Yamada wrote: > Kbuild runs at the top of objtree instead of changing the working > directory to subdirectories. I think this design is nice overall but > some commands have a scapability issue. > > The build command of built-in.a is one of them

Re: [PATCH v3 12/15] modpost: simplify the ->is_static initialization

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:41PM +0900 Masahiro Yamada wrote: > ->is_static is set to true at allocation, then to false if the symbol > comes from the dump file. > > It is simpler to use !mod->from_dump as the init value. > > Signed-off-by: Masahiro Yamada > --- > > (no changes since v2) >

Re: [PATCH v3 09/15] kbuild: stop merging *.symversions

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:38PM +0900 Masahiro Yamada wrote: > Now modpost reads symbol versions from .*.cmd files. > > These merged *.symversions are not used any more. > > Signed-off-by: Masahiro Yamada > --- > > (no changes since v1) > > scripts/Makefile.build | 21

Re: [PATCH v3 10/15] genksyms: adjust the output format to modpost

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:39PM +0900 Masahiro Yamada wrote: > Make genksyms output symbol versions in the format modpost expects, > so the 'sed' is unneeded. > > This commit makes *.symversions completely unneeded. > > I will keep *.symversions in .gitignore and 'make clean' for a while. >

Re: [PATCH v3 07/15] modpost: extract symbol versions from *.cmd files

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:36PM +0900 Masahiro Yamada wrote: > Currently, CONFIG_MODVERSIONS needs extra link to embed the symbol > versions into ELF objects. Then, modpost extracts the version CRCs > from them. > > The following figures show how it currently works, and how I am trying > to

Re: [PATCH v3 04/15] modpost: move *.mod.c generation to write_mod_c_files()

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:33PM +0900 Masahiro Yamada wrote: > A later commit will add more code to this list_for_each_entry loop. > > Before that, move the loop body into a separate helper function. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v3: > - New patch > >

Re: [PATCH v3 03/15] modpost: merge add_{intree_flag,retpoline,staging_flag} to add_header

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:32PM +0900 Masahiro Yamada wrote: > add_intree_flag(), add_retpoline(), and add_staging_flag() are small > enough to be merged into add_header(). > > Signed-off-by: Masahiro Yamada > --- > > Changes in v3: > - New patch > > scripts/mod/modpost.c | 25

Re: [PATCH v3 02/15] modpost: change the license of EXPORT_SYMBOL to bool type

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 10:48:55PM +0900 Masahiro Yamada wrote: > On Thu, May 5, 2022 at 4:24 PM Masahiro Yamada wrote: > > > > Currently, enum export is tristate, but export_unknown does not make > > sense in any way. > > > > If the symbol name starts with "__ksymtab_", but the section name > >

Re: [PATCH v3 01/15] modpost: mitigate false-negatives for static EXPORT_SYMBOL checks

2022-05-05 Thread Nicolas Schier
On Thu, May 05, 2022 at 04:22:30PM +0900 Masahiro Yamada wrote: > The 'static' specifier and EXPORT_SYMBOL() are an odd combination. > > Since commit 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* > functions"), modpost tries to detect it, but there are false negatives. > > Here is the

Re: [PATCH 08/30] powerpc/setup: Refactor/untangle panic notifiers

2022-05-05 Thread Guilherme G. Piccoli
On 05/05/2022 15:55, Hari Bathini wrote: > [...] > > The change looks good. I have tested it on an LPAR (ppc64). > > Reviewed-by: Hari Bathini Thanks a bunch Hari, much appreciated!

Re: [PATCH 08/30] powerpc/setup: Refactor/untangle panic notifiers

2022-05-05 Thread Hari Bathini
On 28/04/22 4:19 am, Guilherme G. Piccoli wrote: The panic notifiers infrastructure is a bit limited in the scope of the callbacks - basically every kind of functionality is dropped in a list that runs in the same point during the kernel panic path. This is not really on par with the

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-05-05 Thread Bjorn Helgaas
On Thu, May 05, 2022 at 07:39:42PM +0200, Arnd Bergmann wrote: > On Thu, May 5, 2022 at 6:10 PM Bjorn Helgaas wrote: > > On Wed, May 04, 2022 at 11:31:28PM +0200, Arnd Bergmann wrote: > > > > > > The main goal is to avoid c), which is what happens on s390, but > > > can also happen elsewhere.

Re: [PATCH 2/3] of: dynamic: add of_node_alloc() and of_node_free()

2022-05-05 Thread Rob Herring
On Wed, May 04, 2022 at 05:40:32PM +0200, Clément Léger wrote: > Add functions which allows to create and free nodes. > > Signed-off-by: Clément Léger > --- > drivers/of/dynamic.c | 59 > include/linux/of.h | 9 +++ > 2 files changed, 58

Re: [PATCH 1/3] of: dynamic: add of_property_alloc() and of_property_free()

2022-05-05 Thread Rob Herring
On Wed, May 04, 2022 at 05:40:31PM +0200, Clément Léger wrote: > Add function which allows to dynamically allocate and free properties. > Use this function internally for all code that used the same logic > (mainly __of_prop_dup()). > > Signed-off-by: Clément Léger > --- > drivers/of/dynamic.c

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-05-05 Thread Arnd Bergmann
On Thu, May 5, 2022 at 6:10 PM Bjorn Helgaas wrote: > On Wed, May 04, 2022 at 11:31:28PM +0200, Arnd Bergmann wrote: > > > > The main goal is to avoid c), which is what happens on s390, but > > can also happen elsewhere. Catching b) would be nice as well, > > but is much harder to do from generic

Re: [PATCH 1/3] of: dynamic: add of_property_alloc() and of_property_free()

2022-05-05 Thread Rob Herring
On Thu, May 05, 2022 at 07:30:47AM +, Christophe Leroy wrote: > > > Le 04/05/2022 à 17:40, Clément Léger a écrit : > > Add function which allows to dynamically allocate and free properties. > > Use this function internally for all code that used the same logic > > (mainly __of_prop_dup()). >

Re: [PATCH V2 1/2] tools/perf: Add utility function to read /proc/cpuinfo for any field

2022-05-05 Thread Arnaldo Carvalho de Melo
Em Thu, May 05, 2022 at 03:09:59PM +0530, Athira Rajeev escreveu: > /proc/cpuinfo provides information about type of processor, number > of CPU's etc. Reading /proc/cpuinfo file outputs useful information > by field name like cpu, platform, model (depending on architecture) > and its value

Re: [PATCH] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-05 Thread Arnaldo Carvalho de Melo
Em Thu, May 05, 2022 at 03:30:39PM +0530, Athira Rajeev escreveu: > Perf BPF filter test fails in environment where "clang" > is not installed. > > Test failure logs: > > <<>> > 42: BPF filter: > 42.1: Basic BPF filtering : Skip > 42.2: BPF pinning

Re: [PATCH v3 00/15] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS)

2022-05-05 Thread Masahiro Yamada
On Thu, May 5, 2022 at 4:24 PM Masahiro Yamada wrote: > > > This is the third batch of cleanups in this development cycle. This series is available at: git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git lto-cleanup-v3 -- Best Regards Masahiro Yamada

Re: [PATCH v1 13/22] powerpc/ftrace: Use PPC_RAW_xxx() macros instead of opencoding.

2022-05-05 Thread Christophe Leroy
Le 04/05/2022 à 14:39, Christophe Leroy a écrit : Le 18/04/2022 à 09:38, Naveen N. Rao a écrit : Christophe Leroy wrote: PPC_RAW_xxx() macros are self explanatory and less error prone than open coding. Use them in ftrace.c Signed-off-by: Christophe Leroy ---  

[powerpc:merge] BUILD SUCCESS 36433b34c029f4181de26a82c94de8c88c339120

2022-05-05 Thread kernel test robot
-20220427 arm randconfig-c002-20220427 powerpc randconfig-c003-20220427 powerpc randconfig-c003-20220505 arm randconfig-c002-20220505 mips randconfig-c004-20220505 s390 randconfig-c005-20220505 riscv

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-05-05 Thread Bjorn Helgaas
On Wed, May 04, 2022 at 11:31:28PM +0200, Arnd Bergmann wrote: > On Wed, May 4, 2022 at 11:08 PM Bjorn Helgaas wrote: > > On Fri, Apr 29, 2022 at 03:49:59PM +0200, Niklas Schnelle wrote: > > > We introduce a new HAS_IOPORT Kconfig option to indicate support for > > > I/O Port access. In a future

Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes

2022-05-05 Thread Pali Rohár
On Thursday 05 May 2022 10:40:09 Rob Herring wrote: > On Wed, May 4, 2022 at 1:09 PM Pali Rohár wrote: > > > > DT law_trgt_if property defines Local Access Window Target Interface. > > Documentation? I was not able to find it :-( So the only documentation for me was the source code and decoding

Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes

2022-05-05 Thread Rob Herring
On Wed, May 4, 2022 at 1:09 PM Pali Rohár wrote: > > DT law_trgt_if property defines Local Access Window Target Interface. Documentation? fsl,law-trgt-if would be the preferred form. > Local Access Window Target Interface is used for identifying individual > peripheral and mapping its memory

[PATCH] powerpc/papr_scm: Fix buffer overflow issue with CONFIG_FORTIFY_SOURCE

2022-05-05 Thread Kajol Jain
With CONFIG_FORTIFY_SOURCE enabled, string functions will also perform dynamic checks for string size which can panic the kernel, like incase of overflow detection. In papr_scm, papr_scm_pmu_check_events function uses stat->stat_id with string operations, to populate the nvdimm_events_map array.

Re: [PATCH] powerpc/ftrace: Remove ftrace init tramp once kernel init is complete

2022-05-05 Thread Michael Ellerman
"Naveen N. Rao" writes: > Stop using the ftrace trampoline for init section once kernel init is > complete. > > Fixes: 67361cf8071286 ("powerpc/ftrace: Handle large kernel configs") > Cc: sta...@vger.kernel.org # v4.20+ > Signed-off-by: Naveen N. Rao > --- > arch/powerpc/include/asm/ftrace.h |

Re: [PATCH v3 02/15] modpost: change the license of EXPORT_SYMBOL to bool type

2022-05-05 Thread Masahiro Yamada
On Thu, May 5, 2022 at 4:24 PM Masahiro Yamada wrote: > > Currently, enum export is tristate, but export_unknown does not make > sense in any way. > > If the symbol name starts with "__ksymtab_", but the section name > does not start with "___ksymtab+" or "___ksymtab_gpl+", it is not > an

Re: [PATCH -next v4 4/7] arm64: add copy_{to, from}_user to machine check safe

2022-05-05 Thread Catalin Marinas
On Thu, May 05, 2022 at 02:39:43PM +0800, Tong Tiangen wrote: > 在 2022/5/4 18:26, Catalin Marinas 写道: > > On Wed, Apr 20, 2022 at 03:04:15AM +, Tong Tiangen wrote: > > > Add copy_{to, from}_user() to machine check safe. > > > > > > If copy fail due to hardware memory error, only the relevant

[PATCH 2/2] arch/Kconfig: Drop references to powerpc PAGE_SIZE symbols

2022-05-05 Thread Michael Ellerman
In the previous commit powerpc added PAGE_SIZE related config symbols using the generic names. So there's no need to refer to them in the definition of PAGE_SIZE_LESS_THAN_64KB etc, the negative dependency on the generic symbol is sufficient (in this case !PAGE_SIZE_64KB). Signed-off-by: Michael

[PATCH 1/2] powerpc: Add generic PAGE_SIZE config symbols

2022-05-05 Thread Michael Ellerman
Other arches (sh, mips, hexagon) use standard names for PAGE_SIZE related config symbols. Add matching symbols for powerpc, which are enabled by default but depend on our architecture specific PAGE_SIZE symbols. This allows generic/driver code to express dependencies on the PAGE_SIZE without

Re: [PATCH v1 1/1] powerpc/83xx/mpc8349emitx: Get rid of of_node assignment

2022-05-05 Thread Andy Shevchenko
On Thu, May 05, 2022 at 09:04:46PM +1000, Michael Ellerman wrote: > Andy Shevchenko writes: > > On Thu, Apr 21, 2022 at 08:42:30AM +1000, Michael Ellerman wrote: ... > > Any new on this? I haven't seen it yet in Linux Next. > > It's in today's next (next-20220505

Re: [PATCH v1 1/1] powerpc/83xx/mpc8349emitx: Get rid of of_node assignment

2022-05-05 Thread Michael Ellerman
; >> >> Thanks! >> >> >> >> Can we have this applied now? >> > >> > I think Michael Ellerman could help with this? >> > >> > Michael? >> >> Yep, I'll pick it up when I start putting things into next. >> >> That's usually the week after rc2, but I had a break for Easter. > > Any new on this? I haven't seen it yet in Linux Next. It's in today's next (next-20220505). cheers

Re: [PATCH V2 0/2] Fix session topology test for powerpc and add utility function to get cpuinfo entries

2022-05-05 Thread kajoljain
On 5/5/22 15:09, Athira Rajeev wrote: > The session topology test fails in powerpc pSeries platform. > Test logs: > <<>> > Session topology : FAILED! > <<>> > > This test uses cpu topology information and in powerpc, > some of the topology info is restricted in environment > like virtualized

Re: [PATCH V2 0/2] Fix session topology test for powerpc and add utility function to get cpuinfo entries

2022-05-05 Thread Disha Goel
-Original Message- From: Athira Rajeev To: a...@kernel.org, jo...@kernel.org, disg...@linux.vnet.ibm.com Cc: m...@ellerman.id.au, linux-perf-us...@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ma...@linux.vnet.ibm.com, rnsas...@linux.ibm.com, kj...@linux.ibm.com, irog...@google.com

Re: [PATCH 1/1] termbits: Convert octal defines to hex

2022-05-05 Thread Arnd Bergmann
On Thu, May 5, 2022 at 10:56 AM Ilpo Järvinen wrote: > On Wed, 4 May 2022, Arnd Bergmann wrote: > > On Wed, May 4, 2022 at 10:33 AM Ilpo Järvinen > > wrote: > > > On Wed, 4 May 2022, Arnd Bergmann wrote: > > > > On Wed, May 4, 2022 at 9:20 AM Ilpo Järvinen > > > > wrote: > > > > > > > > >

Re: [PATCH] ppc64: update the NR_CPUS to 8192

2022-05-05 Thread Sourabh Jain
On 05/05/22 15:48, Sourabh Jain wrote: The NR_CPUS on Linux kernel ranges from 1-8192. So let's match NR_CPUS with max NR_CPUS count on Linux kernel. Signed-off-by: Sourabh Jain --- defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defs.h b/defs.h index

[PATCH] ppc64: update the NR_CPUS to 8192

2022-05-05 Thread Sourabh Jain
The NR_CPUS on Linux kernel ranges from 1-8192. So let's match NR_CPUS with max NR_CPUS count on Linux kernel. Signed-off-by: Sourabh Jain --- defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defs.h b/defs.h index 1e8360d..a6735d0 100644 --- a/defs.h +++ b/defs.h @@

[PATCH] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-05 Thread Athira Rajeev
Perf BPF filter test fails in environment where "clang" is not installed. Test failure logs: <<>> 42: BPF filter: 42.1: Basic BPF filtering : Skip 42.2: BPF pinning : FAILED! 42.3: BPF prologue generation : FAILED! <<>> Enabling verbose option

[PATCH V2 2/2] tools/perf/tests: Fix session topology test to skip the test in guest environment

2022-05-05 Thread Athira Rajeev
The session topology test fails in powerpc pSeries platform. Test logs: <<>> Session topology : FAILED! <<>> This testcases tests cpu topology by checking the core_id and socket_id stored in perf_env from perf session. The data from perf session is compared with the cpu topology information from

[PATCH V2 1/2] tools/perf: Add utility function to read /proc/cpuinfo for any field

2022-05-05 Thread Athira Rajeev
/proc/cpuinfo provides information about type of processor, number of CPU's etc. Reading /proc/cpuinfo file outputs useful information by field name like cpu, platform, model (depending on architecture) and its value separated by colon. Add new utility function "cpuinfo_field" in "util/header.c"

[PATCH V2 0/2] Fix session topology test for powerpc and add utility function to get cpuinfo entries

2022-05-05 Thread Athira Rajeev
The session topology test fails in powerpc pSeries platform. Test logs: <<>> Session topology : FAILED! <<>> This test uses cpu topology information and in powerpc, some of the topology info is restricted in environment like virtualized platform. Hence this test needs to be skipped in pSeries

Re: [PATCH] powerpc/pci: Add config option for using OF 'reg' for PCI domain

2022-05-05 Thread Pali Rohár
Hello! On Thursday 05 May 2022 07:16:40 Christophe Leroy wrote: > Le 04/05/2022 à 19:57, Pali Rohár a écrit : > > Since commit 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on > > device-tree properties"), powerpc kernel always fallback to PCI domain > > assignment from OF / Device

Re: [PATCH 1/1] termbits: Convert octal defines to hex

2022-05-05 Thread Ilpo Järvinen
On Wed, 4 May 2022, Arnd Bergmann wrote: > On Wed, May 4, 2022 at 10:33 AM Ilpo Järvinen > wrote: > > On Wed, 4 May 2022, Arnd Bergmann wrote: > > > On Wed, May 4, 2022 at 9:20 AM Ilpo Järvinen > > > wrote: > > > > > > > After applying the patch locally, I still see a bunch of whitespace > > >

Re: [RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-05-05 Thread Niklas Schnelle
On Wed, 2022-05-04 at 23:31 +0200, Arnd Bergmann wrote: > On Wed, May 4, 2022 at 11:08 PM Bjorn Helgaas wrote: > > On Fri, Apr 29, 2022 at 03:49:59PM +0200, Niklas Schnelle wrote: > > > We introduce a new HAS_IOPORT Kconfig option to indicate support for > > > I/O Port access. In a future patch

Re: [PATCH] powerpc: fix typos in comments

2022-05-05 Thread Julia Lawall
On Thu, 5 May 2022, Joel Stanley wrote: > On Sat, 30 Apr 2022 at 18:58, Julia Lawall wrote: > > > > Various spelling mistakes in comments. > > Detected with the help of Coccinelle. > > > > Signed-off-by: Julia Lawall > > I read the patch and it appears that all of the corrections are good. >

Re: [PATCH 2/3] of: dynamic: add of_node_alloc() and of_node_free()

2022-05-05 Thread Christophe Leroy
Le 04/05/2022 à 17:40, Clément Léger a écrit : > Add functions which allows to create and free nodes. > > Signed-off-by: Clément Léger > --- > drivers/of/dynamic.c | 59 > include/linux/of.h | 9 +++ > 2 files changed, 58 insertions(+),

Re: [PATCH 1/3] of: dynamic: add of_property_alloc() and of_property_free()

2022-05-05 Thread Christophe Leroy
Le 04/05/2022 à 17:40, Clément Léger a écrit : > Add function which allows to dynamically allocate and free properties. > Use this function internally for all code that used the same logic > (mainly __of_prop_dup()). > > Signed-off-by: Clément Léger > --- > drivers/of/dynamic.c | 101

[PATCH v3 14/15] kbuild: make built-in.a rule robust against too long argument error

2022-05-05 Thread Masahiro Yamada
Kbuild runs at the top of objtree instead of changing the working directory to subdirectories. I think this design is nice overall but some commands have a scapability issue. The build command of built-in.a is one of them whose length scales with: O(D * N) Here, D is the length of the

[PATCH v3 10/15] genksyms: adjust the output format to modpost

2022-05-05 Thread Masahiro Yamada
Make genksyms output symbol versions in the format modpost expects, so the 'sed' is unneeded. This commit makes *.symversions completely unneeded. I will keep *.symversions in .gitignore and 'make clean' for a while. Otherwise, some people might be upset with 'git status'. Signed-off-by:

[PATCH v3 06/15] kbuild: record symbol versions in *.cmd files

2022-05-05 Thread Masahiro Yamada
When CONFIG_MODVERSIONS=y, the output from genksyms is saved in separate *.symversions files, and will be used much later when CONFIG_LTO_CLANG=y because it is impossible to update LLVM bit code here. This approach is not robust because: - *.symversions may or may not exist. If *.symversions

[PATCH v3 07/15] modpost: extract symbol versions from *.cmd files

2022-05-05 Thread Masahiro Yamada
Currently, CONFIG_MODVERSIONS needs extra link to embed the symbol versions into ELF objects. Then, modpost extracts the version CRCs from them. The following figures show how it currently works, and how I am trying to change it. Current implementation ==

[PATCH v3 12/15] modpost: simplify the ->is_static initialization

2022-05-05 Thread Masahiro Yamada
->is_static is set to true at allocation, then to false if the symbol comes from the dump file. It is simpler to use !mod->from_dump as the init value. Signed-off-by: Masahiro Yamada --- (no changes since v2) Changes in v2: - New patch scripts/mod/modpost.c | 4 ++-- 1 file changed, 2

[PATCH v3 09/15] kbuild: stop merging *.symversions

2022-05-05 Thread Masahiro Yamada
Now modpost reads symbol versions from .*.cmd files. These merged *.symversions are not used any more. Signed-off-by: Masahiro Yamada --- (no changes since v1) scripts/Makefile.build | 21 ++--- scripts/link-vmlinux.sh | 15 --- 2 files changed, 2 insertions(+),

[PATCH v3 15/15] kbuild: make *.mod rule robust against too long argument error

2022-05-05 Thread Masahiro Yamada
Like built-in.a, the command length of the *.mod rule scales with the depth of the directory times the number of objects in the Makefile. Add $(obj)/ by the shell command (awk) instead of by Make's builtin function. In-tree modules still have some room to the limit (ARG_MAX=2097152), but this is

[PATCH v3 11/15] kbuild: do not create *.prelink.o for Clang LTO or IBT

2022-05-05 Thread Masahiro Yamada
When CONFIG_LTO_CLANG=y, additional intermediate *.prelink.o is created for each module. Also, objtool is postponed until LLVM bitcode is converted to ELF. CONFIG_X86_KERNEL_IBT works in a similar way to postpone objtool until objects are merged together. This commit stops generating

[PATCH v3 08/15] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS

2022-05-05 Thread Masahiro Yamada
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_* as a placeholder. Genksyms writes the version CRCs into the linker script, which will be used for filling the __crc_* symbols. The linker script format depends on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset

[PATCH v3 13/15] modpost: use hlist for hash table implementation

2022-05-05 Thread Masahiro Yamada
Import hlist macros from include/linux/list.h to implement the hash table in a more generic way. While I was here, I increased the hash table size from 1024 to 8192 to decrease the hash collision. I moved ARRAY_SIZE() from file2alias.c to modpost.h because it is needed in modpost.c as well.

[PATCH v3 04/15] modpost: move *.mod.c generation to write_mod_c_files()

2022-05-05 Thread Masahiro Yamada
A later commit will add more code to this list_for_each_entry loop. Before that, move the loop body into a separate helper function. Signed-off-by: Masahiro Yamada --- Changes in v3: - New patch scripts/mod/modpost.c | 56 --- 1 file changed, 31

  1   2   >