* Re: [PATCH v3 3/3] kselftest: Extend vDSO selftest to clock_getres
From: Vincenzo Frascino @ 2019-05-22 14:55 UTC (permalink / raw)
To: Christophe Leroy, linux-arch, linuxppc-dev, linux-s390,
linux-kselftest
Cc: Arnd Bergmann, Heiko Carstens, Paul Mackerras, Martin Schwidefsky,
Thomas Gleixner, Shuah Khan
In-Reply-To: <3a6d9b99-0026-6743-9e73-4880f3cd6b1c@c-s.fr>
Hi Christophe,
thank you for your review.
On 22/05/2019 12:50, Christophe Leroy wrote:
>
>
> Le 22/05/2019 à 13:07, Vincenzo Frascino a écrit :
>> The current version of the multiarch vDSO selftest verifies only
>> gettimeofday.
>>
>> Extend the vDSO selftest to clock_getres, to verify that the
>> syscall and the vDSO library function return the same information.
>>
>> The extension has been used to verify the hrtimer_resoltion fix.
>>
>> Cc: Shuah Khan <shuah@kernel.org>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>> ---
>>
>> Note: This patch is independent from the others in this series, hence it
>> can be merged singularly by the kselftest maintainers.
>>
>> tools/testing/selftests/vDSO/Makefile | 2 +
>> .../selftests/vDSO/vdso_clock_getres.c | 137 ++++++++++++++++++
>> 2 files changed, 139 insertions(+)
>> create mode 100644 tools/testing/selftests/vDSO/vdso_clock_getres.c
>>
>> diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
>> index 9e03d61f52fd..d5c5bfdf1ac1 100644
>> --- a/tools/testing/selftests/vDSO/Makefile
>> +++ b/tools/testing/selftests/vDSO/Makefile
>> @@ -5,6 +5,7 @@ uname_M := $(shell uname -m 2>/dev/null || echo not)
>> ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
>>
>> TEST_GEN_PROGS := $(OUTPUT)/vdso_test
>> +TEST_GEN_PROGS += $(OUTPUT)/vdso_clock_getres
>> ifeq ($(ARCH),x86)
>> TEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86
>> endif
>> @@ -18,6 +19,7 @@ endif
>>
>> all: $(TEST_GEN_PROGS)
>> $(OUTPUT)/vdso_test: parse_vdso.c vdso_test.c
>> +$(OUTPUT)/vdso_clock_getres: vdso_clock_getres.c
>> $(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
>> $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \
>> vdso_standalone_test_x86.c parse_vdso.c \
>> diff --git a/tools/testing/selftests/vDSO/vdso_clock_getres.c b/tools/testing/selftests/vDSO/vdso_clock_getres.c
>> new file mode 100644
>> index 000000000000..341a9bc34ffc
>> --- /dev/null
>> +++ b/tools/testing/selftests/vDSO/vdso_clock_getres.c
>> @@ -0,0 +1,137 @@
>> +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
>> +/*
>> + * vdso_clock_getres.c: Sample code to test clock_getres.
>> + * Copyright (c) 2019 Arm Ltd.
>> + *
>> + * Compile with:
>> + * gcc -std=gnu99 vdso_clock_getres.c
>> + *
>> + * Tested on ARM, ARM64, MIPS32, x86 (32-bit and 64-bit),
>> + * Power (32-bit and 64-bit), S390x (32-bit and 64-bit).
>> + * Might work on other architectures.
>> + */
>> +
>> +#define _GNU_SOURCE
>> +#include <elf.h>
>> +#include <err.h>
>> +#include <fcntl.h>
>> +#include <stdint.h>
>> +#include <stdio.h>
>> +#include <stdlib.h>
>> +#include <time.h>
>> +#include <sys/auxv.h>
>> +#include <sys/mman.h>
>> +#include <sys/time.h>
>> +#include <unistd.h>
>> +#include <sys/syscall.h>
>> +
>> +#include "../kselftest.h"
>> +
>> +static long syscall_clock_getres(clockid_t _clkid, struct timespec *_ts)
>> +{
>> + long ret;
>> +
>> + ret = syscall(SYS_clock_getres, _clkid, _ts);
>> +
>> + return ret;
>> +}
>> +
>> +const char *vdso_clock_name[12] = {
>> + "CLOCK_REALTIME",
>> + "CLOCK_MONOTONIC",
>> + "CLOCK_PROCESS_CPUTIME_ID",
>> + "CLOCK_THREAD_CPUTIME_ID",
>> + "CLOCK_MONOTONIC_RAW",
>> + "CLOCK_REALTIME_COARSE",
>> + "CLOCK_MONOTONIC_COARSE",
>> + "CLOCK_BOOTTIME",
>> + "CLOCK_REALTIME_ALARM",
>> + "CLOCK_BOOTTIME_ALARM",
>> + "CLOCK_SGI_CYCLE",
>> + "CLOCK_TAI",
>> +};
>> +
>> +/*
>> + * This function calls clock_getres in vdso and by system call
>> + * with different values for clock_id.
>> + *
>> + * Example of output:
>> + *
>> + * clock_id: CLOCK_REALTIME [PASS]
>> + * clock_id: CLOCK_BOOTTIME [PASS]
>> + * clock_id: CLOCK_TAI [PASS]
>> + * clock_id: CLOCK_REALTIME_COARSE [PASS]
>> + * clock_id: CLOCK_MONOTONIC [PASS]
>> + * clock_id: CLOCK_MONOTONIC_RAW [PASS]
>> + * clock_id: CLOCK_MONOTONIC_COARSE [PASS]
>> + */
>> +static inline int vdso_test_clock(unsigned int clock_id)
>> +{
>> + struct timespec x, y;
>> +
>> + printf("clock_id: %s", vdso_clock_name[clock_id]);
>> + clock_getres(clock_id, &x);
>> + syscall_clock_getres(clock_id, &y);
>> +
>> + if ((x.tv_sec != y.tv_sec) || (x.tv_sec != y.tv_sec)) {
>> + printf(" [FAIL]\n");
>> + return KSFT_FAIL;
>> + }
>> +
>> + printf(" [PASS]\n");
>> + return 0;
>> +}
>> +
>> +int main(int argc, char **argv)
>> +{
>> + int ret;
>> +
>> +#if _POSIX_TIMERS > 0
>> +
>> +#ifdef CLOCK_REALTIME
>
> Why do you need that #ifdef and all the ones below ?
>
> CLOCK_REALTIME (and others) is defined in include/uapi/linux/time.h, so
> it should be there when you build the test, shouldn't it ?
>
In implementing this test I followed what the man page for clock_gettime(2)
defines in terms of availability of the timers. Since I do not know how old are
the userspace headers, I think it is a good idea checking that the clocks are
defined before trying to use them.
>> + ret = vdso_test_clock(CLOCK_REALTIME);
>> + if (ret)
>> + goto out;
>
> Why that goto ? Nothing is done at out, so a 'return ret' would be
> better I think.
>
Agree, thanks for pointing this out. Will fix in v4.
> And do we really want to stop at first failure ? Wouldn't it be better
> to run all the tests regardless ?
>
The test is supposed to fail if one of the sub-tests fails, hence once the first
fails doesn't seem convenient running the others, because we already know the
result.
> Christophe
>
>> +#endif
>> +
>> +#ifdef CLOCK_BOOTTIME
>> + ret = vdso_test_clock(CLOCK_BOOTTIME);
>> + if (ret)
>> + goto out;
>> +#endif
>> +
>> +#ifdef CLOCK_TAI
>> + ret = vdso_test_clock(CLOCK_TAI);
>> + if (ret)
>> + goto out;
>> +#endif
>> +
>> +#ifdef CLOCK_REALTIME_COARSE
>> + ret = vdso_test_clock(CLOCK_REALTIME_COARSE);
>> + if (ret)
>> + goto out;
>> +#endif
>> +
>> +#ifdef CLOCK_MONOTONIC
>> + ret = vdso_test_clock(CLOCK_MONOTONIC);
>> + if (ret)
>> + goto out;
>> +#endif
>> +
>> +#ifdef CLOCK_MONOTONIC_RAW
>> + ret = vdso_test_clock(CLOCK_MONOTONIC_RAW);
>> + if (ret)
>> + goto out;
>> +#endif
>> +
>> +#ifdef CLOCK_MONOTONIC_COARSE
>> + ret = vdso_test_clock(CLOCK_MONOTONIC_COARSE);
>> + if (ret)
>> + goto out;
>> +#endif
>> +
>> +#endif
>> +
>> +out:
>> + return ret;
>> +}
>>
--
Regards,
Vincenzo
^ permalink raw reply
* Re: [RFC PATCH] mm/nvdimm: Fix kernel crash on devm_mremap_pages_release
From: Aneesh Kumar K.V @ 2019-05-22 13:12 UTC (permalink / raw)
To: Dan Williams, Keith Busch; +Cc: Linux MM, linuxppc-dev, linux-nvdimm
In-Reply-To: <b775d65b-30e3-aceb-f2f8-f2413b129f52@linux.ibm.com>
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
> On 5/14/19 9:45 AM, Dan Williams wrote:
>> [ add Keith who was looking at something similar ]
>>
...
>>
>> If it's reserved then we should not be accessing, even if the above
>> works in practice. Isn't the fix something more like this to fix up
>> the assumptions at release time?
>>
>> diff --git a/kernel/memremap.c b/kernel/memremap.c
>> index a856cb5ff192..9074ba14572c 100644
>> --- a/kernel/memremap.c
>> +++ b/kernel/memremap.c
>> @@ -90,6 +90,7 @@ static void devm_memremap_pages_release(void *data)
>> struct device *dev = pgmap->dev;
>> struct resource *res = &pgmap->res;
>> resource_size_t align_start, align_size;
>> + struct vmem_altmap *altmap = pgmap->altmap_valid ? &pgmap->altmap : NULL;
>> unsigned long pfn;
>> int nid;
>>
>> @@ -102,7 +103,10 @@ static void devm_memremap_pages_release(void *data)
>> align_size = ALIGN(res->start + resource_size(res), SECTION_SIZE)
>> - align_start;
>>
>> - nid = page_to_nid(pfn_to_page(align_start >> PAGE_SHIFT));
>> + pfn = align_start >> PAGE_SHIFT;
>> + if (altmap)
>> + pfn += vmem_altmap_offset(altmap);
>> + nid = page_to_nid(pfn_to_page(pfn));
>>
>> mem_hotplug_begin();
>> if (pgmap->type == MEMORY_DEVICE_PRIVATE) {
>> @@ -110,8 +114,7 @@ static void devm_memremap_pages_release(void *data)
>> __remove_pages(page_zone(pfn_to_page(pfn)), pfn,
>> align_size >> PAGE_SHIFT, NULL);
>> } else {
>> - arch_remove_memory(nid, align_start, align_size,
>> - pgmap->altmap_valid ? &pgmap->altmap : NULL);
>> + arch_remove_memory(nid, align_start, align_size, altmap);
>> kasan_remove_zero_shadow(__va(align_start), align_size);
>> }
>> mem_hotplug_done();
>>
> I did try that first. I was not sure about that. From the memory add vs
> remove perspective.
>
> devm_memremap_pages:
>
> align_start = res->start & ~(SECTION_SIZE - 1);
> align_size = ALIGN(res->start + resource_size(res), SECTION_SIZE)
> - align_start;
> align_end = align_start + align_size - 1;
>
> error = arch_add_memory(nid, align_start, align_size, altmap,
> false);
>
>
> devm_memremap_pages_release:
>
> /* pages are dead and unused, undo the arch mapping */
> align_start = res->start & ~(SECTION_SIZE - 1);
> align_size = ALIGN(res->start + resource_size(res), SECTION_SIZE)
> - align_start;
>
> arch_remove_memory(nid, align_start, align_size,
> pgmap->altmap_valid ? &pgmap->altmap : NULL);
>
>
> Now if we are fixing the memremap_pages_release, shouldn't we adjust
> alig_start w.r.t memremap_pages too? and I was not sure what that means
> w.r.t add/remove alignment requirements.
>
> What is the intended usage of reserve area? I guess we want that part to
> be added? if so shouldn't we remove them?
We need to intialize the struct page backing the reserve area too right?
Where should we do that?
-aneesh
^ permalink raw reply
* Re: Failure to boot G4: dt_headr_start=0x01501000
From: Christophe Leroy @ 2019-05-22 12:20 UTC (permalink / raw)
To: Mathieu Malaterre, linuxppc-dev
In-Reply-To: <CA+7wUszwugJeS_x_ExaHPUb8p23D7Zo2f2qqXfLQwr8EiLsk2g@mail.gmail.com>
Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
> Hi all,
>
> I have not boot my G4 in a while, today using master here is what I see:
>
> done
> Setting btext !
> W=640 H=488 LB=768 addr=0x9c008000
> copying OF device tree...
> starting device tree allocs at 01401000
> otloc_up(00100000, 0013d948)
> trying: 0x01401000
> trying: 0x01501000
> -› 01501000
> alloc_bottom : 01601000
> alloc_top : 20000000
> alloc_top_hi : 20000000
> nmo_top : 20000000
> ram_top : 20000000
> Building dt strings...
> Building dt structure...
> reserved memory map:
> 00d40000 - 006c1000
> Device tree strings 0x01502000 -> 0x00000007
> Device tree struct 0x01503000 -> 0x00000007
> Quiescing Open Firmware ...
> Booting Linux via __start() @ 0x001400000
> ->dt_headr_start=0x01501000
>
> Any suggestions before I start a bisect ?
>
Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?
Christophe
^ permalink raw reply
* [PATCH] tty: serial: cpm_uart - fix init when SMC is relocated
From: Christophe Leroy @ 2019-05-22 12:17 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linuxppc-dev, linux-kernel, linux-serial
SMC relocation can also be activated earlier by the bootloader,
so the driver's behaviour cannot rely on selected kernel config.
When the SMC is relocated, CPM_CR_INIT_TRX cannot be used.
But the only thing CPM_CR_INIT_TRX does is to clear the
rstate and tstate registers, so this can be done manually,
even when SMC is not relocated.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 9ab921201444 ("cpm_uart: fix non-console port startup bug")
---
drivers/tty/serial/cpm_uart/cpm_uart_core.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
index b929c7ae3a27..7bab9a3eda92 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
@@ -407,7 +407,16 @@ static int cpm_uart_startup(struct uart_port *port)
clrbits16(&pinfo->sccp->scc_sccm, UART_SCCM_RX);
}
cpm_uart_initbd(pinfo);
- cpm_line_cr_cmd(pinfo, CPM_CR_INIT_TRX);
+ if (IS_SMC(pinfo)) {
+ out_be32(&pinfo->smcup->smc_rstate, 0);
+ out_be32(&pinfo->smcup->smc_tstate, 0);
+ out_be16(&pinfo->smcup->smc_rbptr,
+ in_be16(&pinfo->smcup->smc_rbase));
+ out_be16(&pinfo->smcup->smc_tbptr,
+ in_be16(&pinfo->smcup->smc_tbase));
+ } else {
+ cpm_line_cr_cmd(pinfo, CPM_CR_INIT_TRX);
+ }
}
/* Install interrupt handler. */
retval = request_irq(port->irq, cpm_uart_int, 0, "cpm_uart", port);
@@ -861,16 +870,14 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo)
(u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);
/*
- * In case SMC1 is being relocated...
+ * In case SMC is being relocated...
*/
-#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
out_be16(&up->smc_rbptr, in_be16(&pinfo->smcup->smc_rbase));
out_be16(&up->smc_tbptr, in_be16(&pinfo->smcup->smc_tbase));
out_be32(&up->smc_rstate, 0);
out_be32(&up->smc_tstate, 0);
out_be16(&up->smc_brkcr, 1); /* number of break chars */
out_be16(&up->smc_brkec, 0);
-#endif
/* Set up the uart parameters in the
* parameter ram.
@@ -884,8 +891,6 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo)
out_be16(&up->smc_brkec, 0);
out_be16(&up->smc_brkcr, 1);
- cpm_line_cr_cmd(pinfo, CPM_CR_INIT_TRX);
-
/* Set UART mode, 8 bit, no parity, one stop.
* Enable receive and transmit.
*/
--
2.13.3
^ permalink raw reply related
* Failure to boot G4: dt_headr_start=0x01501000
From: Mathieu Malaterre @ 2019-05-22 12:15 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
I have not boot my G4 in a while, today using master here is what I see:
done
Setting btext !
W=640 H=488 LB=768 addr=0x9c008000
copying OF device tree...
starting device tree allocs at 01401000
otloc_up(00100000, 0013d948)
trying: 0x01401000
trying: 0x01501000
-› 01501000
alloc_bottom : 01601000
alloc_top : 20000000
alloc_top_hi : 20000000
nmo_top : 20000000
ram_top : 20000000
Building dt strings...
Building dt structure...
reserved memory map:
00d40000 - 006c1000
Device tree strings 0x01502000 -> 0x00000007
Device tree struct 0x01503000 -> 0x00000007
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x001400000
->dt_headr_start=0x01501000
Any suggestions before I start a bisect ?
Thanks
^ permalink raw reply
* Re: [PATCH v3 3/3] kselftest: Extend vDSO selftest to clock_getres
From: Christophe Leroy @ 2019-05-22 11:50 UTC (permalink / raw)
To: Vincenzo Frascino, linux-arch, linuxppc-dev, linux-s390,
linux-kselftest
Cc: Arnd Bergmann, Heiko Carstens, Paul Mackerras, Martin Schwidefsky,
Thomas Gleixner, Shuah Khan
In-Reply-To: <20190522110722.28094-4-vincenzo.frascino@arm.com>
Le 22/05/2019 à 13:07, Vincenzo Frascino a écrit :
> The current version of the multiarch vDSO selftest verifies only
> gettimeofday.
>
> Extend the vDSO selftest to clock_getres, to verify that the
> syscall and the vDSO library function return the same information.
>
> The extension has been used to verify the hrtimer_resoltion fix.
>
> Cc: Shuah Khan <shuah@kernel.org>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
>
> Note: This patch is independent from the others in this series, hence it
> can be merged singularly by the kselftest maintainers.
>
> tools/testing/selftests/vDSO/Makefile | 2 +
> .../selftests/vDSO/vdso_clock_getres.c | 137 ++++++++++++++++++
> 2 files changed, 139 insertions(+)
> create mode 100644 tools/testing/selftests/vDSO/vdso_clock_getres.c
>
> diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
> index 9e03d61f52fd..d5c5bfdf1ac1 100644
> --- a/tools/testing/selftests/vDSO/Makefile
> +++ b/tools/testing/selftests/vDSO/Makefile
> @@ -5,6 +5,7 @@ uname_M := $(shell uname -m 2>/dev/null || echo not)
> ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
>
> TEST_GEN_PROGS := $(OUTPUT)/vdso_test
> +TEST_GEN_PROGS += $(OUTPUT)/vdso_clock_getres
> ifeq ($(ARCH),x86)
> TEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86
> endif
> @@ -18,6 +19,7 @@ endif
>
> all: $(TEST_GEN_PROGS)
> $(OUTPUT)/vdso_test: parse_vdso.c vdso_test.c
> +$(OUTPUT)/vdso_clock_getres: vdso_clock_getres.c
> $(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
> $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \
> vdso_standalone_test_x86.c parse_vdso.c \
> diff --git a/tools/testing/selftests/vDSO/vdso_clock_getres.c b/tools/testing/selftests/vDSO/vdso_clock_getres.c
> new file mode 100644
> index 000000000000..341a9bc34ffc
> --- /dev/null
> +++ b/tools/testing/selftests/vDSO/vdso_clock_getres.c
> @@ -0,0 +1,137 @@
> +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
> +/*
> + * vdso_clock_getres.c: Sample code to test clock_getres.
> + * Copyright (c) 2019 Arm Ltd.
> + *
> + * Compile with:
> + * gcc -std=gnu99 vdso_clock_getres.c
> + *
> + * Tested on ARM, ARM64, MIPS32, x86 (32-bit and 64-bit),
> + * Power (32-bit and 64-bit), S390x (32-bit and 64-bit).
> + * Might work on other architectures.
> + */
> +
> +#define _GNU_SOURCE
> +#include <elf.h>
> +#include <err.h>
> +#include <fcntl.h>
> +#include <stdint.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <time.h>
> +#include <sys/auxv.h>
> +#include <sys/mman.h>
> +#include <sys/time.h>
> +#include <unistd.h>
> +#include <sys/syscall.h>
> +
> +#include "../kselftest.h"
> +
> +static long syscall_clock_getres(clockid_t _clkid, struct timespec *_ts)
> +{
> + long ret;
> +
> + ret = syscall(SYS_clock_getres, _clkid, _ts);
> +
> + return ret;
> +}
> +
> +const char *vdso_clock_name[12] = {
> + "CLOCK_REALTIME",
> + "CLOCK_MONOTONIC",
> + "CLOCK_PROCESS_CPUTIME_ID",
> + "CLOCK_THREAD_CPUTIME_ID",
> + "CLOCK_MONOTONIC_RAW",
> + "CLOCK_REALTIME_COARSE",
> + "CLOCK_MONOTONIC_COARSE",
> + "CLOCK_BOOTTIME",
> + "CLOCK_REALTIME_ALARM",
> + "CLOCK_BOOTTIME_ALARM",
> + "CLOCK_SGI_CYCLE",
> + "CLOCK_TAI",
> +};
> +
> +/*
> + * This function calls clock_getres in vdso and by system call
> + * with different values for clock_id.
> + *
> + * Example of output:
> + *
> + * clock_id: CLOCK_REALTIME [PASS]
> + * clock_id: CLOCK_BOOTTIME [PASS]
> + * clock_id: CLOCK_TAI [PASS]
> + * clock_id: CLOCK_REALTIME_COARSE [PASS]
> + * clock_id: CLOCK_MONOTONIC [PASS]
> + * clock_id: CLOCK_MONOTONIC_RAW [PASS]
> + * clock_id: CLOCK_MONOTONIC_COARSE [PASS]
> + */
> +static inline int vdso_test_clock(unsigned int clock_id)
> +{
> + struct timespec x, y;
> +
> + printf("clock_id: %s", vdso_clock_name[clock_id]);
> + clock_getres(clock_id, &x);
> + syscall_clock_getres(clock_id, &y);
> +
> + if ((x.tv_sec != y.tv_sec) || (x.tv_sec != y.tv_sec)) {
> + printf(" [FAIL]\n");
> + return KSFT_FAIL;
> + }
> +
> + printf(" [PASS]\n");
> + return 0;
> +}
> +
> +int main(int argc, char **argv)
> +{
> + int ret;
> +
> +#if _POSIX_TIMERS > 0
> +
> +#ifdef CLOCK_REALTIME
Why do you need that #ifdef and all the ones below ?
CLOCK_REALTIME (and others) is defined in include/uapi/linux/time.h, so
it should be there when you build the test, shouldn't it ?
> + ret = vdso_test_clock(CLOCK_REALTIME);
> + if (ret)
> + goto out;
Why that goto ? Nothing is done at out, so a 'return ret' would be
better I think.
And do we really want to stop at first failure ? Wouldn't it be better
to run all the tests regardless ?
Christophe
> +#endif
> +
> +#ifdef CLOCK_BOOTTIME
> + ret = vdso_test_clock(CLOCK_BOOTTIME);
> + if (ret)
> + goto out;
> +#endif
> +
> +#ifdef CLOCK_TAI
> + ret = vdso_test_clock(CLOCK_TAI);
> + if (ret)
> + goto out;
> +#endif
> +
> +#ifdef CLOCK_REALTIME_COARSE
> + ret = vdso_test_clock(CLOCK_REALTIME_COARSE);
> + if (ret)
> + goto out;
> +#endif
> +
> +#ifdef CLOCK_MONOTONIC
> + ret = vdso_test_clock(CLOCK_MONOTONIC);
> + if (ret)
> + goto out;
> +#endif
> +
> +#ifdef CLOCK_MONOTONIC_RAW
> + ret = vdso_test_clock(CLOCK_MONOTONIC_RAW);
> + if (ret)
> + goto out;
> +#endif
> +
> +#ifdef CLOCK_MONOTONIC_COARSE
> + ret = vdso_test_clock(CLOCK_MONOTONIC_COARSE);
> + if (ret)
> + goto out;
> +#endif
> +
> +#endif
> +
> +out:
> + return ret;
> +}
>
^ permalink raw reply
* [PATCH v3 2/3] s390: Fix vDSO clock_getres()
From: Vincenzo Frascino @ 2019-05-22 11:07 UTC (permalink / raw)
To: linux-arch, linuxppc-dev, linux-s390, linux-kselftest
Cc: Arnd Bergmann, Heiko Carstens, Paul Mackerras, Martin Schwidefsky,
Thomas Gleixner, Shuah Khan
In-Reply-To: <20190522110722.28094-1-vincenzo.frascino@arm.com>
clock_getres in the vDSO library has to preserve the same behaviour
of posix_get_hrtimer_res().
In particular, posix_get_hrtimer_res() does:
sec = 0;
ns = hrtimer_resolution;
and hrtimer_resolution depends on the enablement of the high
resolution timers that can happen either at compile or at run time.
Fix the s390 vdso implementation of clock_getres keeping a copy of
hrtimer_resolution in vdso data and using that directly.
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
Note: This patch is independent from the others in this series, hence it
can be merged singularly by the s390 maintainers.
arch/s390/include/asm/vdso.h | 1 +
arch/s390/kernel/asm-offsets.c | 2 +-
arch/s390/kernel/time.c | 1 +
arch/s390/kernel/vdso32/clock_getres.S | 12 +++++++-----
arch/s390/kernel/vdso64/clock_getres.S | 10 +++++-----
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/arch/s390/include/asm/vdso.h b/arch/s390/include/asm/vdso.h
index 169d7604eb80..f3ba84fa9bd1 100644
--- a/arch/s390/include/asm/vdso.h
+++ b/arch/s390/include/asm/vdso.h
@@ -36,6 +36,7 @@ struct vdso_data {
__u32 tk_shift; /* Shift used for xtime_nsec 0x60 */
__u32 ts_dir; /* TOD steering direction 0x64 */
__u64 ts_end; /* TOD steering end 0x68 */
+ __u32 hrtimer_res; /* hrtimer resolution 0x70 */
};
struct vdso_per_cpu_data {
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c
index 41ac4ad21311..4a229a60b24a 100644
--- a/arch/s390/kernel/asm-offsets.c
+++ b/arch/s390/kernel/asm-offsets.c
@@ -76,6 +76,7 @@ int main(void)
OFFSET(__VDSO_TK_SHIFT, vdso_data, tk_shift);
OFFSET(__VDSO_TS_DIR, vdso_data, ts_dir);
OFFSET(__VDSO_TS_END, vdso_data, ts_end);
+ OFFSET(__VDSO_CLOCK_REALTIME_RES, vdso_data, hrtimer_res);
OFFSET(__VDSO_ECTG_BASE, vdso_per_cpu_data, ectg_timer_base);
OFFSET(__VDSO_ECTG_USER, vdso_per_cpu_data, ectg_user_time);
OFFSET(__VDSO_CPU_NR, vdso_per_cpu_data, cpu_nr);
@@ -87,7 +88,6 @@ int main(void)
DEFINE(__CLOCK_REALTIME_COARSE, CLOCK_REALTIME_COARSE);
DEFINE(__CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_COARSE);
DEFINE(__CLOCK_THREAD_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID);
- DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
DEFINE(__CLOCK_COARSE_RES, LOW_RES_NSEC);
BLANK();
/* idle data offsets */
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index e8766beee5ad..8ea9db599d38 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -310,6 +310,7 @@ void update_vsyscall(struct timekeeper *tk)
vdso_data->tk_mult = tk->tkr_mono.mult;
vdso_data->tk_shift = tk->tkr_mono.shift;
+ vdso_data->hrtimer_res = hrtimer_resolution;
smp_wmb();
++vdso_data->tb_update_count;
}
diff --git a/arch/s390/kernel/vdso32/clock_getres.S b/arch/s390/kernel/vdso32/clock_getres.S
index eaf9cf1417f6..fecd7684c645 100644
--- a/arch/s390/kernel/vdso32/clock_getres.S
+++ b/arch/s390/kernel/vdso32/clock_getres.S
@@ -18,20 +18,22 @@
__kernel_clock_getres:
CFI_STARTPROC
basr %r1,0
- la %r1,4f-.(%r1)
+10: al %r1,4f-10b(%r1)
+ l %r0,__VDSO_CLOCK_REALTIME_RES(%r1)
chi %r2,__CLOCK_REALTIME
je 0f
chi %r2,__CLOCK_MONOTONIC
je 0f
- la %r1,5f-4f(%r1)
+ basr %r1,0
+ la %r1,5f-.(%r1)
+ l %r0,0(%r1)
chi %r2,__CLOCK_REALTIME_COARSE
je 0f
chi %r2,__CLOCK_MONOTONIC_COARSE
jne 3f
0: ltr %r3,%r3
jz 2f /* res == NULL */
-1: l %r0,0(%r1)
- xc 0(4,%r3),0(%r3) /* set tp->tv_sec to zero */
+1: xc 0(4,%r3),0(%r3) /* set tp->tv_sec to zero */
st %r0,4(%r3) /* store tp->tv_usec */
2: lhi %r2,0
br %r14
@@ -39,6 +41,6 @@ __kernel_clock_getres:
svc 0
br %r14
CFI_ENDPROC
-4: .long __CLOCK_REALTIME_RES
+4: .long _vdso_data - 10b
5: .long __CLOCK_COARSE_RES
.size __kernel_clock_getres,.-__kernel_clock_getres
diff --git a/arch/s390/kernel/vdso64/clock_getres.S b/arch/s390/kernel/vdso64/clock_getres.S
index 081435398e0a..022b58c980db 100644
--- a/arch/s390/kernel/vdso64/clock_getres.S
+++ b/arch/s390/kernel/vdso64/clock_getres.S
@@ -17,12 +17,14 @@
.type __kernel_clock_getres,@function
__kernel_clock_getres:
CFI_STARTPROC
- larl %r1,4f
+ larl %r1,3f
+ lg %r0,0(%r1)
cghi %r2,__CLOCK_REALTIME_COARSE
je 0f
cghi %r2,__CLOCK_MONOTONIC_COARSE
je 0f
- larl %r1,3f
+ larl %r1,_vdso_data
+ l %r0,__VDSO_CLOCK_REALTIME_RES(%r1)
cghi %r2,__CLOCK_REALTIME
je 0f
cghi %r2,__CLOCK_MONOTONIC
@@ -36,7 +38,6 @@ __kernel_clock_getres:
jz 2f
0: ltgr %r3,%r3
jz 1f /* res == NULL */
- lg %r0,0(%r1)
xc 0(8,%r3),0(%r3) /* set tp->tv_sec to zero */
stg %r0,8(%r3) /* store tp->tv_usec */
1: lghi %r2,0
@@ -45,6 +46,5 @@ __kernel_clock_getres:
svc 0
br %r14
CFI_ENDPROC
-3: .quad __CLOCK_REALTIME_RES
-4: .quad __CLOCK_COARSE_RES
+3: .quad __CLOCK_COARSE_RES
.size __kernel_clock_getres,.-__kernel_clock_getres
--
2.21.0
^ permalink raw reply related
* [PATCH v3 3/3] kselftest: Extend vDSO selftest to clock_getres
From: Vincenzo Frascino @ 2019-05-22 11:07 UTC (permalink / raw)
To: linux-arch, linuxppc-dev, linux-s390, linux-kselftest
Cc: Arnd Bergmann, Heiko Carstens, Paul Mackerras, Martin Schwidefsky,
Thomas Gleixner, Shuah Khan
In-Reply-To: <20190522110722.28094-1-vincenzo.frascino@arm.com>
The current version of the multiarch vDSO selftest verifies only
gettimeofday.
Extend the vDSO selftest to clock_getres, to verify that the
syscall and the vDSO library function return the same information.
The extension has been used to verify the hrtimer_resoltion fix.
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
Note: This patch is independent from the others in this series, hence it
can be merged singularly by the kselftest maintainers.
tools/testing/selftests/vDSO/Makefile | 2 +
.../selftests/vDSO/vdso_clock_getres.c | 137 ++++++++++++++++++
2 files changed, 139 insertions(+)
create mode 100644 tools/testing/selftests/vDSO/vdso_clock_getres.c
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index 9e03d61f52fd..d5c5bfdf1ac1 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -5,6 +5,7 @@ uname_M := $(shell uname -m 2>/dev/null || echo not)
ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
TEST_GEN_PROGS := $(OUTPUT)/vdso_test
+TEST_GEN_PROGS += $(OUTPUT)/vdso_clock_getres
ifeq ($(ARCH),x86)
TEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86
endif
@@ -18,6 +19,7 @@ endif
all: $(TEST_GEN_PROGS)
$(OUTPUT)/vdso_test: parse_vdso.c vdso_test.c
+$(OUTPUT)/vdso_clock_getres: vdso_clock_getres.c
$(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
$(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \
vdso_standalone_test_x86.c parse_vdso.c \
diff --git a/tools/testing/selftests/vDSO/vdso_clock_getres.c b/tools/testing/selftests/vDSO/vdso_clock_getres.c
new file mode 100644
index 000000000000..341a9bc34ffc
--- /dev/null
+++ b/tools/testing/selftests/vDSO/vdso_clock_getres.c
@@ -0,0 +1,137 @@
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+/*
+ * vdso_clock_getres.c: Sample code to test clock_getres.
+ * Copyright (c) 2019 Arm Ltd.
+ *
+ * Compile with:
+ * gcc -std=gnu99 vdso_clock_getres.c
+ *
+ * Tested on ARM, ARM64, MIPS32, x86 (32-bit and 64-bit),
+ * Power (32-bit and 64-bit), S390x (32-bit and 64-bit).
+ * Might work on other architectures.
+ */
+
+#define _GNU_SOURCE
+#include <elf.h>
+#include <err.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/auxv.h>
+#include <sys/mman.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+
+#include "../kselftest.h"
+
+static long syscall_clock_getres(clockid_t _clkid, struct timespec *_ts)
+{
+ long ret;
+
+ ret = syscall(SYS_clock_getres, _clkid, _ts);
+
+ return ret;
+}
+
+const char *vdso_clock_name[12] = {
+ "CLOCK_REALTIME",
+ "CLOCK_MONOTONIC",
+ "CLOCK_PROCESS_CPUTIME_ID",
+ "CLOCK_THREAD_CPUTIME_ID",
+ "CLOCK_MONOTONIC_RAW",
+ "CLOCK_REALTIME_COARSE",
+ "CLOCK_MONOTONIC_COARSE",
+ "CLOCK_BOOTTIME",
+ "CLOCK_REALTIME_ALARM",
+ "CLOCK_BOOTTIME_ALARM",
+ "CLOCK_SGI_CYCLE",
+ "CLOCK_TAI",
+};
+
+/*
+ * This function calls clock_getres in vdso and by system call
+ * with different values for clock_id.
+ *
+ * Example of output:
+ *
+ * clock_id: CLOCK_REALTIME [PASS]
+ * clock_id: CLOCK_BOOTTIME [PASS]
+ * clock_id: CLOCK_TAI [PASS]
+ * clock_id: CLOCK_REALTIME_COARSE [PASS]
+ * clock_id: CLOCK_MONOTONIC [PASS]
+ * clock_id: CLOCK_MONOTONIC_RAW [PASS]
+ * clock_id: CLOCK_MONOTONIC_COARSE [PASS]
+ */
+static inline int vdso_test_clock(unsigned int clock_id)
+{
+ struct timespec x, y;
+
+ printf("clock_id: %s", vdso_clock_name[clock_id]);
+ clock_getres(clock_id, &x);
+ syscall_clock_getres(clock_id, &y);
+
+ if ((x.tv_sec != y.tv_sec) || (x.tv_sec != y.tv_sec)) {
+ printf(" [FAIL]\n");
+ return KSFT_FAIL;
+ }
+
+ printf(" [PASS]\n");
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ int ret;
+
+#if _POSIX_TIMERS > 0
+
+#ifdef CLOCK_REALTIME
+ ret = vdso_test_clock(CLOCK_REALTIME);
+ if (ret)
+ goto out;
+#endif
+
+#ifdef CLOCK_BOOTTIME
+ ret = vdso_test_clock(CLOCK_BOOTTIME);
+ if (ret)
+ goto out;
+#endif
+
+#ifdef CLOCK_TAI
+ ret = vdso_test_clock(CLOCK_TAI);
+ if (ret)
+ goto out;
+#endif
+
+#ifdef CLOCK_REALTIME_COARSE
+ ret = vdso_test_clock(CLOCK_REALTIME_COARSE);
+ if (ret)
+ goto out;
+#endif
+
+#ifdef CLOCK_MONOTONIC
+ ret = vdso_test_clock(CLOCK_MONOTONIC);
+ if (ret)
+ goto out;
+#endif
+
+#ifdef CLOCK_MONOTONIC_RAW
+ ret = vdso_test_clock(CLOCK_MONOTONIC_RAW);
+ if (ret)
+ goto out;
+#endif
+
+#ifdef CLOCK_MONOTONIC_COARSE
+ ret = vdso_test_clock(CLOCK_MONOTONIC_COARSE);
+ if (ret)
+ goto out;
+#endif
+
+#endif
+
+out:
+ return ret;
+}
--
2.21.0
^ permalink raw reply related
* [PATCH v3 1/3] powerpc: Fix vDSO clock_getres()
From: Vincenzo Frascino @ 2019-05-22 11:07 UTC (permalink / raw)
To: linux-arch, linuxppc-dev, linux-s390, linux-kselftest
Cc: Arnd Bergmann, Heiko Carstens, stable, Paul Mackerras,
Martin Schwidefsky, Thomas Gleixner, Shuah Khan
In-Reply-To: <20190522110722.28094-1-vincenzo.frascino@arm.com>
clock_getres in the vDSO library has to preserve the same behaviour
of posix_get_hrtimer_res().
In particular, posix_get_hrtimer_res() does:
sec = 0;
ns = hrtimer_resolution;
and hrtimer_resolution depends on the enablement of the high
resolution timers that can happen either at compile or at run time.
Fix the powerpc vdso implementation of clock_getres keeping a copy of
hrtimer_resolution in vdso data and using that directly.
Fixes: a7f290dad32e ("[PATCH] powerpc: Merge vdso's and add vdso support
to 32 bits kernel")
Cc: stable@vger.kernel.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
Note: This patch is independent from the others in this series, hence it
can be merged singularly by the powerpc maintainers.
arch/powerpc/include/asm/vdso_datapage.h | 2 ++
arch/powerpc/kernel/asm-offsets.c | 2 +-
arch/powerpc/kernel/time.c | 1 +
arch/powerpc/kernel/vdso32/gettimeofday.S | 7 +++++--
arch/powerpc/kernel/vdso64/gettimeofday.S | 7 +++++--
5 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
index bbc06bd72b1f..4333b9a473dc 100644
--- a/arch/powerpc/include/asm/vdso_datapage.h
+++ b/arch/powerpc/include/asm/vdso_datapage.h
@@ -86,6 +86,7 @@ struct vdso_data {
__s32 wtom_clock_nsec; /* Wall to monotonic clock nsec */
__s64 wtom_clock_sec; /* Wall to monotonic clock sec */
struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
+ __u32 hrtimer_res; /* hrtimer resolution */
__u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
};
@@ -107,6 +108,7 @@ struct vdso_data {
__s32 wtom_clock_nsec;
struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
__u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */
+ __u32 hrtimer_res; /* hrtimer resolution */
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
__u32 dcache_block_size; /* L1 d-cache block size */
__u32 icache_block_size; /* L1 i-cache block size */
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 8e02444e9d3d..dfc40f29f2b9 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -389,6 +389,7 @@ int main(void)
OFFSET(WTOM_CLOCK_NSEC, vdso_data, wtom_clock_nsec);
OFFSET(STAMP_XTIME, vdso_data, stamp_xtime);
OFFSET(STAMP_SEC_FRAC, vdso_data, stamp_sec_fraction);
+ OFFSET(CLOCK_REALTIME_RES, vdso_data, hrtimer_res);
OFFSET(CFG_ICACHE_BLOCKSZ, vdso_data, icache_block_size);
OFFSET(CFG_DCACHE_BLOCKSZ, vdso_data, dcache_block_size);
OFFSET(CFG_ICACHE_LOGBLOCKSZ, vdso_data, icache_log_block_size);
@@ -419,7 +420,6 @@ int main(void)
DEFINE(CLOCK_REALTIME_COARSE, CLOCK_REALTIME_COARSE);
DEFINE(CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_COARSE);
DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
- DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
#ifdef CONFIG_BUG
DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 325d60633dfa..4ea4e9d7a58e 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -963,6 +963,7 @@ void update_vsyscall(struct timekeeper *tk)
vdso_data->wtom_clock_nsec = tk->wall_to_monotonic.tv_nsec;
vdso_data->stamp_xtime = xt;
vdso_data->stamp_sec_fraction = frac_sec;
+ vdso_data->hrtimer_res = hrtimer_resolution;
smp_wmb();
++(vdso_data->tb_update_count);
}
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
index afd516b572f8..2b5f9e83c610 100644
--- a/arch/powerpc/kernel/vdso32/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -160,12 +160,15 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
cror cr0*4+eq,cr0*4+eq,cr1*4+eq
bne cr0,99f
+ mflr r12
+ .cfi_register lr,r12
+ bl __get_datapage@local
+ lwz r5,CLOCK_REALTIME_RES(r3)
+ mtlr r12
li r3,0
cmpli cr0,r4,0
crclr cr0*4+so
beqlr
- lis r5,CLOCK_REALTIME_RES@h
- ori r5,r5,CLOCK_REALTIME_RES@l
stw r3,TSPC32_TV_SEC(r4)
stw r5,TSPC32_TV_NSEC(r4)
blr
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
index 1f324c28705b..f07730f73d5e 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -190,12 +190,15 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
cror cr0*4+eq,cr0*4+eq,cr1*4+eq
bne cr0,99f
+ mflr r12
+ .cfi_register lr,r12
+ bl V_LOCAL_FUNC(__get_datapage)
+ lwz r5,CLOCK_REALTIME_RES(r3)
+ mtlr r12
li r3,0
cmpldi cr0,r4,0
crclr cr0*4+so
beqlr
- lis r5,CLOCK_REALTIME_RES@h
- ori r5,r5,CLOCK_REALTIME_RES@l
std r3,TSPC64_TV_SEC(r4)
std r5,TSPC64_TV_NSEC(r4)
blr
--
2.21.0
^ permalink raw reply related
* [PATCH v3 0/3] Fix vDSO clock_getres()
From: Vincenzo Frascino @ 2019-05-22 11:07 UTC (permalink / raw)
To: linux-arch, linuxppc-dev, linux-s390, linux-kselftest
Cc: Arnd Bergmann, Heiko Carstens, Paul Mackerras, Martin Schwidefsky,
Thomas Gleixner, Shuah Khan
clock_getres in the vDSO library has to preserve the same behaviour
of posix_get_hrtimer_res().
In particular, posix_get_hrtimer_res() does:
sec = 0;
ns = hrtimer_resolution;
and hrtimer_resolution depends on the enablement of the high
resolution timers that can happen either at compile or at run time.
A possible fix is to change the vdso implementation of clock_getres,
keeping a copy of hrtimer_resolution in vdso data and using that
directly [1].
This patchset implements the proposed fix for arm64, powerpc, s390,
nds32 and adds a test to verify that the syscall and the vdso library
implementation of clock_getres return the same values.
Even if these patches are unified by the same topic, there is no
dependency between them, hence they can be merged singularly by each
arch maintainer.
Note: arm64 and nds32 respective fixes have been merged in 5.2-rc1,
hence they have been removed from this series.
[1] https://marc.info/?l=linux-arm-kernel&m=155110381930196&w=2
Changes:
--------
v3:
- Rebased on 5.2-rc1.
- Addressed review comments.
v2:
- Rebased on 5.1-rc5.
- Addressed review comments.
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Vincenzo Frascino (3):
powerpc: Fix vDSO clock_getres()
s390: Fix vDSO clock_getres()
kselftest: Extend vDSO selftest to clock_getres
arch/powerpc/include/asm/vdso_datapage.h | 2 +
arch/powerpc/kernel/asm-offsets.c | 2 +-
arch/powerpc/kernel/time.c | 1 +
arch/powerpc/kernel/vdso32/gettimeofday.S | 7 +-
arch/powerpc/kernel/vdso64/gettimeofday.S | 7 +-
arch/s390/include/asm/vdso.h | 1 +
arch/s390/kernel/asm-offsets.c | 2 +-
arch/s390/kernel/time.c | 1 +
arch/s390/kernel/vdso32/clock_getres.S | 12 +-
arch/s390/kernel/vdso64/clock_getres.S | 10 +-
tools/testing/selftests/vDSO/Makefile | 2 +
.../selftests/vDSO/vdso_clock_getres.c | 137 ++++++++++++++++++
12 files changed, 168 insertions(+), 16 deletions(-)
create mode 100644 tools/testing/selftests/vDSO/vdso_clock_getres.c
--
2.21.0
^ permalink raw reply
* [PATCH] spi: spi-fsl-spi: call spi_finalize_current_message() at the end
From: Christophe Leroy @ 2019-05-22 11:00 UTC (permalink / raw)
To: Mark Brown; +Cc: linuxppc-dev, linux-kernel, linux-spi
spi_finalize_current_message() shall be called once all
actions are finished, otherwise the last actions might
step over a newly started transfer.
Fixes: c592becbe704 ("spi: fsl-(e)spi: migrate to generic master queueing")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
drivers/spi/spi-fsl-spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index b36ac6aa3b1f..7fbdaf066719 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -432,7 +432,6 @@ static int fsl_spi_do_one_msg(struct spi_master *master,
}
m->status = status;
- spi_finalize_current_message(master);
if (status || !cs_change) {
ndelay(nsecs);
@@ -440,6 +439,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master,
}
fsl_spi_setup_transfer(spi, NULL);
+ spi_finalize_current_message(master);
return 0;
}
--
2.13.3
^ permalink raw reply related
* Re: [RFC PATCH V2 3/3] mm/nvdimm: Use correct #defines instead of opencoding
From: Satheesh Rajendran @ 2019-05-22 9:16 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: linux-mm, dan.j.williams, linuxppc-dev, linux-nvdimm
In-Reply-To: <20190522082701.6817-3-aneesh.kumar@linux.ibm.com>
On Wed, May 22, 2019 at 01:57:01PM +0530, Aneesh Kumar K.V wrote:
> The nfpn related change is needed to fix the kernel message
>
> "number of pfns truncated from 2617344 to 163584"
>
> The change makes sure the nfpns stored in the superblock is right value.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
> drivers/nvdimm/label.c | 2 +-
> drivers/nvdimm/pfn_devs.c | 6 +++---
> drivers/nvdimm/region_devs.c | 8 ++++----
> 3 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
> index f3d753d3169c..bc6de8fb0153 100644
> --- a/drivers/nvdimm/label.c
> +++ b/drivers/nvdimm/label.c
> @@ -361,7 +361,7 @@ static bool slot_valid(struct nvdimm_drvdata *ndd,
>
> /* check that DPA allocations are page aligned */
> if ((__le64_to_cpu(nd_label->dpa)
> - | __le64_to_cpu(nd_label->rawsize)) % SZ_4K)
> + | __le64_to_cpu(nd_label->rawsize)) % PAGE_SIZE)
> return false;
>
> /* check checksum */
> diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
> index 39fa8cf8ef58..9fc2e514e28a 100644
> --- a/drivers/nvdimm/pfn_devs.c
> +++ b/drivers/nvdimm/pfn_devs.c
> @@ -769,8 +769,8 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
> * when populating the vmemmap. This *should* be equal to
> * PMD_SIZE for most architectures.
> */
> - offset = ALIGN(start + reserve + 64 * npfns,
> - max(nd_pfn->align, PMD_SIZE)) - start;
> + offset = ALIGN(start + reserve + sizeof(struct page) * npfns,
> + max(nd_pfn->align, PMD_SIZE)) - start;
> } else if (nd_pfn->mode == PFN_MODE_RAM)
> offset = ALIGN(start + reserve, nd_pfn->align) - start;
> else
> @@ -782,7 +782,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
> return -ENXIO;
> }
>
> - npfns = (size - offset - start_pad - end_trunc) / SZ_4K;
> + npfns = (size - offset - start_pad - end_trunc) / PAGE_SIZE;
> pfn_sb->mode = cpu_to_le32(nd_pfn->mode);
> pfn_sb->dataoff = cpu_to_le64(offset);
> pfn_sb->npfns = cpu_to_le64(npfns);
> diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
> index b4ef7d9ff22e..2d8facea5a03 100644
> --- a/drivers/nvdimm/region_devs.c
> +++ b/drivers/nvdimm/region_devs.c
> @@ -994,10 +994,10 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus,
> struct nd_mapping_desc *mapping = &ndr_desc->mapping[i];
> struct nvdimm *nvdimm = mapping->nvdimm;
>
> - if ((mapping->start | mapping->size) % SZ_4K) {
> - dev_err(&nvdimm_bus->dev, "%s: %s mapping%d is not 4K aligned\n",
> - caller, dev_name(&nvdimm->dev), i);
> -
> + if ((mapping->start | mapping->size) % PAGE_SIZE) {
> + dev_err(&nvdimm_bus->dev,
> + "%s: %s mapping%d is not 4K aligned\n",
s/not 4K aligned/not PAGE_SIZE aligned ?
hope the error msg need to be changed as well..
Regards,
-Satheesh.
> + caller, dev_name(&nvdimm->dev), i);
> return NULL;
> }
>
> --
> 2.21.0
>
^ permalink raw reply
* [RFC PATCH V2 1/3] mm/nvdimm: Add PFN_MIN_VERSION support
From: Aneesh Kumar K.V @ 2019-05-22 8:26 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-mm, linuxppc-dev, Aneesh Kumar K.V, linux-nvdimm
This allows us to make changes in a backward incompatible way. I have
kept the PFN_MIN_VERSION in this patch '0' because we are not introducing
any incompatible changes in this patch. We also may want to backport this
to older kernels.
The error looks like
dax0.1: init failed, superblock min version 1, kernel support version 0
and the namespace is marked disabled
$ndctl list -Ni
[
{
"dev":"namespace0.0",
"mode":"fsdax",
"map":"mem",
"size":10737418240,
"uuid":"9605de6d-cefa-4a87-99cd-dec28b02cffe",
"state":"disabled"
}
]
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
drivers/nvdimm/pfn.h | 9 ++++++++-
drivers/nvdimm/pfn_devs.c | 8 ++++++++
drivers/nvdimm/pmem.c | 26 ++++++++++++++++++++++----
3 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/drivers/nvdimm/pfn.h b/drivers/nvdimm/pfn.h
index dde9853453d3..5fd29242745a 100644
--- a/drivers/nvdimm/pfn.h
+++ b/drivers/nvdimm/pfn.h
@@ -20,6 +20,12 @@
#define PFN_SIG_LEN 16
#define PFN_SIG "NVDIMM_PFN_INFO\0"
#define DAX_SIG "NVDIMM_DAX_INFO\0"
+/*
+ * increment this when we are making changes such that older
+ * kernel should fail to initialize that namespace.
+ */
+
+#define PFN_MIN_VERSION 0
struct nd_pfn_sb {
u8 signature[PFN_SIG_LEN];
@@ -36,7 +42,8 @@ struct nd_pfn_sb {
__le32 end_trunc;
/* minor-version-2 record the base alignment of the mapping */
__le32 align;
- u8 padding[4000];
+ __le16 min_version;
+ u8 padding[3998];
__le64 checksum;
};
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 01f40672507f..a2268cf262f5 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -439,6 +439,13 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0))
return -ENXIO;
+ if (le16_to_cpu(pfn_sb->min_version) > PFN_MIN_VERSION) {
+ dev_err(&nd_pfn->dev,
+ "init failed, superblock min version %ld kernel support version %ld\n",
+ le16_to_cpu(pfn_sb->min_version), PFN_MIN_VERSION);
+ return -EOPNOTSUPP;
+ }
+
if (memcmp(pfn_sb->signature, sig, PFN_SIG_LEN) != 0)
return -ENODEV;
@@ -769,6 +776,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16);
pfn_sb->version_major = cpu_to_le16(1);
pfn_sb->version_minor = cpu_to_le16(2);
+ pfn_sb->min_version = cpu_to_le16(PFN_MIN_VERSION);
pfn_sb->start_pad = cpu_to_le32(start_pad);
pfn_sb->end_trunc = cpu_to_le32(end_trunc);
pfn_sb->align = cpu_to_le32(nd_pfn->align);
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 845c5b430cdd..406427c064d9 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -490,6 +490,7 @@ static int pmem_attach_disk(struct device *dev,
static int nd_pmem_probe(struct device *dev)
{
+ int ret;
struct nd_namespace_common *ndns;
ndns = nvdimm_namespace_common_probe(dev);
@@ -505,12 +506,29 @@ static int nd_pmem_probe(struct device *dev)
if (is_nd_pfn(dev))
return pmem_attach_disk(dev, ndns);
- /* if we find a valid info-block we'll come back as that personality */
- if (nd_btt_probe(dev, ndns) == 0 || nd_pfn_probe(dev, ndns) == 0
- || nd_dax_probe(dev, ndns) == 0)
+ ret = nd_btt_probe(dev, ndns);
+ if (ret == 0)
return -ENXIO;
+ else if (ret == -EOPNOTSUPP)
+ return ret;
- /* ...otherwise we're just a raw pmem device */
+ ret = nd_pfn_probe(dev, ndns);
+ if (ret == 0)
+ return -ENXIO;
+ else if (ret == -EOPNOTSUPP)
+ return ret;
+
+ ret = nd_dax_probe(dev, ndns);
+ if (ret == 0)
+ return -ENXIO;
+ else if (ret == -EOPNOTSUPP)
+ return ret;
+ /*
+ * We have two failure conditions here, there is no
+ * info reserver block or we found a valid info reserve block
+ * but failed to initialize the pfn superblock.
+ * Don't create a raw pmem disk for the second case.
+ */
return pmem_attach_disk(dev, ndns);
}
--
2.21.0
^ permalink raw reply related
* [RFC PATCH V2 3/3] mm/nvdimm: Use correct #defines instead of opencoding
From: Aneesh Kumar K.V @ 2019-05-22 8:27 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-mm, linuxppc-dev, Aneesh Kumar K.V, linux-nvdimm
In-Reply-To: <20190522082701.6817-1-aneesh.kumar@linux.ibm.com>
The nfpn related change is needed to fix the kernel message
"number of pfns truncated from 2617344 to 163584"
The change makes sure the nfpns stored in the superblock is right value.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
drivers/nvdimm/label.c | 2 +-
drivers/nvdimm/pfn_devs.c | 6 +++---
drivers/nvdimm/region_devs.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index f3d753d3169c..bc6de8fb0153 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -361,7 +361,7 @@ static bool slot_valid(struct nvdimm_drvdata *ndd,
/* check that DPA allocations are page aligned */
if ((__le64_to_cpu(nd_label->dpa)
- | __le64_to_cpu(nd_label->rawsize)) % SZ_4K)
+ | __le64_to_cpu(nd_label->rawsize)) % PAGE_SIZE)
return false;
/* check checksum */
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 39fa8cf8ef58..9fc2e514e28a 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -769,8 +769,8 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
* when populating the vmemmap. This *should* be equal to
* PMD_SIZE for most architectures.
*/
- offset = ALIGN(start + reserve + 64 * npfns,
- max(nd_pfn->align, PMD_SIZE)) - start;
+ offset = ALIGN(start + reserve + sizeof(struct page) * npfns,
+ max(nd_pfn->align, PMD_SIZE)) - start;
} else if (nd_pfn->mode == PFN_MODE_RAM)
offset = ALIGN(start + reserve, nd_pfn->align) - start;
else
@@ -782,7 +782,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
return -ENXIO;
}
- npfns = (size - offset - start_pad - end_trunc) / SZ_4K;
+ npfns = (size - offset - start_pad - end_trunc) / PAGE_SIZE;
pfn_sb->mode = cpu_to_le32(nd_pfn->mode);
pfn_sb->dataoff = cpu_to_le64(offset);
pfn_sb->npfns = cpu_to_le64(npfns);
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index b4ef7d9ff22e..2d8facea5a03 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -994,10 +994,10 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus,
struct nd_mapping_desc *mapping = &ndr_desc->mapping[i];
struct nvdimm *nvdimm = mapping->nvdimm;
- if ((mapping->start | mapping->size) % SZ_4K) {
- dev_err(&nvdimm_bus->dev, "%s: %s mapping%d is not 4K aligned\n",
- caller, dev_name(&nvdimm->dev), i);
-
+ if ((mapping->start | mapping->size) % PAGE_SIZE) {
+ dev_err(&nvdimm_bus->dev,
+ "%s: %s mapping%d is not 4K aligned\n",
+ caller, dev_name(&nvdimm->dev), i);
return NULL;
}
--
2.21.0
^ permalink raw reply related
* [RFC PATCH V2 2/3] mm/nvdimm: Add page size and struct page size to pfn superblock
From: Aneesh Kumar K.V @ 2019-05-22 8:27 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-mm, linuxppc-dev, Aneesh Kumar K.V, linux-nvdimm
In-Reply-To: <20190522082701.6817-1-aneesh.kumar@linux.ibm.com>
This is needed so that we don't wrongly initialize a namespace
which doesn't have enough space reserved for holding struct pages
with the current kernel.
We also increment PFN_MIN_VERSION to make sure that older kernel
won't initialize namespace created with newer kernel.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
drivers/nvdimm/pfn.h | 7 +++++--
drivers/nvdimm/pfn_devs.c | 19 ++++++++++++++++++-
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/nvdimm/pfn.h b/drivers/nvdimm/pfn.h
index 5fd29242745a..ba11738ca8a2 100644
--- a/drivers/nvdimm/pfn.h
+++ b/drivers/nvdimm/pfn.h
@@ -25,7 +25,7 @@
* kernel should fail to initialize that namespace.
*/
-#define PFN_MIN_VERSION 0
+#define PFN_MIN_VERSION 1
struct nd_pfn_sb {
u8 signature[PFN_SIG_LEN];
@@ -43,7 +43,10 @@ struct nd_pfn_sb {
/* minor-version-2 record the base alignment of the mapping */
__le32 align;
__le16 min_version;
- u8 padding[3998];
+ /* minor-version-3 record the page size and struct page size */
+ __le16 page_struct_size;
+ __le32 page_size;
+ u8 padding[3992];
__le64 checksum;
};
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index a2268cf262f5..39fa8cf8ef58 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -466,6 +466,15 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
if (__le16_to_cpu(pfn_sb->version_minor) < 2)
pfn_sb->align = 0;
+ if (__le16_to_cpu(pfn_sb->version_minor) < 3) {
+ /*
+ * For a large part we use PAGE_SIZE. But we
+ * do have some accounting code using SZ_4K.
+ */
+ pfn_sb->page_struct_size = cpu_to_le16(64);
+ pfn_sb->page_size = cpu_to_le32(SZ_4K);
+ }
+
switch (le32_to_cpu(pfn_sb->mode)) {
case PFN_MODE_RAM:
case PFN_MODE_PMEM:
@@ -481,6 +490,12 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
align = 1UL << ilog2(offset);
mode = le32_to_cpu(pfn_sb->mode);
+ if (le32_to_cpu(pfn_sb->page_size) != PAGE_SIZE)
+ return -EOPNOTSUPP;
+
+ if (le16_to_cpu(pfn_sb->page_struct_size) != sizeof(struct page))
+ return -EOPNOTSUPP;
+
if (!nd_pfn->uuid) {
/*
* When probing a namepace via nd_pfn_probe() the uuid
@@ -775,11 +790,13 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
memcpy(pfn_sb->uuid, nd_pfn->uuid, 16);
memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16);
pfn_sb->version_major = cpu_to_le16(1);
- pfn_sb->version_minor = cpu_to_le16(2);
+ pfn_sb->version_minor = cpu_to_le16(3);
pfn_sb->min_version = cpu_to_le16(PFN_MIN_VERSION);
pfn_sb->start_pad = cpu_to_le32(start_pad);
pfn_sb->end_trunc = cpu_to_le32(end_trunc);
pfn_sb->align = cpu_to_le32(nd_pfn->align);
+ pfn_sb->page_struct_size = cpu_to_le16(sizeof(struct page));
+ pfn_sb->page_size = cpu_to_le32(PAGE_SIZE);
checksum = nd_sb_checksum((struct nd_gen_sb *) pfn_sb);
pfn_sb->checksum = cpu_to_le64(checksum);
--
2.21.0
^ permalink raw reply related
* Re: [PATCH 1/2] open: add close_range()
From: Christian Brauner @ 2019-05-22 8:12 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-ia64, Linux-sh list, Oleg Nesterov, David Howells,
open list:KERNEL SELFTEST FRAMEWORK, sparclinux, Shuah Khan,
linux-arch, linux-s390, Miklos Szeredi, the arch/x86 maintainers,
linux-mips, linux-xtensa, Todd Kjos, Arnd Bergmann, Jann Horn,
linux-m68k, Al Viro, Thomas Gleixner, Dmitry V. Levin, Linux ARM,
Florian Weimer, Parisc List, Linux API, Linux List Kernel Mailing,
alpha, linux-fsdevel, linuxppc-dev
In-Reply-To: <CAHk-=wgtHm4t71oKbykE=awiVv2H2wCy8yH0L_FsyhHQ5OSO+Q@mail.gmail.com>
On Tue, May 21, 2019 at 10:23 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Tue, May 21, 2019 at 9:41 AM Christian Brauner <christian@brauner.io> wrote:
> >
> > Yeah, you mentioned this before. I do like being able to specify an
> > upper bound to have the ability to place fds strategically after said
> > upper bound.
>
> I suspect that's the case.
>
> And if somebody really wants to just close everything and uses a large
> upper bound, we can - if we really want to - just compare the upper
> bound to the file table size, and do an optimized case for that. We do
> that upper bound comparison anyway to limit the size of the walk, so
> *if* it's a big deal, that case could then do the whole "shrink
> fdtable" case too.
Makes sense.
>
> But I don't believe it's worth optimizing for unless somebody really
> has a load where that is shown to be a big deal. Just do the silly
> and simple loop, and add a cond_resched() in the loop, like
> close_files() does for the "we have a _lot_ of files open" case.
Ok. I will resend a v1 later with the cond_resched() logic you and Al
suggested added.
Thanks!
Christian
^ permalink raw reply
* Re: [BISECTED] kexec regression on PowerBook G4
From: Christophe Leroy @ 2019-05-22 7:44 UTC (permalink / raw)
To: Aaro Koskinen, Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <90f3557b-400b-60b5-9ff8-d5605adeee79@c-s.fr>
Hi Again,
On 05/22/2019 06:14 AM, Christophe Leroy wrote:
> Hi Aero,
>
> Le 22/05/2019 à 00:18, Aaro Koskinen a écrit :
>> Hi,
>>
>> I was trying to upgrade from v5.0 -> v5.1 on PowerBook G4, but when
>> trying
>> to kexec a kernel the system gets stuck (no errors seen on the console).
>
> Do you mean you are trying to kexec a v5.1 kernel from a v5.0 kernel, or
> do you have a working v5.1 kernel, but kexec doesn't work with it ?
>
>>
>> Bisected to: 93c4a162b014 ("powerpc/6xx: Store PGDIR physical address
>> in a SPRG"). This commit doesn't revert cleanly anymore but I tested
>> that the one before works OK.
>
> Not sure that's the problem. There was a problem with that commit, but
> it was fixed by 4622a2d43101 ("powerpc/6xx: fix setup and use of
> SPRN_SPRG_PGDIR for hash32").
> You probably hit some commit between those two during bisect, that's
> likely the reason why you ended here.
>
> Can you restart your bisect from 4622a2d43101 ?
>
> If you have CONFIG_SMP, maybe you should also consider taking
> 397d2300b08c ("powerpc/32s: fix flush_hash_pages() on SMP"). Stable
> 5.1.4 includes it.
>
>>
>> With current Linus HEAD (9c7db5004280), it gets a bit further but still
>> doesn't work: now I get an error on the console after kexec "Starting
>> new kernel! ... Bye!":
>>
>> kernel tried to execute exec-protected page (...) - exploit attempt?
>
> Interesting.
>
> Do you have CONFIG_STRICT_KERNEL_RWX=y in your .config ? If so, can you
> retry without it ?
After looking at the code, I don't thing CONFIG_STRICT_KERNEL_RWX will
make any difference. Can you try the patch below ?
From 8c1039da0d0f26cdf995156a905fc97fe7bda36c Mon Sep 17 00:00:00 2001
From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Wed, 22 May 2019 07:28:42 +0000
Subject: [PATCH] Fix Kexec
---
arch/powerpc/include/asm/pgtable.h | 2 ++
arch/powerpc/kernel/machine_kexec_32.c | 4 ++++
arch/powerpc/mm/pgtable_32.c | 2 +-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/pgtable.h
b/arch/powerpc/include/asm/pgtable.h
index 3f53be60fb01..642eea937229 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -140,6 +140,8 @@ static inline void pte_frag_set(mm_context_t *ctx,
void *p)
}
#endif
+int change_page_attr(struct page *page, int numpages, pgprot_t prot);
+
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_PGTABLE_H */
diff --git a/arch/powerpc/kernel/machine_kexec_32.c
b/arch/powerpc/kernel/machine_kexec_32.c
index affe5dcce7f4..4f719501e6ae 100644
--- a/arch/powerpc/kernel/machine_kexec_32.c
+++ b/arch/powerpc/kernel/machine_kexec_32.c
@@ -54,6 +54,10 @@ void default_machine_kexec(struct kimage *image)
memcpy((void *)reboot_code_buffer, relocate_new_kernel,
relocate_new_kernel_size);
+ change_page_attr(image->control_code_page,
+ ALIGN(KEXEC_CONTROL_PAGE_SIZE, PAGE_SIZE) >> PAGE_SHIFT,
+ PAGE_KERNEL_TEXT);
+
flush_icache_range(reboot_code_buffer,
reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
printk(KERN_INFO "Bye!\n");
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 16ada373b32b..0e4651d803fc 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -340,7 +340,7 @@ static int __change_page_attr_noflush(struct page
*page, pgprot_t prot)
*
* THIS DOES NOTHING WITH BAT MAPPINGS, DEBUG USE ONLY
*/
-static int change_page_attr(struct page *page, int numpages, pgprot_t prot)
+int change_page_attr(struct page *page, int numpages, pgprot_t prot)
{
int i, err = 0;
unsigned long flags;
--
2.13.3
^ permalink raw reply related
* Re: [PATCH] powerpc/powernv: Return for invalid IMC domain
From: Anju T Sudhakar @ 2019-05-22 5:40 UTC (permalink / raw)
To: Michael Ellerman; +Cc: pavsubra, maddy, linuxppc-dev
In-Reply-To: <87sgt86na9.fsf@concordia.ellerman.id.au>
[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]
Hi,
On 5/21/19 5:18 PM, Michael Ellerman wrote:
> Anju T Sudhakar <anju@linux.vnet.ibm.com> writes:
>> Currently init_imc_pmu() can be failed either because
>> an IMC unit with invalid domain(i.e an IMC node not
>> supported by the kernel) is attempted a pmu-registration
>> or something went wrong while registering a valid IMC unit.
>> In both the cases kernel provides a 'Registration failed'
>> error message.
>>
>> Example:
>> Log message, when trace-imc node is not supported by the kernel, and the
>> skiboot supports trace-imc node.
>>
>> So for kernel, trace-imc node is now an unknown domain.
>>
>> [ 1.731870] nest_phb5_imc performance monitor hardware support registered
>> [ 1.731944] nest_powerbus0_imc performance monitor hardware support registered
>> [ 1.734458] thread_imc performance monitor hardware support registered
>> [ 1.734460] IMC Unknown Device type
>> [ 1.734462] IMC PMU (null) Register failed
>> [ 1.734558] nest_xlink0_imc performance monitor hardware support registered
>> [ 1.734614] nest_xlink1_imc performance monitor hardware support registered
>> [ 1.734670] nest_xlink2_imc performance monitor hardware support registered
>> [ 1.747043] Initialise system trusted keyrings
>> [ 1.747054] Key type blacklist registered
>>
>>
>> To avoid ambiguity on the error message, return for invalid domain
>> before attempting a pmu registration.
> What do we print once the patch is applied?
Once the patch is applied, we return for invalid domains. so we will
only have
`/IMC Unknown Device type/` message printed for *unknown domains*.
And `/IMC PMU (null) Register failed/` message will appear only if the
registration fails for a *known domain*.
Thanks,
Anju
[-- Attachment #2: Type: text/html, Size: 2463 bytes --]
^ permalink raw reply
* Re: [RFC PATCH 1/3] mm/nvdimm: Add PFN_MIN_VERSION support
From: Aneesh Kumar K.V @ 2019-05-22 6:35 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-mm, linuxppc-dev, linux-nvdimm
In-Reply-To: <20190522062057.26581-1-aneesh.kumar@linux.ibm.com>
On 5/22/19 11:50 AM, Aneesh Kumar K.V wrote:
> This allows us to make changes in a backward incompatible way. I have
> kept the PFN_MIN_VERSION in this patch '0' because we are not introducing
> any incompatible changes in this patch. We also may want to backport this
> to older kernels.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
> drivers/nvdimm/pfn.h | 9 ++++++++-
> drivers/nvdimm/pfn_devs.c | 4 ++++
> drivers/nvdimm/pmem.c | 26 ++++++++++++++++++++++----
> 3 files changed, 34 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/nvdimm/pfn.h b/drivers/nvdimm/pfn.h
> index dde9853453d3..1b10ae5773b6 100644
> --- a/drivers/nvdimm/pfn.h
> +++ b/drivers/nvdimm/pfn.h
> @@ -20,6 +20,12 @@
> #define PFN_SIG_LEN 16
> #define PFN_SIG "NVDIMM_PFN_INFO\0"
> #define DAX_SIG "NVDIMM_DAX_INFO\0"
> +/*
> + * increment this when we are making changes such that older
> + * kernel should fail to initialize that namespace.
> + */
> +
> +#define PFN_MIN_VERSION 0
>
> struct nd_pfn_sb {
> u8 signature[PFN_SIG_LEN];
> @@ -36,7 +42,8 @@ struct nd_pfn_sb {
> __le32 end_trunc;
> /* minor-version-2 record the base alignment of the mapping */
> __le32 align;
> - u8 padding[4000];
> + __le16 min_verison;
> + u8 padding[3998];
> __le64 checksum;
> };
>
> diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
> index 01f40672507f..3250de70a7b3 100644
> --- a/drivers/nvdimm/pfn_devs.c
> +++ b/drivers/nvdimm/pfn_devs.c
> @@ -439,6 +439,9 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
> if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0))
> return -ENXIO;
>
> + if (le16_to_cpu(pfn_sb->min_version > PFN_MIN_VERSION))
> + return -EOPNOTSUPP;
+ if (le16_to_cpu(pfn_sb->min_version) > PFN_MIN_VERSION)
+ return -EOPNOTSUPP;
-aneesh
^ permalink raw reply
* [RFC PATCH 3/3] mm/nvdimm: Use correct #defines instead of opencoding
From: Aneesh Kumar K.V @ 2019-05-22 6:20 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-mm, linuxppc-dev, Aneesh Kumar K.V, linux-nvdimm
In-Reply-To: <20190522062057.26581-1-aneesh.kumar@linux.ibm.com>
The nfpn related change is needed to fix the kernel message
"number of pfns truncated from 2617344 to 163584"
The change makes sure the nfpns stored in the superblock is right value.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
drivers/nvdimm/label.c | 2 +-
drivers/nvdimm/pfn_devs.c | 6 +++---
drivers/nvdimm/region_devs.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index f3d753d3169c..bc6de8fb0153 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -361,7 +361,7 @@ static bool slot_valid(struct nvdimm_drvdata *ndd,
/* check that DPA allocations are page aligned */
if ((__le64_to_cpu(nd_label->dpa)
- | __le64_to_cpu(nd_label->rawsize)) % SZ_4K)
+ | __le64_to_cpu(nd_label->rawsize)) % PAGE_SIZE)
return false;
/* check checksum */
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 94918a4e6e73..f549bddc680c 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -765,8 +765,8 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
* when populating the vmemmap. This *should* be equal to
* PMD_SIZE for most architectures.
*/
- offset = ALIGN(start + reserve + 64 * npfns,
- max(nd_pfn->align, PMD_SIZE)) - start;
+ offset = ALIGN(start + reserve + sizeof(struct page) * npfns,
+ max(nd_pfn->align, PMD_SIZE)) - start;
} else if (nd_pfn->mode == PFN_MODE_RAM)
offset = ALIGN(start + reserve, nd_pfn->align) - start;
else
@@ -778,7 +778,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
return -ENXIO;
}
- npfns = (size - offset - start_pad - end_trunc) / SZ_4K;
+ npfns = (size - offset - start_pad - end_trunc) / PAGE_SIZE;
pfn_sb->mode = cpu_to_le32(nd_pfn->mode);
pfn_sb->dataoff = cpu_to_le64(offset);
pfn_sb->npfns = cpu_to_le64(npfns);
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index b4ef7d9ff22e..2d8facea5a03 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -994,10 +994,10 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus,
struct nd_mapping_desc *mapping = &ndr_desc->mapping[i];
struct nvdimm *nvdimm = mapping->nvdimm;
- if ((mapping->start | mapping->size) % SZ_4K) {
- dev_err(&nvdimm_bus->dev, "%s: %s mapping%d is not 4K aligned\n",
- caller, dev_name(&nvdimm->dev), i);
-
+ if ((mapping->start | mapping->size) % PAGE_SIZE) {
+ dev_err(&nvdimm_bus->dev,
+ "%s: %s mapping%d is not 4K aligned\n",
+ caller, dev_name(&nvdimm->dev), i);
return NULL;
}
--
2.21.0
^ permalink raw reply related
* [RFC PATCH 2/3] mm/nvdimm: Add page size and struct page size to pfn superblock
From: Aneesh Kumar K.V @ 2019-05-22 6:20 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-mm, linuxppc-dev, Aneesh Kumar K.V, linux-nvdimm
In-Reply-To: <20190522062057.26581-1-aneesh.kumar@linux.ibm.com>
This is needed so that we don't wrongly initialize a namespace
which doesn't have enough space reserved for holding struct pages
with the current kernel.
We also increment PFN_MIN_VERSION to make sure that older kernel
won't initialize namespace created with newer kernel.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
drivers/nvdimm/pfn.h | 9 ++++++---
drivers/nvdimm/pfn_devs.c | 19 ++++++++++++++++++-
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/nvdimm/pfn.h b/drivers/nvdimm/pfn.h
index 1b10ae5773b6..ba11738ca8a2 100644
--- a/drivers/nvdimm/pfn.h
+++ b/drivers/nvdimm/pfn.h
@@ -25,7 +25,7 @@
* kernel should fail to initialize that namespace.
*/
-#define PFN_MIN_VERSION 0
+#define PFN_MIN_VERSION 1
struct nd_pfn_sb {
u8 signature[PFN_SIG_LEN];
@@ -42,8 +42,11 @@ struct nd_pfn_sb {
__le32 end_trunc;
/* minor-version-2 record the base alignment of the mapping */
__le32 align;
- __le16 min_verison;
- u8 padding[3998];
+ __le16 min_version;
+ /* minor-version-3 record the page size and struct page size */
+ __le16 page_struct_size;
+ __le32 page_size;
+ u8 padding[3992];
__le64 checksum;
};
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 3250de70a7b3..94918a4e6e73 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -462,6 +462,15 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
if (__le16_to_cpu(pfn_sb->version_minor) < 2)
pfn_sb->align = 0;
+ if (__le16_to_cpu(pfn_sb->version_minor) < 3) {
+ /*
+ * For a large part we use PAGE_SIZE. But we
+ * do have some accounting code using SZ_4K.
+ */
+ pfn_sb->page_struct_size = cpu_to_le16(64);
+ pfn_sb->page_size = cpu_to_le32(SZ_4K);
+ }
+
switch (le32_to_cpu(pfn_sb->mode)) {
case PFN_MODE_RAM:
case PFN_MODE_PMEM:
@@ -477,6 +486,12 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
align = 1UL << ilog2(offset);
mode = le32_to_cpu(pfn_sb->mode);
+ if (le32_to_cpu(pfn_sb->page_size) != PAGE_SIZE)
+ return -EOPNOTSUPP;
+
+ if (le16_to_cpu(pfn_sb->page_struct_size) != sizeof(struct page))
+ return -EOPNOTSUPP;
+
if (!nd_pfn->uuid) {
/*
* When probing a namepace via nd_pfn_probe() the uuid
@@ -771,11 +786,13 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
memcpy(pfn_sb->uuid, nd_pfn->uuid, 16);
memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16);
pfn_sb->version_major = cpu_to_le16(1);
- pfn_sb->version_minor = cpu_to_le16(2);
+ pfn_sb->version_minor = cpu_to_le16(3);
pfn_sb->min_version = cpu_to_le16(PFN_MIN_VERSION);
pfn_sb->start_pad = cpu_to_le32(start_pad);
pfn_sb->end_trunc = cpu_to_le32(end_trunc);
pfn_sb->align = cpu_to_le32(nd_pfn->align);
+ pfn_sb->page_struct_size = cpu_to_le16(sizeof(struct page));
+ pfn_sb->page_size = cpu_to_le32(PAGE_SIZE);
checksum = nd_sb_checksum((struct nd_gen_sb *) pfn_sb);
pfn_sb->checksum = cpu_to_le64(checksum);
--
2.21.0
^ permalink raw reply related
* [RFC PATCH 1/3] mm/nvdimm: Add PFN_MIN_VERSION support
From: Aneesh Kumar K.V @ 2019-05-22 6:20 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-mm, linuxppc-dev, Aneesh Kumar K.V, linux-nvdimm
This allows us to make changes in a backward incompatible way. I have
kept the PFN_MIN_VERSION in this patch '0' because we are not introducing
any incompatible changes in this patch. We also may want to backport this
to older kernels.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
drivers/nvdimm/pfn.h | 9 ++++++++-
drivers/nvdimm/pfn_devs.c | 4 ++++
drivers/nvdimm/pmem.c | 26 ++++++++++++++++++++++----
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/drivers/nvdimm/pfn.h b/drivers/nvdimm/pfn.h
index dde9853453d3..1b10ae5773b6 100644
--- a/drivers/nvdimm/pfn.h
+++ b/drivers/nvdimm/pfn.h
@@ -20,6 +20,12 @@
#define PFN_SIG_LEN 16
#define PFN_SIG "NVDIMM_PFN_INFO\0"
#define DAX_SIG "NVDIMM_DAX_INFO\0"
+/*
+ * increment this when we are making changes such that older
+ * kernel should fail to initialize that namespace.
+ */
+
+#define PFN_MIN_VERSION 0
struct nd_pfn_sb {
u8 signature[PFN_SIG_LEN];
@@ -36,7 +42,8 @@ struct nd_pfn_sb {
__le32 end_trunc;
/* minor-version-2 record the base alignment of the mapping */
__le32 align;
- u8 padding[4000];
+ __le16 min_verison;
+ u8 padding[3998];
__le64 checksum;
};
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 01f40672507f..3250de70a7b3 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -439,6 +439,9 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0))
return -ENXIO;
+ if (le16_to_cpu(pfn_sb->min_version > PFN_MIN_VERSION))
+ return -EOPNOTSUPP;
+
if (memcmp(pfn_sb->signature, sig, PFN_SIG_LEN) != 0)
return -ENODEV;
@@ -769,6 +772,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16);
pfn_sb->version_major = cpu_to_le16(1);
pfn_sb->version_minor = cpu_to_le16(2);
+ pfn_sb->min_version = cpu_to_le16(PFN_MIN_VERSION);
pfn_sb->start_pad = cpu_to_le32(start_pad);
pfn_sb->end_trunc = cpu_to_le32(end_trunc);
pfn_sb->align = cpu_to_le32(nd_pfn->align);
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 845c5b430cdd..406427c064d9 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -490,6 +490,7 @@ static int pmem_attach_disk(struct device *dev,
static int nd_pmem_probe(struct device *dev)
{
+ int ret;
struct nd_namespace_common *ndns;
ndns = nvdimm_namespace_common_probe(dev);
@@ -505,12 +506,29 @@ static int nd_pmem_probe(struct device *dev)
if (is_nd_pfn(dev))
return pmem_attach_disk(dev, ndns);
- /* if we find a valid info-block we'll come back as that personality */
- if (nd_btt_probe(dev, ndns) == 0 || nd_pfn_probe(dev, ndns) == 0
- || nd_dax_probe(dev, ndns) == 0)
+ ret = nd_btt_probe(dev, ndns);
+ if (ret == 0)
return -ENXIO;
+ else if (ret == -EOPNOTSUPP)
+ return ret;
- /* ...otherwise we're just a raw pmem device */
+ ret = nd_pfn_probe(dev, ndns);
+ if (ret == 0)
+ return -ENXIO;
+ else if (ret == -EOPNOTSUPP)
+ return ret;
+
+ ret = nd_dax_probe(dev, ndns);
+ if (ret == 0)
+ return -ENXIO;
+ else if (ret == -EOPNOTSUPP)
+ return ret;
+ /*
+ * We have two failure conditions here, there is no
+ * info reserver block or we found a valid info reserve block
+ * but failed to initialize the pfn superblock.
+ * Don't create a raw pmem disk for the second case.
+ */
return pmem_attach_disk(dev, ndns);
}
--
2.21.0
^ permalink raw reply related
* Re: [BISECTED] kexec regression on PowerBook G4
From: Christophe Leroy @ 2019-05-22 6:14 UTC (permalink / raw)
To: Aaro Koskinen; +Cc: linuxppc-dev
In-Reply-To: <20190521221859.GC3621@darkstar.musicnaut.iki.fi>
Hi Aero,
Le 22/05/2019 à 00:18, Aaro Koskinen a écrit :
> Hi,
>
> I was trying to upgrade from v5.0 -> v5.1 on PowerBook G4, but when trying
> to kexec a kernel the system gets stuck (no errors seen on the console).
Do you mean you are trying to kexec a v5.1 kernel from a v5.0 kernel, or
do you have a working v5.1 kernel, but kexec doesn't work with it ?
>
> Bisected to: 93c4a162b014 ("powerpc/6xx: Store PGDIR physical address
> in a SPRG"). This commit doesn't revert cleanly anymore but I tested
> that the one before works OK.
Not sure that's the problem. There was a problem with that commit, but
it was fixed by 4622a2d43101 ("powerpc/6xx: fix setup and use of
SPRN_SPRG_PGDIR for hash32").
You probably hit some commit between those two during bisect, that's
likely the reason why you ended here.
Can you restart your bisect from 4622a2d43101 ?
If you have CONFIG_SMP, maybe you should also consider taking
397d2300b08c ("powerpc/32s: fix flush_hash_pages() on SMP"). Stable
5.1.4 includes it.
>
> With current Linus HEAD (9c7db5004280), it gets a bit further but still
> doesn't work: now I get an error on the console after kexec "Starting
> new kernel! ... Bye!":
>
> kernel tried to execute exec-protected page (...) - exploit attempt?
Interesting.
Do you have CONFIG_STRICT_KERNEL_RWX=y in your .config ? If so, can you
retry without it ?
Thanks
Christophe
>
> A.
>
^ permalink raw reply
* Re: [PATCH] mm/nvdimm: Use correct #defines instead of opencoding
From: Aneesh Kumar K.V @ 2019-05-22 5:41 UTC (permalink / raw)
To: Dan Williams; +Cc: Linux MM, Oliver O'Halloran, linuxppc-dev, linux-nvdimm
In-Reply-To: <CAPcyv4j5Y+AFkbvYjDnfqTdmN_Sq=O0qfGUorgpjAE8Ww7vH=A@mail.gmail.com>
On 5/21/19 9:37 PM, Dan Williams wrote:
> On Tue, May 21, 2019 at 2:51 AM Aneesh Kumar K.V
> <aneesh.kumar@linux.ibm.com> wrote:
....
>>
>> Something like the below (Not tested). I am not sure what we will init the page_size
>> for minor version < 3. This will mark the namespace disabled if the
>> PAGE_SIZE and sizeof(struct page) doesn't match with the values used
>> during namespace create.
>
> Yes, this is on the right track.
>
> I would special-case page_size == 0 as 4096 and page_struct_size == 0
> as 64. If either of those is non-zero then the info-block version
> needs to be revved and it needs to be crafted to make older kernels
> fail to parse it.
>
page_size = SZ_4K implies we fail to enable namesepaces created on ppc64
till now. We do work fine with page_size = PAGE_SIZE. It is a few error
check and pfn_sb->npfns that got wrong values. We do reserve the correct
space for the required pfns even when we recorded wrong pfn_sb->npfs.
> There was an earlier attempt to implement minimum info-block versions here:
>
> https://lore.kernel.org/lkml/155000670159.348031.17631616775326330606.stgit@dwillia2-desk3.amr.corp.intel.com/
>
> ...but that was dropped in favor of the the "sub-section" patches.
>
Ok i will pick that too.
-aneesh
^ permalink raw reply
* Re: [PATCH 10/10] docs: fix broken documentation links
From: Federico Vaga @ 2019-05-21 22:56 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: kvm, Linux Doc Mailing List, linux-pci, platform-driver-x86,
linux-mm, linux-i2c, linux-kselftest, devel, Jonathan Corbet, x86,
linux-acpi, xen-devel, linux-edac, devicetree, linux-arm-msm,
Mauro Carvalho Chehab, linux-gpio, linux-amlogic, virtualization,
linux-arm-kernel, devel, netdev, linux-kernel,
linux-security-module, linuxppc-dev
In-Reply-To: <4fd1182b4a41feb2447c7ccde4d7f0a6b3c92686.1558362030.git.mchehab+samsung@kernel.org>
On Monday, May 20, 2019 4:47:39 PM CEST Mauro Carvalho Chehab wrote:
> Mostly due to x86 and acpi conversion, several documentation
> links are still pointing to the old file. Fix them.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
> Documentation/acpi/dsd/leds.txt | 2 +-
> Documentation/admin-guide/kernel-parameters.rst | 6 +++---
> Documentation/admin-guide/kernel-parameters.txt | 16 ++++++++--------
> Documentation/admin-guide/ras.rst | 2 +-
> .../devicetree/bindings/net/fsl-enetc.txt | 7 +++----
> .../bindings/pci/amlogic,meson-pcie.txt | 2 +-
> .../bindings/regulator/qcom,rpmh-regulator.txt | 2 +-
> Documentation/devicetree/booting-without-of.txt | 2 +-
> Documentation/driver-api/gpio/board.rst | 2 +-
> Documentation/driver-api/gpio/consumer.rst | 2 +-
> .../firmware-guide/acpi/enumeration.rst | 2 +-
> .../firmware-guide/acpi/method-tracing.rst | 2 +-
> Documentation/i2c/instantiating-devices | 2 +-
> Documentation/sysctl/kernel.txt | 4 ++--
> .../translations/it_IT/process/4.Coding.rst | 2 +-
> .../translations/it_IT/process/howto.rst | 2 +-
> .../it_IT/process/stable-kernel-rules.rst | 4 ++--
> .../translations/zh_CN/process/4.Coding.rst | 2 +-
> Documentation/x86/x86_64/5level-paging.rst | 2 +-
> Documentation/x86/x86_64/boot-options.rst | 4 ++--
> .../x86/x86_64/fake-numa-for-cpusets.rst | 2 +-
> MAINTAINERS | 6 +++---
> arch/arm/Kconfig | 2 +-
> arch/arm64/kernel/kexec_image.c | 2 +-
> arch/powerpc/Kconfig | 2 +-
> arch/x86/Kconfig | 16 ++++++++--------
> arch/x86/Kconfig.debug | 2 +-
> arch/x86/boot/header.S | 2 +-
> arch/x86/entry/entry_64.S | 2 +-
> arch/x86/include/asm/bootparam_utils.h | 2 +-
> arch/x86/include/asm/page_64_types.h | 2 +-
> arch/x86/include/asm/pgtable_64_types.h | 2 +-
> arch/x86/kernel/cpu/microcode/amd.c | 2 +-
> arch/x86/kernel/kexec-bzimage64.c | 2 +-
> arch/x86/kernel/pci-dma.c | 2 +-
> arch/x86/mm/tlb.c | 2 +-
> arch/x86/platform/pvh/enlighten.c | 2 +-
> drivers/acpi/Kconfig | 10 +++++-----
> drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
> .../fieldbus/Documentation/fieldbus_dev.txt | 4 ++--
> drivers/vhost/vhost.c | 2 +-
> include/acpi/acpi_drivers.h | 2 +-
> include/linux/fs_context.h | 2 +-
> include/linux/lsm_hooks.h | 2 +-
> mm/Kconfig | 2 +-
> security/Kconfig | 2 +-
> tools/include/linux/err.h | 2 +-
> tools/objtool/Documentation/stack-validation.txt | 4 ++--
> tools/testing/selftests/x86/protection_keys.c | 2 +-
> 49 files changed, 78 insertions(+), 79 deletions(-)
>
> diff --git a/Documentation/acpi/dsd/leds.txt
> b/Documentation/acpi/dsd/leds.txt index 81a63af42ed2..cc58b1a574c5 100644
> --- a/Documentation/acpi/dsd/leds.txt
> +++ b/Documentation/acpi/dsd/leds.txt
> @@ -96,4 +96,4 @@ where
>
> <URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-da
> ta-extension-UUID-v1.1.pdf>, referenced 2019-02-21.
>
> -[7] Documentation/acpi/dsd/data-node-reference.txt
> +[7] Documentation/firmware-guide/acpi/dsd/data-node-references.rst
> diff --git a/Documentation/admin-guide/kernel-parameters.rst
> b/Documentation/admin-guide/kernel-parameters.rst index
> 0124980dca2d..8d3273e32eb1 100644
> --- a/Documentation/admin-guide/kernel-parameters.rst
> +++ b/Documentation/admin-guide/kernel-parameters.rst
> @@ -167,7 +167,7 @@ parameter is applicable::
> X86-32 X86-32, aka i386 architecture is enabled.
> X86-64 X86-64 architecture is enabled.
> More X86-64 boot options can be found in
> - Documentation/x86/x86_64/boot-options.txt
.
> + Documentation/x86/x86_64/boot-options.rst.
> X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64)
> X86_UV SGI UV support is enabled.
> XEN Xen support is enabled
> @@ -181,10 +181,10 @@ In addition, the following text indicates that the
> option:: Parameters denoted with BOOT are actually interpreted by the boot
> loader, and have no meaning to the kernel directly.
> Do not modify the syntax of boot loader parameters without extreme
> -need or coordination with <Documentation/x86/boot.txt>.
> +need or coordination with <Documentation/x86/boot.rst>.
>
> There are also arch-specific kernel-parameters not documented here.
> -See for example <Documentation/x86/x86_64/boot-options.txt>.
> +See for example <Documentation/x86/x86_64/boot-options.rst>.
>
> Note that ALL kernel parameters listed below are CASE SENSITIVE, and that
> a trailing = on the name of any parameter states that that parameter will
> diff --git a/Documentation/admin-guide/kernel-parameters.txt
> b/Documentation/admin-guide/kernel-parameters.txt index
> 138f6664b2e2..bc5f202d42ec 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -53,7 +53,7 @@
> ACPI_DEBUG_PRINT statements, e.g.,
> ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
> The debug_level mask defaults to "info".
See
> - Documentation/acpi/debug.txt for more
information about
> + Documentation/firmware-guide/acpi/debug.rst
for more information about
> debug layers and levels.
>
> Enable processor driver info messages:
> @@ -963,7 +963,7 @@
> for details.
>
> nompx [X86] Disables Intel Memory Protection
Extensions.
> - See Documentation/x86/intel_mpx.txt for
more
> + See Documentation/x86/intel_mpx.rst for
more
> information about the feature.
>
> nopku [X86] Disable Memory Protection Keys CPU
feature found
> @@ -1189,7 +1189,7 @@
> that is to be dynamically loaded by Linux.
If there are
> multiple variables with the same name but
with different
> vendor GUIDs, all of them will be loaded.
See
> - Documentation/acpi/ssdt-overlays.txt for
details.
> + Documentation/admin-guide/acpi/ssdt-
overlays.rst for details.
>
>
> eisa_irq_edge= [PARISC,HW]
> @@ -2383,7 +2383,7 @@
>
> mce [X86-32] Machine Check Exception
>
> - mce=option [X86-64] See Documentation/x86/x86_64/boot-
options.txt
> + mce=option [X86-64] See Documentation/x86/x86_64/boot-
options.rst
>
> md= [HW] RAID subsystems devices and level
> See Documentation/admin-guide/md.rst.
> @@ -2439,7 +2439,7 @@
> set according to the
> CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE
kernel config
> option.
> - See Documentation/memory-hotplug.txt.
> + See Documentation/admin-guide/mm/memory-
hotplug.rst.
>
> memmap=exactmap [KNL,X86] Enable setting of an exact
> E820 memory map, as specified by the user.
> @@ -2528,7 +2528,7 @@
> mem_encrypt=on: Activate
SME
> mem_encrypt=off: Do not activate SME
>
> - Refer to Documentation/x86/amd-memory-
encryption.txt
> + Refer to Documentation/x86/amd-memory-
encryption.rst
> for details on when memory encryption can
be activated.
>
> mem_sleep_default= [SUSPEND] Default system suspend mode:
> @@ -3528,7 +3528,7 @@
> See Documentation/blockdev/paride.txt.
>
> pirq= [SMP,APIC] Manual mp-table setup
> - See Documentation/x86/i386/IO-APIC.txt.
> + See Documentation/x86/i386/IO-APIC.rst.
>
> plip= [PPT,NET] Parallel port network link
> Format: { parport<nr> | timid | 0 }
> @@ -5054,7 +5054,7 @@
> Can be used multiple times for multiple
devices.
>
> vga= [BOOT,X86-32] Select a particular video
mode
> - See Documentation/x86/boot.txt and
> + See Documentation/x86/boot.rst and
> Documentation/svga.txt.
> Use vga=ask for menu.
> This is actually a boot loader parameter;
the value is
> diff --git a/Documentation/admin-guide/ras.rst
> b/Documentation/admin-guide/ras.rst index c7495e42e6f4..2b20f5f7380d 100644
> --- a/Documentation/admin-guide/ras.rst
> +++ b/Documentation/admin-guide/ras.rst
> @@ -199,7 +199,7 @@ Architecture (MCA)\ [#f3]_.
> mode).
>
> .. [#f3] For more details about the Machine Check Architecture (MCA),
> - please read Documentation/x86/x86_64/machinecheck at the Kernel tree.
> + please read Documentation/x86/x86_64/machinecheck.rst at the Kernel tree.
>
> EDAC - Error Detection And Correction
> *************************************
> diff --git a/Documentation/devicetree/bindings/net/fsl-enetc.txt
> b/Documentation/devicetree/bindings/net/fsl-enetc.txt index
> c812e25ae90f..25fc687419db 100644
> --- a/Documentation/devicetree/bindings/net/fsl-enetc.txt
> +++ b/Documentation/devicetree/bindings/net/fsl-enetc.txt
> @@ -16,8 +16,8 @@ Required properties:
> In this case, the ENETC node should include a "mdio" sub-node
> that in turn should contain the "ethernet-phy" node describing the
> external phy. Below properties are required, their bindings
> -already defined in ethernet.txt or phy.txt, under
> -Documentation/devicetree/bindings/net/*.
> +already defined in Documentation/devicetree/bindings/net/ethernet.txt or
> +Documentation/devicetree/bindings/net/phy.txt.
>
> Required:
>
> @@ -51,8 +51,7 @@ Example:
> connection:
>
> In this case, the ENETC port node defines a fixed link connection,
> -as specified by "fixed-link.txt", under
> -Documentation/devicetree/bindings/net/*.
> +as specified by Documentation/devicetree/bindings/net/fixed-link.txt.
>
> Required:
>
> diff --git a/Documentation/devicetree/bindings/pci/amlogic,meson-pcie.txt
> b/Documentation/devicetree/bindings/pci/amlogic,meson-pcie.txt index
> 12b18f82d441..efa2c8b9b85a 100644
> --- a/Documentation/devicetree/bindings/pci/amlogic,meson-pcie.txt
> +++ b/Documentation/devicetree/bindings/pci/amlogic,meson-pcie.txt
> @@ -3,7 +3,7 @@ Amlogic Meson AXG DWC PCIE SoC controller
> Amlogic Meson PCIe host controller is based on the Synopsys DesignWare PCI
> core. It shares common functions with the PCIe DesignWare core driver and
> inherits common properties defined in
> -Documentation/devicetree/bindings/pci/designware-pci.txt.
> +Documentation/devicetree/bindings/pci/designware-pcie.txt.
>
> Additional properties are described here:
>
> diff --git
> a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt index
> 7ef2dbe48e8a..14d2eee96b3d 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> @@ -97,7 +97,7 @@ Second Level Nodes - Regulators
> sent for this regulator including those which are
for a
> strictly lower power state.
>
> -Other properties defined in Documentation/devicetree/bindings/regulator.txt
> +Other properties defined in
> Documentation/devicetree/bindings/regulator/regulator.txt may also be used.
> regulator-initial-mode and regulator-allowed-modes may be specified for
> VRM regulators using mode values from
> include/dt-bindings/regulator/qcom,rpmh-regulator.h.
> regulator-allow-bypass diff --git
> a/Documentation/devicetree/booting-without-of.txt
> b/Documentation/devicetree/booting-without-of.txt index
> e86bd2f64117..60f8640f2b2f 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -277,7 +277,7 @@ it with special cases.
> the decompressor (the real mode entry point goes to the same 32bit
> entry point once it switched into protected mode). That entry point
> supports one calling convention which is documented in
> - Documentation/x86/boot.txt
> + Documentation/x86/boot.rst
> The physical pointer to the device-tree block (defined in chapter II)
> is passed via setup_data which requires at least boot protocol 2.09.
> The type filed is defined as
> diff --git a/Documentation/driver-api/gpio/board.rst
> b/Documentation/driver-api/gpio/board.rst index b37f3f7b8926..ce91518bf9f4
> 100644
> --- a/Documentation/driver-api/gpio/board.rst
> +++ b/Documentation/driver-api/gpio/board.rst
> @@ -101,7 +101,7 @@ with the help of _DSD (Device Specific Data), introduced
> in ACPI 5.1:: }
>
> For more information about the ACPI GPIO bindings see
> -Documentation/acpi/gpio-properties.txt.
> +Documentation/firmware-guide/acpi/gpio-properties.rst.
>
> Platform Data
> -------------
> diff --git a/Documentation/driver-api/gpio/consumer.rst
> b/Documentation/driver-api/gpio/consumer.rst index
> 5e4d8aa68913..fdecb6d711db 100644
> --- a/Documentation/driver-api/gpio/consumer.rst
> +++ b/Documentation/driver-api/gpio/consumer.rst
> @@ -437,7 +437,7 @@ case, it will be handled by the GPIO subsystem
> automatically. However, if the _DSD is not present, the mappings between
> GpioIo()/GpioInt() resources and GPIO connection IDs need to be provided by
> device drivers.
>
> -For details refer to Documentation/acpi/gpio-properties.txt
> +For details refer to Documentation/firmware-guide/acpi/gpio-properties.rst
>
>
> Interacting With the Legacy GPIO Subsystem
> diff --git a/Documentation/firmware-guide/acpi/enumeration.rst
> b/Documentation/firmware-guide/acpi/enumeration.rst index
> 6b32b7be8c85..65f5bb5725ac 100644
> --- a/Documentation/firmware-guide/acpi/enumeration.rst
> +++ b/Documentation/firmware-guide/acpi/enumeration.rst
> @@ -339,7 +339,7 @@ a code like this::
> There are also devm_* versions of these functions which release the
> descriptors once the device is released.
>
> -See Documentation/acpi/gpio-properties.txt for more information about the
> +See Documentation/firmware-guide/acpi/gpio-properties.rst for more
> information about the _DSD binding related to GPIOs.
>
> MFD devices
> diff --git a/Documentation/firmware-guide/acpi/method-tracing.rst
> b/Documentation/firmware-guide/acpi/method-tracing.rst index
> d0b077b73f5f..0aa7e2c5d32a 100644
> --- a/Documentation/firmware-guide/acpi/method-tracing.rst
> +++ b/Documentation/firmware-guide/acpi/method-tracing.rst
> @@ -68,7 +68,7 @@ c. Filter out the debug layer/level matched logs when the
> specified
>
> Where:
> 0xXXXXXXXX/0xYYYYYYYY
> - Refer to Documentation/acpi/debug.txt for possible debug layer/level
> + Refer to Documentation/firmware-guide/acpi/debug.rst for possible
> debug layer/level masking values.
> \PPPP.AAAA.TTTT.HHHH
> Full path of a control method that can be found in the ACPI namespace.
> diff --git a/Documentation/i2c/instantiating-devices
> b/Documentation/i2c/instantiating-devices index 0d85ac1935b7..5a3e2f331e8c
> 100644
> --- a/Documentation/i2c/instantiating-devices
> +++ b/Documentation/i2c/instantiating-devices
> @@ -85,7 +85,7 @@ Method 1c: Declare the I2C devices via ACPI
> -------------------------------------------
>
> ACPI can also describe I2C devices. There is special documentation for this
> -which is currently located at Documentation/acpi/enumeration.txt. +which
> is currently located at Documentation/firmware-guide/acpi/enumeration.rst.
>
>
> Method 2: Instantiate the devices explicitly
> diff --git a/Documentation/sysctl/kernel.txt
> b/Documentation/sysctl/kernel.txt index f0c86fbb3b48..92f7f34b021a 100644
> --- a/Documentation/sysctl/kernel.txt
> +++ b/Documentation/sysctl/kernel.txt
> @@ -155,7 +155,7 @@ is 0x15 and the full version number is 0x234, this file
> will contain the value 340 = 0x154.
>
> See the type_of_loader and ext_loader_type fields in
> -Documentation/x86/boot.txt for additional information.
> +Documentation/x86/boot.rst for additional information.
>
> ==============================================================
>
> @@ -167,7 +167,7 @@ The complete bootloader version number. In the example
> above, this file will contain the value 564 = 0x234.
>
> See the type_of_loader and ext_loader_ver fields in
> -Documentation/x86/boot.txt for additional information.
> +Documentation/x86/boot.rst for additional information.
>
> ==============================================================
>
> diff --git a/Documentation/translations/it_IT/process/4.Coding.rst
> b/Documentation/translations/it_IT/process/4.Coding.rst index
> c05b89e616dd..1d23e951491f 100644
> --- a/Documentation/translations/it_IT/process/4.Coding.rst
> +++ b/Documentation/translations/it_IT/process/4.Coding.rst
> @@ -370,7 +370,7 @@ con cosa stanno lavorando. Consultate:
> Documentation/ABI/README per avere una descrizione di come questi documenti
> devono essere impostati e quali informazioni devono essere fornite.
>
> -Il file
> :ref:`Documentation/translations/it_IT/admin-guide/kernel-parameters.rst
> <kernelparameters>` +Il file
> :ref:`Documentation/admin-guide/kernel-parameters.rst <kernelparameters>`
> descrive tutti i parametri di avvio del kernel. Ogni patch che aggiunga
> nuovi parametri dovrebbe aggiungere nuove voci a questo file.
ACK
I will provide later a patch that adds that translation (just the .rst file)
> diff --git a/Documentation/translations/it_IT/process/howto.rst
> b/Documentation/translations/it_IT/process/howto.rst index
> 9903ac7c566b..44e6077730e8 100644
> --- a/Documentation/translations/it_IT/process/howto.rst
> +++ b/Documentation/translations/it_IT/process/howto.rst
> @@ -131,7 +131,7 @@ Di seguito una lista di file che sono presenti nei
> sorgente del kernel e che "Linux kernel patch submission format"
> http://linux.yyz.us/patch-format.html
>
> - :ref:`Documentation/process/translations/it_IT/stable-api-nonsense.rst
> <it_stable_api_nonsense>` +
> :ref:`Documentation/translations/it_IT/process/stable-api-nonsense.rst
> <it_stable_api_nonsense>`
ACK
> Questo file descrive la motivazioni sottostanti la conscia decisione di
> non avere un API stabile all'interno del kernel, incluso cose come: diff
> --git a/Documentation/translations/it_IT/process/stable-kernel-rules.rst
> b/Documentation/translations/it_IT/process/stable-kernel-rules.rst index
> 48e88e5ad2c5..4f206cee31a7 100644
> --- a/Documentation/translations/it_IT/process/stable-kernel-rules.rst
> +++ b/Documentation/translations/it_IT/process/stable-kernel-rules.rst
> @@ -33,7 +33,7 @@ Regole sul tipo di patch che vengono o non vengono
> accettate nei sorgenti - Non deve includere alcuna correzione "banale"
> (correzioni grammaticali, pulizia dagli spazi bianchi, eccetera).
> - Deve rispettare le regole scritte in
> - :ref:`Documentation/translation/it_IT/process/submitting-patches.rst
> <it_submittingpatches>` +
> :ref:`Documentation/translations/it_IT/process/submitting-patches.rst
> <it_submittingpatches>` - Questa patch o una equivalente deve esistere già
> nei sorgenti principali di Linux
ACK
>
> @@ -43,7 +43,7 @@ Procedura per sottomettere patch per i sorgenti -stable
>
> - Se la patch contiene modifiche a dei file nelle cartelle net/ o
> drivers/net, allora seguite le linee guida descritte in
> - :ref:`Documentation/translation/it_IT/networking/netdev-FAQ.rst
> <it_netdev-FAQ>`; +
> :ref:`Documentation/translations/it_IT/networking/netdev-FAQ.rst
> <it_netdev-FAQ>`; ma solo dopo aver verificato al seguente indirizzo che la
> patch non sia già in coda:
>
ACK
Thanks for the fixes, out of curiosity. How did you spot those mistakes?
> https://patchwork.ozlabs.org/bundle/davem/stable/?series=&submitter=&state=
> *&q=&archive= diff --git
> a/Documentation/translations/zh_CN/process/4.Coding.rst
> b/Documentation/translations/zh_CN/process/4.Coding.rst index
> 5301e9d55255..8bb777941394 100644
> --- a/Documentation/translations/zh_CN/process/4.Coding.rst
> +++ b/Documentation/translations/zh_CN/process/4.Coding.rst
> @@ -241,7 +241,7 @@ scripts/coccinelle目录下已经打包了相当多的内核“语义补丁”
>
> 任何添加新用户空间界面的代码(包括新的sysfs或/proc文件)都应该包含该界面的
> 文档,该文档使用户空间开发人员能够知道他们在使用什么。请参阅
> -Documentation/abi/readme,了解如何格式化此文档以及需要提供哪些信息。
> +Documentation/ABI/README,了解如何格式化此文档以及需要提供哪些信息。
>
> 文件 :ref:`Documentation/admin-guide/kernel-parameters.rst
> <kernelparameters>` 描述了内核的所有引导时间参数。任何添加新参数的补丁都应该向该文件添加适当的
> diff --git a/Documentation/x86/x86_64/5level-paging.rst
> b/Documentation/x86/x86_64/5level-paging.rst index
> ab88a4514163..44856417e6a5 100644
> --- a/Documentation/x86/x86_64/5level-paging.rst
> +++ b/Documentation/x86/x86_64/5level-paging.rst
> @@ -20,7 +20,7 @@ physical address space. This "ought to be enough for
> anybody" ©. QEMU 2.9 and later support 5-level paging.
>
> Virtual memory layout for 5-level paging is described in
> -Documentation/x86/x86_64/mm.txt
> +Documentation/x86/x86_64/mm.rst
>
>
> Enabling 5-level paging
> diff --git a/Documentation/x86/x86_64/boot-options.rst
> b/Documentation/x86/x86_64/boot-options.rst index
> 2f69836b8445..6a4285a3c7a4 100644
> --- a/Documentation/x86/x86_64/boot-options.rst
> +++ b/Documentation/x86/x86_64/boot-options.rst
> @@ -9,7 +9,7 @@ only the AMD64 specific ones are listed here.
>
> Machine check
> =============
> -Please see Documentation/x86/x86_64/machinecheck for sysfs runtime
> tunables. +Please see Documentation/x86/x86_64/machinecheck.rst for sysfs
> runtime tunables.
>
> mce=off
> Disable machine check
> @@ -89,7 +89,7 @@ APICs
> Don't use the local APIC (alias for i386 compatibility)
>
> pirq=...
> - See Documentation/x86/i386/IO-APIC.txt
> + See Documentation/x86/i386/IO-APIC.rst
>
> noapictimer
> Don't set up the APIC timer
> diff --git a/Documentation/x86/x86_64/fake-numa-for-cpusets.rst
> b/Documentation/x86/x86_64/fake-numa-for-cpusets.rst index
> 74fbb78b3c67..04df57b9aa3f 100644
> --- a/Documentation/x86/x86_64/fake-numa-for-cpusets.rst
> +++ b/Documentation/x86/x86_64/fake-numa-for-cpusets.rst
> @@ -18,7 +18,7 @@ For more information on the features of cpusets, see
> Documentation/cgroup-v1/cpusets.txt.
> There are a number of different configurations you can use for your needs.
> For more information on the numa=fake command line option and its various
> ways of -configuring fake nodes, see
> Documentation/x86/x86_64/boot-options.txt. +configuring fake nodes, see
> Documentation/x86/x86_64/boot-options.rst.
>
> For the purposes of this introduction, we'll assume a very primitive NUMA
> emulation setup of "numa=fake=4*512,". This will split our system memory
> into diff --git a/MAINTAINERS b/MAINTAINERS
> index 0c84bf76d165..47aa4f6defb9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3874,7 +3874,7 @@
> F: Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.txt
> F: Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt
> F: Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt
> F: Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt
> -F: Documentation/hwmon/lochnagar
> +F: Documentation/hwmon/lochnagar.rst
>
> CISCO FCOE HBA DRIVER
> M: Satish Kharat <satishkh@cisco.com>
> @@ -11272,7 +11272,7 @@ NXP FXAS21002C DRIVER
> M: Rui Miguel Silva <rmfrfs@gmail.com>
> L: linux-iio@vger.kernel.org
> S: Maintained
> -F: Documentation/devicetree/bindings/iio/gyroscope/fxas21002c.txt
> +F: Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.txt
> F: drivers/iio/gyro/fxas21002c_core.c
> F: drivers/iio/gyro/fxas21002c.h
> F: drivers/iio/gyro/fxas21002c_i2c.c
> @@ -13043,7 +13043,7 @@ M: Niklas Cassel <niklas.cassel@linaro.org>
> L: netdev@vger.kernel.org
> S: Maintained
> F: drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> -F: Documentation/devicetree/bindings/net/qcom,dwmac.txt
> +F: Documentation/devicetree/bindings/net/qcom,ethqos.txt
>
> QUALCOMM GENERIC INTERFACE I2C DRIVER
> M: Alok Chauhan <alokc@codeaurora.org>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 8869742a85df..0f220264cc23 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1263,7 +1263,7 @@ config SMP
> uniprocessor machines. On a uniprocessor machine, the kernel
> will run faster if you say N here.
>
> - See also <file:Documentation/x86/i386/IO-APIC.txt>,
> + See also <file:Documentation/x86/i386/IO-APIC.rst>,
> <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO
available at
> <http://tldp.org/HOWTO/SMP-HOWTO.html>.
>
> diff --git a/arch/arm64/kernel/kexec_image.c
> b/arch/arm64/kernel/kexec_image.c index 07bf740bea91..31cc2f423aa8 100644
> --- a/arch/arm64/kernel/kexec_image.c
> +++ b/arch/arm64/kernel/kexec_image.c
> @@ -53,7 +53,7 @@ static void *image_load(struct kimage *image,
>
> /*
> * We require a kernel with an unambiguous Image header. Per
> - * Documentation/booting.txt, this is the case when image_size
> + * Documentation/arm64/booting.txt, this is the case when
image_size
> * is non-zero (practically speaking, since v3.17).
> */
> h = (struct arm64_image_header *)kernel;
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 8c1c636308c8..e868d2bd48b8 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -898,7 +898,7 @@ config PPC_MEM_KEYS
> page-based protections, but without requiring modification of
the
> page tables when an application changes protection domains.
>
> - For details, see Documentation/vm/protection-keys.rst
> + For details, see Documentation/x86/protection-keys.rst
>
> If unsure, say y.
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 2bbbd4d1ba31..78fdf2dd71d1 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -395,7 +395,7 @@ config SMP
> Y to "Enhanced Real Time Clock Support", below. The "Advanced
Power
> Management" code will be disabled if you say Y here.
>
> - See also <file:Documentation/x86/i386/IO-APIC.txt>,
> + See also <file:Documentation/x86/i386/IO-APIC.rst>,
> <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO
available at
> <http://www.tldp.org/docs.html#howto>.
>
> @@ -1290,7 +1290,7 @@ config MICROCODE
> the Linux kernel.
>
> The preferred method to load microcode from a detached initrd is
> described - in Documentation/x86/microcode.txt. For that you
need to
> enable + in Documentation/x86/microcode.rst. For that you need to enable
> CONFIG_BLK_DEV_INITRD in order for the loader to be able to scan the initrd
> for microcode blobs.
>
> @@ -1329,7 +1329,7 @@ config MICROCODE_OLD_INTERFACE
> It is inadequate because it runs too late to be able to properly
> load microcode on a machine and it needs special tools. Instead,
you
> should've switched to the early loading method with the initrd
or
> - builtin microcode by now: Documentation/x86/microcode.txt
> + builtin microcode by now: Documentation/x86/microcode.rst
>
> config X86_MSR
> tristate "/dev/cpu/*/msr - Model-specific register support"
> @@ -1478,7 +1478,7 @@ config X86_5LEVEL
> A kernel with the option enabled can be booted on machines that
> support 4- or 5-level paging.
>
> - See Documentation/x86/x86_64/5level-paging.txt for more
> + See Documentation/x86/x86_64/5level-paging.rst for more
> information.
>
> Say N if unsure.
> @@ -1626,7 +1626,7 @@ config ARCH_MEMORY_PROBE
> depends on X86_64 && MEMORY_HOTPLUG
> help
> This option enables a sysfs memory/probe interface for testing.
> - See Documentation/memory-hotplug.txt for more information.
> + See Documentation/admin-guide/mm/memory-hotplug.rst for more
> information. If you are unsure how to answer this question, answer N.
>
> config ARCH_PROC_KCORE_TEXT
> @@ -1783,7 +1783,7 @@ config MTRR
> You can safely say Y even if your machine doesn't have MTRRs,
you'll
> just add about 9 KB to your kernel.
>
> - See <file:Documentation/x86/mtrr.txt> for more information.
> + See <file:Documentation/x86/mtrr.rst> for more information.
>
> config MTRR_SANITIZER
> def_bool y
> @@ -1895,7 +1895,7 @@ config X86_INTEL_MPX
> process and adds some branches to paths used during
> exec() and munmap().
>
> - For details, see Documentation/x86/intel_mpx.txt
> + For details, see Documentation/x86/intel_mpx.rst
>
> If unsure, say N.
>
> @@ -1911,7 +1911,7 @@ config X86_INTEL_MEMORY_PROTECTION_KEYS
> page-based protections, but without requiring modification of
the
> page tables when an application changes protection domains.
>
> - For details, see Documentation/x86/protection-keys.txt
> + For details, see Documentation/x86/protection-keys.rst
>
> If unsure, say y.
>
> diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
> index f730680dc818..59f598543203 100644
> --- a/arch/x86/Kconfig.debug
> +++ b/arch/x86/Kconfig.debug
> @@ -156,7 +156,7 @@ config IOMMU_DEBUG
> code. When you use it make sure you have a big enough
> IOMMU/AGP aperture. Most of the options enabled by this can
> be set more finegrained using the iommu= command line
> - options. See Documentation/x86/x86_64/boot-options.txt for more
> + options. See Documentation/x86/x86_64/boot-options.rst for more
> details.
>
> config IOMMU_LEAK
> diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
> index 850b8762e889..90d791ca1a95 100644
> --- a/arch/x86/boot/header.S
> +++ b/arch/x86/boot/header.S
> @@ -313,7 +313,7 @@ start_sys_seg: .word SYSSEG
# obsolete and meaningless,
> but just
>
> type_of_loader: .byte 0 # 0 means ancient
bootloader, newer
> # bootloaders know
to change this.
> - # See
Documentation/x86/boot.txt for
> + # See
Documentation/x86/boot.rst for
> # assigned ids
>
> # flags, unused bits must be zero (RFU) bit within loadflags
> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
> index 11aa3b2afa4d..33f9fc38d014 100644
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -8,7 +8,7 @@
> *
> * entry.S contains the system-call and fault low-level handling routines.
> *
> - * Some of this is documented in Documentation/x86/entry_64.txt
> + * Some of this is documented in Documentation/x86/entry_64.rst
> *
> * A note on terminology:
> * - iret frame: Architecture defined interrupt frame from SS to RIP
> diff --git a/arch/x86/include/asm/bootparam_utils.h
> b/arch/x86/include/asm/bootparam_utils.h index f6f6ef436599..101eb944f13c
> 100644
> --- a/arch/x86/include/asm/bootparam_utils.h
> +++ b/arch/x86/include/asm/bootparam_utils.h
> @@ -24,7 +24,7 @@ static void sanitize_boot_params(struct boot_params
> *boot_params) * IMPORTANT NOTE TO BOOTLOADER AUTHORS: do not simply clear
> * this field. The purpose of this field is to guarantee
> * compliance with the x86 boot spec located in
> - * Documentation/x86/boot.txt . That spec says that the
> + * Documentation/x86/boot.rst . That spec says that the
> * *whole* structure should be cleared, after which only the
> * portion defined by struct setup_header (boot_params->hdr)
> * should be copied in.
> diff --git a/arch/x86/include/asm/page_64_types.h
> b/arch/x86/include/asm/page_64_types.h index 793c14c372cb..288b065955b7
> 100644
> --- a/arch/x86/include/asm/page_64_types.h
> +++ b/arch/x86/include/asm/page_64_types.h
> @@ -48,7 +48,7 @@
>
> #define __START_KERNEL_map _AC(0xffffffff80000000, UL)
>
> -/* See Documentation/x86/x86_64/mm.txt for a description of the memory map.
> */ +/* See Documentation/x86/x86_64/mm.rst for a description of the memory
> map. */
>
> #define __PHYSICAL_MASK_SHIFT 52
>
> diff --git a/arch/x86/include/asm/pgtable_64_types.h
> b/arch/x86/include/asm/pgtable_64_types.h index 88bca456da99..52e5f5f2240d
> 100644
> --- a/arch/x86/include/asm/pgtable_64_types.h
> +++ b/arch/x86/include/asm/pgtable_64_types.h
> @@ -103,7 +103,7 @@ extern unsigned int ptrs_per_p4d;
> #define PGDIR_MASK (~(PGDIR_SIZE - 1))
>
> /*
> - * See Documentation/x86/x86_64/mm.txt for a description of the memory map.
> + * See Documentation/x86/x86_64/mm.rst for a description of the memory
> map. *
> * Be very careful vs. KASLR when changing anything here. The KASLR address
> * range must not overlap with anything except the KASAN shadow area, which
> diff --git a/arch/x86/kernel/cpu/microcode/amd.c
> b/arch/x86/kernel/cpu/microcode/amd.c index e1f3ba19ba54..06d4e67f31ab
> 100644
> --- a/arch/x86/kernel/cpu/microcode/amd.c
> +++ b/arch/x86/kernel/cpu/microcode/amd.c
> @@ -61,7 +61,7 @@ static u8 amd_ucode_patch[PATCH_MAX_SIZE];
>
> /*
> * Microcode patch container file is prepended to the initrd in cpio
> - * format. See Documentation/x86/microcode.txt
> + * format. See Documentation/x86/microcode.rst
> */
> static const char
> ucode_path[] __maybe_unused = "kernel/x86/microcode/AuthenticAMD.bin";
> diff --git a/arch/x86/kernel/kexec-bzimage64.c
> b/arch/x86/kernel/kexec-bzimage64.c index 22f60dd26460..b07e7069b09e 100644
> --- a/arch/x86/kernel/kexec-bzimage64.c
> +++ b/arch/x86/kernel/kexec-bzimage64.c
> @@ -416,7 +416,7 @@ static void *bzImage64_load(struct kimage *image, char
> *kernel, efi_map_offset = params_cmdline_sz;
> efi_setup_data_offset = efi_map_offset + ALIGN(efi_map_sz, 16);
>
> - /* Copy setup header onto bootparams. Documentation/x86/boot.txt
*/
> + /* Copy setup header onto bootparams. Documentation/x86/boot.rst */
> setup_header_size = 0x0202 + kernel[0x0201] - setup_hdr_offset;
>
> /* Is there a limit on setup header size? */
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index dcd272dbd0a9..f62b498b18fb 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -70,7 +70,7 @@ void __init pci_iommu_alloc(void)
> }
>
> /*
> - * See <Documentation/x86/x86_64/boot-options.txt> for the iommu kernel
> + * See <Documentation/x86/x86_64/boot-options.rst> for the iommu kernel
> * parameter documentation.
> */
> static __init int iommu_setup(char *p)
> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
> index 7f61431c75fb..400c1ba033aa 100644
> --- a/arch/x86/mm/tlb.c
> +++ b/arch/x86/mm/tlb.c
> @@ -711,7 +711,7 @@ void native_flush_tlb_others(const struct cpumask
> *cpumask, }
>
> /*
> - * See Documentation/x86/tlb.txt for details. We choose 33
> + * See Documentation/x86/tlb.rst for details. We choose 33
> * because it is large enough to cover the vast majority (at
> * least 95%) of allocations, and is small enough that we are
> * confident it will not cause too much overhead. Each single
> diff --git a/arch/x86/platform/pvh/enlighten.c
> b/arch/x86/platform/pvh/enlighten.c index 1861a2ba0f2b..c0a502f7e3a7 100644
> --- a/arch/x86/platform/pvh/enlighten.c
> +++ b/arch/x86/platform/pvh/enlighten.c
> @@ -86,7 +86,7 @@ static void __init init_pvh_bootparams(bool xen_guest)
> }
>
> /*
> - * See Documentation/x86/boot.txt.
> + * See Documentation/x86/boot.rst.
> *
> * Version 2.12 supports Xen entry point but we will use default
x86/PC
> * environment (i.e. hardware_subarch 0).
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 283ee94224c6..2438f37f2ca1 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -333,7 +333,7 @@ config ACPI_CUSTOM_DSDT_FILE
> depends on !STANDALONE
> help
> This option supports a custom DSDT by linking it into the
kernel.
> - See Documentation/acpi/dsdt-override.txt
> + See Documentation/admin-guide/acpi/dsdt-override.rst
>
> Enter the full path name to the file which includes the AmlCode
> or dsdt_aml_code declaration.
> @@ -355,7 +355,7 @@ config ACPI_TABLE_UPGRADE
> This option provides functionality to upgrade arbitrary ACPI
tables
> via initrd. No functional change if no ACPI tables are passed
via
> initrd, therefore it's safe to say Y.
> - See Documentation/acpi/initrd_table_override.txt for details
> + See Documentation/admin-guide/acpi/initrd_table_override.rst for
details
>
> config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
> bool "Override ACPI tables from built-in initrd"
> @@ -365,7 +365,7 @@ config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
> This option provides functionality to override arbitrary ACPI
tables
> from built-in uncompressed initrd.
>
> - See Documentation/acpi/initrd_table_override.txt for details
> + See Documentation/admin-guide/acpi/initrd_table_override.rst for
details
>
> config ACPI_DEBUG
> bool "Debug Statements"
> @@ -374,7 +374,7 @@ config ACPI_DEBUG
> output and increases the kernel size by around 50K.
>
> Use the acpi.debug_layer and acpi.debug_level kernel command-
line
> - parameters documented in Documentation/acpi/debug.txt and
> + parameters documented in Documentation/firmware-guide/acpi/
debug.rst and
> Documentation/admin-guide/kernel-parameters.rst to control the type and
> amount of debug output.
>
> @@ -445,7 +445,7 @@ config ACPI_CUSTOM_METHOD
> help
> This debug facility allows ACPI AML methods to be inserted and/
or
> replaced without rebooting the system. For details refer to:
> - Documentation/acpi/method-customizing.txt.
> + Documentation/firmware-guide/acpi/method-customizing.rst.
>
> NOTE: This option is security sensitive, because it allows
arbitrary
> kernel memory to be written to by root (uid=0) users, allowing
them
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
> b/drivers/net/ethernet/faraday/ftgmac100.c index b17b79e612a3..ac6280ad43a1
> 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -1075,7 +1075,7 @@ static int ftgmac100_mii_probe(struct ftgmac100 *priv,
> phy_interface_t intf) }
>
> /* Indicate that we support PAUSE frames (see comment in
> - * Documentation/networking/phy.txt)
> + * Documentation/networking/phy.rst)
> */
> phy_support_asym_pause(phydev);
>
> diff --git a/drivers/staging/fieldbus/Documentation/fieldbus_dev.txt
> b/drivers/staging/fieldbus/Documentation/fieldbus_dev.txt index
> 56af3f650fa3..89fb8e14676f 100644
> --- a/drivers/staging/fieldbus/Documentation/fieldbus_dev.txt
> +++ b/drivers/staging/fieldbus/Documentation/fieldbus_dev.txt
> @@ -54,8 +54,8 @@ a limited few common behaviours and properties. This
> allows us to define a simple interface consisting of a character device and
> a set of sysfs files:
>
> See:
> -Documentation/ABI/testing/sysfs-class-fieldbus-dev
> -Documentation/ABI/testing/fieldbus-dev-cdev
> +drivers/staging/fieldbus/Documentation/ABI/sysfs-class-fieldbus-dev
> +drivers/staging/fieldbus/Documentation/ABI/fieldbus-dev-cdev
>
> Note that this simple interface does not provide a way to modify adapter
> configuration settings. It is therefore useful only for adapters that get
> their diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 1e3ed41ae1f3..69938dbae2d0 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -1694,7 +1694,7 @@ EXPORT_SYMBOL_GPL(vhost_dev_ioctl);
>
> /* TODO: This is really inefficient. We need something like get_user()
> * (instruction directly accesses the data, with an exception table entry
> - * returning -EFAULT). See Documentation/x86/exception-tables.txt.
> + * returning -EFAULT). See Documentation/x86/exception-tables.rst.
> */
> static int set_bit_to_user(int nr, void __user *addr)
> {
> diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
> index de1804aeaf69..98e3db7a89cd 100644
> --- a/include/acpi/acpi_drivers.h
> +++ b/include/acpi/acpi_drivers.h
> @@ -25,7 +25,7 @@
> #define ACPI_MAX_STRING 80
>
> /*
> - * Please update drivers/acpi/debug.c and Documentation/acpi/debug.txt
> + * Please update drivers/acpi/debug.c and
> Documentation/firmware-guide/acpi/debug.rst * if you add to this list.
> */
> #define ACPI_BUS_COMPONENT 0x00010000
> diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h
> index 1f966670c8dc..623eb58560b9 100644
> --- a/include/linux/fs_context.h
> +++ b/include/linux/fs_context.h
> @@ -85,7 +85,7 @@ struct fs_parameter {
> * Superblock creation fills in ->root whereas reconfiguration begins with
> this * already set.
> *
> - * See Documentation/filesystems/mounting.txt
> + * See Documentation/filesystems/mount_api.txt
> */
> struct fs_context {
> const struct fs_context_operations *ops;
> diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
> index 47f58cfb6a19..df1318d85f7d 100644
> --- a/include/linux/lsm_hooks.h
> +++ b/include/linux/lsm_hooks.h
> @@ -77,7 +77,7 @@
> * state. This is called immediately after commit_creds().
> *
> * Security hooks for mount using fs_context.
> - * [See also Documentation/filesystems/mounting.txt]
> + * [See also Documentation/filesystems/mount_api.txt]
> *
> * @fs_context_dup:
> * Allocate and attach a security structure to sc->security. This
pointer
> diff --git a/mm/Kconfig b/mm/Kconfig
> index ee8d1f311858..6e5fb81bde4b 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -165,7 +165,7 @@ config MEMORY_HOTPLUG_DEFAULT_ONLINE
> onlining policy (/sys/devices/system/memory/auto_online_blocks)
which
> determines what happens to newly added memory regions. Policy
setting
> can always be changed at runtime.
> - See Documentation/memory-hotplug.txt for more information.
> + See Documentation/admin-guide/mm/memory-hotplug.rst for more
> information.
>
> Say Y here if you want all hot-plugged memory blocks to appear
in
> 'online' state by default.
> diff --git a/security/Kconfig b/security/Kconfig
> index aeac3676dd4d..6d75ed71970c 100644
> --- a/security/Kconfig
> +++ b/security/Kconfig
> @@ -62,7 +62,7 @@ config PAGE_TABLE_ISOLATION
> ensuring that the majority of kernel addresses are not mapped
> into userspace.
>
> - See Documentation/x86/pti.txt for more details.
> + See Documentation/x86/pti.rst for more details.
>
> config SECURITY_INFINIBAND
> bool "Infiniband Security Hooks"
> diff --git a/tools/include/linux/err.h b/tools/include/linux/err.h
> index 2f5a12b88a86..25f2bb3a991d 100644
> --- a/tools/include/linux/err.h
> +++ b/tools/include/linux/err.h
> @@ -20,7 +20,7 @@
> * Userspace note:
> * The same principle works for userspace, because 'error' pointers
> * fall down to the unused hole far from user space, as described
> - * in Documentation/x86/x86_64/mm.txt for x86_64 arch:
> + * in Documentation/x86/x86_64/mm.rst for x86_64 arch:
> *
> * 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per
> mm hole caused by [48:63] sign extension * ffffffffffe00000 -
> ffffffffffffffff (=2 MB) unused hole
> diff --git a/tools/objtool/Documentation/stack-validation.txt
> b/tools/objtool/Documentation/stack-validation.txt index
> 4dd11a554b9b..de094670050b 100644
> --- a/tools/objtool/Documentation/stack-validation.txt
> +++ b/tools/objtool/Documentation/stack-validation.txt
> @@ -21,7 +21,7 @@ instructions). Similarly, it knows how to follow switch
> statements, for which gcc sometimes uses jump tables.
>
> (Objtool also has an 'orc generate' subcommand which generates debuginfo
> -for the ORC unwinder. See Documentation/x86/orc-unwinder.txt in the
> +for the ORC unwinder. See Documentation/x86/orc-unwinder.rst in the
> kernel tree for more details.)
>
>
> @@ -101,7 +101,7 @@ b) ORC (Oops Rewind Capability) unwind table generation
> band. So it doesn't affect runtime performance and it can be
> reliable even when interrupts or exceptions are involved.
>
> - For more details, see Documentation/x86/orc-unwinder.txt.
> + For more details, see Documentation/x86/orc-unwinder.rst.
>
> c) Higher live patching compatibility rate
>
> diff --git a/tools/testing/selftests/x86/protection_keys.c
> b/tools/testing/selftests/x86/protection_keys.c index
> 5d546dcdbc80..798a5ddeee55 100644
> --- a/tools/testing/selftests/x86/protection_keys.c
> +++ b/tools/testing/selftests/x86/protection_keys.c
> @@ -1,6 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0
> /*
> - * Tests x86 Memory Protection Keys (see
> Documentation/x86/protection-keys.txt) + * Tests x86 Memory Protection Keys
> (see Documentation/x86/protection-keys.rst) *
> * There are examples in here of:
> * * how to set protection keys on memory
^ 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