* [U-Boot] [PATCH] fastboot: Remove "bootloader-version" variable
From: Igor Opaniuk @ 2019-06-20 14:54 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20190620140001.12811-1-semen.protsenko@linaro.org>
Hi Sam,
On Thu, Jun 20, 2019 at 5:00 PM Sam Protsenko
<semen.protsenko@linaro.org> wrote:
>
> As per [1], there is no such fastboot variable as "bootloader-version".
> Only "version-bootloader" is supported. Let's reflect this and not
> confuse users further.
>
> [1] https://android.googlesource.com/platform/system/core/+/master/fastboot/README.md#client-variables
>
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
> doc/README.android-fastboot | 4 ++--
> drivers/fastboot/fb_getvar.c | 9 +++------
> 2 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot
> index 431191c473..ce852a4fd1 100644
> --- a/doc/README.android-fastboot
> +++ b/doc/README.android-fastboot
> @@ -169,8 +169,8 @@ On the client side you can fetch the bootloader version for instance:
>
> ::
>
> - $ fastboot getvar bootloader-version
> - bootloader-version: U-Boot 2014.04-00005-gd24cabc
> + $ fastboot getvar version-bootloader
> + version-bootloader: U-Boot 2014.04-00005-gd24cabc
> finished. total time: 0.000s
>
> or initiate a reboot:
> diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
> index fd0823b2bf..ebe5c8a104 100644
> --- a/drivers/fastboot/fb_getvar.c
> +++ b/drivers/fastboot/fb_getvar.c
> @@ -12,7 +12,7 @@
> #include <version.h>
>
> static void getvar_version(char *var_parameter, char *response);
> -static void getvar_bootloader_version(char *var_parameter, char *response);
> +static void getvar_version_bootloader(char *var_parameter, char *response);
> static void getvar_downloadsize(char *var_parameter, char *response);
> static void getvar_serialno(char *var_parameter, char *response);
> static void getvar_version_baseband(char *var_parameter, char *response);
> @@ -37,12 +37,9 @@ static const struct {
> {
> .variable = "version",
> .dispatch = getvar_version
> - }, {
> - .variable = "bootloader-version",
> - .dispatch = getvar_bootloader_version
> }, {
> .variable = "version-bootloader",
> - .dispatch = getvar_bootloader_version
> + .dispatch = getvar_version_bootloader
> }, {
> .variable = "downloadsize",
> .dispatch = getvar_downloadsize
> @@ -131,7 +128,7 @@ static void getvar_version(char *var_parameter, char *response)
> fastboot_okay(FASTBOOT_VERSION, response);
> }
>
> -static void getvar_bootloader_version(char *var_parameter, char *response)
> +static void getvar_version_bootloader(char *var_parameter, char *response)
> {
> fastboot_okay(U_BOOT_VERSION, response);
> }
> --
> 2.20.1
>
My two cents here,
Based on the commit messages from "git log --grep=bootloader-version"
people prefer to use "bootloader-version" instead of
"version-bootloader", and totally removing it will probably affect
usual workflow with fastboot (probably someone will be suprised that
"bootloader-version" doesn't work anymore), including some CI automate
testing etc (if there is any);
I think I does make sense to involve all of them to this discussion
also (already added to CC).
--
Best regards - Freundliche Grüsse - Meilleures salutations
Igor Opaniuk
mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk
^ permalink raw reply
* Re: [PATCH v5 3/7] i2c: acpi: Factor out getting the IRQ from ACPI
From: Andy Shevchenko @ 2019-06-20 14:54 UTC (permalink / raw)
To: Charles Keepax
Cc: wsa, mika.westerberg, jarkko.nikula, linux-i2c, linux-acpi,
linux-kernel, benjamin.tissoires, jbroadus, patches
In-Reply-To: <20190620133420.4632-4-ckeepax@opensource.cirrus.com>
On Thu, Jun 20, 2019 at 02:34:16PM +0100, Charles Keepax wrote:
> In preparation for future refactoring factor out the fetch of the IRQ
> into its own helper function.
> +static int i2c_acpi_get_irq(struct acpi_device *adev)
> +{
> + struct list_head resource_list;
> + int irq = -ENOENT;
> + int ret;
> +
> + INIT_LIST_HEAD(&resource_list);
> +
> + ret = acpi_dev_get_resources(adev, &resource_list,
> + i2c_acpi_add_resource, &irq);
> + if (ret < 0)
> + return -EINVAL;
Can't we return ret value?
> +
> + acpi_dev_free_resource_list(&resource_list);
> +
> + return irq;
> +}
> + ret = i2c_acpi_get_irq(adev);
> + if (ret > 0)
> + info->irq = ret;
And on error we do not bail out. This changes the behaviour.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH 1/2] coresight: Set affinity to invalid for missing CPU phandle
From: Sai Prakash Ranjan @ 2019-06-20 14:54 UTC (permalink / raw)
To: Suzuki K Poulose, mathieu.poirier, leo.yan, alexander.shishkin,
andy.gross, david.brown, mark.rutland
Cc: rnayak, linux-arm-msm, linux-kernel, sibis, vivek.gautam,
linux-arm-kernel
In-Reply-To: <f7a3592b-7ed7-b011-9ae1-dc2ca0e49ae4@arm.com>
Hi Suzuki,
Thanks for the review.
On 6/20/2019 7:25 PM, Suzuki K Poulose wrote:
>
> Sai,
>
> Thanks for the patch. Please could you change the subject to :
>
> "coresight: Do not default to CPU0 for missing CPU phandle"
>
Sure.
> On 20/06/2019 14:45, Sai Prakash Ranjan wrote:
>> Affinity defaults to CPU0 in case of missing CPU phandle
>> and this leads to crashes in some cases because of such
>> wrong assumption. Fix this by returning -ENODEV in
>
> Thats not the right justification. Causing crashes is due to
> bad DT/firmware. I would be happy with something like :
>
> "Coresight platform support assumes that a missing \"cpu\" phandle
> defaults to CPU0. This could be problematic and unnecessarily binds
> components to CPU0, where they may not be. Let us make the DT binding
> rules a bit stricter by not defaulting to CPU0 for missing "cpu"
> affinity information."
>
> Also, you must
>
> 1) update the devicetree/bindings document to reflect the same.
> 2) update the drivers to take appropriate action on the missing CPU
> where they are expected (e.g, CPU-debug, etm*), to prevent
> breaking a bisect.
>
>
Sure will do it and repost.
>> coresight platform for such cases and then handle it
>> in the coresight drivers.
>>
>> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
>> ---
>> drivers/hwtracing/coresight/coresight-platform.c | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-platform.c
>> b/drivers/hwtracing/coresight/coresight-platform.c
>> index 3c5ceda8db24..b1ea60c210e1 100644
>> --- a/drivers/hwtracing/coresight/coresight-platform.c
>> +++ b/drivers/hwtracing/coresight/coresight-platform.c
>> @@ -160,15 +160,17 @@ static int of_coresight_get_cpu(struct device *dev)
>> if (!dev->of_node)
>> return 0;
>> +
>> dn = of_parse_phandle(dev->of_node, "cpu", 0);
>> - /* Affinity defaults to CPU0 */
>> +
>> + /* Affinity defaults to invalid if no cpu nodes are found*/
>
> The code is self explanatory here. You could drop the comment.
>
Sure.
>> if (!dn)
>> - return 0;
>> + return -ENODEV;
>> +
>> cpu = of_cpu_node_to_id(dn);
>> of_node_put(dn);
>> - /* Affinity to CPU0 if no cpu nodes are found */
>> - return (cpu < 0) ? 0 : cpu;
>> + return cpu;
>> }
>
> Suzuki
-Sai
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 1/2] coresight: Set affinity to invalid for missing CPU phandle
From: Sai Prakash Ranjan @ 2019-06-20 14:54 UTC (permalink / raw)
To: Suzuki K Poulose, mathieu.poirier, leo.yan, alexander.shishkin,
andy.gross, david.brown, mark.rutland
Cc: rnayak, vivek.gautam, sibis, linux-arm-kernel, linux-kernel,
linux-arm-msm
In-Reply-To: <f7a3592b-7ed7-b011-9ae1-dc2ca0e49ae4@arm.com>
Hi Suzuki,
Thanks for the review.
On 6/20/2019 7:25 PM, Suzuki K Poulose wrote:
>
> Sai,
>
> Thanks for the patch. Please could you change the subject to :
>
> "coresight: Do not default to CPU0 for missing CPU phandle"
>
Sure.
> On 20/06/2019 14:45, Sai Prakash Ranjan wrote:
>> Affinity defaults to CPU0 in case of missing CPU phandle
>> and this leads to crashes in some cases because of such
>> wrong assumption. Fix this by returning -ENODEV in
>
> Thats not the right justification. Causing crashes is due to
> bad DT/firmware. I would be happy with something like :
>
> "Coresight platform support assumes that a missing \"cpu\" phandle
> defaults to CPU0. This could be problematic and unnecessarily binds
> components to CPU0, where they may not be. Let us make the DT binding
> rules a bit stricter by not defaulting to CPU0 for missing "cpu"
> affinity information."
>
> Also, you must
>
> 1) update the devicetree/bindings document to reflect the same.
> 2) update the drivers to take appropriate action on the missing CPU
> where they are expected (e.g, CPU-debug, etm*), to prevent
> breaking a bisect.
>
>
Sure will do it and repost.
>> coresight platform for such cases and then handle it
>> in the coresight drivers.
>>
>> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
>> ---
>> drivers/hwtracing/coresight/coresight-platform.c | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-platform.c
>> b/drivers/hwtracing/coresight/coresight-platform.c
>> index 3c5ceda8db24..b1ea60c210e1 100644
>> --- a/drivers/hwtracing/coresight/coresight-platform.c
>> +++ b/drivers/hwtracing/coresight/coresight-platform.c
>> @@ -160,15 +160,17 @@ static int of_coresight_get_cpu(struct device *dev)
>> if (!dev->of_node)
>> return 0;
>> +
>> dn = of_parse_phandle(dev->of_node, "cpu", 0);
>> - /* Affinity defaults to CPU0 */
>> +
>> + /* Affinity defaults to invalid if no cpu nodes are found*/
>
> The code is self explanatory here. You could drop the comment.
>
Sure.
>> if (!dn)
>> - return 0;
>> + return -ENODEV;
>> +
>> cpu = of_cpu_node_to_id(dn);
>> of_node_put(dn);
>> - /* Affinity to CPU0 if no cpu nodes are found */
>> - return (cpu < 0) ? 0 : cpu;
>> + return cpu;
>> }
>
> Suzuki
-Sai
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply
* [PATCH] python: make 'python' install everything instead of just the interpretter
From: Ross Burton @ 2019-06-20 14:53 UTC (permalink / raw)
To: openembedded-core
Follow the python3 behaviour, and common sense, by making 'python' install
python-modules instead of python-core. This means a user installing python gets
all of Python, instead of just a fraction of the library.
[ YOCTO #13402 ]
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-devtools/python/python_2.7.16.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/python/python_2.7.16.bb b/meta/recipes-devtools/python/python_2.7.16.bb
index d70342fe3a6..5f387b8af11 100644
--- a/meta/recipes-devtools/python/python_2.7.16.bb
+++ b/meta/recipes-devtools/python/python_2.7.16.bb
@@ -162,7 +162,7 @@ py_package_preprocess () {
PACKAGES_remove = "${PN}"
# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
+RPROVIDES_${PN}-modules = "${PN}"
RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
RRECOMMENDS_${PN}-crypt = "openssl"
--
2.11.0
^ permalink raw reply related
* ✗ Fi.CI.IGT: failure for series starting with [CI,01/33] drm/i915: Convert intel_vgt_(de)balloon to uncore
From: Patchwork @ 2019-06-20 14:53 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: intel-gfx
In-Reply-To: <20190619213437.1190-1-tvrtko.ursulin@linux.intel.com>
== Series Details ==
Series: series starting with [CI,01/33] drm/i915: Convert intel_vgt_(de)balloon to uncore
URL : https://patchwork.freedesktop.org/series/62411/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6312_full -> Patchwork_13352_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_13352_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_13352_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_13352_full:
### IGT changes ###
#### Possible regressions ####
* igt@runner@aborted:
- shard-kbl: NOTRUN -> ([FAIL][1], [FAIL][2], [FAIL][3], [FAIL][4], [FAIL][5], [FAIL][6], [FAIL][7], [FAIL][8], [FAIL][9], [FAIL][10], [FAIL][11], [FAIL][12], [FAIL][13], [FAIL][14], [FAIL][15], [FAIL][16], [FAIL][17], [FAIL][18], [FAIL][19], [FAIL][20], [FAIL][21], [FAIL][22], [FAIL][23], [FAIL][24], [FAIL][25]) ([fdo#108622] / [fdo#108903] / [fdo#108904] / [fdo#108905])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl7/igt@runner@aborted.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl4/igt@runner@aborted.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl7/igt@runner@aborted.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl1/igt@runner@aborted.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl7/igt@runner@aborted.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl7/igt@runner@aborted.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl6/igt@runner@aborted.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl3/igt@runner@aborted.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl7/igt@runner@aborted.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl7/igt@runner@aborted.html
Known issues
------------
Here are the changes found in Patchwork_13352_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_eio@in-flight-1us:
- shard-apl: [PASS][26] -> [DMESG-WARN][27] ([fdo#110913 ]) +2 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-apl6/igt@gem_eio@in-flight-1us.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-apl3/igt@gem_eio@in-flight-1us.html
* igt@gem_exec_balancer@semaphore:
- shard-kbl: [PASS][28] -> [INCOMPLETE][29] ([fdo#103665]) +4 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-kbl4/igt@gem_exec_balancer@semaphore.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl6/igt@gem_exec_balancer@semaphore.html
* igt@gem_persistent_relocs@forked-thrashing:
- shard-kbl: [PASS][30] -> [DMESG-WARN][31] ([fdo#110913 ])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-kbl2/igt@gem_persistent_relocs@forked-thrashing.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl4/igt@gem_persistent_relocs@forked-thrashing.html
* igt@gem_tiled_swapping@non-threaded:
- shard-apl: [PASS][32] -> [DMESG-WARN][33] ([fdo#108686])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-apl8/igt@gem_tiled_swapping@non-threaded.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-apl2/igt@gem_tiled_swapping@non-threaded.html
* igt@i915_suspend@debugfs-reader:
- shard-apl: [PASS][34] -> [DMESG-WARN][35] ([fdo#108566]) +2 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-apl2/igt@i915_suspend@debugfs-reader.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-apl7/igt@i915_suspend@debugfs-reader.html
* igt@i915_suspend@sysfs-reader:
- shard-kbl: [PASS][36] -> [INCOMPLETE][37] ([fdo#103665] / [fdo#108767])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-kbl4/igt@i915_suspend@sysfs-reader.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl2/igt@i915_suspend@sysfs-reader.html
* igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
- shard-hsw: [PASS][38] -> [SKIP][39] ([fdo#109271]) +16 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-hsw7/igt@kms_flip@2x-flip-vs-absolute-wf_vblank.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-hsw1/igt@kms_flip@2x-flip-vs-absolute-wf_vblank.html
* igt@kms_flip@2x-plain-flip-ts-check:
- shard-glk: [PASS][40] -> [FAIL][41] ([fdo#100368])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-glk9/igt@kms_flip@2x-plain-flip-ts-check.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-glk9/igt@kms_flip@2x-plain-flip-ts-check.html
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- shard-skl: [PASS][42] -> [FAIL][43] ([fdo#103191])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-skl3/igt@kms_pipe_crc_basic@hang-read-crc-pipe-c.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-skl6/igt@kms_pipe_crc_basic@hang-read-crc-pipe-c.html
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][44] -> [FAIL][45] ([fdo#108145]) +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-skl3/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html
* igt@kms_setmode@basic:
- shard-apl: [PASS][46] -> [FAIL][47] ([fdo#99912])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-apl6/igt@kms_setmode@basic.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-apl3/igt@kms_setmode@basic.html
#### Possible fixes ####
* igt@gem_eio@wait-10ms:
- shard-apl: [DMESG-WARN][48] ([fdo#110913 ]) -> [PASS][49] +2 similar issues
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-apl8/igt@gem_eio@wait-10ms.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-apl6/igt@gem_eio@wait-10ms.html
* igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing:
- shard-kbl: [DMESG-WARN][50] ([fdo#110913 ]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-kbl7/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-kbl1/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html
* igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge:
- shard-snb: [SKIP][52] ([fdo#109271] / [fdo#109278]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-snb2/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-snb1/igt@kms_cursor_edge_walk@pipe-b-128x128-top-edge.html
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][54] ([fdo#104873]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-glk8/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-glk4/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-hsw: [SKIP][56] ([fdo#109271]) -> [PASS][57] +12 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-hsw1/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-hsw6/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [DMESG-WARN][58] ([fdo#108566]) -> [PASS][59] +1 similar issue
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-apl3/igt@kms_frontbuffer_tracking@fbc-suspend.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-apl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-skl: [INCOMPLETE][60] ([fdo#104108]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-skl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-skl5/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
* igt@kms_plane@plane-panning-bottom-right-pipe-b-planes:
- shard-snb: [SKIP][62] ([fdo#109271]) -> [PASS][63] +1 similar issue
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-snb2/igt@kms_plane@plane-panning-bottom-right-pipe-b-planes.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-snb1/igt@kms_plane@plane-panning-bottom-right-pipe-b-planes.html
#### Warnings ####
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-skl: [FAIL][64] ([fdo#108040]) -> [FAIL][65] ([fdo#103167])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-skl9/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-skl9/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-gtt:
- shard-skl: [FAIL][66] ([fdo#103167]) -> [FAIL][67] ([fdo#108040])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/shard-skl1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-gtt.html
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/shard-skl1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-gtt.html
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
[fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
[fdo#108903]: https://bugs.freedesktop.org/show_bug.cgi?id=108903
[fdo#108904]: https://bugs.freedesktop.org/show_bug.cgi?id=108904
[fdo#108905]: https://bugs.freedesktop.org/show_bug.cgi?id=108905
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#110913 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110913
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (10 -> 9)
------------------------------
Missing (1): shard-iclb
Build changes
-------------
* Linux: CI_DRM_6312 -> Patchwork_13352
CI_DRM_6312: 034e3ac6a2d180d188da927388b60c7e62c5655b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5061: c88ced79a7b71aec58f1d9c5c599ac2f431bcf7a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13352: aa3642bd46463f76eac35a81411ca2a5f3243435 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13352/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal
From: Jan Kara @ 2019-06-20 14:52 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Dave Chinner, Ira Weiny, Jan Kara, Dan Williams,
Theodore Ts'o, Jeff Layton, linux-xfs, Andrew Morton,
John Hubbard, Jérôme Glisse, linux-fsdevel,
linux-kernel, linux-nvdimm, linux-ext4, linux-mm, Jason Gunthorpe,
linux-rdma
In-Reply-To: <20190613152755.GI32656@bombadil.infradead.org>
On Thu 13-06-19 08:27:55, Matthew Wilcox wrote:
> On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote:
> > e.g. Process A has an exclusive layout lease on file F. It does an
> > IO to file F. The filesystem IO path checks that Process A owns the
> > lease on the file and so skips straight through layout breaking
> > because it owns the lease and is allowed to modify the layout. It
> > then takes the inode metadata locks to allocate new space and write
> > new data.
> >
> > Process B now tries to write to file F. The FS checks whether
> > Process B owns a layout lease on file F. It doesn't, so then it
> > tries to break the layout lease so the IO can proceed. The layout
> > breaking code sees that process A has an exclusive layout lease
> > granted, and so returns -ETXTBSY to process B - it is not allowed to
> > break the lease and so the IO fails with -ETXTBSY.
>
> This description doesn't match the behaviour that RDMA wants either.
> Even if Process A has a lease on the file, an IO from Process A which
> results in blocks being freed from the file is going to result in the
> RDMA device being able to write to blocks which are now freed (and
> potentially reallocated to another file).
I think you're partially wrong here. You are correct that the lease won't
stop process A from doing truncate on the file. *But* there are still page
pins in existence so truncate will block on waiting for these pins to go
away (after all this is a protection that guards all short-term page pin
users). So there is no problem with blocks being freed under the RDMA app.
Yes, the app will effectively deadlock and sysadmin has to kill it. IMO an
acceptable answer for doing something stupid and unsupportable...
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply
* [PATCH -next] inet: fix compilation warnings in fqdir_pre_exit()
From: Qian Cai @ 2019-06-20 14:52 UTC (permalink / raw)
To: davem; +Cc: edumazet, netdev, linux-kernel, Qian Cai
The linux-next commit "inet: fix various use-after-free in defrags
units" [1] introduced compilation warnings,
./include/net/inet_frag.h:117:1: warning: 'inline' is not at beginning
of declaration [-Wold-style-declaration]
static void inline fqdir_pre_exit(struct fqdir *fqdir)
^~~~~~
In file included from ./include/net/netns/ipv4.h:10,
from ./include/net/net_namespace.h:20,
from ./include/linux/netdevice.h:38,
from ./include/linux/icmpv6.h:13,
from ./include/linux/ipv6.h:86,
from ./include/net/ipv6.h:12,
from ./include/rdma/ib_verbs.h:51,
from ./include/linux/mlx5/device.h:37,
from ./include/linux/mlx5/driver.h:51,
from
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:37:
[1] https://lore.kernel.org/netdev/20190618180900.88939-3-edumazet@google.com/
Signed-off-by: Qian Cai <cai@lca.pw>
---
include/net/inet_frag.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 46574d996f1d..010f26b31c89 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -114,7 +114,7 @@ struct inet_frags {
int fqdir_init(struct fqdir **fqdirp, struct inet_frags *f, struct net *net);
-static void inline fqdir_pre_exit(struct fqdir *fqdir)
+static inline void fqdir_pre_exit(struct fqdir *fqdir)
{
fqdir->high_thresh = 0; /* prevent creation of new frags */
fqdir->dead = true;
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal
From: Jan Kara @ 2019-06-20 14:52 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Jason Gunthorpe, Theodore Ts'o,
linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jeff Layton, Dave Chinner,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-xfs-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
Jérôme Glisse, John Hubbard,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA, Jan Kara,
linux-ext4-u79uwXL29TY76Z2rM5mHXA, Andrew Morton
In-Reply-To: <20190613152755.GI32656-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
On Thu 13-06-19 08:27:55, Matthew Wilcox wrote:
> On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote:
> > e.g. Process A has an exclusive layout lease on file F. It does an
> > IO to file F. The filesystem IO path checks that Process A owns the
> > lease on the file and so skips straight through layout breaking
> > because it owns the lease and is allowed to modify the layout. It
> > then takes the inode metadata locks to allocate new space and write
> > new data.
> >
> > Process B now tries to write to file F. The FS checks whether
> > Process B owns a layout lease on file F. It doesn't, so then it
> > tries to break the layout lease so the IO can proceed. The layout
> > breaking code sees that process A has an exclusive layout lease
> > granted, and so returns -ETXTBSY to process B - it is not allowed to
> > break the lease and so the IO fails with -ETXTBSY.
>
> This description doesn't match the behaviour that RDMA wants either.
> Even if Process A has a lease on the file, an IO from Process A which
> results in blocks being freed from the file is going to result in the
> RDMA device being able to write to blocks which are now freed (and
> potentially reallocated to another file).
I think you're partially wrong here. You are correct that the lease won't
stop process A from doing truncate on the file. *But* there are still page
pins in existence so truncate will block on waiting for these pins to go
away (after all this is a protection that guards all short-term page pin
users). So there is no problem with blocks being freed under the RDMA app.
Yes, the app will effectively deadlock and sysadmin has to kill it. IMO an
acceptable answer for doing something stupid and unsupportable...
Honza
--
Jan Kara <jack-IBi9RG/b67k@public.gmane.org>
SUSE Labs, CR
^ permalink raw reply
* Re: [RFC PATCH 1/4] dt-bindings: display: Convert common panel bindings to DT schema
From: Rob Herring @ 2019-06-20 14:52 UTC (permalink / raw)
To: Thierry Reding
Cc: dri-devel, devicetree, linux-kernel@vger.kernel.org, Sam Ravnborg,
Maxime Ripard, Laurent Pinchart
In-Reply-To: <20190620090122.GB26689@ulmo>
On Thu, Jun 20, 2019 at 3:01 AM Thierry Reding <thierry.reding@gmail.com> wrote:
>
> On Wed, Jun 19, 2019 at 03:51:53PM -0600, Rob Herring wrote:
> > Convert the common panel bindings to DT schema consolidating scattered
> > definitions to a single schema file.
> >
> > The 'simple-panel' binding just a collection of properties and not a
> > complete binding itself. All of the 'simple-panel' properties are
> > covered by the panel-common.txt binding with the exception of the
> > 'no-hpd' property, so add that to the schema.
> >
> > As there are lots of references to simple-panel.txt, just keep the file
> > with a reference to panel-common.yaml for now until all the bindings are
> > converted.
> >
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > Note there's still some references to panel-common.txt that I need to
> > update or just go ahead and convert to schema.
> >
> > .../bindings/display/panel/panel-common.txt | 101 -------------
> > .../bindings/display/panel/panel-common.yaml | 143 ++++++++++++++++++
> > .../bindings/display/panel/panel.txt | 4 -
> > .../bindings/display/panel/simple-panel.txt | 29 +---
> > 4 files changed, 144 insertions(+), 133 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.txt
> > create mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.yaml
>
> I know it was this way before, but perhaps remove the redundant panel-
> prefix while at it?
Sure.
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > new file mode 100644
> > index 000000000000..6fe87254edad
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > @@ -0,0 +1,143 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/panel-common.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Common Properties for Display Panels
> > +
> > +maintainers:
> > + - Thierry Reding <thierry.reding@gmail.com>
> > + - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > +
> > +description: |
> > + This document defines device tree properties common to several classes of
> > + display panels. It doesn't constitue a device tree binding specification by
> > + itself but is meant to be referenced by device tree bindings.
> > +
> > + When referenced from panel device tree bindings the properties defined in this
> > + document are defined as follows. The panel device tree bindings are
> > + responsible for defining whether each property is required or optional.
> > +
> > +
>
> Are the two blank lines here on purpose?
No.
> The original document had two
> blank lines here, but that was mostly for readability I would guess. The
> YAML format doesn't really need additional formatting for readability,
> so perhaps just remove the extra blank line?
>
> > +properties:
> > + # Descriptive Properties
> > + width-mm:
> > + description: The width-mm and height-mm specify the width and height of the
> > + physical area where images are displayed. These properties are expressed
> > + in millimeters and rounded to the closest unit.
> > +
> > + height-mm:
> > + description: The width-mm and height-mm specify the width and height of the
> > + physical area where images are displayed. These properties are expressed
> > + in millimeters and rounded to the closest unit.
>
> I suppose there's no way in YAML to share the description between both
> the width-mm and height-mm properties? It's a little unfortunate that we
> have to copy, but if there's no better way, guess we'll have to live
> with it.
I could make it a comment instead, but then we loose being able to
parse it. I should probably just reword them to be separate:
"Specifies the height of the physical area where images are displayed.
The property is expressed in millimeters and rounded to the closest
unit."
Also, just realized I need to make these 2 dependencies on either
other (i.e. not valid to only have one).
> > + label:
> > + description: |
> > + The label property specifies a symbolic name for the panel as a
> > + string suitable for use by humans. It typically contains a name inscribed
> > + on the system (e.g. as an affixed label) or specified in the system's
> > + documentation (e.g. in the user's manual).
> > +
> > + If no such name exists, and unless the property is mandatory according to
> > + device tree bindings, it shall rather be omitted than constructed of
> > + non-descriptive information. For instance an LCD panel in a system that
> > + contains a single panel shall not be labelled "LCD" if that name is not
> > + inscribed on the system or used in a descriptive fashion in system
> > + documentation.
> > +
> > + rotation:
> > + description:
> > + Display rotation in degrees counter clockwise (0,90,180,270)
> > + allOf:
> > + - $ref: /schemas/types.yaml#/definitions/uint32
> > + - enum: [ 0, 90, 180, 270 ]
> > +
> > + # Display Timings
> > + panel-timing:
>
> Am I the only one bugged by the redundancy in this property name? What
> else is the timing going to express if not the timing of the panel that
> it's part of. "timing" really would be enough. Anyway, not much we can
> do about it now.
I'm just happy we have a defined name.
Rob
^ permalink raw reply
* Re: [RFC PATCH 1/4] dt-bindings: display: Convert common panel bindings to DT schema
From: Rob Herring @ 2019-06-20 14:52 UTC (permalink / raw)
To: Thierry Reding
Cc: devicetree, Maxime Ripard, linux-kernel@vger.kernel.org,
dri-devel, Laurent Pinchart, Sam Ravnborg
In-Reply-To: <20190620090122.GB26689@ulmo>
On Thu, Jun 20, 2019 at 3:01 AM Thierry Reding <thierry.reding@gmail.com> wrote:
>
> On Wed, Jun 19, 2019 at 03:51:53PM -0600, Rob Herring wrote:
> > Convert the common panel bindings to DT schema consolidating scattered
> > definitions to a single schema file.
> >
> > The 'simple-panel' binding just a collection of properties and not a
> > complete binding itself. All of the 'simple-panel' properties are
> > covered by the panel-common.txt binding with the exception of the
> > 'no-hpd' property, so add that to the schema.
> >
> > As there are lots of references to simple-panel.txt, just keep the file
> > with a reference to panel-common.yaml for now until all the bindings are
> > converted.
> >
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > Note there's still some references to panel-common.txt that I need to
> > update or just go ahead and convert to schema.
> >
> > .../bindings/display/panel/panel-common.txt | 101 -------------
> > .../bindings/display/panel/panel-common.yaml | 143 ++++++++++++++++++
> > .../bindings/display/panel/panel.txt | 4 -
> > .../bindings/display/panel/simple-panel.txt | 29 +---
> > 4 files changed, 144 insertions(+), 133 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.txt
> > create mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.yaml
>
> I know it was this way before, but perhaps remove the redundant panel-
> prefix while at it?
Sure.
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > new file mode 100644
> > index 000000000000..6fe87254edad
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > @@ -0,0 +1,143 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/panel-common.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Common Properties for Display Panels
> > +
> > +maintainers:
> > + - Thierry Reding <thierry.reding@gmail.com>
> > + - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > +
> > +description: |
> > + This document defines device tree properties common to several classes of
> > + display panels. It doesn't constitue a device tree binding specification by
> > + itself but is meant to be referenced by device tree bindings.
> > +
> > + When referenced from panel device tree bindings the properties defined in this
> > + document are defined as follows. The panel device tree bindings are
> > + responsible for defining whether each property is required or optional.
> > +
> > +
>
> Are the two blank lines here on purpose?
No.
> The original document had two
> blank lines here, but that was mostly for readability I would guess. The
> YAML format doesn't really need additional formatting for readability,
> so perhaps just remove the extra blank line?
>
> > +properties:
> > + # Descriptive Properties
> > + width-mm:
> > + description: The width-mm and height-mm specify the width and height of the
> > + physical area where images are displayed. These properties are expressed
> > + in millimeters and rounded to the closest unit.
> > +
> > + height-mm:
> > + description: The width-mm and height-mm specify the width and height of the
> > + physical area where images are displayed. These properties are expressed
> > + in millimeters and rounded to the closest unit.
>
> I suppose there's no way in YAML to share the description between both
> the width-mm and height-mm properties? It's a little unfortunate that we
> have to copy, but if there's no better way, guess we'll have to live
> with it.
I could make it a comment instead, but then we loose being able to
parse it. I should probably just reword them to be separate:
"Specifies the height of the physical area where images are displayed.
The property is expressed in millimeters and rounded to the closest
unit."
Also, just realized I need to make these 2 dependencies on either
other (i.e. not valid to only have one).
> > + label:
> > + description: |
> > + The label property specifies a symbolic name for the panel as a
> > + string suitable for use by humans. It typically contains a name inscribed
> > + on the system (e.g. as an affixed label) or specified in the system's
> > + documentation (e.g. in the user's manual).
> > +
> > + If no such name exists, and unless the property is mandatory according to
> > + device tree bindings, it shall rather be omitted than constructed of
> > + non-descriptive information. For instance an LCD panel in a system that
> > + contains a single panel shall not be labelled "LCD" if that name is not
> > + inscribed on the system or used in a descriptive fashion in system
> > + documentation.
> > +
> > + rotation:
> > + description:
> > + Display rotation in degrees counter clockwise (0,90,180,270)
> > + allOf:
> > + - $ref: /schemas/types.yaml#/definitions/uint32
> > + - enum: [ 0, 90, 180, 270 ]
> > +
> > + # Display Timings
> > + panel-timing:
>
> Am I the only one bugged by the redundancy in this property name? What
> else is the timing going to express if not the timing of the panel that
> it's part of. "timing" really would be enough. Anyway, not much we can
> do about it now.
I'm just happy we have a defined name.
Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Re: [Qemu-trivial] [Qemu-devel] [PATCH v3 05/10] hw/riscv: Replace global smp variables with machine smp properties
From: Eduardo Habkost @ 2019-06-20 14:52 UTC (permalink / raw)
To: Like Xu
Cc: qemu-trivial, Peter Maydell, qemu-devel, Dr . David Alan Gilbert,
Alistair Francis, Igor Mammedov
In-Reply-To: <20190518205428.90532-6-like.xu@linux.intel.com>
On Sun, May 19, 2019 at 04:54:23AM +0800, Like Xu wrote:
> The global smp variables in riscv are replaced with smp machine properties.
>
> A local variable of the same name would be introduced in the declaration
> phase if it's used widely in the context OR replace it on the spot if it's
> only used once. No semantic changes.
>
> Signed-off-by: Like Xu <like.xu@linux.intel.com>
> ---
> hw/riscv/sifive_e.c | 6 ++++--
> hw/riscv/sifive_plic.c | 3 +++
> hw/riscv/sifive_u.c | 6 ++++--
> hw/riscv/spike.c | 2 ++
> hw/riscv/virt.c | 1 +
> 5 files changed, 14 insertions(+), 4 deletions(-)
This was incomplete, I had to apply the following fixup.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/riscv/spike.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 9e95f2c13c..d91d49dcae 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -172,6 +172,7 @@ static void spike_board_init(MachineState *machine)
MemoryRegion *main_mem = g_new(MemoryRegion, 1);
MemoryRegion *mask_rom = g_new(MemoryRegion, 1);
int i;
+ unsigned int smp_cpus = machine->smp.cpus;
/* Initialize SOC */
object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
--
2.18.0.rc1.1.g3f1ff2140
^ permalink raw reply related
* [PATCH -next] Staging: kpc2000: kpc_dma: Fix platform_no_drv_owner.cocci warnings
From: YueHaibing @ 2019-06-20 14:59 UTC (permalink / raw)
To: Greg Kroah-Hartman, Matt.Sickler, bnvandana, valerio.click,
manwatkar, simon
Cc: YueHaibing, devel, linux-kernel, kernel-janitors
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
index 08af269adabe..a05ae6d40db9 100644
--- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
+++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
@@ -197,7 +197,6 @@ static struct platform_driver kpc_dma_plat_driver_i = {
.remove = kpc_dma_remove,
.driver = {
.name = KP_DRIVER_NAME_DMA_CONTROLLER,
- .owner = THIS_MODULE,
},
};
^ permalink raw reply related
* Re: [PATCH v5 2/7] i2c: acpi: Use available IRQ helper functions
From: Andy Shevchenko @ 2019-06-20 14:52 UTC (permalink / raw)
To: Charles Keepax
Cc: wsa, mika.westerberg, jarkko.nikula, linux-i2c, linux-acpi,
linux-kernel, benjamin.tissoires, jbroadus, patches
In-Reply-To: <20190620133420.4632-3-ckeepax@opensource.cirrus.com>
On Thu, Jun 20, 2019 at 02:34:15PM +0100, Charles Keepax wrote:
> Use the available IRQ helper functions, most of the functions have
> additional helpful side affects like configuring the trigger type of the
> IRQ.
>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Some last minute observations / questions.
> + struct resource r;
> +
> + if (*irq <= 0 && acpi_dev_resource_interrupt(ares, 0, &r))
> + *irq = i2c_dev_irq_from_resources(&r, 1);
> +
> + return 1; /* No need to add resource to the list */
If we don't add it to the list, do we still need to manage the empty
resource_list below?
> /* Then fill IRQ number if any */
> INIT_LIST_HEAD(&resource_list);
> - ret = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
> + ret = acpi_dev_get_resources(adev, &resource_list,
> + i2c_acpi_add_resource, &irq);
> if (ret < 0)
> return -EINVAL;
>
> - resource_list_for_each_entry(entry, &resource_list) {
> - if (resource_type(entry->res) == IORESOURCE_IRQ) {
> - info->irq = entry->res->start;
> - break;
> - }
> - }
> + if (irq > 0)
> + info->irq = irq;
Hmm... can't we just assign it directly inside the _add_resource() call back as
original code did?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH] slub: Don't panic for memcg kmem cache creation failure
From: Dave Hansen @ 2019-06-20 14:51 UTC (permalink / raw)
To: Shakeel Butt, Michal Hocko
Cc: Johannes Weiner, Christoph Lameter, Andrew Morton, Roman Gushchin,
Pekka Enberg, David Rientjes, Joonsoo Kim, Cgroups, Linux MM,
LKML
In-Reply-To: <CALvZod4Fd5X91CzDLaVAvspQL-zoD7+9OGTiOro-hiMda=DqBA@mail.gmail.com>
On 6/20/19 7:44 AM, Shakeel Butt wrote:
>> I am wondering whether SLAB_PANIC makes sense in general though. Why is
>> it any different from any other essential early allocations? We tend to
>> not care about allocation failures for those on bases that the system
>> must be in a broken state to fail that early already. Do you think it is
>> time to remove SLAB_PANIC altogether?
>>
> That would need some investigation into the history of SLAB_PANIC. I
> will look into it.
I think it still makes sense for things like the vma, filp, dentry
caches. If we don't
have those, we can't even execve("/sbin/init") so we shouldn't even bother
continuing to boot.
Maybe we should turn off SLAB_PANIC behavior after boot. We don't want
a silly driver or filesystem module that's creating slabs to be causing
panic()s.
^ permalink raw reply
* Re: [PATCH v1 5/5] coresight: etm4x: save/restore state across CPU low power states
From: Mathieu Poirier @ 2019-06-20 14:49 UTC (permalink / raw)
To: Andrew Murray; +Cc: Alexander Shishkin, linux-arm-kernel, Suzuki K Poulose
In-Reply-To: <20190620110721.GD20984@e119886-lin.cambridge.arm.com>
Hi Andrew,
On Thu, 20 Jun 2019 at 05:07, Andrew Murray <andrew.murray@arm.com> wrote:
>
> On Tue, Jun 18, 2019 at 04:55:49PM -0600, Mathieu Poirier wrote:
> > On Tue, Jun 18, 2019 at 01:54:33PM +0100, Andrew Murray wrote:
> > > Some hardware will ignore bit TRCPDCR.PU which is used to signal
> > > to hardware that power should not be removed from the trace unit.
> > > Let's mitigate against this by saving and restoring the trace
> > > unit state when the CPU enters low power states.
> > >
> > > To provide the benefit to both self-hosted and external debuggers
> > > we save/restore the entire state which includes etmv4_config data
> > > and dynamic data such as inflight counter values, sequencer
> > > states, etc.
> > >
> > > To reduce CPU suspend/resume latency the state is only saved or
> > > restored if coresight is in use as determined by the claimset
> > > registers.
> > >
> > > To aid debug of CPU suspend/resume a disable_pm_save parameter
> > > is provided to disable this feature.
> > >
> > > Signed-off-by: Andrew Murray <andrew.murray@arm.com>
> > > ---
> > > drivers/hwtracing/coresight/coresight-etm4x.c | 245 ++++++++++++++++++
> > > drivers/hwtracing/coresight/coresight-etm4x.h | 66 ++++-
> > > drivers/hwtracing/coresight/coresight.c | 2 +-
> > > include/linux/coresight.h | 7 +
> > > 4 files changed, 318 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
> > > index bda90d4cd62b..d27c5e0d9aec 100644
> > > --- a/drivers/hwtracing/coresight/coresight-etm4x.c
> > > +++ b/drivers/hwtracing/coresight/coresight-etm4x.c
> > > @@ -18,6 +18,7 @@
> > > #include <linux/stat.h>
> > > #include <linux/clk.h>
> > > #include <linux/cpu.h>
> > > +#include <linux/cpu_pm.h>
> > > #include <linux/coresight.h>
> > > #include <linux/coresight-pmu.h>
> > > #include <linux/pm_wakeup.h>
> > > @@ -36,6 +37,9 @@
> > > static int boot_enable;
> > > module_param_named(boot_enable, boot_enable, int, 0444);
> > >
> > > +static int disable_pm_save;
> > > +module_param_named(disable_pm_save, disable_pm_save, int, 0444);
> > > +
> > > /* The number of ETMv4 currently registered */
> > > static int etm4_count;
> > > static struct etmv4_drvdata *etmdrvdata[NR_CPUS];
> > > @@ -53,6 +57,14 @@ static void etm4_os_unlock(struct etmv4_drvdata *drvdata)
> > > isb();
> > > }
> > >
> > > +static void etm4_os_lock(struct etmv4_drvdata *drvdata)
> > > +{
> > > + /* Writing 0x1 to TRCOSLAR unlocks the trace registers */
> > > + writel_relaxed(0x1, drvdata->base + TRCOSLAR);
> > > + drvdata->os_unlock = false;
> > > + isb();
> > > +}
> > > +
> > > static bool etm4_arch_supported(u8 arch)
> > > {
> > > /* Mask out the minor version number */
> > > @@ -1076,6 +1088,235 @@ static void etm4_init_trace_id(struct etmv4_drvdata *drvdata)
> > > drvdata->trcid = coresight_get_trace_id(drvdata->cpu);
> > > }
> > >
> > > +#ifdef CONFIG_CPU_PM
> > > +static void etm4_cpu_save(struct etmv4_drvdata *drvdata)
> > > +{
> > > + int i;
> > > + u32 control;
> > > + struct etmv4_save_state *state;
> >
> > Before going any further I would make sure the CPU this is running on it equal
> > to drvdata->cpu. Otherwise something very wrong happened.
> >
>
> Sure I'll add that.
>
> > > +
> > > + /* As recommended by 3.4.1 of ARM IHI 0064D */
> > > + dsb(sy);
> > > + isb();
> > > +
> > > + CS_UNLOCK(drvdata->base);
> > > + etm4_os_lock(drvdata);
> >
> > Please add a comment to explain that you are using the OS lock to disable
> > external debugger access to the trace registers while the unit is powered down.
> > Otherwise people will get confused and will submit patches that changes
> > etm4_os_lock() to etm4_os_unlock().
>
> Yes sure, it deserves a comment.
>
> >
> > > +
> > > + /* wait for TRCSTATR.PMSTABLE to go up */
> > > + if (coresight_timeout(drvdata->base, TRCSTATR,
> > > + TRCSTATR_PMSTABLE_BIT, 1))
> > > + dev_err(drvdata->dev,
> > > + "timeout while waiting for Idle Trace Status\n");
> >
> > The above comment is not accurate since we are waiting for the PMSTABLE bit.
>
> I'll change that.
>
> >
> > > +
> > > + state = &drvdata->save_state;
> > > +
> > > + state->trcprgctlr = readl(drvdata->base + TRCPRGCTLR);
> > > + state->trcprocselr = readl(drvdata->base + TRCPROCSELR);
> > > + state->trcconfigr = readl(drvdata->base + TRCCONFIGR);
> > > + state->trcauxctlr = readl(drvdata->base + TRCAUXCTLR);
> > > + state->trceventctl0r = readl(drvdata->base + TRCEVENTCTL0R);
> > > + state->trceventctl1r = readl(drvdata->base + TRCEVENTCTL1R);
> > > + state->trcstallctlr = readl(drvdata->base + TRCSTALLCTLR);
> > > + state->trctsctlr = readl(drvdata->base + TRCTSCTLR);
> > > + state->trcsyncpr = readl(drvdata->base + TRCSYNCPR);
> > > + state->trcccctlr = readl(drvdata->base + TRCCCCTLR);
> > > + state->trcbbctlr = readl(drvdata->base + TRCBBCTLR);
> > > + state->trctraceidr = readl(drvdata->base + TRCTRACEIDR);
> > > + state->trcqctlr = readl(drvdata->base + TRCQCTLR);
> > > +
> > > + state->trcvictlr = readl(drvdata->base + TRCVICTLR);
> > > + state->trcviiectlr = readl(drvdata->base + TRCVIIECTLR);
> > > + state->trcvissctlr = readl(drvdata->base + TRCVISSCTLR);
> > > + state->trcvipcssctlr = readl(drvdata->base + TRCVIPCSSCTLR);
> > > + state->trcvdctlr = readl(drvdata->base + TRCVDCTLR);
> > > + state->trcvdsacctlr = readl(drvdata->base + TRCVDSACCTLR);
> > > + state->trcvdarcctlr = readl(drvdata->base + TRCVDARCCTLR);
> > > +
> > > + for (i = 0; i < drvdata->nrseqstate; i++)
> > > + state->trcseqevr[i] = readl(drvdata->base + TRCSEQEVRn(i));
> > > +
> > > + state->trcseqrstevr = readl(drvdata->base + TRCSEQRSTEVR);
> > > + state->trcseqstr = readl(drvdata->base + TRCSEQSTR);
> > > + state->trcextinselr = readl(drvdata->base + TRCEXTINSELR);
> > > +
> > > + for (i = 0; i < drvdata->nr_cntr; i++) {
> > > + state->trccntrldvr[i] = readl(drvdata->base + TRCCNTRLDVRn(i));
> > > + state->trccntctlr[i] = readl(drvdata->base + TRCCNTCTLRn(i));
> > > + state->trccntvr[i] = readl(drvdata->base + TRCCNTVRn(i));
> > > + }
> > > +
> > > + for (i = 0; i < drvdata->nr_resource * 2; i++)
> > > + state->trcrsctlr[i] = readl(drvdata->base + TRCRSCTLRn(i));
> > > +
> > > + for (i = 0; i < drvdata->nr_ss_cmp; i++) {
> > > + state->trcssccr[i] = readl(drvdata->base + TRCSSCCRn(i));
> > > + state->trcsscsr[i] = readl(drvdata->base + TRCSSCSRn(i));
> > > + state->trcsspcicr[i] = readl(drvdata->base + TRCSSPCICRn(i));
> > > + }
> > > +
> > > + for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) {
> > > + state->trcacvr[i] = readl(drvdata->base + TRCACVRn(i));
> > > + state->trcacatr[i] = readl(drvdata->base + TRCACATRn(i));
> > > + }
> > > +
> > > + for (i = 0; i < drvdata->numcidc; i++)
> > > + state->trccidcvr[i] = readl(drvdata->base + TRCCIDCVRn(i));
> > > +
> > > + for (i = 0; i < drvdata->numvmidc; i++)
> > > + state->trcvmidcvr[i] = readl(drvdata->base + TRCVMIDCVRn(i));
> > > +
> > > + state->trccidcctlr0 = readl(drvdata->base + TRCCIDCCTLR0);
> > > + state->trccidcctlr1 = readl(drvdata->base + TRCCIDCCTLR1);
> > > +
> > > + state->trcvmidcctlr0 = readl(drvdata->base + TRCVMIDCCTLR0);
> > > + state->trcvmidcctlr0 = readl(drvdata->base + TRCVMIDCCTLR1);
> > > +
> > > + state->trcclaimset = readl(drvdata->base + TRCCLAIMCLR);
> > > +
> > > + /* wait for TRCSTATR.IDLE to go up */
> > > + if (coresight_timeout(drvdata->base, TRCSTATR, TRCSTATR_IDLE_BIT, 1))
> > > + dev_err(drvdata->dev,
> > > + "timeout while waiting for Idle Trace Status\n");
> > > +
> > > + /* power can be removed from the trace unit now */
> > > + control = readl_relaxed(drvdata->base + TRCPDCR);
> > > + control &= ~TRCPDCR_PU;
> > > + writel_relaxed(control, drvdata->base + TRCPDCR);
> > > +
> > > + CS_LOCK(drvdata->base);
> > > +}
> > > +
> > > +static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
> > > +{
> > > + int i;
> > > + struct etmv4_save_state *state;
> > > +
> > > + state = &drvdata->save_state;
> >
> > Same comment as above about the running CPU.
> >
> > > +
> > > + CS_UNLOCK(drvdata->base);
> > > +
> > > + writel_relaxed(state->trcclaimset, drvdata->base + TRCCLAIMSET);
> > > +
> > > + writel_relaxed(state->trcprgctlr, drvdata->base + TRCPRGCTLR);
> > > + writel_relaxed(state->trcprocselr, drvdata->base + TRCPROCSELR);
> > > + writel_relaxed(state->trcconfigr, drvdata->base + TRCCONFIGR);
> > > + writel_relaxed(state->trcauxctlr, drvdata->base + TRCAUXCTLR);
> > > + writel_relaxed(state->trceventctl0r, drvdata->base + TRCEVENTCTL0R);
> > > + writel_relaxed(state->trceventctl1r, drvdata->base + TRCEVENTCTL1R);
> > > + writel_relaxed(state->trcstallctlr, drvdata->base + TRCSTALLCTLR);
> > > + writel_relaxed(state->trctsctlr, drvdata->base + TRCTSCTLR);
> > > + writel_relaxed(state->trcsyncpr, drvdata->base + TRCSYNCPR);
> > > + writel_relaxed(state->trcccctlr, drvdata->base + TRCCCCTLR);
> > > + writel_relaxed(state->trcbbctlr, drvdata->base + TRCBBCTLR);
> > > + writel_relaxed(state->trctraceidr, drvdata->base + TRCTRACEIDR);
> > > + writel_relaxed(state->trcqctlr, drvdata->base + TRCQCTLR);
> > > +
> > > + writel_relaxed(state->trcvictlr, drvdata->base + TRCVICTLR);
> > > + writel_relaxed(state->trcviiectlr, drvdata->base + TRCVIIECTLR);
> > > + writel_relaxed(state->trcvissctlr, drvdata->base + TRCVISSCTLR);
> > > + writel_relaxed(state->trcvipcssctlr, drvdata->base + TRCVIPCSSCTLR);
> > > + writel_relaxed(state->trcvdctlr, drvdata->base + TRCVDCTLR);
> > > + writel_relaxed(state->trcvdsacctlr, drvdata->base + TRCVDSACCTLR);
> > > + writel_relaxed(state->trcvdarcctlr, drvdata->base + TRCVDARCCTLR);
> > > +
> > > + for (i = 0; i < drvdata->nrseqstate; i++)
> > > + writel_relaxed(state->trcseqevr[i],
> > > + drvdata->base + TRCSEQEVRn(i));
> > > +
> > > + writel_relaxed(state->trcseqrstevr, drvdata->base + TRCSEQRSTEVR);
> > > + writel_relaxed(state->trcseqstr, drvdata->base + TRCSEQSTR);
> > > + writel_relaxed(state->trcextinselr, drvdata->base + TRCEXTINSELR);
> > > +
> > > + for (i = 0; i < drvdata->nr_cntr; i++) {
> > > + writel_relaxed(state->trccntrldvr[i],
> > > + drvdata->base + TRCCNTRLDVRn(i));
> > > + writel_relaxed(state->trccntctlr[i],
> > > + drvdata->base + TRCCNTCTLRn(i));
> > > + writel_relaxed(state->trccntvr[i],
> > > + drvdata->base + TRCCNTVRn(i));
> > > + }
> > > +
> > > + for (i = 0; i < drvdata->nr_resource * 2; i++)
> > > + writel_relaxed(state->trcrsctlr[i],
> > > + drvdata->base + TRCRSCTLRn(i));
> > > +
> > > + for (i = 0; i < drvdata->nr_ss_cmp; i++) {
> > > + writel_relaxed(state->trcssccr[i],
> > > + drvdata->base + TRCSSCCRn(i));
> > > + writel_relaxed(state->trcsscsr[i],
> > > + drvdata->base + TRCSSCSRn(i));
> > > + writel_relaxed(state->trcsspcicr[i],
> > > + drvdata->base + TRCSSPCICRn(i));
> > > + }
> > > +
> > > + for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) {
> > > + writel_relaxed(state->trcacvr[i],
> > > + drvdata->base + TRCACVRn(i));
> > > + writel_relaxed(state->trcacatr[i],
> > > + drvdata->base + TRCACATRn(i));
> > > + }
> > > +
> > > + for (i = 0; i < drvdata->numcidc; i++)
> > > + writel_relaxed(state->trccidcvr[i],
> > > + drvdata->base + TRCCIDCVRn(i));
> > > +
> > > + for (i = 0; i < drvdata->numvmidc; i++)
> > > + writel_relaxed(state->trcvmidcvr[i],
> > > + drvdata->base + TRCVMIDCVRn(i));
> > > +
> > > + writel_relaxed(state->trccidcctlr0, drvdata->base + TRCCIDCCTLR0);
> > > + writel_relaxed(state->trccidcctlr1, drvdata->base + TRCCIDCCTLR1);
> > > +
> > > + writel_relaxed(state->trcvmidcctlr0, drvdata->base + TRCVMIDCCTLR0);
> > > + writel_relaxed(state->trcvmidcctlr0, drvdata->base + TRCVMIDCCTLR1);
> > > +
> > > + writel_relaxed(state->trcclaimset, drvdata->base + TRCCLAIMSET);
> > > +
> > > + /* As recommended by 4.3.7 of ARM IHI 0064D */
> > > + dsb(sy);
> > > + isb();
> > > +
> > > + etm4_os_unlock(drvdata);
> >
> > Same comment as above.
> >
> > > + CS_LOCK(drvdata->base);
> > > +}
> > > +
> > > +static int etm4_cpu_pm_notify(struct notifier_block *nb, unsigned long cmd,
> > > + void *v)
> > > +{
> > > + struct etmv4_drvdata *drvdata = container_of(nb,
> > > + struct etmv4_drvdata, nb);
> > > +
> > > + if (disable_pm_save)
> > > + return NOTIFY_OK;
> > > +
> > > + switch (cmd) {
> > > + case CPU_PM_ENTER:
> > > + /* save the state if coresight is in use */
> > > + if (coresight_is_claimed_any(drvdata->base))
> >
> > claimed_any()? At this point if coresight_is_claimed_self_hosted() == false an
> > external agent is competing with the framework and we should abdicate.
>
> If we only support save/restore for self-hosted, then we don't actually need
> to store as much state as much of it is in the etmv4_config structure.
>
> My thinking here was that if an external agent is being used and we power down
> then we'd also potentially suffer the same issue where state is lost. So
> saving/restoring may be helpful for external agents as well (or at least
> wouldn't do harm)...
There is no point in trying to cover cases where external agents are
involved - we will always get it wrong. And the notifiers shouldn't
return immediately if a tracer is not being used.
>
> However I don't know if this is a real issue.
>
> >
> > > + etm4_cpu_save(drvdata);
> > > + break;
> > > + case CPU_PM_EXIT:
> > > + case CPU_PM_ENTER_FAILED:
> > > + /* trcclaimset is set when there is state to restore */
> > > + if (drvdata->save_state.trcclaimset)
> > > + etm4_cpu_restore(drvdata);
> > > + break;
> > > + default:
> > > + return NOTIFY_DONE;
> > > + }
> > > +
> > > + return NOTIFY_OK;
> > > +}
> > > +
> > > +static int etm4_cpu_pm_register(struct etmv4_drvdata *drvdata)
> > > +{
> > > + drvdata->nb.notifier_call = etm4_cpu_pm_notify;
> > > + return cpu_pm_register_notifier(&drvdata->nb);
> > > +}
> > > +#else
> > > +static int etm4_cpu_pm_register(struct etmv4_drvdata *drvdata) { return 0; }
> > > +#endif
> > > +
> > > static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
> > > {
> > > int ret;
> > > @@ -1141,6 +1382,10 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
> > > etm4_init_trace_id(drvdata);
> > > etm4_set_default(&drvdata->config);
> > >
> > > + ret = etm4_cpu_pm_register(drvdata);
> > > + if (ret)
> > > + goto err_arch_supported;
> > > +
> > > desc.type = CORESIGHT_DEV_TYPE_SOURCE;
> > > desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_PROC;
> > > desc.ops = &etm4_cs_ops;
> > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
> > > index 52786e9d8926..f4cff447c8a1 100644
> > > --- a/drivers/hwtracing/coresight/coresight-etm4x.h
> > > +++ b/drivers/hwtracing/coresight/coresight-etm4x.h
> > > @@ -174,7 +174,8 @@
> > > ETM_MODE_EXCL_KERN | \
> > > ETM_MODE_EXCL_USER)
> > >
> > > -#define TRCSTATR_IDLE_BIT 0
> > > +#define TRCSTATR_IDLE_BIT BIT(0)
> > > +#define TRCSTATR_PMSTABLE_BIT BIT(1)
> > > #define ETM_DEFAULT_ADDR_COMP 0
> > >
> > > /* PowerDown Control Register bits */
> > > @@ -281,6 +282,65 @@ struct etmv4_config {
> > > u32 ext_inp;
> > > };
> > >
> > > +/**
> > > + * struct etm4_save_state - state to be preserved when ETM is without power
> > > + */
> > > +struct etmv4_save_state {
> > > + u32 trcprgctlr;
> > > + u32 trcprocselr;
> > > + u32 trcconfigr;
> > > + u32 trcauxctlr;
> > > + u32 trceventctl0r;
> > > + u32 trceventctl1r;
> > > + u32 trcstallctlr;
> > > + u32 trctsctlr;
> > > + u32 trcsyncpr;
> > > + u32 trcccctlr;
> > > + u32 trcbbctlr;
> > > + u32 trctraceidr;
> > > + u32 trcqctlr;
> > > +
> > > + u32 trcvictlr;
> > > + u32 trcviiectlr;
> > > + u32 trcvissctlr;
> > > + u32 trcvipcssctlr;
> > > + u32 trcvdctlr;
> > > + u32 trcvdsacctlr;
> > > + u32 trcvdarcctlr;
> > > +
> > > + u32 trcseqevr[ETM_MAX_SEQ_STATES];
> > > + u32 trcseqrstevr;
> > > + u32 trcseqstr;
> > > + u32 trcextinselr;
> > > + u32 trccntrldvr[ETMv4_MAX_CNTR];
> > > + u32 trccntctlr[ETMv4_MAX_CNTR];
> > > + u32 trccntvr[ETMv4_MAX_CNTR];
> > > +
> > > + u32 trcrsctlr[ETM_MAX_RES_SEL * 2];
> > > +
> > > + u32 trcssccr[ETM_MAX_SS_CMP];
> > > + u32 trcsscsr[ETM_MAX_SS_CMP];
> > > + u32 trcsspcicr[ETM_MAX_SS_CMP];
> > > +
> > > + u64 trcacvr[ETM_MAX_SINGLE_ADDR_CMP];
> > > + u64 trcacatr[ETM_MAX_SINGLE_ADDR_CMP];
> > > + u64 trcdvcvr[ETM_MAX_DATA_VAL_CMP];
> > > + u64 trcdvcmr[ETM_MAX_DATA_VAL_CMP];
> > > + u64 trccidcvr[ETMv4_MAX_CTXID_CMP];
> > > + u32 trcvmidcvr[ETM_MAX_VMID_CMP];
> > > + u32 trccidcctlr0;
> > > + u32 trccidcctlr1;
> > > + u32 trcvmidcctlr0;
> > > + u32 trcvmidcctlr1;
> > > +
> > > + u32 trcclaimset;
> > > +
> > > + u32 cntr_val[ETMv4_MAX_CNTR];
> > > + u32 seq_state;
> > > + u32 vinst_ctrl;
> > > + u32 ss_status[ETM_MAX_SS_CMP];
> > > +};
> > > +
> > > /**
> > > * struct etm4_drvdata - specifics associated to an ETM component
> > > * @base: Memory mapped base address for this component.
> > > @@ -337,6 +397,8 @@ struct etmv4_config {
> > > * @atbtrig: If the implementation can support ATB triggers
> > > * @lpoverride: If the implementation can support low-power state over.
> > > * @config: structure holding configuration parameters.
> > > + * @save_state: State to be preserved across power loss
> > > + * @nb: CPU PM notifier
> > > */
> > > struct etmv4_drvdata {
> > > void __iomem *base;
> > > @@ -383,6 +445,8 @@ struct etmv4_drvdata {
> > > bool atbtrig;
> > > bool lpoverride;
> > > struct etmv4_config config;
> > > + struct etmv4_save_state save_state;
> > > + struct notifier_block nb;
> > > };
> > >
> > > /* Address comparator access types */
> > > diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c
> > > index 4b130281236a..e85d09e597a0 100644
> > > --- a/drivers/hwtracing/coresight/coresight.c
> > > +++ b/drivers/hwtracing/coresight/coresight.c
> > > @@ -140,7 +140,7 @@ static inline bool coresight_is_claimed_self_hosted(void __iomem *base)
> > > return coresight_read_claim_tags(base) == CORESIGHT_CLAIM_SELF_HOSTED;
> > > }
> > >
> > > -static inline bool coresight_is_claimed_any(void __iomem *base)
> > > +bool coresight_is_claimed_any(void __iomem *base)
> > > {
> > > return coresight_read_claim_tags(base) != 0;
> > > }
> > > diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> > > index 62a520df8add..4f7ba923ffc4 100644
> > > --- a/include/linux/coresight.h
> > > +++ b/include/linux/coresight.h
> > > @@ -268,6 +268,8 @@ extern int coresight_claim_device_unlocked(void __iomem *base);
> > > extern void coresight_disclaim_device(void __iomem *base);
> > > extern void coresight_disclaim_device_unlocked(void __iomem *base);
> > >
> > > +extern bool coresight_is_claimed_any(void __iomem *base);
> > > +
> > > #else
> > > static inline struct coresight_device *
> > > coresight_register(struct coresight_desc *desc) { return NULL; }
> > > @@ -290,6 +292,11 @@ static inline int coresight_claim_device(void __iomem *base)
> > > static inline void coresight_disclaim_device(void __iomem *base) {}
> > > static inline void coresight_disclaim_device_unlocked(void __iomem *base) {}
> > >
> > > +static inline bool coresight_is_claimed_any(void __iomem *base)
> > > +{
> > > + return false;
> > > +}
> > > +
> >
> > I wanted to test your code but it doesn't apply on the CS next branch:
> >
> > https://git.linaro.org/kernel/coresight.git/log/?h=next
>
> Oh sorry about that, this was ontop of v5.2-rc5, I'll rebase to the CS branch
> on the next iteration.
>
> Thanks for the responsive feedback.
>
> Andrew Murray
>
> >
> > Thanks,
> > Mathieu
> >
> > > #endif
> > >
> > > #ifdef CONFIG_OF
> > > --
> > > 2.21.0
> > >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH 08/16] nfsd: escape high characters in binary data
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
I'm exposing some information about NFS clients in pseudofiles. I
expect to eventually have simple tools to help read those pseudofiles.
But it's also helpful if the raw files are human-readable to the extent
possible. It aids debugging and makes them usable on systems that don't
have the latest nfs-utils.
A minor challenge there is opaque client-generated protocol objects like
state owners and client identifiers. Some clients generate those to
include handy information in plain ascii. But they may also include
arbitrary byte sequences.
I think the simplest approach is to limit to isprint(c) && isascii(c)
and escape everything else.
That means you can just cat the file and get something that looks OK.
Also, I'm trying to keep these files legal YAML, which requires them to
UTF-8, and this is a simple way to guarantee that.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/seq_file.c | 11 +++++++++++
include/linux/seq_file.h | 1 +
include/linux/string_helpers.h | 3 +++
lib/string_helpers.c | 19 +++++++++++++++++++
4 files changed, 34 insertions(+)
diff --git a/fs/seq_file.c b/fs/seq_file.c
index abe27ec43176..04f09689cd6d 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -384,6 +384,17 @@ void seq_escape(struct seq_file *m, const char *s, const char *esc)
}
EXPORT_SYMBOL(seq_escape);
+void seq_escape_mem_ascii(struct seq_file *m, const char *src, size_t isz)
+{
+ char *buf;
+ size_t size = seq_get_buf(m, &buf);
+ int ret;
+
+ ret = string_escape_mem_ascii(src, isz, buf, size);
+ seq_commit(m, ret < size ? ret : -1);
+}
+EXPORT_SYMBOL(seq_escape_mem_ascii);
+
void seq_vprintf(struct seq_file *m, const char *f, va_list args)
{
int len;
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index a121982af0f5..5998e1f4ff06 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -127,6 +127,7 @@ void seq_put_hex_ll(struct seq_file *m, const char *delimiter,
unsigned long long v, unsigned int width);
void seq_escape(struct seq_file *m, const char *s, const char *esc);
+void seq_escape_mem_ascii(struct seq_file *m, const char *src, size_t isz);
void seq_hex_dump(struct seq_file *m, const char *prefix_str, int prefix_type,
int rowsize, int groupsize, const void *buf, size_t len,
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index d23c5030901a..c28955132234 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -54,6 +54,9 @@ static inline int string_unescape_any_inplace(char *buf)
int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
unsigned int flags, const char *only);
+int string_escape_mem_ascii(const char *src, size_t isz, char *dst,
+ size_t osz);
+
static inline int string_escape_mem_any_np(const char *src, size_t isz,
char *dst, size_t osz, const char *only)
{
diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index 29c490e5d478..9ca19918ca26 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -539,6 +539,25 @@ int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
}
EXPORT_SYMBOL(string_escape_mem);
+int string_escape_mem_ascii(const char *src, size_t isz, char *dst,
+ size_t osz)
+{
+ char *p = dst;
+ char *end = p + osz;
+
+ while (isz--) {
+ unsigned char c = *src++;
+
+ if (!isprint(c) || !isascii(c) || c == '"' || c == '\\')
+ escape_hex(c, &p, end);
+ else
+ escape_passthrough(c, &p, end);
+ }
+
+ return p - dst;
+}
+EXPORT_SYMBOL(string_escape_mem_ascii);
+
/*
* Return an allocated string that has been escaped of special characters
* and double quotes, making it safe to log in quotes.
--
2.21.0
^ permalink raw reply related
* [PATCH 00/16] exposing knfsd client state to userspace
From: J. Bruce Fields @ 2019-06-20 14:50 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
From: "J. Bruce Fields" <bfields@redhat.com>
Changes since last time:
- added display of client implementation ID
- changed display of binary data to escape anything nonprintable
or nonascii
- some minor cleanup and patch reshuffling
I'm happy enough with at this point and hoping to merge it for 5.3.
Recapping discussion from last time:
The following patches expose information about NFSv4 state held by knfsd
on behalf of NFSv4 clients. This is especially important for opens,
which are currently invisible to userspace on the server, unlike locks
(/proc/locks) and local processes' opens (under /proc/<pid>/).
The approach is to add a new directory /proc/fs/nfsd/clients/ with
subdirectories for each active NFSv4 client. Each subdirectory has an
"info" file with some basic information to help identify the client and
a "states" directory that lists the open state held by that client.
Currently these pseudofiles look like:
# find /proc/fs/nfsd/clients -type f|xargs tail
==> /proc/fs/nfsd/clients/3/ctl <==
tail: error reading '/proc/fs/nfsd/clients/3/ctl': Invalid argument
==> /proc/fs/nfsd/clients/3/states <==
- 0x01000000f58f0b5d2898a19801000000: { type: open, access: r-, deny: --, superblock: "fd:10:13649", owner: "open id:\x00\x00\x00&\x00\x00\x00\x00\x00\x00\x02x\xac\xd0 \x09" }
- 0x01000000f58f0b5d2898a19802000000: { type: deleg, access: r, superblock: "fd:10:13649" }
- 0x01000000f58f0b5d2898a19803000000: { type: open, access: r-, deny: --, superblock: "fd:10:13650", owner: "open id:\x00\x00\x00&\x00\x00\x00\x00\x00\x00\x02x\xac\xd0 \x09" }
- 0x01000000f58f0b5d2898a19804000000: { type: deleg, access: r, superblock: "fd:10:13650" }
==> /proc/fs/nfsd/clients/3/info <==
clientid: 0x98a198285d0b8ff5
address: "192.168.122.36:935"
name: "Linux NFSv4.2 test2.fieldses.org"
minor version: 2
Implementation domain: "kernel.org"
Implementation name: "Linux 5.2.0-rc1-00017-ge73cab140ec0 #2263 SMP PREEMPT Tue Jun 18 16:54:41 EDT 2019 x86_64"
Implementation time: [0, 0]
The "ctl" file is not readable; all you can do is write "expire\n" to it
to force the server to revoke all that client's state.
The "info" and "states" files are meant to be valid YAML.
Possibly also todo, though I think none have to be done before merging:
- add some information about krb5 principals to the clients
file.
- add information about the stateids used to represent
asynchronous copies. They're a little different from the
other stateids and might end up in a separate "copies" file,
- this duplicates some functionality of the little-used fault
injection code; could we replace it entirely?
- some of the bits of filesystem code could probably be shared
with rpc_pipefs and libfs.
--b.
J. Bruce Fields (16):
nfsd: persist nfsd filesystem across mounts
nfsd: rename cl_refcount
nfsd4: use reference count to free client
nfsd: add nfsd/clients directory
nfsd: make client/ directory names small ints
nfsd4: add a client info file
nfsd: copy client's address including port number to cl_addr
nfsd: escape high characters in binary data
nfsd: add more information to client info file
nfsd4: add file to display list of client's opens
nfsd: show lock and deleg stateids
nfsd4: show layout stateids
nfsd: create get_nfsdfs_clp helper
nfsd: allow forced expiration of NFSv4 clients
nfsd: create xdr_netobj_dup helper
nfsd: decode implementation id
fs/nfsd/netns.h | 6 +
fs/nfsd/nfs4state.c | 453 ++++++++++++++++++++++++++++++---
fs/nfsd/nfs4xdr.c | 21 +-
fs/nfsd/nfsctl.c | 221 +++++++++++++++-
fs/nfsd/nfsd.h | 11 +
fs/nfsd/state.h | 11 +-
fs/nfsd/xdr4.h | 3 +
fs/seq_file.c | 11 +
include/linux/seq_file.h | 1 +
include/linux/string_helpers.h | 3 +
include/linux/sunrpc/xdr.h | 7 +
lib/string_helpers.c | 19 ++
12 files changed, 723 insertions(+), 44 deletions(-)
--
2.21.0
^ permalink raw reply
* [PATCH 02/16] nfsd: rename cl_refcount
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
Rename this to a more descriptive name: it counts the number of
in-progress rpc's referencing this client.
Next I'm going to add a second refcount with a slightly different use.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4state.c | 26 +++++++++++++-------------
fs/nfsd/state.h | 2 +-
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 618e66078ee5..2a13b6cbb695 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -138,7 +138,7 @@ static __be32 get_client_locked(struct nfs4_client *clp)
if (is_client_expired(clp))
return nfserr_expired;
- atomic_inc(&clp->cl_refcount);
+ atomic_inc(&clp->cl_rpc_users);
return nfs_ok;
}
@@ -170,7 +170,7 @@ static void put_client_renew_locked(struct nfs4_client *clp)
lockdep_assert_held(&nn->client_lock);
- if (!atomic_dec_and_test(&clp->cl_refcount))
+ if (!atomic_dec_and_test(&clp->cl_rpc_users))
return;
if (!is_client_expired(clp))
renew_client_locked(clp);
@@ -180,7 +180,7 @@ static void put_client_renew(struct nfs4_client *clp)
{
struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
- if (!atomic_dec_and_lock(&clp->cl_refcount, &nn->client_lock))
+ if (!atomic_dec_and_lock(&clp->cl_rpc_users, &nn->client_lock))
return;
if (!is_client_expired(clp))
renew_client_locked(clp);
@@ -1857,7 +1857,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name)
clp->cl_name.len = name.len;
INIT_LIST_HEAD(&clp->cl_sessions);
idr_init(&clp->cl_stateids);
- atomic_set(&clp->cl_refcount, 0);
+ atomic_set(&clp->cl_rpc_users, 0);
clp->cl_cb_state = NFSD4_CB_UNKNOWN;
INIT_LIST_HEAD(&clp->cl_idhash);
INIT_LIST_HEAD(&clp->cl_openowners);
@@ -1936,7 +1936,7 @@ unhash_client(struct nfs4_client *clp)
static __be32 mark_client_expired_locked(struct nfs4_client *clp)
{
- if (atomic_read(&clp->cl_refcount))
+ if (atomic_read(&clp->cl_rpc_users))
return nfserr_jukebox;
unhash_client_locked(clp);
return nfs_ok;
@@ -4092,7 +4092,7 @@ static __be32 lookup_clientid(clientid_t *clid,
spin_unlock(&nn->client_lock);
return nfserr_expired;
}
- atomic_inc(&found->cl_refcount);
+ atomic_inc(&found->cl_rpc_users);
spin_unlock(&nn->client_lock);
/* Cache the nfs4_client in cstate! */
@@ -6584,7 +6584,7 @@ nfs4_check_open_reclaim(clientid_t *clid,
static inline void
put_client(struct nfs4_client *clp)
{
- atomic_dec(&clp->cl_refcount);
+ atomic_dec(&clp->cl_rpc_users);
}
static struct nfs4_client *
@@ -6702,7 +6702,7 @@ nfsd_inject_add_lock_to_list(struct nfs4_ol_stateid *lst,
return;
lockdep_assert_held(&nn->client_lock);
- atomic_inc(&clp->cl_refcount);
+ atomic_inc(&clp->cl_rpc_users);
list_add(&lst->st_locks, collect);
}
@@ -6731,7 +6731,7 @@ static u64 nfsd_foreach_client_lock(struct nfs4_client *clp, u64 max,
* Despite the fact that these functions deal
* with 64-bit integers for "count", we must
* ensure that it doesn't blow up the
- * clp->cl_refcount. Throw a warning if we
+ * clp->cl_rpc_users. Throw a warning if we
* start to approach INT_MAX here.
*/
WARN_ON_ONCE(count == (INT_MAX / 2));
@@ -6855,7 +6855,7 @@ nfsd_foreach_client_openowner(struct nfs4_client *clp, u64 max,
if (func) {
func(oop);
if (collect) {
- atomic_inc(&clp->cl_refcount);
+ atomic_inc(&clp->cl_rpc_users);
list_add(&oop->oo_perclient, collect);
}
}
@@ -6863,7 +6863,7 @@ nfsd_foreach_client_openowner(struct nfs4_client *clp, u64 max,
/*
* Despite the fact that these functions deal with
* 64-bit integers for "count", we must ensure that
- * it doesn't blow up the clp->cl_refcount. Throw a
+ * it doesn't blow up the clp->cl_rpc_users. Throw a
* warning if we start to approach INT_MAX here.
*/
WARN_ON_ONCE(count == (INT_MAX / 2));
@@ -6993,7 +6993,7 @@ static u64 nfsd_find_all_delegations(struct nfs4_client *clp, u64 max,
if (dp->dl_time != 0)
continue;
- atomic_inc(&clp->cl_refcount);
+ atomic_inc(&clp->cl_rpc_users);
WARN_ON(!unhash_delegation_locked(dp));
list_add(&dp->dl_recall_lru, victims);
}
@@ -7001,7 +7001,7 @@ static u64 nfsd_find_all_delegations(struct nfs4_client *clp, u64 max,
/*
* Despite the fact that these functions deal with
* 64-bit integers for "count", we must ensure that
- * it doesn't blow up the clp->cl_refcount. Throw a
+ * it doesn't blow up the clp->cl_rpc_users. Throw a
* warning if we start to approach INT_MAX here.
*/
WARN_ON_ONCE(count == (INT_MAX / 2));
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 0b74d371ed67..f79ad7202e82 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -347,7 +347,7 @@ struct nfs4_client {
struct nfsd4_clid_slot cl_cs_slot; /* create_session slot */
u32 cl_exchange_flags;
/* number of rpc's in progress over an associated session: */
- atomic_t cl_refcount;
+ atomic_t cl_rpc_users;
struct nfs4_op_map cl_spo_must_allow;
/* for nfs41 callbacks */
--
2.21.0
^ permalink raw reply related
* [PATCH 07/16] nfsd: copy client's address including port number to cl_addr
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
rpc_copy_addr() copies only the IP address and misses any port numbers.
It seems potentially useful to keep the port number around too.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index d3de89dacf89..dd89dc05f6ee 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2273,7 +2273,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name,
clp->cl_time = get_seconds();
clear_bit(0, &clp->cl_cb_slot_busy);
copy_verf(clp, verf);
- rpc_copy_addr((struct sockaddr *) &clp->cl_addr, sa);
+ memcpy(&clp->cl_addr, sa, sizeof(struct sockaddr_storage));
clp->cl_cb_session = NULL;
clp->net = net;
clp->cl_nfsd_dentry = nfsd_client_mkdir(nn, &clp->cl_nfsdfs,
--
2.21.0
^ permalink raw reply related
* [PATCH 05/16] nfsd: make client/ directory names small ints
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
We want clientid's on the wire to be randomized for reasons explained in
ebd7c72c63ac "nfsd: randomize SETCLIENTID reply to help distinguish
servers". But I'd rather have mostly small integers for the clients/
directory.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/netns.h | 1 +
fs/nfsd/nfs4state.c | 2 +-
fs/nfsd/nfsctl.c | 5 +++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index cee843e8e440..190d5a71415a 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -124,6 +124,7 @@ struct nfsd_net {
*/
unsigned int max_connections;
+ u32 clientid_base;
u32 clientid_counter;
u32 clverifier_counter;
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index cf081a8d6b6b..370ee6f6b246 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2242,7 +2242,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name,
clp->cl_cb_session = NULL;
clp->net = net;
clp->cl_nfsd_dentry = nfsd_client_mkdir(nn, &clp->cl_nfsdfs,
- clp->cl_clientid.cl_id);
+ clp->cl_clientid.cl_id - nn->clientid_base);
if (!clp->cl_nfsd_dentry) {
free_client(clp);
return NULL;
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 638a25648dcb..50c103c1aa13 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1212,7 +1212,7 @@ struct dentry *nfsd_client_mkdir(struct nfsd_net *nn, struct nfsdfs_client *ncl,
{
char name[11];
- sprintf(name, "%d", id++);
+ sprintf(name, "%u", id);
return nfsd_mkdir(nn->nfsd_client_dir, ncl, name);
}
@@ -1348,7 +1348,8 @@ static __net_init int nfsd_init_net(struct net *net)
nn->somebody_reclaimed = false;
nn->track_reclaim_completes = false;
nn->clverifier_counter = prandom_u32();
- nn->clientid_counter = prandom_u32();
+ nn->clientid_base = prandom_u32();
+ nn->clientid_counter = nn->clientid_base + 1;
nn->s2s_cp_cl_id = nn->clientid_counter++;
atomic_set(&nn->ntf_refcnt, 0);
--
2.21.0
^ permalink raw reply related
* [PATCH 12/16] nfsd4: show layout stateids
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
These are also minimal for now, I'm not sure what information would be
useful.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4state.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index ab4302cee2d2..7867372363ff 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2398,6 +2398,24 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)
return 0;
}
+static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st)
+{
+ struct nfs4_layout_stateid *ls;
+ struct file *file;
+
+ ls = container_of(st, struct nfs4_layout_stateid, ls_stid);
+ file = ls->ls_file;
+
+ seq_printf(s, "- 0x%16phN: { type: layout, ", &st->sc_stateid);
+
+ /* XXX: What else would be useful? */
+
+ nfs4_show_superblock(s, file);
+ seq_printf(s, " }\n");
+
+ return 0;
+}
+
static int states_show(struct seq_file *s, void *v)
{
struct nfs4_stid *st = v;
@@ -2409,6 +2427,8 @@ static int states_show(struct seq_file *s, void *v)
return nfs4_show_lock(s, st);
case NFS4_DELEG_STID:
return nfs4_show_deleg(s, st);
+ case NFS4_LAYOUT_STID:
+ return nfs4_show_layout(s, st);
default:
return 0; /* XXX: or SEQ_SKIP? */
}
--
2.21.0
^ permalink raw reply related
* [PATCH 14/16] nfsd: allow forced expiration of NFSv4 clients
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
NFSv4 clients are automatically expired and all their locks removed if
they don't contact the server for a certain amount of time (the lease
period, 90 seconds by default).
There can still be situations where that's not enough, so allow
userspace to force expiry by writing "expire\n" to the new
nfsd/client/#/ctl file.
(The generic "ctl" name is because I expect we may want to allow other
operations on clients in the future.)
The write will not return until the client is expired and all of its
locks and other state removed.
The fault injection code also provides a way of expiring clients, but it
fails if there are any in-progress RPC's referencing the client. Also,
its method of selecting a client to expire is a little more
primitive--it uses an IP address, which can't always uniquely specify an
NFSv4 client.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4state.c | 70 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 69 insertions(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 63f6b87e178e..12e370e62453 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -100,6 +100,13 @@ enum nfsd4_st_mutex_lock_subclass {
*/
static DECLARE_WAIT_QUEUE_HEAD(close_wq);
+/*
+ * A waitqueue where a writer to clients/#/ctl destroying a client can
+ * wait for cl_rpc_users to drop to 0 and then for the client to be
+ * unhashed.
+ */
+static DECLARE_WAIT_QUEUE_HEAD(expiry_wq);
+
static struct kmem_cache *client_slab;
static struct kmem_cache *openowner_slab;
static struct kmem_cache *lockowner_slab;
@@ -175,6 +182,8 @@ static void put_client_renew_locked(struct nfs4_client *clp)
return;
if (!is_client_expired(clp))
renew_client_locked(clp);
+ else
+ wake_up_all(&expiry_wq);
}
static void put_client_renew(struct nfs4_client *clp)
@@ -185,6 +194,8 @@ static void put_client_renew(struct nfs4_client *clp)
return;
if (!is_client_expired(clp))
renew_client_locked(clp);
+ else
+ wake_up_all(&expiry_wq);
spin_unlock(&nn->client_lock);
}
@@ -1910,8 +1921,11 @@ free_client(struct nfs4_client *clp)
free_session(ses);
}
rpc_destroy_wait_queue(&clp->cl_cb_waitq);
- if (clp->cl_nfsd_dentry)
+ if (clp->cl_nfsd_dentry) {
nfsd_client_rmdir(clp->cl_nfsd_dentry);
+ clp->cl_nfsd_dentry = NULL;
+ wake_up_all(&expiry_wq);
+ }
drop_client(clp);
}
@@ -2006,6 +2020,7 @@ __destroy_client(struct nfs4_client *clp)
if (clp->cl_cb_conn.cb_xprt)
svc_xprt_put(clp->cl_cb_conn.cb_xprt);
free_client(clp);
+ wake_up_all(&expiry_wq);
}
static void
@@ -2484,9 +2499,62 @@ static const struct file_operations client_states_fops = {
.release = client_opens_release,
};
+/*
+ * Normally we refuse to destroy clients that are in use, but here the
+ * administrator is telling us to just do it. We also want to wait
+ * so the caller has a guarantee that the client's locks are gone by
+ * the time the write returns:
+ */
+void force_expire_client(struct nfs4_client *clp)
+{
+ struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
+ bool already_expired;
+
+ spin_lock(&clp->cl_lock);
+ clp->cl_time = 0;
+ spin_unlock(&clp->cl_lock);
+
+ wait_event(expiry_wq, atomic_read(&clp->cl_rpc_users) == 0);
+ spin_lock(&nn->client_lock);
+ already_expired = list_empty(&clp->cl_lru);
+ if (!already_expired)
+ unhash_client_locked(clp);
+ spin_unlock(&nn->client_lock);
+
+ if (!already_expired)
+ expire_client(clp);
+ else
+ wait_event(expiry_wq, clp->cl_nfsd_dentry == NULL);
+}
+
+static ssize_t client_ctl_write(struct file *file, const char __user *buf,
+ size_t size, loff_t *pos)
+{
+ char *data;
+ struct nfs4_client *clp;
+
+ data = simple_transaction_get(file, buf, size);
+ if (IS_ERR(data))
+ return PTR_ERR(data);
+ if (size != 7 || 0 != memcmp(data, "expire\n", 7))
+ return -EINVAL;
+ clp = get_nfsdfs_clp(file_inode(file));
+ if (!clp)
+ return -ENXIO;
+ force_expire_client(clp);
+ drop_client(clp);
+ return 7;
+}
+
+static const struct file_operations client_ctl_fops = {
+ .write = client_ctl_write,
+ .release = simple_transaction_release,
+};
+
static const struct tree_descr client_files[] = {
[0] = {"info", &client_info_fops, S_IRUSR},
[1] = {"states", &client_states_fops, S_IRUSR},
+ [2] = {"ctl", &client_ctl_fops, S_IRUSR|S_IWUSR},
[3] = {""},
};
--
2.21.0
^ permalink raw reply related
* [PATCH 13/16] nfsd: create get_nfsdfs_clp helper
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
Factor our some common code. No change in behavior.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4state.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 7867372363ff..63f6b87e178e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2216,6 +2216,15 @@ find_stateid_by_type(struct nfs4_client *cl, stateid_t *t, char typemask)
return s;
}
+static struct nfs4_client *get_nfsdfs_clp(struct inode *inode)
+{
+ struct nfsdfs_client *nc;
+ nc = get_nfsdfs_client(inode);
+ if (!nc)
+ return NULL;
+ return container_of(nc, struct nfs4_client, cl_nfsdfs);
+}
+
static void seq_quote_mem(struct seq_file *m, char *data, int len)
{
seq_printf(m, "\"");
@@ -2226,14 +2235,12 @@ static void seq_quote_mem(struct seq_file *m, char *data, int len)
static int client_info_show(struct seq_file *m, void *v)
{
struct inode *inode = m->private;
- struct nfsdfs_client *nc;
struct nfs4_client *clp;
u64 clid;
- nc = get_nfsdfs_client(inode);
- if (!nc)
+ clp = get_nfsdfs_clp(inode);
+ if (!clp)
return -ENXIO;
- clp = container_of(nc, struct nfs4_client, cl_nfsdfs);
memcpy(&clid, &clp->cl_clientid, sizeof(clid));
seq_printf(m, "clientid: 0x%llx\n", clid);
seq_printf(m, "address: \"%pISpc\"\n", (struct sockaddr *)&clp->cl_addr);
@@ -2444,15 +2451,13 @@ static struct seq_operations states_seq_ops = {
static int client_states_open(struct inode *inode, struct file *file)
{
- struct nfsdfs_client *nc;
struct seq_file *s;
struct nfs4_client *clp;
int ret;
- nc = get_nfsdfs_client(inode);
- if (!nc)
+ clp = get_nfsdfs_clp(inode);
+ if (!clp)
return -ENXIO;
- clp = container_of(nc, struct nfs4_client, cl_nfsdfs);
ret = seq_open(file, &states_seq_ops);
if (ret)
--
2.21.0
^ permalink raw reply related
* [PATCH 04/16] nfsd: add nfsd/clients directory
From: J. Bruce Fields @ 2019-06-20 14:51 UTC (permalink / raw)
To: linux-nfs; +Cc: J. Bruce Fields
In-Reply-To: <1561042275-12723-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
I plan to expose some information about nfsv4 clients here.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/netns.h | 2 +
fs/nfsd/nfs4state.c | 23 ++++++----
fs/nfsd/nfsctl.c | 103 +++++++++++++++++++++++++++++++++++++++++++-
fs/nfsd/nfsd.h | 9 ++++
fs/nfsd/state.h | 6 ++-
5 files changed, 133 insertions(+), 10 deletions(-)
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index e7890e87d30b..cee843e8e440 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -58,6 +58,8 @@ struct nfsd_net {
/* internal mount of the "nfsd" pseudofilesystem: */
struct vfsmount *nfsd_mnt;
+ struct dentry *nfsd_client_dir;
+
/*
* reclaim_str_hashtbl[] holds known client info from previous reset/reboot
* used in reboot/reset lease grace period processing
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index d2ea41add566..cf081a8d6b6b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1881,20 +1881,19 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name)
static void __free_client(struct kref *k)
{
- struct nfs4_client *clp = container_of(k, struct nfs4_client, cl_ref);
+ struct nfsdfs_client *c = container_of(k, struct nfsdfs_client, cl_ref);
+ struct nfs4_client *clp = container_of(c, struct nfs4_client, cl_nfsdfs);
free_svc_cred(&clp->cl_cred);
kfree(clp->cl_ownerstr_hashtbl);
kfree(clp->cl_name.data);
idr_destroy(&clp->cl_stateids);
- if (clp->cl_nfsd_dentry)
- nfsd_client_rmdir(clp->cl_nfsd_dentry);
kmem_cache_free(client_slab, clp);
}
void drop_client(struct nfs4_client *clp)
{
- kref_put(&clp->cl_ref, __free_client);
+ kref_put(&clp->cl_nfsdfs.cl_ref, __free_client);
}
static void
@@ -1909,6 +1908,8 @@ free_client(struct nfs4_client *clp)
free_session(ses);
}
rpc_destroy_wait_queue(&clp->cl_cb_waitq);
+ if (clp->cl_nfsd_dentry)
+ nfsd_client_rmdir(clp->cl_nfsd_dentry);
drop_client(clp);
}
@@ -2220,6 +2221,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name,
struct sockaddr *sa = svc_addr(rqstp);
int ret;
struct net *net = SVC_NET(rqstp);
+ struct nfsd_net *nn = net_generic(net, nfsd_net_id);
clp = alloc_client(name);
if (clp == NULL)
@@ -2230,8 +2232,8 @@ static struct nfs4_client *create_client(struct xdr_netobj name,
free_client(clp);
return NULL;
}
-
- kref_init(&clp->cl_ref);
+ gen_clid(clp, nn);
+ kref_init(&clp->cl_nfsdfs.cl_ref);
nfsd4_init_cb(&clp->cl_cb_null, clp, NULL, NFSPROC4_CLNT_CB_NULL);
clp->cl_time = get_seconds();
clear_bit(0, &clp->cl_cb_slot_busy);
@@ -2239,6 +2241,12 @@ static struct nfs4_client *create_client(struct xdr_netobj name,
rpc_copy_addr((struct sockaddr *) &clp->cl_addr, sa);
clp->cl_cb_session = NULL;
clp->net = net;
+ clp->cl_nfsd_dentry = nfsd_client_mkdir(nn, &clp->cl_nfsdfs,
+ clp->cl_clientid.cl_id);
+ if (!clp->cl_nfsd_dentry) {
+ free_client(clp);
+ return NULL;
+ }
return clp;
}
@@ -2683,7 +2691,6 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
new->cl_spo_must_allow.u.words[0] = exid->spo_must_allow[0];
new->cl_spo_must_allow.u.words[1] = exid->spo_must_allow[1];
- gen_clid(new, nn);
add_to_unconfirmed(new);
swap(new, conf);
out_copy:
@@ -3427,7 +3434,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
copy_clid(new, conf);
gen_confirm(new, nn);
} else /* case 4 (new client) or cases 2, 3 (client reboot): */
- gen_clid(new, nn);
+ ;
new->cl_minorversion = 0;
gen_callback(new, setclid, rqstp);
add_to_unconfirmed(new);
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index ab1fb81b7f5e..638a25648dcb 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -15,6 +15,7 @@
#include <linux/sunrpc/gss_krb5_enctypes.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
#include <linux/module.h>
+#include <linux/fsnotify.h>
#include "idmap.h"
#include "nfsd.h"
@@ -52,6 +53,7 @@ enum {
NFSD_RecoveryDir,
NFSD_V4EndGrace,
#endif
+ NFSD_MaxReserved
};
/*
@@ -1146,8 +1148,99 @@ static ssize_t write_v4_end_grace(struct file *file, char *buf, size_t size)
* populating the filesystem.
*/
+/* Basically copying rpc_get_inode. */
+static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode)
+{
+ struct inode *inode = new_inode(sb);
+ if (!inode)
+ return NULL;
+ /* Following advice from simple_fill_super documentation: */
+ inode->i_ino = iunique(sb, NFSD_MaxReserved);
+ inode->i_mode = mode;
+ inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
+ switch (mode & S_IFMT) {
+ case S_IFDIR:
+ inode->i_fop = &simple_dir_operations;
+ inode->i_op = &simple_dir_inode_operations;
+ inc_nlink(inode);
+ default:
+ break;
+ }
+ return inode;
+}
+
+static int __nfsd_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
+{
+ struct inode *inode;
+
+ inode = nfsd_get_inode(dir->i_sb, mode);
+ if (!inode)
+ return -ENOMEM;
+ d_add(dentry, inode);
+ inc_nlink(dir);
+ fsnotify_mkdir(dir, dentry);
+ return 0;
+}
+
+static struct dentry *nfsd_mkdir(struct dentry *parent, struct nfsdfs_client *ncl, char *name)
+{
+ struct inode *dir = parent->d_inode;
+ struct dentry *dentry;
+ int ret = -ENOMEM;
+
+ inode_lock(dir);
+ dentry = d_alloc_name(parent, name);
+ if (!dentry)
+ goto out_err;
+ ret = __nfsd_mkdir(d_inode(parent), dentry, S_IFDIR | 0600);
+ if (ret)
+ goto out_err;
+ if (ncl) {
+ d_inode(dentry)->i_private = ncl;
+ kref_get(&ncl->cl_ref);
+ }
+out:
+ inode_unlock(dir);
+ return dentry;
+out_err:
+ dentry = ERR_PTR(ret);
+ goto out;
+}
+
+/* on success, returns positive number unique to that client. */
+struct dentry *nfsd_client_mkdir(struct nfsd_net *nn, struct nfsdfs_client *ncl, u32 id)
+{
+ char name[11];
+
+ sprintf(name, "%d", id++);
+
+ return nfsd_mkdir(nn->nfsd_client_dir, ncl, name);
+}
+
+/* Taken from __rpc_rmdir: */
+void nfsd_client_rmdir(struct dentry *dentry)
+{
+ struct inode *dir = d_inode(dentry->d_parent);
+ struct inode *inode = d_inode(dentry);
+ struct nfsdfs_client *ncl = inode->i_private;
+ int ret;
+
+ inode->i_private = NULL;
+ synchronize_rcu();
+ kref_put(&ncl->cl_ref, ncl->cl_release);
+ dget(dentry);
+ ret = simple_rmdir(dir, dentry);
+ WARN_ON_ONCE(ret);
+ d_delete(dentry);
+}
+
static int nfsd_fill_super(struct super_block * sb, void * data, int silent)
{
+ struct nfsd_net *nn = net_generic(current->nsproxy->net_ns,
+ nfsd_net_id);
+ struct dentry *dentry;
+ int ret;
+
static const struct tree_descr nfsd_files[] = {
[NFSD_List] = {"exports", &exports_nfsd_operations, S_IRUGO},
[NFSD_Export_features] = {"export_features",
@@ -1177,7 +1270,15 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent)
/* last one */ {""}
};
get_net(sb->s_fs_info);
- return simple_fill_super(sb, 0x6e667364, nfsd_files);
+ ret = simple_fill_super(sb, 0x6e667364, nfsd_files);
+ if (ret)
+ return ret;
+ dentry = nfsd_mkdir(sb->s_root, NULL, "clients");
+ if (IS_ERR(dentry))
+ return PTR_ERR(dentry);
+ nn->nfsd_client_dir = dentry;
+ return 0;
+
}
static struct dentry *nfsd_mount(struct file_system_type *fs_type,
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 24187b5dd638..85525dcbf77d 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -22,6 +22,7 @@
#include <uapi/linux/nfsd/debug.h>
+#include "netns.h"
#include "stats.h"
#include "export.h"
@@ -86,6 +87,14 @@ int nfsd_pool_stats_release(struct inode *, struct file *);
void nfsd_destroy(struct net *net);
+struct nfsdfs_client {
+ struct kref cl_ref;
+ void (*cl_release)(struct kref *kref);
+};
+
+struct dentry *nfsd_client_mkdir(struct nfsd_net *nn, struct nfsdfs_client *ncl, u32 id);
+void nfsd_client_rmdir(struct dentry *dentry);
+
#if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
#ifdef CONFIG_NFSD_V2_ACL
extern const struct svc_version nfsd_acl_version2;
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 8eacdbc50cd7..81852cbf6b0a 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -39,6 +39,7 @@
#include <linux/refcount.h>
#include <linux/sunrpc/svc_xprt.h>
#include "nfsfh.h"
+#include "nfsd.h"
typedef struct {
u32 cl_boot;
@@ -348,9 +349,12 @@ struct nfs4_client {
u32 cl_exchange_flags;
/* number of rpc's in progress over an associated session: */
atomic_t cl_rpc_users;
- struct kref cl_ref;
+ struct nfsdfs_client cl_nfsdfs;
struct nfs4_op_map cl_spo_must_allow;
+ /* debugging info directory under nfsd/clients/ : */
+ struct dentry *cl_nfsd_dentry;
+
/* for nfs41 callbacks */
/* We currently support a single back channel with a single slot */
unsigned long cl_cb_slot_busy;
--
2.21.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.