1. 18 Mar, 2024 18 commits
    • Randy Dunlap's avatar
      ftrace: Fix most kernel-doc warnings · d1530413
      Randy Dunlap authored
      Reduce the number of kernel-doc warnings from 52 down to 10, i.e.,
      fix 42 kernel-doc warnings by (a) using the Returns: format for
      function return values or (b) using "@var:" instead of "@var -"
      for function parameter descriptions.
      
      Fix one return values list so that it is formatted correctly when
      rendered for output.
      
      Spell "non-zero" with a hyphen in several places.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240223054833.15471-1-rdunlap@infradead.org
      
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Link: https://lore.kernel.org/oe-kbuild-all/202312180518.X6fRyDSN-lkp@intel.com/Reported-by: default avatarkernel test robot <lkp@intel.com>
      Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      d1530413
    • Steven Rostedt (Google)'s avatar
      tracing: Decrement the snapshot if the snapshot trigger fails to register · 2048fdc2
      Steven Rostedt (Google) authored
      Running the ftrace selftests caused the ring buffer mapping test to fail.
      Investigating, I found that the snapshot counter would be incremented
      every time a snapshot trigger was added, even if that snapshot trigger
      failed.
      
       # cd /sys/kernel/tracing
       # echo "snapshot" > events/sched/sched_process_fork/trigger
       # echo "snapshot" > events/sched/sched_process_fork/trigger
       -bash: echo: write error: File exists
      
      That second one that fails increments the snapshot counter but doesn't
      decrement it. It needs to be decremented when the snapshot fails.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240223013344.729055907@goodmis.org
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Vincent Donnefort <vdonnefort@google.com>
      Fixes: 16f7e48ffc53a ("tracing: Add snapshot refcount")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      2048fdc2
    • Steven Rostedt (Google)'s avatar
      tracing: Fix snapshot counter going between two tracers that use it · cca990c7
      Steven Rostedt (Google) authored
      Running the ftrace selftests caused the ring buffer mapping test to fail.
      Investigating, I found that the snapshot counter would be incremented
      every time a tracer that uses the snapshot is enabled even if the snapshot
      was used by the previous tracer.
      
      That is:
      
       # cd /sys/kernel/tracing
       # echo wakeup_rt > current_tracer
       # echo wakeup_dl > current_tracer
       # echo nop > current_tracer
      
      would leave the snapshot counter at 1 and not zero. That's because the
      enabling of wakeup_dl would increment the counter again but the setting
      the tracer to nop would only decrement it once.
      
      Do not arm the snapshot for a tracer if the previous tracer already had it
      armed.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240223013344.570525723@goodmis.org
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Vincent Donnefort <vdonnefort@google.com>
      Fixes: 16f7e48ffc53a ("tracing: Add snapshot refcount")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      cca990c7
    • Steven Rostedt (Google)'s avatar
      tracing: Use EVENT_NULL_STR macro instead of open coding "(null)" · 70a6ed55
      Steven Rostedt (Google) authored
      The TRACE_EVENT macros has some dependency if a __string() field is NULL,
      where it will save "(null)" as the string. This string is also used by
      __assign_str(). It's better to create a single macro instead of having
      something that will not be caught by the compiler if there is an
      unfortunate typo.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222211443.106216915@goodmis.org
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Suggested-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      70a6ed55
    • Steven Rostedt (Google)'s avatar
      tracing: Use ? : shortcut in trace macros · 91684986
      Steven Rostedt (Google) authored
      Instead of having:
      
        #define __assign_str(dst, src)					\
      	memcpy(__get_str(dst), __data_offsets.dst##_ptr_ ?		\
      		__data_offsets.dst##_ptr_ : "(null)",			\
      		__get_dynamic_array_len(dst))
      
      Use the ? : shortcut and compact it down to:
      
        #define __assign_str(dst, src)					\
      	memcpy(__get_str(dst), __data_offsets.dst##_ptr_ ? : "(null)",	\
      	       __get_dynamic_array_len(dst))
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222211442.949327725@goodmis.org
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Suggested-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      91684986
    • Steven Rostedt (Google)'s avatar
      tracing: Do not calculate strlen() twice for __string() fields · e8b737bf
      Steven Rostedt (Google) authored
      The TRACE_EVENT() macro handles dynamic strings by having:
      
        TP_PROTO(struct some_struct *s),
        TP_ARGS(s),
        TP_STRUCT__entry(
              __string(my_string, s->string)
       ),
       TP_fast_assign(
              __assign_str(my_string, s->string);
       )
       TP_printk("%s", __get_str(my_string))
      
      There's even some code that may call a function helper to find the
      s->string value. The problem with the above is that the work to get the
      s->string is done twice. Once at the __string() and again in the
      __assign_str().
      
      The length of the string is calculated via a strlen(), not once, but
      twice. Once during the __string() macro and again in __assign_str(). But
      the length is actually already recorded in the data location and here's no
      reason to call strlen() again.
      
      Just use the saved length that was saved in the __string() code for the
      __assign_str() code.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222211442.793074999@goodmis.org
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      e8b737bf
    • Steven Rostedt (Google)'s avatar
      tracing: Rework __assign_str() and __string() to not duplicate getting the string · c1fa617c
      Steven Rostedt (Google) authored
      The TRACE_EVENT() macro handles dynamic strings by having:
      
        TP_PROTO(struct some_struct *s),
        TP_ARGS(s),
        TP_STRUCT__entry(
      	__string(my_string, s->string)
       ),
       TP_fast_assign(
      	__assign_str(my_string, s->string);
       )
       TP_printk("%s", __get_str(my_string))
      
      There's even some code that may call a function helper to find the
      s->string value. The problem with the above is that the work to get the
      s->string is done twice. Once at the __string() and again in the
      __assign_str().
      
      But the __string() uses dynamic_array() which has a helper structure that
      is created holding the offsets and length of the string fields. Instead of
      finding the string twice, just save it off in another field from that
      helper structure, and have __assign_str() use that instead.
      
      Note, this also means that the second parameter of __assign_str() isn't
      even used anymore, and may be removed in the future.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222211442.634192653@goodmis.org
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      c1fa617c
    • Alison Schofield's avatar
      cxl/trace: Properly initialize cxl_poison region name · 6c871260
      Alison Schofield authored
      The TP_STRUCT__entry that gets assigned the region name, or an
      empty string if no region is present, is erroneously initialized
      to the cxl_region pointer. It needs to be properly initialized
      otherwise it's length is wrong and garbage chars can appear in
      the kernel trace output: /sys/kernel/tracing/trace
      
      The bad initialization was due in part to a naming conflict with
      the parameter: struct cxl_region *region. The field 'region' is
      already exposed externally as the region name, so changing that
      to something logical, like 'region_name' is not an option. Instead
      rename the internal only struct cxl_region to the commonly used
      'cxlr'.
      
      Impact is that tooling depending on that trace data can miss
      picking up a valid event when searching by region name. The
      TP_printk() output, if enabled, does emit the correct region
      names in the dmesg log.
      
      This was found during testing of the cxl-list option to report
      media-errors for a region.
      
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: stable@vger.kernel.org
      Fixes: ddf49d57 ("cxl/trace: Add TRACE support for CXL media-error records")
      Signed-off-by: default avatarAlison Schofield <alison.schofield@intel.com>
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      6c871260
    • Steven Rostedt (Google)'s avatar
      net: hns3: tracing: fix hclgevf trace event strings · 3f9952e8
      Steven Rostedt (Google) authored
      The __string() and __assign_str() helper macros of the TRACE_EVENT() macro
      are going through some optimizations where only the source string of
      __string() will be used and the __assign_str() source will be ignored and
      later removed.
      
      To make sure that there's no issues, a new check is added between the
      __string() src argument and the __assign_str() src argument that does a
      strcmp() to make sure they are the same string.
      
      The hclgevf trace events have:
      
        __assign_str(devname, &hdev->nic.kinfo.netdev->name);
      
      Which triggers the warning:
      
      hclgevf_trace.h:34:39: error: passing argument 1 of ‘strcmp’ from incompatible pointer type [-Werror=incompatible-pointer-types]
         34 |                 __assign_str(devname, &hdev->nic.kinfo.netdev->name);
       [..]
      arch/x86/include/asm/string_64.h:75:24: note: expected ‘const char *’ but argument is of type ‘char (*)[16]’
         75 | int strcmp(const char *cs, const char *ct);
            |            ~~~~~~~~~~~~^~
      
      Because __assign_str() now has:
      
      	WARN_ON_ONCE(__builtin_constant_p(src) ?		\
      		     strcmp((src), __data_offsets.dst##_ptr_) :	\
      		     (src) != __data_offsets.dst##_ptr_);	\
      
      The problem is the '&' on hdev->nic.kinfo.netdev->name. That's because
      that name is:
      
      	char			name[IFNAMSIZ]
      
      Where passing an address '&' of a char array is not compatible with strcmp().
      
      The '&' is not necessary, remove it.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240313093454.3909afe7@gandalf.local.home
      
      Cc: netdev <netdev@vger.kernel.org>
      Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
      Cc: Salil Mehta <salil.mehta@huawei.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Yufeng Mo <moyufeng@huawei.com>
      Cc: Huazhong Tan <tanhuazhong@huawei.com>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarJijie Shao <shaojijie@huawei.com>
      Fixes: d8355240 ("net: hns3: add trace event support for PF/VF mailbox")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      3f9952e8
    • Steven Rostedt (Google)'s avatar
      drm/i915: Add missing ; to __assign_str() macros in tracepoint code · 0df4c388
      Steven Rostedt (Google) authored
      I'm working on improving the __assign_str() and __string() macros to be
      more efficient, and removed some unneeded semicolons. This triggered a bug
      in the build as some of the __assign_str() macros in intel_display_trace
      was missing a terminating semicolon.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222133057.2af72a19@gandalf.local.home
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: David Airlie <airlied@gmail.com>
      Cc: stable@vger.kernel.org
      Fixes: 2ceea5d8 ("drm/i915: Print plane name in fbc tracepoints")
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      0df4c388
    • Steven Rostedt (Google)'s avatar
      NFSD: Fix nfsd_clid_class use of __string_len() macro · 9388a2aa
      Steven Rostedt (Google) authored
      I'm working on restructuring the __string* macros so that it doesn't need
      to recalculate the string twice. That is, it will save it off when
      processing __string() and the __assign_str() will not need to do the work
      again as it currently does.
      
      Currently __string_len(item, src, len) doesn't actually use "src", but my
      changes will require src to be correct as that is where the __assign_str()
      will get its value from.
      
      The event class nfsd_clid_class has:
      
        __string_len(name, name, clp->cl_name.len)
      
      But the second "name" does not exist and causes my changes to fail to
      build. That second parameter should be: clp->cl_name.data.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222122828.3d8d213c@gandalf.local.home
      
      Cc: Neil Brown <neilb@suse.de>
      Cc: Olga Kornievskaia <kolga@netapp.com>
      Cc: Dai Ngo <Dai.Ngo@oracle.com>
      Cc: Tom Talpey <tom@talpey.com>
      Cc: stable@vger.kernel.org
      Fixes: d27b74a8 ("NFSD: Use new __string_len C macros for nfsd_clid_class")
      Acked-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Acked-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      9388a2aa
    • John Garry's avatar
      tracing: Use init_utsname()->release · ed896837
      John Garry authored
      Instead of using UTS_RELEASE, use init_utsname()->release, which means that
      we don't need to rebuild the code just for the git head commit changing.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222124639.65629-1-john.g.garry@oracle.comSigned-off-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      ed896837
    • Beau Belgrave's avatar
      tracing/user_events: Document multi-format flag · 3727db1c
      Beau Belgrave authored
      User programs can now ask user_events to handle the synchronization of
      multiple different formats for an event with the same name via the new
      USER_EVENT_REG_MULTI_FORMAT flag.
      
      Add a section for USER_EVENT_REG_MULTI_FORMAT that explains the intended
      purpose and caveats of using it. Explain how deletion works in these
      cases and how to use /sys/kernel/tracing/dynamic_events for per-version
      deletion.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222001807.1463-5-beaub@linux.microsoft.comSigned-off-by: default avatarBeau Belgrave <beaub@linux.microsoft.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      3727db1c
    • Beau Belgrave's avatar
      selftests/user_events: Test multi-format events · bcb7bdcc
      Beau Belgrave authored
      User_events now has multi-format events which allow for the same
      register name, but with different formats. When this occurs, different
      tracepoints are created with unique names.
      
      Add a new test that ensures the same name can be used for two different
      formats. Ensure they are isolated from each other and that name and arg
      matching still works if yet another register comes in with the same
      format as one of the two.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222001807.1463-4-beaub@linux.microsoft.comSigned-off-by: default avatarBeau Belgrave <beaub@linux.microsoft.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      bcb7bdcc
    • Beau Belgrave's avatar
      tracing/user_events: Introduce multi-format events · 64805e40
      Beau Belgrave authored
      Currently user_events supports 1 event with the same name and must have
      the exact same format when referenced by multiple programs. This opens
      an opportunity for malicious or poorly thought through programs to
      create events that others use with different formats. Another scenario
      is user programs wishing to use the same event name but add more fields
      later when the software updates. Various versions of a program may be
      running side-by-side, which is prevented by the current single format
      requirement.
      
      Add a new register flag (USER_EVENT_REG_MULTI_FORMAT) which indicates
      the user program wishes to use the same user_event name, but may have
      several different formats of the event. When this flag is used, create
      the underlying tracepoint backing the user_event with a unique name
      per-version of the format. It's important that existing ABI users do
      not get this logic automatically, even if one of the multi format
      events matches the format. This ensures existing programs that create
      events and assume the tracepoint name will match exactly continue to
      work as expected. Add logic to only check multi-format events with
      other multi-format events and single-format events to only check
      single-format events during find.
      
      Change system name of the multi-format event tracepoint to ensure that
      multi-format events are isolated completely from single-format events.
      This prevents single-format names from conflicting with multi-format
      events if they end with the same suffix as the multi-format events.
      
      Add a register_name (reg_name) to the user_event struct which allows for
      split naming of events. We now have the name that was used to register
      within user_events as well as the unique name for the tracepoint. Upon
      registering events ensure matches based on first the reg_name, followed
      by the fields and format of the event. This allows for multiple events
      with the same registered name to have different formats. The underlying
      tracepoint will have a unique name in the format of {reg_name}.{unique_id}.
      
      For example, if both "test u32 value" and "test u64 value" are used with
      the USER_EVENT_REG_MULTI_FORMAT the system would have 2 unique
      tracepoints. The dynamic_events file would then show the following:
        u:test u64 count
        u:test u32 count
      
      The actual tracepoint names look like this:
        test.0
        test.1
      
      Both would be under the new user_events_multi system name to prevent the
      older ABI from being used to squat on multi-formatted events and block
      their use.
      
      Deleting events via "!u:test u64 count" would only delete the first
      tracepoint that matched that format. When the delete ABI is used all
      events with the same name will be attempted to be deleted. If
      per-version deletion is required, user programs should either not use
      persistent events or delete them via dynamic_events.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222001807.1463-3-beaub@linux.microsoft.comSigned-off-by: default avatarBeau Belgrave <beaub@linux.microsoft.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      64805e40
    • Beau Belgrave's avatar
      tracing/user_events: Prepare find/delete for same name events · 1e953de9
      Beau Belgrave authored
      The current code for finding and deleting events assumes that there will
      never be cases when user_events are registered with the same name, but
      different formats. Scenarios exist where programs want to use the same
      name but have different formats. An example is multiple versions of a
      program running side-by-side using the same event name, but with updated
      formats in each version.
      
      This change does not yet allow for multi-format events. If user_events
      are registered with the same name but different arguments the programs
      see the same return values as before. This change simply makes it
      possible to easily accommodate for this.
      
      Update find_user_event() to take in argument parameters and register
      flags to accommodate future multi-format event scenarios. Have find
      validate argument matching and return error pointers to cover when
      an existing event has the same name but different format. Update
      callers to handle error pointer logic.
      
      Move delete_user_event() to use hash walking directly now that
      find_user_event() has changed. Delete all events found that match the
      register name, stop if an error occurs and report back to the user.
      
      Update user_fields_match() to cover list_empty() scenarios now that
      find_user_event() uses it directly. This makes the logic consistent
      across several callsites.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240222001807.1463-2-beaub@linux.microsoft.comSigned-off-by: default avatarBeau Belgrave <beaub@linux.microsoft.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      1e953de9
    • Vincent Donnefort's avatar
      tracing: Add snapshot refcount · 180e4e39
      Vincent Donnefort authored
      When a ring-buffer is memory mapped by user-space, no trace or
      ring-buffer swap is possible. This means the snapshot feature is
      mutually exclusive with the memory mapping. Having a refcount on
      snapshot users will help to know if a mapping is possible or not.
      
      Instead of relying on the global trace_types_lock, a new spinlock is
      introduced to serialize accesses to trace_array->snapshot. This intends
      to allow access to that variable in a context where the mmap lock is
      already held.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240220202310.2489614-4-vdonnefort@google.comSigned-off-by: default avatarVincent Donnefort <vdonnefort@google.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      180e4e39
    • Steven Rostedt (Google)'s avatar
      ring-buffer: Make wake once of ring_buffer_wait() more robust · b70f2938
      Steven Rostedt (Google) authored
      The default behavior of ring_buffer_wait() when passed a NULL "cond"
      parameter is to exit the function the first time it is woken up. The
      current implementation uses a counter that starts at zero and when it is
      greater than one it exits the wait_event_interruptible().
      
      But this relies on the internal working of wait_event_interruptible() as
      that code basically has:
      
        if (cond)
          return;
        prepare_to_wait();
        if (!cond)
          schedule();
        finish_wait();
      
      That is, cond is called twice before it sleeps. The default cond of
      ring_buffer_wait() needs to account for that and wait for its counter to
      increment twice before exiting.
      
      Instead, use the seq/atomic_inc logic that is used by the tracing code
      that calls this function. Add an atomic_t seq to rb_irq_work and when cond
      is NULL, have the default callback take a descriptor as its data that
      holds the rbwork and the value of the seq when it started.
      
      The wakeups will now increment the rbwork->seq and the cond callback will
      simply check if that number is different, and no longer have to rely on
      the implementation of wait_event_interruptible().
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240315063115.6cb5d205@gandalf.local.home
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Fixes: 7af9ded0 ("ring-buffer: Use wait_event_interruptible() in ring_buffer_wait()")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      b70f2938
  2. 17 Mar, 2024 7 commits
  3. 14 Mar, 2024 15 commits
    • Linus Torvalds's avatar
      Merge tag 'trace-ring-buffer-v6.8-rc7-2' of... · 63bd30f2
      Linus Torvalds authored
      Merge tag 'trace-ring-buffer-v6.8-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
      
      Pull tracing updates from Steven Rostedt:
      
       - Do not update shortest_full in rb_watermark_hit() if the watermark is
         hit. The shortest_full field was being updated regardless if the task
         was going to wait or not. If the watermark is hit, then the task is
         not going to wait, so do not update the shortest_full field (used by
         the waker).
      
       - Update shortest_full field before setting the full_waiters_pending
         flag
      
         In the poll logic, the full_waiters_pending flag was being set before
         the shortest_full field was set. If the full_waiters_pending flag is
         set, writers will check the shortest_full field which has the least
         percentage of data that the ring buffer needs to be filled before
         waking up. The writer will check shortest_full if
         full_waiters_pending is set, and if the ring buffer percentage filled
         is greater than shortest full, then it will call the irq_work to wake
         up the waiters.
      
         The problem was that the poll logic set the full_waiters_pending flag
         before updating shortest_full, which when zero will always trigger
         the writer to call the irq_work to wake up the waiters. The irq_work
         will reset the shortest_full field back to zero as the woken waiters
         is suppose to reset it.
      
       - There's some optimized logic in the rb_watermark_hit() that is used
         in ring_buffer_wait(). Use that helper function in the poll logic as
         well.
      
       - Restructure ring_buffer_wait() to use wait_event_interruptible()
      
         The logic to wake up pending readers when the file descriptor is
         closed is racy. Restructure ring_buffer_wait() to allow callers to
         pass in conditions besides the ring buffer having enough data in it
         by using wait_event_interruptible().
      
       - Update the tracing_wait_on_pipe() to call ring_buffer_wait() with its
         own conditions to exit the wait loop.
      
      * tag 'trace-ring-buffer-v6.8-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing/ring-buffer: Fix wait_on_pipe() race
        ring-buffer: Use wait_event_interruptible() in ring_buffer_wait()
        ring-buffer: Reuse rb_watermark_hit() for the poll logic
        ring-buffer: Fix full_waiters_pending in poll
        ring-buffer: Do not set shortest_full when full target is hit
      63bd30f2
    • Linus Torvalds's avatar
      Merge tag 'probes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 01732755
      Linus Torvalds authored
      Pull probes updates from Masami Hiramatsu:
       "x86 kprobes:
      
         - Use boolean for some function return instead of 0 and 1
      
         - Prohibit probing on INT/UD. This prevents user to put kprobe on
           INTn/INT1/INT3/INTO and UD0/UD1/UD2 because these are used for a
           special purpose in the kernel
      
         - Boost Grp instructions. Because a few percent of kernel
           instructions are Grp 2/3/4/5 and those are safe to be executed
           without ip register fixup, allow those to be boosted (direct
           execution on the trampoline buffer with a JMP)
      
        tracing:
      
         - Add function argument access from return events (kretprobe and
           fprobe). This allows user to compare how a data structure field is
           changed after executing a function. With BTF, return event also
           accepts function argument access by name.
      
         - Fix a wrong comment (using "Kretprobe" in fprobe)
      
         - Cleanup a big probe argument parser function into three parts, type
           parser, post-processing function, and main parser
      
         - Cleanup to set nr_args field when initializing trace_probe instead
           of counting up it while parsing
      
         - Cleanup a redundant #else block from tracefs/README source code
      
         - Update selftests to check entry argument access from return probes
      
         - Documentation update about entry argument access from return
           probes"
      
      * tag 'probes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        Documentation: tracing: Add entry argument access at function exit
        selftests/ftrace: Add test cases for entry args at function exit
        tracing/probes: Support $argN in return probe (kprobe and fprobe)
        tracing: Remove redundant #else block for BTF args from README
        tracing/probes: cleanup: Set trace_probe::nr_args at trace_probe_init
        tracing/probes: Cleanup probe argument parser
        tracing/fprobe-event: cleanup: Fix a wrong comment in fprobe event
        x86/kprobes: Boost more instructions from grp2/3/4/5
        x86/kprobes: Prohibit kprobing on INT and UD
        x86/kprobes: Refactor can_{probe,boost} return type to bool
      01732755
    • Linus Torvalds's avatar
      Merge tag 'lsm-pr-20240314' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm · c0a614e8
      Linus Torvalds authored
      Pull lsm fixes from Paul Moore:
       "Two fixes to address issues with the LSM syscalls that we shipped in
        Linux v6.8. The first patch might be a bit controversial, but the
        second is a rather straightforward fix; more on both below.
      
        The first fix from Casey addresses a problem that should have been
        caught during the ~16 month (?) review cycle, but sadly was not. The
        good news is that Dmitry caught it very quickly once Linux v6.8 was
        released. The core issue is the use of size_t parameters to pass
        buffer sizes back and forth in the syscall; while we could have solved
        this with a compat syscall definition, given the newness of the
        syscalls I wanted to attempt to just redefine the size_t parameters as
        u32 types and avoid the work associated with a set of compat syscalls.
      
        However, this is technically a change in the syscall's signature/API
        so I can understand if you're opposed to this, even if the syscalls
        are less than a week old.
      
         [ Fingers crossed nobody even notices - Linus ]
      
        The second fix is a rather trivial fix to allow userspace to call into
        the lsm_get_self_attr() syscall with a NULL buffer to quickly
        determine a minimum required size for the buffer. We do have
        kselftests for this very case, I'm not sure why I didn't notice the
        failure; I'm going to guess stupidity, tired eyes, I dunno. My
        apologies we didn't catch this earlier"
      
      * tag 'lsm-pr-20240314' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
        lsm: handle the NULL buffer case in lsm_fill_user_ctx()
        lsm: use 32-bit compatible data types in LSM syscalls
      c0a614e8
    • Linus Torvalds's avatar
      Merge tag 'landlock-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux · 35e886e8
      Linus Torvalds authored
      Pull landlock updates from Mickaël Salaün:
       "Some miscellaneous improvements, including new KUnit tests, extended
        documentation and boot help, and some cosmetic cleanups.
      
        Additional test changes already went through the net tree"
      
      * tag 'landlock-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
        samples/landlock: Don't error out if a file path cannot be opened
        landlock: Use f_cred in security_file_open() hook
        landlock: Rename "ptrace" files to "task"
        landlock: Simplify current_check_access_socket()
        landlock: Warn once if a Landlock action is requested while disabled
        landlock: Extend documentation for kernel support
        landlock: Add support for KUnit tests
        selftests/landlock: Clean up error logs related to capabilities
      35e886e8
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of https://github.com/openrisc/linux · 29da654b
      Linus Torvalds authored
      Pull OpenRISC updates from Stafford Horne:
       "Just a few cleanups and updates that were sent in:
      
         - Replace asm/fixmap.h with asm-generic version
      
         - Fix to move memblock setup up before it's used during init"
      
      * tag 'for-linus' of https://github.com/openrisc/linux:
        openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix()
        openrisc: Call setup_memory() earlier in the init sequence
      29da654b
    • Linus Torvalds's avatar
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 6d75c6f4
      Linus Torvalds authored
      Pull arm64 updates from Catalin Marinas:
       "The major features are support for LPA2 (52-bit VA/PA with 4K and 16K
        pages), the dpISA extension and Rust enabled on arm64. The changes are
        mostly contained within the usual arch/arm64/, drivers/perf, the arm64
        Documentation and kselftests. The exception is the Rust support which
        touches some generic build files.
      
        Summary:
      
         - Reorganise the arm64 kernel VA space and add support for LPA2 (at
           stage 1, KVM stage 2 was merged earlier) - 52-bit VA/PA address
           range with 4KB and 16KB pages
      
         - Enable Rust on arm64
      
         - Support for the 2023 dpISA extensions (data processing ISA), host
           only
      
         - arm64 perf updates:
      
            - StarFive's StarLink (integrates one or more CPU cores with a
              shared L3 memory system) PMU support
      
            - Enable HiSilicon Erratum 162700402 quirk for HIP09
      
            - Several updates for the HiSilicon PCIe PMU driver
      
            - Arm CoreSight PMU support
      
            - Convert all drivers under drivers/perf/ to use .remove_new()
      
         - Miscellaneous:
      
            - Don't enable workarounds for "rare" errata by default
      
            - Clean up the DAIF flags handling for EL0 returns (in preparation
              for NMI support)
      
            - Kselftest update for ptrace()
      
            - Update some of the sysreg field definitions
      
            - Slight improvement in the code generation for inline asm I/O
              accessors to permit offset addressing
      
            - kretprobes: acquire regs via a BRK exception (previously done
              via a trampoline handler)
      
            - SVE/SME cleanups, comment updates
      
            - Allow CALL_OPS+CC_OPTIMIZE_FOR_SIZE with clang (previously
              disabled due to gcc silently ignoring -falign-functions=N)"
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (134 commits)
        Revert "mm: add arch hook to validate mmap() prot flags"
        Revert "arm64: mm: add support for WXN memory translation attribute"
        Revert "ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512"
        ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512
        kselftest/arm64: Add 2023 DPISA hwcap test coverage
        kselftest/arm64: Add basic FPMR test
        kselftest/arm64: Handle FPMR context in generic signal frame parser
        arm64/hwcap: Define hwcaps for 2023 DPISA features
        arm64/ptrace: Expose FPMR via ptrace
        arm64/signal: Add FPMR signal handling
        arm64/fpsimd: Support FEAT_FPMR
        arm64/fpsimd: Enable host kernel access to FPMR
        arm64/cpufeature: Hook new identification registers up to cpufeature
        docs: perf: Fix build warning of hisi-pcie-pmu.rst
        perf: starfive: Only allow COMPILE_TEST for 64-bit architectures
        MAINTAINERS: Add entry for StarFive StarLink PMU
        docs: perf: Add description for StarFive's StarLink PMU
        dt-bindings: perf: starfive: Add JH8100 StarLink PMU
        perf: starfive: Add StarLink PMU support
        docs: perf: Update usage for target filter of hisi-pcie-pmu
        ...
      6d75c6f4
    • Linus Torvalds's avatar
      Merge tag 'sound-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · fe46a7dd
      Linus Torvalds authored
      Pull sound updates from Takashi Iwai:
       "This was a relatively calm development cycle. Most of changes are
        rather small device-specific fixes and enhancements. The only
        significant changes in ALSA core are code refactoring with the recent
        cleanup infrastructure, which should bring no functionality changes.
        Some highlights below:
      
        Core:
         - Lots of cleanups in ALSA core code with automatic kfree cleanup and
           locking guard macros
         - New ALSA core kunit test
      
        ASoC:
         - SoundWire support for AMD ACP 6.3 systems
         - Support for reporting version information for AVS firmware
         - Support DSPless mode for Intel Soundwire systems
         - Support for configuring CS35L56 amplifiers using EFI calibration
           data
         - Log which component is being operated on as part of power
           management trace events.
         - Support for Microchip SAM9x7, NXP i.MX95 and Qualcomm WCD939x
      
        HD- and USB-audio:
         - More Cirrus HD-audio codec support
         - TAS2781 HD-audio codec fixes
         - Scarlett2 mixer fixes
      
        Others:
         - Enhancement of virtio driver for audio control supports
         - Cleanups of legacy PM code with new macros
         - Firewire sound updates"
      
      * tag 'sound-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (307 commits)
        ALSA: usb-audio: Stop parsing channels bits when all channels are found.
        ALSA: hda/tas2781: remove unnecessary runtime_pm calls
        ALSA: hda/realtek - ALC236 fix volume mute & mic mute LED on some HP models
        ALSA: aaci: Delete unused variable in aaci_do_suspend
        ALSA: scarlett2: Fix Scarlett 4th Gen input gain range again
        ALSA: scarlett2: Fix Scarlett 4th Gen input gain range
        ALSA: scarlett2: Fix Scarlett 4th Gen autogain status values
        ALSA: scarlett2: Fix Scarlett 4th Gen 4i4 low-voltage detection
        ALSA: hda/tas2781: restore power state after system_resume
        ALSA: hda/tas2781: do not call pm_runtime_force_* in system_resume/suspend
        ALSA: hda/tas2781: do not reset cur_* values in runtime_suspend
        ALSA: hda/tas2781: add lock to system_suspend
        ALSA: hda/tas2781: use dev_dbg in system_resume
        ALSA: hda/realtek: fix ALC285 issues on HP Envy x360 laptops
        platform/x86: serial-multi-instantiate: Add support for CS35L54 and CS35L57
        ALSA: hda: cs35l56: Add support for CS35L54 and CS35L57
        ASoC: cs35l56: Add support for CS35L54 and CS35L57
        ASoC: Intel: catpt: Carefully use PCI bitwise constants
        ALSA: hda: hda_component: Include sound/hda_codec.h
        ALSA: hda: hda_component: Add missing #include guards
        ...
      fe46a7dd
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 705c1da8
      Linus Torvalds authored
      Pull PCI updates from Bjorn Helgaas:
       "Enumeration:
      
         - Consolidate interrupt related code in irq.c (Ilpo Järvinen)
      
         - Reduce kernel size by replacing sysfs resource macros with
           functions (Ilpo Järvinen)
      
         - Reduce kernel size by compiling sysfs support only when
           CONFIG_SYSFS=y (Lukas Wunner)
      
         - Avoid using Extended Tags on 3ware-9650SE Root Port to work around
           an apparent hardware defect (Jörg Wedekind)
      
        Resource management:
      
         - Fix an MMIO mapping leak in pci_iounmap() (Philipp Stanner)
      
         - Move pci_iomap.c and other PCI-specific devres code to drivers/pci
           (Philipp Stanner)
      
         - Consolidate PCI devres code in devres.c (Philipp Stanner)
      
        Power management:
      
         - Avoid D3cold on Asus B1400 PCI-NVMe bridge, where firmware doesn't
           know how to return correctly to D0, and remove previous quirk that
           wasn't as specific (Daniel Drake)
      
         - Allow runtime PM when the driver enables it but doesn't need any
           runtime PM callbacks (Raag Jadav)
      
         - Drain runtime-idle callbacks before driver removal to avoid races
           between .remove() and .runtime_idle(), which caused intermittent
           page faults when the rtsx .runtime_idle() accessed registers that
           its .remove() had already unmapped (Rafael J. Wysocki)
      
        Virtualization:
      
         - Avoid Secondary Bus Reset on LSI FW643 so it can be assigned to VMs
           with VFIO, e.g., for professional audio software on many Apple
           machines, at the cost of leaking state between VMs (Edmund Raile)
      
        Error handling:
      
         - Print all logged TLP Prefixes, not just the first, after AER or DPC
           errors (Ilpo Järvinen)
      
         - Quirk the DPC PIO log size for Intel Raptor Lake Root Ports, which
           still don't advertise a legal size (Paul Menzel)
      
         - Ignore expected DPC Surprise Down errors on hot removal (Smita
           Koralahalli)
      
         - Block runtime suspend while handling AER errors to avoid races that
           prevent the device form being resumed from D3hot (Stanislaw
           Gruszka)
      
        Peer-to-peer DMA:
      
         - Use atomic XA allocation in RCU read section (Christophe JAILLET)
      
        ASPM:
      
         - Collect bits of ASPM-related code that we need even without
           CONFIG_PCIEASPM into aspm.c (David E. Box)
      
         - Save/restore L1 PM Substates config for suspend/resume (David E.
           Box)
      
         - Update save_save when ASPM config is changed, so a .slot_reset()
           during error recovery restores the changed config, not the
           .probe()-time config (Vidya Sagar)
      
        Endpoint framework:
      
         - Refactor and improve pci_epf_alloc_space() API (Niklas Cassel)
      
         - Clean up endpoint BAR descriptions (Niklas Cassel)
      
         - Fix ntb_register_device() name leak in error path (Yang Yingliang)
      
         - Return actual error code for pci_vntb_probe() failure (Yang
           Yingliang)
      
        Broadcom STB PCIe controller driver:
      
         - Fix MDIO write polling, which previously never waited for
           completion (Jonathan Bell)
      
        Cadence PCIe endpoint driver:
      
         - Clear the ARI "Next Function Number" of last function (Jasko-EXT
           Wojciech)
      
        Freescale i.MX6 PCIe controller driver:
      
         - Simplify by replacing switch statements with function pointers for
           different hardware variants (Frank Li)
      
         - Simplify by using clk_bulk*() API (Frank Li)
      
         - Remove redundant DT clock and reg/reg-name details (Frank Li)
      
         - Add i.MX95 DT and driver support for both Root Complex and Endpoint
           mode (Frank Li)
      
        Microsoft Hyper-V host bridge driver:
      
         - Reduce memory usage by limiting ring buffer size to 16KB instead of
           4 pages (Michael Kelley)
      
        Qualcomm PCIe controller driver:
      
         - Add X1E80100 DT and driver support (Abel Vesa)
      
         - Add DT 'required-opps' for SoCs that require a minimum performance
           level (Johan Hovold)
      
         - Make DT 'msi-map-mask' optional, depending on how MSI interrupts
           are mapped (Johan Hovold)
      
         - Disable ASPM L0s for sc8280xp, sa8540p and sa8295p because the PHY
           configuration isn't tuned correctly for L0s (Johan Hovold)
      
         - Split dt-binding qcom,pcie.yaml into qcom,pcie-common.yaml and
           separate files for SA8775p, SC7280, SC8180X, SC8280XP, SM8150,
           SM8250, SM8350, SM8450, SM8550 for easier reviewing (Krzysztof
           Kozlowski)
      
         - Enable BDF to SID translation by disabling bypass mode (Manivannan
           Sadhasivam)
      
         - Add endpoint MHI support for Snapdragon SA8775P SoC (Mrinmay
           Sarkar)
      
        Synopsys DesignWare PCIe controller driver:
      
         - Allocate 64-bit MSI address if no 32-bit address is available (Ajay
           Agarwal)
      
         - Fix endpoint Resizable BAR to actually advertise the required 1MB
           size (Niklas Cassel)
      
        MicroSemi Switchtec management driver:
      
         - Release resources if the .probe() fails (Christophe JAILLET)
      
        Miscellaneous:
      
         - Make pcie_port_bus_type const (Ricardo B. Marliere)"
      
      * tag 'pci-v6.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (77 commits)
        PCI/ASPM: Update save_state when configuration changes
        PCI/ASPM: Disable L1 before configuring L1 Substates
        PCI/ASPM: Call pci_save_ltr_state() from pci_save_pcie_state()
        PCI/ASPM: Save L1 PM Substates Capability for suspend/resume
        PCI: hv: Fix ring buffer size calculation
        PCI: dwc: endpoint: Fix advertised resizable BAR size
        PCI: cadence: Clear the ARI Capability Next Function Number of the last function
        PCI: dwc: Strengthen the MSI address allocation logic
        PCI: brcmstb: Fix broken brcm_pcie_mdio_write() polling
        PCI: qcom: Add X1E80100 PCIe support
        dt-bindings: PCI: qcom: Document the X1E80100 PCIe Controller
        PCI: qcom: Enable BDF to SID translation properly
        PCI/AER: Generalize TLP Header Log reading
        PCI/AER: Use explicit register size for PCI_ERR_CAP
        PCI: qcom: Disable ASPM L0s for sc8280xp, sa8540p and sa8295p
        dt-bindings: PCI: qcom: Do not require 'msi-map-mask'
        dt-bindings: PCI: qcom: Allow 'required-opps'
        PCI/AER: Block runtime suspend when handling errors
        PCI/ASPM: Move pci_save_ltr_state() to aspm.c
        PCI/ASPM: Always build aspm.c
        ...
      705c1da8
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.9-1' of... · 66fd6d0b
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver updates from Ilpo Järvinen:
      
       - New acer-wmi HW support
      
       - Support for new revision of amd/pmf heartbeat notify
      
       - Correctly handle asus-wmi HW without LEDs
      
       - fujitsu-laptop battery charge control support
      
       - Support for new hp-wmi thermal profiles
      
       - Support ideapad-laptop refresh rate key
      
       - Put intel/pmc AI accelerator (GNA) into D3 if it has no driver to
         allow entry into low-power modes, and temporarily removed Lunar Lake
         SSRAM support due to breaking FW changes causing probe fail (further
         breaking FW changes are still pending)
      
       - Report pmc/punit_atom devices that prevent reacing low power levels
      
       - Surface Fan speed function support
      
       - Support for more sperial keys and complete the list of models with
         non-standard fan registers in thinkpad_acpi
      
       - New DMI touchscreen HW support
      
       - Continued modernization efforts of wmi
      
       - Removal of obsoleted ledtrig-audio call and the related dependency
      
       - Debug & metrics interface improvements
      
       - Miscellaneous cleanups / fixes / improvements
      
      * tag 'platform-drivers-x86-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (87 commits)
        platform/x86/intel/pmc: Improve PKGC residency counters debug
        platform/x86: asus-wmi: Consider device is absent when the read is ~0
        Documentation/x86/amd/hsmp: Updating urls
        platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check
        platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles
        platform/x86/amd/pmf: Add support to get sps default APTS index values
        platform/x86/amd/pmf: Add support to get APTS index numbers for static slider
        platform/x86/amd/pmf: Add support to notify sbios heart beat event
        platform/x86/amd/pmf: Add support to get sbios requests in PMF driver
        platform/x86/amd/pmf: Disable debugfs support for querying power thermals
        platform/x86/amd/pmf: Differentiate PMF ACPI versions
        x86/platform/atom: Check state of Punit managed devices on s2idle
        platform/x86: pmc_atom: Check state of PMC clocks on s2idle
        platform/x86: pmc_atom: Check state of PMC managed devices on s2idle
        platform/x86: pmc_atom: Annotate d3_sts register bit defines
        clk: x86: Move clk-pmc-atom register defines to include/linux/platform_data/x86/pmc_atom.h
        platform/x86: make fw_attr_class constant
        platform/x86/intel/tpmi: Change vsec offset to u64
        platform/x86: intel_scu_pcidrv: Remove unused intel-mid.h
        platform/x86: intel_scu_wdt: Remove unused intel-mid.h
        ...
      66fd6d0b
    • Linus Torvalds's avatar
      Merge tag 'leds-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds · f5c31bcf
      Linus Torvalds authored
      Pull LED updates from Lee Jones:
       "Core Framework:
         - Introduce ExpressWire library
      
        New Drivers:
         - Add support for ON Semiconductor NCP5623 RGB LED Driver
      
        New Device Support:
         - Add support for PM660L to Qualcomm's LPG driver
      
        New Functionality:
         - Dynamically load modules required for the default-trigger
         - Add some support for suspend and resume
         - Allow LEDs to remain lit during suspend
      
        Fix-ups:
         - Device Tree binding adaptions/conversions/creation
         - Fix include lists; alphabetise, remove unused, explicitly add used
         - Add new led_match_default_trigger to avoid duplication
         - Add module alias' to aid auto-loading
         - Default to hw_control if no others are specified
         - De-bloat the supported link speed attribute lists
         - Remove superfluous code and simplify overall
         - Constify some variables
      
        Bug Fixes:
         - Prevent kernel panic when renaming the net interface
         - Fix Kconfig related build errors
         - Ensure mutexes are unlocked prior to destroying them
         - Provide clean-up between state changes to avoid invalid state
         - Fix some broken kernel-doc headers"
      
      * tag 'leds-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (41 commits)
        leds: ncp5623: Add MS suffix to time defines
        leds: Add NCP5623 multi-led driver
        dt-bindings: leds: Add NCP5623 multi-LED Controller
        leds: mlxreg: Drop an excess struct mlxreg_led_data member
        leds: leds-mlxcpld: Fix struct mlxcpld_led_priv member name
        leds: lm3601x: Fix struct lm3601_led kernel-doc warnings
        leds: Fix ifdef check for gpio_led_register_device()
        dt-bindings: leds: qcom-lpg: Narrow nvmem for other variants
        dt-bindings: leds: qcom-lpg: Drop redundant qcom,pm8550-pwm in if:then:
        dt-bindings: leds: Add LED_FUNCTION_WAN_ONLINE for Internet access
        leds: sgm3140: Add missing timer cleanup and flash gpio control
        leds: expresswire: Don't depend on NEW_LEDS
        Revert "leds: Only descend into leds directory when CONFIG_NEW_LEDS is set"
        leds: aw2013: Unlock mutex before destroying it
        leds: qcom-lpg: Add QCOM_PBS dependency
        leds: rgb: leds-group-multicolor: Allow LEDs to stay on in suspend
        leds: trigger: netdev: Fix kernel panic on interface rename trig notify
        leds: qcom-lpg: Add PM660L configuration and compatible
        leds: spi-byte: Use devm_led_classdev_register_ext()
        leds: pca963x: Add support for suspend and resume
        ...
      f5c31bcf
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · f3d8f29d
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "New Drivers:
         - Add support for Kinetic KTD2801 Backlight
      
        Fix-ups:
         - Fix include lists; alphabetise, remove unused, explicitly add used
         - Device Tree binding adaptions/conversions/creation
         - Use dev_err_probe() to clean-up error paths
         - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations
      
        Bug Fixes:
         - Fix changes of NULL pointer dereference
         - Remedy a bunch of logic errors
         - Initialise (zero) Backlight properties data structures"
      
      * tag 'backlight-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (32 commits)
        backlight: pandora_bl: Drop unneeded ENOMEM error message
        backlight: lm3630a_bl: Simplify probe return on gpio request error
        backlight: lm3630a_bl: Handle deferred probe
        backlight: as3711_bl: Handle deferred probe
        backlight: bd6107: Handle deferred probe
        backlight: l4f00242t03: Simplify with dev_err_probe()
        backlight: gpio: Simplify with dev_err_probe()
        backlight: lp8788: Fully initialize backlight_properties during probe
        backlight: lm3639: Fully initialize backlight_properties during probe
        backlight: da9052: Fully initialize backlight_properties during probe
        backlight: lm3630a: Use backlight_get_brightness helper in update_status
        backlight: lm3630a: Don't set bl->props.brightness in get_brightness
        backlight: lm3630a: Initialize backlight_properties on init
        backlight: mp3309c: Fully initialize backlight_properties during probe
        backlight: mp3309c: Utilise temporary variable for struct device
        backlight: mp3309c: Use dev_err_probe() instead of dev_err()
        backlight: mp3309c: Make use of device properties
        dt-bindings: backlight: qcom-wled: Fix bouncing email addresses
        backlight: hx8357: Utilise temporary variable for struct device
        backlight: hx8357: Make use of dev_err_probe()
        ...
      f3d8f29d
    • Linus Torvalds's avatar
      Merge tag 'mfd-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 8403ce70
      Linus Torvalds authored
      Pull MFD updates from Lee Jones:
       "New Device Support:
         - Add support for Watchdog to ChromeOS Embedded Controller
         - Add support for GPIOs to ChromeOS Embedded Controller
         - Add supprt for Sound to MediaTek MT6357 CODEC
      
        New Functionality:
         - Add power-off functionality to Texas Instruments TWL series CODECs
      
        Fix-ups:
         - Device Tree binding adaptions/conversions/creation
         - Use/convert to new/better APIs/helpers/MACROs instead of
           hand-rolling implementations
         - Trivial; spelling, whitespace, clean-ups, etc
         - Remove superfluous code and simplify overall
         - Fix include lists; alphabetise, remove unused, explicitly add used
         - Use dev_err_probe() to clean-up error paths
         - Convert used cache type over to the Maple Tree in many instances
         - Constify a bunch of static structs
         - Refrain from over-riding resources provided via the firmware
      
        Bug Fixes:
         - Fix a clock related firmware bug on Dell XPS 9530 et al.
         - Repair incorrect IRQ designations
         - Increase buffer sizes to omit various snprintf compiler errors
         - Ensure errors are handled properly
         - Balance references and prevent resource leaks
         - Rectify Power Key interrupt processing
         - Fix Kconfig related build errors
         - Correct a bunch of register start-up default values"
      
      * tag 'mfd-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (65 commits)
        mfd: cs42l43: Fix wrong GPIO_FN_SEL and SPI_CLK_CONFIG1 defaults
        mfd: cs42l43: Fix wrong register defaults
        mfd: mt6397-core: Register mt6357 sound codec
        dt-bindings: mfd: syscon: Add ti,am62-usb-phy-ctrl compatible
        dt-bindings: mfd: dlg,da9063: Make #interrupt-cells required
        dt-bindings: mfd: Convert atmel-flexcom to json-schema
        mfd: kempld-core: Don't replace resources provided by ACPI
        mfd: cros_ec_dev: Add GPIO device if feature present on EC
        dt-bindings: mfd: cros-ec: Add properties for GPIO controller
        mfd: twl: Select MFD_CORE
        mfd: core: Constify the struct device_type usage
        mfd: rk8xx-core: Fix interrupt processing order for power key button
        mfd: twl4030-power: Accept standard property for power controller
        mfd: twl-core: Add power off implementation for twl603x
        dt-bindings: mfd: ti,twl: Document system-power-controller
        mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref
        mfd: syscon: Remove extern from function prototypes
        mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
        mfd: mc13xxx: Use bitfield helpers
        mfd: rc5t583: Convert to use maple tree register cache
        ...
      8403ce70
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · a3df5d54
      Linus Torvalds authored
      Pull pin control updates from Linus Walleij:
       "No core changes this time around.
      
        New drivers:
      
         - New driver for Renesas R8A779H0 also known as R-Car V4M.
      
         - New driver for the Awinic AW9523/B I2C GPIO expander. I found this
           living out-of-tree in OpenWrt as an upstream attempt had stalled on
           the finishing line, so I picked it up and finished the job.
      
        Improvements:
      
         - The Nomadik pin control driver was for years re-used out of tree
           for the ST STA chips, and now the IP was re-used in a MIPS
           automotive SoC called MobilEyeq5, so it has been split in pin
           control and GPIO drivers so the latter can be reused by MobilEyeq5.
           (Along with a long list of cleanups)
      
         - A lot of overall cleanup and tidying up"
      
      * tag 'pinctrl-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (87 commits)
        drivers/gpio/nomadik: move dummy nmk_gpio_dbg_show_one() to header
        gpio: nomadik: remove BUG_ON() in nmk_gpio_populate_chip()
        dt-bindings: pinctrl: qcom: update compatible name for match with driver
        pinctrl: aw9523: Make the driver tristate
        pinctrl: nomadik: fix dereference of error pointer
        gpio: nomadik: Back out some managed resources
        pinctrl: aw9523: Add proper terminator
        pinctrl: core: comment that pinctrl_add_gpio_range() is deprecated
        pinctrl: pinmux: Suppress error message for -EPROBE_DEFER
        pinctrl: Add driver for Awinic AW9523/B I2C GPIO Expander
        dt-bindings: pinctrl: Add bindings for Awinic AW9523/AW9523B
        gpio: nomadik: Finish conversion to use firmware node APIs
        gpio: nomadik: fix Kconfig dependencies inbetween pinctrl & GPIO
        pinctrl: da9062: Add OF table
        dt-bindings: pinctrl: at91: add sam9x7
        pinctrl: ocelot: remove redundant assignment to variable ret
        gpio: nomadik: grab optional reset control and deassert it at probe
        gpio: nomadik: support mobileye,eyeq5-gpio
        gpio: nomadik: handle variadic GPIO count
        gpio: nomadik: support shared GPIO IRQs
        ...
      a3df5d54
    • Linus Torvalds's avatar
      Merge tag 'for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 44f89c6d
      Linus Torvalds authored
      Pull power supply and reset updates from Sebastian Reichel:
       "New features:
         - axp20x_usb_power: report USB type
      
        Cleanups:
         - convert lots of drivers to use devm_power_supply_register()
         - convert lots of reset drivers to use devm_register_sys_off_handler()
         - constify device_type and power_supply_class
         - axp20x_usb_power: use correct property to report input current limit
         - mm8013: correct handling of "not charging" status register
         - core: fix charge_behaviour formatting
         - minor fixes cleanups"
      
      * tag 'for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (66 commits)
        power: supply: core: fix charge_behaviour formatting
        power: supply: core: ease special formatting implementations
        power: supply: mm8013: fix "not charging" detection
        power: supply: move power_supply_attr_groups definition back to sysfs
        power: supply: core: simplify power_supply_class_init
        power: supply: core: add power_supply_for_each_device()
        power: supply: core: make power_supply_class constant
        power: supply: bq2415x_charger: report online status
        power: supply: core: move power_supply_attr_group into #ifdef block
        power: supply: core: Fix power_supply_init_attrs() stub
        power: supply: bq27xxx: Report charge full state correctly
        power: reset: rmobile-reset: Make sysc_base2 local
        power: supply: core: constify the struct device_type usage
        power: supply: axp288_fuel_gauge: Deny ROCK Pi X
        power: reset: rmobile-reset: Map correct MMIO resource
        power: reset: xgene-reboot: Fix a NULL vs IS_ERR() test
        power: supply: axp288_fuel_gauge: Add STCK1A* Intel Compute Sticks to the deny-list
        power: reset: syscon-poweroff: Use devm_register_sys_off_handler(POWER_OFF)
        power: reset: syscon-poweroff: Move device data into a struct
        power: reset: restart-poweroff: Use devm_register_sys_off_handler(POWER_OFF)
        ...
      44f89c6d
    • Linus Torvalds's avatar
      Merge tag 'hsi-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi · 80d80de4
      Linus Torvalds authored
      Pull HSI updates from Sebastian Reichel:
      
       - fix kernel-doc warning
      
       - make hsi_bus_type const
      
      [ And as always I had to remind myself about the acronyn, so to avoid
        that for others: "HSI" is High Speed Synchronous Serial Interface,
        because of course it is.     - Linus ]
      
      * tag 'hsi-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
        HSI: ssi_protocol: fix struct members kernel-doc warnings
        hsi: hsi_core: make hsi_bus_type const
      80d80de4