Merge branch 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Aug 2011 23:40:51 +0000 (13:40 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Aug 2011 23:40:51 +0000 (13:40 -1000)
* 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  efivars: Introduce PSTORE_EFI_ATTRIBUTES
  efivars: Use string functions in pstore_write
  efivars: introduce utf16_strncmp
  efivars: String functions
  efi: Add support for using efivars as a pstore backend
  pstore: Allow the user to explicitly choose a backend
  pstore: Make "part" unsigned
  pstore: Add extra context for writes and erases
  pstore: Extend API for more flexibility in new backends

1  2 
Documentation/kernel-parameters.txt
include/linux/efi.h

@@@ -1159,6 -1159,10 +1159,6 @@@ bytes respectively. Such letter suffixe
                        for all guests.
                        Default is 1 (enabled) if in 64bit or 32bit-PAE mode
  
 -      kvm-intel.bypass_guest_pf=
 -                      [KVM,Intel] Disables bypassing of guest page faults
 -                      on Intel chips. Default is 1 (enabled)
 -
        kvm-intel.ept=  [KVM,Intel] Disable extended page tables
                        (virtualized MMU) support on capable Intel chips.
                        Default is 1 (enabled)
        no-kvmapf       [X86,KVM] Disable paravirtualized asynchronous page
                        fault handling.
  
 +      no-steal-acc    [X86,KVM] Disable paravirtualized steal time accounting.
 +                      steal time is computed, but won't influence scheduler
 +                      behaviour
 +
        nolapic         [X86-32,APIC] Do not enable or use the local APIC.
  
        nolapic_timer   [X86-32,APIC] Do not use the local APIC timer.
                        See Documentation/sound/oss/oss-parameters.txt
  
        panic=          [KNL] Kernel behaviour on panic: delay <timeout>
 -                      seconds before rebooting
 +                      timeout > 0: seconds before rebooting
 +                      timeout = 0: wait forever
 +                      timeout < 0: reboot immediately
                        Format: <timeout>
  
        parkbd.port=    [HW] Parallel port number the keyboard adapter is
                        [HW,MOUSE] Controls Logitech smartscroll autorepeat.
                        0 = disabled, 1 = enabled (default).
  
+       pstore.backend= Specify the name of the pstore backend to use
        pt.             [PARIDE]
                        See Documentation/blockdev/paride.txt.
  
                        <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7>
                        See also Documentation/input/joystick-parport.txt
  
 +      udbg-immortal   [PPC] When debugging early kernel crashes that
 +                      happen after console_init() and before a proper 
 +                      console driver takes over, this boot options might
 +                      help "seeing" what's going on.
 +
        uhash_entries=  [KNL,NET]
                        Set number of hash buckets for UDP/UDP-Lite connections
  
        unknown_nmi_panic
                        [X86] Cause panic on unknown NMI.
  
 +      usbcore.authorized_default=
 +                      [USB] Default USB device authorization:
 +                      (default -1 = authorized except for wireless USB,
 +                      0 = not authorized, 1 = authorized)
 +
        usbcore.autosuspend=
                        [USB] The autosuspend time delay (in seconds) used
                        for newly-detected USB devices (default 2).  This
diff --combined include/linux/efi.h
@@@ -19,6 -19,7 +19,7 @@@
  #include <linux/rtc.h>
  #include <linux/ioport.h>
  #include <linux/pfn.h>
+ #include <linux/pstore.h>
  
  #include <asm/page.h>
  #include <asm/system.h>
@@@ -101,13 -102,6 +102,13 @@@ typedef struct 
        u64 attribute;
  } efi_memory_desc_t;
  
 +typedef struct {
 +      efi_guid_t guid;
 +      u32 headersize;
 +      u32 flags;
 +      u32 imagesize;
 +} efi_capsule_header_t;
 +
  typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg);
  
  /*
@@@ -163,9 -157,6 +164,9 @@@ typedef struct 
        unsigned long set_variable;
        unsigned long get_next_high_mono_count;
        unsigned long reset_system;
 +      unsigned long update_capsule;
 +      unsigned long query_capsule_caps;
 +      unsigned long query_variable_info;
  } efi_runtime_services_t;
  
  typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc);
@@@ -178,7 -169,7 +179,7 @@@ typedef efi_status_t efi_get_variable_
  typedef efi_status_t efi_get_next_variable_t (unsigned long *name_size, efi_char16_t *name,
                                              efi_guid_t *vendor);
  typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, 
 -                                       unsigned long attr, unsigned long data_size, 
 +                                       u32 attr, unsigned long data_size,
                                         void *data);
  typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count);
  typedef void efi_reset_system_t (int reset_type, efi_status_t status,
@@@ -187,17 -178,6 +188,17 @@@ typedef efi_status_t efi_set_virtual_ad
                                                unsigned long descriptor_size,
                                                u32 descriptor_version,
                                                efi_memory_desc_t *virtual_map);
 +typedef efi_status_t efi_query_variable_info_t(u32 attr,
 +                                             u64 *storage_space,
 +                                             u64 *remaining_space,
 +                                             u64 *max_variable_size);
 +typedef efi_status_t efi_update_capsule_t(efi_capsule_header_t **capsules,
 +                                        unsigned long count,
 +                                        unsigned long sg_list);
 +typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules,
 +                                            unsigned long count,
 +                                            u64 *max_size,
 +                                            int *reset_type);
  
  /*
   *  EFI Configuration Table and GUID definitions
  #define UV_SYSTEM_TABLE_GUID \
      EFI_GUID(  0x3b13a7d4, 0x633e, 0x11dd, 0x93, 0xec, 0xda, 0x25, 0x56, 0xd8, 0x95, 0x93 )
  
+ #define LINUX_EFI_CRASH_GUID \
+     EFI_GUID(  0xcfc8fc79, 0xbe2e, 0x4ddc, 0x97, 0xf0, 0x9f, 0x98, 0xbf, 0xe2, 0x98, 0xa0 )
  typedef struct {
        efi_guid_t guid;
        unsigned long table;
  
  #define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL)
  
 +#define EFI_2_30_SYSTEM_TABLE_REVISION  ((2 << 16) | (30))
 +#define EFI_2_20_SYSTEM_TABLE_REVISION  ((2 << 16) | (20))
 +#define EFI_2_10_SYSTEM_TABLE_REVISION  ((2 << 16) | (10))
 +#define EFI_2_00_SYSTEM_TABLE_REVISION  ((2 << 16) | (00))
 +#define EFI_1_10_SYSTEM_TABLE_REVISION  ((1 << 16) | (10))
 +#define EFI_1_02_SYSTEM_TABLE_REVISION  ((1 << 16) | (02))
 +
  typedef struct {
        efi_table_hdr_t hdr;
        unsigned long fw_vendor;        /* physical addr of CHAR16 vendor string */
@@@ -278,7 -254,6 +282,7 @@@ struct efi_memory_map 
   */
  extern struct efi {
        efi_system_table_t *systab;     /* EFI system table */
 +      unsigned int runtime_version;   /* Runtime services version */
        unsigned long mps;              /* MPS table */
        unsigned long acpi;             /* ACPI table  (IA64 ext 0.71) */
        unsigned long acpi20;           /* ACPI table  (ACPI 2.0) */
        efi_get_variable_t *get_variable;
        efi_get_next_variable_t *get_next_variable;
        efi_set_variable_t *set_variable;
 +      efi_query_variable_info_t *query_variable_info;
 +      efi_update_capsule_t *update_capsule;
 +      efi_query_capsule_caps_t *query_capsule_caps;
        efi_get_next_high_mono_count_t *get_next_high_mono_count;
        efi_reset_system_t *reset_system;
        efi_set_virtual_address_map_t *set_virtual_address_map;
@@@ -458,6 -430,8 +462,8 @@@ struct efivars 
        struct kset *kset;
        struct bin_attribute *new_var, *del_var;
        const struct efivar_operations *ops;
+       struct efivar_entry *walk_entry;
+       struct pstore_info efi_pstore_info;
  };
  
  int register_efivars(struct efivars *efivars,