Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-13 Thread Al Viro
On Thu, Sep 14, 2023 at 03:37:05AM +0100, Al Viro wrote: > On Thu, Sep 14, 2023 at 12:27:12AM +0100, Al Viro wrote: > > On Wed, Sep 13, 2023 at 08:09:57AM -0300, Christoph Hellwig wrote: > > > Releasing an anon dev_t is a very common thing when freeing a > > > super_block, as that's done for

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-13 Thread Al Viro
On Thu, Sep 14, 2023 at 12:27:12AM +0100, Al Viro wrote: > On Wed, Sep 13, 2023 at 08:09:57AM -0300, Christoph Hellwig wrote: > > Releasing an anon dev_t is a very common thing when freeing a > > super_block, as that's done for basically any not block based file > > system (modulo the odd mtd

Re: [PATCH 13/19] fs: convert kill_block_super to block_free_sb

2023-09-13 Thread Al Viro
On Wed, Sep 13, 2023 at 08:10:07AM -0300, Christoph Hellwig wrote: > -static void affs_kill_sb(struct super_block *sb) > +static void affs_free_sb(struct super_block *sb) > { > struct affs_sb_info *sbi = AFFS_SB(sb); > - kill_block_super(sb); > + > + block_free_sb(sb); > if

Re: [PATCH 11/19] fs: add new shutdown_sb and free_sb methods

2023-09-13 Thread Al Viro
On Wed, Sep 13, 2023 at 08:10:05AM -0300, Christoph Hellwig wrote: > Currently super_blocks are shut down using the ->kill_sb method, which > must call generic_shutdown_super, but allows the file system to > add extra work before or after the call to generic_shutdown_super. > > File systems tend

Re: [PATCH v3] scsi: target: Replace strlcpy with strscpy

2023-09-13 Thread Martin K. Petersen
On Thu, 31 Aug 2023 14:36:38 +, Azeem Shaikh wrote: > strlcpy() reads the entire source buffer first. > This read may exceed the destination size limit. > This is both inefficient and can lead to linear read > overflows if a source string is not NUL-terminated [1]. > In an effort to remove

Re: linux-next: Tree for Sep 12 (bcachefs)

2023-09-13 Thread Kees Cook
On Tue, Sep 12, 2023 at 03:26:45PM +1000, Stephen Rothwell wrote: > New tree: bcachefs Thanks for going through and fixing all the fake flexible array members. It looks much nicer. :) I have some questions about the remaining "markers", for example: $ git grep -A8 '\bkey_start\b' -- fs/bcachefs

Re: [PATCH 09/19] zonefs: remove duplicate cleanup in zonefs_fill_super

2023-09-13 Thread Al Viro
On Wed, Sep 13, 2023 at 08:10:03AM -0300, Christoph Hellwig wrote: > When ->fill_super fails, ->kill_sb is called which already cleans up > the inodes and zgroups. Ugh... The use of "->" strongly suggests that you are talking about a method; 'fill_super' here actually refers to callback passed

Re: [PATCH 05/19] fs: assign an anon dev_t in common code

2023-09-13 Thread Al Viro
On Wed, Sep 13, 2023 at 08:09:59AM -0300, Christoph Hellwig wrote: > diff --git a/fs/super.c b/fs/super.c > index bbe55f0651cca4..5c685b4944c2d6 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -787,7 +787,7 @@ struct super_block *sget_fc(struct fs_context *fc, > struct super_block *s =

Re: [PATCH 09/19] zonefs: remove duplicate cleanup in zonefs_fill_super

2023-09-13 Thread Damien Le Moal
On 9/13/23 20:10, Christoph Hellwig wrote: > When ->fill_super fails, ->kill_sb is called which already cleans up > the inodes and zgroups. > > Drop the extra cleanup code in zonefs_fill_super. > > Signed-off-by: Christoph Hellwig Looks good to me. Acked-by: Damien Le Moal > --- >

[PATCH v2] module: Clarify documentation of module_param_call()

2023-09-13 Thread Kees Cook
Commit 9bbb9e5a3310 ("param: use ops in struct kernel_param, rather than get and set fns directly") added the comment that module_param_call() was deprecated, during a large scale refactoring to bring sanity to type casting back then. In 2017 following more cleanups, it became useful again as it

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-13 Thread Al Viro
On Wed, Sep 13, 2023 at 08:09:57AM -0300, Christoph Hellwig wrote: > Releasing an anon dev_t is a very common thing when freeing a > super_block, as that's done for basically any not block based file > system (modulo the odd mtd special case). So instead of requiring > a special ->kill_sb helper

Re: [PATCH 5.10-rt] arm64: signal: Use ARCH_RT_DELAYS_SIGNAL_SEND

2023-09-13 Thread Luis Claudio R. Goncalves
On Tue, Sep 12, 2023 at 03:14:28PM +0800, yang.yan...@zte.com.cn wrote: > From: Wang Yong > > The ltp test prompts the following bug information under the 5.10 kernel: > BUG: sleeping function called from invalid context at > kernel/locking/rtmutex.c:969 > in_atomic(): 1, irqs_disabled(): 0,

Re: [PATCH 12/19] fs: convert kill_litter_super to litter_shutdown_sb

2023-09-13 Thread Kees Cook
On Wed, Sep 13, 2023 at 08:10:06AM -0300, Christoph Hellwig wrote: > Replace kill_litter_super with litter_shutdown_sb, which is wired up to > the ->shutdown_sb method. For file systems that wrapped > kill_litter_super, ->kill_sb is replaced with ->shutdown and ->free_sb > methods as needed. > >

Re: [PATCH 08/19] pstore: shrink the pstore_sb_lock critical section in pstore_kill_sb

2023-09-13 Thread Kees Cook
On Wed, Sep 13, 2023 at 08:10:02AM -0300, Christoph Hellwig wrote: > ->kill_sb can't race with creating ->fill_super because pstore is a > _single file system that only ever has a single sb instance, and we wait > for the previous one to go away before creating a new one. Reduce > the critical

[PATCH] firmware: ti_sci: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
ription)); fail: --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230913-strncpy-drivers-firmware-ti_sci-c-22667413c18f Best regards, -- Justin Stitt

