* [PATCH v2 2/3] soc: fsl: Correct MAINTAINERS database (SOC)
From: Andy Shevchenko @ 2021-11-10 10:59 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel, linuxppc-dev, linux-arm-kernel
Cc: Qiang Zhao, Li Yang
In-Reply-To: <20211110105952.62013-1-andriy.shevchenko@linux.intel.com>
MAINTAINERS lacks of proper coverage for FSL headers. Fix it accordingly.
Fixes: 1b48706f027c ("MAINTAINERS: add entry for Freescale SoC drivers")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: new patch
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index a35e4d9e52b8..8748328fdc63 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7689,6 +7689,7 @@ F: Documentation/devicetree/bindings/misc/fsl,dpaa2-console.yaml
F: Documentation/devicetree/bindings/soc/fsl/
F: drivers/soc/fsl/
F: include/linux/fsl/
+F: include/soc/fsl/
FREESCALE SOC FS_ENET DRIVER
M: Pantelis Antoniou <pantelis.antoniou@gmail.com>
--
2.33.0
^ permalink raw reply related
* [PATCH v2 1/3] soc: fsl: Correct MAINTAINERS database (QUICC ENGINE LIBRARY)
From: Andy Shevchenko @ 2021-11-10 10:59 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel, linuxppc-dev, linux-arm-kernel
Cc: Qiang Zhao, Li Yang
MAINTAINERS lacks of proper coverage for FSL headers. Fix it accordingly.
Fixes: 7aa1aa6ecec2 ("QE: Move QE from arch/powerpc to drivers/soc")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: new patch
MAINTAINERS | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index a64c7bbfd809..a35e4d9e52b8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7658,8 +7658,7 @@ M: Qiang Zhao <qiang.zhao@nxp.com>
L: linuxppc-dev@lists.ozlabs.org
S: Maintained
F: drivers/soc/fsl/qe/
-F: include/soc/fsl/*qe*.h
-F: include/soc/fsl/*ucc*.h
+F: include/soc/fsl/qe/
FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
M: Li Yang <leoyang.li@nxp.com>
--
2.33.0
^ permalink raw reply related
* Re: [PATCH v1 1/1] soc: fsl: Replace kernel.h with the necessary inclusions
From: Andy Shevchenko @ 2021-11-10 11:03 UTC (permalink / raw)
To: Christophe Leroy
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Paul Mackerras
In-Reply-To: <CAHp75VfRv6gL5qhgOQ0xN=kUdGeoQOGK+8-YDzm26SZAoWa06w@mail.gmail.com>
On Sat, Oct 30, 2021 at 10:28:01AM +0300, Andy Shevchenko wrote:
> On Saturday, October 30, 2021, Christophe Leroy <christophe.leroy@csgroup.eu>
> wrote:
> > Le 29/10/2021 à 22:31, Andy Shevchenko a écrit :
...
> > That means that Michael considered it is not for him.
> >
> > And I think the reason is that in MAINTAINERS you have:
> >
> > FREESCALE QUICC ENGINE LIBRARY
> > M: Qiang Zhao <qiang.zhao@nxp.com>
> > L: linuxppc-dev@lists.ozlabs.org
> > S: Maintained
> > F: drivers/soc/fsl/qe/
> > F: include/soc/fsl/*qe*.h
> > F: include/soc/fsl/*ucc*.h
> >
> >
> > FREESCALE SOC DRIVERS
> > M: Li Yang <leoyang.li@nxp.com>
> > L: linuxppc-dev@lists.ozlabs.org
> > L: linux-arm-kernel@lists.infradead.org (moderated for
> > non-subscribers)
> > S: Maintained
> > F: Documentation/devicetree/bindings/misc/fsl,dpaa2-console.yaml
> > F: Documentation/devicetree/bindings/soc/fsl/
> > F: drivers/soc/fsl/
> > F: include/linux/fsl/
> >
> Thanks! Now I should understand why get_maintainer hadn’t showed above for
> me.
He-he, there are two bugs in MAINTAINERS.
v2 has been sent with the corresponding fixes and updated Cc list.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* [PATCH] powerpc/83xx/mpc8349emitx: Drop unused variable
From: Uwe Kleine-König @ 2021-11-10 11:07 UTC (permalink / raw)
To: Scott Wood, Michael Ellerman
Cc: Anders Roxell, Naresh Kamboju, Paul Mackerras, kernel,
Linux Kernel Functional Testing, linuxppc-dev
In-Reply-To: <20211110003932.51a605ef@canb.auug.org.au>
Commit 5d354dc35ebb ("powerpc/83xx/mpc8349emitx: Make
mcu_gpiochip_remove() return void") removed the usage of the variable
ret, but failed to remove the variable itself, resulting in:
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c: In function ‘mcu_remove’:
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c:189:6: error: unused variable ‘ret’ [-Werror=unused-variable]
189 | int ret;
| ^~~
So remove the variable now.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index bb789f33c70e..a38372f9ac12 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -186,7 +186,6 @@ static int mcu_probe(struct i2c_client *client)
static int mcu_remove(struct i2c_client *client)
{
struct mcu *mcu = i2c_get_clientdata(client);
- int ret;
kthread_stop(shutdown_thread);
--
2.30.2
^ permalink raw reply related
* Re: [PATCH v2] powerpc/64s: Get LPID bit width from device tree
From: Fabiano Rosas @ 2021-11-10 11:02 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Nicholas Piggin
In-Reply-To: <20211110080004.2148773-1-npiggin@gmail.com>
Nicholas Piggin <npiggin@gmail.com> writes:
> Allow the LPID bit width and partition table size to be set at runtime
> from the device tree.
>
> Move the PID bit width detection into the same place.
>
> KVM does not support using different sizes yet, this is mainly required
> to get the PTCR register values correct.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
> arch/powerpc/include/asm/book3s/64/mmu.h | 9 +++--
> arch/powerpc/mm/book3s64/pgtable.c | 5 ---
> arch/powerpc/mm/book3s64/radix_pgtable.c | 13 +------
> arch/powerpc/mm/init_64.c | 47 +++++++++++++++++++++++-
> 4 files changed, 52 insertions(+), 22 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
> index c02f42d1031e..8c500dd6fee4 100644
> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
> @@ -62,6 +62,9 @@ extern struct patb_entry *partition_tb;
> #define PRTS_MASK 0x1f /* process table size field */
> #define PRTB_MASK 0x0ffffffffffff000UL
>
> +/* Number of supported LPID bits */
> +extern unsigned int mmu_lpid_bits;
> +
> /* Number of supported PID bits */
> extern unsigned int mmu_pid_bits;
>
> @@ -76,10 +79,8 @@ extern unsigned long __ro_after_init radix_mem_block_size;
> #define PRTB_SIZE_SHIFT (mmu_pid_bits + 4)
> #define PRTB_ENTRIES (1ul << mmu_pid_bits)
>
> -/*
> - * Power9 currently only support 64K partition table size.
> - */
> -#define PATB_SIZE_SHIFT 16
> +#define PATB_SIZE_SHIFT (mmu_lpid_bits + 4)
> +#define PATB_ENTRIES (1ul << mmu_lpid_bits)
>
> typedef unsigned long mm_context_id_t;
> struct spinlock;
> diff --git a/arch/powerpc/mm/book3s64/pgtable.c b/arch/powerpc/mm/book3s64/pgtable.c
> index 9e16c7b1a6c5..13d1fbddecb9 100644
> --- a/arch/powerpc/mm/book3s64/pgtable.c
> +++ b/arch/powerpc/mm/book3s64/pgtable.c
> @@ -207,17 +207,12 @@ void __init mmu_partition_table_init(void)
> unsigned long patb_size = 1UL << PATB_SIZE_SHIFT;
> unsigned long ptcr;
>
> - BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 36), "Partition table size too large.");
> /* Initialize the Partition Table with no entries */
> partition_tb = memblock_alloc(patb_size, patb_size);
> if (!partition_tb)
> panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
> __func__, patb_size, patb_size);
>
> - /*
> - * update partition table control register,
> - * 64 K size.
> - */
> ptcr = __pa(partition_tb) | (PATB_SIZE_SHIFT - 12);
> set_ptcr_when_no_uv(ptcr);
> powernv_set_nmmu_ptcr(ptcr);
> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
> index ae20add7954a..1c855434f8dc 100644
> --- a/arch/powerpc/mm/book3s64/radix_pgtable.c
> +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
> @@ -33,7 +33,6 @@
>
> #include <trace/events/thp.h>
>
> -unsigned int mmu_pid_bits;
> unsigned int mmu_base_pid;
> unsigned long radix_mem_block_size __ro_after_init;
>
> @@ -357,18 +356,13 @@ static void __init radix_init_pgtable(void)
> -1, PAGE_KERNEL));
> }
>
> - /* Find out how many PID bits are supported */
> if (!cpu_has_feature(CPU_FTR_HVMODE) &&
> cpu_has_feature(CPU_FTR_P9_RADIX_PREFETCH_BUG)) {
> /*
> * Older versions of KVM on these machines perfer if the
> * guest only uses the low 19 PID bits.
> */
> - if (!mmu_pid_bits)
> - mmu_pid_bits = 19;
> - } else {
> - if (!mmu_pid_bits)
> - mmu_pid_bits = 20;
> + mmu_pid_bits = 19;
> }
> mmu_base_pid = 1;
>
> @@ -449,11 +443,6 @@ static int __init radix_dt_scan_page_sizes(unsigned long node,
> if (type == NULL || strcmp(type, "cpu") != 0)
> return 0;
>
> - /* Find MMU PID size */
> - prop = of_get_flat_dt_prop(node, "ibm,mmu-pid-bits", &size);
> - if (prop && size == 4)
> - mmu_pid_bits = be32_to_cpup(prop);
> -
> /* Grab page size encodings */
> prop = of_get_flat_dt_prop(node, "ibm,processor-radix-AP-encodings", &size);
> if (!prop)
> diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
> index 386be136026e..04f45fcb1222 100644
> --- a/arch/powerpc/mm/init_64.c
> +++ b/arch/powerpc/mm/init_64.c
> @@ -370,6 +370,9 @@ void register_page_bootmem_memmap(unsigned long section_nr,
> #endif /* CONFIG_SPARSEMEM_VMEMMAP */
>
> #ifdef CONFIG_PPC_BOOK3S_64
> +unsigned int mmu_lpid_bits;
> +unsigned int mmu_pid_bits;
> +
> static bool disable_radix = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT);
>
> static int __init parse_disable_radix(char *p)
> @@ -437,19 +440,61 @@ static void __init early_check_vec5(void)
> }
> }
>
> +static int __init dt_scan_mmu_pid_width(unsigned long node,
> + const char *uname, int depth,
> + void *data)
> +{
> + int size = 0;
> + const __be32 *prop;
> + const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
> +
> + /* We are scanning "cpu" nodes only */
> + if (type == NULL || strcmp(type, "cpu") != 0)
> + return 0;
> +
> + /* Find MMU LPID, PID register size */
> + prop = of_get_flat_dt_prop(node, "ibm,mmu-lpid-bits", &size);
> + if (prop && size == 4)
> + mmu_lpid_bits = be32_to_cpup(prop);
> +
> + prop = of_get_flat_dt_prop(node, "ibm,mmu-pid-bits", &size);
> + if (prop && size == 4)
> + mmu_pid_bits = be32_to_cpup(prop);
> +
> + if (!mmu_pid_bits && !mmu_lpid_bits)
> + return 0;
> +
> + return 1;
> +}
> +
> void __init mmu_early_init_devtree(void)
> {
> + int rc;
> + bool hvmode = !!(mfmsr() & MSR_HV);
> +
> /* Disable radix mode based on kernel command line. */
> if (disable_radix)
> cur_cpu_spec->mmu_features &= ~MMU_FTR_TYPE_RADIX;
>
> + rc = of_scan_flat_dt(dt_scan_mmu_pid_width, NULL);
> + if (hvmode && !mmu_lpid_bits) {
> + if (early_cpu_has_feature(CPU_FTR_ARCH_207S))
> + mmu_lpid_bits = 12; /* POWER8-10 */
> + else
> + mmu_lpid_bits = 10; /* POWER7 */
> + }
> + if (!mmu_pid_bits) {
> + if (early_cpu_has_feature(CPU_FTR_ARCH_300))
> + mmu_pid_bits = 20; /* POWER9-10 */
> + }
> +
> /*
> * Check /chosen/ibm,architecture-vec-5 if running as a guest.
> * When running bare-metal, we can use radix if we like
> * even though the ibm,architecture-vec-5 property created by
> * skiboot doesn't have the necessary bits set.
> */
> - if (!(mfmsr() & MSR_HV))
> + if (!hvmode)
> early_check_vec5();
>
> if (early_radix_enabled()) {
^ permalink raw reply
* Re: [PATCH v2 27/45] mfd: ntxec: Use devm_register_power_handler()
From: Jonathan Neuschäfer @ 2021-11-10 10:43 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Ulf Hansson, Rich Felker, linux-ia64, Tomer Maimon,
Santosh Shilimkar, Rafael J . Wysocki, Boris Ostrovsky,
Catalin Marinas, Linus Walleij, Dave Hansen, x86, Tali Perry,
Thierry Reding, Guo Ren, Pavel Machek, H. Peter Anvin,
linux-riscv, Vincent Chen, Will Deacon, Greg Ungerer,
Stefano Stabellini, Benjamin Fair, Yoshinori Sato,
Krzysztof Kozlowski, linux-sh, Lee Jones, Helge Deller,
Daniel Lezcano, Russell King, linux-csky, Jonathan Hunter,
Tony Lindgren, Chen-Yu Tsai, Ingo Molnar, Geert Uytterhoeven,
xen-devel, linux-mips, Guenter Roeck, Len Brown, Albert Ou,
linux-omap, Jonathan Neuschäfer, Vladimir Zapolskiy,
linux-acpi, linux-m68k, Mark Brown, Borislav Petkov, Greentime Hu,
Paul Walmsley, linux-tegra, Thomas Gleixner, Andy Shevchenko,
Nancy Yuen, linux-arm-kernel, Juergen Gross, Thomas Bogendoerfer,
linux-parisc, Nick Hu, Avi Fishman, Patrick Venture, linux-pm,
Liam Girdwood, linux-kernel, Palmer Dabbelt, Philipp Zabel,
Paul Mackerras, Andrew Morton, linuxppc-dev, openbmc,
Joshua Thompson
In-Reply-To: <04103df3-1ef4-b560-a5cb-fa51737d28ad@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]
On Mon, Nov 08, 2021 at 02:36:42PM +0300, Dmitry Osipenko wrote:
> 08.11.2021 14:22, Jonathan Neuschäfer пишет:
> > On Sun, Nov 07, 2021 at 08:42:33PM +0300, Dmitry Osipenko wrote:
> > [...]
> >> EC drivers tend to use higher priority in general. Jonathan, could you
> >> please confirm that NTXEC driver is a more preferable restart method
> >> than the watchdog?
> >
> > Yes. The original firmware uses the NTXEC to restart, and it works well,
> > so I do think it's preferable.
>
> Thank you, then I'll update the NTXEC patch like this:
>
> https://github.com/grate-driver/linux/commit/22da3d91f1734d9a0ed036220ad4ea28465af988
I tested again, but sys_off_handler_reboot called a bogus pointer
(probably reboot_prepare_cb). I think it was left uninitialized in
ntxec_probe, which uses devm_kmalloc. I guess we could switch it to
devm_kzalloc:
diff --git a/drivers/mfd/ntxec.c b/drivers/mfd/ntxec.c
index 1f55dfce14308..30364beb4b1d0 100644
--- a/drivers/mfd/ntxec.c
+++ b/drivers/mfd/ntxec.c
@@ -144,7 +144,7 @@ static int ntxec_probe(struct i2c_client *client)
const struct mfd_cell *subdevs;
size_t n_subdevs;
- ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
+ ec = devm_kzalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
if (!ec)
return -ENOMEM;
With that done, it works flawlessly.
Thanks,
Jonathan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related
* [PATCH/RFC] of: Shrink struct of_device_id
From: Geert Uytterhoeven @ 2021-11-10 16:23 UTC (permalink / raw)
To: Rob Herring, Frank Rowand
Cc: devicetree, Geert Uytterhoeven, linux-mips, linux-kernel,
linux-renesas-soc, linux-riscv, linuxppc-dev, linux-arm-kernel
Currently struct of_device_id is 196 (32-bit) or 200 (64-bit) bytes
large. It contains fixed-size strings for a name, a type, and a
compatible value, but the first two are barely used.
OF device ID tables contain multiple entries, plus an empty sentinel
entry.
Statistics for my current kernel source tree:
- 4487 tables with 16836 entries (3367200 bytes)
- 176 names (average 6.7 max 23 chars)
- 66 types (average 5.1 max 21 chars)
- 12192 compatible values (average 18.0 max 45 chars)
Taking into account the minimum needed size to store the strings, only
6.9% of the allocated space is used...
Reduce kernel size by reducing the sizes of the fixed strings by one
half.
This reduces the size of an ARM multi_v7_defconfig kernel by ca. 400
KiB. For a typical kernel supporting a single board, you can expect to
save 50-100 KiB.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Notes:
- While gcc complains if the non-NUL characters in a string do not fit
in the available space, it does not complain if there is no space to
store the string's NUL-terminator. However, that should be caught
during testing, as the affected entry won't ever match. The kernel
won't crash, as such strings will still be terminated by the
sentinel in the table.
- We could save even more by converting the strings from fixed-size
arrays to pointers, at the expense of making it harder to mark
entries __init. Given most drivers support binding and unbinding
and thus cannot use __init for of_device_id tables, perhaps that's
the way to go?
Thanks for your comments!
---
include/linux/mod_devicetable.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index ae2e75d15b219920..2bb2558d52d30d2b 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -266,9 +266,9 @@ struct sdw_device_id {
* Struct used for matching a device
*/
struct of_device_id {
- char name[32];
- char type[32];
- char compatible[128];
+ char name[24];
+ char type[24];
+ char compatible[48];
const void *data;
};
--
2.25.1
^ permalink raw reply related
* Re: [PATCH/RFC] of: Shrink struct of_device_id
From: Rasmus Villemoes @ 2021-11-10 16:51 UTC (permalink / raw)
To: Geert Uytterhoeven, Rob Herring, Frank Rowand
Cc: devicetree, linux-mips, linux-kernel, linux-renesas-soc,
linux-riscv, linuxppc-dev, linux-arm-kernel
In-Reply-To: <ef59d6fd3b2201b912d5eaa7f7a037d8f9adb744.1636561068.git.geert+renesas@glider.be>
On 10/11/2021 17.23, Geert Uytterhoeven wrote:
> Currently struct of_device_id is 196 (32-bit) or 200 (64-bit) bytes
> large. It contains fixed-size strings for a name, a type, and a
> compatible value, but the first two are barely used.
> OF device ID tables contain multiple entries, plus an empty sentinel
> entry.
>
> Statistics for my current kernel source tree:
> - 4487 tables with 16836 entries (3367200 bytes)
> - 176 names (average 6.7 max 23 chars)
> - 66 types (average 5.1 max 21 chars)
> - 12192 compatible values (average 18.0 max 45 chars)
> Taking into account the minimum needed size to store the strings, only
> 6.9% of the allocated space is used...
>
> Reduce kernel size by reducing the sizes of the fixed strings by one
> half.
Tried something like this 2.5 years ago:
https://lore.kernel.org/lkml/20190425203101.9403-1-linux@rasmusvillemoes.dk/
I think that there might be some not-in-tree code that relies on the
existing layout. I considered adding a CONFIG_ knob, either for these
sizes in particular, or more generally a def_bool y "CONFIG_LEGACY"
which embedded folks that build the entire distro from source and don't
have any legacy things can turn off, and then get more sensible defaults
all around.
Including fx in the TCP stack where some CVE fix required changing some
parameter, but the kernel itself couldn't ship a sane default because
no-regressions, so userspace had to learn to set yet another sysctl
properly.
Rasmus
^ permalink raw reply
* Re: [PATCH] powerpc: Fix sigset_t copy
From: Christophe Leroy @ 2021-11-10 17:12 UTC (permalink / raw)
To: Finn Thain, Michael Ellerman, Benjamin Herrenschmidt,
Paul Mackerras
Cc: linuxppc-dev, linux-kernel, Christopher M. Riedl
In-Reply-To: <08bbe7240b384016e0b2912ecf3bf5e2d25ef2c6.1636501628.git.fthain@linux-m68k.org>
Le 10/11/2021 à 00:47, Finn Thain a écrit :
> From: Christophe Leroy <christophe.leroy@csgroup.eu>
>
> The conversion from __copy_from_user() to __get_user() introduced a
> regression in __get_user_sigset() in v5.13. The bug was subsequently
> copied and pasted in unsafe_get_user_sigset().
>
> The regression was reported by users of the Xorg packages distributed in
> Debian/powerpc --
>
> "The symptoms are that the fb screen goes blank, with the backlight
> remaining on and no errors logged in /var/log; wdm (or startx) run
> with no effect (I tried logging in in the blind, with no effect).
> And they are hard to kill, requiring 'kill -KILL ...'"
>
> Fix the regression by casting the __get_user() assignment lvalue to u64
> so that the entire struct gets copied.
>
> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> Cc: Christopher M. Riedl <cmr@bluescreens.de>
> Link: https://lore.kernel.org/linuxppc-dev/FEtBUOuFPMN4zJy4bIOqz6C4xoliCbTxS7VtMKD6UZkbvEbycUceRgGAd7e9-trRdwVN3hWAbQi0qrNx8Zgn8niTQf2KPVdw-W35czDIaeQ=@protonmail.com/
> Fixes: 887f3ceb51cd ("powerpc/signal32: Convert do_setcontext[_tm]() to user access block")
> Fixes: d3ccc9781560 ("powerpc/signal: Use __get_user() to copy sigset_t")
> Reported-and-tested-by: Stan Johnson <userm57@yahoo.com>
> Signed-off-by: Finn Thain <fthain@linux-m68k.org>
> ---
Hi Finn,
> Christophe, I hope this change is the one you wanted to see upstream (?).
> If it is acceptable please add your signed-off-by tag.
I'm on holidays, I was planing to handle this next week.
Only PPC64 uses __get_user_sigset() on mainline so I don't think it is
worth modifying it. If we decide to modify it anyway in mainline, it
should be another patch that can be backported without additional effort.
For unsafe_get_user_sigset(), as we don't have the KUAP overhead that we
had with __get_user(), I'd prefer we simply perform two 32 bits
unsafe_get_user(), one for sig[0] and one for sig[1], instead of all
those casts to u64.
Thanks anyway for the detailed description of the problem.
Christophe
> ---
> arch/powerpc/kernel/signal.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
> index 1f07317964e4..44e736b88e91 100644
> --- a/arch/powerpc/kernel/signal.h
> +++ b/arch/powerpc/kernel/signal.h
> @@ -23,10 +23,10 @@ static inline int __get_user_sigset(sigset_t *dst, const sigset_t __user *src)
> {
> BUILD_BUG_ON(sizeof(sigset_t) != sizeof(u64));
>
> - return __get_user(dst->sig[0], (u64 __user *)&src->sig[0]);
> + return __get_user(*(u64 *)&dst->sig[0], (u64 __user *)&src->sig[0]);
> }
> #define unsafe_get_user_sigset(dst, src, label) \
> - unsafe_get_user((dst)->sig[0], (u64 __user *)&(src)->sig[0], label)
> + unsafe_get_user(*(u64 *)&(dst)->sig[0], (u64 __user *)&(src)->sig[0], label)
>
> #ifdef CONFIG_VSX
> extern unsigned long copy_vsx_to_user(void __user *to,
>
^ permalink raw reply
* Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates
From: Christian Zigotzky @ 2021-11-10 18:07 UTC (permalink / raw)
To: bhelgaas@google.com >> Bjorn Helgaas, maz,
Alyssa Rosenzweig, lorenzo.pieralisi, Rob Herring
Cc: axboe, kw, Darren Stevens, mad skateman, Arnd Bergmann,
linux-pci@vger.kernel.org, damien.lemoal, R.T.Dickinson,
Olof Johansson, Matthew Leaman, linuxppc-dev, robert,
Christian Zigotzky
In-Reply-To: <3b210c92-4be6-ce49-7512-bb194475eeab@xenosoft.de>
On 09 November 2021 at 03:45 pm, Christian Zigotzky wrote:
> Hello,
>
> The Nemo board [1] doesn't recognize any ATA disks with the pci-v5.16
updates [2].
>
> Error messages:
>
> ata4.00: gc timeout cmd 0xec
> ata4.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> ata1.00: gc timeout cmd 0xec
> ata1.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> ata3.00: gc timeout cmd 0xec
> ata3.00: failed to IDENTIFY (I/O error, error_mask=0x4)
>
> I was able to revert the new pci-v5.16 updates [2]. After a new
compiling, the kernel recognize all ATA disks correctly.
>
> Could you please check the pci-v5.16 updates [2]?
>
> Please find attached the kernel config.
>
> Thanks,
> Christian
>
> [1] https://en.wikipedia.org/wiki/AmigaOne_X1000
> [2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c5c62ddf88c34bc83b66e4ac9beb2bb0e1887d4
Hi All,
Many thanks for your nice responses.
I bisected today [1]. 0412841812265734c306ba5ef8088bcb64d5d3bd (of/irq:
Allow matching of an interrupt-map local to an interrupt controller) [2]
is the first bad commit.
I was able to revert the first bad commit [1]. After a new compiling,
the kernel detects all ATA disks without any problems.
I created a patch for an easy reverting the bad commit [1]. With this
patch we can do further our kernel tests.
Could you please check the first bad commit [2]?
Thanks,
Christian
[1] https://forum.hyperion-entertainment.com/viewtopic.php?p=54398#p54398
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0412841812265734c306ba5ef8088bcb64d5d3bd
[+ Marc Zyngier, Alyssa Rosenzweig, Lorenzo Pieralisi, and Rob Herring
because of the first bad commit]
^ permalink raw reply
* Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates
From: Bjorn Helgaas @ 2021-11-10 18:41 UTC (permalink / raw)
To: Christian Zigotzky
Cc: axboe, Rob Herring, lorenzo.pieralisi, R.T.Dickinson,
Arnd Bergmann, kw, maz, damien.lemoal, Olof Johansson,
Darren Stevens, mad skateman, linux-pci@vger.kernel.org,
bhelgaas@google.com >> Bjorn Helgaas, robert,
Matthew Leaman, linuxppc-dev, Alyssa Rosenzweig,
Christian Zigotzky
In-Reply-To: <78308692-02e6-9544-4035-3171a8e1e6d4@xenosoft.de>
On Wed, Nov 10, 2021 at 07:07:24PM +0100, Christian Zigotzky wrote:
> On 09 November 2021 at 03:45 pm, Christian Zigotzky wrote:
> > Hello,
> >
> > The Nemo board [1] doesn't recognize any ATA disks with the pci-v5.16
> updates [2].
> >
> > Error messages:
> >
> > ata4.00: gc timeout cmd 0xec
> > ata4.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> > ata1.00: gc timeout cmd 0xec
> > ata1.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> > ata3.00: gc timeout cmd 0xec
> > ata3.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> >
> > I was able to revert the new pci-v5.16 updates [2]. After a new
> compiling, the kernel recognize all ATA disks correctly.
> >
> > Could you please check the pci-v5.16 updates [2]?
> >
> > Please find attached the kernel config.
> >
> > Thanks,
> > Christian
> >
> > [1] https://en.wikipedia.org/wiki/AmigaOne_X1000
> > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c5c62ddf88c34bc83b66e4ac9beb2bb0e1887d4
>
> Hi All,
>
> Many thanks for your nice responses.
>
> I bisected today [1]. 0412841812265734c306ba5ef8088bcb64d5d3bd (of/irq:
> Allow matching of an interrupt-map local to an interrupt controller) [2] is
> the first bad commit.
>
> I was able to revert the first bad commit [1]. After a new compiling, the
> kernel detects all ATA disks without any problems.
>
> I created a patch for an easy reverting the bad commit [1]. With this patch
> we can do further our kernel tests.
>
> Could you please check the first bad commit [2]?
>
> Thanks,
> Christian
>
> [1] https://forum.hyperion-entertainment.com/viewtopic.php?p=54398#p54398
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0412841812265734c306ba5ef8088bcb64d5d3bd
>
> [+ Marc Zyngier, Alyssa Rosenzweig, Lorenzo Pieralisi, and Rob Herring
> because of the first bad commit]
Thank you very much for the bisection and for also testing the revert!
It's easy enough to revert 041284181226 ("of/irq: Allow matching of an
interrupt-map local to an interrupt controller"), and it seems like
that's what we need to do. I have it tentatively queued up.
That commit was part of the new support for the Apple M1 PCIe
interface, and I don't know what effect a revert will have on that
support. Marc, Alyssa?
Bjorn
^ permalink raw reply
* [PATCH] ppc64/fadump: fix inaccurate CPU state info in vmcore generated with panic
From: Hari Bathini @ 2021-11-10 19:01 UTC (permalink / raw)
To: mpe, linuxppc-dev; +Cc: Hari Bathini, sourabhjain, mahesh, npiggin
In panic path, fadump is triggered via a panic notifier function.
Before calling panic notifier functions, smp_send_stop() gets called,
which stops all CPUs except the panic'ing CPU. Commit 8389b37dffdc
("powerpc: stop_this_cpu: remove the cpu from the online map.") and
again commit bab26238bbd4 ("powerpc: Offline CPU in stop_this_cpu()")
started marking CPUs as offline while stopping them. So, if a kernel
has either of the above commits, vmcore captured with fadump via panic
path would show only the panic'ing CPU as online. Sample output of
crash-utility with such vmcore:
# crash vmlinux vmcore
...
KERNEL: vmlinux
DUMPFILE: vmcore [PARTIAL DUMP]
CPUS: 1
DATE: Wed Nov 10 09:56:34 EST 2021
UPTIME: 00:00:42
LOAD AVERAGE: 2.27, 0.69, 0.24
TASKS: 183
NODENAME: XXXXXXXXX
RELEASE: 5.15.0+
VERSION: #974 SMP Wed Nov 10 04:18:19 CST 2021
MACHINE: ppc64le (2500 Mhz)
MEMORY: 8 GB
PANIC: "Kernel panic - not syncing: sysrq triggered crash"
PID: 3394
COMMAND: "bash"
TASK: c0000000150a5f80 [THREAD_INFO: c0000000150a5f80]
CPU: 1
STATE: TASK_RUNNING (PANIC)
crash> p -x __cpu_online_mask
__cpu_online_mask = $1 = {
bits = {0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
}
crash>
crash>
crash> p -x __cpu_active_mask
__cpu_active_mask = $2 = {
bits = {0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
}
crash>
While this has been the case since fadump was introduced, the issue
was not identified for two probable reasons:
- In general, the bulk of the vmcores analyzed were from crash
due to exception.
- The above did change since commit 8341f2f222d7 ("sysrq: Use
panic() to force a crash") started using panic() instead of
deferencing NULL pointer to force a kernel crash. But then
commit de6e5d38417e ("powerpc: smp_send_stop do not offline
stopped CPUs") stopped marking CPUs as offline till kernel
commit bab26238bbd4 ("powerpc: Offline CPU in stop_this_cpu()")
reverted that change.
To avoid vmcore from showing only one CPU as online in panic path,
skip marking non panic'ing CPUs as offline while stopping them
during fadump crash.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
arch/powerpc/kernel/smp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index c23ee842c4c3..20555d5d5966 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -61,6 +61,7 @@
#include <asm/cpu_has_feature.h>
#include <asm/ftrace.h>
#include <asm/kup.h>
+#include <asm/fadump.h>
#ifdef DEBUG
#include <asm/udbg.h>
@@ -626,7 +627,8 @@ static void nmi_stop_this_cpu(struct pt_regs *regs)
/*
* IRQs are already hard disabled by the smp_handle_nmi_ipi.
*/
- set_cpu_online(smp_processor_id(), false);
+ if (!(oops_in_progress && should_fadump_crash()))
+ set_cpu_online(smp_processor_id(), false);
spin_begin();
while (1)
@@ -650,7 +652,8 @@ static void stop_this_cpu(void *dummy)
* to know other CPUs are offline before it breaks locks to flush
* printk buffers, in case we panic()ed while holding the lock.
*/
- set_cpu_online(smp_processor_id(), false);
+ if (!(oops_in_progress && should_fadump_crash()))
+ set_cpu_online(smp_processor_id(), false);
spin_begin();
while (1)
--
2.31.1
^ permalink raw reply related
* Re: [PATCH/RFC] of: Shrink struct of_device_id
From: Geert Uytterhoeven @ 2021-11-10 19:07 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
linuxppc-dev, open list:BROADCOM NVRAM DRIVER,
Linux Kernel Mailing List, Linux-Renesas, Rob Herring,
linux-riscv, Frank Rowand, Linux ARM
In-Reply-To: <ddcfa4b9-f7f4-04f5-89f2-b04c284e1945@prevas.dk>
Hi Rasmus,
On Wed, Nov 10, 2021 at 5:51 PM Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
> On 10/11/2021 17.23, Geert Uytterhoeven wrote:
> > Currently struct of_device_id is 196 (32-bit) or 200 (64-bit) bytes
> > large. It contains fixed-size strings for a name, a type, and a
> > compatible value, but the first two are barely used.
> > OF device ID tables contain multiple entries, plus an empty sentinel
> > entry.
> >
> > Statistics for my current kernel source tree:
> > - 4487 tables with 16836 entries (3367200 bytes)
> > - 176 names (average 6.7 max 23 chars)
> > - 66 types (average 5.1 max 21 chars)
> > - 12192 compatible values (average 18.0 max 45 chars)
> > Taking into account the minimum needed size to store the strings, only
> > 6.9% of the allocated space is used...
> >
> > Reduce kernel size by reducing the sizes of the fixed strings by one
> > half.
>
> Tried something like this 2.5 years ago:
> https://lore.kernel.org/lkml/20190425203101.9403-1-linux@rasmusvillemoes.dk/
I wasn't aware of that. I reworked some code which used multiple
of_find_compatible_node() calls before, and noticed the end result
had grown a lot due to the sheer size of of_device_id
("[PATCH] soc: renesas: Consolidate product register handling",
https://lore.kernel.org/all/057721f46c7499de4133135488f0f3da7fb39265.1636570669.git.geert+renesas@glider.be).
> I think that there might be some not-in-tree code that relies on the
> existing layout. I considered adding a CONFIG_ knob, either for these
> sizes in particular, or more generally a def_bool y "CONFIG_LEGACY"
> which embedded folks that build the entire distro from source and don't
> have any legacy things can turn off, and then get more sensible defaults
> all around.
Most of that should have been gone since the #ifdef KERNEL was removed
from include/linux/mod_devicetable.h in commit 6543becf26fff612
("mod/file2alias: make modalias generation safe for cross compiling").
Of course you can never know for sure...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates
From: Marc Zyngier @ 2021-11-10 19:09 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: axboe, Rob Herring, lorenzo.pieralisi, R.T.Dickinson,
Arnd Bergmann, kw, linux-pci@vger.kernel.org, damien.lemoal,
Olof Johansson, Darren Stevens, mad skateman, Christian Zigotzky,
bhelgaas@google.com >> Bjorn Helgaas, robert,
Matthew Leaman, linuxppc-dev, Alyssa Rosenzweig,
Christian Zigotzky
In-Reply-To: <20211110184106.GA1251058@bhelgaas>
HI all,
On Wed, 10 Nov 2021 18:41:06 +0000,
Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Wed, Nov 10, 2021 at 07:07:24PM +0100, Christian Zigotzky wrote:
> > On 09 November 2021 at 03:45 pm, Christian Zigotzky wrote:
> > > Hello,
> > >
> > > The Nemo board [1] doesn't recognize any ATA disks with the pci-v5.16
> > updates [2].
> > >
> > > Error messages:
> > >
> > > ata4.00: gc timeout cmd 0xec
> > > ata4.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> > > ata1.00: gc timeout cmd 0xec
> > > ata1.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> > > ata3.00: gc timeout cmd 0xec
> > > ata3.00: failed to IDENTIFY (I/O error, error_mask=0x4)
> > >
> > > I was able to revert the new pci-v5.16 updates [2]. After a new
> > compiling, the kernel recognize all ATA disks correctly.
> > >
> > > Could you please check the pci-v5.16 updates [2]?
> > >
> > > Please find attached the kernel config.
> > >
> > > Thanks,
> > > Christian
> > >
> > > [1] https://en.wikipedia.org/wiki/AmigaOne_X1000
> > > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c5c62ddf88c34bc83b66e4ac9beb2bb0e1887d4
> >
> > Hi All,
> >
> > Many thanks for your nice responses.
> >
> > I bisected today [1]. 0412841812265734c306ba5ef8088bcb64d5d3bd (of/irq:
> > Allow matching of an interrupt-map local to an interrupt controller) [2] is
> > the first bad commit.
> >
> > I was able to revert the first bad commit [1]. After a new compiling, the
> > kernel detects all ATA disks without any problems.
> >
> > I created a patch for an easy reverting the bad commit [1]. With this patch
> > we can do further our kernel tests.
> >
> > Could you please check the first bad commit [2]?
> >
> > Thanks,
> > Christian
> >
> > [1] https://forum.hyperion-entertainment.com/viewtopic.php?p=54398#p54398
> > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0412841812265734c306ba5ef8088bcb64d5d3bd
> >
> > [+ Marc Zyngier, Alyssa Rosenzweig, Lorenzo Pieralisi, and Rob Herring
> > because of the first bad commit]
>
> Thank you very much for the bisection and for also testing the revert!
>
> It's easy enough to revert 041284181226 ("of/irq: Allow matching of an
> interrupt-map local to an interrupt controller"), and it seems like
> that's what we need to do. I have it tentatively queued up.
>
> That commit was part of the new support for the Apple M1 PCIe
> interface, and I don't know what effect a revert will have on that
> support. Marc, Alyssa?
It is going to badly break the M1 support, as we won't be able to take
interrupts to detect that the PCIe link is up.
Before we apply a full blown revert and decide that this isn't
workable (and revert the whole M1 PCIe series, because they are
otherwise somewhat pointless), I'd like to understand *what* breaks
exactly.
Christian, could you point me to the full DT that this machine uses?
This would help understanding what goes wrong, and cook something for
you to test.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply
* [PATCH v2 0/5] preempt: PREEMPT vs PREEMPT_DYNAMIC configs fixup
From: Valentin Schneider @ 2021-11-10 20:24 UTC (permalink / raw)
To: linux-kernel, kasan-dev, linuxppc-dev, linux-kbuild
Cc: Marco Elver, Michal Marek, Peter Zijlstra, Frederic Weisbecker,
Mike Galbraith, Nick Desaulniers, Steven Rostedt, Paul Mackerras,
Masahiro Yamada, Ingo Molnar, Dmitry Vyukov
Hi folks,
Thanks to suggestions from Mike, Frederic and Marco I ended up with
something that looks somewhat sane and with a minimal amount of crud.
Patches
=======
o Patch 1 is the meat of the topic and could be picked on its own if the
rest is too icky.
o Patch 2 introduces helpers for the dynamic preempt state
o Patches 3-5 make use of said accessors where relevant.
Testing
=======
Briefly tested the dynamic part on an x86 kernel + QEMU. x86_64_defconfig
gets me:
Dynamic Preempt: voluntary
and appending preempt=full gets me:
Dynamic Preempt: full
Revisions
=========
v1: http://lore.kernel.org/r/20211105104035.3112162-1-valentin.schneider@arm.com
v1.5: http://lore.kernel.org/r/20211109151057.3489223-1-valentin.schneider@arm.com
This v2 is completely different from v1, so I felt like I could get away
without writing a version changelog...
Cheers,
Valentin
Valentin Schneider (5):
preempt: Restore preemption model selection configs
preempt/dynamic: Introduce preempt mode accessors
powerpc: Use preemption model accessors
kscan: Use preemption model accessors
ftrace: Use preemption model accessors for trace header printout
arch/powerpc/kernel/interrupt.c | 2 +-
arch/powerpc/kernel/traps.c | 2 +-
include/linux/kernel.h | 2 +-
include/linux/sched.h | 16 +++++++++++++
include/linux/vermagic.h | 2 +-
init/Makefile | 2 +-
kernel/Kconfig.preempt | 42 ++++++++++++++++-----------------
kernel/kcsan/kcsan_test.c | 4 ++--
kernel/sched/core.c | 17 ++++++++++---
kernel/trace/trace.c | 14 ++++-------
10 files changed, 62 insertions(+), 41 deletions(-)
--
2.25.1
^ permalink raw reply
* [PATCH v2 1/5] preempt: Restore preemption model selection configs
From: Valentin Schneider @ 2021-11-10 20:24 UTC (permalink / raw)
To: linux-kernel, kasan-dev, linuxppc-dev, linux-kbuild
Cc: Marco Elver, Michal Marek, Peter Zijlstra, Frederic Weisbecker,
Mike Galbraith, Nick Desaulniers, Steven Rostedt, Paul Mackerras,
Masahiro Yamada, Ingo Molnar, Dmitry Vyukov
In-Reply-To: <20211110202448.4054153-1-valentin.schneider@arm.com>
Commit c597bfddc9e9 ("sched: Provide Kconfig support for default dynamic
preempt mode") changed the selectable config names for the preemption
model. This means a config file must now select
CONFIG_PREEMPT_BEHAVIOUR=y
rather than
CONFIG_PREEMPT=y
to get a preemptible kernel. This means all arch config files would need to
be updated - right now they'll all end up with the default
CONFIG_PREEMPT_NONE_BEHAVIOUR.
Rather than touch a good hundred of config files, restore usage of
CONFIG_PREEMPT{_NONE, _VOLUNTARY}. Make them configure:
o The build-time preemption model when !PREEMPT_DYNAMIC
o The default boot-time preemption model when PREEMPT_DYNAMIC
Add siblings of those configs with the _BUILD suffix to unconditionally
designate the build-time preemption model (PREEMPT_DYNAMIC is built with
the "highest" preemption model it supports, aka PREEMPT). Downstream
configs should by now all be depending / selected by CONFIG_PREEMPTION
rather than CONFIG_PREEMPT, so only a few sites need patching up.
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
include/linux/kernel.h | 2 +-
include/linux/vermagic.h | 2 +-
init/Makefile | 2 +-
kernel/Kconfig.preempt | 42 ++++++++++++++++++++--------------------
kernel/sched/core.c | 6 +++---
5 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 2776423a587e..9c7d774ef809 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -88,7 +88,7 @@
struct completion;
struct user;
-#ifdef CONFIG_PREEMPT_VOLUNTARY
+#ifdef CONFIG_PREEMPT_VOLUNTARY_BUILD
extern int __cond_resched(void);
# define might_resched() __cond_resched()
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index 1eaaa93c37bf..329d63babaeb 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
@@ -15,7 +15,7 @@
#else
#define MODULE_VERMAGIC_SMP ""
#endif
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT_BUILD
#define MODULE_VERMAGIC_PREEMPT "preempt "
#elif defined(CONFIG_PREEMPT_RT)
#define MODULE_VERMAGIC_PREEMPT "preempt_rt "
diff --git a/init/Makefile b/init/Makefile
index 2846113677ee..04eeee12c076 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -30,7 +30,7 @@ $(obj)/version.o: include/generated/compile.h
quiet_cmd_compile.h = CHK $@
cmd_compile.h = \
$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
- "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" \
+ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT_BUILD)" \
"$(CONFIG_PREEMPT_RT)" $(CONFIG_CC_VERSION_TEXT) "$(LD)"
include/generated/compile.h: FORCE
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index 60f1bfc3c7b2..ce77f0265660 100644
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -1,12 +1,23 @@
# SPDX-License-Identifier: GPL-2.0-only
+config PREEMPT_NONE_BUILD
+ bool
+
+config PREEMPT_VOLUNTARY_BUILD
+ bool
+
+config PREEMPT_BUILD
+ bool
+ select PREEMPTION
+ select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
+
choice
prompt "Preemption Model"
- default PREEMPT_NONE_BEHAVIOUR
+ default PREEMPT_NONE
-config PREEMPT_NONE_BEHAVIOUR
+config PREEMPT_NONE
bool "No Forced Preemption (Server)"
- select PREEMPT_NONE if !PREEMPT_DYNAMIC
+ select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC
help
This is the traditional Linux preemption model, geared towards
throughput. It will still provide good latencies most of the
@@ -18,10 +29,10 @@ config PREEMPT_NONE_BEHAVIOUR
raw processing power of the kernel, irrespective of scheduling
latencies.
-config PREEMPT_VOLUNTARY_BEHAVIOUR
+config PREEMPT_VOLUNTARY
bool "Voluntary Kernel Preemption (Desktop)"
depends on !ARCH_NO_PREEMPT
- select PREEMPT_VOLUNTARY if !PREEMPT_DYNAMIC
+ select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC
help
This option reduces the latency of the kernel by adding more
"explicit preemption points" to the kernel code. These new
@@ -37,10 +48,10 @@ config PREEMPT_VOLUNTARY_BEHAVIOUR
Select this if you are building a kernel for a desktop system.
-config PREEMPT_BEHAVIOUR
+config PREEMPT
bool "Preemptible Kernel (Low-Latency Desktop)"
depends on !ARCH_NO_PREEMPT
- select PREEMPT
+ select PREEMPT_BUILD
help
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
@@ -58,7 +69,7 @@ config PREEMPT_BEHAVIOUR
config PREEMPT_RT
bool "Fully Preemptible Kernel (Real-Time)"
- depends on EXPERT && ARCH_SUPPORTS_RT && !PREEMPT_DYNAMIC
+ depends on EXPERT && ARCH_SUPPORTS_RT
select PREEMPTION
help
This option turns the kernel into a real-time kernel by replacing
@@ -75,17 +86,6 @@ config PREEMPT_RT
endchoice
-config PREEMPT_NONE
- bool
-
-config PREEMPT_VOLUNTARY
- bool
-
-config PREEMPT
- bool
- select PREEMPTION
- select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
-
config PREEMPT_COUNT
bool
@@ -95,8 +95,8 @@ config PREEMPTION
config PREEMPT_DYNAMIC
bool "Preemption behaviour defined on boot"
- depends on HAVE_PREEMPT_DYNAMIC
- select PREEMPT
+ depends on HAVE_PREEMPT_DYNAMIC && !PREEMPT_RT
+ select PREEMPT_BUILD
default y
help
This option allows to define the preemption model on the kernel
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f2611b9cf503..97047aa7b6c2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6625,13 +6625,13 @@ __setup("preempt=", setup_preempt_mode);
static void __init preempt_dynamic_init(void)
{
if (preempt_dynamic_mode == preempt_dynamic_undefined) {
- if (IS_ENABLED(CONFIG_PREEMPT_NONE_BEHAVIOUR)) {
+ if (IS_ENABLED(CONFIG_PREEMPT_NONE)) {
sched_dynamic_update(preempt_dynamic_none);
- } else if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY_BEHAVIOUR)) {
+ } else if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY)) {
sched_dynamic_update(preempt_dynamic_voluntary);
} else {
/* Default static call setting, nothing to do */
- WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT_BEHAVIOUR));
+ WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT));
preempt_dynamic_mode = preempt_dynamic_full;
pr_info("Dynamic Preempt: full\n");
}
--
2.25.1
^ permalink raw reply related
* [PATCH v2 2/5] preempt/dynamic: Introduce preempt mode accessors
From: Valentin Schneider @ 2021-11-10 20:24 UTC (permalink / raw)
To: linux-kernel, kasan-dev, linuxppc-dev, linux-kbuild
Cc: Marco Elver, Michal Marek, Peter Zijlstra, Frederic Weisbecker,
Mike Galbraith, Nick Desaulniers, Steven Rostedt, Paul Mackerras,
Masahiro Yamada, Ingo Molnar, Dmitry Vyukov
In-Reply-To: <20211110202448.4054153-1-valentin.schneider@arm.com>
CONFIG_PREEMPT{_NONE, _VOLUNTARY} designate either:
o The build-time preemption model when !PREEMPT_DYNAMIC
o The default boot-time preemption model when PREEMPT_DYNAMIC
IOW, using those on PREEMPT_DYNAMIC kernels is meaningless - the actual
model could have been set to something else by the "preempt=foo" cmdline
parameter.
Introduce a set of helpers to determine the actual preemption mode used by
the live kernel.
Suggested-by: Marco Elver <elver@google.com>
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
include/linux/sched.h | 16 ++++++++++++++++
kernel/sched/core.c | 11 +++++++++++
2 files changed, 27 insertions(+)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5f8db54226af..0640d5622496 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2073,6 +2073,22 @@ static inline void cond_resched_rcu(void)
#endif
}
+#ifdef CONFIG_PREEMPT_DYNAMIC
+
+extern bool is_preempt_none(void);
+extern bool is_preempt_voluntary(void);
+extern bool is_preempt_full(void);
+
+#else
+
+#define is_preempt_none() IS_ENABLED(CONFIG_PREEMPT_NONE)
+#define is_preempt_voluntary() IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY)
+#define is_preempt_full() IS_ENABLED(CONFIG_PREEMPT)
+
+#endif
+
+#define is_preempt_rt() IS_ENABLED(CONFIG_PREEMPT_RT)
+
/*
* Does a critical section need to be broken due to another
* task waiting?: (technically does not depend on CONFIG_PREEMPTION,
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 97047aa7b6c2..9db7f77e53c3 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6638,6 +6638,17 @@ static void __init preempt_dynamic_init(void)
}
}
+#define PREEMPT_MODE_ACCESSOR(mode) \
+ bool is_preempt_##mode(void) \
+ { \
+ WARN_ON_ONCE(preempt_dynamic_mode == preempt_dynamic_undefined); \
+ return preempt_dynamic_mode == preempt_dynamic_##mode; \
+ }
+
+PREEMPT_MODE_ACCESSOR(none)
+PREEMPT_MODE_ACCESSOR(voluntary)
+PREEMPT_MODE_ACCESSOR(full)
+
#else /* !CONFIG_PREEMPT_DYNAMIC */
static inline void preempt_dynamic_init(void) { }
--
2.25.1
^ permalink raw reply related
* [PATCH v2 3/5] powerpc: Use preemption model accessors
From: Valentin Schneider @ 2021-11-10 20:24 UTC (permalink / raw)
To: linux-kernel, kasan-dev, linuxppc-dev, linux-kbuild
Cc: Marco Elver, Michal Marek, Peter Zijlstra, Frederic Weisbecker,
Mike Galbraith, Nick Desaulniers, Steven Rostedt, Paul Mackerras,
Masahiro Yamada, Ingo Molnar, Dmitry Vyukov
In-Reply-To: <20211110202448.4054153-1-valentin.schneider@arm.com>
Per PREEMPT_DYNAMIC, checking CONFIG_PREEMPT doesn't tell you the actual
preemption model of the live kernel. Use the newly-introduced accessors
instead.
sched_init() -> preempt_dynamic_init() happens way before IRQs are set up,
so this should be fine.
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
arch/powerpc/kernel/interrupt.c | 2 +-
arch/powerpc/kernel/traps.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index de10a2697258..c56c10b59be3 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -552,7 +552,7 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)
/* Returning to a kernel context with local irqs enabled. */
WARN_ON_ONCE(!(regs->msr & MSR_EE));
again:
- if (IS_ENABLED(CONFIG_PREEMPT)) {
+ if (is_preempt_full()) {
/* Return to preemptible kernel context */
if (unlikely(current_thread_info()->flags & _TIF_NEED_RESCHED)) {
if (preempt_count() == 0)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index aac8c0412ff9..1cb31bbdc925 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -265,7 +265,7 @@ static int __die(const char *str, struct pt_regs *regs, long err)
printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n",
IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
PAGE_SIZE / 1024, get_mmu_str(),
- IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
+ is_preempt_full() ? " PREEMPT" : "",
IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
--
2.25.1
^ permalink raw reply related
* [PATCH v2 4/5] kscan: Use preemption model accessors
From: Valentin Schneider @ 2021-11-10 20:24 UTC (permalink / raw)
To: linux-kernel, kasan-dev, linuxppc-dev, linux-kbuild
Cc: Marco Elver, Michal Marek, Peter Zijlstra, Frederic Weisbecker,
Mike Galbraith, Nick Desaulniers, Steven Rostedt, Paul Mackerras,
Masahiro Yamada, Ingo Molnar, Dmitry Vyukov
In-Reply-To: <20211110202448.4054153-1-valentin.schneider@arm.com>
Per PREEMPT_DYNAMIC, checking CONFIG_PREEMPT doesn't tell you the actual
preemption model of the live kernel. Use the newly-introduced accessors
instead.
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
kernel/kcsan/kcsan_test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c
index dc55fd5a36fc..14d811eb9a21 100644
--- a/kernel/kcsan/kcsan_test.c
+++ b/kernel/kcsan/kcsan_test.c
@@ -1005,13 +1005,13 @@ static const void *nthreads_gen_params(const void *prev, char *desc)
else
nthreads *= 2;
- if (!IS_ENABLED(CONFIG_PREEMPT) || !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) {
+ if (!is_preempt_full() || !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) {
/*
* Without any preemption, keep 2 CPUs free for other tasks, one
* of which is the main test case function checking for
* completion or failure.
*/
- const long min_unused_cpus = IS_ENABLED(CONFIG_PREEMPT_NONE) ? 2 : 0;
+ const long min_unused_cpus = is_preempt_none() ? 2 : 0;
const long min_required_cpus = 2 + min_unused_cpus;
if (num_online_cpus() < min_required_cpus) {
--
2.25.1
^ permalink raw reply related
* [PATCH v2 5/5] ftrace: Use preemption model accessors for trace header printout
From: Valentin Schneider @ 2021-11-10 20:24 UTC (permalink / raw)
To: linux-kernel, kasan-dev, linuxppc-dev, linux-kbuild
Cc: Marco Elver, Michal Marek, Peter Zijlstra, Frederic Weisbecker,
Mike Galbraith, Nick Desaulniers, Steven Rostedt, Paul Mackerras,
Masahiro Yamada, Ingo Molnar, Dmitry Vyukov
In-Reply-To: <20211110202448.4054153-1-valentin.schneider@arm.com>
Per PREEMPT_DYNAMIC, checking CONFIG_PREEMPT doesn't tell you the actual
preemption model of the live kernel. Use the newly-introduced accessors
instead.
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
kernel/trace/trace.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7896d30d90f7..71f293569ed0 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4271,17 +4271,11 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter)
entries,
total,
buf->cpu,
-#if defined(CONFIG_PREEMPT_NONE)
- "server",
-#elif defined(CONFIG_PREEMPT_VOLUNTARY)
- "desktop",
-#elif defined(CONFIG_PREEMPT)
- "preempt",
-#elif defined(CONFIG_PREEMPT_RT)
- "preempt_rt",
-#else
+ is_preempt_none() ? "server" :
+ is_preempt_voluntary() ? "desktop" :
+ is_preempt_full() ? "preempt" :
+ is_preempt_rt() ? "preempt_rt" :
"unknown",
-#endif
/* These are reserved for later use */
0, 0, 0, 0);
#ifdef CONFIG_SMP
--
2.25.1
^ permalink raw reply related
* Re: [PATCH v2 5/5] ftrace: Use preemption model accessors for trace header printout
From: Steven Rostedt @ 2021-11-10 20:36 UTC (permalink / raw)
To: Valentin Schneider
Cc: Marco Elver, Michal Marek, linux-kbuild, Peter Zijlstra,
Frederic Weisbecker, Mike Galbraith, Nick Desaulniers,
linux-kernel, kasan-dev, Paul Mackerras, Masahiro Yamada,
linuxppc-dev, Ingo Molnar, Dmitry Vyukov
In-Reply-To: <20211110202448.4054153-6-valentin.schneider@arm.com>
On Wed, 10 Nov 2021 20:24:48 +0000
Valentin Schneider <valentin.schneider@arm.com> wrote:
> Per PREEMPT_DYNAMIC, checking CONFIG_PREEMPT doesn't tell you the actual
> preemption model of the live kernel. Use the newly-introduced accessors
> instead.
>
> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
> ---
> kernel/trace/trace.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
^ permalink raw reply
* Re: [PATCH v2 27/45] mfd: ntxec: Use devm_register_power_handler()
From: Dmitry Osipenko @ 2021-11-10 13:38 UTC (permalink / raw)
To: Jonathan Neuschäfer
Cc: Ulf Hansson, Rich Felker, linux-ia64, Tomer Maimon,
Santosh Shilimkar, Rafael J . Wysocki, Boris Ostrovsky,
Catalin Marinas, Linus Walleij, Dave Hansen, x86, Tali Perry,
Thierry Reding, Guo Ren, Pavel Machek, H. Peter Anvin,
linux-riscv, Vincent Chen, Will Deacon, Greg Ungerer,
Stefano Stabellini, Benjamin Fair, Yoshinori Sato,
Krzysztof Kozlowski, linux-sh, Lee Jones, Helge Deller,
Daniel Lezcano, Russell King, linux-csky, Jonathan Hunter,
Tony Lindgren, Chen-Yu Tsai, Ingo Molnar, Geert Uytterhoeven,
xen-devel, linux-mips, Guenter Roeck, Len Brown, Albert Ou,
linux-omap, Vladimir Zapolskiy, linux-acpi, linux-m68k,
Mark Brown, Borislav Petkov, Greentime Hu, Paul Walmsley,
linux-tegra, Thomas Gleixner, Andy Shevchenko, Nancy Yuen,
linux-arm-kernel, Juergen Gross, Thomas Bogendoerfer,
linux-parisc, Nick Hu, Avi Fishman, Patrick Venture, linux-pm,
Liam Girdwood, linux-kernel, Palmer Dabbelt, Philipp Zabel,
Paul Mackerras, Andrew Morton, linuxppc-dev, openbmc,
Joshua Thompson
In-Reply-To: <YYuia9KFdi+ETT+I@latitude>
10.11.2021 13:43, Jonathan Neuschäfer пишет:
> On Mon, Nov 08, 2021 at 02:36:42PM +0300, Dmitry Osipenko wrote:
>> 08.11.2021 14:22, Jonathan Neuschäfer пишет:
>>> On Sun, Nov 07, 2021 at 08:42:33PM +0300, Dmitry Osipenko wrote:
>>> [...]
>>>> EC drivers tend to use higher priority in general. Jonathan, could you
>>>> please confirm that NTXEC driver is a more preferable restart method
>>>> than the watchdog?
>>>
>>> Yes. The original firmware uses the NTXEC to restart, and it works well,
>>> so I do think it's preferable.
>>
>> Thank you, then I'll update the NTXEC patch like this:
>>
>> https://github.com/grate-driver/linux/commit/22da3d91f1734d9a0ed036220ad4ea28465af988
>
> I tested again, but sys_off_handler_reboot called a bogus pointer
> (probably reboot_prepare_cb). I think it was left uninitialized in
> ntxec_probe, which uses devm_kmalloc. I guess we could switch it to
> devm_kzalloc:
>
> diff --git a/drivers/mfd/ntxec.c b/drivers/mfd/ntxec.c
> index 1f55dfce14308..30364beb4b1d0 100644
> --- a/drivers/mfd/ntxec.c
> +++ b/drivers/mfd/ntxec.c
> @@ -144,7 +144,7 @@ static int ntxec_probe(struct i2c_client *client)
> const struct mfd_cell *subdevs;
> size_t n_subdevs;
>
> - ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
> + ec = devm_kzalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
> if (!ec)
> return -ENOMEM;
>
>
>
> With that done, it works flawlessly.
Good catch, thank you! I'll correct this patch and add yours t-b.
^ permalink raw reply
* Re: [PASEMI] Nemo board doesn't recognize any ATA disks with the pci-v5.16 updates
From: Robert Święcki @ 2021-11-10 16:42 UTC (permalink / raw)
To: Krzysztof Wilczyński
Cc: Jens Axboe, Darren Stevens, R.T.Dickinson, Arnd Bergmann,
linux-pci@vger.kernel.org, Damien Le Moal,
bhelgaas@google.com >> Bjorn Helgaas, Bjorn Helgaas,
mad skateman, Christian Zigotzky, Olof Johansson, Matthew Leaman,
linuxppc-dev, Christian Zigotzky
In-Reply-To: <YYsB2DAtZjtNFVhZ@rocinante>
> [+CC Adding Robert for visibility]
>
> Hi Arnd,
>
> Thank you looking at this! Much appreciated.
>
> > > > You could attach the kernel config there, too, since it didn't make it
> > > > to the mailing list (vger may discard them -- see
> > > > http://vger.kernel.org/majordomo-info.html).
> > >
> > > Bjorn and I looked at which commits that went with a recent Pull Request
> > > from us might be causing this, but we are a little bit at loss, and were
> > > hoping that you could give us a hand in troubleshooting this.
> >
> > For reference, these are the patches in that branch that touch any
> > interesting files,
> > as most of the contents are for pci-controller drivers that are not used on
> > powerpc at all:
> >
> > $ git log --no-merges --oneline 512b7931ad05..dda4b381f05d
> > arch/powerpc/ drivers/of/ drivers/pci/*.[ch] include/linux/
> > acd61ffb2f16 PCI: Add ACS quirk for Pericom PI7C9X2G switches
> > 978fd0056e19 PCI: of: Allow matching of an interrupt-map local to a PCI device
> > 041284181226 of/irq: Allow matching of an interrupt-map local to an
> > interrupt controller
> > 0ab8d0f6ae3f irqdomain: Make of_phandle_args_to_fwspec() generally available
> > 5ec0a6fcb60e PCI: Do not enable AtomicOps on VFs
> > 7a41ae80bdcb PCI: pci-bridge-emul: Fix emulation of W1C bits
> > fd1ae23b495b PCI: Prefer 'unsigned int' over bare 'unsigned'
> > ff5d3bb6e16d PCI: Remove redundant 'rc' initialization
> > 3331325c6347 PCI/VPD: Use pci_read_vpd_any() in pci_vpd_size()
> > e1b0d0bb2032 PCI: Re-enable Downstream Port LTR after reset or hotplug
> > ac8e3cef588c PCI/sysfs: Explicitly show first MSI IRQ for 'irq'
> > 88dee3b0efe4 PCI: Remove unused pci_pool wrappers
> > b5f9c644eb1b PCI: Remove struct pci_dev->driver
> > 2a4d9408c9e8 PCI: Use to_pci_driver() instead of pci_dev->driver
> > 4141127c44a9 powerpc/eeh: Use to_pci_driver() instead of pci_dev->driver
> > f9a6c8ad4922 PCI/ERR: Reduce compile time for CONFIG_PCIEAER=n
> > 43e85554d4ed xen/pcifront: Use to_pci_driver() instead of pci_dev->driver
> > 34ab316d7287 xen/pcifront: Drop pcifront_common_process() tests of pcidev, pdrv
> > 9f37ab0412eb PCI/switchtec: Add check of event support
> > 5a72431ec318 powerpc/eeh: Use dev_driver_string() instead of struct
> > pci_dev->driver->name
> > ae232f0970ea PCI: Drop pci_device_probe() test of !pci_dev->driver
> > 097d9d414433 PCI: Drop pci_device_remove() test of pci_dev->driver
> > 8e9028b3790d PCI: Return NULL for to_pci_driver(NULL)
> > 357df2fc0066 PCI: Use unsigned to match sscanf("%x") in pci_dev_str_match_path()
> > bf2928c7a284 PCI/VPD: Add pci_read/write_vpd_any()
> > b2105b9f39b5 PCI: Correct misspelled and remove duplicated words
> > 7c3855c423b1 PCI: Coalesce host bridge contiguous apertures
> > e0f7b1922358 PCI: Use kstrtobool() directly, sans strtobool() wrapper
> > 36f354ec7bf9 PCI/sysfs: Return -EINVAL consistently from "store" functions
> > 95e83e219d68 PCI/sysfs: Check CAP_SYS_ADMIN before parsing user input
> > af9d82626c8f PCI/ACPI: Remove OSC_PCI_SUPPORT_MASKS and OSC_PCI_CONTROL_MASKS
> > 9a0a1417d3bb PCI: Tidy comments
> > 06dc660e6eb8 PCI: Rename pcibios_add_device() to pcibios_device_add()
> > e3f4bd3462f6 PCI: Mark Atheros QCA6174 to avoid bus reset
> > 3a19407913e8 PCI/P2PDMA: Apply bus offset correctly in DMA address calculation
> >
> > Out of these, I agree that most of them seem harmless, these would
> > be the ones I'd try to look at more closely, or maybe revert for testing:
> >
> > 978fd0056e19 PCI: of: Allow matching of an interrupt-map local to a PCI device
> > 041284181226 of/irq: Allow matching of an interrupt-map local to an
> > interrupt controller
> > e1b0d0bb2032 PCI: Re-enable Downstream Port LTR after reset or hotplug
> > 7c3855c423b1 PCI: Coalesce host bridge contiguous apertures
> > 3a19407913e8 PCI/P2PDMA: Apply bus offset correctly in DMA address calculation
>
> Robert would you be able build a kernel without the patches Arnd singled
> out as potential curlprits? Might be expidite some troubleshooting saving
> a lot of time doing bisect.
>
> I wonder if this will help you with the following problem:
> https://lore.kernel.org/linux-pci/CAP145pjO9zdGgutHP=of0H+L1=nSz097zf73i7ZYm2-NWuwHhQ@mail.gmail.com/
Thanks.
I tried removing all of those (latest 5), and I had Windows/qemu boot
hangs with all of them removed.
But I cannot say for sure, because I did quite a mess with my
kernel/qemu setup, but with this code
https://github.com/torvalds/linux/commit/cb690f5238d71f543f4ce874aa59237cf53a877c
and with patch https://lkml.org/lkml/2021/11/9/836 my qemu/Win11 seems
to be booting again (even if dmesg is filled with pci-related errors
around initialization timeouts)
I think I'll try to concentrate on helping with the pic code in this
thread: https://lkml.org/lkml/2021/11/10/684 - and once it works well
with the host kernel, I'll try to figure out whether anything still
troubles the vfio/kvm code.
PS: I assumed you asked me to test it wrt my troubles with qemu/vfio/kvm/Win11.
^ permalink raw reply
* Re: [PATCH] powerpc: Fix sigset_t copy
From: Finn Thain @ 2021-11-11 0:20 UTC (permalink / raw)
To: Christophe Leroy
Cc: linux-kernel, Paul Mackerras, Christopher M. Riedl, linuxppc-dev
In-Reply-To: <ed04d4a1-7a60-ee39-f64b-203b299e8875@csgroup.eu>
[-- Attachment #1: Type: text/plain, Size: 339 bytes --]
On Wed, 10 Nov 2021, Christophe Leroy wrote:
> Le 10/11/2021 à 00:47, Finn Thain a écrit :
>
> > Christophe, I hope this change is the one you wanted to see upstream
> > (?). If it is acceptable please add your signed-off-by tag.
>
> I'm on holidays, I was planing to handle this next week.
>
OK. I'll leave it with you.
^ permalink raw reply
* Re: [PATCH v2 2/5] preempt/dynamic: Introduce preempt mode accessors
From: Mike Galbraith @ 2021-11-11 3:16 UTC (permalink / raw)
To: Valentin Schneider, linux-kernel, kasan-dev, linuxppc-dev,
linux-kbuild
Cc: Marco Elver, Michal Marek, Peter Zijlstra, Frederic Weisbecker,
Nick Desaulniers, Steven Rostedt, Paul Mackerras, Masahiro Yamada,
Ingo Molnar, Dmitry Vyukov
In-Reply-To: <20211110202448.4054153-3-valentin.schneider@arm.com>
On Wed, 2021-11-10 at 20:24 +0000, Valentin Schneider wrote:
>
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 5f8db54226af..0640d5622496 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -2073,6 +2073,22 @@ static inline void cond_resched_rcu(void)
> #endif
> }
>
> +#ifdef CONFIG_PREEMPT_DYNAMIC
> +
> +extern bool is_preempt_none(void);
> +extern bool is_preempt_voluntary(void);
> +extern bool is_preempt_full(void);
> +
> +#else
> +
> +#define is_preempt_none() IS_ENABLED(CONFIG_PREEMPT_NONE)
> +#define is_preempt_voluntary() IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY)
> +#define is_preempt_full() IS_ENABLED(CONFIG_PREEMPT)
I think that should be IS_ENABLED(CONFIG_PREEMPTION), see c1a280b68d4e.
Noticed while applying the series to an RT tree, where tglx
has done that replacement to the powerpc spot your next patch diddles.
-Mike
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox