mbox series

[0/4] efivar: remove inappropriate uses of the efivar API

Message ID 20220617174851.1286026-1-ardb@kernel.org
Headers show
Series efivar: remove inappropriate uses of the efivar API | expand

Message

Ard Biesheuvel June 17, 2022, 5:48 p.m. UTC
The efivar layer is a caching non-volatile variable store abstraction
that is normally backed by EFI, but in some cases, might be backed by
Google SMI firmware interfaces instead.

It is mainly used by efivarfs and EFI pstore, both of which actually
need the caching and abstraction properties. However, there are a few
other occurrences where efivar is not necessary, or used in an invalid
way. So let's fix this up, and remove some impediments to refactoring
and cleaning up the efivars layer in the future.

Assuming there are no objections to these changes, I intend to queue
them up in the EFI tree fairly soon, so that ongoing work depending on
these changes can continue as well.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Arend van Spriel <aspriel@gmail.com>
Cc: Franky Lin <franky.lin@broadcom.com>
Cc: Hante Meuleman <hante.meuleman@broadcom.com>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Gregory Greenman <gregory.greenman@intel.com>
Cc: linux-input@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list.pdl@broadcom.com

Ard Biesheuvel (4):
  efi: avoid efivars layer when loading SSDTs from variables
  Input: applespi - avoid efivars API and invoke EFI services directly
  iwlwifi: Switch to proper EFI variable store interface
  brcmfmac: Switch to appropriate helper to load EFI variable contents

 drivers/firmware/efi/efi.c                                  | 103 ++++++++------------
 drivers/input/keyboard/applespi.c                           |  42 +++-----
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c |  25 ++---
 drivers/net/wireless/intel/iwlwifi/fw/uefi.c                |  96 ++++++------------
 4 files changed, 95 insertions(+), 171 deletions(-)

Comments

Ard Biesheuvel June 21, 2022, 4:19 p.m. UTC | #1
On Mon, 20 Jun 2022 at 11:00, Kalle Valo <kvalo@kernel.org> wrote:
>
> Ard Biesheuvel <ardb@kernel.org> writes:
>
> > The efivar layer is a caching non-volatile variable store abstraction
> > that is normally backed by EFI, but in some cases, might be backed by
> > Google SMI firmware interfaces instead.
> >
> > It is mainly used by efivarfs and EFI pstore, both of which actually
> > need the caching and abstraction properties. However, there are a few
> > other occurrences where efivar is not necessary, or used in an invalid
> > way. So let's fix this up, and remove some impediments to refactoring
> > and cleaning up the efivars layer in the future.
> >
> > Assuming there are no objections to these changes, I intend to queue
> > them up in the EFI tree fairly soon, so that ongoing work depending on
> > these changes can continue as well.
> >
>
> [...]
>
> >  drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c |  25 ++---
> >  drivers/net/wireless/intel/iwlwifi/fw/uefi.c                |  96 ++++++------------
>
> Feel free to take the wireless patches via your tree:
>
> Acked-by: Kalle Valo <kvalo@kernel.org>
>

Thanks, I've queued these up.