be9c4fa2 | 09-Jun-2021 |
Baokun Li <libaokun1@huawei.com> |
platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_packet_layer.c
Using list_move_tail() instead of list_del() + list_add_tail() in ssh_packet_layer.c.
Report
platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_packet_layer.c
Using list_move_tail() instead of list_del() + list_add_tail() in ssh_packet_layer.c.
Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210609072448.1357524-1-libaokun1@huawei.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
a8aedd45 | 09-Jun-2021 |
Baokun Li <libaokun1@huawei.com> |
platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_request_layer.c
Using list_move_tail() instead of list_del() + list_add_tail() in ssh_request_layer.c.
Repo
platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_request_layer.c
Using list_move_tail() instead of list_del() + list_add_tail() in ssh_request_layer.c.
Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210609072638.1358174-1-libaokun1@huawei.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
f9e7f9a2 | 04-Jun-2021 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Drop unnecessary variable initialization
The status variable in ssam_controller_event_disable() is always set, no need to initialize it.
Signed-off-by: Maximilian Luz
platform/surface: aggregator: Drop unnecessary variable initialization
The status variable in ssam_controller_event_disable() is always set, no need to initialize it.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210604210907.25738-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
37ed76a7 | 04-Jun-2021 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Do not return uninitialized value
The status variable in ssam_nf_refcount_disable_free() is only set when the reference count equals zero. Otherwise, it is returned uni
platform/surface: aggregator: Do not return uninitialized value
The status variable in ssam_nf_refcount_disable_free() is only set when the reference count equals zero. Otherwise, it is returned uninitialized. Fix this by always initializing status to zero.
Reported-by: kernel test robot <lkp@intel.com> Fixes: 640ee17199e4 ("platform/surface: aggregator: Allow enabling of events without notifiers") Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210604210907.25738-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
4b38a1dc | 04-Jun-2021 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Allow enabling of events without notifiers
We can already enable and disable SAM events via one of two ways: either via a (non-observer) notifier tied to a specific eve
platform/surface: aggregator: Allow enabling of events without notifiers
We can already enable and disable SAM events via one of two ways: either via a (non-observer) notifier tied to a specific event group, or a generic event enable/disable request. In some instances, however, neither method may be desirable.
The first method will tie the event enable request to a specific notifier, however, when we want to receive notifications for multiple event groups of the same target category and forward this to the same notifier callback, we may receive duplicate events, i.e. one event per registered notifier. The second method will bypass the internal reference counting mechanism, meaning that a disable request will disable the event regardless of any other client driver using it, which may break the functionality of that driver.
To address this problem, add new functions that allow enabling and disabling of events via the event reference counting mechanism built into the controller, without needing to register a notifier.
This can then be used in combination with observer notifiers to process multiple events of the same target category without duplication in the same callback function.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20210604134755.535590-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
0e8512fa | 04-Jun-2021 |
Maximilian Luz <luzmaximilian@gmail.com> |
platform/surface: aggregator: Allow registering notifiers without enabling events
Currently, each SSAM event notifier is directly tied to one group of events. This makes sense as registering a notif
platform/surface: aggregator: Allow registering notifiers without enabling events
Currently, each SSAM event notifier is directly tied to one group of events. This makes sense as registering a notifier will automatically take care of enabling the corresponding event group and normally drivers only need notifications for a very limited number of events, associated with different callbacks for each group.
However, there are rare cases, especially for debugging, when we want to get notifications for a whole event target category instead of just a single group of events in that category. Registering multiple notifiers, i.e. one per group, may be infeasible due to two issues: a) we might not know every event enable/disable specification as some events are auto-enabled by the EC and b) forwarding this to the same callback will lead to duplicate events as we might not know the full event specification to perform the appropriate filtering.
This commit introduces observer-notifiers, which are notifiers that are not tied to a specific event group and do not attempt to manage any events. In other words, they can be registered without enabling any event group or incrementing the corresponding reference count and just act as silent observers, listening to all currently/previously enabled events based on their match-specification.
Essentially, this allows us to register one single notifier for a full event target category, meaning that we can process all events of that target category in a single callback without duplication. Specifically, this will be used in the cdev debug interface to forward events to user-space via a device file from which the events can be read.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210604134755.535590-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|