Re: [PATCH v2 0/6] Chainsaw efivars.c

2013-04-17 Thread Matt Fleming
On 04/17/2013 01:30 AM, Tom Gundersen wrote:
> Hi Matt,
> 
> On Tue, Apr 16, 2013 at 11:41 PM, Matt Fleming  wrote:
>> This patch series introduces the new efivar_entry API, and splits out the 
>> major
>> parts of efivars.c into new files. In particular, having the efivarfs code
>> under fs/ allows building an efivarfs.ko module, which means mount(8) can
>> automatically load it.
>>
>> The remaining EFI code is repositioned under drivers/firmware/efi/.
> 
> These all look good to me, so feel free to add my Reviewed-by.
> 
> Tested on top of 3.9-rc7, with everything built as modules. Everything
> works as intended: systemd correctly detects it is on an EFI system,
> so mounts efivarfs, which auto-loads the required modules.
> 
> Thanks a lot!

Thanks for reviewing and testing! I've added your Reviewed-by and
Tested-by tags to all 5 patches (but not the one you authored). I found
a bug in PATCH 3, so I've sent out a v3 of the series.

Peter, I've pulled these 6 patches into the 'chainsaw' branch in the EFI
repo. I think the prudent thing to do (as you previously suggested) is
to merge that branch into tip as a separate topic branch, just in case
we need to drop it before the merge window opens.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 0/6] Chainsaw efivars.c

2013-04-17 Thread Matt Fleming
On 04/17/2013 01:30 AM, Tom Gundersen wrote:
 Hi Matt,
 
 On Tue, Apr 16, 2013 at 11:41 PM, Matt Fleming m...@console-pimps.org wrote:
 This patch series introduces the new efivar_entry API, and splits out the 
 major
 parts of efivars.c into new files. In particular, having the efivarfs code
 under fs/ allows building an efivarfs.ko module, which means mount(8) can
 automatically load it.

 The remaining EFI code is repositioned under drivers/firmware/efi/.
 
 These all look good to me, so feel free to add my Reviewed-by.
 
 Tested on top of 3.9-rc7, with everything built as modules. Everything
 works as intended: systemd correctly detects it is on an EFI system,
 so mounts efivarfs, which auto-loads the required modules.
 
 Thanks a lot!

Thanks for reviewing and testing! I've added your Reviewed-by and
Tested-by tags to all 5 patches (but not the one you authored). I found
a bug in PATCH 3, so I've sent out a v3 of the series.

Peter, I've pulled these 6 patches into the 'chainsaw' branch in the EFI
repo. I think the prudent thing to do (as you previously suggested) is
to merge that branch into tip as a separate topic branch, just in case
we need to drop it before the merge window opens.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 0/6] Chainsaw efivars.c

2013-04-16 Thread Tom Gundersen
Hi Matt,

On Tue, Apr 16, 2013 at 11:41 PM, Matt Fleming  wrote:
> This patch series introduces the new efivar_entry API, and splits out the 
> major
> parts of efivars.c into new files. In particular, having the efivarfs code
> under fs/ allows building an efivarfs.ko module, which means mount(8) can
> automatically load it.
>
> The remaining EFI code is repositioned under drivers/firmware/efi/.

These all look good to me, so feel free to add my Reviewed-by.

Tested on top of 3.9-rc7, with everything built as modules. Everything
works as intended: systemd correctly detects it is on an EFI system,
so mounts efivarfs, which auto-loads the required modules.

Thanks a lot!

Tom
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 0/6] Chainsaw efivars.c

2013-04-16 Thread Matt Fleming
From: Matt Fleming 

drivers/firmware/efivars.c has grown pretty large and is ~2K lines.

Inside efivars.c there's currently,

  o code for handling EFI variables at the firmware-level
  o sysfs code for exposing EFI variables
  o a new EFI variable filesystem
  o a persistent storage backend

all intertwined and smushed together. This situation is only going to get worse
as new EFI support is added.

We need an interface that hides the EFI variable operations in use so code
isn't tempted to access them directly, e.g. efivarfs currently uses '__efivars'
which means it doesn't work for CONFIG_GOOGLE_SMI as that uses different
variable ops. With this interface in place, we can start moving independent
code out into separate files, allowing users to only turn on the functionality
that they want.

This patch series introduces the new efivar_entry API, and splits out the major
parts of efivars.c into new files. In particular, having the efivarfs code
under fs/ allows building an efivarfs.ko module, which means mount(8) can
automatically load it.

The remaining EFI code is repositioned under drivers/firmware/efi/.

The series is also available on the 'chainsaw' branch at,

  git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/linux.git

Changes in v2:

 - Add Reviewed-by/Acked-by tags from Mike
 - Allow both EFI variable ops to be built as requested by Mike (PATCH 2)
 - Fix deadlock and remove unnecessary logic changes in the pstore patch
   reported by Seiji (PATCH 3)

Matt Fleming (5):
  efi: move utf16 string functions to efi.h
  efivars: Keep a private global pointer to efivars
  efivars: efivar_entry API
  efivars: Move pstore code into the new EFI directory
  efivarfs: Move to fs/efivarfs