[PATCH] firmware: tegra: bpmp: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
); + strscpy_pad(namevirt, filename, namesize); if (copy_from_user(datavirt, buf, count)) { err = -EFAULT; --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230913-strncpy-drivers-firmware-tegra-bpmp-debugfs-c-54f7baaf32c0 Best regards, -- Justin Stitt

Re: [PATCH v3 1/7] drivers: genpd: qcom: rpmpd: Fix MSM8976 power domains setup

2023-09-13 Thread Bjorn Andersson
On Sat, Aug 12, 2023 at 01:24:44PM +0200, Adam Skladowski wrote: Please drop the "drivers:" prefix in $subject, and resubmit this with patch (alone should be fine) with the new maintainer, and appropriate mailing list, included. Thanks, Bjorn > Downstream kernel parses resource names based on

Re: [PATCH v2] ipmi: refactor deprecated strncpy

2023-09-13 Thread Corey Minyard
On Wed, Sep 13, 2023 at 05:13:04PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. Thanks, applied to my next tree. -corey > > In this case, strncpy is being used specifically for its NUL-padding > behavior (and has been commented as

Re: [PATCH v17 00/14] Add support for MT8195 SCP 2nd core

2023-09-13 Thread Mathieu Poirier
On Fri, Sep 01, 2023 at 04:09:21PM +0800, Tinghan Shen wrote: > The mediatek remoteproc driver currently only allows bringing up a > single core SCP, e.g. MT8183. It also only bringing up the 1st > core in SoCs with a dual-core SCP, e.g. MT8195. This series support > to bring-up the 2nd core of

[PATCH v3] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
--- Changes in v3: - prefer strscpy to strscpy_pad (thanks Tony) - Link to v2: https://lore.kernel.org/r/20230913-strncpy-drivers-edac-edac_mc_sysfs-c-v2-1-2d2e6bd43...@google.com Changes in v2: - included refactor of another strncpy in same file - Link to v1: https://lore.kernel.org/r/20230913

Re: [PATCH] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
On Wed, Sep 13, 2023 at 8:13 AM Luck, Tony wrote: > > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > We should prefer more robust and less ambiguous string interfaces. > > > > A suitable replacement is `strscpy_pad` [2] due to the fact that it > > guarantees

[PATCH v2] ipmi: refactor deprecated strncpy

2023-09-13 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. In this case, strncpy is being used specifically for its NUL-padding behavior (and has been commented as such). Moreover, the destination string is not required to be NUL-terminated [2]. We can use a more robust and less

Re: [PATCH 01/19] fs: reflow deactivate_locked_super

2023-09-13 Thread Christian Brauner
On Wed, Sep 13, 2023 at 08:09:55AM -0300, Christoph Hellwig wrote: > Return early for the case where the super block isn't cleaned up to > reduce level of indentation. > > Signed-off-by: Christoph Hellwig > --- > fs/super.c | 35 ++- > 1 file changed, 18

Re: [PATCH 10/19] USB: gadget/legacy: remove sb_mutex

2023-09-13 Thread Alan Stern
On Wed, Sep 13, 2023 at 08:10:04AM -0300, Christoph Hellwig wrote: > Creating new a new super_block vs freeing the old one for single instance > file systems is serialized by the wait for SB_DEAD. > > Remove the superfluous sb_mutex. > > Signed-off-by: Christoph Hellwig > --- You might mention

Re: [PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 14:36, Rob Herring wrote: > > On Wed, 13 Sep 2023 06:16:41 -0500, Hari Nagalla wrote: >> K3 AM64x SoC has a Cortex M4F subsystem in the MCU voltage domain. >> The remote processor's life cycle management and IPC mechanisms are >> similar across the R5F and M4F cores from remote

Re: [PATCH v4 16/18] x86/sgx: Limit process EPC usage with misc cgroup controller

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > Implement support for cgroup control of SGX Enclave Page Cache (EPC) > memory using the misc cgroup controller. EPC memory is independent > from normal system memory, e.g. must be reserved at boot from

Re: [PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 15:59, Hari Nagalla wrote: > On 9/13/23 06:32, Krzysztof Kozlowski wrote: >>> - Removed unrelated items from examples >>> >>> Changes since v4: >>> - Rebased to the latest kernel-next tree >>> - Added optional sram memory region for m4f device node >>> >>> Changes since v5: >>>

Re: [PATCH v4 15/18] x86/sgx: Prepare for multiple LRUs

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > Add sgx_can_reclaim() wrapper and encapsulate direct references to the > global LRU list in the reclaimer functions so that they can be called with > an LRU list per EPC cgroup. > > Signed-off-by: Sean Christopherson > Signed-off-by:

Re: [PATCH v4 13/18] x86/sgx: Expose sgx_reclaim_pages() for use by EPC cgroup

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Sean Christopherson > > Adjust and expose the top-level reclaim function as > sgx_reclaim_epc_pages() for use by the upcoming EPC cgroup, which will > initiate reclaim to enforce the max limit. > > Make these adjustments to the

[PATCH v2] tracefs: Add show_events_dentries

2023-09-13 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a file in tracefs that shows the "events" allocated entries and the dentries that are attached to them. This is used to see what dentries have been dynamically allocated as well as their current ref counts. ~# cat

Re: [PATCH] dax: refactor deprecated strncpy

2023-09-13 Thread Dave Jiang
} else > rc = -ENOMEM; > > --- > base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c > change-id: 20230913-strncpy-drivers-dax-bus-c-f12e3153e44b > > Best regards, > -- > Justin Stitt >

Re: [PATCH v4 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Sean Christopherson > > Introduce the OOM path for killing an enclave with a reclaimer that is no > longer able to reclaim enough EPC pages. Find a victim enclave, which > will be an enclave with only "unreclaimable" EPC pages left

Re: [PATCH v4 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > When an OOM event occurs, all pages associated with an enclave will need > to be freed, including pages that are not currently tracked by the > cgroup LRU lists. > > Add a new "unreclaimable" list to the

Re: [PATCH v4 09/18] x86/sgx: Store struct sgx_encl when allocating new VA pages

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > In a later patch, when a cgroup has exceeded the max capacity for EPC > pages, it may need to identify and OOM kill a less active enclave to > make room for other enclaves within the same group. Such a victim > enclave would have no active

Re: [PATCH v4 08/18] x86/sgx: Use a list to track to-be-reclaimed pages

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > Change sgx_reclaim_pages() to use a list rather than an array for > storing the epc_pages which will be reclaimed. This change is needed > to transition to the LRU implementation for EPC cgroup support. >

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-13 Thread Catalin Marinas
On Mon, Sep 11, 2023 at 02:29:03PM +0200, David Hildenbrand wrote: > On 11.09.23 13:52, Catalin Marinas wrote: > > On Wed, Sep 06, 2023 at 12:23:21PM +0100, Alexandru Elisei wrote: > > > On Thu, Aug 24, 2023 at 04:24:30PM +0100, Catalin Marinas wrote: > > > > On Thu, Aug 24, 2023 at 01:25:41PM

Re: [PATCH v4 06/18] x86/sgx: Introduce EPC page states

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > Use the lower 3 bits in the flags field of sgx_epc_page struct to > track EPC states in its life cycle and define an enum for possible > states. More state(s) will be added later. > > Signed-off-by: Haitao Huang > --- > V4: > - No changes

Re: [PATCH v4 05/18] x86/sgx: Store reclaimable EPC pages in sgx_epc_lru_lists

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > Replace sgx_mark_page_reclaimable() and sgx_unmark_page_reclaimable() > with sgx_record_epc_page() and sgx_drop_epc_page(). The > sgx_record_epc_page() function adds the epc_page to the "reclaimable" >

RE: [PATCH] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-13 Thread Luck, Tony
> `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy_pad` [2] due to the fact that it guarantees > NUL-termination on the destination buffer whilst maintaining the

Re: [PATCH v3] x86/platform/uv: refactor deprecated strcpy and strncpy

2023-09-13 Thread Hans de Goede
Hi, On 9/6/23 16:09, Ingo Molnar wrote: > > * Hans de Goede wrote: > >> Hi Ingo, >> >> On 9/6/23 14:10, Ingo Molnar wrote: >>> >>> * Justin Stitt wrote: >>> Both `strncpy` and `strcpy` are deprecated for use on NUL-terminated destination strings [1]. We can see that `arg`

Re: [PATCH v4 04/18] x86/sgx: Use sgx_epc_lru_lists for existing active page list

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > All EPC pages of enclaves including VA and SECS will be tracked in s/VA/Version Array (VA)/ s/SECS/SGX Enclave Control Structure (SECS)/ Just a nitpick, because it is always good to remind what these

Re: [PATCH 3/3] tracing/selftests: Update kprobe args char/string to match new functions

2023-09-13 Thread Google
On Tue, 12 Sep 2023 22:58:58 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The function that the kprobe_args_char and kprobes_arg_string attaches to > for its test has changed its name once again. Now we need to check for > eventfs_create_dir(), and if it exists, use that,

Re: [PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Hari Nagalla
On 9/13/23 06:32, Krzysztof Kozlowski wrote: - Removed unrelated items from examples Changes since v4: - Rebased to the latest kernel-next tree - Added optional sram memory region for m4f device node Changes since v5: - None Hm, why none? There were errors in the binding to which you

Re: [PATCH 2/3] x86/xen: move paravirt lazy code

2023-09-13 Thread Juergen Gross
On 13.09.23 15:26, Steven Rostedt wrote: On Wed, 13 Sep 2023 13:38:27 +0200 Juergen Gross wrote: diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index 44a3f565264d..0577f0cdd231 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h @@ -6,26 +6,26 @@

Re: [PATCH 2/3] x86/xen: move paravirt lazy code

2023-09-13 Thread Steven Rostedt
On Wed, 13 Sep 2023 13:38:27 +0200 Juergen Gross wrote: > diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h > index 44a3f565264d..0577f0cdd231 100644 > --- a/include/trace/events/xen.h > +++ b/include/trace/events/xen.h > @@ -6,26 +6,26 @@ > #define _TRACE_XEN_H > >

Re: [PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Rob Herring
On Wed, 13 Sep 2023 06:16:41 -0500, Hari Nagalla wrote: > K3 AM64x SoC has a Cortex M4F subsystem in the MCU voltage domain. > The remote processor's life cycle management and IPC mechanisms are > similar across the R5F and M4F cores from remote processor driver > point of view. However, there

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-13 Thread Corey Minyard
On Tue, Sep 12, 2023 at 05:55:02PM -0700, Justin Stitt wrote: > On Tue, Sep 12, 2023 at 5:19 PM Corey Minyard wrote: > > > > On Tue, Sep 12, 2023 at 11:43:05PM +, Justin Stitt wrote: > > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > > > In this case,

Re: [PATCH v2 06/14] arm64: dts: qcom: sdm630: Drop RPM bus clocks

2023-09-13 Thread Konrad Dybcio
icating what's there for msm8998[1] and dropping the entry with just "bus" from anyOf? Konrad [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/iommu/arm,smmu.yaml?h=next-20230913#n272

[PATCH 2/3] x86/xen: move paravirt lazy code

2023-09-13 Thread Juergen Gross
Only Xen is using the paravirt lazy mode code, so it can be moved to Xen specific sources. This allows to make some of the functions static or to merge them into their only call sites. While at it do a rename from "paravirt" to "xen" for all moved specifiers. No functional change.

[PATCH 0/3] xen: cleanup and fix lazy mode handling

2023-09-13 Thread Juergen Gross
This small series is cleaning up Xen lazy mode handling by removing unused stuff and moving purely Xen-specific code away from general kernel code. The last patch is fixing a regression which was introduced in the 6.6 merge window. Juergen Gross (3): arm/xen: remove lazy mode related

Re: [PATCH v6 3/4] remoteproc: k3: Split out functions common with M4 driver

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 13:16, Hari Nagalla wrote: > From: Martyn Welch > > In the next commit we will be adding the M4F driver which shares a lot of > commonality with the DSP driver. Split this shared functionality out so > that it can be used by both drivers. > > Signed-off-by: Martyn Welch >

Re: [PATCH v6 4/4] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 13:16, Hari Nagalla wrote: > From: Martyn Welch > > The AM62x and AM64x SoCs of the TI K3 family has a Cortex M4F core in > the MCU domain. This core is typically used for safety applications in a > stand alone mode. However, some application (non safety related) may > want to use

Re: [PATCH v6 4/4] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 13:16, Hari Nagalla wrote: > From: Martyn Welch > > The AM62x and AM64x SoCs of the TI K3 family has a Cortex M4F core in > the MCU domain. This core is typically used for safety applications in a > stand alone mode. However, some application (non safety related) may > want to use

Re: [PATCH v6 2/4] remoteproc: k3: Split out data structures common with M4 driver

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 13:16, Hari Nagalla wrote: > From: Martyn Welch > > We will be adding the M4F driver which shares a lot of commonality > with the DSP driver. Common data structures are introduced here. > > Signed-off-by: Martyn Welch > Signed-off-by: Hari Nagalla > --- > Changes in v6: > -

Re: [PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 13:16, Hari Nagalla wrote: > K3 AM64x SoC has a Cortex M4F subsystem in the MCU voltage domain. > The remote processor's life cycle management and IPC mechanisms are > similar across the R5F and M4F cores from remote processor driver > point of view. However, there are subtle

[PATCH] x86/hyperv: Restrict get_vtl to only VTL platforms

2023-09-13 Thread Saurabh Sengar
For non VTL platforms vtl is always 0, and there is no need of get_vtl function. For VTL platforms get_vtl should always succeed and should return the correct VTL. Signed-off-by: Saurabh Sengar --- arch/x86/hyperv/hv_init.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

[PATCH v6 3/4] remoteproc: k3: Split out functions common with M4 driver

2023-09-13 Thread Hari Nagalla
From: Martyn Welch In the next commit we will be adding the M4F driver which shares a lot of commonality with the DSP driver. Split this shared functionality out so that it can be used by both drivers. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes since v2: - New patch

[PATCH v6 4/4] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2023-09-13 Thread Hari Nagalla
From: Martyn Welch The AM62x and AM64x SoCs of the TI K3 family has a Cortex M4F core in the MCU domain. This core is typically used for safety applications in a stand alone mode. However, some application (non safety related) may want to use the M4F core as a generic remote processor with IPC

[PATCH v6 1/4] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2023-09-13 Thread Hari Nagalla
K3 AM64x SoC has a Cortex M4F subsystem in the MCU voltage domain. The remote processor's life cycle management and IPC mechanisms are similar across the R5F and M4F cores from remote processor driver point of view. However, there are subtle differences in image loading and starting the M4F

[PATCH v6 0/4] TI K3 M4F support on AM64x and AM62x SoCs

2023-09-13 Thread Hari Nagalla
The following series introduces K3 M4F remoteproc driver support for AM64x and AM62x SoC families. These SoCs have a ARM Cortex M4F core in the MCU voltage domain. For safety oriented applications, this core is operated independently with out any IPC to other cores on the SoC. However, for non

[PATCH v6 2/4] remoteproc: k3: Split out data structures common with M4 driver

2023-09-13 Thread Hari Nagalla
From: Martyn Welch We will be adding the M4F driver which shares a lot of commonality with the DSP driver. Common data structures are introduced here. Signed-off-by: Martyn Welch Signed-off-by: Hari Nagalla --- Changes in v6: - Created a separate patch for data structures to ease review

Re: [PATCH v2 01/14] arm64: dts: qcom: msm8916: Drop RPM bus clocks

2023-09-13 Thread Konrad Dybcio
On 13.09.2023 13:14, Krzysztof Kozlowski wrote: > On 13/09/2023 12:48, Konrad Dybcio wrote: >> On 13.09.2023 10:53, Krzysztof Kozlowski wrote: >>> On 13/09/2023 10:47, Konrad Dybcio wrote: On 13.09.2023 09:07, Krzysztof Kozlowski wrote: > On 12/09/2023 15:31, Konrad Dybcio wrote: >>

Re: [PATCH v2 01/14] arm64: dts: qcom: msm8916: Drop RPM bus clocks

2023-09-13 Thread Krzysztof Kozlowski
On 13/09/2023 12:48, Konrad Dybcio wrote: > On 13.09.2023 10:53, Krzysztof Kozlowski wrote: >> On 13/09/2023 10:47, Konrad Dybcio wrote: >>> On 13.09.2023 09:07, Krzysztof Kozlowski wrote: On 12/09/2023 15:31, Konrad Dybcio wrote: > These clocks are now handled from within the icc

[PATCH 11/19] fs: add new shutdown_sb and free_sb methods

2023-09-13 Thread Christoph Hellwig
Currently super_blocks are shut down using the ->kill_sb method, which must call generic_shutdown_super, but allows the file system to add extra work before or after the call to generic_shutdown_super. File systems tend to get rather confused by this, so add an alternative shutdown sequence where

[PATCH 05/19] fs: assign an anon dev_t in common code

2023-09-13 Thread Christoph Hellwig
All super_blocks need to have a valid dev_t, and except for block based file systems that tends to be an anonymouns dev_t. Instead of leaving that work to the file systems, assign the anonymous dev_t in the core sget_fc and sget routines unless the file systems already assigned on in the set

[PATCH 06/19] qibfs: use simple_release_fs

2023-09-13 Thread Christoph Hellwig
qibfs currently has convoluted code to allow registering HCAs while qibfs is not mounted and vice versa. Switch to using simple_release_fs every time an entry is added to pin the fs instance and remove all the boiler plate code. Signed-off-by: Christoph Hellwig ---

[PATCH 17/19] NFS: move nfs_kill_super to fs_context.c

2023-09-13 Thread Christoph Hellwig
nfs_kill_super is only used in fs_context, so move it there. Signed-off-by: Christoph Hellwig --- fs/nfs/fs_context.c | 13 + fs/nfs/internal.h | 1 - fs/nfs/super.c | 16 fs/nfs/sysfs.h | 2 ++ 4 files changed, 15 insertions(+), 17 deletions(-) diff

[PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-13 Thread Christoph Hellwig
Releasing an anon dev_t is a very common thing when freeing a super_block, as that's done for basically any not block based file system (modulo the odd mtd special case). So instead of requiring a special ->kill_sb helper and a lot of boilerplate in more complicated file systems, just release the

[PATCH 09/19] zonefs: remove duplicate cleanup in zonefs_fill_super

2023-09-13 Thread Christoph Hellwig
When ->fill_super fails, ->kill_sb is called which already cleans up the inodes and zgroups. Drop the extra cleanup code in zonefs_fill_super. Signed-off-by: Christoph Hellwig --- fs/zonefs/super.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git

[PATCH 16/19] x86/resctrl: release rdtgroup_mutex and the CPU hotplug lock in rdt_shutdown_sb

2023-09-13 Thread Christoph Hellwig
While the resctl code is a bit confusing, I can't find anything protected by rdtgroup_mutex or the CPU hotplug lock in generic_shutdown_super or kernfs_free_sb. Drop the locks at the end of rdt_shutdown_sb to avoid holding locks over method calls and VFS code which itself already has a rather

[PATCH 02/19] fs: make ->kill_sb optional

2023-09-13 Thread Christoph Hellwig
Call generic_shutdown_super if ->kill_sb is not provided by the file system. This can't currently happen but will become common soon. Signed-off-by: Christoph Hellwig --- fs/super.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/super.c b/fs/super.c index

[PATCH 10/19] USB: gadget/legacy: remove sb_mutex

2023-09-13 Thread Christoph Hellwig
Creating new a new super_block vs freeing the old one for single instance file systems is serialized by the wait for SB_DEAD. Remove the superfluous sb_mutex. Signed-off-by: Christoph Hellwig --- drivers/usb/gadget/legacy/inode.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH 14/19] jffs2: convert to ->shutdown_sb and ->free_sb

2023-09-13 Thread Christoph Hellwig
Convert jffs2 from ->kill_sb to ->shutdown_sb and ->free_sb. Drop the otherwise unused kill_mtd_super helpers, as there is no benefit in it over just calling put_mtd_device on sb->s_mtd. Signed-off-by: Christoph Hellwig --- drivers/mtd/mtdsuper.c| 12 fs/jffs2/super.c

[PATCH 15/19] kernfs: split ->kill_sb

2023-09-13 Thread Christoph Hellwig
Split the kernfs_kill_sb helper into helpers for the new split shutdown_sb and free_sb methods. Note that resctrl has very odd locking in ->kill_sb, so this commit only releases the locking acquired in rdt_shutdown_sb in rdt_free_sb. This is not very good code and relies on ->shutdown_sb and

[PATCH 12/19] fs: convert kill_litter_super to litter_shutdown_sb

2023-09-13 Thread Christoph Hellwig
Replace kill_litter_super with litter_shutdown_sb, which is wired up to the ->shutdown_sb method. For file systems that wrapped kill_litter_super, ->kill_sb is replaced with ->shutdown and ->free_sb methods as needed. Signed-off-by: Christoph Hellwig ---

[PATCH 19/19] fs: remove ->kill_sb

2023-09-13 Thread Christoph Hellwig
Now that no instances are left, remove ->kill_sb and mark generic_shutdown_super static. Signed-off-by: Christoph Hellwig --- Documentation/filesystems/locking.rst | 5 - Documentation/filesystems/vfs.rst | 5 - fs/super.c| 25 +

[PATCH 08/19] pstore: shrink the pstore_sb_lock critical section in pstore_kill_sb

2023-09-13 Thread Christoph Hellwig
->kill_sb can't race with creating ->fill_super because pstore is a _single file system that only ever has a single sb instance, and we wait for the previous one to go away before creating a new one. Reduce the critical section so that is is not held over generic_shutdown_super. Signed-off-by:

[PATCH 13/19] fs: convert kill_block_super to block_free_sb

2023-09-13 Thread Christoph Hellwig
Replace kill_block_super with block_free_sb, which is wired up to the ->free_sb method. For file systems that wrapped kill_block_super, ->kill_sb is replaced with ->shutdown and ->free_sb methods as needed. Signed-off-by: Christoph Hellwig --- fs/adfs/super.c | 2 +- fs/affs/super.c

[PATCH 07/19] hypfs: use d_genocide to kill fs entries

2023-09-13 Thread Christoph Hellwig
hypfs is entirely synthetic and doesn't care about i_nlink when dropping entries from the cache. Switch to d_genocide instead of a home grown file remove loop for unmount and write (yes, really!). Signed-off-by: Christoph Hellwig --- arch/s390/hypfs/inode.c | 37

[PATCH 04/19] NFS: remove the s_dev field from struct nfs_server

2023-09-13 Thread Christoph Hellwig
Don't duplicate the dev_t in the nfs_server structure given that it can be trivially retrieved from the super_block. Signed-off-by: Christoph Hellwig --- fs/nfs/client.c | 2 +- fs/nfs/nfs4proc.c | 8 fs/nfs/nfs4trace.h| 6 +++--- fs/nfs/nfs4xdr.c

[PATCH 01/19] fs: reflow deactivate_locked_super

2023-09-13 Thread Christoph Hellwig
Return early for the case where the super block isn't cleaned up to reduce level of indentation. Signed-off-by: Christoph Hellwig --- fs/super.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/fs/super.c b/fs/super.c index

[PATCH 18/19] fs: simple ->shutdown_sb and ->free_sb conversions

2023-09-13 Thread Christoph Hellwig
Convert all file systems that just called generic_shutdown_super from ->kill_sb without any state kept from before the call to after it to ->shutdown_sb and ->free_sb as needed. Signed-off-by: Christoph Hellwig --- fs/9p/vfs_super.c | 14 +++--- fs/afs/super.c

split up ->kill_sb

2023-09-13 Thread Christoph Hellwig
Hi Al and Christian, this series splits ->kill_sb into separate ->shutdown_sb and ->free_sb methods and then calls generic_shutdown_super from common code to clean up the file system shutdown interface. As a first step towards that it moves allocating and freeing the anonymous block device dev_t

Re: [PATCH v2 01/14] arm64: dts: qcom: msm8916: Drop RPM bus clocks

2023-09-13 Thread Konrad Dybcio
On 13.09.2023 10:53, Krzysztof Kozlowski wrote: > On 13/09/2023 10:47, Konrad Dybcio wrote: >> On 13.09.2023 09:07, Krzysztof Kozlowski wrote: >>> On 12/09/2023 15:31, Konrad Dybcio wrote: These clocks are now handled from within the icc framework and are >>> >>> That's a driver behavior, not

Re: [PATCH v2 13/14] arm64: dts: qcom: msm8996: Remove PNoC clock from MSS

2023-09-13 Thread Yassine Oudjana
On 12/09/2023 4:31 pm, Konrad Dybcio wrote: > The PNoC clock is a clock for the entire PNoC bus, managed from > within the interconnect driver. Attaching it to MSS was a total hack. > Get rid of it and take the liberty to make the clock-names entries > more readable. > > Signed-off-by: Konrad

Re: [PATCH v2 12/14] arm64: dts: qcom: msm8996: Remove AGGRE2 clock from SLPI

2023-09-13 Thread Yassine Oudjana
On 12/09/2023 4:31 pm, Konrad Dybcio wrote: > The AGGRE2 clock is a clock for the entire AGGRE2 bus, managed from > within the interconnect driver. Attaching it to SLPI was a total hack. > Get rid of it. > > Signed-off-by: Konrad Dybcio > --- > arch/arm64/boot/dts/qcom/msm8996.dtsi | 5 ++--- >

Re: [PATCH v2 02/14] arm64: dts: qcom: msm8996: Drop RPM bus clocks

2023-09-13 Thread Yassine Oudjana
On 12/09/2023 4:31 pm, Konrad Dybcio wrote: > These clocks are now handled from within the icc framework and are > no longer registered from within the CCF. Remove them. > > Signed-off-by: Konrad Dybcio > --- > arch/arm64/boot/dts/qcom/msm8996.dtsi | 27 --- > 1 file

Re: [PATCH v4 03/18] x86/sgx: Add sgx_epc_lru_lists to encapsulate LRU lists

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > Introduce a data structure to wrap the existing reclaimable list and its > spinlock. Each cgroup later will have one instance of this structure to > track EPC pages allocated for processes associated with

[PATCH v1 1/1] lib/string_helpers: Don't copy a tail in kstrdup_and_replace() if 'new' is \0

2023-09-13 Thread Andy Shevchenko
The kstrdup_and_replace() takes two characters, old and new, to replace former with latter after the copying of the original string. But in case when new is a NUL, there is no point to copy the rest of the string, the contract with the callers is that that the function returns a NUL-terminated

Re: [PATCH v4 02/18] cgroup/misc: Add SGX EPC resource type and export APIs for SGX driver

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > The SGX driver will need to get access to the root misc_cg object > to do iterative walks and also determine if a charge will be > towards the root cgroup or not. What is "a charge" and why does SGX

Re: [PATCH v4 01/18] cgroup/misc: Add per resource callbacks for CSS events

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > Consumers of the misc cgroup controller might need to perform separate > actions for Cgroups Subsystem State(CSS) events: cgroup alloc and free. nit: s/State(CSS)/State (CSS)/ "cgroup alloc" and "cgroup

[PATCH v2 4/8] x86/vdso: Remove now superfluous sentinel element from ctl_table array

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

[PATCH v2 7/8] ia64: Remove now superfluous sentinel element from ctl_table array

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

[PATCH v2 8/8] c-sky: Remove now superfluous sentinel element from ctl_talbe array

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

[PATCH v2 6/8] powerpc: Remove now superfluous sentinel element from ctl_table arrays

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

[PATCH v2 3/8] arch/x86: Remove now superfluous sentinel elem from ctl_table arrays

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

[PATCH v2 2/8] arm: Remove now superfluous sentinel elem from ctl_table arrays

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

[PATCH v2 0/8] sysctl: Remove sentinel elements from arch

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados What? These commits remove the sentinel element (last empty element) from the sysctl arrays of all the files under the "arch/" directory that use a sysctl array for registration. The merging of the preparation patches (in

[PATCH v2 5/8] riscv: Remove now superfluous sentinel element from ctl_table array

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

[PATCH v2 1/8] S390: Remove now superfluous sentinel elem from ctl_table arrays

2023-09-13 Thread Joel Granados via B4 Relay
From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link :

  1   2   >