linux/arch/x86/platform
Matthew Garrett 31ff2f20d9 efi: Distinguish between "remaining space" and actually used space
EFI implementations distinguish between space that is actively used by a
variable and space that merely hasn't been garbage collected yet. Space
that hasn't yet been garbage collected isn't available for use and so isn't
counted in the remaining_space field returned by QueryVariableInfo().

Combined with commit 68d9298 this can cause problems. Some implementations
don't garbage collect until the remaining space is smaller than the maximum
variable size, and as a result check_var_size() will always fail once more
than 50% of the variable store has been used even if most of that space is
marked as available for garbage collection. The user is unable to create
new variables, and deleting variables doesn't increase the remaining space.

The problem that 68d9298 was attempting to avoid was one where certain
platforms fail if the actively used space is greater than 50% of the
available storage space. We should be able to calculate that by simply
summing the size of each available variable and subtracting that from
the total storage space. With luck this will fix the problem described in
https://bugzilla.kernel.org/show_bug.cgi?id=55471 without permitting
damage to occur to the machines 68d9298 was attempting to fix.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-04-15 21:33:05 +01:00
..
ce4100 TTY/Serial merge for 3.8-rc1 2012-12-11 14:08:47 -08:00
efi efi: Distinguish between "remaining space" and actually used space 2013-04-15 21:33:05 +01:00
geode arch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver 2012-05-04 14:40:07 -07:00
goldfish goldfish: platform device for x86 2013-01-21 12:09:19 -08:00
iris arch/x86/platform/iris/iris.c: register a platform device and a platform driver 2012-12-18 15:02:11 -08:00
mrst X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
olpc ACPI: Remove useless type argument of driver .remove() operation 2013-01-26 00:37:24 +01:00
scx200 X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
sfi x86: Convert a few mistaken __cpuinit annotations to __init 2013-01-24 17:12:19 +01:00
ts5500 x86: Add TS-5500 platform support 2013-01-25 19:40:23 +01:00
uv Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-19 20:12:57 -08:00
visws x86/apic: Fix typo EIO_ACK -> EOI_ACK and document it 2012-05-18 09:46:07 +02:00
Makefile x86: Add TS-5500 platform support 2013-01-25 19:40:23 +01:00