Tom Gundersen (1):
  efi: split efisubsystem from efivars

 MAINTAINERS   |   13 +-
 drivers/firmware/Kconfig  |   36 +-
 drivers/firmware/Makefile |2 +-
 drivers/firmware/efi/Kconfig  |   39 +
 drivers/firmware/efi/Makefile |6 +
 drivers/firmware/efi/efi-pstore.c |  244 +
 drivers/firmware/efi/efi.c|  134 +++
 drivers/firmware/efi/efivars.c|  615 +++
 drivers/firmware/efi/vars.c   | 1046 ++
 drivers/firmware/efivars.c| 2171 -
 drivers/firmware/google/gsmi.c|   30 +-
 fs/Kconfig|1 +
 fs/Makefile   |1 +
 fs/efivarfs/Kconfig   |   12 +
 fs/efivarfs/Makefile  |7 +
 fs/efivarfs/file.c|  111 ++
 fs/efivarfs/inode.c   |  173 +++
 fs/efivarfs/internal.h|   22 +
 fs/efivarfs/super.c   |  266 +
 include/linux/efi.h   |  133 ++-
 20 files changed, 2828 insertions(+), 2234 deletions(-)
 create mode 100644 drivers/firmware/efi/Kconfig
 create mode 100644 drivers/firmware/efi/Makefile
 create mode 100644 drivers/firmware/efi/efi-pstore.c
 create mode 100644 drivers/firmware/efi/efi.c
 create mode 100644 drivers/firmware/efi/efivars.c
 create mode 100644 drivers/firmware/efi/vars.c
 delete mode 100644 drivers/firmware/efivars.c
 create mode 100644 fs/efivarfs/Kconfig
 create mode 100644 fs/efivarfs/Makefile
 create mode 100644 fs/efivarfs/file.c
 create mode 100644 fs/efivarfs/inode.c
 create mode 100644 fs/efivarfs/internal.h
 create mode 100644 fs/efivarfs/super.c

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 0/6] Chainsaw efivars.c

2013-04-16 Thread Matt Fleming
From: Matt Fleming matt.flem...@intel.com

drivers/firmware/efivars.c has grown pretty large and is ~2K lines.

Inside efivars.c there's currently,

  o code for handling EFI variables at the firmware-level
  o sysfs code for exposing EFI variables
  o a new EFI variable filesystem
  o a persistent storage backend

all intertwined and smushed together. This situation is only going to get worse
as new EFI support is added.

We need an interface that hides the EFI variable operations in use so code
isn't tempted to access them directly, e.g. efivarfs currently uses '__efivars'
which means it doesn't work for CONFIG_GOOGLE_SMI as that uses different
variable ops. With this interface in place, we can start moving independent
code out into separate files, allowing users to only turn on the functionality
that they want.

This patch series introduces the new efivar_entry API, and splits out the major
parts of efivars.c into new files. In particular, having the efivarfs code
under fs/ allows building an efivarfs.ko module, which means mount(8) can
automatically load it.

The remaining EFI code is repositioned under drivers/firmware/efi/.

The series is also available on the 'chainsaw' branch at,

  git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/linux.git

Changes in v2:

 - Add Reviewed-by/Acked-by tags from Mike
 - Allow both EFI variable ops to be built as requested by Mike (PATCH 2)
 - Fix deadlock and remove unnecessary logic changes in the pstore patch
   reported by Seiji (PATCH 3)

Matt Fleming (5):
  efi: move utf16 string functions to efi.h
  efivars: Keep a private global pointer to efivars
  efivars: efivar_entry API
  efivars: Move pstore code into the new EFI directory
  efivarfs: Move to fs/efivarfs

Tom Gundersen (1):
  efi: split efisubsystem from efivars

 MAINTAINERS   |   13 +-
 drivers/firmware/Kconfig  |   36 +-
 drivers/firmware/Makefile |2 +-
 drivers/firmware/efi/Kconfig  |   39 +
 drivers/firmware/efi/Makefile |6 +
 drivers/firmware/efi/efi-pstore.c |  244 +
 drivers/firmware/efi/efi.c|  134 +++
 drivers/firmware/efi/efivars.c|  615 +++
 drivers/firmware/efi/vars.c   | 1046 ++
 drivers/firmware/efivars.c| 2171 -
 drivers/firmware/google/gsmi.c|   30 +-
 fs/Kconfig|1 +
 fs/Makefile   |1 +
 fs/efivarfs/Kconfig   |   12 +
 fs/efivarfs/Makefile  |7 +
 fs/efivarfs/file.c|  111 ++
 fs/efivarfs/inode.c   |  173 +++
 fs/efivarfs/internal.h|   22 +
 fs/efivarfs/super.c   |  266 +
 include/linux/efi.h   |  133 ++-
 20 files changed, 2828 insertions(+), 2234 deletions(-)
 create mode 100644 drivers/firmware/efi/Kconfig
 create mode 100644 drivers/firmware/efi/Makefile
 create mode 100644 drivers/firmware/efi/efi-pstore.c
 create mode 100644 drivers/firmware/efi/efi.c
 create mode 100644 drivers/firmware/efi/efivars.c
 create mode 100644 drivers/firmware/efi/vars.c
 delete mode 100644 drivers/firmware/efivars.c
 create mode 100644 fs/efivarfs/Kconfig
 create mode 100644 fs/efivarfs/Makefile
 create mode 100644 fs/efivarfs/file.c
 create mode 100644 fs/efivarfs/inode.c
 create mode 100644 fs/efivarfs/internal.h
 create mode 100644 fs/efivarfs/super.c

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 0/6] Chainsaw efivars.c

2013-04-16 Thread Tom Gundersen
Hi Matt,

On Tue, Apr 16, 2013 at 11:41 PM, Matt Fleming m...@console-pimps.org wrote:
 This patch series introduces the new efivar_entry API, and splits out the 
 major
 parts of efivars.c into new files. In particular, having the efivarfs code
 under fs/ allows building an efivarfs.ko module, which means mount(8) can
 automatically load it.

 The remaining EFI code is repositioned under drivers/firmware/efi/.

These all look good to me, so feel free to add my Reviewed-by.

Tested on top of 3.9-rc7, with everything built as modules. Everything
works as intended: systemd correctly detects it is on an EFI system,
so mounts efivarfs, which auto-loads the required modules.

Thanks a lot!

Tom
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/